From 9a06cfa20696277252d9dcea4fe72539bbe8d2e8 Mon Sep 17 00:00:00 2001 From: songwenxuan <1924103812@qq.com> Date: Sat, 23 Dec 2023 10:49:42 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B6=88=E9=98=B2=E8=B5=84=E6=BA=90=E7=AE=A1?= =?UTF-8?q?=E7=90=86=E5=AF=B9=E6=8E=A5=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../app/AppCheckRecordController.java | 9 ++++++ .../controller/app/AppHiddenController.java | 32 ++++++++++++++++--- .../app/AppHiddenExamineController.java | 7 ++++ .../app/AppRiskPointController.java | 2 ++ .../AppSafetyEnvironmentalController.java | 13 ++++++-- ...pSafetyEnvironmentalExplainController.java | 7 +++- ...afetyEnvironmentalInspectorController.java | 8 ++++- .../controller/bus/HiddenController.java | 12 ++++--- .../SafetyEnvironmentalController.java | 2 ++ .../keyProjects/OutSourcedController.java | 4 +-- .../bus/impl/HiddenExamineServiceImpl.java | 4 ++- .../hiddenApi/HiddenExamineApiService.java | 3 +- .../impl/HiddenExamineApiServiceImpl.java | 6 ++-- .../impl/SafetyEnvironmentalServiceImpl.java | 15 ++++++++- 14 files changed, 104 insertions(+), 20 deletions(-) diff --git a/src/main/java/com/zcloud/controller/app/AppCheckRecordController.java b/src/main/java/com/zcloud/controller/app/AppCheckRecordController.java index 3da55bb1..6df8911f 100644 --- a/src/main/java/com/zcloud/controller/app/AppCheckRecordController.java +++ b/src/main/java/com/zcloud/controller/app/AppCheckRecordController.java @@ -1,11 +1,13 @@ package com.zcloud.controller.app; +import java.sql.Array; import java.util.ArrayList; import java.util.Date; import java.util.HashMap; import java.util.List; import java.util.Map; +import com.zcloud.aspect.DockAnnotation; import com.zcloud.service.bus.*; import com.zcloud.util.*; import com.zcloud.util.message.MessageService; @@ -77,6 +79,7 @@ public class AppCheckRecordController extends BaseController { @RequestMapping(value = "/add") @ResponseBody @Transactional + @DockAnnotation public Object add() throws Exception { Map map = new HashMap(); String errInfo = "success"; @@ -134,6 +137,7 @@ public class AppCheckRecordController extends BaseController { hiddenService.updateAll(hiddens); } map.put("result", errInfo); + map.put("dockData",JSON.toJSONString(pd)); return map; } @@ -146,6 +150,7 @@ public class AppCheckRecordController extends BaseController { @RequestMapping(value = "/finish") @ResponseBody @Transactional + @DockAnnotation public Object finish() throws Exception { Map map = new HashMap(); String errInfo = "success"; @@ -199,6 +204,7 @@ public class AppCheckRecordController extends BaseController { checkuserService.delete(pd); if (pd.get("OTHER") != null && !pd.get("OTHER").equals("")) { List list1 = (List) JSON.parse(pd.get("OTHER").toString()); + ArrayList otherList = new ArrayList<>(); for (JSONObject json : list1) { if (json.get("DEPARTMENT_ID") != null && json.get("DEPARTMENT_ID") != "" && json.get("USER_ID") != null && json.get("USER_ID") != "") { @@ -207,9 +213,11 @@ public class AppCheckRecordController extends BaseController { other.put("CHECKRECORD_ID", pd.get("CHECKRECORD_ID")); other.put("DEPARTMENT_ID", json.get("DEPARTMENT_ID")); other.put("USER_ID", json.get("USER_ID")); + otherList.add(other); checkuserService.save(other); } } + pd.put("otherList", otherList); } hiddenService.submit(pd);// 清单内隐患提交 hiddenService.submitList(pd);// 其他隐患提交 @@ -226,6 +234,7 @@ public class AppCheckRecordController extends BaseController { } map.put("result", errInfo); + map.put("dockData",JSON.toJSONString(pd)); return map; } diff --git a/src/main/java/com/zcloud/controller/app/AppHiddenController.java b/src/main/java/com/zcloud/controller/app/AppHiddenController.java index 6a59f947..75066dfc 100644 --- a/src/main/java/com/zcloud/controller/app/AppHiddenController.java +++ b/src/main/java/com/zcloud/controller/app/AppHiddenController.java @@ -22,6 +22,7 @@ import com.zcloud.util.*; import com.zcloud.util.event.DeviceHiddenEvent; import com.zcloud.util.message.MessageService; import org.apache.commons.lang.StringUtils; +import org.apache.shiro.crypto.hash.Hash; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.ApplicationContext; import org.springframework.stereotype.Controller; @@ -263,6 +264,7 @@ public class AppHiddenController extends BaseController { */ @RequestMapping(value = "/add") @ResponseBody + @DockAnnotation public Object add() throws Exception { Map map = new HashMap(); String errInfo = "success"; @@ -292,7 +294,9 @@ public class AppHiddenController extends BaseController { pd.put("RISK_POSITION", item.get("POSITIONNAME")); pd.put("LEVEL", item.get("DNAME5")); } - List list = (List) JSON.parse(pd.get("other").toString()); // 隐患发现人 + List list = (List) JSON.parse(pd.get("other").toString()); // 隐患发现 + HashMap hiddenconUserMap = new HashMap<>(); + int count = 1; for (JSONObject json : list) { PageData hiddenconUserAdd = new PageData(); hiddenconUserAdd.put("HIDDENUSER_ID", UuidUtil.get32UUID()); @@ -300,8 +304,11 @@ public class AppHiddenController extends BaseController { hiddenconUserAdd.put("USER_ID", json.get("USER_ID")); hiddenconUserAdd.put("TYPE", "1"); hiddenconUserAdd.put("IS_MAIN", "0"); + hiddenconUserMap.put("hiddenconUser"+count,JSON.toJSONString(hiddenconUserAdd)); + count++; hiddenUserService.save(hiddenconUserAdd); // 添加隐患发现人 } + pd.put("hiddenconUserMap",JSON.toJSONString(hiddenconUserMap)); if (pd.getString("HIDDENLEVEL").equals("jdyh001") || pd.getString("HIDDENLEVEL").equals("hiddenLevel2002")) {//判断是否是重大隐患 PageData userpd = new PageData(); userpd.put("USER_ID", pd.getString("CREATOR")); @@ -344,7 +351,8 @@ public class AppHiddenController extends BaseController { before.put("spare4", pd.getString("RECTIFICATIONDEPT")); before.put("CREATOR", pd.getString("loginUserId")); before.put("OPERATOR", pd.getString("loginUserId")); - hiddenExamineService.saveApp(before); + PageData pageData = hiddenExamineService.saveApp(before); + pd.put("examine", JSON.toJSONString(pageData)); hiddenService.save(pd); if (!pd.getString("STATE").equals("0")) { messageService.sendMessageByParameter("HIDDEN_MAIL_001", "友情提示:有一条隐患需要确认", pd.getString("CORPINFO_ID"), pd.getString("CONFIRM_USER"), pd.getString("HIDDEN_ID"), @@ -364,10 +372,10 @@ public class AppHiddenController extends BaseController { imgFilesService.delete(i); } } - } map.put("result", errInfo); map.put("pd", pd); + map.put("dockData",JSON.toJSONString(pd)); return map; } @@ -412,7 +420,8 @@ public class AppHiddenController extends BaseController { before.put("spare4", pd.getString("RECTIFICATIONDEPT")); before.put("CREATOR", pd.getString("loginUserId")); before.put("OPERATOR", pd.getString("loginUserId")); - hiddenExamineService.saveApp(before); + PageData hiddenExamine = hiddenExamineService.saveApp(before); + pd.put("hiddenExamine", JSON.toJSONString(hiddenExamine)); PageData hiddenExaminePageData = new PageData(); hiddenExaminePageData.putAll(before); @@ -955,6 +964,7 @@ public class AppHiddenController extends BaseController { @RequestMapping(value = "/rectify") @ResponseBody @Transactional + @DockAnnotation public Object rectify() throws Exception { Map map = new HashMap(); String errInfo = "success"; @@ -989,6 +999,7 @@ public class AppHiddenController extends BaseController { if (pd.get("OTHER") != null && !pd.get("OTHER").equals("")) { List list = (List) JSON.parse(pd.get("OTHER").toString()); + List otherList = new ArrayList<>(); for (JSONObject json : list) { // if (json.get("DEPARTMENT_ID") != null && json.get("DEPARTMENT_ID") != "" && json.get("USER_ID") != null // && json.get("USER_ID") != "") { @@ -999,6 +1010,7 @@ public class AppHiddenController extends BaseController { other.put("DEPARTMENT_ID", json.get("DEPARTMENT_ID")); other.put("USER_ID", json.get("USER_ID")); other.put("STATUS", "0"); + otherList.add(other); hiddenCheckService.save(other); PageData hiddenPd = hiddenService.findById(pd); messageService.sendMessageByParameter("HIDDEN_MAIL_004", "友情提示:有一条隐患需要验收", @@ -1006,9 +1018,11 @@ public class AppHiddenController extends BaseController { hiddenPd.getString("HIDDENDESCR"), "隐患验收", "验收", "", ""); } } + pd.put("otherList",JSON.toJSONString(otherList)); } map.put("result", errInfo); map.put("HIDDENSCHEME_ID", pd.get("HIDDENSCHEME_ID")); + map.put("dockData",JSON.toJSONString(pd)); return map; } @@ -1068,6 +1082,7 @@ public class AppHiddenController extends BaseController { */ @RequestMapping(value = "/check") @ResponseBody + @DockAnnotation public Object check() throws Exception { Map map = new HashMap(); String errInfo = "success"; @@ -1141,11 +1156,13 @@ public class AppHiddenController extends BaseController { /** 验收打回 **/ hiddenApiService.repulseCheck(pd.getString("HIDDEN_ID")); /** 记录打回 **/ - hiddenExamineApiService.saveRepulseCheckApp(pd.getString("HIDDEN_ID"), pd.getString("CONTENT"), pd.getString("CHECKOR")); + PageData pageData = hiddenExamineApiService.saveRepulseCheckApp(pd.getString("HIDDEN_ID"), pd.getString("CONTENT"), pd.getString("CHECKOR")); + pd.put("pageData", JSON.toJSONString(pageData)); } hiddenMailService.apphiddneCheckAdopt(pd); map.put("check", pd); map.put("result", errInfo); + map.put("dockData",JSON.toJSONString(pd)); return map; } @@ -1470,6 +1487,7 @@ public class AppHiddenController extends BaseController { */ @RequestMapping(value = "/confirm") @ResponseBody + @DockAnnotation public Object confirmUpdate() throws Exception { Map map = new HashMap(); String errInfo = "success"; @@ -1626,6 +1644,7 @@ public class AppHiddenController extends BaseController { */ @RequestMapping(value = "/assign") @ResponseBody + @DockAnnotation public Object assign() throws Exception { Map map = new HashMap(); String errInfo = "success"; @@ -1667,6 +1686,7 @@ public class AppHiddenController extends BaseController { */ @RequestMapping(value = "/finalcheck") @ResponseBody + @DockAnnotation public Object finalcheck() throws Exception { Map map = new HashMap(); String errInfo = "success"; @@ -1738,6 +1758,7 @@ public class AppHiddenController extends BaseController { @RequestMapping(value = "/repulseHidden") //@RequiresPermissions("hidden:edit") @ResponseBody + @DockAnnotation public Object repulseHidden() throws Exception { Map map = new HashMap(); String errInfo = "success"; @@ -1750,6 +1771,7 @@ public class AppHiddenController extends BaseController { hiddenExamineService.saverepulse(pd); hiddenMailService.reject(pd); map.put("result", errInfo); + map.put("dockData",JSON.toJSONString(pd)); return map; } diff --git a/src/main/java/com/zcloud/controller/app/AppHiddenExamineController.java b/src/main/java/com/zcloud/controller/app/AppHiddenExamineController.java index 4fd0c43d..8c12fe65 100644 --- a/src/main/java/com/zcloud/controller/app/AppHiddenExamineController.java +++ b/src/main/java/com/zcloud/controller/app/AppHiddenExamineController.java @@ -1,5 +1,7 @@ package com.zcloud.controller.app; +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; @@ -216,6 +218,7 @@ public class AppHiddenExamineController extends BaseController { */ @RequestMapping(value = "/delayedExamine") @ResponseBody + @DockAnnotation public Object delayedExamine() throws Exception { Map map = new HashMap(); String errInfo = "success"; @@ -263,6 +266,7 @@ public class AppHiddenExamineController extends BaseController { @RequestMapping(value = "/delayed") @ResponseBody @Transactional + @DockAnnotation public Object delayed(@RequestParam(value="FFILE",required=false) MultipartFile file) throws Exception { Map map = new HashMap(); String errInfo = "success"; @@ -292,6 +296,7 @@ public class AppHiddenExamineController extends BaseController { pd.put("CREATOR", pd.getString("loginUserId")); pd.put("OPERATOR",pd.getString("loginUserId")); examine = hiddenexamineService.saveApp(examine); + pd.put("examine", JSON.toJSONString(examine)); PageData hiddenpd = hiddenService.findById(pd); messageService.sendMessageByParameter("HIDDEN_MAIL_007","友情提示:有一条隐患需要延期审核", hiddenpd.getString("CORPINFO_ID"),hiddenpd.getString("CONFIRM_USER"),hiddenpd.getString("HIDDEN_ID"), @@ -300,6 +305,7 @@ public class AppHiddenExamineController extends BaseController { map.put("result", errInfo); map.put("msg", "隐患延期申成功。请通知隐患确认人进行延期确认操作!"); + map.put("dockData",JSON.toJSONString(pd)); return map; } /** @@ -345,6 +351,7 @@ public class AppHiddenExamineController extends BaseController { */ @RequestMapping(value = "/specialExamine") @ResponseBody + @DockAnnotation public Object specialExamine(@RequestParam(value="FFILE",required=false) MultipartFile file) throws Exception { Map map = new HashMap(); String errInfo = "success"; diff --git a/src/main/java/com/zcloud/controller/app/AppRiskPointController.java b/src/main/java/com/zcloud/controller/app/AppRiskPointController.java index 70bc06fe..0989cfd0 100644 --- a/src/main/java/com/zcloud/controller/app/AppRiskPointController.java +++ b/src/main/java/com/zcloud/controller/app/AppRiskPointController.java @@ -5,6 +5,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; +import com.zcloud.aspect.DockAnnotation; import org.apache.shiro.authz.annotation.RequiresPermissions; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; @@ -86,6 +87,7 @@ public class AppRiskPointController extends BaseController{ */ @RequestMapping(value="/editLonAndLat") @ResponseBody + @DockAnnotation public Object edit() throws Exception{ Map map = new HashMap(); String errInfo = "success"; 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..b76f7b31 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,7 +87,8 @@ public class AppSafetyEnvironmentalController extends BaseController { */ @RequestMapping(value="/add") @ResponseBody - public Object add(@RequestParam(value="FFILE",required=false) MultipartFile file) throws Exception{ + @DockAnnotation + public Object add(@RequestParam(value="FFILE",required=false) MultipartFile file) throws Exception { Map map = new HashMap(); String errInfo = "success"; PageData pd = new PageData(); @@ -118,6 +121,7 @@ public class AppSafetyEnvironmentalController extends BaseController { pd.put("hiddenList", hiddenList); map.put("pd", pd); map.put("result", errInfo); + map.put("dockData", JSON.toJSONString(pd)); return map; } @@ -163,6 +167,7 @@ public class AppSafetyEnvironmentalController extends BaseController { */ @RequestMapping(value="/edit") @ResponseBody + @DockAnnotation public Object edit(@RequestParam(value="FFILE",required=false) MultipartFile file) throws Exception{ Map map = new HashMap(); String errInfo = "success"; @@ -191,6 +196,7 @@ public class AppSafetyEnvironmentalController extends BaseController { pd.put("hiddenList", hiddenList); map.put("pd", pd); map.put("result", errInfo); + map.put("dockData", JSON.toJSONString(pd)); return map; } @@ -201,6 +207,7 @@ public class AppSafetyEnvironmentalController extends BaseController { @RequestMapping(value="/explain") //@RequiresPermissions("safetyenvironmental:edit") @ResponseBody + @DockAnnotation public Object explain(@RequestParam(value="FFILE",required=false) MultipartFile[] files) throws Exception{ Map map = new HashMap(); String errInfo = "success"; @@ -222,11 +229,13 @@ public class AppSafetyEnvironmentalController extends BaseController { pd.put("INSPECTION_ORIGINATOR_SIGN_IMG", Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile + "/" + fileName); } - safetyenvironmentalService.explain(pd); + PageData log = safetyenvironmentalService.explain(pd); + pd.put("log",JSON.toJSONString(log)); pd.put("inspector",pd.getString("OPERATOR")); noticeCorpUtil.FailPleadind(pd); map.put("pd", pd); map.put("result", errInfo); + map.put("dockData",JSON.toJSONString(pd)); 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..72a1ff3a 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 public Object add(@RequestParam(value = "FFILE", required = false) MultipartFile file) throws Exception { Map map = new HashMap(); String errInfo = "success"; @@ -104,10 +107,12 @@ public class AppSafetyEnvironmentalExplainController extends BaseController { 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); } - safetyenvironmentalexplainService.save(pd); + PageData log = safetyenvironmentalexplainService.save(pd); + pd.put("logData", log); noticeCorpUtil.SE_PleadingStepUtil(pd); map.put("pd", pd); map.put("result", errInfo); + map.put("dockData", JSON.toJSONString(pd)); 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..f7c28607 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 public Object verify(@RequestParam(value = "FFILE", required = false) MultipartFile[] files) throws Exception { Map map = new HashMap(); String errInfo = "success"; @@ -91,9 +94,12 @@ public class AppSafetyEnvironmentalInspectorController extends BaseController { 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("result", errInfo); + map.put("dockData", JSON.toJSONString(pd)); return map; } diff --git a/src/main/java/com/zcloud/controller/bus/HiddenController.java b/src/main/java/com/zcloud/controller/bus/HiddenController.java index f3c333e8..e8bfe1eb 100644 --- a/src/main/java/com/zcloud/controller/bus/HiddenController.java +++ b/src/main/java/com/zcloud/controller/bus/HiddenController.java @@ -2151,6 +2151,7 @@ public class HiddenController extends BaseController { @RequestMapping(value = "/confirmUpdate") @RequiresPermissions("hidden:edit") @ResponseBody + @DockAnnotation public Object confirmUpdate(@RequestParam(value = "FFILE", required = false) MultipartFile file, @RequestParam(value = "FFILETwo", required = false) MultipartFile fileTwo @@ -2234,7 +2235,8 @@ public class HiddenController extends BaseController { return map; } PageData examine = new PageData(); - examine.put("IMGFILES_ID", this.get32UUID()); + String IMGFILES_ID = this.get32UUID(); + examine.put("IMGFILES_ID", IMGFILES_ID); examine.put("FOREIGN_KEY", pd.getString("HIDDEN_ID")); if (pd.getString("STATE").equals("12")) { examine.put("TYPE", "107");//补充重大隐患信息与临时处置信息 @@ -2243,7 +2245,7 @@ public class HiddenController extends BaseController { } String ffile = DateUtil.getDays(); String fileName = this.get32UUID() + file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".")); - Smb.sshSftp(file, fileName, Const.FILEPATHYHTP + Jurisdiction.getCORPINFO_ID() + "/" + ffile); + Smb.sshSftp(file, fileName, Const.FILEPATHYHTP + Jurisdiction.getCORPINFO_ID() + "/" + ffile,IMGFILES_ID,pd.getString("HIDDEN_ID"),examine.getString("TYPE")); examine.put("FILEPATH", Const.FILEPATHYHTP + Jurisdiction.getCORPINFO_ID() + "/" + ffile + "/" + fileName); imgFilesService.save(examine);//保存上传的PDF } @@ -2256,7 +2258,8 @@ public class HiddenController extends BaseController { return map; } PageData examine = new PageData(); - examine.put("IMGFILES_ID", this.get32UUID()); + String IMGFILES_ID = this.get32UUID(); + examine.put("IMGFILES_ID", IMGFILES_ID); examine.put("FOREIGN_KEY", pd.getString("HIDDEN_ID")); if (pd.getString("STATE").equals("11")) { examine.put("TYPE", "112");//补充重大隐患信息与临时处置信息 @@ -2265,7 +2268,7 @@ public class HiddenController extends BaseController { } String ffile = DateUtil.getDays(); String fileName = this.get32UUID() + fileTwo.getOriginalFilename().substring(fileTwo.getOriginalFilename().lastIndexOf(".")); - Smb.sshSftp(fileTwo, fileName, Const.FILEPATHYHTP + Jurisdiction.getCORPINFO_ID() + "/" + ffile); + Smb.sshSftp(fileTwo, fileName, Const.FILEPATHYHTP + Jurisdiction.getCORPINFO_ID() + "/" + ffile,IMGFILES_ID,pd.getString("HIDDEN_ID"),pd.getString("TYPE")); examine.put("FILEPATH", Const.FILEPATHYHTP + Jurisdiction.getCORPINFO_ID() + "/" + ffile + "/" + fileName); imgFilesService.save(examine);//保存上传的PDF } @@ -2284,6 +2287,7 @@ public class HiddenController extends BaseController { map.put("pd", pd); map.put("result", errInfo); + map.put("dockData",JSON.toJSONString(pd)); return map; } diff --git a/src/main/java/com/zcloud/controller/inspection/SafetyEnvironmentalController.java b/src/main/java/com/zcloud/controller/inspection/SafetyEnvironmentalController.java index fd4a41aa..05930b15 100644 --- a/src/main/java/com/zcloud/controller/inspection/SafetyEnvironmentalController.java +++ b/src/main/java/com/zcloud/controller/inspection/SafetyEnvironmentalController.java @@ -359,6 +359,7 @@ public class SafetyEnvironmentalController extends BaseController { @RequestMapping(value = "/edit") @RequiresPermissions("safetyenvironmental:edit") @ResponseBody + @DockAnnotation public Object edit() throws Exception { Map map = new HashMap(); String errInfo = "success"; @@ -387,6 +388,7 @@ public class SafetyEnvironmentalController extends BaseController { pd.put("hiddenList", hiddenList); map.put("pd", pd); map.put("result", errInfo); + map.put("dockData", JSON.toJSONString(pd)); return map; } diff --git a/src/main/java/com/zcloud/controller/keyProjects/OutSourcedController.java b/src/main/java/com/zcloud/controller/keyProjects/OutSourcedController.java index 72937c15..40e3b44d 100644 --- a/src/main/java/com/zcloud/controller/keyProjects/OutSourcedController.java +++ b/src/main/java/com/zcloud/controller/keyProjects/OutSourcedController.java @@ -112,7 +112,7 @@ public class OutSourcedController extends BaseController { String fileName = this.get32UUID() + file1.getOriginalFilename().substring(file1.getOriginalFilename().lastIndexOf(".")); Smb.sshSftp(file1, fileName, Const.FILEPATHFILE + ffile); pd.put("MEASURES", Const.FILEPATHFILE + ffile + "/" + fileName); - strings.add(Const.FILEPATHFILE + ffile + "/" + fileName); + strings.add(Const.FILEPATHFILE + ffile + "/" + fileName+"@@"+fileName); } if (null != file2 && !file2.isEmpty()) { @@ -250,7 +250,7 @@ public class OutSourcedController extends BaseController { //} pd.put("INVOLVING_CORPS", Jurisdiction.getCORPINFO_ID()); outsourcedService.save(pd); - pd.put("pictList",strings); + map.put("sendPicturesList",strings); map.put("dockData", JSON.toJSONString(pd)); map.put("result", errInfo); return map; diff --git a/src/main/java/com/zcloud/service/bus/impl/HiddenExamineServiceImpl.java b/src/main/java/com/zcloud/service/bus/impl/HiddenExamineServiceImpl.java index 5ebd7a1d..023b86d7 100644 --- a/src/main/java/com/zcloud/service/bus/impl/HiddenExamineServiceImpl.java +++ b/src/main/java/com/zcloud/service/bus/impl/HiddenExamineServiceImpl.java @@ -141,7 +141,9 @@ public class HiddenExamineServiceImpl implements HiddenExamineService { return hiddenexamineMapper.findByIdAndHidden(pd); } public PageData saveApp(PageData pd)throws Exception{ - pd.put("HIDDENEXAMINE_ID", UuidUtil.get32UUID()); + if (pd.get("HIDDENEXAMINE_ID")==null) { + pd.put("HIDDENEXAMINE_ID", UuidUtil.get32UUID()); + } pd.put("CREATTIME", DateUtil.date2Str(new Date())); pd.put("OPERATTIME",DateUtil.date2Str(new Date())); hiddenexamineMapper.save(pd); diff --git a/src/main/java/com/zcloud/service/hiddenApi/HiddenExamineApiService.java b/src/main/java/com/zcloud/service/hiddenApi/HiddenExamineApiService.java index cb66792f..00f8f9be 100644 --- a/src/main/java/com/zcloud/service/hiddenApi/HiddenExamineApiService.java +++ b/src/main/java/com/zcloud/service/hiddenApi/HiddenExamineApiService.java @@ -139,10 +139,11 @@ public interface HiddenExamineApiService { public int adoptExamine(String hiddenexamineId ,String examine)throws Exception; /** * 隐患打回 + * * @param hiddenId * @param EXAMINE * @throws Exception */ - public int saveRepulseCheckApp(String hiddenId ,String EXAMINE,String loginUserId)throws Exception; + public PageData saveRepulseCheckApp(String hiddenId , String EXAMINE, String loginUserId)throws Exception; } diff --git a/src/main/java/com/zcloud/service/hiddenApi/impl/HiddenExamineApiServiceImpl.java b/src/main/java/com/zcloud/service/hiddenApi/impl/HiddenExamineApiServiceImpl.java index 8462d4d4..7c7381d0 100644 --- a/src/main/java/com/zcloud/service/hiddenApi/impl/HiddenExamineApiServiceImpl.java +++ b/src/main/java/com/zcloud/service/hiddenApi/impl/HiddenExamineApiServiceImpl.java @@ -242,7 +242,7 @@ public class HiddenExamineApiServiceImpl implements HiddenExamineApiService { exam.put("EXAMINE",examine); return hiddenExamineApiMapper.adoptExamine(exam); } - public int saveRepulseCheckApp(String hiddenId ,String EXAMINE,String loginUserId)throws Exception{ + public PageData saveRepulseCheckApp(String hiddenId , String EXAMINE, String loginUserId)throws Exception{ PageData exam = new PageData();// 添加隐患初始信息 exam.put("HIDDENEXAMINE_ID",UuidUtil.get32UUID()); exam.put("CREATOR",loginUserId); @@ -253,7 +253,9 @@ public class HiddenExamineApiServiceImpl implements HiddenExamineApiService { exam.put("STATE",-1);//验收打回变成初始状态-1 exam.put("EXAMINE",EXAMINE);//打回意见 exam.put("HIDDEN_ID",hiddenId);//隐患ID - return hiddenExamineApiMapper.save(exam); + int save = hiddenExamineApiMapper.save(exam); + exam.put("result",save); + return exam; } } 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 331426bd..7a9c08ce 100644 --- a/src/main/java/com/zcloud/service/inspection/impl/SafetyEnvironmentalServiceImpl.java +++ b/src/main/java/com/zcloud/service/inspection/impl/SafetyEnvironmentalServiceImpl.java @@ -65,7 +65,7 @@ public class SafetyEnvironmentalServiceImpl implements SafetyEnvironmentalServic * @param pd * @throws Exception */ - public List save(PageData pd)throws Exception{ + public List save(PageData pd)throws Exception { List hiddenList = new ArrayList(); String currentTime = DateUtil.date2Str(new Date()); if (Tools.notEmpty(pd.getString("SITUATIONJSON"))) { @@ -290,6 +290,7 @@ public class SafetyEnvironmentalServiceImpl implements SafetyEnvironmentalServic } } } + pd.put("inspector",JSON.toJSONString(inspector)); safetyenvironmentalinspectorService.save(inspector); if (note_flag) noticeCorpUtil.SE_OneStepUtil(inspector); time = DateUtil.calculateDateSecond(time, 1); @@ -331,6 +332,7 @@ public class SafetyEnvironmentalServiceImpl implements SafetyEnvironmentalServic if (Tools.notEmpty(pd.getString("SITUATIONJSON"))) { List list = (List) JSON.parse(pd.getString("SITUATIONJSON")); String time = currentTime; + ArrayList situationList = new ArrayList<>(); for (JSONObject json : list) { PageData situationPd = new PageData(); if (Tools.isEmpty(json.getString("INSPECTION_SITUATION_ID"))) { @@ -343,6 +345,7 @@ public class SafetyEnvironmentalServiceImpl implements SafetyEnvironmentalServic situationPd.put("OPERATOR", pd.getString("OPERATOR")); //修改人 situationPd.put("OPERATTIME", time); //修改时间 situationPd.put("CORPINFO_ID", pd.getString("CORPINFO_ID")); //企业ID + situationList.add(situationPd); safetyenvironmentalsituationService.save(situationPd); time = DateUtil.calculateDateSecond(time, 1); } else { @@ -351,9 +354,11 @@ public class SafetyEnvironmentalServiceImpl implements SafetyEnvironmentalServic situationPd.put("SITUATION", json.getString("SITUATION")); //检查情况 situationPd.put("OPERATOR", pd.getString("OPERATOR")); //修改人 situationPd.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间 + situationList.add(situationPd); safetyenvironmentalsituationService.edit(situationPd); } } + pd.put("situationList",JSON.toJSONString(situationList)); } String[] delHiddens = "".equals(pd.getString("delHiddens")) ? new String[0] : pd.getString("delHiddens").split(","); if (delHiddens.length > 0) { @@ -367,6 +372,8 @@ public class SafetyEnvironmentalServiceImpl implements SafetyEnvironmentalServic if (Tools.notEmpty(pd.getString("HIDDENJSON"))) { List list = (List) JSON.parse(pd.getString("HIDDENJSON")); String time = currentTime; + ArrayList hiddenpdList = new ArrayList<>(); + ArrayList userList = new ArrayList<>(); for (JSONObject json : list) { PageData hidden = new PageData(); if (Tools.isEmpty(json.getString("HIDDEN_ID"))) { @@ -389,6 +396,7 @@ public class SafetyEnvironmentalServiceImpl implements SafetyEnvironmentalServic hidden.put("ISDELETE", "0"); //是否删除(0:有效 1:删除) hidden.put("POSITIONDESC",json.getString("POSITIONDESC")); hidden.put("ISRELEVANT",json.getString("ISRELEVANT")); + hiddenpdList.add(hidden); hiddenService.save(hidden); time = DateUtil.calculateDateSecond(time, 1); } else { @@ -409,6 +417,7 @@ public class SafetyEnvironmentalServiceImpl implements SafetyEnvironmentalServic hidden.put("ISDELETE", "0"); //是否删除(0:有效 1:删除) hidden.put("POSITIONDESC",json.getString("POSITIONDESC")); hidden.put("ISRELEVANT",json.getString("ISRELEVANT")); + hiddenpdList.add(hidden); hiddenService.editInfo(hidden); PageData del = new PageData(); @@ -423,9 +432,12 @@ public class SafetyEnvironmentalServiceImpl implements SafetyEnvironmentalServic findUser.put("USER_ID",json.getString("CREATOR")); findUser.put("TYPE","1"); findUser.put("IS_MAIN","0"); + userList.add(findUser); hiddenUserService.save(findUser); hiddenList.add(hidden); } + pd.put("hiddenpdList",JSON.toJSONString(hiddenpdList)); + pd.put("userList",JSON.toJSONString(userList)); } String[] delHiddenFiles = "".equals(pd.getString("delHiddenFiles")) ? new String[0] : pd.getString("delHiddenFiles").split(","); @@ -442,6 +454,7 @@ public class SafetyEnvironmentalServiceImpl implements SafetyEnvironmentalServic log.put("ACTION", "安全环保检查重新申请"); //操作内容 log.put("CREATTIME", pd.getString("CREATTIME")); //添加时间 log.put("CREATOR", pd.getString("ACTION_USER")); //添加人姓名 + pd.put("log",JSON.toJSONString(log)); safetyenvironmentallogService.save(log); // 编辑的时候自动清空附件 if (!"1".equals(pd.getString("unClear"))){