diff --git a/src/main/java/com/zcloud/controller/app/inspection/AppSafetyEnvironmentalController.java b/src/main/java/com/zcloud/controller/app/inspection/AppSafetyEnvironmentalController.java index 5ad5002c..f894a502 100644 --- a/src/main/java/com/zcloud/controller/app/inspection/AppSafetyEnvironmentalController.java +++ b/src/main/java/com/zcloud/controller/app/inspection/AppSafetyEnvironmentalController.java @@ -1,5 +1,7 @@ package com.zcloud.controller.app.inspection; +import com.alibaba.fastjson.JSON; +import com.zcloud.aspect.DockAnnotation; import com.zcloud.controller.base.BaseController; import com.zcloud.entity.Page; import com.zcloud.entity.PageData; @@ -85,6 +87,7 @@ public class AppSafetyEnvironmentalController extends BaseController { */ @RequestMapping(value="/add") @ResponseBody + @DockAnnotation(hasAnnex = true) public Object add(@RequestParam(value="FFILE",required=false) MultipartFile file) throws Exception{ Map map = new HashMap(); String errInfo = "success"; @@ -100,6 +103,7 @@ public class AppSafetyEnvironmentalController extends BaseController { pd.put("CORPINFO_ID", pd.getString("CORPINFO_ID")); //企业ID pd.put("ACTION_USER", pd.getString("ACTION_USER")); //操作人 String ffile = DateUtil.getDays(); + ArrayList strings = new ArrayList<>(); if (file != null && StringUtils.isNotBlank(pd.getString("INSPECTION_USER_OPINION"))){ String suffixName = file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".")+1).toLowerCase(); if (!"pdf".equals(suffixName) && !"jpg".equals(suffixName) && !"jpeg".equals(suffixName) && !"png".equals(suffixName) && !"mp4".equals(suffixName)) { @@ -113,11 +117,17 @@ public class AppSafetyEnvironmentalController extends BaseController { pd.put("CONFIRM_MESSAGE_SIGN_ROUTE", Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile + "/" + fileName); pd.put("CONFIRM_MESSAGE",pd.getString("INSPECTION_USER_OPINION")); pd.put("CONFIRM_MESSAGE_TIME",DateUtil.date2Str(new Date())); + strings.add(pd.getString("CONFIRM_MESSAGE_SIGN_ROUTE")+"@@"+fileName); } List hiddenList = safetyenvironmentalService.save(pd); + if (pd.get("CORPINFO_ID")!=null){ + pd.put("operatingCorpId", pd.get("CORPINFO_ID")); + } pd.put("hiddenList", hiddenList); + map.put("sendPicturesList",JSON.toJSONString(strings)); map.put("pd", pd); map.put("result", errInfo); + map.put("dockData", JSON.toJSONString(pd)); return map; } @@ -163,6 +173,7 @@ public class AppSafetyEnvironmentalController extends BaseController { */ @RequestMapping(value="/edit") @ResponseBody + @DockAnnotation(hasAnnex = true) public Object edit(@RequestParam(value="FFILE",required=false) MultipartFile file) throws Exception{ Map map = new HashMap(); String errInfo = "success"; @@ -173,6 +184,7 @@ public class AppSafetyEnvironmentalController extends BaseController { pd.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间 pd.put("ACTION_USER", pd.getString("ACTION_USER")); //操作人 String ffile = DateUtil.getDays(); + ArrayList strings = new ArrayList<>(); if (file != null && StringUtils.isNotBlank(pd.getString("INSPECTION_USER_OPINION"))){ String suffixName = file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".")+1).toLowerCase(); if (!"pdf".equals(suffixName) && !"jpg".equals(suffixName) && !"jpeg".equals(suffixName) && !"png".equals(suffixName) && !"mp4".equals(suffixName)) { @@ -186,11 +198,17 @@ public class AppSafetyEnvironmentalController extends BaseController { pd.put("CONFIRM_MESSAGE_SIGN_ROUTE", Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile + "/" + fileName); pd.put("CONFIRM_MESSAGE",pd.getString("INSPECTION_USER_OPINION")); pd.put("CONFIRM_MESSAGE_TIME",DateUtil.date2Str(new Date())); + strings.add(pd.getString("CONFIRM_MESSAGE_SIGN_ROUTE")+"@@"+fileName); } List hiddenList = safetyenvironmentalService.edit(pd); + if (pd.get("CORPINFO_ID")!=null){ + pd.put("operatingCorpId", pd.get("CORPINFO_ID")); + } + map.put("sendPicturesList",JSON.toJSONString(strings)); pd.put("hiddenList", hiddenList); map.put("pd", pd); map.put("result", errInfo); + map.put("dockData", JSON.toJSONString(pd)); return map; } @@ -201,11 +219,13 @@ public class AppSafetyEnvironmentalController extends BaseController { @RequestMapping(value="/explain") //@RequiresPermissions("safetyenvironmental:edit") @ResponseBody + @DockAnnotation(hasAnnex = true) public Object explain(@RequestParam(value="FFILE",required=false) MultipartFile[] files) throws Exception{ Map map = new HashMap(); String errInfo = "success"; PageData pd = new PageData(); pd = this.getPageData(); + ArrayList strings = new ArrayList<>(); if (files != null && files.length > 0) { MultipartFile file = files[0]; String suffixName = file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".")+1).toLowerCase(); @@ -221,12 +241,21 @@ public class AppSafetyEnvironmentalController extends BaseController { Smb.sshSftp(file, fileName, Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile); pd.put("INSPECTION_ORIGINATOR_SIGN_IMG", Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile + "/" + fileName); + strings.add(pd.getString("INSPECTION_ORIGINATOR_SIGN_IMG")+"@@"+fileName); } - safetyenvironmentalService.explain(pd); + if (pd.get("CORPINFO_ID")!=null){ + pd.put("operatingCorpId", pd.get("CORPINFO_ID")); + } + PageData log = safetyenvironmentalService.explain(pd); + pd.put("inspector",pd.getString("OPERATOR")); noticeCorpUtil.FailPleadind(pd); + pd.put("operatingCorpId",log.getString("CORPINFO_ID")); map.put("pd", pd); map.put("result", errInfo); + pd.put("log",JSON.toJSONString(log)); + map.put("dockData",JSON.toJSONString(pd)); + map.put("sendPicturesList",JSON.toJSONString(strings)); return map; } diff --git a/src/main/java/com/zcloud/controller/app/inspection/AppSafetyEnvironmentalExplainController.java b/src/main/java/com/zcloud/controller/app/inspection/AppSafetyEnvironmentalExplainController.java index 6a5d43c3..4203350f 100644 --- a/src/main/java/com/zcloud/controller/app/inspection/AppSafetyEnvironmentalExplainController.java +++ b/src/main/java/com/zcloud/controller/app/inspection/AppSafetyEnvironmentalExplainController.java @@ -1,5 +1,7 @@ package com.zcloud.controller.app.inspection; +import com.alibaba.fastjson.JSON; +import com.zcloud.aspect.DockAnnotation; import com.zcloud.controller.base.BaseController; import com.zcloud.entity.Page; import com.zcloud.entity.PageData; @@ -78,6 +80,7 @@ public class AppSafetyEnvironmentalExplainController extends BaseController { */ @RequestMapping(value = "/add") @ResponseBody + @DockAnnotation(hasAnnex = true) public Object add(@RequestParam(value = "FFILE", required = false) MultipartFile file) throws Exception { Map map = new HashMap(); String errInfo = "success"; @@ -91,6 +94,7 @@ public class AppSafetyEnvironmentalExplainController extends BaseController { pd.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间 pd.put("VALID","1"); pd.put("ISPASS","0"); + ArrayList strings = new ArrayList<>(); if (null != file && !file.isEmpty()) { String suffixName = file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".")+1).toLowerCase(); if (!"pdf".equals(suffixName) && !"jpg".equals(suffixName) && !"jpeg".equals(suffixName) && !"png".equals(suffixName) && !"mp4".equals(suffixName)) { @@ -103,11 +107,16 @@ public class AppSafetyEnvironmentalExplainController extends BaseController { String fileName = this.get32UUID() + file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".")); Smb.sshSftp(file, fileName, Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile); pd.put("INSPECTED_SITEUSER_SIGN_IMG", Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile + "/" + fileName); + strings.add(pd.getString("INSPECTED_SITEUSER_SIGN_IMG")+"@@"+fileName); } - safetyenvironmentalexplainService.save(pd); + PageData log = safetyenvironmentalexplainService.save(pd); + pd.put("operatingCorpId",log.getString("CORPINFO_ID")); noticeCorpUtil.SE_PleadingStepUtil(pd); map.put("pd", pd); map.put("result", errInfo); + pd.put("log", JSON.toJSONString(log)); + map.put("dockData",JSON.toJSONString(pd)); + map.put("sendPicturesList",JSON.toJSONString(strings)); return map; } diff --git a/src/main/java/com/zcloud/controller/app/inspection/AppSafetyEnvironmentalInspectorController.java b/src/main/java/com/zcloud/controller/app/inspection/AppSafetyEnvironmentalInspectorController.java index 353a78e5..db192357 100644 --- a/src/main/java/com/zcloud/controller/app/inspection/AppSafetyEnvironmentalInspectorController.java +++ b/src/main/java/com/zcloud/controller/app/inspection/AppSafetyEnvironmentalInspectorController.java @@ -1,5 +1,7 @@ package com.zcloud.controller.app.inspection; +import com.alibaba.fastjson.JSON; +import com.zcloud.aspect.DockAnnotation; import com.zcloud.controller.base.BaseController; import com.zcloud.entity.Page; import com.zcloud.entity.PageData; @@ -63,6 +65,7 @@ public class AppSafetyEnvironmentalInspectorController extends BaseController { */ @RequestMapping(value = "/verify") @ResponseBody + @DockAnnotation(hasAnnex = true) public Object verify(@RequestParam(value = "FFILE", required = false) MultipartFile[] files) throws Exception { Map map = new HashMap(); String errInfo = "success"; @@ -75,6 +78,7 @@ public class AppSafetyEnvironmentalInspectorController extends BaseController { uBean.put("OPERATOR", pd.getString("OPERATOR")); //修改人 uBean.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间 uBean.put("ACTION_USER", pd.getString("ACTION_USER")); //操作人 + ArrayList strings = new ArrayList<>(); if (files != null && files.length > 0) { MultipartFile file = files[0]; String suffixName = file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".")+1).toLowerCase(); @@ -90,8 +94,16 @@ public class AppSafetyEnvironmentalInspectorController extends BaseController { Smb.sshSftp(file, fileName, Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile); uBean.put("INSPECTION_USER_SIGN_IMG", Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile + "/" + fileName); + strings.add(uBean.getString("INSPECTION_USER_SIGN_IMG")+"@@"+fileName); } - safetyenvironmentalinspectorService.verify(uBean); + PageData pageData = safetyenvironmentalinspectorService.verify(uBean); + pd.put("uBean", JSON.toJSONString(uBean)); + if (uBean.get("CORPINFO_ID")!=null){ + pd.put("operatingCorpId", uBean.get("CORPINFO_ID")); + } + pd.put("verify",JSON.toJSONString(pageData)); + map.put("sendPicturesList",JSON.toJSONString(strings)); + map.put("dockData", JSON.toJSONString(pd)); map.put("pd", pd); map.put("result", errInfo); return map; diff --git a/src/main/java/com/zcloud/service/inspection/SafetyEnvironmentalExplainService.java b/src/main/java/com/zcloud/service/inspection/SafetyEnvironmentalExplainService.java index 85839445..e5b30e7c 100644 --- a/src/main/java/com/zcloud/service/inspection/SafetyEnvironmentalExplainService.java +++ b/src/main/java/com/zcloud/service/inspection/SafetyEnvironmentalExplainService.java @@ -17,7 +17,7 @@ public interface SafetyEnvironmentalExplainService{ * @param pd * @throws Exception */ - public void save(PageData pd)throws Exception; + public PageData save(PageData pd)throws Exception; /**删除 * @param pd diff --git a/src/main/java/com/zcloud/service/inspection/SafetyEnvironmentalInspectorService.java b/src/main/java/com/zcloud/service/inspection/SafetyEnvironmentalInspectorService.java index 50210d9d..a2d399d6 100644 --- a/src/main/java/com/zcloud/service/inspection/SafetyEnvironmentalInspectorService.java +++ b/src/main/java/com/zcloud/service/inspection/SafetyEnvironmentalInspectorService.java @@ -71,7 +71,7 @@ public interface SafetyEnvironmentalInspectorService{ * 检查人核实 * @param pd */ - void verify(PageData pd)throws Exception; + PageData verify(PageData pd)throws Exception; /**删除(根据检查ID) * @param pd diff --git a/src/main/java/com/zcloud/service/inspection/SafetyEnvironmentalService.java b/src/main/java/com/zcloud/service/inspection/SafetyEnvironmentalService.java index 5e8e1921..3a61347e 100644 --- a/src/main/java/com/zcloud/service/inspection/SafetyEnvironmentalService.java +++ b/src/main/java/com/zcloud/service/inspection/SafetyEnvironmentalService.java @@ -93,7 +93,7 @@ public interface SafetyEnvironmentalService{ * @param pd * @throws Exception */ - void explain(PageData pd)throws Exception; + PageData explain(PageData pd)throws Exception; /** * 分公司安全环保检查考核分数统计 diff --git a/src/main/java/com/zcloud/service/inspection/impl/SafetyEnvironmentalExplainServiceImpl.java b/src/main/java/com/zcloud/service/inspection/impl/SafetyEnvironmentalExplainServiceImpl.java index 70ac9f64..33800de3 100644 --- a/src/main/java/com/zcloud/service/inspection/impl/SafetyEnvironmentalExplainServiceImpl.java +++ b/src/main/java/com/zcloud/service/inspection/impl/SafetyEnvironmentalExplainServiceImpl.java @@ -42,7 +42,7 @@ public class SafetyEnvironmentalExplainServiceImpl implements SafetyEnvironmenta * @throws Exception */ @Transactional - public void save(PageData pd)throws Exception{ + public PageData save(PageData pd)throws Exception{ PageData inspection = safetyEnvironmentalService.findById(pd); inspection.put("INSPECTED_EXPLAIN", pd.getString("INSPECTED_EXPLAIN")); if (Tools.notEmpty(pd.getString("INSPECTED_EXPLAIN_FILENAME"))) { @@ -80,7 +80,10 @@ public class SafetyEnvironmentalExplainServiceImpl implements SafetyEnvironmenta log.put("CREATOR", pd.getString("ACTION_USER")); //添加人姓名 safetyenvironmentallogService.save(log); + safetyenvironmentalexplainMapper.save(pd); + log.put("CORPINFO_ID",inspection.getString("CORPINFO_ID")); + return log; } /**删除 diff --git a/src/main/java/com/zcloud/service/inspection/impl/SafetyEnvironmentalInspectorServiceImpl.java b/src/main/java/com/zcloud/service/inspection/impl/SafetyEnvironmentalInspectorServiceImpl.java index b989bbb6..705054d5 100644 --- a/src/main/java/com/zcloud/service/inspection/impl/SafetyEnvironmentalInspectorServiceImpl.java +++ b/src/main/java/com/zcloud/service/inspection/impl/SafetyEnvironmentalInspectorServiceImpl.java @@ -35,7 +35,7 @@ public class SafetyEnvironmentalInspectorServiceImpl implements SafetyEnvironmen private NoticeCorpUtil util; @Override - public void verify(PageData pd) throws Exception { + public PageData verify(PageData pd) throws Exception { if ("1".equals(pd.getString("INSPECTION_STATUS"))) { //检查进度状态 1.部分检查人员已核实 List list = safetyenvironmentalinspectorMapper.listOtherNotVerify(pd); if (list.size() == 0) { @@ -58,6 +58,7 @@ public class SafetyEnvironmentalInspectorServiceImpl implements SafetyEnvironmen log.put("CREATOR", pd.getString("ACTION_USER")); //添加人姓名 safetyenvironmentallogService.save(log); safetyenvironmentalinspectorMapper.edit(pd); + return log; } /** diff --git a/src/main/java/com/zcloud/service/inspection/impl/SafetyEnvironmentalServiceImpl.java b/src/main/java/com/zcloud/service/inspection/impl/SafetyEnvironmentalServiceImpl.java index 45f4983f..d340a20e 100644 --- a/src/main/java/com/zcloud/service/inspection/impl/SafetyEnvironmentalServiceImpl.java +++ b/src/main/java/com/zcloud/service/inspection/impl/SafetyEnvironmentalServiceImpl.java @@ -566,7 +566,7 @@ public class SafetyEnvironmentalServiceImpl implements SafetyEnvironmentalServic } @Override - public void explain(PageData pd) throws Exception { + public PageData explain(PageData pd) throws Exception { PageData data = safetyenvironmentalMapper.findById(pd); pd.put("STATE", "101"); // 101.检查已归档,待指派 pd.put("INSPECTION_SOURCE",data.getString("INSPECTION_SOURCE")); @@ -600,6 +600,8 @@ public class SafetyEnvironmentalServiceImpl implements SafetyEnvironmentalServic explain.put("OPERATTIME",DateUtil.date2Str(new Date())); safetyEnvironmentalExplainService.edit(explain); } + log.put("CORPINFO_ID",data.getString("CORPINFO_ID")); + return log; } @Override