forked from integrated_whb/integrated_whb
八项作业受限和动火验收或打回删除已绑定监控
parent
546f680ff1
commit
b5403d30bd
|
@ -0,0 +1,222 @@
|
|||
package com.zcloud.controller.eightwork;
|
||||
|
||||
import com.zcloud.controller.base.BaseController;
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
import com.zcloud.logs.LogAnno;
|
||||
import com.zcloud.service.eightwork.HighworkService;
|
||||
import com.zcloud.util.Tools;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
import org.springframework.web.multipart.MultipartRequest;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 说明:高处作业
|
||||
* 官网:www.zcloudchina.com
|
||||
*/
|
||||
@Controller
|
||||
@RequestMapping("/app/highwork")
|
||||
public class AppHighworkController extends BaseController {
|
||||
|
||||
@Autowired
|
||||
private HighworkService highworkService;
|
||||
|
||||
/**
|
||||
* 新增
|
||||
* @param
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value = "/add")
|
||||
@ResponseBody
|
||||
@LogAnno(menuType = "手机", menuServer = "高处作业", instructionsOperate = "高处作业", instructionsType = "新增")
|
||||
public Object add() throws Exception {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
highworkService.save(pd);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改
|
||||
* @param
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value = "/edit")
|
||||
@ResponseBody
|
||||
@LogAnno(menuType = "手机", menuServer = "高处作业", instructionsOperate = "高处作业", instructionsType = "新增")
|
||||
public Object edit() throws Exception {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
highworkService.edit(pd);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
/**
|
||||
* 删除
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value = "/delete")
|
||||
@ResponseBody
|
||||
@LogAnno(menuType = "手机", menuServer = "高处作业", instructionsOperate = "高处作业", instructionsType = "删除")
|
||||
public Object delete() throws Exception {
|
||||
Map<String, String> map = new HashMap<String, String>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
highworkService.delete(pd);
|
||||
map.put("result", errInfo); //返回结果
|
||||
return map;
|
||||
}
|
||||
|
||||
/**列表
|
||||
* @param page
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value="/list")
|
||||
@ResponseBody
|
||||
@LogAnno(menuType= "手机",menuServer= "高处作业",instructionsOperate = "高处作业",instructionsType = "列表")
|
||||
public Object list(Page page) throws Exception{
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
String KEYWORDS = pd.getString("KEYWORDS"); //关键词检索条件
|
||||
if(Tools.notEmpty(KEYWORDS))pd.put("KEYWORDS", KEYWORDS.trim());
|
||||
page.setPd(pd);
|
||||
List<PageData> varList = highworkService.list(page); //列出highwork列表
|
||||
map.put("varList", varList);
|
||||
map.put("page", page);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
@RequestMapping("/findById")
|
||||
@ResponseBody
|
||||
@LogAnno(menuType= "手机",menuServer= "高处作业",instructionsOperate = "高处作业",instructionsType = "获取详情")
|
||||
public Object findById() throws Exception {
|
||||
Map<String,Object> map = new HashMap<>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
pd = highworkService.findById(pd);
|
||||
map.put("result",errInfo);
|
||||
map.put("pd",pd);
|
||||
return map;
|
||||
}
|
||||
|
||||
@RequestMapping("/listSignFinished")
|
||||
@ResponseBody
|
||||
public Object listSignFinished() throws Exception {
|
||||
Map<String,Object> map = new HashMap<>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
PageData signs = highworkService.listSignFinished(pd);
|
||||
map.put("result",errInfo);
|
||||
map.put("signs",signs);
|
||||
return map;
|
||||
}
|
||||
|
||||
@RequestMapping("/nextStep")
|
||||
@ResponseBody
|
||||
@LogAnno(menuType= "手机",menuServer= "高处作业",instructionsOperate = "高处作业",instructionsType = "通过")
|
||||
public Object nextStep(MultipartRequest request) throws Exception {
|
||||
Map<String,Object> map = new HashMap<>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
List<MultipartFile> fileList = new ArrayList<MultipartFile>();
|
||||
String SIGNTIME[] = pd.getString("SIGNTIME").split(",");
|
||||
|
||||
for (int i = 0; i < SIGNTIME.length; i++) {
|
||||
fileList.add(request.getFile("file" + i));
|
||||
}
|
||||
highworkService.nextStep(pd, fileList.toArray(new MultipartFile[fileList.size()]));
|
||||
map.put("result",errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
|
||||
@RequestMapping("/checkWorkCount")
|
||||
@ResponseBody
|
||||
public Object checkWorkCount() throws Exception{
|
||||
Map<String,Object> map = new HashMap<>();
|
||||
String errorInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
map.put("count",highworkService.checkWorkCount(pd));
|
||||
map.put("result",errorInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
@RequestMapping("/listAllMeasures")
|
||||
@ResponseBody
|
||||
public Object listAllMeasures() throws Exception {
|
||||
Map<String,Object> map = new HashMap<>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
List<PageData> measuresList = highworkService.listAllMeasures();
|
||||
map.put("result",errInfo);
|
||||
map.put("measuresList",measuresList);
|
||||
return map;
|
||||
}
|
||||
|
||||
@RequestMapping("/listAllMeasuresForSign")
|
||||
@ResponseBody
|
||||
public Object listAllMeasuresForSign() throws Exception {
|
||||
Map<String,Object> map = new HashMap<>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
List<PageData> measuresForSignList = highworkService.listAllMeasuresForSign(pd);
|
||||
map.put("result",errInfo);
|
||||
map.put("measuresForSignList",measuresForSignList);
|
||||
return map;
|
||||
}
|
||||
|
||||
@RequestMapping("/listSignFinishMeasures")
|
||||
@ResponseBody
|
||||
public Object listSignFinishMeasures() throws Exception {
|
||||
Map<String,Object> map = new HashMap<>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
List<PageData> finishMeasuresList = highworkService.listSignFinishMeasures(pd);
|
||||
map.put("result",errInfo);
|
||||
map.put("finishMeasuresList",finishMeasuresList);
|
||||
return map;
|
||||
}
|
||||
|
||||
/**获取高处作业流程
|
||||
* @param
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value="/getFlowList")
|
||||
@ResponseBody
|
||||
@LogAnno(menuType= "手机",menuServer= "高处作业",instructionsOperate = "高处作业",instructionsType = "获取高处作业流程")
|
||||
public Object getFlowList() throws Exception{
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
List<PageData> flowList = highworkService.getFlowList(pd);
|
||||
map.put("flowList", flowList);
|
||||
map.put("result", errInfo); //返回结果
|
||||
return map;
|
||||
}
|
||||
|
||||
}
|
|
@ -40,6 +40,8 @@ public class ConfinedspaceServiceImpl implements ConfinedspaceService {
|
|||
@Autowired
|
||||
private ConfinedSpaceGasMapper confinedspacegasMapper;
|
||||
@Autowired
|
||||
private com.zcloud.mapper.datasource.eightWork.EightWorkVideoManagerMapper eightworkvideomanagerMapper;
|
||||
@Autowired
|
||||
private Smb smb;
|
||||
|
||||
private final String primary_key = "CONFINEDSPACE_ID";
|
||||
|
@ -144,6 +146,8 @@ public class ConfinedspaceServiceImpl implements ConfinedspaceService {
|
|||
saveLog(work,work.getString("USER_ID"),"1");
|
||||
|
||||
if("99".equals(currentflow.getString("NEXT_STEP_ID"))){
|
||||
eightworkvideomanagerMapper.editStatus(work);
|
||||
|
||||
return;
|
||||
}
|
||||
if (work.get("PREPARERS") != null && !work.get("PREPARERS").equals("")) { //如果是设置安全措施确认人步骤
|
||||
|
@ -153,6 +157,7 @@ public class ConfinedspaceServiceImpl implements ConfinedspaceService {
|
|||
}else if(pd.getString("APPLY_STATUS").equals("-1")){
|
||||
//保存日志
|
||||
saveLog(work,work.getString("USER_ID"),"-1");
|
||||
eightworkvideomanagerMapper.editStatus(work);
|
||||
|
||||
work.put("STEP_ID",-1);
|
||||
confinedspaceMapper.editStep(work);
|
||||
|
@ -274,6 +279,8 @@ public class ConfinedspaceServiceImpl implements ConfinedspaceService {
|
|||
sign.put("DESCR", pd.get("DESCR"));
|
||||
confinedspaceSignMapper.edit(sign);
|
||||
//保存日志
|
||||
eightworkvideomanagerMapper.editStatus(work);
|
||||
|
||||
work.put("STEP_ID", flow.get("NEXT_STEP_ID"));
|
||||
saveLog(work,pd.getString("USER_ID"),"-2");
|
||||
work.put("STEP_ID",-1);
|
||||
|
|
|
@ -17,7 +17,6 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.text.DecimalFormat;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
@ -44,6 +43,10 @@ public class HotworkServiceImpl implements HotworkService {
|
|||
private HotworkGasMapper hotworkGasMapper;
|
||||
@Autowired
|
||||
private Smb smb;
|
||||
@Autowired
|
||||
private com.zcloud.mapper.datasource.eightWork.EightWorkVideoManagerMapper eightworkvideomanagerMapper;
|
||||
|
||||
|
||||
|
||||
private final String primary_key = "HOTWORK_ID";
|
||||
private final String work_type = "HOTWORK";
|
||||
|
@ -149,6 +152,7 @@ public class HotworkServiceImpl implements HotworkService {
|
|||
saveLog(work,work.getString("USER_ID"),"1");
|
||||
|
||||
if("99".equals(currentflow.getString("NEXT_STEP_ID"))){
|
||||
eightworkvideomanagerMapper.editStatus(work);
|
||||
return;
|
||||
}
|
||||
if (work.get("PREPARERS") != null && !work.get("PREPARERS").equals("")) { //如果是设置安全措施确认人步骤
|
||||
|
@ -158,7 +162,7 @@ public class HotworkServiceImpl implements HotworkService {
|
|||
}else if(pd.getString("APPLY_STATUS").equals("-1")){
|
||||
//保存日志
|
||||
saveLog(work,work.getString("USER_ID"),"-1");
|
||||
|
||||
eightworkvideomanagerMapper.editStatus(work);
|
||||
work.put("STEP_ID",-1);
|
||||
hotworkMapper.editStep(work);
|
||||
}
|
||||
|
@ -279,6 +283,7 @@ public class HotworkServiceImpl implements HotworkService {
|
|||
sign.put("DESCR", pd.get("DESCR"));
|
||||
hotworkSignMapper.edit(sign);
|
||||
//保存日志
|
||||
eightworkvideomanagerMapper.editStatus(work);
|
||||
work.put("STEP_ID", flow.get("NEXT_STEP_ID"));
|
||||
saveLog(work,pd.getString("USER_ID"),"-2");
|
||||
work.put("STEP_ID",-1);
|
||||
|
|
Loading…
Reference in New Issue