From d06234ea16763b7753707077b473b422f0d6a584 Mon Sep 17 00:00:00 2001 From: songwenxuan <1924103812@qq.com> Date: Mon, 25 Dec 2023 17:51:16 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8E=92=E7=8F=AD=E5=AF=B9=E6=8E=A5=E4=BB=A3?= =?UTF-8?q?=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/app/AppHiddenController.java | 1 - .../AppSafetyEnvironmentalController.java | 7 ++-- ...pSafetyEnvironmentalExplainController.java | 5 ++- ...afetyEnvironmentalInspectorController.java | 6 ++-- .../controller/bus/HiddenController.java | 3 +- .../bus/QualificationsController.java | 6 ++++ .../controller/bus/RiskWarningController.java | 36 +++++++++++-------- .../bus/ShiftWorkRulesController.java | 6 ++++ 8 files changed, 48 insertions(+), 22 deletions(-) diff --git a/src/main/java/com/zcloud/controller/app/AppHiddenController.java b/src/main/java/com/zcloud/controller/app/AppHiddenController.java index 75066dfc..975a422a 100644 --- a/src/main/java/com/zcloud/controller/app/AppHiddenController.java +++ b/src/main/java/com/zcloud/controller/app/AppHiddenController.java @@ -424,7 +424,6 @@ public class AppHiddenController extends BaseController { pd.put("hiddenExamine", JSON.toJSONString(hiddenExamine)); PageData hiddenExaminePageData = new PageData(); hiddenExaminePageData.putAll(before); - if (pd.get("RISKITEM_ID") != null && Tools.notEmpty(pd.get("RISKITEM_ID").toString())) { if ("2".equals(pd.getString("SOURCE"))) { PageData item = new PageData(); 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 b76f7b31..313b6661 100644 --- a/src/main/java/com/zcloud/controller/app/inspection/AppSafetyEnvironmentalController.java +++ b/src/main/java/com/zcloud/controller/app/inspection/AppSafetyEnvironmentalController.java @@ -207,12 +207,13 @@ public class AppSafetyEnvironmentalController extends BaseController { @RequestMapping(value="/explain") //@RequiresPermissions("safetyenvironmental:edit") @ResponseBody - @DockAnnotation + @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(); @@ -222,12 +223,11 @@ public class AppSafetyEnvironmentalController extends BaseController { map.put("msg", "文件格式不正确!"); return map; } - 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); - pd.put("INSPECTION_ORIGINATOR_SIGN_IMG", Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile + "/" + fileName); + strings.add(pd.getString("INSPECTION_ORIGINATOR_SIGN_IMG")+"@@"+fileName); } PageData log = safetyenvironmentalService.explain(pd); pd.put("log",JSON.toJSONString(log)); @@ -235,6 +235,7 @@ public class AppSafetyEnvironmentalController extends BaseController { noticeCorpUtil.FailPleadind(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/app/inspection/AppSafetyEnvironmentalExplainController.java b/src/main/java/com/zcloud/controller/app/inspection/AppSafetyEnvironmentalExplainController.java index 72a1ff3a..65abbd5d 100644 --- a/src/main/java/com/zcloud/controller/app/inspection/AppSafetyEnvironmentalExplainController.java +++ b/src/main/java/com/zcloud/controller/app/inspection/AppSafetyEnvironmentalExplainController.java @@ -80,7 +80,7 @@ public class AppSafetyEnvironmentalExplainController extends BaseController { */ @RequestMapping(value = "/add") @ResponseBody - @DockAnnotation + @DockAnnotation(hasAnnex = true) public Object add(@RequestParam(value = "FFILE", required = false) MultipartFile file) throws Exception { Map map = new HashMap(); String errInfo = "success"; @@ -94,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)) { @@ -106,12 +107,14 @@ 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); } PageData log = safetyenvironmentalexplainService.save(pd); pd.put("logData", log); 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/app/inspection/AppSafetyEnvironmentalInspectorController.java b/src/main/java/com/zcloud/controller/app/inspection/AppSafetyEnvironmentalInspectorController.java index f7c28607..68fd9d36 100644 --- a/src/main/java/com/zcloud/controller/app/inspection/AppSafetyEnvironmentalInspectorController.java +++ b/src/main/java/com/zcloud/controller/app/inspection/AppSafetyEnvironmentalInspectorController.java @@ -65,7 +65,7 @@ public class AppSafetyEnvironmentalInspectorController extends BaseController { */ @RequestMapping(value = "/verify") @ResponseBody - @DockAnnotation + @DockAnnotation(hasAnnex = true) public Object verify(@RequestParam(value = "FFILE", required = false) MultipartFile[] files) throws Exception { Map map = new HashMap(); String errInfo = "success"; @@ -78,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(); @@ -91,14 +92,15 @@ public class AppSafetyEnvironmentalInspectorController 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; } diff --git a/src/main/java/com/zcloud/controller/bus/HiddenController.java b/src/main/java/com/zcloud/controller/bus/HiddenController.java index e8bfe1eb..f711abc0 100644 --- a/src/main/java/com/zcloud/controller/bus/HiddenController.java +++ b/src/main/java/com/zcloud/controller/bus/HiddenController.java @@ -2181,6 +2181,7 @@ public class HiddenController extends BaseController { List deptHeadmanAllList = usersService.listUserBYids(deptHeadmanIds.split(",")); if (deptHeadmanAllList.size() == 0) { map.put("exception", "未查询到管理单位负责人需要重新维护"); + map.put("dockData",JSON.toJSONString(pd)); return map; } else { messageService.sendMessageByParameter("HIDDEN_MAIL_001", "友情提示:有一条隐患需要核实", @@ -2268,7 +2269,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,IMGFILES_ID,pd.getString("HIDDEN_ID"),pd.getString("TYPE")); + Smb.sshSftp(fileTwo, 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 } diff --git a/src/main/java/com/zcloud/controller/bus/QualificationsController.java b/src/main/java/com/zcloud/controller/bus/QualificationsController.java index 7623db9e..0060e5eb 100644 --- a/src/main/java/com/zcloud/controller/bus/QualificationsController.java +++ b/src/main/java/com/zcloud/controller/bus/QualificationsController.java @@ -8,6 +8,8 @@ import java.util.List; import java.util.Map; import java.util.stream.Collectors; +import com.alibaba.fastjson.JSON; +import com.zcloud.aspect.DockAnnotation; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; @@ -48,6 +50,7 @@ public class QualificationsController extends BaseController { @RequestMapping(value="/add") @RequiresPermissions("qualifications:add") @ResponseBody + @DockAnnotation public Object add() throws Exception{ Map map = new HashMap(); String errInfo = "success"; @@ -63,6 +66,7 @@ public class QualificationsController extends BaseController { qualificationsService.save(pd); map.put("pd", pd); map.put("result", errInfo); + map.put("dockData", JSON.toJSONString(pd)); return map; } @@ -73,6 +77,7 @@ public class QualificationsController extends BaseController { @RequestMapping(value="/delete") @RequiresPermissions("qualifications:del") @ResponseBody + @DockAnnotation public Object delete() throws Exception{ Map map = new HashMap(); String errInfo = "success"; @@ -103,6 +108,7 @@ public class QualificationsController extends BaseController { @RequestMapping(value="/edit") @RequiresPermissions("qualifications:edit") @ResponseBody + @DockAnnotation public Object edit() throws Exception{ Map map = new HashMap(); String errInfo = "success"; diff --git a/src/main/java/com/zcloud/controller/bus/RiskWarningController.java b/src/main/java/com/zcloud/controller/bus/RiskWarningController.java index e1e70a74..b9b0bbf5 100644 --- a/src/main/java/com/zcloud/controller/bus/RiskWarningController.java +++ b/src/main/java/com/zcloud/controller/bus/RiskWarningController.java @@ -8,6 +8,8 @@ import java.util.Map; import javax.servlet.http.HttpServletResponse; +import com.alibaba.fastjson.JSON; +import com.zcloud.aspect.DockAnnotation; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; @@ -31,7 +33,7 @@ import com.zcloud.util.Tools; import com.zcloud.entity.PageData; import com.zcloud.service.bus.RiskWarningService; -/** +/** * 说明:风险提示 * 作者:luoxiaobao * 时间:2021-04-27 @@ -40,10 +42,10 @@ import com.zcloud.service.bus.RiskWarningService; @Controller @RequestMapping("/riskwarning") public class RiskWarningController extends BaseController { - + @Autowired private RiskWarningService riskwarningService; - + /**新增 * @param * @throws Exception @@ -51,6 +53,7 @@ public class RiskWarningController extends BaseController { @RequestMapping(value="/add") @RequiresPermissions("riskwarning:add") @ResponseBody + @DockAnnotation(hasAnnex = true) public Object add(@RequestParam(value="FFILE",required=false) MultipartFile file) throws Exception{ Map map = new HashMap(); String errInfo = "success"; @@ -62,7 +65,8 @@ public class RiskWarningController extends BaseController { pd.put("OPERATOR", Jurisdiction.getUsername()); //修改人 pd.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间 pd.put("ISDELETE", "0"); //是否删除 1-是 0-否 - pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); + pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); + 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)) { @@ -80,12 +84,15 @@ public class RiskWarningController extends BaseController { //pd.put("FILESIZE", FileUtil.getFilesize(Const.HTTPFILEURL + Const.FILEPATHFXSST + Jurisdiction.getCORPINFO_ID() + "/" + ffile + "/" + fileName)); //文件大小 pd.put("FILESIZE",size); pd.put("FILEPATH", Const.FILEPATHFXSST + Jurisdiction.getCORPINFO_ID() + "/" + ffile + "/" + fileName); + strings.add(pd.getString("FILEPATH")+"@@"+fileName); } riskwarningService.save(pd); map.put("result", errInfo); + map.put("sendPicturesList", JSON.toJSONString(strings)); + map.put("dockData",JSON.toJSONString(pd)); return map; } - + /**删除 * @param out * @throws Exception @@ -93,6 +100,7 @@ public class RiskWarningController extends BaseController { @RequestMapping(value="/delete") @RequiresPermissions("riskwarning:del") @ResponseBody + @DockAnnotation public Object delete() throws Exception{ Map map = new HashMap(); String errInfo = "success"; @@ -102,7 +110,7 @@ public class RiskWarningController extends BaseController { map.put("result", errInfo); //返回结果 return map; } - + /**修改 * @param * @throws Exception @@ -119,7 +127,7 @@ public class RiskWarningController extends BaseController { map.put("result", errInfo); return map; } - + /**列表 * @param page * @throws Exception @@ -134,7 +142,7 @@ public class RiskWarningController extends BaseController { pd = this.getPageData(); String KEYWORDS = pd.getString("KEYWORDS"); //关键词检索条件 if(Tools.notEmpty(KEYWORDS))pd.put("KEYWORDS", KEYWORDS.trim()); - pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); + pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); page.setPd(pd); List varList = riskwarningService.list(page); //列出RiskWarning列表 map.put("varList", varList); @@ -142,7 +150,7 @@ public class RiskWarningController extends BaseController { map.put("result", errInfo); return map; } - + /**去修改页面获取数据 * @param * @throws Exception @@ -159,8 +167,8 @@ public class RiskWarningController extends BaseController { map.put("pd", pd); map.put("result", errInfo); return map; - } - + } + /**批量删除 * @param * @throws Exception @@ -171,7 +179,7 @@ public class RiskWarningController extends BaseController { public Object deleteAll() throws Exception{ Map map = new HashMap(); String errInfo = "success"; - PageData pd = new PageData(); + PageData pd = new PageData(); pd = this.getPageData(); String DATA_IDS = pd.getString("DATA_IDS"); if(Tools.notEmpty(DATA_IDS)){ @@ -184,7 +192,7 @@ public class RiskWarningController extends BaseController { map.put("result", errInfo); //返回结果 return map; } - + /**下载 * @param * @throws Exception @@ -239,5 +247,5 @@ public class RiskWarningController extends BaseController { mv = new ModelAndView(erv,dataMap); return mv; } - + } diff --git a/src/main/java/com/zcloud/controller/bus/ShiftWorkRulesController.java b/src/main/java/com/zcloud/controller/bus/ShiftWorkRulesController.java index 846ac151..54e27340 100644 --- a/src/main/java/com/zcloud/controller/bus/ShiftWorkRulesController.java +++ b/src/main/java/com/zcloud/controller/bus/ShiftWorkRulesController.java @@ -2,6 +2,7 @@ package com.zcloud.controller.bus; import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONObject; +import com.zcloud.aspect.DockAnnotation; import com.zcloud.controller.base.BaseController; import com.zcloud.entity.Page; import com.zcloud.entity.PageData; @@ -45,6 +46,7 @@ public class ShiftWorkRulesController extends BaseController { @RequestMapping(value="/add") @RequiresPermissions("shiftworkrules:add") @ResponseBody + @DockAnnotation public Object add() throws Exception{ Map map = new HashMap(); String errInfo = "success"; @@ -60,6 +62,7 @@ public class ShiftWorkRulesController extends BaseController { if (Tools.notEmpty(pd.getString("ISCUSTOM")) && "1".equals(pd.getString("ISCUSTOM")) && pd.get("periodList") != null && !pd.get("periodList").equals("")) { List periodList = (List) JSON.parse(pd.get("periodList").toString()); + ArrayList periodLists = new ArrayList<>(); for (int i = 0; i < periodList.size(); i++) { PageData period = new PageData(); period.put("SHIFTWORKPERIOD_ID",this.get32UUID()); @@ -74,11 +77,14 @@ public class ShiftWorkRulesController extends BaseController { period.put("SHIFTWORKRULES_ID", pd.get("SHIFTWORKRULES_ID")); period.put("SORT", i+1); period.put("ISEND", i < periodList.size()-1 ? 0 : 1); + periodLists.add(period); shiftWorkPeriodService.save(period); } + pd.put("periodList",JSON.toJSONString(periodLists)); } shiftworkrulesService.save(pd); map.put("result", errInfo); + map.put("dockData",JSON.toJSONString(pd)); return map; }