From 696c3eab4446d52b0febdcf0b5b612415b1e21da Mon Sep 17 00:00:00 2001 From: songwenxuan <1924103812@qq.com> Date: Mon, 25 Dec 2023 10:45:30 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=89=E5=85=A8=E7=8E=AF=E4=BF=9D=E6=A3=80?= =?UTF-8?q?=E6=9F=A5=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 --- .../inspection/SafetyEnvironmentalController.java | 5 ++++- .../inspection/SafetyEnvironmentalExplainController.java | 7 +++++-- .../inspection/SafetyEnvironmentalInspectorController.java | 7 ++++--- 3 files changed, 13 insertions(+), 6 deletions(-) diff --git a/src/main/java/com/zcloud/controller/inspection/SafetyEnvironmentalController.java b/src/main/java/com/zcloud/controller/inspection/SafetyEnvironmentalController.java index 05930b15..59db4739 100644 --- a/src/main/java/com/zcloud/controller/inspection/SafetyEnvironmentalController.java +++ b/src/main/java/com/zcloud/controller/inspection/SafetyEnvironmentalController.java @@ -272,7 +272,7 @@ public class SafetyEnvironmentalController extends BaseController { @RequestMapping(value = "/add") @RequiresPermissions("safetyenvironmental:add") @ResponseBody - @DockAnnotation(isAdd = true) + @DockAnnotation(hasAnnex = true) public Object add() throws Exception { Map map = new HashMap(); String errInfo = "success"; @@ -287,6 +287,7 @@ public class SafetyEnvironmentalController extends BaseController { pd.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间 pd.put("CORPINFO_ID", "1".equals(Jurisdiction.getUSER_ID()) ? "" : Jurisdiction.getCORPINFO_ID()); //企业ID pd.put("ACTION_USER", Jurisdiction.getName()); //操作人 + ArrayList strings = new ArrayList<>(); if (StringUtils.isNotBlank(pd.getString("CONFIRM_MESSAGE_SIGN"))) { MultipartFile file = BASE64DecodedMultipartFile.base64ToMultipart(pd.getString("CONFIRM_MESSAGE_SIGN")); String suffixName = file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".") + 1).toLowerCase(); @@ -300,10 +301,12 @@ public class SafetyEnvironmentalController 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("CONFIRM_MESSAGE_SIGN_ROUTE", Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile + "/" + fileName); + strings.add(pd.getString("CONFIRM_MESSAGE_SIGN_ROUTE")+"@@"+fileName); } List hiddenList = safetyenvironmentalService.save(pd); pd.put("hiddenList", hiddenList); map.put("pd", pd); + map.put("sendPicturesList",JSON.toJSONString(strings)); map.put("dockData", JSON.toJSONString(pd)); map.put("result", errInfo); return map; diff --git a/src/main/java/com/zcloud/controller/inspection/SafetyEnvironmentalExplainController.java b/src/main/java/com/zcloud/controller/inspection/SafetyEnvironmentalExplainController.java index b8fb4b26..d7790f65 100644 --- a/src/main/java/com/zcloud/controller/inspection/SafetyEnvironmentalExplainController.java +++ b/src/main/java/com/zcloud/controller/inspection/SafetyEnvironmentalExplainController.java @@ -100,7 +100,7 @@ public class SafetyEnvironmentalExplainController extends BaseController { @RequestMapping(value="/add") @RequiresPermissions("safetyenvironmentalexplain:add") @ResponseBody - @DockAnnotation(isAdd = true) + @DockAnnotation(hasAnnex = true) public Object add(@RequestParam(value="file",required=false) MultipartFile file) throws Exception{ Map map = new HashMap(); String errInfo = "success"; @@ -116,6 +116,7 @@ public class SafetyEnvironmentalExplainController extends BaseController { pd.put("ACTION_USER", Jurisdiction.getName()); //操作人 pd.put("VALID","1"); pd.put("ISPASS","0"); + ArrayList strings = new ArrayList<>(); if (StringUtils.isNotBlank(pd.getString("INSPECTED_SITEUSER_SIGN_IMG"))) { MultipartFile img = BASE64DecodedMultipartFile.base64ToMultipart(pd.getString("INSPECTED_SITEUSER_SIGN_IMG")); String suffixName = img.getOriginalFilename().substring(img.getOriginalFilename().lastIndexOf(".")+1).toLowerCase(); @@ -128,8 +129,8 @@ public class SafetyEnvironmentalExplainController extends BaseController { String ffile = DateUtil.getDays(); String fileName = this.get32UUID()+img.getOriginalFilename().substring(img.getOriginalFilename().lastIndexOf(".")); Smb.sshSftp(img, 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); } if (null != file && !file.isEmpty()) { String suffixName = file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".")+1).toLowerCase(); @@ -145,6 +146,7 @@ public class SafetyEnvironmentalExplainController extends BaseController { Smb.sshSftp(file, fileName, Const.FILEPATHFILE + Jurisdiction.getCORPINFO_ID() + "/" + ffile); pd.put("INSPECTED_EXPLAIN_FILENAME", file.getOriginalFilename()); pd.put("INSPECTED_EXPLAIN_FILEPATH", Const.FILEPATHFILE + Jurisdiction.getCORPINFO_ID() + "/" + ffile + "/" + fileName); + strings.add(pd.getString("INSPECTED_EXPLAIN_FILEPATH")+"@@"+fileName); } PageData logData = safetyenvironmentalexplainService.save(pd); pd.put("logData",JSON.toJSONString(logData)); @@ -152,6 +154,7 @@ public class SafetyEnvironmentalExplainController extends BaseController { noticeCorpUtil.SE_PleadingStepUtil(pd); map.put("pd", pd); map.put("result", errInfo); + map.put("sendPicturesList",JSON.toJSONString(strings)); map.put("dockData", JSON.toJSONString(pd)); return map; } diff --git a/src/main/java/com/zcloud/controller/inspection/SafetyEnvironmentalInspectorController.java b/src/main/java/com/zcloud/controller/inspection/SafetyEnvironmentalInspectorController.java index 37b18941..ee6e68c7 100644 --- a/src/main/java/com/zcloud/controller/inspection/SafetyEnvironmentalInspectorController.java +++ b/src/main/java/com/zcloud/controller/inspection/SafetyEnvironmentalInspectorController.java @@ -84,7 +84,7 @@ public class SafetyEnvironmentalInspectorController extends BaseController { @RequestMapping(value="/verify") @RequiresPermissions("safetyenvironmentalinspector:add") @ResponseBody - @DockAnnotation(isAdd = true) + @DockAnnotation(hasAnnex = true) public Object verify() throws Exception{ Map map = new HashMap(); String errInfo = "success"; @@ -97,7 +97,7 @@ public class SafetyEnvironmentalInspectorController extends BaseController { uBean.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间 uBean.put("INSPECTION_STATUS", pd.getString("INSPECTION_STATUS")); //检查进度状态 uBean.put("ACTION_USER", Jurisdiction.getName()); //检查进度状态 - + ArrayList strings = new ArrayList<>(); if (StringUtils.isNotBlank(pd.getString("INSPECTION_USER_SIGN_IMG"))) { MultipartFile file = BASE64DecodedMultipartFile.base64ToMultipart(pd.getString("INSPECTION_USER_SIGN_IMG")); String suffixName = file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".")+1).toLowerCase(); @@ -110,14 +110,15 @@ public class SafetyEnvironmentalInspectorController extends BaseController { String ffile = DateUtil.getDays(); String fileName = this.get32UUID()+file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".")); 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); } 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("sendPicturesList",JSON.toJSONString(strings)); map.put("dockData", JSON.toJSONString(pd)); return map; }