清单排查、隐患流程对接代码
parent
3b1afc8344
commit
336916d4b9
|
@ -74,6 +74,7 @@ public class CheckRecordController extends BaseController {
|
||||||
private HiddenMailService hiddenMailService;
|
private HiddenMailService hiddenMailService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private MessageService messageService;
|
private MessageService messageService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增
|
* 新增
|
||||||
*
|
*
|
||||||
|
|
|
@ -2833,6 +2833,7 @@ public class HiddenController extends BaseController {
|
||||||
@RequestMapping(value = "/assign")
|
@RequestMapping(value = "/assign")
|
||||||
@RequiresPermissions("hidden:add")
|
@RequiresPermissions("hidden:add")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
|
@DockAnnotation
|
||||||
public Object assign() throws Exception {
|
public Object assign() throws Exception {
|
||||||
Map<String, Object> map = new HashMap<String, Object>();
|
Map<String, Object> map = new HashMap<String, Object>();
|
||||||
String errInfo = "success";
|
String errInfo = "success";
|
||||||
|
@ -2873,6 +2874,7 @@ public class HiddenController extends BaseController {
|
||||||
*/
|
*/
|
||||||
@RequestMapping(value = "/finalcheck")
|
@RequestMapping(value = "/finalcheck")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
|
@DockAnnotation
|
||||||
public Object finalcheck() throws Exception {
|
public Object finalcheck() throws Exception {
|
||||||
// 获取IP
|
// 获取IP
|
||||||
HttpServletRequest request = this.getRequest();
|
HttpServletRequest request = this.getRequest();
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
package com.zcloud.controller.bus;
|
package com.zcloud.controller.bus;
|
||||||
|
|
||||||
|
import com.zcloud.aspect.DockAnnotation;
|
||||||
import com.zcloud.controller.base.BaseController;
|
import com.zcloud.controller.base.BaseController;
|
||||||
import com.zcloud.entity.Page;
|
import com.zcloud.entity.Page;
|
||||||
import com.zcloud.entity.PageData;
|
import com.zcloud.entity.PageData;
|
||||||
|
@ -288,6 +289,7 @@ public class HiddenExamineController extends BaseController {
|
||||||
@RequestMapping(value = "/delayedExamine")
|
@RequestMapping(value = "/delayedExamine")
|
||||||
@RequiresPermissions("hidden:edit")
|
@RequiresPermissions("hidden:edit")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
|
@DockAnnotation()
|
||||||
public Object delayedExamine() throws Exception {
|
public Object delayedExamine() throws Exception {
|
||||||
Map<String, Object> map = new HashMap<String, Object>();
|
Map<String, Object> map = new HashMap<String, Object>();
|
||||||
String errInfo = "success";
|
String errInfo = "success";
|
||||||
|
@ -417,6 +419,7 @@ public class HiddenExamineController extends BaseController {
|
||||||
@RequestMapping(value = "/specialExamine")
|
@RequestMapping(value = "/specialExamine")
|
||||||
@RequiresPermissions("hidden:edit")
|
@RequiresPermissions("hidden:edit")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
|
@DockAnnotation
|
||||||
public Object specialExamine(@RequestParam(value = "FFILE", required = false) MultipartFile file) throws Exception {
|
public Object specialExamine(@RequestParam(value = "FFILE", required = false) MultipartFile file) throws Exception {
|
||||||
Map<String, Object> map = new HashMap<String, Object>();
|
Map<String, Object> map = new HashMap<String, Object>();
|
||||||
String errInfo = "success";
|
String errInfo = "success";
|
||||||
|
|
|
@ -577,6 +577,7 @@ public class HiddenApiController extends BaseController {
|
||||||
@RequestMapping(value = "/unableRectify")
|
@RequestMapping(value = "/unableRectify")
|
||||||
@RequiresPermissions("hidden:list")
|
@RequiresPermissions("hidden:list")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
|
@DockAnnotation(isAdd = true)
|
||||||
public Object unableRectify() throws Exception {
|
public Object unableRectify() throws Exception {
|
||||||
Map<String, Object> map = new HashMap<String, Object>();
|
Map<String, Object> map = new HashMap<String, Object>();
|
||||||
Integer code = 000000;
|
Integer code = 000000;
|
||||||
|
@ -609,7 +610,7 @@ public class HiddenApiController extends BaseController {
|
||||||
examine.put("OPERATOR", Jurisdiction.getUSER_ID());
|
examine.put("OPERATOR", Jurisdiction.getUSER_ID());
|
||||||
examine.put("OPERATTIME", DateUtil.date2Str(new Date()));
|
examine.put("OPERATTIME", DateUtil.date2Str(new Date()));
|
||||||
examine = hiddenExamineApiService.save(examine);
|
examine = hiddenExamineApiService.save(examine);
|
||||||
|
pd.put("examine",JSON.toJSONString(examine));
|
||||||
messageService.sendMessageByParameter("HIDDEN_MAIL_005", "友情提示:有一条隐患需要特殊审核",
|
messageService.sendMessageByParameter("HIDDEN_MAIL_005", "友情提示:有一条隐患需要特殊审核",
|
||||||
hidden.getString("CORPINFO_ID"), hidden.getString("CONFIRM_USER"), hidden.getString("HIDDEN_ID"),
|
hidden.getString("CORPINFO_ID"), hidden.getString("CONFIRM_USER"), hidden.getString("HIDDEN_ID"),
|
||||||
hidden.getString("HIDDENDESCR"), "特殊处置审核", "审核", "", "");
|
hidden.getString("HIDDENDESCR"), "特殊处置审核", "审核", "", "");
|
||||||
|
@ -633,8 +634,7 @@ public class HiddenApiController extends BaseController {
|
||||||
inspection.put("HIDDEN_vector", pd.getString("HIDDEN_ID"));
|
inspection.put("HIDDEN_vector", pd.getString("HIDDEN_ID"));
|
||||||
noticeUtil.SE_ThreeStepUtil(inspection);
|
noticeUtil.SE_ThreeStepUtil(inspection);
|
||||||
}
|
}
|
||||||
|
map.put("dockData",JSON.toJSONString(pd));
|
||||||
|
|
||||||
return ResultCodeConstant.resMap(code, map);
|
return ResultCodeConstant.resMap(code, map);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -647,6 +647,7 @@ public class HiddenApiController extends BaseController {
|
||||||
@RequestMapping(value = "/delayed")
|
@RequestMapping(value = "/delayed")
|
||||||
@RequiresPermissions("hidden:list")
|
@RequiresPermissions("hidden:list")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
|
@DockAnnotation(isAdd = true)
|
||||||
public Object delayed() throws Exception {
|
public Object delayed() throws Exception {
|
||||||
Map<String, Object> map = new HashMap<String, Object>();
|
Map<String, Object> map = new HashMap<String, Object>();
|
||||||
String errInfo = "success";
|
String errInfo = "success";
|
||||||
|
@ -685,11 +686,12 @@ public class HiddenApiController extends BaseController {
|
||||||
examine.put("DISPOSAL_FILE", Const.FILEPATHYHTP + Jurisdiction.getCORPINFO_ID() + "/" + ffile + "/" + fileName);
|
examine.put("DISPOSAL_FILE", Const.FILEPATHYHTP + Jurisdiction.getCORPINFO_ID() + "/" + ffile + "/" + fileName);
|
||||||
}
|
}
|
||||||
examine = hiddenExamineApiService.save(examine);
|
examine = hiddenExamineApiService.save(examine);
|
||||||
|
pd.put("examine",JSON.toJSONString(examine));
|
||||||
messageService.sendMessageByParameter("HIDDEN_MAIL_007", "友情提示:有一条隐患需要延期审核",
|
messageService.sendMessageByParameter("HIDDEN_MAIL_007", "友情提示:有一条隐患需要延期审核",
|
||||||
hidden.getString("CORPINFO_ID"), pd.getString("USER_ID"), hidden.getString("HIDDEN_ID"),
|
hidden.getString("CORPINFO_ID"), pd.getString("USER_ID"), hidden.getString("HIDDEN_ID"),
|
||||||
hidden.getString("HIDDENDESCR"), "延期审核", "审核", "", "");
|
hidden.getString("HIDDENDESCR"), "延期审核", "审核", "", "");
|
||||||
map.put("msg", "隐患延期申成功。请通知隐患确认人进行延期确认操作!");
|
map.put("msg", "隐患延期申成功。请通知隐患确认人进行延期确认操作!");
|
||||||
|
map.put("dockData",JSON.toJSONString(pd));
|
||||||
return ResultCodeConstant.resMap(code, map);
|
return ResultCodeConstant.resMap(code, map);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -702,6 +704,7 @@ public class HiddenApiController extends BaseController {
|
||||||
*/
|
*/
|
||||||
@RequestMapping(value = "/check")
|
@RequestMapping(value = "/check")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
|
@DockAnnotation(isAdd = true)
|
||||||
public Object check() throws Exception {
|
public Object check() throws Exception {
|
||||||
Map<String, Object> map = new HashMap<String, Object>();
|
Map<String, Object> map = new HashMap<String, Object>();
|
||||||
Integer code = 000000;
|
Integer code = 000000;
|
||||||
|
@ -728,16 +731,21 @@ public class HiddenApiController extends BaseController {
|
||||||
if (hiddenCheckList.size() == 0) {
|
if (hiddenCheckList.size() == 0) {
|
||||||
return ResultCodeConstant.resMap(000220, map);
|
return ResultCodeConstant.resMap(000220, map);
|
||||||
}
|
}
|
||||||
|
Map<String, String> hiddenCheckMap = new HashMap<>();
|
||||||
|
int count = 1;
|
||||||
for (PageData pageData : hiddenCheckList) {
|
for (PageData pageData : hiddenCheckList) {
|
||||||
if ("1".equals(pageData.getString("STATUS"))) {
|
if ("1".equals(pageData.getString("STATUS"))) {
|
||||||
checkCount++; //以前验收的++
|
checkCount++; //以前验收的++
|
||||||
}
|
}
|
||||||
if (Jurisdiction.getUSER_ID().equals(pageData.getString("USER_ID"))) {
|
if (Jurisdiction.getUSER_ID().equals(pageData.getString("USER_ID"))) {
|
||||||
check = pageData;
|
check = pageData;
|
||||||
hiddenCheckApiService.checkHidden(pd.getString("HIDDEN_ID"), pageData.getString("HIDDENCHECK_ID"), pd.getString("CHECKDESCR"), pd.getString("CHECK_TIME"), Jurisdiction.getDEPARTMENT_ID(), Jurisdiction.getUSER_ID());
|
PageData exampd = hiddenCheckApiService.checkHidden(pd.getString("HIDDEN_ID"), pageData.getString("HIDDENCHECK_ID"), pd.getString("CHECKDESCR"), pd.getString("CHECK_TIME"), Jurisdiction.getDEPARTMENT_ID(), Jurisdiction.getUSER_ID());
|
||||||
|
hiddenCheckMap.put("exampd"+count, JSON.toJSONString(exampd));
|
||||||
|
count++;
|
||||||
checkCount++; //本次的++
|
checkCount++; //本次的++
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
pd.put("hiddenCheckMap", JSON.toJSONString(hiddenCheckMap));
|
||||||
if (hiddenCheckList.size() != 0) {
|
if (hiddenCheckList.size() != 0) {
|
||||||
if (checkCount != hiddenCheckList.size()) { //还有没有验收的人
|
if (checkCount != hiddenCheckList.size()) { //还有没有验收的人
|
||||||
return ResultCodeConstant.resMap(000203, map);
|
return ResultCodeConstant.resMap(000203, map);
|
||||||
|
@ -783,13 +791,15 @@ public class HiddenApiController extends BaseController {
|
||||||
/** 验收打回 **/
|
/** 验收打回 **/
|
||||||
hiddenApiService.repulseCheck(pd.getString("HIDDEN_ID"));
|
hiddenApiService.repulseCheck(pd.getString("HIDDEN_ID"));
|
||||||
/** 记录打回 **/
|
/** 记录打回 **/
|
||||||
hiddenExamineApiService.saveRepulseCheck(pd.getString("HIDDEN_ID"), pd.getString("CONTENT"));
|
PageData exam = hiddenExamineApiService.saveRepulseCheck(pd.getString("HIDDEN_ID"), pd.getString("CONTENT"));
|
||||||
|
pd.put("exam",JSON.toJSONString(exam));
|
||||||
/** 给隐患整改人发送站内信**/
|
/** 给隐患整改人发送站内信**/
|
||||||
messageService.sendMessageByParameter("HIDDEN_MAIL_002", "友情提示:有一条隐患被打回",
|
messageService.sendMessageByParameter("HIDDEN_MAIL_002", "友情提示:有一条隐患被打回",
|
||||||
hidden.getString("CORPINFO_ID"), pd.getString("USER_ID"), hidden.getString("HIDDEN_ID"),
|
hidden.getString("CORPINFO_ID"), pd.getString("USER_ID"), hidden.getString("HIDDEN_ID"),
|
||||||
hidden.getString("HIDDENDESCR"), "整改", "重新整改", "", "");
|
hidden.getString("HIDDENDESCR"), "整改", "重新整改", "", "");
|
||||||
}
|
}
|
||||||
map.put("check", check);
|
map.put("check", check);
|
||||||
|
map.put("dockData",JSON.toJSONString(pd));
|
||||||
return ResultCodeConstant.resMap(code, map);
|
return ResultCodeConstant.resMap(code, map);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,13 +1,12 @@
|
||||||
package com.zcloud.controller.inspection;
|
package com.zcloud.controller.inspection;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSON;
|
||||||
|
import com.zcloud.aspect.DockAnnotation;
|
||||||
import com.zcloud.controller.base.BaseController;
|
import com.zcloud.controller.base.BaseController;
|
||||||
import com.zcloud.entity.Page;
|
import com.zcloud.entity.Page;
|
||||||
import com.zcloud.entity.PageData;
|
import com.zcloud.entity.PageData;
|
||||||
import com.zcloud.entity.hotWorkApplication.Color;
|
|
||||||
import com.zcloud.entity.hotWorkApplication.Node;
|
import com.zcloud.entity.hotWorkApplication.Node;
|
||||||
import com.zcloud.entity.hotWorkApplication.Overseer;
|
import com.zcloud.entity.hotWorkApplication.Overseer;
|
||||||
import com.zcloud.entity.system.Department;
|
|
||||||
import com.zcloud.entity.system.User;
|
|
||||||
import com.zcloud.service.bus.HiddenCheckService;
|
import com.zcloud.service.bus.HiddenCheckService;
|
||||||
import com.zcloud.service.bus.HiddenService;
|
import com.zcloud.service.bus.HiddenService;
|
||||||
import com.zcloud.service.bus.NoticeCorpService;
|
import com.zcloud.service.bus.NoticeCorpService;
|
||||||
|
@ -21,8 +20,6 @@ import com.zcloud.service.system.UsersService;
|
||||||
import com.zcloud.util.*;
|
import com.zcloud.util.*;
|
||||||
import org.apache.commons.lang.StringUtils;
|
import org.apache.commons.lang.StringUtils;
|
||||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||||
import org.apache.shiro.session.Session;
|
|
||||||
import org.apache.xmlgraphics.xmp.schemas.pdf.PDFAAdapter;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Controller;
|
import org.springframework.stereotype.Controller;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
@ -33,7 +30,6 @@ import org.springframework.web.servlet.ModelAndView;
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.stream.Collectors;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 说明:安全环保检查
|
* 说明:安全环保检查
|
||||||
|
@ -276,6 +272,7 @@ public class SafetyEnvironmentalController extends BaseController {
|
||||||
@RequestMapping(value = "/add")
|
@RequestMapping(value = "/add")
|
||||||
@RequiresPermissions("safetyenvironmental:add")
|
@RequiresPermissions("safetyenvironmental:add")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
|
@DockAnnotation(isAdd = true)
|
||||||
public Object add() throws Exception {
|
public Object add() throws Exception {
|
||||||
Map<String, Object> map = new HashMap<String, Object>();
|
Map<String, Object> map = new HashMap<String, Object>();
|
||||||
String errInfo = "success";
|
String errInfo = "success";
|
||||||
|
@ -307,6 +304,7 @@ public class SafetyEnvironmentalController extends BaseController {
|
||||||
List<PageData> hiddenList = safetyenvironmentalService.save(pd);
|
List<PageData> hiddenList = safetyenvironmentalService.save(pd);
|
||||||
pd.put("hiddenList", hiddenList);
|
pd.put("hiddenList", hiddenList);
|
||||||
map.put("pd", pd);
|
map.put("pd", pd);
|
||||||
|
map.put("dockData", JSON.toJSONString(pd));
|
||||||
map.put("result", errInfo);
|
map.put("result", errInfo);
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
@ -460,6 +458,7 @@ public class SafetyEnvironmentalController extends BaseController {
|
||||||
@RequestMapping(value = "/hide")
|
@RequestMapping(value = "/hide")
|
||||||
@RequiresPermissions("safetyenvironmental:del")
|
@RequiresPermissions("safetyenvironmental:del")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
|
@DockAnnotation
|
||||||
public Object hide() throws Exception {
|
public Object hide() throws Exception {
|
||||||
Map<String, String> map = new HashMap<String, String>();
|
Map<String, String> map = new HashMap<String, String>();
|
||||||
String errInfo = "success";
|
String errInfo = "success";
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
package com.zcloud.controller.inspection;
|
package com.zcloud.controller.inspection;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSON;
|
||||||
|
import com.zcloud.aspect.DockAnnotation;
|
||||||
import com.zcloud.controller.base.BaseController;
|
import com.zcloud.controller.base.BaseController;
|
||||||
import com.zcloud.entity.Page;
|
import com.zcloud.entity.Page;
|
||||||
import com.zcloud.entity.PageData;
|
import com.zcloud.entity.PageData;
|
||||||
|
@ -98,6 +100,7 @@ public class SafetyEnvironmentalExplainController extends BaseController {
|
||||||
@RequestMapping(value="/add")
|
@RequestMapping(value="/add")
|
||||||
@RequiresPermissions("safetyenvironmentalexplain:add")
|
@RequiresPermissions("safetyenvironmentalexplain:add")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
|
@DockAnnotation(isAdd = true)
|
||||||
public Object add(@RequestParam(value="file",required=false) MultipartFile file) throws Exception{
|
public Object add(@RequestParam(value="file",required=false) MultipartFile file) throws Exception{
|
||||||
Map<String,Object> map = new HashMap<String,Object>();
|
Map<String,Object> map = new HashMap<String,Object>();
|
||||||
String errInfo = "success";
|
String errInfo = "success";
|
||||||
|
@ -143,11 +146,13 @@ public class SafetyEnvironmentalExplainController extends BaseController {
|
||||||
pd.put("INSPECTED_EXPLAIN_FILENAME", file.getOriginalFilename());
|
pd.put("INSPECTED_EXPLAIN_FILENAME", file.getOriginalFilename());
|
||||||
pd.put("INSPECTED_EXPLAIN_FILEPATH", Const.FILEPATHFILE + Jurisdiction.getCORPINFO_ID() + "/" + ffile + "/" + fileName);
|
pd.put("INSPECTED_EXPLAIN_FILEPATH", Const.FILEPATHFILE + Jurisdiction.getCORPINFO_ID() + "/" + ffile + "/" + fileName);
|
||||||
}
|
}
|
||||||
safetyenvironmentalexplainService.save(pd);
|
PageData logData = safetyenvironmentalexplainService.save(pd);
|
||||||
|
pd.put("logData",JSON.toJSONString(logData));
|
||||||
|
|
||||||
noticeCorpUtil.SE_PleadingStepUtil(pd);
|
noticeCorpUtil.SE_PleadingStepUtil(pd);
|
||||||
map.put("pd", pd);
|
map.put("pd", pd);
|
||||||
map.put("result", errInfo);
|
map.put("result", errInfo);
|
||||||
|
map.put("dockData", JSON.toJSONString(pd));
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
package com.zcloud.controller.inspection;
|
package com.zcloud.controller.inspection;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSON;
|
||||||
|
import com.zcloud.aspect.DockAnnotation;
|
||||||
import com.zcloud.controller.base.BaseController;
|
import com.zcloud.controller.base.BaseController;
|
||||||
import com.zcloud.entity.Page;
|
import com.zcloud.entity.Page;
|
||||||
import com.zcloud.entity.PageData;
|
import com.zcloud.entity.PageData;
|
||||||
|
@ -82,6 +84,7 @@ public class SafetyEnvironmentalInspectorController extends BaseController {
|
||||||
@RequestMapping(value="/verify")
|
@RequestMapping(value="/verify")
|
||||||
@RequiresPermissions("safetyenvironmentalinspector:add")
|
@RequiresPermissions("safetyenvironmentalinspector:add")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
|
@DockAnnotation(isAdd = true)
|
||||||
public Object verify() throws Exception{
|
public Object verify() throws Exception{
|
||||||
Map<String,Object> map = new HashMap<String,Object>();
|
Map<String,Object> map = new HashMap<String,Object>();
|
||||||
String errInfo = "success";
|
String errInfo = "success";
|
||||||
|
@ -110,9 +113,12 @@ public class SafetyEnvironmentalInspectorController extends BaseController {
|
||||||
|
|
||||||
uBean.put("INSPECTION_USER_SIGN_IMG", Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile + "/" + fileName);
|
uBean.put("INSPECTION_USER_SIGN_IMG", Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile + "/" + fileName);
|
||||||
}
|
}
|
||||||
safetyenvironmentalinspectorService.verify(uBean);
|
pd.put("uBean",JSON.toJSONString(uBean));
|
||||||
|
PageData verify = safetyenvironmentalinspectorService.verify(uBean);
|
||||||
|
pd.put("verify",JSON.toJSONString(verify));
|
||||||
map.put("pd", pd);
|
map.put("pd", pd);
|
||||||
map.put("result", errInfo);
|
map.put("result", errInfo);
|
||||||
|
map.put("dockData", JSON.toJSONString(pd));
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -78,6 +78,7 @@ public interface HiddenCheckApiService {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据隐患id 和用户id验收隐患
|
* 根据隐患id 和用户id验收隐患
|
||||||
|
*
|
||||||
* @param HIDDEN_ID
|
* @param HIDDEN_ID
|
||||||
* @param HIDDENCHECK_ID 验收id
|
* @param HIDDENCHECK_ID 验收id
|
||||||
* @param CHECKDESCR 验收描述
|
* @param CHECKDESCR 验收描述
|
||||||
|
@ -87,8 +88,8 @@ public interface HiddenCheckApiService {
|
||||||
* @return
|
* @return
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public int checkHidden(String HIDDEN_ID,String HIDDENCHECK_ID,String CHECKDESCR,
|
public PageData checkHidden(String HIDDEN_ID, String HIDDENCHECK_ID, String CHECKDESCR,
|
||||||
String CHECK_TIME,String DEPARTMENT_ID, String USER_ID)throws Exception;
|
String CHECK_TIME, String DEPARTMENT_ID, String USER_ID)throws Exception;
|
||||||
|
|
||||||
/**根据隐患信息删除隐患验收人。
|
/**根据隐患信息删除隐患验收人。
|
||||||
* @param hiddenId
|
* @param hiddenId
|
||||||
|
|
|
@ -119,11 +119,12 @@ public interface HiddenExamineApiService {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 隐患打回
|
* 隐患打回
|
||||||
|
*
|
||||||
* @param hiddenId
|
* @param hiddenId
|
||||||
* @param EXAMINE
|
* @param EXAMINE
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public int saveRepulseCheck(String hiddenId ,String EXAMINE)throws Exception;
|
public PageData saveRepulseCheck(String hiddenId , String EXAMINE)throws Exception;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 当隐患整改的时候,隐患流程进行修改
|
* 当隐患整改的时候,隐患流程进行修改
|
||||||
|
|
|
@ -169,7 +169,7 @@ public class HiddenCheckApiServiceImpl implements HiddenCheckApiService {
|
||||||
* @param pd
|
* @param pd
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public int checkHidden(String HIDDEN_ID, String HIDDENCHECK_ID,String CHECKDESCR, String CHECK_TIME,
|
public PageData checkHidden(String HIDDEN_ID, String HIDDENCHECK_ID, String CHECKDESCR, String CHECK_TIME,
|
||||||
String DEPARTMENT_ID, String USER_ID) throws Exception {
|
String DEPARTMENT_ID, String USER_ID) throws Exception {
|
||||||
PageData pd = new PageData();
|
PageData pd = new PageData();
|
||||||
pd.put("HIDDENCHECK_ID",HIDDENCHECK_ID);
|
pd.put("HIDDENCHECK_ID",HIDDENCHECK_ID);
|
||||||
|
@ -192,7 +192,9 @@ public class HiddenCheckApiServiceImpl implements HiddenCheckApiService {
|
||||||
examPd.put("spare2",CHECK_TIME);
|
examPd.put("spare2",CHECK_TIME);
|
||||||
examPd.put("TYPE","8");
|
examPd.put("TYPE","8");
|
||||||
hiddenExamineApiMapper.save(examPd);
|
hiddenExamineApiMapper.save(examPd);
|
||||||
return hiddenCheckApiMapper.checkHidden(pd);
|
int result = hiddenCheckApiMapper.checkHidden(pd);
|
||||||
|
examPd.put("result",result);
|
||||||
|
return examPd;
|
||||||
}
|
}
|
||||||
/**根据隐患信息删除隐患验收人。
|
/**根据隐患信息删除隐患验收人。
|
||||||
* @param hiddenId
|
* @param hiddenId
|
||||||
|
|
|
@ -195,11 +195,12 @@ public class HiddenExamineApiServiceImpl implements HiddenExamineApiService {
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* 隐患打回
|
* 隐患打回
|
||||||
|
*
|
||||||
* @param hiddenId
|
* @param hiddenId
|
||||||
* @param EXAMINE
|
* @param EXAMINE
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public int saveRepulseCheck(String hiddenId ,String EXAMINE)throws Exception{
|
public PageData saveRepulseCheck(String hiddenId , String EXAMINE)throws Exception{
|
||||||
PageData exam = new PageData();// 添加隐患初始信息
|
PageData exam = new PageData();// 添加隐患初始信息
|
||||||
exam.put("HIDDENEXAMINE_ID",UuidUtil.get32UUID());
|
exam.put("HIDDENEXAMINE_ID",UuidUtil.get32UUID());
|
||||||
exam.put("CREATOR",Jurisdiction.getUSER_ID());
|
exam.put("CREATOR",Jurisdiction.getUSER_ID());
|
||||||
|
@ -210,7 +211,9 @@ public class HiddenExamineApiServiceImpl implements HiddenExamineApiService {
|
||||||
exam.put("STATE",-1);//验收打回变成初始状态-1
|
exam.put("STATE",-1);//验收打回变成初始状态-1
|
||||||
exam.put("EXAMINE",EXAMINE);//打回意见
|
exam.put("EXAMINE",EXAMINE);//打回意见
|
||||||
exam.put("HIDDEN_ID",hiddenId);//隐患ID
|
exam.put("HIDDEN_ID",hiddenId);//隐患ID
|
||||||
return hiddenExamineApiMapper.save(exam);
|
int saveInt = hiddenExamineApiMapper.save(exam);
|
||||||
|
exam.put("saveInt",saveInt);
|
||||||
|
return exam;
|
||||||
}
|
}
|
||||||
|
|
||||||
public PageData saveRectify(String hiddenId )throws Exception{
|
public PageData saveRectify(String hiddenId )throws Exception{
|
||||||
|
|
|
@ -13,11 +13,14 @@ import java.util.List;
|
||||||
*/
|
*/
|
||||||
public interface SafetyEnvironmentalExplainService{
|
public interface SafetyEnvironmentalExplainService{
|
||||||
|
|
||||||
/**新增
|
/**
|
||||||
|
* 新增
|
||||||
|
*
|
||||||
* @param pd
|
* @param pd
|
||||||
|
* @return
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public void save(PageData pd)throws Exception;
|
public PageData save(PageData pd)throws Exception;
|
||||||
|
|
||||||
/**删除
|
/**删除
|
||||||
* @param pd
|
* @param pd
|
||||||
|
|
|
@ -69,9 +69,11 @@ public interface SafetyEnvironmentalInspectorService{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 检查人核实
|
* 检查人核实
|
||||||
|
*
|
||||||
* @param pd
|
* @param pd
|
||||||
|
* @return
|
||||||
*/
|
*/
|
||||||
void verify(PageData pd)throws Exception;
|
PageData verify(PageData pd)throws Exception;
|
||||||
|
|
||||||
/**删除(根据检查ID)
|
/**删除(根据检查ID)
|
||||||
* @param pd
|
* @param pd
|
||||||
|
|
|
@ -7,7 +7,6 @@ import com.zcloud.service.bus.HiddenService;
|
||||||
import com.zcloud.service.inspection.SafetyEnvironmentalExplainService;
|
import com.zcloud.service.inspection.SafetyEnvironmentalExplainService;
|
||||||
import com.zcloud.service.inspection.SafetyEnvironmentalLogService;
|
import com.zcloud.service.inspection.SafetyEnvironmentalLogService;
|
||||||
import com.zcloud.service.inspection.SafetyEnvironmentalService;
|
import com.zcloud.service.inspection.SafetyEnvironmentalService;
|
||||||
import com.zcloud.util.Jurisdiction;
|
|
||||||
import com.zcloud.util.Tools;
|
import com.zcloud.util.Tools;
|
||||||
import com.zcloud.util.UuidUtil;
|
import com.zcloud.util.UuidUtil;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
@ -37,12 +36,15 @@ public class SafetyEnvironmentalExplainServiceImpl implements SafetyEnvironmenta
|
||||||
@Autowired
|
@Autowired
|
||||||
private SafetyEnvironmentalLogService safetyenvironmentallogService;
|
private SafetyEnvironmentalLogService safetyenvironmentallogService;
|
||||||
|
|
||||||
/**新增
|
/**
|
||||||
|
* 新增
|
||||||
|
*
|
||||||
* @param pd
|
* @param pd
|
||||||
|
* @return
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
@Transactional
|
@Transactional
|
||||||
public void save(PageData pd)throws Exception{
|
public PageData save(PageData pd)throws Exception{
|
||||||
PageData inspection = safetyEnvironmentalService.findById(pd);
|
PageData inspection = safetyEnvironmentalService.findById(pd);
|
||||||
inspection.put("INSPECTED_EXPLAIN", pd.getString("INSPECTED_EXPLAIN"));
|
inspection.put("INSPECTED_EXPLAIN", pd.getString("INSPECTED_EXPLAIN"));
|
||||||
if (Tools.notEmpty(pd.getString("INSPECTED_EXPLAIN_FILENAME"))) {
|
if (Tools.notEmpty(pd.getString("INSPECTED_EXPLAIN_FILENAME"))) {
|
||||||
|
@ -81,6 +83,7 @@ public class SafetyEnvironmentalExplainServiceImpl implements SafetyEnvironmenta
|
||||||
safetyenvironmentallogService.save(log);
|
safetyenvironmentallogService.save(log);
|
||||||
|
|
||||||
safetyenvironmentalexplainMapper.save(pd);
|
safetyenvironmentalexplainMapper.save(pd);
|
||||||
|
return log;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**删除
|
/**删除
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
package com.zcloud.service.inspection.impl;
|
package com.zcloud.service.inspection.impl;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSON;
|
||||||
import com.zcloud.entity.Page;
|
import com.zcloud.entity.Page;
|
||||||
import com.zcloud.entity.PageData;
|
import com.zcloud.entity.PageData;
|
||||||
import com.zcloud.mapper.datasource.inspection.SafetyEnvironmentalInspectorMapper;
|
import com.zcloud.mapper.datasource.inspection.SafetyEnvironmentalInspectorMapper;
|
||||||
|
@ -35,7 +36,8 @@ public class SafetyEnvironmentalInspectorServiceImpl implements SafetyEnvironmen
|
||||||
private NoticeCorpUtil util;
|
private NoticeCorpUtil util;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void verify(PageData pd) throws Exception {
|
public PageData verify(PageData pd) throws Exception {
|
||||||
|
PageData pageData = new PageData();
|
||||||
if ("1".equals(pd.getString("INSPECTION_STATUS"))) { //检查进度状态 1.部分检查人员已核实
|
if ("1".equals(pd.getString("INSPECTION_STATUS"))) { //检查进度状态 1.部分检查人员已核实
|
||||||
List<PageData> list = safetyenvironmentalinspectorMapper.listOtherNotVerify(pd);
|
List<PageData> list = safetyenvironmentalinspectorMapper.listOtherNotVerify(pd);
|
||||||
if (list.size() == 0) {
|
if (list.size() == 0) {
|
||||||
|
@ -56,8 +58,10 @@ public class SafetyEnvironmentalInspectorServiceImpl implements SafetyEnvironmen
|
||||||
log.put("ACTION", "安全环保检查申请"); //操作内容
|
log.put("ACTION", "安全环保检查申请"); //操作内容
|
||||||
log.put("CREATTIME", pd.getString("OPERATTIME")); //添加时间
|
log.put("CREATTIME", pd.getString("OPERATTIME")); //添加时间
|
||||||
log.put("CREATOR", pd.getString("ACTION_USER")); //添加人姓名
|
log.put("CREATOR", pd.getString("ACTION_USER")); //添加人姓名
|
||||||
|
pageData.put("log", JSON.toJSONString(log));
|
||||||
safetyenvironmentallogService.save(log);
|
safetyenvironmentallogService.save(log);
|
||||||
safetyenvironmentalinspectorMapper.edit(pd);
|
safetyenvironmentalinspectorMapper.edit(pd);
|
||||||
|
return pageData;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -19,6 +19,7 @@ import org.springframework.transaction.annotation.Transactional;
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
@ -70,6 +71,8 @@ public class SafetyEnvironmentalServiceImpl implements SafetyEnvironmentalServic
|
||||||
if (Tools.notEmpty(pd.getString("SITUATIONJSON"))) {
|
if (Tools.notEmpty(pd.getString("SITUATIONJSON"))) {
|
||||||
List<JSONObject> list = (List<JSONObject>) JSON.parse(pd.getString("SITUATIONJSON"));
|
List<JSONObject> list = (List<JSONObject>) JSON.parse(pd.getString("SITUATIONJSON"));
|
||||||
String time = currentTime;
|
String time = currentTime;
|
||||||
|
HashMap<String, String> situationMap = new HashMap<>();
|
||||||
|
int count = 1;
|
||||||
for (JSONObject json : list) {
|
for (JSONObject json : list) {
|
||||||
PageData situationPd = new PageData();
|
PageData situationPd = new PageData();
|
||||||
situationPd.put("INSPECTION_SITUATION_ID", UuidUtil.get32UUID()); //主键
|
situationPd.put("INSPECTION_SITUATION_ID", UuidUtil.get32UUID()); //主键
|
||||||
|
@ -81,13 +84,18 @@ public class SafetyEnvironmentalServiceImpl implements SafetyEnvironmentalServic
|
||||||
situationPd.put("OPERATOR", pd.getString("OPERATOR")); //修改人
|
situationPd.put("OPERATOR", pd.getString("OPERATOR")); //修改人
|
||||||
situationPd.put("OPERATTIME", time); //修改时间
|
situationPd.put("OPERATTIME", time); //修改时间
|
||||||
situationPd.put("CORPINFO_ID", pd.getString("CORPINFO_ID")); //企业ID
|
situationPd.put("CORPINFO_ID", pd.getString("CORPINFO_ID")); //企业ID
|
||||||
|
situationMap.put("situationPd"+count,JSON.toJSONString(situationPd));
|
||||||
|
count++;
|
||||||
safetyenvironmentalsituationService.save(situationPd);
|
safetyenvironmentalsituationService.save(situationPd);
|
||||||
time = DateUtil.calculateDateSecond(time, 1);
|
time = DateUtil.calculateDateSecond(time, 1);
|
||||||
}
|
}
|
||||||
|
pd.put("situationMap",situationMap);
|
||||||
}
|
}
|
||||||
if (Tools.notEmpty(pd.getString("INSPECTORJSON"))) {
|
if (Tools.notEmpty(pd.getString("INSPECTORJSON"))) {
|
||||||
List<JSONObject> list = (List<JSONObject>) JSON.parse(pd.getString("INSPECTORJSON"));
|
List<JSONObject> list = (List<JSONObject>) JSON.parse(pd.getString("INSPECTORJSON"));
|
||||||
String time = currentTime;
|
String time = currentTime;
|
||||||
|
HashMap<String, String> inspectorMap = new HashMap<>();
|
||||||
|
int count = 1;
|
||||||
for (int i = 0; i < list.size(); i++) {
|
for (int i = 0; i < list.size(); i++) {
|
||||||
JSONObject json = list.get(i);
|
JSONObject json = list.get(i);
|
||||||
if (i == 0) {
|
if (i == 0) {
|
||||||
|
@ -103,6 +111,8 @@ public class SafetyEnvironmentalServiceImpl implements SafetyEnvironmentalServic
|
||||||
inspector.put("OPERATOR", pd.getString("OPERATOR")); //修改人
|
inspector.put("OPERATOR", pd.getString("OPERATOR")); //修改人
|
||||||
inspector.put("OPERATTIME", time); //修改时间
|
inspector.put("OPERATTIME", time); //修改时间
|
||||||
inspector.put("CORPINFO_ID", pd.getString("CORPINFO_ID")); //企业ID
|
inspector.put("CORPINFO_ID", pd.getString("CORPINFO_ID")); //企业ID
|
||||||
|
inspectorMap.put("inspector"+count,JSON.toJSONString(inspector));
|
||||||
|
count++;
|
||||||
boolean note_flag = true;
|
boolean note_flag = true;
|
||||||
if(StringUtils.isNotBlank(pd.getString("OPERATOR"))){
|
if(StringUtils.isNotBlank(pd.getString("OPERATOR"))){
|
||||||
if (pd.getString("OPERATOR").equals(json.get("INSPECTION_USER_ID"))){
|
if (pd.getString("OPERATOR").equals(json.get("INSPECTION_USER_ID"))){
|
||||||
|
@ -122,10 +132,13 @@ public class SafetyEnvironmentalServiceImpl implements SafetyEnvironmentalServic
|
||||||
if (note_flag) noticeCorpUtil.SE_OneStepUtil(inspector);
|
if (note_flag) noticeCorpUtil.SE_OneStepUtil(inspector);
|
||||||
time = DateUtil.calculateDateSecond(time, 1);
|
time = DateUtil.calculateDateSecond(time, 1);
|
||||||
}
|
}
|
||||||
|
pd.put("inspectorMap",JSON.toJSONString(inspectorMap));
|
||||||
}
|
}
|
||||||
if (Tools.notEmpty(pd.getString("HIDDENJSON"))) {
|
if (Tools.notEmpty(pd.getString("HIDDENJSON"))) {
|
||||||
List<JSONObject> list = (List<JSONObject>) JSON.parse(pd.getString("HIDDENJSON"));
|
List<JSONObject> list = (List<JSONObject>) JSON.parse(pd.getString("HIDDENJSON"));
|
||||||
String time = currentTime;
|
String time = currentTime;
|
||||||
|
HashMap<String, String> hiddenMap = new HashMap<>();
|
||||||
|
int count = 1;
|
||||||
for (JSONObject json : list) {
|
for (JSONObject json : list) {
|
||||||
PageData hidden = new PageData();
|
PageData hidden = new PageData();
|
||||||
hidden.put("HIDDEN_ID", UuidUtil.get32UUID()); //主键
|
hidden.put("HIDDEN_ID", UuidUtil.get32UUID()); //主键
|
||||||
|
@ -147,7 +160,7 @@ public class SafetyEnvironmentalServiceImpl implements SafetyEnvironmentalServic
|
||||||
hidden.put("CORPINFO_ID", pd.getString("CORPINFO_ID"));
|
hidden.put("CORPINFO_ID", pd.getString("CORPINFO_ID"));
|
||||||
hidden.put("ISDELETE", "0"); //是否删除(0:有效 1:删除)
|
hidden.put("ISDELETE", "0"); //是否删除(0:有效 1:删除)
|
||||||
hidden.put("POSITIONDESC",json.getString("POSITIONDESC"));
|
hidden.put("POSITIONDESC",json.getString("POSITIONDESC"));
|
||||||
|
hiddenMap.put("hidden"+count,JSON.toJSONString(hidden));
|
||||||
PageData before = new PageData();// 添加隐患初始信息
|
PageData before = new PageData();// 添加隐患初始信息
|
||||||
before.put("TYPE","0");
|
before.put("TYPE","0");
|
||||||
before.put("STATE","2");
|
before.put("STATE","2");
|
||||||
|
@ -164,10 +177,13 @@ public class SafetyEnvironmentalServiceImpl implements SafetyEnvironmentalServic
|
||||||
findUser.put("USER_ID",json.getString("CREATOR"));
|
findUser.put("USER_ID",json.getString("CREATOR"));
|
||||||
findUser.put("TYPE","1");
|
findUser.put("TYPE","1");
|
||||||
findUser.put("IS_MAIN","0");
|
findUser.put("IS_MAIN","0");
|
||||||
|
hiddenMap.put("findUser"+count,JSON.toJSONString(findUser));
|
||||||
|
count++;
|
||||||
hiddenUserService.save(findUser);
|
hiddenUserService.save(findUser);
|
||||||
hiddenList.add(hidden);
|
hiddenList.add(hidden);
|
||||||
time = DateUtil.calculateDateSecond(time, 1);
|
time = DateUtil.calculateDateSecond(time, 1);
|
||||||
}
|
}
|
||||||
|
pd.put("hiddenMap",JSON.toJSONString(hiddenMap));
|
||||||
}
|
}
|
||||||
|
|
||||||
PageData log = new PageData();
|
PageData log = new PageData();
|
||||||
|
@ -176,8 +192,8 @@ public class SafetyEnvironmentalServiceImpl implements SafetyEnvironmentalServic
|
||||||
log.put("ACTION", "安全环保检查申请"); //操作内容
|
log.put("ACTION", "安全环保检查申请"); //操作内容
|
||||||
log.put("CREATTIME", pd.getString("CREATTIME")); //添加时间
|
log.put("CREATTIME", pd.getString("CREATTIME")); //添加时间
|
||||||
log.put("CREATOR", pd.getString("ACTION_USER")); //添加人姓名
|
log.put("CREATOR", pd.getString("ACTION_USER")); //添加人姓名
|
||||||
|
pd.put("log",JSON.toJSONString(log));
|
||||||
safetyenvironmentallogService.save(log);
|
safetyenvironmentallogService.save(log);
|
||||||
|
|
||||||
safetyenvironmentalMapper.save(pd);
|
safetyenvironmentalMapper.save(pd);
|
||||||
return hiddenList;
|
return hiddenList;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue