From 87aee42fdbaf731e4b6609cc98dd45aadc5ea42e Mon Sep 17 00:00:00 2001 From: dearlin <1261008090@qq.com> Date: Mon, 25 Dec 2023 14:42:45 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=AB=E9=A1=B9=E4=BD=9C=E4=B8=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 1703230140663.jpeg | Bin 0 -> 17018 bytes .../filemanager/MfolderController.java | 16 +- .../gf/AppGFBreakGroundController.java | 2368 +++++++++-------- .../controller/gf/AppGFCutRoadController.java | 2247 ++++++++-------- .../gf/AppGFHighWorkController.java | 52 +- .../keyProjects/OutSourcedController.java | 3 +- 6 files changed, 2442 insertions(+), 2244 deletions(-) create mode 100644 1703230140663.jpeg diff --git a/1703230140663.jpeg b/1703230140663.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..b5afce185f6373e81f62492003057ac8d5e551b8 GIT binary patch literal 17018 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 A*#H0l literal 0 HcmV?d00001 diff --git a/src/main/java/com/zcloud/controller/filemanager/MfolderController.java b/src/main/java/com/zcloud/controller/filemanager/MfolderController.java index 7708001e..34996d7e 100644 --- a/src/main/java/com/zcloud/controller/filemanager/MfolderController.java +++ b/src/main/java/com/zcloud/controller/filemanager/MfolderController.java @@ -52,7 +52,7 @@ public class MfolderController extends BaseController { @RequestMapping(value="/add") @RequiresPermissions("mfolder:add") @ResponseBody - @DockAnnotation(isAdd = true) + @DockAnnotation public Object add() throws Exception{ Map map = new HashMap(); String errInfo = "success"; @@ -80,13 +80,7 @@ public class MfolderController extends BaseController { @RequiresPermissions("mfolder:add") @ResponseBody @DockAnnotation(hasAnnex = true) - public Object add( - @RequestParam(value="FFILE",required=false) MultipartFile file, - @RequestParam(value="NAME",required=false) String NAME, - @RequestParam(value="PARENT_ID",required=false) String PARENT_ID, - @RequestParam(value="REMARKS",required=false) String REMARKS, - @RequestParam(value="SHARE",required=false) String SHARE - ) throws Exception{ + public Object add(@RequestParam(value="FFILE",required=false) MultipartFile file, @RequestParam(value="NAME",required=false) String NAME, @RequestParam(value="PARENT_ID",required=false) String PARENT_ID, @RequestParam(value="REMARKS",required=false) String REMARKS, @RequestParam(value="SHARE",required=false) String SHARE) throws Exception{ Map map = new HashMap(); ArrayList pictureList = new ArrayList<>(); String errInfo = "success"; @@ -100,8 +94,6 @@ public class MfolderController extends BaseController { map.put("msg", "文件格式不正确!"); return map; } -// String filePath = PathUtil.getProjectpath() + Const.FILEPATHFILE + ffile; //文件上传路径 -// fileName = FileUpload.fileUp(file, filePath, this.get32UUID()); //执行上传 Long size = file.getSize()/1024; fileName = this.get32UUID()+file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".")); Smb.sshSftp(file, fileName,Const.FILEPATHFILE + Jurisdiction.getCORPINFO_ID() + "/" + ffile); @@ -117,10 +109,6 @@ public class MfolderController extends BaseController { pd.put("MFOLDER_ID", this.get32UUID()); //主键 pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); //企业 mfolderService.save(pd); //存入数据库表 - //存自己表里的附件 使用文件全路径加文件名的方式 示例 - // /uploadFiles/yhtp/8415df13cc4c46f0ac32f579462dbb8f/20231215/d3bc85d1bbe84b75b1e6e8b6182dc547.jpg - // @@ - // d3bc85d1bbe84b75b1e6e8b6182dc547.jpg pictureList.add(Const.FILEPATHFILE + Jurisdiction.getCORPINFO_ID() + "/" + ffile + "/" + fileName+ "@@" +fileName); diff --git a/src/main/java/com/zcloud/controller/gf/AppGFBreakGroundController.java b/src/main/java/com/zcloud/controller/gf/AppGFBreakGroundController.java index c54e8169..095a708d 100644 --- a/src/main/java/com/zcloud/controller/gf/AppGFBreakGroundController.java +++ b/src/main/java/com/zcloud/controller/gf/AppGFBreakGroundController.java @@ -35,1207 +35,1323 @@ import java.util.*; @RequestMapping("/app/gfBreakGround") public class AppGFBreakGroundController extends BaseController { - @Resource - private GFBreakGroundService GFbreakGroundService; - @Autowired - private GFBreakGroundAcceptUserService breakgroundacceptuserService; - @Resource - private GFBreakGroundLogService GFbreakGroundLogService; - @Resource - private GFBreakGroundToMeasuresService GFbreakGroundToMeasuresService; - @Resource - private SendMessageUtil sendMessageUtil; - @Autowired - private Smb smb; - /**获取编码 - * @param - * @throws Exception - */ - @RequestMapping(value="/getCode") - @ResponseBody + @Resource + private GFBreakGroundService GFbreakGroundService; + @Autowired + private GFBreakGroundAcceptUserService breakgroundacceptuserService; + @Resource + private GFBreakGroundLogService GFbreakGroundLogService; + @Resource + private GFBreakGroundToMeasuresService GFbreakGroundToMeasuresService; + @Resource + private SendMessageUtil sendMessageUtil; + @Autowired + private Smb smb; + + /** + * 获取编码 + * + * @param + * @throws Exception + */ + @RequestMapping(value = "/getCode") + @ResponseBody // @LogAnno(menuType= "手机",menuServer= "动土作业",instructionsOperate = "动土作业",instructionsType = "获取编码") - public Object getCode() throws Exception{ - Map map = new HashMap(); - String errInfo = "success"; - PageData pd = new PageData(); - pd = this.getPageData(); - Calendar calendar = Calendar.getInstance(); - DecimalFormat dft=new DecimalFormat("00"); - int year = calendar.get(Calendar.YEAR); - String month = dft.format(calendar.get(Calendar.MONTH) + 1); - String day = dft.format(calendar.get(Calendar.DAY_OF_MONTH)); - pd.put("CREATDATE",year + "-" + month + "-" + day); - pd = GFbreakGroundService.getCode(pd); //根据ID读取 - String code = "DT"+year + month + day + dft.format((Integer.parseInt(pd.get("code").toString())+1)); - map.put("code", code); - map.put("result", errInfo); - return map; - } + public Object getCode() throws Exception { + Map map = new HashMap(); + String errInfo = "success"; + PageData pd = new PageData(); + pd = this.getPageData(); + Calendar calendar = Calendar.getInstance(); + DecimalFormat dft = new DecimalFormat("00"); + int year = calendar.get(Calendar.YEAR); + String month = dft.format(calendar.get(Calendar.MONTH) + 1); + String day = dft.format(calendar.get(Calendar.DAY_OF_MONTH)); + pd.put("CREATDATE", year + "-" + month + "-" + day); + pd = GFbreakGroundService.getCode(pd); //根据ID读取 + String code = "DT" + year + month + day + dft.format((Integer.parseInt(pd.get("code").toString()) + 1)); + map.put("code", code); + map.put("result", errInfo); + return map; + } - /**新增 - * @param - * @throws Exception - */ - @RequestMapping(value="/add") - @ResponseBody - @Transactional - @DockAnnotation(hasAnnex = true) - public Object add( - @RequestParam(value="FFILE",required=false) MultipartFile[] files - ) throws Exception{ - Map map = new HashMap(); - String errInfo = "success"; - PageData pd = new PageData(); - pd = this.getPageData(); - PageData pd2 = new PageData(); - ArrayList sendPicturesList = new ArrayList<>(); - Calendar calendar = Calendar.getInstance(); - DecimalFormat dft=new DecimalFormat("00"); - int year = calendar.get(Calendar.YEAR); - String month = dft.format(calendar.get(Calendar.MONTH) + 1); - String day = dft.format(calendar.get(Calendar.DAY_OF_MONTH)); - pd2.put("CREATDATE",year + "-" + month + "-" + day); - pd2.put("CORPINFO_ID",pd.get("CORPINFO_ID")); - pd2 = GFbreakGroundService.getCode(pd2); //根据ID读取 - String code = "DT"+year + month + day + dft.format((Integer.parseInt(pd2.get("code").toString())+1)); - pd = this.getPageData(); - pd.put("CHECK_NO", code); - pd.put("BREAKGROUND_ID", this.get32UUID()); //主键 - pd.put("CREATTIME", DateUtil.date2Str(new Date())); //添加时间 - pd.put("ISDELETE", "0"); //是否删除 1-是 0-否 - pd.put("OTHER_PROTECTIVE_MEASURES", (StringUtils.isNotBlank(pd.getString("OTHER_PROTECTIVE_MEASURES")) ? pd.getString("OTHER_PROTECTIVE_MEASURES") : "") + ";_;"); - pd.put("HAZARD_IDENTIFICATION", (StringUtils.isNotBlank(pd.getString("HAZARD_IDENTIFICATION")) ? pd.getString("HAZARD_IDENTIFICATION") : "") + ";_;"); - if (files != null && files.length > 0) { - MultipartFile file = files[0]; - 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); - sendPicturesList.add(Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile + "/" + fileName - +"@@"+fileName - ); - pd.put("APPLY_USER_SIGNER_PATH", Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile + "/" + fileName); - pd.put("APPLY_USER_SIGNER_TIME", pd.get("SIGNER_TIME")); - } - GFbreakGroundService.save(pd); - PageData breakGroundPageData = new PageData(); - PageData breakGroundLogPageData = new PageData(); + /** + * 新增 + * + * @param + * @throws Exception + */ + @RequestMapping(value = "/add") + @ResponseBody + @Transactional + @DockAnnotation(hasAnnex = true) + public Object add( + @RequestParam(value = "FFILE", required = false) MultipartFile[] files + ) throws Exception { + Map map = new HashMap(); + String errInfo = "success"; + PageData pd = new PageData(); + pd = this.getPageData(); + PageData pd2 = new PageData(); + ArrayList sendPicturesList = new ArrayList<>(); + Calendar calendar = Calendar.getInstance(); + DecimalFormat dft = new DecimalFormat("00"); + int year = calendar.get(Calendar.YEAR); + String month = dft.format(calendar.get(Calendar.MONTH) + 1); + String day = dft.format(calendar.get(Calendar.DAY_OF_MONTH)); + pd2.put("CREATDATE", year + "-" + month + "-" + day); + pd2.put("CORPINFO_ID", pd.get("CORPINFO_ID")); + pd2 = GFbreakGroundService.getCode(pd2); //根据ID读取 + String code = "DT" + year + month + day + dft.format((Integer.parseInt(pd2.get("code").toString()) + 1)); + pd = this.getPageData(); + pd.put("CHECK_NO", code); + pd.put("BREAKGROUND_ID", this.get32UUID()); //主键 + pd.put("CREATTIME", DateUtil.date2Str(new Date())); //添加时间 + pd.put("ISDELETE", "0"); //是否删除 1-是 0-否 + pd.put("OTHER_PROTECTIVE_MEASURES", (StringUtils.isNotBlank(pd.getString("OTHER_PROTECTIVE_MEASURES")) ? pd.getString("OTHER_PROTECTIVE_MEASURES") : "") + ";_;"); + pd.put("HAZARD_IDENTIFICATION", (StringUtils.isNotBlank(pd.getString("HAZARD_IDENTIFICATION")) ? pd.getString("HAZARD_IDENTIFICATION") : "") + ";_;"); + if (files != null && files.length > 0) { + MultipartFile file = files[0]; + 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); + sendPicturesList.add(Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile + "/" + fileName + + "@@" + fileName + ); + pd.put("APPLY_USER_SIGNER_PATH", Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile + "/" + fileName); + pd.put("APPLY_USER_SIGNER_TIME", pd.get("SIGNER_TIME")); + } + GFbreakGroundService.save(pd); + PageData breakGroundPageData = new PageData(); + PageData breakGroundLogPageData = new PageData(); - breakGroundPageData.putAll(pd); - if(pd.get("APPLY_STATUS").equals("1")) { - PageData log = new PageData(); - log.put("BREAKGROUNDLOG_ID", this.get32UUID()); - log.put("ACTION", "提交申请"); - log.put("BREAKGROUND_ID", pd.get("BREAKGROUND_ID")); - log.put("CREATOR",pd.get("ACTION_USER")); - log.put("CREATTIME", DateUtil.date2Str(new Date())); - GFbreakGroundLogService.save(log); - breakGroundLogPageData.putAll(log); - List paramsList = new ArrayList(); - // 发短信 - PageData mes = new PageData(); - mes.put("RECEIVER_ID", pd.get("CONSTRUCTION_USER_ID"));// 收信人userid - mes.put("templateCode", "DT_Y01");// 短信模板编码 - mes.put("SMSCode", "SMS_227245922");// 短信模板编码 - mes.put("CORPINFO_ID", pd.get("CORPINFO_ID"));// 企业id - // 参数集合 - // 第1个参数 - PageData params1 = new PageData(); - params1.put("name", "number");// 存入短信模板中的参数名称 - params1.put("value", pd.get("CHECK_NO"));// 存入上面参数名称所传递的值 - paramsList.add(params1); + breakGroundPageData.putAll(pd); + if (pd.get("APPLY_STATUS").equals("1")) { + PageData log = new PageData(); + log.put("BREAKGROUNDLOG_ID", this.get32UUID()); + log.put("ACTION", "提交申请"); + log.put("BREAKGROUND_ID", pd.get("BREAKGROUND_ID")); + log.put("CREATOR", pd.get("ACTION_USER")); + log.put("CREATTIME", DateUtil.date2Str(new Date())); + GFbreakGroundLogService.save(log); + breakGroundLogPageData.putAll(log); + List paramsList = new ArrayList(); + // 发短信 + PageData mes = new PageData(); + mes.put("RECEIVER_ID", pd.get("CONSTRUCTION_USER_ID"));// 收信人userid + mes.put("templateCode", "DT_Y01");// 短信模板编码 + mes.put("SMSCode", "SMS_227245922");// 短信模板编码 + mes.put("CORPINFO_ID", pd.get("CORPINFO_ID"));// 企业id + // 参数集合 + // 第1个参数 + PageData params1 = new PageData(); + params1.put("name", "number");// 存入短信模板中的参数名称 + params1.put("value", pd.get("CHECK_NO"));// 存入上面参数名称所传递的值 + paramsList.add(params1); - // 第2个参数 - PageData params2 = new PageData(); - params2.put("name", "params1");// 存入短信模板中的参数名称 - params2.put("value", "动土作业");// 存入上面参数名称所传递的值 - paramsList.add(params2); - // 第3个参数 - PageData params3 = new PageData(); - params3.put("name", "params2");// 存入短信模板中的参数名称 - params3.put("value", "作业负责单位");// 存入上面参数名称所传递的值 - paramsList.add(params3); - // 第4个参数 - PageData params4 = new PageData(); - params4.put("name", "params3");// 存入短信模板中的参数名称 - params4.put("value", "确认");// 存入上面参数名称所传递的值 - paramsList.add(params4); - sendMessageUtil.sendMessages(mes, paramsList); - } - PageData dockData = new PageData(); - dockData.put("breakGroundPageData",breakGroundPageData); - dockData.put("breakGroundLogPageData",breakGroundLogPageData); - map.put("result", errInfo); - map.put("dockData", JSON.toJSONString(dockData)); - return map; - } - /**修改 - * @param - * @throws Exception - */ - @RequestMapping(value="/editGuardian") - @ResponseBody - @Transactional - public Object editGuardian( - @RequestParam(value="FFILE",required=false) MultipartFile[] files - ) throws Exception{ - Map map = new HashMap(); - String errInfo = "success"; - PageData pd = new PageData(); - pd = this.getPageData(); - PageData pd2 = new PageData(); - pd2 = GFbreakGroundService.findById(pd); - pd2.put("OPERATOR", pd.get("OPERATOR")); //修改人 - pd2.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间 - if (files != null && files.length > 0) { - MultipartFile file = files[0]; + // 第2个参数 + PageData params2 = new PageData(); + params2.put("name", "params1");// 存入短信模板中的参数名称 + params2.put("value", "动土作业");// 存入上面参数名称所传递的值 + paramsList.add(params2); + // 第3个参数 + PageData params3 = new PageData(); + params3.put("name", "params2");// 存入短信模板中的参数名称 + params3.put("value", "作业负责单位");// 存入上面参数名称所传递的值 + paramsList.add(params3); + // 第4个参数 + PageData params4 = new PageData(); + params4.put("name", "params3");// 存入短信模板中的参数名称 + params4.put("value", "确认");// 存入上面参数名称所传递的值 + paramsList.add(params4); + sendMessageUtil.sendMessages(mes, paramsList); + } + PageData dockData = new PageData(); + dockData.put("breakGroundPageData", JSON.toJSONString(breakGroundPageData)); + dockData.put("breakGroundLogPageData", JSON.toJSONString(breakGroundLogPageData)); + map.put("result", errInfo); + map.put("dockData", JSON.toJSONString(dockData)); + map.put("sendPicturesList", JSON.toJSONString(sendPicturesList)); + 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); + /** + * 修改 + * + * @param + * @throws Exception + */ + @RequestMapping(value = "/editGuardian") + @ResponseBody + @Transactional + @DockAnnotation + public Object editGuardian( + @RequestParam(value = "FFILE", required = false) MultipartFile[] files + ) throws Exception { + Map map = new HashMap(); + String errInfo = "success"; + PageData pd = new PageData(); + pd = this.getPageData(); + PageData pd2 = new PageData(); + pd2 = GFbreakGroundService.findById(pd); + pd2.put("OPERATOR", pd.get("OPERATOR")); //修改人 + pd2.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间 + ArrayList sendPicturesList = new ArrayList<>(); + if (files != null && files.length > 0) { + MultipartFile file = files[0]; - pd2.put("GUARDIAN_USER_SIGNER_PATH", Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile + "/" + fileName); - pd2.put("GUARDIAN_USER_SIGNER_TIME", pd.get("SIGNER_TIME")); - GFbreakGroundService.edit(pd2); - } - map.put("result", errInfo); - return map; - } - /**修改 - * @param - * @throws Exception - */ - @RequestMapping(value="/editConfess") - @ResponseBody - @Transactional - public Object editConfess( - @RequestParam(value="FFILE",required=false) MultipartFile[] files - ) throws Exception{ - Map map = new HashMap(); - String errInfo = "success"; - PageData pd = new PageData(); - pd = this.getPageData(); - PageData pd2 = new PageData(); - pd2 = GFbreakGroundService.findById(pd); - pd2.put("OPERATOR", pd.get("OPERATOR")); //修改人 - pd2.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间 - if (files != null && files.length > 0) { - MultipartFile file = files[0]; + 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); + sendPicturesList.add(Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile + "/" + fileName + + "@@" + fileName + ); + pd2.put("GUARDIAN_USER_SIGNER_PATH", Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile + "/" + fileName); + pd2.put("GUARDIAN_USER_SIGNER_TIME", pd.get("SIGNER_TIME")); + GFbreakGroundService.edit(pd2); + } + map.put("result", errInfo); + map.put("dockData", JSON.toJSONString(pd2)); + map.put("sendPicturesList", JSON.toJSONString(sendPicturesList)); + 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); + /** + * 修改 + * + * @param + * @throws Exception + */ + @RequestMapping(value = "/editConfess") + @ResponseBody + @Transactional + @DockAnnotation + public Object editConfess( + @RequestParam(value = "FFILE", required = false) MultipartFile[] files + ) throws Exception { + Map map = new HashMap(); + String errInfo = "success"; + PageData pd = new PageData(); + pd = this.getPageData(); + PageData pd2 = new PageData(); + pd2 = GFbreakGroundService.findById(pd); + pd2.put("OPERATOR", pd.get("OPERATOR")); //修改人 + pd2.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间 + ArrayList sendPicturesList = new ArrayList<>(); - pd2.put("CONFESS_USER_SIGNER_PATH", Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile + "/" + fileName); - pd2.put("CONFESS_USER_SIGNER_TIME", pd.get("SIGNER_TIME")); - GFbreakGroundService.edit(pd2); - } - map.put("result", errInfo); - return map; - } - /**修改 - * @param - * @throws Exception - */ - @RequestMapping(value="/editAcceptconfess") - @ResponseBody - @Transactional - public Object editAcceptconfess(MultipartRequest request) throws Exception { - Map map = new HashMap(); - String errInfo = "success"; - PageData pd = new PageData(); - pd = this.getPageData(); - PageData pd2 = new PageData(); - pd2 = GFbreakGroundService.findById(pd); - pd2.put("OPERATOR", pd.get("OPERATOR")); //修改人 - pd2.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间 - List fileList = new ArrayList(); - String signertime = ""; - String SIGNTIME[] = pd.getString("SIGNTIME").split(","); + if (files != null && files.length > 0) { + MultipartFile file = files[0]; - for (int i = 0; i < SIGNTIME.length; i++) { - signertime = SIGNTIME[i]; - fileList.add(request.getFile("file"+i)); - MultipartFile[] fileArr = new MultipartFile[fileList.size()]; - saveImg(fileList.toArray(fileArr),signertime,pd.getString("BREAKGROUND_ID"),pd.getString("CORPINFO_ID"),pd.getString("ACCEPT_CONFESS_USER_ID"),pd.getString("ACCEPT_CONFESS_DEPARTMENT_ID")); - fileList.clear(); - } - map.put("result", errInfo); - return map; - } - private void saveImg(MultipartFile[] files,String signertime, String BREAKGROUND_ID, String CORPINFO_ID, String ACCEPT_CONFESS_USER_ID, String ACCEPT_CONFESS_DEPARTMENT_ID) throws Exception{ - if (files != null && files.length > 0) { - for (int i = 0; i < files.length; i++) { - PageData pd = new PageData(); - pd = this.getPageData(); - MultipartFile file = files[i]; - String ffile = DateUtil.getDays(); - String fileName = this.get32UUID()+file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".")); - smb.sshSftp(file, fileName,Const.FILEPATHFILE + CORPINFO_ID + "/" + ffile); - pd.put("ACCEPT_CONFESS_USER_SIGNER_TIME", signertime); - pd.put("ACCEPT_CONFESS_ID", this.get32UUID()); - pd.put("OPERATOR", pd.get("OPERATOR")); //修改人 - pd.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间 - pd.put("ACCEPT_CONFESS_USER_SIGNER_PATH", Const.FILEPATHFILE + CORPINFO_ID + "/" + ffile + "/" + fileName); - pd.put("ISDELETE", '0'); - pd.put("CORPINFO_ID", CORPINFO_ID); - pd.put("BREAKGROUND_ID", BREAKGROUND_ID); - pd.put("ACCEPT_CONFESS_USER_ID", ACCEPT_CONFESS_USER_ID); - pd.put("ACCEPT_CONFESS_DEPARTMENT_ID", ACCEPT_CONFESS_DEPARTMENT_ID); - pd.put("ACCEPT_USER_ID",""); - pd.put("ACCEPT_DEPARTMENT_ID", ""); - breakgroundacceptuserService.save(pd); - } - } - } + 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); + sendPicturesList.add(Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile + "/" + fileName + + "@@" + fileName + ); + pd2.put("CONFESS_USER_SIGNER_PATH", Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile + "/" + fileName); + pd2.put("CONFESS_USER_SIGNER_TIME", pd.get("SIGNER_TIME")); + GFbreakGroundService.edit(pd2); + } + map.put("result", errInfo); + map.put("dockData", JSON.toJSONString(pd2)); + map.put("sendPicturesList", JSON.toJSONString(sendPicturesList)); + return map; + } - /**上传图 - * @param - * @throws Exception - */ - @RequestMapping(value="/uploadImg") - @ResponseBody - @Transactional - public Object uploadImg( - @RequestParam(value="FFILE",required=false) MultipartFile[] files - ) throws Exception{ - Map map = new HashMap(); - String errInfo = "success"; - PageData pd = new PageData(); - pd = this.getPageData(); - if (files != null && files.length > 0) { - MultipartFile file = files[0]; + /** + * 修改 + * + * @param + * @throws Exception + */ + @RequestMapping(value = "/editAcceptconfess") + @ResponseBody + @Transactional + @DockAnnotation + public Object editAcceptconfess(MultipartRequest request) throws Exception { + Map map = new HashMap(); + String errInfo = "success"; + PageData pd = new PageData(); + pd = this.getPageData(); + PageData pd2 = new PageData(); + pd2 = GFbreakGroundService.findById(pd); + pd2.put("OPERATOR", pd.get("OPERATOR")); //修改人 + pd2.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间 + List fileList = new ArrayList(); + String signertime = ""; + String SIGNTIME[] = pd.getString("SIGNTIME").split(","); + PageData dockData = new PageData(); + ArrayList dataArrayList = new ArrayList<>(); + for (int i = 0; i < SIGNTIME.length; i++) { + signertime = SIGNTIME[i]; + fileList.add(request.getFile("file" + i)); + MultipartFile[] fileArr = new MultipartFile[fileList.size()]; + PageData item = saveImg(fileList.toArray(fileArr), signertime, pd.getString("BREAKGROUND_ID"), pd.getString("CORPINFO_ID"), pd.getString("ACCEPT_CONFESS_USER_ID"), pd.getString("ACCEPT_CONFESS_DEPARTMENT_ID")); + dataArrayList.add(item); + fileList.clear(); + } + dockData.put("data", JSON.toJSONString(dataArrayList)); + map.put("result", errInfo); + map.put("dockData", JSON.toJSONString(dockData)); + 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); + private PageData saveImg(MultipartFile[] files, String signertime, String BREAKGROUND_ID, String CORPINFO_ID, String ACCEPT_CONFESS_USER_ID, String ACCEPT_CONFESS_DEPARTMENT_ID) throws Exception { + if (files != null && files.length > 0) { + PageData dockData = new PageData(); + ArrayList dataArrayList = new ArrayList<>(); + ArrayList sendPicturesList = new ArrayList<>(); + for (int i = 0; i < files.length; i++) { + PageData pd = this.getPageData(); + MultipartFile file = files[i]; + String ffile = DateUtil.getDays(); + String fileName = this.get32UUID() + file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".")); + smb.sshSftp(file, fileName, Const.FILEPATHFILE + CORPINFO_ID + "/" + ffile); + sendPicturesList.add(Const.FILEPATHFILE + CORPINFO_ID + "/" + ffile + "/" + fileName + + "@@" + fileName + ); + pd.put("ACCEPT_CONFESS_USER_SIGNER_TIME", signertime); + pd.put("ACCEPT_CONFESS_ID", this.get32UUID()); + pd.put("OPERATOR", pd.get("OPERATOR")); //修改人 + pd.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间 + pd.put("ACCEPT_CONFESS_USER_SIGNER_PATH", Const.FILEPATHFILE + CORPINFO_ID + "/" + ffile + "/" + fileName); + pd.put("ISDELETE", '0'); + pd.put("CORPINFO_ID", CORPINFO_ID); + pd.put("BREAKGROUND_ID", BREAKGROUND_ID); + pd.put("ACCEPT_CONFESS_USER_ID", ACCEPT_CONFESS_USER_ID); + pd.put("ACCEPT_CONFESS_DEPARTMENT_ID", ACCEPT_CONFESS_DEPARTMENT_ID); + pd.put("ACCEPT_USER_ID", ""); + pd.put("ACCEPT_DEPARTMENT_ID", ""); + dataArrayList.add(pd); + breakgroundacceptuserService.save(pd); + } + dockData.put("dataArrayList", JSON.toJSONString(dataArrayList)); + dockData.put("sendPicturesList", JSON.toJSONString(sendPicturesList)); + return dockData; + } + return null; + } - map.put("path", Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile + "/" + fileName); - } + /** + * 上传图 + * + * @param + * @throws Exception + */ + @RequestMapping(value = "/uploadImg") + @ResponseBody + @Transactional + public Object uploadImg( + @RequestParam(value = "FFILE", required = false) MultipartFile[] files + ) throws Exception { + Map map = new HashMap(); + String errInfo = "success"; + PageData pd = new PageData(); + pd = this.getPageData(); + if (files != null && files.length > 0) { + MultipartFile file = files[0]; - map.put("result", errInfo); - 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); - /**删除图 - * @param - * @throws Exception - */ - @RequestMapping(value="/deleteImg") - @ResponseBody - @Transactional - public Object deleteImg() throws Exception{ - Map map = new HashMap(); - String errInfo = "success"; - PageData pd = new PageData(); - pd = this.getPageData(); - smb.deleteFile(pd.getString("path")); - map.put("result", errInfo); - return map; - } + map.put("path", Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile + "/" + fileName); + } + + map.put("result", errInfo); + return map; + } + + /** + * 删除图 + * + * @param + * @throws Exception + */ + @RequestMapping(value = "/deleteImg") + @ResponseBody + @Transactional + public Object deleteImg() throws Exception { + Map map = new HashMap(); + String errInfo = "success"; + PageData pd = new PageData(); + pd = this.getPageData(); + smb.deleteFile(pd.getString("path")); + map.put("result", errInfo); + return map; + } - /**删除 - * @param - * @throws Exception - */ - @RequestMapping(value="/delete") - @ResponseBody - public Object delete() throws Exception{ - Map map = new HashMap(); - String errInfo = "success"; - PageData pd = new PageData(); - pd = this.getPageData(); - GFbreakGroundService.delete(pd); - map.put("result", errInfo); //返回结果 - return map; - } + /** + * 删除 + * + * @param + * @throws Exception + */ + @RequestMapping(value = "/delete") + @ResponseBody + @DockAnnotation + public Object delete() throws Exception { + Map map = new HashMap(); + String errInfo = "success"; + PageData pd = new PageData(); + pd = this.getPageData(); + GFbreakGroundService.delete(pd); + map.put("result", errInfo); //返回结果 + map.put("dockData", JSON.toJSONString(pd)); //返回结果 + return map; + } - /**修改 - * @param - * @throws Exception - */ - @RequestMapping(value="/edit") - @ResponseBody - @Transactional - public Object edit( - @RequestParam(value="FFILE",required=false) MultipartFile[] files - ) throws Exception{ - Map map = new HashMap(); - String errInfo = "success"; - PageData pd = new PageData(); - pd = this.getPageData(); - pd.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间 - pd.put("OTHER_PROTECTIVE_MEASURES", (StringUtils.isNotBlank(pd.getString("OTHER_PROTECTIVE_MEASURES")) ? pd.getString("OTHER_PROTECTIVE_MEASURES") : "") + ";_;"); - pd.put("HAZARD_IDENTIFICATION", (StringUtils.isNotBlank(pd.getString("HAZARD_IDENTIFICATION")) ? pd.getString("HAZARD_IDENTIFICATION") : "") + ";_;"); - if (files != null && files.length > 0) { - MultipartFile file = files[0]; + /** + * 修改 + * + * @param + * @throws Exception + */ + @RequestMapping(value = "/edit") + @ResponseBody + @Transactional + @DockAnnotation(hasAnnex = true) + public Object edit( + @RequestParam(value = "FFILE", required = false) MultipartFile[] files + ) throws Exception { + Map map = new HashMap(); + String errInfo = "success"; + PageData pd = new PageData(); + pd = this.getPageData(); + ArrayList sendPicturesList = new ArrayList<>(); + pd.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间 + pd.put("OTHER_PROTECTIVE_MEASURES", (StringUtils.isNotBlank(pd.getString("OTHER_PROTECTIVE_MEASURES")) ? pd.getString("OTHER_PROTECTIVE_MEASURES") : "") + ";_;"); + pd.put("HAZARD_IDENTIFICATION", (StringUtils.isNotBlank(pd.getString("HAZARD_IDENTIFICATION")) ? pd.getString("HAZARD_IDENTIFICATION") : "") + ";_;"); + if (files != null && files.length > 0) { + MultipartFile file = files[0]; + 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("APPLY_USER_SIGNER_PATH", Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile + "/" + fileName); + sendPicturesList.add(Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile + "/" + fileName + "@@" + fileName); + pd.put("APPLY_USER_SIGNER_TIME", pd.get("SIGNER_TIME")); + } + PageData breakGroundEditData = new PageData(); + PageData breakGroundlogData = new PageData(); + ArrayList measuresList = new ArrayList<>(); + GFbreakGroundService.edit(pd); + GFbreakGroundToMeasuresService.delete(pd); + breakGroundEditData.putAll(pd); + if (pd.get("measuresList") != null) { + List list = (List) JSON.parse(pd.get("measuresList").toString()); + for (JSONObject json : list) { + PageData measures = new PageData(); + measures.put("BREAKGROUNDTOMEASURES_ID", this.get32UUID()); // 主键 + measures.put("BREAKGROUND_ID", pd.get("BREAKGROUND_ID")); + measures.put("BUS_BREAKGROUND_MEASURES_ID", json.get("BUS_BREAKGROUND_MEASURES_ID")); + measures.put("STATUS", json.get("STATUS")); + measures.put("ANSWER", json.get("ANSWER")); + measures.put("CONFIRM_ID", pd.get("OPERATOR")); + measures.put("CONFIRM_NAME", pd.get("ACTION_USER")); + GFbreakGroundToMeasuresService.save(measures); + measuresList.add(measures); + } + } + if (!pd.get("APPLY_STATUS").equals("0")) { + PageData log = new PageData(); + log.put("BREAKGROUNDLOG_ID", this.get32UUID()); + log.put("ACTION", "修改申请,重新提交"); + log.put("BREAKGROUND_ID", pd.get("BREAKGROUND_ID")); + log.put("CREATOR", pd.get("ACTION_USER")); + log.put("CREATTIME", DateUtil.date2Str(new Date())); + GFbreakGroundLogService.save(log); + breakGroundlogData.putAll(log); - 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); + // 发短信 + PageData mes = new PageData(); + mes.put("RECEIVER_ID", pd.get("CONSTRUCTION_USER_ID"));// 收信人userid + mes.put("templateCode", "DT_Y01");// 短信模板编码 + mes.put("SMSCode", "SMS_227245922");// 短信模板编码 + mes.put("CORPINFO_ID", pd.get("CORPINFO_ID"));// 企业id + // 参数集合 + List paramsList = new ArrayList(); + // 第1个参数 + PageData params1 = new PageData(); + params1.put("name", "number");// 存入短信模板中的参数名称 + params1.put("value", pd.get("CHECK_NO"));// 存入上面参数名称所传递的值 + paramsList.add(params1); - pd.put("APPLY_USER_SIGNER_PATH", Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile + "/" + fileName); - pd.put("APPLY_USER_SIGNER_TIME", pd.get("SIGNER_TIME")); - } - GFbreakGroundService.edit(pd); + // 第2个参数 + PageData params2 = new PageData(); + params2.put("name", "params1");// 存入短信模板中的参数名称 + params2.put("value", "动土作业");// 存入上面参数名称所传递的值 + paramsList.add(params2); + // 第3个参数 + PageData params3 = new PageData(); + params3.put("name", "params2");// 存入短信模板中的参数名称 + params3.put("value", "作业负责单位");// 存入上面参数名称所传递的值 + paramsList.add(params3); + // 第4个参数 + PageData params4 = new PageData(); + params4.put("name", "params3");// 存入短信模板中的参数名称 + params4.put("value", "确认");// 存入上面参数名称所传递的值 + paramsList.add(params4); + sendMessageUtil.sendMessages(mes, paramsList); + } + PageData dockData = new PageData(); + dockData.put("breakGroundEditData", JSON.toJSONString(breakGroundEditData)); + dockData.put("breakGroundlogData", JSON.toJSONString(breakGroundlogData)); + map.put("result", errInfo); + map.put("dockData", JSON.toJSONString(dockData)); + map.put("sendPicturesList", JSON.toJSONString(sendPicturesList)); + return map; + } - GFbreakGroundToMeasuresService.delete(pd); - if(pd.get("measuresList")!=null){ - List list = (List) JSON.parse(pd.get("measuresList").toString()); - for (JSONObject json : list) { - PageData measures = new PageData(); - measures.put("BREAKGROUNDTOMEASURES_ID", this.get32UUID()); // 主键 - measures.put("BREAKGROUND_ID", pd.get("BREAKGROUND_ID")); - measures.put("BUS_BREAKGROUND_MEASURES_ID", json.get("BUS_BREAKGROUND_MEASURES_ID")); - measures.put("STATUS", json.get("STATUS")); - measures.put("ANSWER", json.get("ANSWER")); - measures.put("CONFIRM_ID", pd.get("OPERATOR")); - measures.put("CONFIRM_NAME", pd.get("ACTION_USER")); - GFbreakGroundToMeasuresService.save(measures); - } - } - if(!pd.get("APPLY_STATUS").equals("0")) { - PageData log = new PageData(); - log.put("BREAKGROUNDLOG_ID", this.get32UUID()); - log.put("ACTION", "修改申请,重新提交"); - log.put("BREAKGROUND_ID", pd.get("BREAKGROUND_ID")); - log.put("CREATOR",pd.get("ACTION_USER")); - log.put("CREATTIME", DateUtil.date2Str(new Date())); - GFbreakGroundLogService.save(log); + /** + * 修改 + * + * @param + * @throws Exception + */ + @RequestMapping(value = "/editAcceptStatus") + @ResponseBody + @Transactional + @DockAnnotation + public Object editAcceptStatus(MultipartRequest request) throws Exception { + Map map = new HashMap(); + String errInfo = "success"; + PageData pd = new PageData(); + pd = this.getPageData(); + PageData pd2 = new PageData(); + pd2 = GFbreakGroundService.findById(pd); + pd2.put("OPERATOR", pd.get("OPERATOR")); //修改人 + pd2.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间 - - // 发短信 - PageData mes = new PageData(); - mes.put("RECEIVER_ID", pd.get("CONSTRUCTION_USER_ID"));// 收信人userid - mes.put("templateCode", "DT_Y01");// 短信模板编码 - mes.put("SMSCode", "SMS_227245922");// 短信模板编码 - mes.put("CORPINFO_ID", pd.get("CORPINFO_ID"));// 企业id - // 参数集合 - List paramsList = new ArrayList(); - // 第1个参数 - PageData params1 = new PageData(); - params1.put("name", "number");// 存入短信模板中的参数名称 - params1.put("value", pd.get("CHECK_NO"));// 存入上面参数名称所传递的值 - paramsList.add(params1); - - // 第2个参数 - PageData params2 = new PageData(); - params2.put("name", "params1");// 存入短信模板中的参数名称 - params2.put("value", "动土作业");// 存入上面参数名称所传递的值 - paramsList.add(params2); - // 第3个参数 - PageData params3 = new PageData(); - params3.put("name", "params2");// 存入短信模板中的参数名称 - params3.put("value", "作业负责单位");// 存入上面参数名称所传递的值 - paramsList.add(params3); - // 第4个参数 - PageData params4 = new PageData(); - params4.put("name", "params3");// 存入短信模板中的参数名称 - params4.put("value", "确认");// 存入上面参数名称所传递的值 - paramsList.add(params4); - sendMessageUtil.sendMessages(mes, paramsList); - } - map.put("result", errInfo); - return map; - } - - /**修改 - * @param - * @throws Exception - */ - @RequestMapping(value="/editAcceptStatus") - @ResponseBody - @Transactional - public Object editAcceptStatus(MultipartRequest request) throws Exception{ - Map map = new HashMap(); - String errInfo = "success"; - PageData pd = new PageData(); - pd = this.getPageData(); - PageData pd2 = new PageData(); - pd2 = GFbreakGroundService.findById(pd); - pd2.put("OPERATOR", pd.get("OPERATOR")); //修改人 - pd2.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间 - - PageData log = new PageData(); - log.put("BREAKGROUNDLOG_ID", this.get32UUID()); + PageData log = new PageData(); + log.put("BREAKGROUNDLOG_ID", this.get32UUID()); // log.put("ACTION", "审核打回"); - log.put("BREAKGROUND_ID", pd.get("BREAKGROUND_ID")); - log.put("CREATOR",pd.get("ACTION_USER")); - log.put("CREATTIME", DateUtil.date2Str(new Date())); + log.put("BREAKGROUND_ID", pd.get("BREAKGROUND_ID")); + log.put("CREATOR", pd.get("ACTION_USER")); + log.put("CREATTIME", DateUtil.date2Str(new Date())); + String status = pd.get("STATUS").toString(); + String OTHER_PROTECTIVE_MEASURES = (StringUtils.isNotBlank(pd2.getString("OTHER_PROTECTIVE_MEASURES")) ? pd2.getString("OTHER_PROTECTIVE_MEASURES") : "") + + (StringUtils.isNotBlank(pd.getString("OTHER_PROTECTIVE_MEASURES")) ? (pd.getString("OTHER_PROTECTIVE_MEASURES") + ";_;") : ";_;"); + String HAZARD_IDENTIFICATION = (StringUtils.isNotBlank(pd2.getString("HAZARD_IDENTIFICATION")) ? pd2.getString("HAZARD_IDENTIFICATION") : "") + + (StringUtils.isNotBlank(pd.getString("HAZARD_IDENTIFICATION")) ? (pd.getString("HAZARD_IDENTIFICATION") + ";_;") : ";_;"); + //打回清空数据 + pd2.put("OTHER_PROTECTIVE_MEASURES", ""); + pd2.put("HAZARD_IDENTIFICATION", ""); + ArrayList sendPicturesList = new ArrayList<>(); + ArrayList saveAcceptUserList = new ArrayList<>(); + switch (status) { - String status = pd.get("STATUS").toString(); - String OTHER_PROTECTIVE_MEASURES = (StringUtils.isNotBlank(pd2.getString("OTHER_PROTECTIVE_MEASURES")) ? pd2.getString("OTHER_PROTECTIVE_MEASURES") : "") + - (StringUtils.isNotBlank(pd.getString("OTHER_PROTECTIVE_MEASURES")) ? (pd.getString("OTHER_PROTECTIVE_MEASURES") + ";_;") : ";_;"); - String HAZARD_IDENTIFICATION = (StringUtils.isNotBlank(pd2.getString("HAZARD_IDENTIFICATION")) ? pd2.getString("HAZARD_IDENTIFICATION") : "") + - (StringUtils.isNotBlank(pd.getString("HAZARD_IDENTIFICATION")) ? (pd.getString("HAZARD_IDENTIFICATION") + ";_;") : ";_;"); - //打回清空数据 - pd2.put("OTHER_PROTECTIVE_MEASURES", ""); - pd2.put("HAZARD_IDENTIFICATION", ""); - switch (status) { + case "6"://验收人 + List fileList = new ArrayList(); + String signertime = ""; + String SIGNTIME[] = pd.getString("SIGNTIME").split(","); - case "6"://验收人 - List fileList = new ArrayList(); - String signertime = ""; - String SIGNTIME[] = pd.getString("SIGNTIME").split(","); - - for (int i = 0; i < SIGNTIME.length; i++) { - signertime = SIGNTIME[i]; - fileList.add(request.getFile("file"+i)); - MultipartFile[] fileArr = new MultipartFile[fileList.size()]; - saveAcceptImg(fileList.toArray(fileArr),signertime,pd.getString("BREAKGROUND_ID"),pd.getString("CORPINFO_ID"),pd.getString("ACCEPT_USER_ID"),pd.getString("ACCEPT_DEPARTMENT_ID")); - fileList.clear(); - } - pd2.put("ACCEPT_CONTENT", pd.get("CONTENT")); - pd2.put("OTHER_PROTECTIVE_MEASURES", OTHER_PROTECTIVE_MEASURES); - pd2.put("HAZARD_IDENTIFICATION", HAZARD_IDENTIFICATION); - pd2.put("APPLY_STATUS", pd.get("APPLY_STATUS")); - GFbreakGroundService.edit(pd2); - log.put("ACTION", "验收通过"); + for (int i = 0; i < SIGNTIME.length; i++) { + signertime = SIGNTIME[i]; + fileList.add(request.getFile("file" + i)); + MultipartFile[] fileArr = new MultipartFile[fileList.size()]; + saveAcceptImg(sendPicturesList,saveAcceptUserList,fileList.toArray(fileArr), signertime, pd.getString("BREAKGROUND_ID"), pd.getString("CORPINFO_ID"), pd.getString("ACCEPT_USER_ID"), pd.getString("ACCEPT_DEPARTMENT_ID")); + fileList.clear(); + } + pd2.put("ACCEPT_CONTENT", pd.get("CONTENT")); + pd2.put("OTHER_PROTECTIVE_MEASURES", OTHER_PROTECTIVE_MEASURES); + pd2.put("HAZARD_IDENTIFICATION", HAZARD_IDENTIFICATION); + pd2.put("APPLY_STATUS", pd.get("APPLY_STATUS")); + GFbreakGroundService.edit(pd2); + log.put("ACTION", "验收通过"); - // 发短信 - this.switchMessages(pd.get("APPLY_STATUS").toString(),pd2); - break; + // 发短信 + this.switchMessages(pd.get("APPLY_STATUS").toString(), pd2); + break; - case "-6"://审批打回 - log.put("ACTION", "验收人打回"); - pd2.put("APPLY_STATUS", pd.get("APPLY_STATUS")); - pd2.put("ACCEPT_CONTENT", pd.get("CONTENT")); - GFbreakGroundService.edit(pd2); - // 发短信 - this.switchMessages(pd.get("APPLY_STATUS").toString(),pd2); - break; - default: - break; - } - GFbreakGroundLogService.save(log); - map.put("result", errInfo); - return map; - } - private void saveAcceptImg(MultipartFile[] files,String signertime, String BREAKGROUND_ID, String CORPINFO_ID, String ACCEPT_USER_ID, String ACCEPT_DEPARTMENT_ID) throws Exception{ - if (files != null && files.length > 0) { - for (int i = 0; i < files.length; i++) { - PageData cpd = new PageData(); - cpd = this.getPageData(); - MultipartFile file = files[i]; - String ffile = DateUtil.getDays(); - String fileName = this.get32UUID()+file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".")); - smb.sshSftp(file, fileName,Const.FILEPATHFILE + CORPINFO_ID + "/" + ffile); - cpd.put("ACCEPT_USER_SIGNER_TIME", signertime); - cpd.put("ACCEPT_CONFESS_ID", this.get32UUID()); - cpd.put("OPERATOR", cpd.get("OPERATOR")); //修改人 - cpd.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间 - cpd.put("ACCEPT_USER_SIGNER_PATH", Const.FILEPATHFILE + CORPINFO_ID + "/" + ffile + "/" + fileName); - cpd.put("ISDELETE", '0'); - cpd.put("CORPINFO_ID", CORPINFO_ID); - cpd.put("BREAKGROUND_ID", BREAKGROUND_ID); - cpd.put("ACCEPT_USER_ID", ACCEPT_USER_ID); - cpd.put("ACCEPT_CONFESS_DEPARTMENT_ID", ""); - cpd.put("ACCEPT_CONFESS_USER_ID", ""); - cpd.put("ACCEPT_DEPARTMENT_ID", ACCEPT_DEPARTMENT_ID); - breakgroundacceptuserService.save(cpd); - } - } - } + case "-6"://审批打回 + log.put("ACTION", "验收人打回"); + pd2.put("APPLY_STATUS", pd.get("APPLY_STATUS")); + pd2.put("ACCEPT_CONTENT", pd.get("CONTENT")); + GFbreakGroundService.edit(pd2); + // 发短信 + this.switchMessages(pd.get("APPLY_STATUS").toString(), pd2); + break; + default: + break; + } + PageData dockData = new PageData(); + dockData.put("saveAcceptUserList", JSON.toJSONString(saveAcceptUserList)); + GFbreakGroundLogService.save(log); + dockData.put("logData", JSON.toJSONString(log)); + dockData.put("STATUS", status); + dockData.put("editData", JSON.toJSONString(pd2)); + map.put("sendPicturesList", JSON.toJSONString(sendPicturesList)); + map.put("dockData", JSON.toJSONString(dockData)); + map.put("result", errInfo); + return map; + } - /**修改 - * @param - * @throws Exception - */ - @RequestMapping(value="/editStatus") - @ResponseBody - @Transactional - public Object editStatus( - @RequestParam(value="FFILE",required=false) MultipartFile[] files - ) throws Exception{ - Map map = new HashMap(); - String errInfo = "success"; - PageData pd = new PageData(); - pd = this.getPageData(); - PageData pd2 = new PageData(); - pd2 = GFbreakGroundService.findById(pd); - pd2.put("OPERATOR", pd.get("OPERATOR")); //修改人 - pd2.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间 + private void saveAcceptImg(List sendPicturesList,List saveAcceptUserList,MultipartFile[] files, String signertime, String BREAKGROUND_ID, String CORPINFO_ID, String ACCEPT_USER_ID, String ACCEPT_DEPARTMENT_ID) throws Exception { + if (files != null && files.length > 0) { + for (int i = 0; i < files.length; i++) { + PageData cpd = new PageData(); + cpd = this.getPageData(); + MultipartFile file = files[i]; + String ffile = DateUtil.getDays(); + String fileName = this.get32UUID() + file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".")); + smb.sshSftp(file, fileName, Const.FILEPATHFILE + CORPINFO_ID + "/" + ffile); + sendPicturesList.add(Const.FILEPATHFILE + CORPINFO_ID + "/" + ffile + "/" + fileName+ + "@@"+fileName); + cpd.put("ACCEPT_USER_SIGNER_TIME", signertime); + cpd.put("ACCEPT_CONFESS_ID", this.get32UUID()); + cpd.put("OPERATOR", cpd.get("OPERATOR")); //修改人 + cpd.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间 + cpd.put("ACCEPT_USER_SIGNER_PATH", Const.FILEPATHFILE + CORPINFO_ID + "/" + ffile + "/" + fileName); + cpd.put("ISDELETE", '0'); + cpd.put("CORPINFO_ID", CORPINFO_ID); + cpd.put("BREAKGROUND_ID", BREAKGROUND_ID); + cpd.put("ACCEPT_USER_ID", ACCEPT_USER_ID); + cpd.put("ACCEPT_CONFESS_DEPARTMENT_ID", ""); + cpd.put("ACCEPT_CONFESS_USER_ID", ""); + cpd.put("ACCEPT_DEPARTMENT_ID", ACCEPT_DEPARTMENT_ID); + breakgroundacceptuserService.save(cpd); + saveAcceptUserList.add(cpd); + } + } + } - PageData log = new PageData(); - log.put("BREAKGROUNDLOG_ID", this.get32UUID()); + /** + * 修改 + * + * @param + * @throws Exception + */ + @RequestMapping(value = "/editStatus") + @ResponseBody + @Transactional + @DockAnnotation(hasAnnex = true) + public Object editStatus( + @RequestParam(value = "FFILE", required = false) MultipartFile[] files + ) throws Exception { + Map map = new HashMap(); + String errInfo = "success"; + PageData pd = new PageData(); + pd = this.getPageData(); + PageData pd2 = new PageData(); + pd2 = GFbreakGroundService.findById(pd); + pd2.put("OPERATOR", pd.get("OPERATOR")); //修改人 + pd2.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间 + ArrayList sendPicturesList = new ArrayList<>(); + ArrayList toMeasuresList = new ArrayList<>(); + PageData log = new PageData(); + log.put("BREAKGROUNDLOG_ID", this.get32UUID()); // log.put("ACTION", "审核打回"); - log.put("BREAKGROUND_ID", pd.get("BREAKGROUND_ID")); - log.put("CREATOR",pd.get("ACTION_USER")); - log.put("CREATTIME", DateUtil.date2Str(new Date())); + log.put("BREAKGROUND_ID", pd.get("BREAKGROUND_ID")); + log.put("CREATOR", pd.get("ACTION_USER")); + log.put("CREATTIME", DateUtil.date2Str(new Date())); - String status = pd.get("STATUS").toString(); - String OTHER_PROTECTIVE_MEASURES = (StringUtils.isNotBlank(pd2.getString("OTHER_PROTECTIVE_MEASURES")) ? pd2.getString("OTHER_PROTECTIVE_MEASURES") : "") + - (StringUtils.isNotBlank(pd.getString("OTHER_PROTECTIVE_MEASURES")) ? (pd.getString("OTHER_PROTECTIVE_MEASURES") + ";_;") : ";_;"); - String HAZARD_IDENTIFICATION = (StringUtils.isNotBlank(pd2.getString("HAZARD_IDENTIFICATION")) ? pd2.getString("HAZARD_IDENTIFICATION") : "") + - (StringUtils.isNotBlank(pd.getString("HAZARD_IDENTIFICATION")) ? (pd.getString("HAZARD_IDENTIFICATION") + ";_;") : ";_;"); - //打回清空数据 - pd2.put("OTHER_PROTECTIVE_MEASURES", ""); - pd2.put("HAZARD_IDENTIFICATION", ""); - switch (status) { - case "2"://作业负责单位 - if (files != null && files.length > 0) { - MultipartFile file = files[0]; + String status = pd.get("STATUS").toString(); + String OTHER_PROTECTIVE_MEASURES = (StringUtils.isNotBlank(pd2.getString("OTHER_PROTECTIVE_MEASURES")) ? pd2.getString("OTHER_PROTECTIVE_MEASURES") : "") + + (StringUtils.isNotBlank(pd.getString("OTHER_PROTECTIVE_MEASURES")) ? (pd.getString("OTHER_PROTECTIVE_MEASURES") + ";_;") : ";_;"); + String HAZARD_IDENTIFICATION = (StringUtils.isNotBlank(pd2.getString("HAZARD_IDENTIFICATION")) ? pd2.getString("HAZARD_IDENTIFICATION") : "") + + (StringUtils.isNotBlank(pd.getString("HAZARD_IDENTIFICATION")) ? (pd.getString("HAZARD_IDENTIFICATION") + ";_;") : ";_;"); + //打回清空数据 + pd2.put("OTHER_PROTECTIVE_MEASURES", ""); + pd2.put("HAZARD_IDENTIFICATION", ""); + switch (status) { + case "2"://作业负责单位 + if (files != null && files.length > 0) { + MultipartFile file = files[0]; - 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); + 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); + sendPicturesList.add(Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile + "/" + fileName + "@@" + fileName); + pd2.put("CONSTRUCTION_USER_SIGNER_PATH", Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile + "/" + fileName); + pd2.put("CONSTRUCTION_USER_SIGNER_TIME", pd.get("SIGNER_TIME")); + pd2.put("CONSTRUCTION_CONTENT", pd.get("CONTENT")); + if (pd2.get("PRODUCTION_USER_ID") == null || StringUtils.isBlank(pd2.getString("PRODUCTION_USER_ID"))) { + OTHER_PROTECTIVE_MEASURES += ";_;"; + HAZARD_IDENTIFICATION += ";_;"; + if (pd2.get("SAFETY_USER_ID") == null || StringUtils.isBlank(pd2.getString("SAFETY_USER_ID"))) { + OTHER_PROTECTIVE_MEASURES += ";_;"; + HAZARD_IDENTIFICATION += ";_;"; + if (pd2.get("LEADER_USER_ID") == null || StringUtils.isBlank(pd2.getString("LEADER_USER_ID"))) { + OTHER_PROTECTIVE_MEASURES += ";_;"; + HAZARD_IDENTIFICATION += ";_;"; + } + } + } + pd2.put("OTHER_PROTECTIVE_MEASURES", OTHER_PROTECTIVE_MEASURES); + pd2.put("HAZARD_IDENTIFICATION", HAZARD_IDENTIFICATION); + pd2.put("APPLY_STATUS", pd.get("APPLY_STATUS")); + GFbreakGroundService.edit(pd2); + log.put("ACTION", "作业负责单位通过"); + GFbreakGroundToMeasuresService.delete(pd); + if (pd.get("measuresList") != null) { + List list = (List) JSON.parse(pd.get("measuresList").toString()); + for (JSONObject json : list) { + PageData measures = new PageData(); + measures.put("BREAKGROUNDTOMEASURES_ID", this.get32UUID()); // 主键 + measures.put("BREAKGROUND_ID", pd.get("BREAKGROUND_ID")); + measures.put("BUS_BREAKGROUND_MEASURES_ID", json.get("BUS_BREAKGROUND_MEASURES_ID")); + measures.put("STATUS", json.get("STATUS")); + measures.put("ANSWER", json.get("ANSWER")); + measures.put("CONFIRM_ID", pd.get("OPERATOR")); + measures.put("CONFIRM_NAME", pd.get("ACTION_USER")); + GFbreakGroundToMeasuresService.save(measures); + toMeasuresList.add(measures); + } + } + // 发短信 + this.switchMessages(pd.get("APPLY_STATUS").toString(), pd2); + } + break; - pd2.put("CONSTRUCTION_USER_SIGNER_PATH", Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile + "/" + fileName); - pd2.put("CONSTRUCTION_USER_SIGNER_TIME", pd.get("SIGNER_TIME")); - pd2.put("CONSTRUCTION_CONTENT", pd.get("CONTENT")); - if (pd2.get("PRODUCTION_USER_ID") == null || StringUtils.isBlank(pd2.getString("PRODUCTION_USER_ID"))) { - OTHER_PROTECTIVE_MEASURES += ";_;"; - HAZARD_IDENTIFICATION += ";_;"; - if (pd2.get("SAFETY_USER_ID") == null || StringUtils.isBlank(pd2.getString("SAFETY_USER_ID"))) { - OTHER_PROTECTIVE_MEASURES += ";_;"; - HAZARD_IDENTIFICATION += ";_;"; - if (pd2.get("LEADER_USER_ID") == null || StringUtils.isBlank(pd2.getString("LEADER_USER_ID"))) { - OTHER_PROTECTIVE_MEASURES += ";_;"; - HAZARD_IDENTIFICATION += ";_;"; - } - } - } - pd2.put("OTHER_PROTECTIVE_MEASURES", OTHER_PROTECTIVE_MEASURES); - pd2.put("HAZARD_IDENTIFICATION", HAZARD_IDENTIFICATION); - pd2.put("APPLY_STATUS", pd.get("APPLY_STATUS")); - GFbreakGroundService.edit(pd2); - log.put("ACTION", "作业负责单位通过"); - GFbreakGroundToMeasuresService.delete(pd); - if(pd.get("measuresList")!=null){ - List list = (List) JSON.parse(pd.get("measuresList").toString()); - for (JSONObject json : list) { - PageData measures = new PageData(); - measures.put("BREAKGROUNDTOMEASURES_ID", this.get32UUID()); // 主键 - measures.put("BREAKGROUND_ID", pd.get("BREAKGROUND_ID")); - measures.put("BUS_BREAKGROUND_MEASURES_ID", json.get("BUS_BREAKGROUND_MEASURES_ID")); - measures.put("STATUS", json.get("STATUS")); - measures.put("ANSWER", json.get("ANSWER")); - measures.put("CONFIRM_ID", pd.get("OPERATOR")); - measures.put("CONFIRM_NAME", pd.get("ACTION_USER")); - GFbreakGroundToMeasuresService.save(measures); - } - } - // 发短信 - this.switchMessages(pd.get("APPLY_STATUS").toString(),pd2); - } - break; - - case "3"://所在单位 - if (files != null && files.length > 0) { - MultipartFile file = files[0]; + case "3"://所在单位 + if (files != null && files.length > 0) { + MultipartFile file = files[0]; // 保存文件 - 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); + 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); + sendPicturesList.add(Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile + "/" + fileName + "@@" + fileName); - pd2.put("PRODUCTION_USER_SIGNER_PATH", Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile + "/" + fileName); - pd2.put("PRODUCTION_USER_SIGNER_TIME", pd.get("SIGNER_TIME")); - pd2.put("PRODUCTION_CONTENT", pd.get("CONTENT")); - if (pd2.get("SAFETY_USER_ID") == null || StringUtils.isBlank(pd2.getString("SAFETY_USER_ID"))) { - OTHER_PROTECTIVE_MEASURES += ";_;"; - HAZARD_IDENTIFICATION += ";_;"; - if (pd2.get("LEADER_USER_ID") == null || StringUtils.isBlank(pd2.getString("LEADER_USER_ID"))) { - OTHER_PROTECTIVE_MEASURES += ";_;"; - HAZARD_IDENTIFICATION += ";_;"; - } - } - pd2.put("OTHER_PROTECTIVE_MEASURES", OTHER_PROTECTIVE_MEASURES); - pd2.put("HAZARD_IDENTIFICATION", HAZARD_IDENTIFICATION); - pd2.put("APPLY_STATUS", pd.get("APPLY_STATUS")); - GFbreakGroundService.edit(pd2); - log.put("ACTION", "所在单位通过"); + pd2.put("PRODUCTION_USER_SIGNER_PATH", Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile + "/" + fileName); + pd2.put("PRODUCTION_USER_SIGNER_TIME", pd.get("SIGNER_TIME")); + pd2.put("PRODUCTION_CONTENT", pd.get("CONTENT")); + if (pd2.get("SAFETY_USER_ID") == null || StringUtils.isBlank(pd2.getString("SAFETY_USER_ID"))) { + OTHER_PROTECTIVE_MEASURES += ";_;"; + HAZARD_IDENTIFICATION += ";_;"; + if (pd2.get("LEADER_USER_ID") == null || StringUtils.isBlank(pd2.getString("LEADER_USER_ID"))) { + OTHER_PROTECTIVE_MEASURES += ";_;"; + HAZARD_IDENTIFICATION += ";_;"; + } + } + pd2.put("OTHER_PROTECTIVE_MEASURES", OTHER_PROTECTIVE_MEASURES); + pd2.put("HAZARD_IDENTIFICATION", HAZARD_IDENTIFICATION); + pd2.put("APPLY_STATUS", pd.get("APPLY_STATUS")); + GFbreakGroundService.edit(pd2); + log.put("ACTION", "所在单位通过"); - // 发短信 - this.switchMessages(pd.get("APPLY_STATUS").toString(),pd2); - } - break; + // 发短信 + this.switchMessages(pd.get("APPLY_STATUS").toString(), pd2); + } + break; - case "4"://安全部门 - if (files != null && files.length > 0) { - MultipartFile file = files[0]; + case "4"://安全部门 + if (files != null && files.length > 0) { + MultipartFile file = files[0]; - 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); + 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); + sendPicturesList.add(Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile + "/" + fileName + "@@" + fileName); - pd2.put("SAFETY_USER_SIGNER_PATH", Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile + "/" + fileName); - pd2.put("SAFETY_USER_SIGNER_TIME", pd.get("SIGNER_TIME")); - pd2.put("SAFETY_CONTENT", pd.get("CONTENT")); - if (pd2.get("LEADER_USER_ID") == null || StringUtils.isBlank(pd2.getString("LEADER_USER_ID"))) { - OTHER_PROTECTIVE_MEASURES += ";_;"; - HAZARD_IDENTIFICATION += ";_;"; - } - pd2.put("OTHER_PROTECTIVE_MEASURES", OTHER_PROTECTIVE_MEASURES); - pd2.put("HAZARD_IDENTIFICATION", HAZARD_IDENTIFICATION); - pd2.put("APPLY_STATUS", pd.get("APPLY_STATUS")); - GFbreakGroundService.edit(pd2); - log.put("ACTION", "安全部门通过"); + pd2.put("SAFETY_USER_SIGNER_PATH", Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile + "/" + fileName); + pd2.put("SAFETY_USER_SIGNER_TIME", pd.get("SIGNER_TIME")); + pd2.put("SAFETY_CONTENT", pd.get("CONTENT")); + if (pd2.get("LEADER_USER_ID") == null || StringUtils.isBlank(pd2.getString("LEADER_USER_ID"))) { + OTHER_PROTECTIVE_MEASURES += ";_;"; + HAZARD_IDENTIFICATION += ";_;"; + } + pd2.put("OTHER_PROTECTIVE_MEASURES", OTHER_PROTECTIVE_MEASURES); + pd2.put("HAZARD_IDENTIFICATION", HAZARD_IDENTIFICATION); + pd2.put("APPLY_STATUS", pd.get("APPLY_STATUS")); + GFbreakGroundService.edit(pd2); + log.put("ACTION", "安全部门通过"); - // 发短信 - this.switchMessages(pd.get("APPLY_STATUS").toString(),pd2); - } - break; + // 发短信 + this.switchMessages(pd.get("APPLY_STATUS").toString(), pd2); + } + break; - case "5"://审批部门 - if (files != null && files.length > 0) { - MultipartFile file = files[0]; + case "5"://审批部门 + if (files != null && files.length > 0) { + MultipartFile file = files[0]; - 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); + 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); + sendPicturesList.add(Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile + "/" + fileName + "@@" + fileName); - pd2.put("LEADER_USER_SIGNER_PATH", Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile + "/" + fileName); - pd2.put("LEADER_USER_SIGNER_TIME", pd.get("SIGNER_TIME")); - pd2.put("LEADER_CONTENT", pd.get("CONTENT")); - pd2.put("OTHER_PROTECTIVE_MEASURES", OTHER_PROTECTIVE_MEASURES); - pd2.put("HAZARD_IDENTIFICATION", HAZARD_IDENTIFICATION); - pd2.put("APPLY_STATUS", pd.get("APPLY_STATUS")); - GFbreakGroundService.edit(pd2); - log.put("ACTION", "审批部门通过"); + pd2.put("LEADER_USER_SIGNER_PATH", Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile + "/" + fileName); + pd2.put("LEADER_USER_SIGNER_TIME", pd.get("SIGNER_TIME")); + pd2.put("LEADER_CONTENT", pd.get("CONTENT")); + pd2.put("OTHER_PROTECTIVE_MEASURES", OTHER_PROTECTIVE_MEASURES); + pd2.put("HAZARD_IDENTIFICATION", HAZARD_IDENTIFICATION); + pd2.put("APPLY_STATUS", pd.get("APPLY_STATUS")); + GFbreakGroundService.edit(pd2); + log.put("ACTION", "审批部门通过"); - // 发短信 - this.switchMessages(pd.get("APPLY_STATUS").toString(),pd2); - } - break; + // 发短信 + this.switchMessages(pd.get("APPLY_STATUS").toString(), pd2); + } + break; - case "6"://验收人 - if (files != null && files.length > 0) { - MultipartFile file = files[0]; + case "6"://验收人 + if (files != null && files.length > 0) { + MultipartFile file = files[0]; - 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); + 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); + sendPicturesList.add(Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile + "/" + fileName + "@@" + fileName); - pd2.put("ACCEPT_USER_SIGNER_PATH", Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile + "/" + fileName); - pd2.put("ACCEPT_USER_SIGNER_TIME", pd.get("SIGNER_TIME")); - pd2.put("ACCEPT_CONTENT", pd.get("CONTENT")); - pd2.put("OTHER_PROTECTIVE_MEASURES", OTHER_PROTECTIVE_MEASURES); - pd2.put("HAZARD_IDENTIFICATION", HAZARD_IDENTIFICATION); - pd2.put("APPLY_STATUS", pd.get("APPLY_STATUS")); - GFbreakGroundService.edit(pd2); - log.put("ACTION", "验收通过"); + pd2.put("ACCEPT_USER_SIGNER_PATH", Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile + "/" + fileName); + pd2.put("ACCEPT_USER_SIGNER_TIME", pd.get("SIGNER_TIME")); + pd2.put("ACCEPT_CONTENT", pd.get("CONTENT")); + pd2.put("OTHER_PROTECTIVE_MEASURES", OTHER_PROTECTIVE_MEASURES); + pd2.put("HAZARD_IDENTIFICATION", HAZARD_IDENTIFICATION); + pd2.put("APPLY_STATUS", pd.get("APPLY_STATUS")); + GFbreakGroundService.edit(pd2); + log.put("ACTION", "验收通过"); - // 发短信 - this.switchMessages(pd.get("APPLY_STATUS").toString(),pd2); - } - break; - case "-2"://作业负责单位 - log.put("ACTION", "作业负责单位打回"); - pd2.put("APPLY_STATUS", pd.get("APPLY_STATUS")); - pd2.put("CONSTRUCTION_CONTENT", pd.get("CONTENT")); - GFbreakGroundService.edit(pd2); + // 发短信 + this.switchMessages(pd.get("APPLY_STATUS").toString(), pd2); + } + break; + case "-2"://作业负责单位 + log.put("ACTION", "作业负责单位打回"); + pd2.put("APPLY_STATUS", pd.get("APPLY_STATUS")); + pd2.put("CONSTRUCTION_CONTENT", pd.get("CONTENT")); + GFbreakGroundService.edit(pd2); - // 发短信 - this.switchMessages(pd.get("APPLY_STATUS").toString(),pd2); - break; - case "-3"://所在单位打回 - log.put("ACTION", "所在单位打回"); - pd2.put("APPLY_STATUS", pd.get("APPLY_STATUS")); - pd2.put("PRODUCTION_CONTENT", pd.get("CONTENT")); - GFbreakGroundService.edit(pd2); + // 发短信 + this.switchMessages(pd.get("APPLY_STATUS").toString(), pd2); + break; + case "-3"://所在单位打回 + log.put("ACTION", "所在单位打回"); + pd2.put("APPLY_STATUS", pd.get("APPLY_STATUS")); + pd2.put("PRODUCTION_CONTENT", pd.get("CONTENT")); + GFbreakGroundService.edit(pd2); - // 发短信 - this.switchMessages(pd.get("APPLY_STATUS").toString(),pd2); - break; - case "-4"://安全部门打回 - log.put("ACTION", "安全部门打回"); - pd2.put("APPLY_STATUS", pd.get("APPLY_STATUS")); - pd2.put("SAFETY_CONTENT", pd.get("CONTENT")); - GFbreakGroundService.edit(pd2); + // 发短信 + this.switchMessages(pd.get("APPLY_STATUS").toString(), pd2); + break; + case "-4"://安全部门打回 + log.put("ACTION", "安全部门打回"); + pd2.put("APPLY_STATUS", pd.get("APPLY_STATUS")); + pd2.put("SAFETY_CONTENT", pd.get("CONTENT")); + GFbreakGroundService.edit(pd2); - // 发短信 - this.switchMessages(pd.get("APPLY_STATUS").toString(),pd2); - break; - case "-5"://审批打回 - log.put("ACTION", "审批部门打回"); - pd2.put("APPLY_STATUS", pd.get("APPLY_STATUS")); - pd2.put("LEADER_CONTENT", pd.get("CONTENT")); - GFbreakGroundService.edit(pd2); + // 发短信 + this.switchMessages(pd.get("APPLY_STATUS").toString(), pd2); + break; + case "-5"://审批打回 + log.put("ACTION", "审批部门打回"); + pd2.put("APPLY_STATUS", pd.get("APPLY_STATUS")); + pd2.put("LEADER_CONTENT", pd.get("CONTENT")); + GFbreakGroundService.edit(pd2); - // 发短信 - this.switchMessages(pd.get("APPLY_STATUS").toString(),pd2); - break; - case "-6"://审批打回 - log.put("ACTION", "验收人打回"); - pd2.put("APPLY_STATUS", pd.get("APPLY_STATUS")); - pd2.put("ACCEPT_CONTENT", pd.get("CONTENT")); - GFbreakGroundService.edit(pd2); - // 发短信 - this.switchMessages(pd.get("APPLY_STATUS").toString(),pd2); - break; - default: - break; - } - GFbreakGroundLogService.save(log); - map.put("result", errInfo); - return map; - } - /**列表 - * @param page - * @throws Exception - */ - @RequestMapping(value="/jhlist") - @ResponseBody - public Object jhlist(Page page) throws Exception{ - Map map = new HashMap(); - String errInfo = "success"; - PageData pd = new PageData(); - pd = this.getPageData(); - String KEYWORDS = pd.getString("KEYWORDS"); //关键词检索条件 - if(Tools.notEmpty(KEYWORDS))pd.put("KEYWORDS", KEYWORDS.trim()); - page.setPd(pd); - List varList = GFbreakGroundService.jhlist(page); //列出confinedspace列表 - map.put("varList", varList); - map.put("page", page); - map.put("result", errInfo); - return map; - } - /**列表 - * @param page - * @throws Exception - */ - @RequestMapping(value="/aqlist") - @ResponseBody - public Object aqlist(Page page) throws Exception{ - Map map = new HashMap(); - String errInfo = "success"; - PageData pd = new PageData(); - pd = this.getPageData(); - String KEYWORDS = pd.getString("KEYWORDS"); //关键词检索条件 - if(Tools.notEmpty(KEYWORDS))pd.put("KEYWORDS", KEYWORDS.trim()); - page.setPd(pd); - List varList = GFbreakGroundService.aqlist(page); //列出confinedspace列表 - map.put("varList", varList); - map.put("page", page); - map.put("result", errInfo); - return map; - } - /**列表 - * @param page - * @throws Exception - */ - @RequestMapping(value="/jslist") - @ResponseBody - public Object jslist(Page page) throws Exception{ - Map map = new HashMap(); - String errInfo = "success"; - PageData pd = new PageData(); - pd = this.getPageData(); - String KEYWORDS = pd.getString("KEYWORDS"); //关键词检索条件 - if(Tools.notEmpty(KEYWORDS))pd.put("KEYWORDS", KEYWORDS.trim()); - page.setPd(pd); - List varList = GFbreakGroundService.jslist(page); //列出confinedspace列表 - map.put("varList", varList); - map.put("page", page); - map.put("result", errInfo); - return map; - } - /**列表 - * @param page - * @throws Exception - */ - @RequestMapping(value="/list") - @ResponseBody - public Object list(Page page) throws Exception{ - Map map = new HashMap(); - String errInfo = "success"; - PageData pd = new PageData(); - pd = this.getPageData(); - String KEYWORDS = pd.getString("KEYWORDS"); //关键词检索条件 - if(Tools.notEmpty(KEYWORDS))pd.put("KEYWORDS", KEYWORDS.trim()); - page.setPd(pd); - List varList = GFbreakGroundService.list(page); //列出BreakGround列表 - map.put("varList", varList); - map.put("page", page); - map.put("result", errInfo); - return map; - } + // 发短信 + this.switchMessages(pd.get("APPLY_STATUS").toString(), pd2); + break; + case "-6"://审批打回 + log.put("ACTION", "验收人打回"); + pd2.put("APPLY_STATUS", pd.get("APPLY_STATUS")); + pd2.put("ACCEPT_CONTENT", pd.get("CONTENT")); + GFbreakGroundService.edit(pd2); + // 发短信 + this.switchMessages(pd.get("APPLY_STATUS").toString(), pd2); + break; + default: + break; + } + GFbreakGroundLogService.save(log); + PageData dockData = new PageData(); + dockData.put("logData",JSON.toJSONString(log)); + dockData.put("STATUS",status); + dockData.put("saveData",JSON.toJSONString(pd2)); + dockData.put("requestData",JSON.toJSONString(pd)); + dockData.put("toMeasuresList",JSON.toJSONString(toMeasuresList)); + map.put("result", errInfo); + map.put("dockData", JSON.toJSONString(dockData)); + return map; + } - /**去修改页面获取数据 - * @param - * @throws Exception - */ - @RequestMapping(value="/goAdd") - @ResponseBody - public Object goAdd() throws Exception{ - Map map = new HashMap(); - String errInfo = "success"; - PageData pd = new PageData(); - map.put("measuresList", GFbreakGroundService.listAllMeasures(pd)); - map.put("result", errInfo); - return map; - } + /** + * 列表 + * + * @param page + * @throws Exception + */ + @RequestMapping(value = "/jhlist") + @ResponseBody + public Object jhlist(Page page) throws Exception { + Map map = new HashMap(); + String errInfo = "success"; + PageData pd = new PageData(); + pd = this.getPageData(); + String KEYWORDS = pd.getString("KEYWORDS"); //关键词检索条件 + if (Tools.notEmpty(KEYWORDS)) pd.put("KEYWORDS", KEYWORDS.trim()); + page.setPd(pd); + List varList = GFbreakGroundService.jhlist(page); //列出confinedspace列表 + map.put("varList", varList); + map.put("page", page); + map.put("result", errInfo); + return map; + } - /**去修改页面获取数据 - * @param - * @throws Exception - */ - @RequestMapping(value="/goEdit") - @ResponseBody - public Object goEdit() throws Exception{ - Map map = new HashMap(); - String errInfo = "success"; - PageData pd = new PageData(); - pd = this.getPageData(); - pd = GFbreakGroundService.findById(pd); //根据ID读取 - map.put("pd", pd); - map.put("measuresList", GFbreakGroundService.listAllMeasures(pd)); - map.put("imgList1",breakgroundacceptuserService.findById(pd)); - map.put("imgList",breakgroundacceptuserService.findByIds(pd)); - map.put("result", errInfo); - return map; - } + /** + * 列表 + * + * @param page + * @throws Exception + */ + @RequestMapping(value = "/aqlist") + @ResponseBody + public Object aqlist(Page page) throws Exception { + Map map = new HashMap(); + String errInfo = "success"; + PageData pd = new PageData(); + pd = this.getPageData(); + String KEYWORDS = pd.getString("KEYWORDS"); //关键词检索条件 + if (Tools.notEmpty(KEYWORDS)) pd.put("KEYWORDS", KEYWORDS.trim()); + page.setPd(pd); + List varList = GFbreakGroundService.aqlist(page); //列出confinedspace列表 + map.put("varList", varList); + map.put("page", page); + map.put("result", errInfo); + return map; + } - /**批量删除 - * @param - * @throws Exception - */ - @RequestMapping(value="/deleteAll") - @ResponseBody - public Object deleteAll() throws Exception{ - Map map = new HashMap(); - String errInfo = "success"; - PageData pd = new PageData(); - pd = this.getPageData(); - String DATA_IDS = pd.getString("DATA_IDS"); - if(Tools.notEmpty(DATA_IDS)){ - String ArrayDATA_IDS[] = DATA_IDS.split(","); - GFbreakGroundService.deleteAll(ArrayDATA_IDS); - errInfo = "success"; - }else{ - errInfo = "error"; - } - map.put("result", errInfo); //返回结果 - return map; - } + /** + * 列表 + * + * @param page + * @throws Exception + */ + @RequestMapping(value = "/jslist") + @ResponseBody + public Object jslist(Page page) throws Exception { + Map map = new HashMap(); + String errInfo = "success"; + PageData pd = new PageData(); + pd = this.getPageData(); + String KEYWORDS = pd.getString("KEYWORDS"); //关键词检索条件 + if (Tools.notEmpty(KEYWORDS)) pd.put("KEYWORDS", KEYWORDS.trim()); + page.setPd(pd); + List varList = GFbreakGroundService.jslist(page); //列出confinedspace列表 + map.put("varList", varList); + map.put("page", page); + map.put("result", errInfo); + return map; + } - /** - * 选择短信模板 - * @param appStatus 阶段 - * @param pd2 参数集合 - * @throws Exception - */ - private void switchMessages(String appStatus, PageData pd2) throws Exception { - PageData mes = new PageData(); - List paramsList = new ArrayList(); - PageData params1 = new PageData(); - PageData params2 = new PageData(); - PageData params3 = new PageData(); - PageData params4 = new PageData(); - switch (appStatus) { - case "2"://作业负责单位 - System.out.println(pd2.get("APPLY_STATUS")); - if("2".equals(pd2.get("APPLY_STATUS"))){ - mes.put("RECEIVER_ID", pd2.get("PRODUCTION_USER_ID"));// 收信人userid - mes.put("templateCode", "DT_Y02");// 短信模板编码 - mes.put("SMSCode", "SMS_227245922");// 短信模板编码 - mes.put("CORPINFO_ID", pd2.get("CORPINFO_ID"));// 企业id - }else if("3".equals(pd2.get("APPLY_STATUS"))){ - mes.put("RECEIVER_ID", pd2.get("SAFETY_USER_ID"));// 收信人userid - mes.put("templateCode", "DT_Y03");// 短信模板编码 - mes.put("SMSCode", "SMS_227245922");// 短信模板编码 - mes.put("CORPINFO_ID", pd2.get("CORPINFO_ID"));// 企业id - }else if("4".equals(pd2.get("APPLY_STATUS"))){ - mes.put("RECEIVER_ID", pd2.get("LEADER_USER_ID"));// 收信人userid - mes.put("templateCode", "DT_Y04");// 短信模板编码 - mes.put("SMSCode", "SMS_227245922");// 短信模板编码 - mes.put("CORPINFO_ID", pd2.get("CORPINFO_ID"));// 企业id - }else if("5".equals(pd2.get("APPLY_STATUS"))){ - mes.put("RECEIVER_ID", pd2.get("ACCEPT_USER_ID"));// 收信人userid - mes.put("templateCode", "DT_Y05");// 短信模板编码 - mes.put("SMSCode", "SMS_227245922");// 短信模板编码 - mes.put("CORPINFO_ID", pd2.get("CORPINFO_ID"));// 企业id - }else if("6".equals(pd2.get("APPLY_STATUS"))){ - mes.put("RECEIVER_ID", pd2.get("APPLY_USER_ID"));// 收信人userid - mes.put("templateCode", "DT_Y06");// 短信模板编码 - mes.put("SMSCode", "SMS_227250920");// 短信模板编码 - mes.put("CORPINFO_ID", pd2.get("CORPINFO_ID"));// 企业id - } - // 发短信 + /** + * 列表 + * + * @param page + * @throws Exception + */ + @RequestMapping(value = "/list") + @ResponseBody + public Object list(Page page) throws Exception { + Map map = new HashMap(); + String errInfo = "success"; + PageData pd = new PageData(); + pd = this.getPageData(); + String KEYWORDS = pd.getString("KEYWORDS"); //关键词检索条件 + if (Tools.notEmpty(KEYWORDS)) pd.put("KEYWORDS", KEYWORDS.trim()); + page.setPd(pd); + List varList = GFbreakGroundService.list(page); //列出BreakGround列表 + map.put("varList", varList); + map.put("page", page); + map.put("result", errInfo); + return map; + } + + /** + * 去修改页面获取数据 + * + * @param + * @throws Exception + */ + @RequestMapping(value = "/goAdd") + @ResponseBody + public Object goAdd() throws Exception { + Map map = new HashMap(); + String errInfo = "success"; + PageData pd = new PageData(); + map.put("measuresList", GFbreakGroundService.listAllMeasures(pd)); + map.put("result", errInfo); + return map; + } + + /** + * 去修改页面获取数据 + * + * @param + * @throws Exception + */ + @RequestMapping(value = "/goEdit") + @ResponseBody + public Object goEdit() throws Exception { + Map map = new HashMap(); + String errInfo = "success"; + PageData pd = new PageData(); + pd = this.getPageData(); + pd = GFbreakGroundService.findById(pd); //根据ID读取 + map.put("pd", pd); + map.put("measuresList", GFbreakGroundService.listAllMeasures(pd)); + map.put("imgList1", breakgroundacceptuserService.findById(pd)); + map.put("imgList", breakgroundacceptuserService.findByIds(pd)); + map.put("result", errInfo); + return map; + } + + /** + * 批量删除 + * + * @param + * @throws Exception + */ + @RequestMapping(value = "/deleteAll") + @ResponseBody + public Object deleteAll() throws Exception { + Map map = new HashMap(); + String errInfo = "success"; + PageData pd = new PageData(); + pd = this.getPageData(); + String DATA_IDS = pd.getString("DATA_IDS"); + if (Tools.notEmpty(DATA_IDS)) { + String ArrayDATA_IDS[] = DATA_IDS.split(","); + GFbreakGroundService.deleteAll(ArrayDATA_IDS); + errInfo = "success"; + } else { + errInfo = "error"; + } + map.put("result", errInfo); //返回结果 + return map; + } + + /** + * 选择短信模板 + * + * @param appStatus 阶段 + * @param pd2 参数集合 + * @throws Exception + */ + private void switchMessages(String appStatus, PageData pd2) throws Exception { + PageData mes = new PageData(); + List paramsList = new ArrayList(); + PageData params1 = new PageData(); + PageData params2 = new PageData(); + PageData params3 = new PageData(); + PageData params4 = new PageData(); + switch (appStatus) { + case "2"://作业负责单位 + System.out.println(pd2.get("APPLY_STATUS")); + if ("2".equals(pd2.get("APPLY_STATUS"))) { + mes.put("RECEIVER_ID", pd2.get("PRODUCTION_USER_ID"));// 收信人userid + mes.put("templateCode", "DT_Y02");// 短信模板编码 + mes.put("SMSCode", "SMS_227245922");// 短信模板编码 + mes.put("CORPINFO_ID", pd2.get("CORPINFO_ID"));// 企业id + } else if ("3".equals(pd2.get("APPLY_STATUS"))) { + mes.put("RECEIVER_ID", pd2.get("SAFETY_USER_ID"));// 收信人userid + mes.put("templateCode", "DT_Y03");// 短信模板编码 + mes.put("SMSCode", "SMS_227245922");// 短信模板编码 + mes.put("CORPINFO_ID", pd2.get("CORPINFO_ID"));// 企业id + } else if ("4".equals(pd2.get("APPLY_STATUS"))) { + mes.put("RECEIVER_ID", pd2.get("LEADER_USER_ID"));// 收信人userid + mes.put("templateCode", "DT_Y04");// 短信模板编码 + mes.put("SMSCode", "SMS_227245922");// 短信模板编码 + mes.put("CORPINFO_ID", pd2.get("CORPINFO_ID"));// 企业id + } else if ("5".equals(pd2.get("APPLY_STATUS"))) { + mes.put("RECEIVER_ID", pd2.get("ACCEPT_USER_ID"));// 收信人userid + mes.put("templateCode", "DT_Y05");// 短信模板编码 + mes.put("SMSCode", "SMS_227245922");// 短信模板编码 + mes.put("CORPINFO_ID", pd2.get("CORPINFO_ID"));// 企业id + } else if ("6".equals(pd2.get("APPLY_STATUS"))) { + mes.put("RECEIVER_ID", pd2.get("APPLY_USER_ID"));// 收信人userid + mes.put("templateCode", "DT_Y06");// 短信模板编码 + mes.put("SMSCode", "SMS_227250920");// 短信模板编码 + mes.put("CORPINFO_ID", pd2.get("CORPINFO_ID"));// 企业id + } + // 发短信 - // 第1个参数 - params1.put("name", "number");// 存入短信模板中的参数名称 - params1.put("value", pd2.get("CHECK_NO"));// 存入上面参数名称所传递的值 - paramsList.add(params1); + // 第1个参数 + params1.put("name", "number");// 存入短信模板中的参数名称 + params1.put("value", pd2.get("CHECK_NO"));// 存入上面参数名称所传递的值 + paramsList.add(params1); - // 第2个参数 - params2.put("name", "params1");// 存入短信模板中的参数名称 - params2.put("value", "动土作业");// 存入上面参数名称所传递的值 - paramsList.add(params2); - // 第3个参数 - params3.put("name", "params2");// 存入短信模板中的参数名称 - params3.put("value", "所在单位");// 存入上面参数名称所传递的值 - paramsList.add(params3); - // 第4个参数 - params4.put("name", "params3");// 存入短信模板中的参数名称 - params4.put("value", "审核");// 存入上面参数名称所传递的值 - paramsList.add(params4); - sendMessageUtil.sendMessages(mes, paramsList); - break; + // 第2个参数 + params2.put("name", "params1");// 存入短信模板中的参数名称 + params2.put("value", "动土作业");// 存入上面参数名称所传递的值 + paramsList.add(params2); + // 第3个参数 + params3.put("name", "params2");// 存入短信模板中的参数名称 + params3.put("value", "所在单位");// 存入上面参数名称所传递的值 + paramsList.add(params3); + // 第4个参数 + params4.put("name", "params3");// 存入短信模板中的参数名称 + params4.put("value", "审核");// 存入上面参数名称所传递的值 + paramsList.add(params4); + sendMessageUtil.sendMessages(mes, paramsList); + break; - case "3"://所在单位 - System.out.println(pd2.get("APPLY_STATUS")); - if("3".equals(pd2.get("APPLY_STATUS"))){ - mes.put("RECEIVER_ID", pd2.get("SAFETY_USER_ID"));// 收信人userid - mes.put("templateCode", "DT_Y03");// 短信模板编码 - mes.put("SMSCode", "SMS_227245922");// 短信模板编码 - mes.put("CORPINFO_ID", pd2.get("CORPINFO_ID"));// 企业id - }else if("4".equals(pd2.get("APPLY_STATUS"))){ - mes.put("RECEIVER_ID", pd2.get("LEADER_USER_ID"));// 收信人userid - mes.put("templateCode", "DT_Y04");// 短信模板编码 - mes.put("SMSCode", "SMS_227245922");// 短信模板编码 - mes.put("CORPINFO_ID", pd2.get("CORPINFO_ID"));// 企业id - }else if("5".equals(pd2.get("APPLY_STATUS"))){ - mes.put("RECEIVER_ID", pd2.get("ACCEPT_USER_ID"));// 收信人userid - mes.put("templateCode", "DT_Y05");// 短信模板编码 - mes.put("SMSCode", "SMS_227245922");// 短信模板编码 - mes.put("CORPINFO_ID", pd2.get("CORPINFO_ID"));// 企业id - }else if("6".equals(pd2.get("APPLY_STATUS"))){ - mes.put("RECEIVER_ID", pd2.get("APPLY_USER_ID"));// 收信人userid - mes.put("templateCode", "DT_Y06");// 短信模板编码 - mes.put("SMSCode", "SMS_227250920");// 短信模板编码 - mes.put("CORPINFO_ID", pd2.get("CORPINFO_ID"));// 企业id - } - // 发短信 - // 第1个参数 - params1.put("name", "number");// 存入短信模板中的参数名称 - params1.put("value", pd2.get("CHECK_NO"));// 存入上面参数名称所传递的值 - paramsList.add(params1); + case "3"://所在单位 + System.out.println(pd2.get("APPLY_STATUS")); + if ("3".equals(pd2.get("APPLY_STATUS"))) { + mes.put("RECEIVER_ID", pd2.get("SAFETY_USER_ID"));// 收信人userid + mes.put("templateCode", "DT_Y03");// 短信模板编码 + mes.put("SMSCode", "SMS_227245922");// 短信模板编码 + mes.put("CORPINFO_ID", pd2.get("CORPINFO_ID"));// 企业id + } else if ("4".equals(pd2.get("APPLY_STATUS"))) { + mes.put("RECEIVER_ID", pd2.get("LEADER_USER_ID"));// 收信人userid + mes.put("templateCode", "DT_Y04");// 短信模板编码 + mes.put("SMSCode", "SMS_227245922");// 短信模板编码 + mes.put("CORPINFO_ID", pd2.get("CORPINFO_ID"));// 企业id + } else if ("5".equals(pd2.get("APPLY_STATUS"))) { + mes.put("RECEIVER_ID", pd2.get("ACCEPT_USER_ID"));// 收信人userid + mes.put("templateCode", "DT_Y05");// 短信模板编码 + mes.put("SMSCode", "SMS_227245922");// 短信模板编码 + mes.put("CORPINFO_ID", pd2.get("CORPINFO_ID"));// 企业id + } else if ("6".equals(pd2.get("APPLY_STATUS"))) { + mes.put("RECEIVER_ID", pd2.get("APPLY_USER_ID"));// 收信人userid + mes.put("templateCode", "DT_Y06");// 短信模板编码 + mes.put("SMSCode", "SMS_227250920");// 短信模板编码 + mes.put("CORPINFO_ID", pd2.get("CORPINFO_ID"));// 企业id + } + // 发短信 + // 第1个参数 + params1.put("name", "number");// 存入短信模板中的参数名称 + params1.put("value", pd2.get("CHECK_NO"));// 存入上面参数名称所传递的值 + paramsList.add(params1); - // 第2个参数 - params2.put("name", "params1");// 存入短信模板中的参数名称 - params2.put("value", "动土作业");// 存入上面参数名称所传递的值 - paramsList.add(params2); - // 第3个参数 - params3.put("name", "params2");// 存入短信模板中的参数名称 - params3.put("value", "安全部门");// 存入上面参数名称所传递的值 - paramsList.add(params3); - // 第4个参数 - params4.put("name", "params3");// 存入短信模板中的参数名称 - params4.put("value", "审核");// 存入上面参数名称所传递的值 - paramsList.add(params4); - sendMessageUtil.sendMessages(mes, paramsList); - break; + // 第2个参数 + params2.put("name", "params1");// 存入短信模板中的参数名称 + params2.put("value", "动土作业");// 存入上面参数名称所传递的值 + paramsList.add(params2); + // 第3个参数 + params3.put("name", "params2");// 存入短信模板中的参数名称 + params3.put("value", "安全部门");// 存入上面参数名称所传递的值 + paramsList.add(params3); + // 第4个参数 + params4.put("name", "params3");// 存入短信模板中的参数名称 + params4.put("value", "审核");// 存入上面参数名称所传递的值 + paramsList.add(params4); + sendMessageUtil.sendMessages(mes, paramsList); + break; - case "4"://安全部门 - System.out.println(pd2.get("APPLY_STATUS")); - if("4".equals(pd2.get("APPLY_STATUS"))){ - mes.put("RECEIVER_ID", pd2.get("LEADER_USER_ID"));// 收信人userid - mes.put("templateCode", "DT_Y04");// 短信模板编码 - mes.put("SMSCode", "SMS_227245922");// 短信模板编码 - mes.put("CORPINFO_ID", pd2.get("CORPINFO_ID"));// 企业id - }else if("5".equals(pd2.get("APPLY_STATUS"))){ - mes.put("RECEIVER_ID", pd2.get("LEADER_USER_ID"));// 收信人userid - mes.put("templateCode", "DT_Y05");// 短信模板编码 - mes.put("SMSCode", "SMS_227245922");// 短信模板编码 - mes.put("CORPINFO_ID", pd2.get("CORPINFO_ID"));// 企业id - }else if("6".equals(pd2.get("APPLY_STATUS"))){ - mes.put("RECEIVER_ID", pd2.get("ACCEPT_USER_ID"));// 收信人userid - mes.put("templateCode", "DT_Y06");// 短信模板编码 - mes.put("SMSCode", "SMS_227250920");// 短信模板编码 - mes.put("CORPINFO_ID", pd2.get("CORPINFO_ID"));// 企业id - } - // 发短信 - // 第1个参数 - params1.put("name", "number");// 存入短信模板中的参数名称 - params1.put("value", pd2.get("CHECK_NO"));// 存入上面参数名称所传递的值 - paramsList.add(params1); + case "4"://安全部门 + System.out.println(pd2.get("APPLY_STATUS")); + if ("4".equals(pd2.get("APPLY_STATUS"))) { + mes.put("RECEIVER_ID", pd2.get("LEADER_USER_ID"));// 收信人userid + mes.put("templateCode", "DT_Y04");// 短信模板编码 + mes.put("SMSCode", "SMS_227245922");// 短信模板编码 + mes.put("CORPINFO_ID", pd2.get("CORPINFO_ID"));// 企业id + } else if ("5".equals(pd2.get("APPLY_STATUS"))) { + mes.put("RECEIVER_ID", pd2.get("LEADER_USER_ID"));// 收信人userid + mes.put("templateCode", "DT_Y05");// 短信模板编码 + mes.put("SMSCode", "SMS_227245922");// 短信模板编码 + mes.put("CORPINFO_ID", pd2.get("CORPINFO_ID"));// 企业id + } else if ("6".equals(pd2.get("APPLY_STATUS"))) { + mes.put("RECEIVER_ID", pd2.get("ACCEPT_USER_ID"));// 收信人userid + mes.put("templateCode", "DT_Y06");// 短信模板编码 + mes.put("SMSCode", "SMS_227250920");// 短信模板编码 + mes.put("CORPINFO_ID", pd2.get("CORPINFO_ID"));// 企业id + } + // 发短信 + // 第1个参数 + params1.put("name", "number");// 存入短信模板中的参数名称 + params1.put("value", pd2.get("CHECK_NO"));// 存入上面参数名称所传递的值 + paramsList.add(params1); - // 第2个参数 - params2.put("name", "params1");// 存入短信模板中的参数名称 - params2.put("value", "动土作业");// 存入上面参数名称所传递的值 - paramsList.add(params2); - // 第3个参数 - params3.put("name", "params2");// 存入短信模板中的参数名称 - params3.put("value", "审批部门");// 存入上面参数名称所传递的值 - paramsList.add(params3); - // 第4个参数 - params4.put("name", "params3");// 存入短信模板中的参数名称 - params4.put("value", "审批");// 存入上面参数名称所传递的值 - paramsList.add(params4); - sendMessageUtil.sendMessages(mes, paramsList); - break; + // 第2个参数 + params2.put("name", "params1");// 存入短信模板中的参数名称 + params2.put("value", "动土作业");// 存入上面参数名称所传递的值 + paramsList.add(params2); + // 第3个参数 + params3.put("name", "params2");// 存入短信模板中的参数名称 + params3.put("value", "审批部门");// 存入上面参数名称所传递的值 + paramsList.add(params3); + // 第4个参数 + params4.put("name", "params3");// 存入短信模板中的参数名称 + params4.put("value", "审批");// 存入上面参数名称所传递的值 + paramsList.add(params4); + sendMessageUtil.sendMessages(mes, paramsList); + break; - case "5"://审批部门 - System.out.println(pd2.get("APPLY_STATUS")); - if("5".equals(pd2.get("APPLY_STATUS"))){ - mes.put("RECEIVER_ID", pd2.get("ACCEPT_USER_ID"));// 收信人userid - mes.put("templateCode", "DT_Y05");// 短信模板编码 - mes.put("SMSCode", "SMS_227245922");// 短信模板编码 - mes.put("CORPINFO_ID", pd2.get("CORPINFO_ID"));// 企业id - }else if("6".equals(pd2.get("APPLY_STATUS"))){ - mes.put("RECEIVER_ID", pd2.get("APPLY_USER_ID"));// 收信人userid - mes.put("templateCode", "DT_Y06");// 短信模板编码 - mes.put("SMSCode", "SMS_227250920");// 短信模板编码 - mes.put("CORPINFO_ID", pd2.get("CORPINFO_ID"));// 企业id - } - // 第1个参数 - params1.put("name", "number");// 存入短信模板中的参数名称 - params1.put("value", pd2.get("CHECK_NO"));// 存入上面参数名称所传递的值 - paramsList.add(params1); + case "5"://审批部门 + System.out.println(pd2.get("APPLY_STATUS")); + if ("5".equals(pd2.get("APPLY_STATUS"))) { + mes.put("RECEIVER_ID", pd2.get("ACCEPT_USER_ID"));// 收信人userid + mes.put("templateCode", "DT_Y05");// 短信模板编码 + mes.put("SMSCode", "SMS_227245922");// 短信模板编码 + mes.put("CORPINFO_ID", pd2.get("CORPINFO_ID"));// 企业id + } else if ("6".equals(pd2.get("APPLY_STATUS"))) { + mes.put("RECEIVER_ID", pd2.get("APPLY_USER_ID"));// 收信人userid + mes.put("templateCode", "DT_Y06");// 短信模板编码 + mes.put("SMSCode", "SMS_227250920");// 短信模板编码 + mes.put("CORPINFO_ID", pd2.get("CORPINFO_ID"));// 企业id + } + // 第1个参数 + params1.put("name", "number");// 存入短信模板中的参数名称 + params1.put("value", pd2.get("CHECK_NO"));// 存入上面参数名称所传递的值 + paramsList.add(params1); - // 第2个参数 - params2.put("name", "params1");// 存入短信模板中的参数名称 - params2.put("value", "动土作业");// 存入上面参数名称所传递的值 - paramsList.add(params2); - // 第3个参数 - params3.put("name", "params2");// 存入短信模板中的参数名称 - params3.put("value", "验收");// 存入上面参数名称所传递的值 - paramsList.add(params3); - // 第4个参数 - params4.put("name", "params3");// 存入短信模板中的参数名称 - params4.put("value", "验收");// 存入上面参数名称所传递的值 - paramsList.add(params4); - sendMessageUtil.sendMessages(mes, paramsList); - break; + // 第2个参数 + params2.put("name", "params1");// 存入短信模板中的参数名称 + params2.put("value", "动土作业");// 存入上面参数名称所传递的值 + paramsList.add(params2); + // 第3个参数 + params3.put("name", "params2");// 存入短信模板中的参数名称 + params3.put("value", "验收");// 存入上面参数名称所传递的值 + paramsList.add(params3); + // 第4个参数 + params4.put("name", "params3");// 存入短信模板中的参数名称 + params4.put("value", "验收");// 存入上面参数名称所传递的值 + paramsList.add(params4); + sendMessageUtil.sendMessages(mes, paramsList); + break; - case "6"://验收人 - System.out.println(pd2.get("APPLY_STATUS")); - // 发短信 - mes.put("RECEIVER_ID", pd2.get("APPLY_USER_ID"));// 收信人userid - mes.put("templateCode", "DT_Y06");// 短信模板编码 - mes.put("SMSCode", "SMS_227250920");// 短信模板编码 - mes.put("CORPINFO_ID", pd2.get("CORPINFO_ID"));// 企业id - // 第1个参数 - params1.put("name", "number");// 存入短信模板中的参数名称 - params1.put("value", pd2.get("CHECK_NO"));// 存入上面参数名称所传递的值 - paramsList.add(params1); + case "6"://验收人 + System.out.println(pd2.get("APPLY_STATUS")); + // 发短信 + mes.put("RECEIVER_ID", pd2.get("APPLY_USER_ID"));// 收信人userid + mes.put("templateCode", "DT_Y06");// 短信模板编码 + mes.put("SMSCode", "SMS_227250920");// 短信模板编码 + mes.put("CORPINFO_ID", pd2.get("CORPINFO_ID"));// 企业id + // 第1个参数 + params1.put("name", "number");// 存入短信模板中的参数名称 + params1.put("value", pd2.get("CHECK_NO"));// 存入上面参数名称所传递的值 + paramsList.add(params1); - // 第2个参数 - params2.put("name", "type");// 存入短信模板中的参数名称 - params2.put("value", "动土作业");// 存入上面参数名称所传递的值 - paramsList.add(params2); - sendMessageUtil.sendMessages(mes, paramsList); - break; - case "-2"://作业负责单位 - // 发短信 - mes.put("RECEIVER_ID", pd2.get("APPLY_USER_ID"));// 收信人userid - mes.put("templateCode", "DT_N02");// 短信模板编码 - mes.put("SMSCode", "SMS_223580715");// 短信模板编码 - mes.put("CORPINFO_ID", pd2.get("CORPINFO_ID"));// 企业id - // 第1个参数 - params1.put("name", "params1");// 存入短信模板中的参数名称 - params1.put("value", pd2.get("CHECK_NO"));// 存入上面参数名称所传递的值 - paramsList.add(params1); + // 第2个参数 + params2.put("name", "type");// 存入短信模板中的参数名称 + params2.put("value", "动土作业");// 存入上面参数名称所传递的值 + paramsList.add(params2); + sendMessageUtil.sendMessages(mes, paramsList); + break; + case "-2"://作业负责单位 + // 发短信 + mes.put("RECEIVER_ID", pd2.get("APPLY_USER_ID"));// 收信人userid + mes.put("templateCode", "DT_N02");// 短信模板编码 + mes.put("SMSCode", "SMS_223580715");// 短信模板编码 + mes.put("CORPINFO_ID", pd2.get("CORPINFO_ID"));// 企业id + // 第1个参数 + params1.put("name", "params1");// 存入短信模板中的参数名称 + params1.put("value", pd2.get("CHECK_NO"));// 存入上面参数名称所传递的值 + paramsList.add(params1); - // 第2个参数 - params2.put("name", "params2");// 存入短信模板中的参数名称 - params2.put("value", "动土作业");// 存入上面参数名称所传递的值 - paramsList.add(params2); - // 第3个参数 - params3.put("name", "params3");// 存入短信模板中的参数名称 - params3.put("value", "作业负责单位");// 存入上面参数名称所传递的值 - paramsList.add(params3); - sendMessageUtil.sendMessages(mes, paramsList); - break; - case "-3"://所在单位打回 - // 发短信 - mes.put("RECEIVER_ID", pd2.get("APPLY_USER_ID"));// 收信人userid - mes.put("templateCode", "DT_N03");// 短信模板编码 - mes.put("SMSCode", "SMS_223580715");// 短信模板编码 - mes.put("CORPINFO_ID", pd2.get("CORPINFO_ID"));// 企业id - // 第1个参数 - params1.put("name", "params1");// 存入短信模板中的参数名称 - params1.put("value", pd2.get("CHECK_NO"));// 存入上面参数名称所传递的值 - paramsList.add(params1); + // 第2个参数 + params2.put("name", "params2");// 存入短信模板中的参数名称 + params2.put("value", "动土作业");// 存入上面参数名称所传递的值 + paramsList.add(params2); + // 第3个参数 + params3.put("name", "params3");// 存入短信模板中的参数名称 + params3.put("value", "作业负责单位");// 存入上面参数名称所传递的值 + paramsList.add(params3); + sendMessageUtil.sendMessages(mes, paramsList); + break; + case "-3"://所在单位打回 + // 发短信 + mes.put("RECEIVER_ID", pd2.get("APPLY_USER_ID"));// 收信人userid + mes.put("templateCode", "DT_N03");// 短信模板编码 + mes.put("SMSCode", "SMS_223580715");// 短信模板编码 + mes.put("CORPINFO_ID", pd2.get("CORPINFO_ID"));// 企业id + // 第1个参数 + params1.put("name", "params1");// 存入短信模板中的参数名称 + params1.put("value", pd2.get("CHECK_NO"));// 存入上面参数名称所传递的值 + paramsList.add(params1); - // 第2个参数 - params2.put("name", "params2");// 存入短信模板中的参数名称 - params2.put("value", "动土作业");// 存入上面参数名称所传递的值 - paramsList.add(params2); - // 第3个参数 - params3.put("name", "params3");// 存入短信模板中的参数名称 - params3.put("value", "所在单位意见");// 存入上面参数名称所传递的值 - paramsList.add(params3); - sendMessageUtil.sendMessages(mes, paramsList); - break; - case "-4"://安全部门打回 + // 第2个参数 + params2.put("name", "params2");// 存入短信模板中的参数名称 + params2.put("value", "动土作业");// 存入上面参数名称所传递的值 + paramsList.add(params2); + // 第3个参数 + params3.put("name", "params3");// 存入短信模板中的参数名称 + params3.put("value", "所在单位意见");// 存入上面参数名称所传递的值 + paramsList.add(params3); + sendMessageUtil.sendMessages(mes, paramsList); + break; + case "-4"://安全部门打回 - // 发短信 - mes.put("RECEIVER_ID", pd2.get("APPLY_USER_ID"));// 收信人userid - mes.put("templateCode", "DT_N04");// 短信模板编码 - mes.put("SMSCode", "SMS_223580715");// 短信模板编码 - mes.put("CORPINFO_ID", pd2.get("CORPINFO_ID"));// 企业id - // 第1个参数 - params1.put("name", "params1");// 存入短信模板中的参数名称 - params1.put("value", pd2.get("CHECK_NO"));// 存入上面参数名称所传递的值 - paramsList.add(params1); + // 发短信 + mes.put("RECEIVER_ID", pd2.get("APPLY_USER_ID"));// 收信人userid + mes.put("templateCode", "DT_N04");// 短信模板编码 + mes.put("SMSCode", "SMS_223580715");// 短信模板编码 + mes.put("CORPINFO_ID", pd2.get("CORPINFO_ID"));// 企业id + // 第1个参数 + params1.put("name", "params1");// 存入短信模板中的参数名称 + params1.put("value", pd2.get("CHECK_NO"));// 存入上面参数名称所传递的值 + paramsList.add(params1); - // 第2个参数 - params2.put("name", "params2");// 存入短信模板中的参数名称 - params2.put("value", "动土作业");// 存入上面参数名称所传递的值 - paramsList.add(params2); - // 第3个参数 - params3.put("name", "params3");// 存入短信模板中的参数名称 - params3.put("value", "安全部门");// 存入上面参数名称所传递的值 - paramsList.add(params3); - sendMessageUtil.sendMessages(mes, paramsList); - break; - case "-5"://审批打回 - // 发短信 - mes.put("RECEIVER_ID", pd2.get("APPLY_USER_ID"));// 收信人userid - mes.put("templateCode", "DT_N05");// 短信模板编码 - mes.put("SMSCode", "SMS_223580715");// 短信模板编码 - mes.put("CORPINFO_ID", pd2.get("CORPINFO_ID"));// 企业id - // 第1个参数 - params1.put("name", "params1");// 存入短信模板中的参数名称 - params1.put("value", pd2.get("CHECK_NO"));// 存入上面参数名称所传递的值 - paramsList.add(params1); + // 第2个参数 + params2.put("name", "params2");// 存入短信模板中的参数名称 + params2.put("value", "动土作业");// 存入上面参数名称所传递的值 + paramsList.add(params2); + // 第3个参数 + params3.put("name", "params3");// 存入短信模板中的参数名称 + params3.put("value", "安全部门");// 存入上面参数名称所传递的值 + paramsList.add(params3); + sendMessageUtil.sendMessages(mes, paramsList); + break; + case "-5"://审批打回 + // 发短信 + mes.put("RECEIVER_ID", pd2.get("APPLY_USER_ID"));// 收信人userid + mes.put("templateCode", "DT_N05");// 短信模板编码 + mes.put("SMSCode", "SMS_223580715");// 短信模板编码 + mes.put("CORPINFO_ID", pd2.get("CORPINFO_ID"));// 企业id + // 第1个参数 + params1.put("name", "params1");// 存入短信模板中的参数名称 + params1.put("value", pd2.get("CHECK_NO"));// 存入上面参数名称所传递的值 + paramsList.add(params1); - // 第2个参数 - params2.put("name", "params2");// 存入短信模板中的参数名称 - params2.put("value", "动土作业");// 存入上面参数名称所传递的值 - paramsList.add(params2); - // 第3个参数 - params3.put("name", "params3");// 存入短信模板中的参数名称 - params3.put("value", "审批部门");// 存入上面参数名称所传递的值 - paramsList.add(params3); - sendMessageUtil.sendMessages(mes, paramsList); - break; - case "-6"://验收打回 - // 发短信 - mes.put("RECEIVER_ID", pd2.get("APPLY_USER_ID"));// 收信人userid - mes.put("templateCode", "DT_N06");// 短信模板编码 - mes.put("SMSCode", "SMS_223580715");// 短信模板编码 - mes.put("CORPINFO_ID", pd2.get("CORPINFO_ID"));// 企业id - // 第1个参数 - params1.put("name", "params1");// 存入短信模板中的参数名称 - params1.put("value", pd2.get("CHECK_NO"));// 存入上面参数名称所传递的值 - paramsList.add(params1); + // 第2个参数 + params2.put("name", "params2");// 存入短信模板中的参数名称 + params2.put("value", "动土作业");// 存入上面参数名称所传递的值 + paramsList.add(params2); + // 第3个参数 + params3.put("name", "params3");// 存入短信模板中的参数名称 + params3.put("value", "审批部门");// 存入上面参数名称所传递的值 + paramsList.add(params3); + sendMessageUtil.sendMessages(mes, paramsList); + break; + case "-6"://验收打回 + // 发短信 + mes.put("RECEIVER_ID", pd2.get("APPLY_USER_ID"));// 收信人userid + mes.put("templateCode", "DT_N06");// 短信模板编码 + mes.put("SMSCode", "SMS_223580715");// 短信模板编码 + mes.put("CORPINFO_ID", pd2.get("CORPINFO_ID"));// 企业id + // 第1个参数 + params1.put("name", "params1");// 存入短信模板中的参数名称 + params1.put("value", pd2.get("CHECK_NO"));// 存入上面参数名称所传递的值 + paramsList.add(params1); - // 第2个参数 - params2.put("name", "params2");// 存入短信模板中的参数名称 - params2.put("value", "动土作业");// 存入上面参数名称所传递的值 - paramsList.add(params2); - // 第3个参数 - params3.put("name", "params3");// 存入短信模板中的参数名称 - params3.put("value", "验收部门");// 存入上面参数名称所传递的值 - paramsList.add(params3); - sendMessageUtil.sendMessages(mes, paramsList); - break; - default: - break; - } - } + // 第2个参数 + params2.put("name", "params2");// 存入短信模板中的参数名称 + params2.put("value", "动土作业");// 存入上面参数名称所传递的值 + paramsList.add(params2); + // 第3个参数 + params3.put("name", "params3");// 存入短信模板中的参数名称 + params3.put("value", "验收部门");// 存入上面参数名称所传递的值 + paramsList.add(params3); + sendMessageUtil.sendMessages(mes, paramsList); + break; + default: + break; + } + } - /**待办作业数统计 - * @param - * @throws Exception - */ - @RequestMapping(value="/countCheck") - @ResponseBody - public Object countCheck() throws Exception{ - Map map = new HashMap(); - String errInfo = "success"; - PageData pd = this.getPageData(); - PageData count = GFbreakGroundService.countCheck(pd); - map.put("result", errInfo); - map.put("count", count); - return map; - } + /** + * 待办作业数统计 + * + * @param + * @throws Exception + */ + @RequestMapping(value = "/countCheck") + @ResponseBody + public Object countCheck() throws Exception { + Map map = new HashMap(); + String errInfo = "success"; + PageData pd = this.getPageData(); + PageData count = GFbreakGroundService.countCheck(pd); + map.put("result", errInfo); + map.put("count", count); + return map; + } } diff --git a/src/main/java/com/zcloud/controller/gf/AppGFCutRoadController.java b/src/main/java/com/zcloud/controller/gf/AppGFCutRoadController.java index 9b3f375f..2d474e88 100644 --- a/src/main/java/com/zcloud/controller/gf/AppGFCutRoadController.java +++ b/src/main/java/com/zcloud/controller/gf/AppGFCutRoadController.java @@ -2,6 +2,7 @@ package com.zcloud.controller.gf; 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; @@ -31,1203 +32,1257 @@ import java.util.*; @RequestMapping("/app/gfCutRoad") public class AppGFCutRoadController extends BaseController { - @Resource - private GFCutRoadService GFcutRoadService; - @Resource - private GFCutRoadLogService GFcutRoadLogService; - @Resource - private GFCutRoadToMeasuresService GFcutRoadToMeasuresService; - @Autowired - private GFCutRoadAcceptUserService cutroadacceptuserService; - @Autowired - private SendMessageUtil sendMessageUtil; - /**获取编码 - * @param - * @throws Exception - */ - @RequestMapping(value="/getCode") - @ResponseBody - public Object getCode() throws Exception{ - Map map = new HashMap(); - String errInfo = "success"; - PageData pd = new PageData(); - pd = this.getPageData(); - Calendar calendar = Calendar.getInstance(); - DecimalFormat dft=new DecimalFormat("00"); - int year = calendar.get(Calendar.YEAR); - String month = dft.format(calendar.get(Calendar.MONTH) + 1); - String day = dft.format(calendar.get(Calendar.DAY_OF_MONTH)); - pd.put("CREATDATE",year + "-" + month + "-" + day); - pd = GFcutRoadService.getCode(pd); //根据ID读取 - String code = "DL"+year + month + day + dft.format((Integer.parseInt(pd.get("code").toString())+1)); - map.put("code", code); - map.put("result", errInfo); - return map; - } + @Resource + private GFCutRoadService GFcutRoadService; + @Resource + private GFCutRoadLogService GFcutRoadLogService; + @Resource + private GFCutRoadToMeasuresService GFcutRoadToMeasuresService; + @Autowired + private GFCutRoadAcceptUserService cutroadacceptuserService; + @Autowired + private SendMessageUtil sendMessageUtil; - /**新增 - * @param - * @throws Exception - */ - @RequestMapping(value="/add") - @ResponseBody - @Transactional - public Object add( - @RequestParam(value="FFILE",required=false) MultipartFile[] files - ) throws Exception{ - Map map = new HashMap(); - String errInfo = "success"; - PageData pd = new PageData(); - pd = this.getPageData(); - PageData pd2 = new PageData(); - Calendar calendar = Calendar.getInstance(); - DecimalFormat dft=new DecimalFormat("00"); - int year = calendar.get(Calendar.YEAR); - String month = dft.format(calendar.get(Calendar.MONTH) + 1); - String day = dft.format(calendar.get(Calendar.DAY_OF_MONTH)); - pd2.put("CREATDATE",year + "-" + month + "-" + day); - pd2.put("CORPINFO_ID",pd.get("CORPINFO_ID")); - pd2 = GFcutRoadService.getCode(pd2); //根据ID读取 - String code = "DL"+year + month + day + dft.format((Integer.parseInt(pd2.get("code").toString())+1)); - pd = this.getPageData(); - pd.put("CHECK_NO", code); - pd.put("CUTROAD_ID", this.get32UUID()); //主键 - pd.put("CREATTIME", DateUtil.date2Str(new Date())); //添加时间 - pd.put("ISDELETE", "0"); //是否删除 1-是 0-否 - pd.put("OTHER_PROTECTIVE_MEASURES", (StringUtils.isNotBlank(pd.getString("OTHER_PROTECTIVE_MEASURES")) ? pd.getString("OTHER_PROTECTIVE_MEASURES") : "") + ";_;"); - pd.put("HAZARD_IDENTIFICATION", (StringUtils.isNotBlank(pd.getString("HAZARD_IDENTIFICATION")) ? pd.getString("HAZARD_IDENTIFICATION") : "") + ";_;"); - if (files != null && files.length > 0) { - MultipartFile file = files[0]; + /** + * 获取编码 + * + * @param + * @throws Exception + */ + @RequestMapping(value = "/getCode") + @ResponseBody + public Object getCode() throws Exception { + Map map = new HashMap(); + String errInfo = "success"; + PageData pd = new PageData(); + pd = this.getPageData(); + Calendar calendar = Calendar.getInstance(); + DecimalFormat dft = new DecimalFormat("00"); + int year = calendar.get(Calendar.YEAR); + String month = dft.format(calendar.get(Calendar.MONTH) + 1); + String day = dft.format(calendar.get(Calendar.DAY_OF_MONTH)); + pd.put("CREATDATE", year + "-" + month + "-" + day); + pd = GFcutRoadService.getCode(pd); //根据ID读取 + String code = "DL" + year + month + day + dft.format((Integer.parseInt(pd.get("code").toString()) + 1)); + map.put("code", code); + map.put("result", errInfo); + 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); + /** + * 新增 + * + * @param + * @throws Exception + */ + @RequestMapping(value = "/add") + @ResponseBody + @Transactional + @DockAnnotation(hasAnnex = true) + public Object add( + @RequestParam(value = "FFILE", required = false) MultipartFile[] files + ) throws Exception { + Map map = new HashMap(); + String errInfo = "success"; + PageData pd = new PageData(); + pd = this.getPageData(); + PageData pd2 = new PageData(); + Calendar calendar = Calendar.getInstance(); + DecimalFormat dft = new DecimalFormat("00"); + int year = calendar.get(Calendar.YEAR); + String month = dft.format(calendar.get(Calendar.MONTH) + 1); + String day = dft.format(calendar.get(Calendar.DAY_OF_MONTH)); + pd2.put("CREATDATE", year + "-" + month + "-" + day); + pd2.put("CORPINFO_ID", pd.get("CORPINFO_ID")); + pd2 = GFcutRoadService.getCode(pd2); //根据ID读取 + ArrayList sendPicturesList = new ArrayList<>(); + String code = "DL" + year + month + day + dft.format((Integer.parseInt(pd2.get("code").toString()) + 1)); - pd.put("APPLY_USER_SIGNER_PATH", Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile + "/" + fileName); - pd.put("APPLY_USER_SIGNER_TIME", pd.get("SIGNER_TIME")); - } - GFcutRoadService.save(pd); + pd = this.getPageData(); + pd.put("CHECK_NO", code); + pd.put("CUTROAD_ID", this.get32UUID()); //主键 + pd.put("CREATTIME", DateUtil.date2Str(new Date())); //添加时间 + pd.put("ISDELETE", "0"); //是否删除 1-是 0-否 + pd.put("OTHER_PROTECTIVE_MEASURES", (StringUtils.isNotBlank(pd.getString("OTHER_PROTECTIVE_MEASURES")) ? pd.getString("OTHER_PROTECTIVE_MEASURES") : "") + ";_;"); + pd.put("HAZARD_IDENTIFICATION", (StringUtils.isNotBlank(pd.getString("HAZARD_IDENTIFICATION")) ? pd.getString("HAZARD_IDENTIFICATION") : "") + ";_;"); + if (files != null && files.length > 0) { + MultipartFile file = files[0]; + 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); + sendPicturesList.add(Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile + "/" + fileName + + "@@" + + fileName); + pd.put("APPLY_USER_SIGNER_PATH", Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile + "/" + fileName); + pd.put("APPLY_USER_SIGNER_TIME", pd.get("SIGNER_TIME")); + } + GFcutRoadService.save(pd); + if ("1".equals(pd.get("APPLY_STATUS"))) { + PageData log = new PageData(); + log.put("CUTROADLOG_ID", this.get32UUID()); + log.put("ACTION", "提交申请"); + log.put("CUTROAD_ID", pd.get("CUTROAD_ID")); + log.put("CREATOR", pd.get("ACTION_USER")); + log.put("CREATTIME", DateUtil.date2Str(new Date())); + GFcutRoadLogService.save(log); + pd.put("logData", JSON.toJSONString(log)); + + // 发短信 + PageData mes = new PageData(); + mes.put("RECEIVER_ID", pd.get("CONSTRUCTION_USER_ID"));// 收信人userid + mes.put("templateCode", "DL_Y01");// 短信模板编码 + mes.put("SMSCode", "SMS_227245922");// 短信模板编码 + mes.put("CORPINFO_ID", pd.get("CORPINFO_ID"));// 企业id + // 参数集合 + List paramsList = new ArrayList(); + // 第1个参数 + PageData params1 = new PageData(); + params1.put("name", "number");// 存入短信模板中的参数名称 + params1.put("value", pd.get("CHECK_NO"));// 存入上面参数名称所传递的值 + paramsList.add(params1); + + // 第2个参数 + PageData params2 = new PageData(); + params2.put("name", "params1");// 存入短信模板中的参数名称 + params2.put("value", "断路作业");// 存入上面参数名称所传递的值 + paramsList.add(params2); + // 第3个参数 + PageData params3 = new PageData(); + params3.put("name", "params2");// 存入短信模板中的参数名称 + params3.put("value", "作业负责单位");// 存入上面参数名称所传递的值 + paramsList.add(params3); + // 第4个参数 + PageData params4 = new PageData(); + params4.put("name", "params3");// 存入短信模板中的参数名称 + params4.put("value", "确认");// 存入上面参数名称所传递的值 + paramsList.add(params4); + sendMessageUtil.sendMessages(mes, paramsList); + } + map.put("result", errInfo); + map.put("dockData", JSON.toJSONString(pd)); + map.put("sendPicturesList", JSON.toJSONString(sendPicturesList)); + return map; + } + + /** + * 上传图 + * + * @param + * @throws Exception + */ + @RequestMapping(value = "/uploadImg") + @ResponseBody + @Transactional + public Object uploadImg( + @RequestParam(value = "FFILE", required = false) MultipartFile[] files + ) throws Exception { + Map map = new HashMap(); + String errInfo = "success"; + PageData pd = new PageData(); + pd = this.getPageData(); + if (files != null && files.length > 0) { + MultipartFile file = files[0]; + + 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); + + map.put("path", Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile + "/" + fileName); + } + + map.put("result", errInfo); + return map; + } + + /** + * 删除图 + * + * @param + * @throws Exception + */ + @RequestMapping(value = "/deleteImg") + @ResponseBody + @Transactional + public Object deleteImg() throws Exception { + Map map = new HashMap(); + String errInfo = "success"; + PageData pd = new PageData(); + pd = this.getPageData(); + Smb.deleteFile(pd.getString("path")); + map.put("result", errInfo); + return map; + } - if(pd.get("APPLY_STATUS").equals("1")) { - PageData log = new PageData(); - log.put("CUTROADLOG_ID", this.get32UUID()); - log.put("ACTION", "提交申请"); - log.put("CUTROAD_ID", pd.get("CUTROAD_ID")); - log.put("CREATOR",pd.get("ACTION_USER")); - log.put("CREATTIME", DateUtil.date2Str(new Date())); - GFcutRoadLogService.save(log); + /** + * 删除 + * + * @param + * @throws Exception + */ + @RequestMapping(value = "/delete") + @ResponseBody + public Object delete() throws Exception { + Map map = new HashMap(); + String errInfo = "success"; + PageData pd = new PageData(); + pd = this.getPageData(); + GFcutRoadService.delete(pd); + map.put("result", errInfo); //返回结果 + return map; + } - // 发短信 - PageData mes = new PageData(); - mes.put("RECEIVER_ID", pd.get("CONSTRUCTION_USER_ID"));// 收信人userid - mes.put("templateCode", "DL_Y01");// 短信模板编码 - mes.put("SMSCode", "SMS_227245922");// 短信模板编码 - mes.put("CORPINFO_ID", pd.get("CORPINFO_ID"));// 企业id - // 参数集合 - List paramsList = new ArrayList(); - // 第1个参数 - PageData params1 = new PageData(); - params1.put("name", "number");// 存入短信模板中的参数名称 - params1.put("value", pd.get("CHECK_NO"));// 存入上面参数名称所传递的值 - paramsList.add(params1); + /** + * 修改 + * + * @param + * @throws Exception + */ + @RequestMapping(value = "/edit") + @ResponseBody + @Transactional + @DockAnnotation + public Object edit( + @RequestParam(value = "FFILE", required = false) MultipartFile[] files + ) throws Exception { + Map map = new HashMap(); + String errInfo = "success"; + PageData pd = this.getPageData(); + ArrayList sendPicturesList = new ArrayList<>(); + pd.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间 + pd.put("OTHER_PROTECTIVE_MEASURES", (StringUtils.isNotBlank(pd.getString("OTHER_PROTECTIVE_MEASURES")) ? pd.getString("OTHER_PROTECTIVE_MEASURES") : "") + ";_;"); + pd.put("HAZARD_IDENTIFICATION", (StringUtils.isNotBlank(pd.getString("HAZARD_IDENTIFICATION")) ? pd.getString("HAZARD_IDENTIFICATION") : "") + ";_;"); + if (files != null && files.length > 0) { + MultipartFile file = files[0]; + 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("APPLY_USER_SIGNER_PATH", Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile + "/" + fileName); + sendPicturesList.add(pd.getString("APPLY_USER_SIGNER_PATH") + "@@" + fileName); + pd.put("APPLY_USER_SIGNER_TIME", pd.get("SIGNER_TIME")); + } + GFcutRoadService.edit(pd); - // 第2个参数 - PageData params2 = new PageData(); - params2.put("name", "params1");// 存入短信模板中的参数名称 - params2.put("value", "断路作业");// 存入上面参数名称所传递的值 - paramsList.add(params2); - // 第3个参数 - PageData params3 = new PageData(); - params3.put("name", "params2");// 存入短信模板中的参数名称 - params3.put("value", "作业负责单位");// 存入上面参数名称所传递的值 - paramsList.add(params3); - // 第4个参数 - PageData params4 = new PageData(); - params4.put("name", "params3");// 存入短信模板中的参数名称 - params4.put("value", "确认");// 存入上面参数名称所传递的值 - paramsList.add(params4); - sendMessageUtil.sendMessages(mes, paramsList); - } + GFcutRoadToMeasuresService.delete(pd); + ArrayList measuresdataList = new ArrayList<>(); + if (pd.get("measuresList") != null) { + List list = (List) JSON.parse(pd.get("measuresList").toString()); + for (JSONObject json : list) { + PageData measures = new PageData(); + measures.put("CUTROADTOMEASURES_ID", this.get32UUID()); // 主键 + measures.put("CUTROAD_ID", pd.get("CUTROAD_ID")); + measures.put("BUS_CUTROAD_MEASURES_ID", json.get("BUS_CUTROAD_MEASURES_ID")); + measures.put("STATUS", json.get("STATUS")); + measures.put("ANSWER", json.get("ANSWER")); + measures.put("CONFIRM_ID", pd.get("OPERATOR")); + measures.put("CONFIRM_NAME", pd.get("ACTION_USER")); + GFcutRoadToMeasuresService.save(measures); + measuresdataList.add(measures); + } + } + if (!pd.get("APPLY_STATUS").equals("0")) { + PageData log = new PageData(); + log.put("CUTROADLOG_ID", this.get32UUID()); + log.put("ACTION", "修改申请,重新提交"); + log.put("CUTROAD_ID", pd.get("CUTROAD_ID")); + log.put("CREATOR", pd.get("ACTION_USER")); + log.put("CREATTIME", DateUtil.date2Str(new Date())); + GFcutRoadLogService.save(log); - map.put("result", errInfo); - return map; - } + // 发短信 + PageData mes = new PageData(); + mes.put("RECEIVER_ID", pd.get("CONSTRUCTION_USER_ID"));// 收信人userid + mes.put("templateCode", "DL_Y01");// 短信模板编码 + mes.put("SMSCode", "SMS_227245922");// 短信模板编码 + mes.put("CORPINFO_ID", pd.get("CORPINFO_ID"));// 企业id + // 参数集合 + List paramsList = new ArrayList(); + // 第1个参数 + PageData params1 = new PageData(); + params1.put("name", "number");// 存入短信模板中的参数名称 + params1.put("value", pd.get("CHECK_NO"));// 存入上面参数名称所传递的值 + paramsList.add(params1); - /**上传图 - * @param - * @throws Exception - */ - @RequestMapping(value="/uploadImg") - @ResponseBody - @Transactional - public Object uploadImg( - @RequestParam(value="FFILE",required=false) MultipartFile[] files - ) throws Exception{ - Map map = new HashMap(); - String errInfo = "success"; - PageData pd = new PageData(); - pd = this.getPageData(); - if (files != null && files.length > 0) { - MultipartFile file = files[0]; + // 第2个参数 + PageData params2 = new PageData(); + params2.put("name", "params1");// 存入短信模板中的参数名称 + params2.put("value", "断路作业");// 存入上面参数名称所传递的值 + paramsList.add(params2); + // 第3个参数 + PageData params3 = new PageData(); + params3.put("name", "params2");// 存入短信模板中的参数名称 + params3.put("value", "作业负责单位");// 存入上面参数名称所传递的值 + paramsList.add(params3); + // 第4个参数 + PageData params4 = new PageData(); + params4.put("name", "params3");// 存入短信模板中的参数名称 + params4.put("value", "确认");// 存入上面参数名称所传递的值 + paramsList.add(params4); + sendMessageUtil.sendMessages(mes, paramsList); + } + map.put("result", errInfo); + 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); + /** + * 修改 + * + * @param + * @throws Exception + */ + @RequestMapping(value = "/editGuardian") + @ResponseBody + @Transactional + public Object editGuardian( + @RequestParam(value = "FFILE", required = false) MultipartFile[] files + ) throws Exception { + Map map = new HashMap(); + String errInfo = "success"; + PageData pd = new PageData(); + pd = this.getPageData(); + PageData pd2 = new PageData(); + pd2 = GFcutRoadService.findById(pd); + pd2.put("OPERATOR", pd.get("OPERATOR")); //修改人 + pd2.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间 + if (files != null && files.length > 0) { + MultipartFile file = files[0]; - map.put("path", Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile + "/" + fileName); - } + 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); - map.put("result", errInfo); - return map; - } + pd2.put("GUARDIAN_USER_SIGNER_PATH", Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile + "/" + fileName); + pd2.put("GUARDIAN_USER_SIGNER_TIME", pd.get("SIGNER_TIME")); + GFcutRoadService.edit(pd2); + } - /**删除图 - * @param - * @throws Exception - */ - @RequestMapping(value="/deleteImg") - @ResponseBody - @Transactional - public Object deleteImg() throws Exception{ - Map map = new HashMap(); - String errInfo = "success"; - PageData pd = new PageData(); - pd = this.getPageData(); - Smb.deleteFile(pd.getString("path")); - map.put("result", errInfo); - return map; - } + map.put("result", errInfo); + return map; + } + /** + * 修改 + * + * @param + * @throws Exception + */ + @RequestMapping(value = "/editConfess") + @ResponseBody + @Transactional + public Object editConfess( + @RequestParam(value = "FFILE", required = false) MultipartFile[] files + ) throws Exception { + Map map = new HashMap(); + String errInfo = "success"; + PageData pd = new PageData(); + pd = this.getPageData(); + PageData pd2 = new PageData(); + pd2 = GFcutRoadService.findById(pd); + pd2.put("OPERATOR", pd.get("OPERATOR")); //修改人 + pd2.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间 + if (files != null && files.length > 0) { + MultipartFile file = files[0]; - /**删除 - * @param - * @throws Exception - */ - @RequestMapping(value="/delete") - @ResponseBody - public Object delete() throws Exception{ - Map map = new HashMap(); - String errInfo = "success"; - PageData pd = new PageData(); - pd = this.getPageData(); - GFcutRoadService.delete(pd); - map.put("result", errInfo); //返回结果 - 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); - /**修改 - * @param - * @throws Exception - */ - @RequestMapping(value="/edit") - @ResponseBody - @Transactional - public Object edit( - @RequestParam(value="FFILE",required=false) MultipartFile[] files - ) throws Exception{ - Map map = new HashMap(); - String errInfo = "success"; - PageData pd = new PageData(); - pd = this.getPageData(); - pd.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间 - pd.put("OTHER_PROTECTIVE_MEASURES", (StringUtils.isNotBlank(pd.getString("OTHER_PROTECTIVE_MEASURES")) ? pd.getString("OTHER_PROTECTIVE_MEASURES") : "") + ";_;"); - pd.put("HAZARD_IDENTIFICATION", (StringUtils.isNotBlank(pd.getString("HAZARD_IDENTIFICATION")) ? pd.getString("HAZARD_IDENTIFICATION") : "") + ";_;"); - if (files != null && files.length > 0) { - MultipartFile file = files[0]; - - 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("APPLY_USER_SIGNER_PATH", Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile + "/" + fileName); - pd.put("APPLY_USER_SIGNER_TIME", pd.get("SIGNER_TIME")); - } - GFcutRoadService.edit(pd); - - GFcutRoadToMeasuresService.delete(pd); - if(pd.get("measuresList")!=null){ - List list = (List) JSON.parse(pd.get("measuresList").toString()); - for (JSONObject json : list) { - PageData measures = new PageData(); - measures.put("CUTROADTOMEASURES_ID", this.get32UUID()); // 主键 - measures.put("CUTROAD_ID", pd.get("CUTROAD_ID")); - measures.put("BUS_CUTROAD_MEASURES_ID", json.get("BUS_CUTROAD_MEASURES_ID")); - measures.put("STATUS", json.get("STATUS")); - measures.put("ANSWER", json.get("ANSWER")); - measures.put("CONFIRM_ID", pd.get("OPERATOR")); - measures.put("CONFIRM_NAME", pd.get("ACTION_USER")); - GFcutRoadToMeasuresService.save(measures); - } - } - if(!pd.get("APPLY_STATUS").equals("0")) { - PageData log = new PageData(); - log.put("CUTROADLOG_ID", this.get32UUID()); - log.put("ACTION", "修改申请,重新提交"); - log.put("CUTROAD_ID", pd.get("CUTROAD_ID")); - log.put("CREATOR",pd.get("ACTION_USER")); - log.put("CREATTIME", DateUtil.date2Str(new Date())); - GFcutRoadLogService.save(log); - - // 发短信 - PageData mes = new PageData(); - mes.put("RECEIVER_ID", pd.get("CONSTRUCTION_USER_ID"));// 收信人userid - mes.put("templateCode", "DL_Y01");// 短信模板编码 - mes.put("SMSCode", "SMS_227245922");// 短信模板编码 - mes.put("CORPINFO_ID", pd.get("CORPINFO_ID"));// 企业id - // 参数集合 - List paramsList = new ArrayList(); - // 第1个参数 - PageData params1 = new PageData(); - params1.put("name", "number");// 存入短信模板中的参数名称 - params1.put("value", pd.get("CHECK_NO"));// 存入上面参数名称所传递的值 - paramsList.add(params1); - - // 第2个参数 - PageData params2 = new PageData(); - params2.put("name", "params1");// 存入短信模板中的参数名称 - params2.put("value", "断路作业");// 存入上面参数名称所传递的值 - paramsList.add(params2); - // 第3个参数 - PageData params3 = new PageData(); - params3.put("name", "params2");// 存入短信模板中的参数名称 - params3.put("value", "作业负责单位");// 存入上面参数名称所传递的值 - paramsList.add(params3); - // 第4个参数 - PageData params4 = new PageData(); - params4.put("name", "params3");// 存入短信模板中的参数名称 - params4.put("value", "确认");// 存入上面参数名称所传递的值 - paramsList.add(params4); - sendMessageUtil.sendMessages(mes, paramsList); - } - map.put("result", errInfo); - return map; - } - /**修改 - * @param - * @throws Exception - */ - @RequestMapping(value="/editGuardian") - @ResponseBody - @Transactional - public Object editGuardian( - @RequestParam(value="FFILE",required=false) MultipartFile[] files - ) throws Exception{ - Map map = new HashMap(); - String errInfo = "success"; - PageData pd = new PageData(); - pd = this.getPageData(); - PageData pd2 = new PageData(); - pd2 = GFcutRoadService.findById(pd); - pd2.put("OPERATOR", pd.get("OPERATOR")); //修改人 - pd2.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间 - if (files != null && files.length > 0) { - MultipartFile file = files[0]; - - 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); - - pd2.put("GUARDIAN_USER_SIGNER_PATH", Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile + "/" + fileName); - pd2.put("GUARDIAN_USER_SIGNER_TIME", pd.get("SIGNER_TIME")); - GFcutRoadService.edit(pd2); - } - - map.put("result", errInfo); - return map; - } - /**修改 - * @param - * @throws Exception - */ - @RequestMapping(value="/editConfess") - @ResponseBody - @Transactional - public Object editConfess( - @RequestParam(value="FFILE",required=false) MultipartFile[] files - ) throws Exception{ - Map map = new HashMap(); - String errInfo = "success"; - PageData pd = new PageData(); - pd = this.getPageData(); - PageData pd2 = new PageData(); - pd2 = GFcutRoadService.findById(pd); - pd2.put("OPERATOR", pd.get("OPERATOR")); //修改人 - pd2.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间 - if (files != null && files.length > 0) { - MultipartFile file = files[0]; - - 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); - - pd2.put("CONFESS_USER_SIGNER_PATH", Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile + "/" + fileName); - pd2.put("CONFESS_USER_SIGNER_TIME", pd.get("SIGNER_TIME")); + pd2.put("CONFESS_USER_SIGNER_PATH", Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile + "/" + fileName); + pd2.put("CONFESS_USER_SIGNER_TIME", pd.get("SIGNER_TIME")); // pd2.put("GUARDIAN_CONTENT", pd.get("CONTENT")); // pd2.put("APPLY_STATUS", pd.get("APPLY_STATUS")); - GFcutRoadService.edit(pd2); - } - map.put("result", errInfo); - return map; - } - /**修改 - * @param - * @throws Exception - */ - @RequestMapping(value="/editAcceptconfess") - @ResponseBody - @Transactional - public Object editAcceptconfess(MultipartRequest request) throws Exception { - Map map = new HashMap(); - String errInfo = "success"; - PageData pd = new PageData(); - pd = this.getPageData(); - PageData pd2 = new PageData(); - pd2 = GFcutRoadService.findById(pd); - pd2.put("OPERATOR", pd.get("OPERATOR")); //修改人 - pd2.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间 - List fileList = new ArrayList(); - String signertime = ""; - String SIGNTIME[] = pd.getString("SIGNTIME").split(","); + GFcutRoadService.edit(pd2); + } + map.put("result", errInfo); + return map; + } - for (int i = 0; i < SIGNTIME.length; i++) { - signertime = SIGNTIME[i]; - fileList.add(request.getFile("file"+i)); - MultipartFile[] fileArr = new MultipartFile[fileList.size()]; - saveImg(fileList.toArray(fileArr),signertime,pd.getString("CUTROAD_ID"),pd.getString("CORPINFO_ID"),pd.getString("ACCEPT_CONFESS_USER_ID"),pd.getString("ACCEPT_CONFESS_DEPARTMENT_ID")); - fileList.clear(); - } - map.put("result", errInfo); - return map; - } - private void saveImg(MultipartFile[] files,String signertime, String CUTROAD_ID, String CORPINFO_ID, String ACCEPT_CONFESS_USER_ID, String ACCEPT_CONFESS_DEPARTMENT_ID) throws Exception{ - if (files != null && files.length > 0) { - for (int i = 0; i < files.length; i++) { - PageData pd = new PageData(); - pd = this.getPageData(); - MultipartFile file = files[i]; - String ffile = DateUtil.getDays(); - String fileName = this.get32UUID()+file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".")); - Smb.sshSftp(file, fileName,Const.FILEPATHFILE + CORPINFO_ID + "/" + ffile); - pd.put("ACCEPT_CONFESS_USER_SIGNER_TIME", signertime); - pd.put("ACCEPT_CONFESS_ID", this.get32UUID()); - pd.put("OPERATOR", pd.get("OPERATOR")); //修改人 - pd.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间 - pd.put("ACCEPT_CONFESS_USER_SIGNER_PATH", Const.FILEPATHFILE + CORPINFO_ID + "/" + ffile + "/" + fileName); - pd.put("ISDELETE", '0'); - pd.put("CORPINFO_ID", CORPINFO_ID); - pd.put("CUTROAD_ID", CUTROAD_ID); - pd.put("ACCEPT_CONFESS_USER_ID", ACCEPT_CONFESS_USER_ID); - pd.put("ACCEPT_CONFESS_DEPARTMENT_ID", ACCEPT_CONFESS_DEPARTMENT_ID); - pd.put("ACCEPT_USER_ID",""); - pd.put("ACCEPT_DEPARTMENT_ID", ""); - cutroadacceptuserService.save(pd); - } - } - } + /** + * 修改 + * + * @param + * @throws Exception + */ + @RequestMapping(value = "/editAcceptconfess") + @ResponseBody + @Transactional + public Object editAcceptconfess(MultipartRequest request) throws Exception { + Map map = new HashMap(); + String errInfo = "success"; + PageData pd = new PageData(); + pd = this.getPageData(); + PageData pd2 = new PageData(); + pd2 = GFcutRoadService.findById(pd); + pd2.put("OPERATOR", pd.get("OPERATOR")); //修改人 + pd2.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间 + List fileList = new ArrayList(); + String signertime = ""; + String SIGNTIME[] = pd.getString("SIGNTIME").split(","); - /**修改 - * @param - * @throws Exception - */ - @RequestMapping(value="/editAcceptStatus") - @ResponseBody - @Transactional - public Object editAcceptStatus(MultipartRequest request) throws Exception{ - Map map = new HashMap(); - String errInfo = "success"; - PageData pd = new PageData(); - pd = this.getPageData(); - PageData pd2 = new PageData(); - pd2 = GFcutRoadService.findById(pd); - pd2.put("OPERATOR", pd.get("OPERATOR")); //修改人 - pd2.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间 + for (int i = 0; i < SIGNTIME.length; i++) { + signertime = SIGNTIME[i]; + fileList.add(request.getFile("file" + i)); + MultipartFile[] fileArr = new MultipartFile[fileList.size()]; + saveImg(fileList.toArray(fileArr), signertime, pd.getString("CUTROAD_ID"), pd.getString("CORPINFO_ID"), pd.getString("ACCEPT_CONFESS_USER_ID"), pd.getString("ACCEPT_CONFESS_DEPARTMENT_ID")); + fileList.clear(); + } + map.put("result", errInfo); + return map; + } - PageData log = new PageData(); - log.put("CUTROADLOG_ID", this.get32UUID()); + private void saveImg(MultipartFile[] files, String signertime, String CUTROAD_ID, String CORPINFO_ID, String ACCEPT_CONFESS_USER_ID, String ACCEPT_CONFESS_DEPARTMENT_ID) throws Exception { + if (files != null && files.length > 0) { + for (int i = 0; i < files.length; i++) { + PageData pd = new PageData(); + pd = this.getPageData(); + MultipartFile file = files[i]; + String ffile = DateUtil.getDays(); + String fileName = this.get32UUID() + file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".")); + Smb.sshSftp(file, fileName, Const.FILEPATHFILE + CORPINFO_ID + "/" + ffile); + pd.put("ACCEPT_CONFESS_USER_SIGNER_TIME", signertime); + pd.put("ACCEPT_CONFESS_ID", this.get32UUID()); + pd.put("OPERATOR", pd.get("OPERATOR")); //修改人 + pd.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间 + pd.put("ACCEPT_CONFESS_USER_SIGNER_PATH", Const.FILEPATHFILE + CORPINFO_ID + "/" + ffile + "/" + fileName); + pd.put("ISDELETE", '0'); + pd.put("CORPINFO_ID", CORPINFO_ID); + pd.put("CUTROAD_ID", CUTROAD_ID); + pd.put("ACCEPT_CONFESS_USER_ID", ACCEPT_CONFESS_USER_ID); + pd.put("ACCEPT_CONFESS_DEPARTMENT_ID", ACCEPT_CONFESS_DEPARTMENT_ID); + pd.put("ACCEPT_USER_ID", ""); + pd.put("ACCEPT_DEPARTMENT_ID", ""); + cutroadacceptuserService.save(pd); + } + } + } + + /** + * 修改 + * + * @param + * @throws Exception + */ + @RequestMapping(value = "/editAcceptStatus") + @ResponseBody + @Transactional + public Object editAcceptStatus(MultipartRequest request) throws Exception { + Map map = new HashMap(); + String errInfo = "success"; + PageData pd = new PageData(); + pd = this.getPageData(); + PageData pd2 = new PageData(); + pd2 = GFcutRoadService.findById(pd); + pd2.put("OPERATOR", pd.get("OPERATOR")); //修改人 + pd2.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间 + + PageData log = new PageData(); + log.put("CUTROADLOG_ID", this.get32UUID()); // log.put("ACTION", "审核打回"); - log.put("CUTROAD_ID", pd.get("CUTROAD_ID")); - log.put("CREATOR",pd.get("ACTION_USER")); - log.put("CREATTIME", DateUtil.date2Str(new Date())); + log.put("CUTROAD_ID", pd.get("CUTROAD_ID")); + log.put("CREATOR", pd.get("ACTION_USER")); + log.put("CREATTIME", DateUtil.date2Str(new Date())); - String status = pd.get("STATUS").toString(); - String OTHER_PROTECTIVE_MEASURES = (StringUtils.isNotBlank(pd2.getString("OTHER_PROTECTIVE_MEASURES")) ? pd2.getString("OTHER_PROTECTIVE_MEASURES") : "") + - (StringUtils.isNotBlank(pd.getString("OTHER_PROTECTIVE_MEASURES")) ? (pd.getString("OTHER_PROTECTIVE_MEASURES") + ";_;") : ";_;"); + String status = pd.get("STATUS").toString(); + String OTHER_PROTECTIVE_MEASURES = (StringUtils.isNotBlank(pd2.getString("OTHER_PROTECTIVE_MEASURES")) ? pd2.getString("OTHER_PROTECTIVE_MEASURES") : "") + + (StringUtils.isNotBlank(pd.getString("OTHER_PROTECTIVE_MEASURES")) ? (pd.getString("OTHER_PROTECTIVE_MEASURES") + ";_;") : ";_;"); // String HAZARD_IDENTIFICATION = (StringUtils.isNotBlank(pd2.getString("HAZARD_IDENTIFICATION")) ? pd2.getString("HAZARD_IDENTIFICATION") : "") + // (StringUtils.isNotBlank(pd.getString("HAZARD_IDENTIFICATION")) ? (pd.getString("HAZARD_IDENTIFICATION") + ";_;") : ";_;"); - //打回清空数据 - pd2.put("OTHER_PROTECTIVE_MEASURES", ""); + //打回清空数据 + pd2.put("OTHER_PROTECTIVE_MEASURES", ""); // pd2.put("HAZARD_IDENTIFICATION", ""); - switch (status) { + switch (status) { - case "6"://验收人 - List fileList = new ArrayList(); - String signertime = ""; - String SIGNTIME[] = pd.getString("SIGNTIME").split(","); + case "6"://验收人 + List fileList = new ArrayList(); + String signertime = ""; + String SIGNTIME[] = pd.getString("SIGNTIME").split(","); - for (int i = 0; i < SIGNTIME.length; i++) { - signertime = SIGNTIME[i]; - fileList.add(request.getFile("file"+i)); - MultipartFile[] fileArr = new MultipartFile[fileList.size()]; - saveAcceptImg(fileList.toArray(fileArr),signertime,pd.getString("BREAKGROUND_ID"),pd.getString("CORPINFO_ID"),pd.getString("ACCEPT_USER_ID"),pd.getString("ACCEPT_DEPARTMENT_ID")); - fileList.clear(); - } - pd2.put("ACCEPT_CONTENT", pd.get("CONTENT")); - pd2.put("OTHER_PROTECTIVE_MEASURES", OTHER_PROTECTIVE_MEASURES); + for (int i = 0; i < SIGNTIME.length; i++) { + signertime = SIGNTIME[i]; + fileList.add(request.getFile("file" + i)); + MultipartFile[] fileArr = new MultipartFile[fileList.size()]; + saveAcceptImg(fileList.toArray(fileArr), signertime, pd.getString("BREAKGROUND_ID"), pd.getString("CORPINFO_ID"), pd.getString("ACCEPT_USER_ID"), pd.getString("ACCEPT_DEPARTMENT_ID")); + fileList.clear(); + } + pd2.put("ACCEPT_CONTENT", pd.get("CONTENT")); + pd2.put("OTHER_PROTECTIVE_MEASURES", OTHER_PROTECTIVE_MEASURES); // pd2.put("HAZARD_IDENTIFICATION", HAZARD_IDENTIFICATION); - pd2.put("APPLY_STATUS", pd.get("APPLY_STATUS")); - GFcutRoadService.edit(pd2); - log.put("ACTION", "验收通过"); + pd2.put("APPLY_STATUS", pd.get("APPLY_STATUS")); + GFcutRoadService.edit(pd2); + log.put("ACTION", "验收通过"); - // 发短信 - this.switchMessages(pd.get("APPLY_STATUS").toString(),pd2); + // 发短信 + this.switchMessages(pd.get("APPLY_STATUS").toString(), pd2); - break; + break; - case "-6"://审批打回 - log.put("ACTION", "验收人打回"); - pd2.put("APPLY_STATUS", pd.get("APPLY_STATUS")); - pd2.put("ACCEPT_CONTENT", pd.get("CONTENT")); - GFcutRoadService.edit(pd2); - // 发短信 - this.switchMessages(pd.get("APPLY_STATUS").toString(),pd2); - break; - default: - break; - } - GFcutRoadLogService.save(log); - map.put("result", errInfo); - return map; - } + case "-6"://审批打回 + log.put("ACTION", "验收人打回"); + pd2.put("APPLY_STATUS", pd.get("APPLY_STATUS")); + pd2.put("ACCEPT_CONTENT", pd.get("CONTENT")); + GFcutRoadService.edit(pd2); + // 发短信 + this.switchMessages(pd.get("APPLY_STATUS").toString(), pd2); + break; + default: + break; + } + GFcutRoadLogService.save(log); + map.put("result", errInfo); + return map; + } - private void saveAcceptImg(MultipartFile[] files,String signertime, String BREAKGROUND_ID, String CORPINFO_ID, String ACCEPT_USER_ID, String ACCEPT_DEPARTMENT_ID) throws Exception{ - if (files != null && files.length > 0) { - for (int i = 0; i < files.length; i++) { - PageData cpd = new PageData(); - cpd = this.getPageData(); - MultipartFile file = files[i]; - String ffile = DateUtil.getDays(); - String fileName = this.get32UUID()+file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".")); - Smb.sshSftp(file, fileName,Const.FILEPATHFILE + CORPINFO_ID + "/" + ffile); - cpd.put("ACCEPT_USER_SIGNER_TIME", signertime); - cpd.put("ACCEPT_CONFESS_ID", this.get32UUID()); - cpd.put("OPERATOR", cpd.get("OPERATOR")); //修改人 - cpd.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间 - cpd.put("ACCEPT_USER_SIGNER_PATH", Const.FILEPATHFILE + CORPINFO_ID + "/" + ffile + "/" + fileName); - cpd.put("ISDELETE", '0'); - cpd.put("CORPINFO_ID", CORPINFO_ID); - cpd.put("BREAKGROUND_ID", BREAKGROUND_ID); - cpd.put("ACCEPT_USER_ID", ACCEPT_USER_ID); - cpd.put("ACCEPT_CONFESS_DEPARTMENT_ID", ""); - cpd.put("ACCEPT_CONFESS_USER_ID", ""); - cpd.put("ACCEPT_DEPARTMENT_ID", ACCEPT_DEPARTMENT_ID); - cutroadacceptuserService.save(cpd); - } - } - } + private void saveAcceptImg(MultipartFile[] files, String signertime, String BREAKGROUND_ID, String CORPINFO_ID, String ACCEPT_USER_ID, String ACCEPT_DEPARTMENT_ID) throws Exception { + if (files != null && files.length > 0) { + for (int i = 0; i < files.length; i++) { + PageData cpd = new PageData(); + cpd = this.getPageData(); + MultipartFile file = files[i]; + String ffile = DateUtil.getDays(); + String fileName = this.get32UUID() + file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".")); + Smb.sshSftp(file, fileName, Const.FILEPATHFILE + CORPINFO_ID + "/" + ffile); + cpd.put("ACCEPT_USER_SIGNER_TIME", signertime); + cpd.put("ACCEPT_CONFESS_ID", this.get32UUID()); + cpd.put("OPERATOR", cpd.get("OPERATOR")); //修改人 + cpd.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间 + cpd.put("ACCEPT_USER_SIGNER_PATH", Const.FILEPATHFILE + CORPINFO_ID + "/" + ffile + "/" + fileName); + cpd.put("ISDELETE", '0'); + cpd.put("CORPINFO_ID", CORPINFO_ID); + cpd.put("BREAKGROUND_ID", BREAKGROUND_ID); + cpd.put("ACCEPT_USER_ID", ACCEPT_USER_ID); + cpd.put("ACCEPT_CONFESS_DEPARTMENT_ID", ""); + cpd.put("ACCEPT_CONFESS_USER_ID", ""); + cpd.put("ACCEPT_DEPARTMENT_ID", ACCEPT_DEPARTMENT_ID); + cutroadacceptuserService.save(cpd); + } + } + } - /**修改 - * @param - * @throws Exception - */ - @RequestMapping(value="/editStatus") - @ResponseBody - @Transactional - public Object editStatus( - @RequestParam(value="FFILE",required=false) MultipartFile[] files - ) throws Exception{ - Map map = new HashMap(); - String errInfo = "success"; - PageData pd = new PageData(); - pd = this.getPageData(); - PageData pd2 = new PageData(); - pd2 = GFcutRoadService.findById(pd); - pd2.put("OPERATOR", pd.get("OPERATOR")); //修改人 - pd2.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间 + /** + * 修改 + * + * @param + * @throws Exception + */ + @RequestMapping(value = "/editStatus") + @ResponseBody + @Transactional + public Object editStatus( + @RequestParam(value = "FFILE", required = false) MultipartFile[] files + ) throws Exception { + Map map = new HashMap(); + String errInfo = "success"; + PageData pd = new PageData(); + pd = this.getPageData(); + PageData pd2 = new PageData(); + pd2 = GFcutRoadService.findById(pd); + pd2.put("OPERATOR", pd.get("OPERATOR")); //修改人 + pd2.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间 - PageData log = new PageData(); - log.put("CUTROADLOG_ID", this.get32UUID()); + PageData log = new PageData(); + log.put("CUTROADLOG_ID", this.get32UUID()); // log.put("ACTION", "审核打回"); - log.put("CUTROAD_ID", pd.get("CUTROAD_ID")); - log.put("CREATOR",pd.get("ACTION_USER")); - log.put("CREATTIME", DateUtil.date2Str(new Date())); + log.put("CUTROAD_ID", pd.get("CUTROAD_ID")); + log.put("CREATOR", pd.get("ACTION_USER")); + log.put("CREATTIME", DateUtil.date2Str(new Date())); - String status = pd.get("STATUS").toString(); - String OTHER_PROTECTIVE_MEASURES = (StringUtils.isNotBlank(pd2.getString("OTHER_PROTECTIVE_MEASURES")) ? pd2.getString("OTHER_PROTECTIVE_MEASURES") : "") + - (StringUtils.isNotBlank(pd.getString("OTHER_PROTECTIVE_MEASURES")) ? (pd.getString("OTHER_PROTECTIVE_MEASURES") + ";_;") : ";_;"); + String status = pd.get("STATUS").toString(); + String OTHER_PROTECTIVE_MEASURES = (StringUtils.isNotBlank(pd2.getString("OTHER_PROTECTIVE_MEASURES")) ? pd2.getString("OTHER_PROTECTIVE_MEASURES") : "") + + (StringUtils.isNotBlank(pd.getString("OTHER_PROTECTIVE_MEASURES")) ? (pd.getString("OTHER_PROTECTIVE_MEASURES") + ";_;") : ";_;"); // String HAZARD_IDENTIFICATION = (StringUtils.isNotBlank(pd2.getString("HAZARD_IDENTIFICATION")) ? pd2.getString("HAZARD_IDENTIFICATION") : "") + // (StringUtils.isNotBlank(pd.getString("HAZARD_IDENTIFICATION")) ? (pd.getString("HAZARD_IDENTIFICATION") + ";_;") : ";_;"); - //打回清空数据 - pd2.put("OTHER_PROTECTIVE_MEASURES", ""); + //打回清空数据 + pd2.put("OTHER_PROTECTIVE_MEASURES", ""); // pd2.put("HAZARD_IDENTIFICATION", ""); - switch (status) { - case "2"://作业负责单位 - if (files != null && files.length > 0) { - MultipartFile file = files[0]; + switch (status) { + case "2"://作业负责单位 + if (files != null && files.length > 0) { + MultipartFile file = files[0]; - 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); + 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); - pd2.put("CONSTRUCTION_USER_SIGNER_PATH", Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile + "/" + fileName); - pd2.put("CONSTRUCTION_USER_SIGNER_TIME", pd.get("SIGNER_TIME")); - pd2.put("CONSTRUCTION_CONTENT", pd.get("CONTENT")); - if (pd2.get("PRODUCTION_USER_ID") == null || StringUtils.isBlank(pd2.getString("PRODUCTION_USER_ID"))) { - OTHER_PROTECTIVE_MEASURES += ";_;"; + pd2.put("CONSTRUCTION_USER_SIGNER_PATH", Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile + "/" + fileName); + pd2.put("CONSTRUCTION_USER_SIGNER_TIME", pd.get("SIGNER_TIME")); + pd2.put("CONSTRUCTION_CONTENT", pd.get("CONTENT")); + if (pd2.get("PRODUCTION_USER_ID") == null || StringUtils.isBlank(pd2.getString("PRODUCTION_USER_ID"))) { + OTHER_PROTECTIVE_MEASURES += ";_;"; // HAZARD_IDENTIFICATION += ";_;"; - if (pd2.get("SAFETY_USER_ID") == null || StringUtils.isBlank(pd2.getString("SAFETY_USER_ID"))) { - OTHER_PROTECTIVE_MEASURES += ";_;"; + if (pd2.get("SAFETY_USER_ID") == null || StringUtils.isBlank(pd2.getString("SAFETY_USER_ID"))) { + OTHER_PROTECTIVE_MEASURES += ";_;"; // HAZARD_IDENTIFICATION += ";_;"; - if (pd2.get("LEADER_USER_ID") == null || StringUtils.isBlank(pd2.getString("LEADER_USER_ID"))) { - OTHER_PROTECTIVE_MEASURES += ";_;"; + if (pd2.get("LEADER_USER_ID") == null || StringUtils.isBlank(pd2.getString("LEADER_USER_ID"))) { + OTHER_PROTECTIVE_MEASURES += ";_;"; // HAZARD_IDENTIFICATION += ";_;"; - } - } - } - pd2.put("OTHER_PROTECTIVE_MEASURES", OTHER_PROTECTIVE_MEASURES); + } + } + } + pd2.put("OTHER_PROTECTIVE_MEASURES", OTHER_PROTECTIVE_MEASURES); // pd2.put("HAZARD_IDENTIFICATION", HAZARD_IDENTIFICATION); - pd2.put("APPLY_STATUS", pd.get("APPLY_STATUS")); - GFcutRoadService.edit(pd2); - log.put("ACTION", "作业负责单位通过"); - GFcutRoadToMeasuresService.delete(pd); - if(pd.get("measuresList")!=null){ - List list = (List) JSON.parse(pd.get("measuresList").toString()); - for (JSONObject json : list) { - PageData measures = new PageData(); - measures.put("CUTROADTOMEASURES_ID", this.get32UUID()); // 主键 - measures.put("CUTROAD_ID", pd.get("CUTROAD_ID")); - measures.put("BUS_CUTROAD_MEASURES_ID", json.get("BUS_CUTROAD_MEASURES_ID")); - measures.put("STATUS", json.get("STATUS")); - measures.put("ANSWER", json.get("ANSWER")); - measures.put("CONFIRM_ID", pd.get("OPERATOR")); - measures.put("CONFIRM_NAME", pd.get("ACTION_USER")); - GFcutRoadToMeasuresService.save(measures); - } - } - // 发短信 - this.switchMessages(pd.get("APPLY_STATUS").toString(),pd2); - } - break; + pd2.put("APPLY_STATUS", pd.get("APPLY_STATUS")); + GFcutRoadService.edit(pd2); + log.put("ACTION", "作业负责单位通过"); + GFcutRoadToMeasuresService.delete(pd); + if (pd.get("measuresList") != null) { + List list = (List) JSON.parse(pd.get("measuresList").toString()); + for (JSONObject json : list) { + PageData measures = new PageData(); + measures.put("CUTROADTOMEASURES_ID", this.get32UUID()); // 主键 + measures.put("CUTROAD_ID", pd.get("CUTROAD_ID")); + measures.put("BUS_CUTROAD_MEASURES_ID", json.get("BUS_CUTROAD_MEASURES_ID")); + measures.put("STATUS", json.get("STATUS")); + measures.put("ANSWER", json.get("ANSWER")); + measures.put("CONFIRM_ID", pd.get("OPERATOR")); + measures.put("CONFIRM_NAME", pd.get("ACTION_USER")); + GFcutRoadToMeasuresService.save(measures); + } + } + // 发短信 + this.switchMessages(pd.get("APPLY_STATUS").toString(), pd2); + } + break; - case "3"://所在单位 - if (files != null && files.length > 0) { - MultipartFile file = files[0]; + case "3"://所在单位 + if (files != null && files.length > 0) { + MultipartFile file = files[0]; // 保存文件 - 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); + 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); - pd2.put("PRODUCTION_USER_SIGNER_PATH", Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile + "/" + fileName); - pd2.put("PRODUCTION_USER_SIGNER_TIME", pd.get("SIGNER_TIME")); - pd2.put("PRODUCTION_CONTENT", pd.get("CONTENT")); - if (pd2.get("SAFETY_USER_ID") == null || StringUtils.isBlank(pd2.getString("SAFETY_USER_ID"))) { - OTHER_PROTECTIVE_MEASURES += ";_;"; + pd2.put("PRODUCTION_USER_SIGNER_PATH", Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile + "/" + fileName); + pd2.put("PRODUCTION_USER_SIGNER_TIME", pd.get("SIGNER_TIME")); + pd2.put("PRODUCTION_CONTENT", pd.get("CONTENT")); + if (pd2.get("SAFETY_USER_ID") == null || StringUtils.isBlank(pd2.getString("SAFETY_USER_ID"))) { + OTHER_PROTECTIVE_MEASURES += ";_;"; // HAZARD_IDENTIFICATION += ";_;"; - if (pd2.get("LEADER_USER_ID") == null || StringUtils.isBlank(pd2.getString("LEADER_USER_ID"))) { - OTHER_PROTECTIVE_MEASURES += ";_;"; + if (pd2.get("LEADER_USER_ID") == null || StringUtils.isBlank(pd2.getString("LEADER_USER_ID"))) { + OTHER_PROTECTIVE_MEASURES += ";_;"; // HAZARD_IDENTIFICATION += ";_;"; - } - } - pd2.put("OTHER_PROTECTIVE_MEASURES", OTHER_PROTECTIVE_MEASURES); + } + } + pd2.put("OTHER_PROTECTIVE_MEASURES", OTHER_PROTECTIVE_MEASURES); // pd2.put("HAZARD_IDENTIFICATION", HAZARD_IDENTIFICATION); - pd2.put("APPLY_STATUS", pd.get("APPLY_STATUS")); - GFcutRoadService.edit(pd2); - log.put("ACTION", "所在单位通过"); + pd2.put("APPLY_STATUS", pd.get("APPLY_STATUS")); + GFcutRoadService.edit(pd2); + log.put("ACTION", "所在单位通过"); - // 发短信 - this.switchMessages(pd.get("APPLY_STATUS").toString(),pd2); - } - break; + // 发短信 + this.switchMessages(pd.get("APPLY_STATUS").toString(), pd2); + } + break; - case "4"://安全部门 - if (files != null && files.length > 0) { - MultipartFile file = files[0]; + case "4"://安全部门 + if (files != null && files.length > 0) { + MultipartFile file = files[0]; - 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); + 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); - pd2.put("SAFETY_USER_SIGNER_PATH", Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile + "/" + fileName); - pd2.put("SAFETY_USER_SIGNER_TIME", pd.get("SIGNER_TIME")); - pd2.put("SAFETY_CONTENT", pd.get("CONTENT")); - if (pd2.get("LEADER_USER_ID") == null || StringUtils.isBlank(pd2.getString("LEADER_USER_ID"))) { - OTHER_PROTECTIVE_MEASURES += ";_;"; + pd2.put("SAFETY_USER_SIGNER_PATH", Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile + "/" + fileName); + pd2.put("SAFETY_USER_SIGNER_TIME", pd.get("SIGNER_TIME")); + pd2.put("SAFETY_CONTENT", pd.get("CONTENT")); + if (pd2.get("LEADER_USER_ID") == null || StringUtils.isBlank(pd2.getString("LEADER_USER_ID"))) { + OTHER_PROTECTIVE_MEASURES += ";_;"; // HAZARD_IDENTIFICATION += ";_;"; - } - pd2.put("OTHER_PROTECTIVE_MEASURES", OTHER_PROTECTIVE_MEASURES); + } + pd2.put("OTHER_PROTECTIVE_MEASURES", OTHER_PROTECTIVE_MEASURES); // pd2.put("HAZARD_IDENTIFICATION", HAZARD_IDENTIFICATION); - pd2.put("APPLY_STATUS", pd.get("APPLY_STATUS")); - GFcutRoadService.edit(pd2); - log.put("ACTION", "安全部门通过"); + pd2.put("APPLY_STATUS", pd.get("APPLY_STATUS")); + GFcutRoadService.edit(pd2); + log.put("ACTION", "安全部门通过"); - // 发短信 - this.switchMessages(pd.get("APPLY_STATUS").toString(),pd2); - } - break; + // 发短信 + this.switchMessages(pd.get("APPLY_STATUS").toString(), pd2); + } + break; - case "5"://审批部门 - if (files != null && files.length > 0) { - MultipartFile file = files[0]; + case "5"://审批部门 + if (files != null && files.length > 0) { + MultipartFile file = files[0]; - 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); + 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); - pd2.put("LEADER_USER_SIGNER_PATH", Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile + "/" + fileName); - pd2.put("LEADER_USER_SIGNER_TIME", pd.get("SIGNER_TIME")); - pd2.put("LEADER_CONTENT", pd.get("CONTENT")); - pd2.put("OTHER_PROTECTIVE_MEASURES", OTHER_PROTECTIVE_MEASURES); + pd2.put("LEADER_USER_SIGNER_PATH", Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile + "/" + fileName); + pd2.put("LEADER_USER_SIGNER_TIME", pd.get("SIGNER_TIME")); + pd2.put("LEADER_CONTENT", pd.get("CONTENT")); + pd2.put("OTHER_PROTECTIVE_MEASURES", OTHER_PROTECTIVE_MEASURES); // pd2.put("HAZARD_IDENTIFICATION", HAZARD_IDENTIFICATION); - pd2.put("APPLY_STATUS", pd.get("APPLY_STATUS")); - GFcutRoadService.edit(pd2); - log.put("ACTION", "审批部门通过"); + pd2.put("APPLY_STATUS", pd.get("APPLY_STATUS")); + GFcutRoadService.edit(pd2); + log.put("ACTION", "审批部门通过"); - // 发短信 - this.switchMessages(pd.get("APPLY_STATUS").toString(),pd2); - } - break; + // 发短信 + this.switchMessages(pd.get("APPLY_STATUS").toString(), pd2); + } + break; - case "6"://验收人 - if (files != null && files.length > 0) { - MultipartFile file = files[0]; + case "6"://验收人 + if (files != null && files.length > 0) { + MultipartFile file = files[0]; - 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); + 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); - pd2.put("ACCEPT_USER_SIGNER_PATH", Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile + "/" + fileName); - pd2.put("ACCEPT_USER_SIGNER_TIME", pd.get("SIGNER_TIME")); - pd2.put("ACCEPT_CONTENT", pd.get("CONTENT")); - pd2.put("OTHER_PROTECTIVE_MEASURES", OTHER_PROTECTIVE_MEASURES); + pd2.put("ACCEPT_USER_SIGNER_PATH", Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile + "/" + fileName); + pd2.put("ACCEPT_USER_SIGNER_TIME", pd.get("SIGNER_TIME")); + pd2.put("ACCEPT_CONTENT", pd.get("CONTENT")); + pd2.put("OTHER_PROTECTIVE_MEASURES", OTHER_PROTECTIVE_MEASURES); // pd2.put("HAZARD_IDENTIFICATION", HAZARD_IDENTIFICATION); - pd2.put("APPLY_STATUS", pd.get("APPLY_STATUS")); - GFcutRoadService.edit(pd2); - log.put("ACTION", "验收通过"); + pd2.put("APPLY_STATUS", pd.get("APPLY_STATUS")); + GFcutRoadService.edit(pd2); + log.put("ACTION", "验收通过"); - // 发短信 - this.switchMessages(pd.get("APPLY_STATUS").toString(),pd2); - } - break; - case "-2"://作业负责单位 - log.put("ACTION", "作业负责单位打回"); - pd2.put("APPLY_STATUS", pd.get("APPLY_STATUS")); - pd2.put("CONSTRUCTION_CONTENT", pd.get("CONTENT")); - GFcutRoadService.edit(pd2); + // 发短信 + this.switchMessages(pd.get("APPLY_STATUS").toString(), pd2); + } + break; + case "-2"://作业负责单位 + log.put("ACTION", "作业负责单位打回"); + pd2.put("APPLY_STATUS", pd.get("APPLY_STATUS")); + pd2.put("CONSTRUCTION_CONTENT", pd.get("CONTENT")); + GFcutRoadService.edit(pd2); - // 发短信 - this.switchMessages(pd.get("APPLY_STATUS").toString(),pd2); - break; - case "-3"://所在单位打回 - log.put("ACTION", "所在单位打回"); - pd2.put("APPLY_STATUS", pd.get("APPLY_STATUS")); - pd2.put("PRODUCTION_CONTENT", pd.get("CONTENT")); - GFcutRoadService.edit(pd2); + // 发短信 + this.switchMessages(pd.get("APPLY_STATUS").toString(), pd2); + break; + case "-3"://所在单位打回 + log.put("ACTION", "所在单位打回"); + pd2.put("APPLY_STATUS", pd.get("APPLY_STATUS")); + pd2.put("PRODUCTION_CONTENT", pd.get("CONTENT")); + GFcutRoadService.edit(pd2); - // 发短信 - this.switchMessages(pd.get("APPLY_STATUS").toString(),pd2); - break; - case "-4"://安全部门打回 - log.put("ACTION", "安全部门打回"); - pd2.put("APPLY_STATUS", pd.get("APPLY_STATUS")); - pd2.put("SAFETY_CONTENT", pd.get("CONTENT")); - GFcutRoadService.edit(pd2); + // 发短信 + this.switchMessages(pd.get("APPLY_STATUS").toString(), pd2); + break; + case "-4"://安全部门打回 + log.put("ACTION", "安全部门打回"); + pd2.put("APPLY_STATUS", pd.get("APPLY_STATUS")); + pd2.put("SAFETY_CONTENT", pd.get("CONTENT")); + GFcutRoadService.edit(pd2); - // 发短信 - this.switchMessages(pd.get("APPLY_STATUS").toString(),pd2); - break; - case "-5"://审批打回 - log.put("ACTION", "审批部门打回"); - pd2.put("APPLY_STATUS", pd.get("APPLY_STATUS")); - pd2.put("LEADER_CONTENT", pd.get("CONTENT")); - GFcutRoadService.edit(pd2); + // 发短信 + this.switchMessages(pd.get("APPLY_STATUS").toString(), pd2); + break; + case "-5"://审批打回 + log.put("ACTION", "审批部门打回"); + pd2.put("APPLY_STATUS", pd.get("APPLY_STATUS")); + pd2.put("LEADER_CONTENT", pd.get("CONTENT")); + GFcutRoadService.edit(pd2); - // 发短信 - this.switchMessages(pd.get("APPLY_STATUS").toString(),pd2); - break; - case "-6"://审批打回 - log.put("ACTION", "验收人打回"); - pd2.put("APPLY_STATUS", pd.get("APPLY_STATUS")); - pd2.put("ACCEPT_CONTENT", pd.get("CONTENT")); - GFcutRoadService.edit(pd2); - // 发短信 - this.switchMessages(pd.get("APPLY_STATUS").toString(),pd2); - break; - default: - break; - } - GFcutRoadLogService.save(log); - map.put("result", errInfo); - return map; - } - /**列表 - * @param page - * @throws Exception - */ - @RequestMapping(value="/jhlist") - @ResponseBody - public Object jhlist(Page page) throws Exception{ - Map map = new HashMap(); - String errInfo = "success"; - PageData pd = new PageData(); - pd = this.getPageData(); - String KEYWORDS = pd.getString("KEYWORDS"); //关键词检索条件 - if(Tools.notEmpty(KEYWORDS))pd.put("KEYWORDS", KEYWORDS.trim()); - page.setPd(pd); - List varList = GFcutRoadService.jhlist(page); //列出confinedspace列表 - map.put("varList", varList); - map.put("page", page); - map.put("result", errInfo); - return map; - } - /**列表 - * @param page - * @throws Exception - */ - @RequestMapping(value="/aqlist") - @ResponseBody - public Object aqlist(Page page) throws Exception{ - Map map = new HashMap(); - String errInfo = "success"; - PageData pd = new PageData(); - pd = this.getPageData(); - String KEYWORDS = pd.getString("KEYWORDS"); //关键词检索条件 - if(Tools.notEmpty(KEYWORDS))pd.put("KEYWORDS", KEYWORDS.trim()); - page.setPd(pd); - List varList = GFcutRoadService.aqlist(page); //列出confinedspace列表 - map.put("varList", varList); - map.put("page", page); - map.put("result", errInfo); - return map; - } - /**列表 - * @param page - * @throws Exception - */ - @RequestMapping(value="/jslist") - @ResponseBody - public Object jslist(Page page) throws Exception{ - Map map = new HashMap(); - String errInfo = "success"; - PageData pd = new PageData(); - pd = this.getPageData(); - String KEYWORDS = pd.getString("KEYWORDS"); //关键词检索条件 - if(Tools.notEmpty(KEYWORDS))pd.put("KEYWORDS", KEYWORDS.trim()); - page.setPd(pd); - List varList = GFcutRoadService.jslist(page); //列出confinedspace列表 - map.put("varList", varList); - map.put("page", page); - map.put("result", errInfo); - return map; - } - /**列表 - * @param page - * @throws Exception - */ - @RequestMapping(value="/list") - @ResponseBody - public Object list(Page page) throws Exception{ - Map map = new HashMap(); - String errInfo = "success"; - PageData pd = new PageData(); - pd = this.getPageData(); - String KEYWORDS = pd.getString("KEYWORDS"); //关键词检索条件 - if(Tools.notEmpty(KEYWORDS))pd.put("KEYWORDS", KEYWORDS.trim()); - page.setPd(pd); - List varList = GFcutRoadService.list(page); //列出CutRoad列表 - map.put("varList", varList); - map.put("page", page); - map.put("result", errInfo); - return map; - } + // 发短信 + this.switchMessages(pd.get("APPLY_STATUS").toString(), pd2); + break; + case "-6"://审批打回 + log.put("ACTION", "验收人打回"); + pd2.put("APPLY_STATUS", pd.get("APPLY_STATUS")); + pd2.put("ACCEPT_CONTENT", pd.get("CONTENT")); + GFcutRoadService.edit(pd2); + // 发短信 + this.switchMessages(pd.get("APPLY_STATUS").toString(), pd2); + break; + default: + break; + } + GFcutRoadLogService.save(log); + map.put("result", errInfo); + return map; + } - /**去修改页面获取数据 - * @param - * @throws Exception - */ - @RequestMapping(value="/goAdd") - @ResponseBody - public Object goAdd() throws Exception{ - Map map = new HashMap(); - String errInfo = "success"; - PageData pd = new PageData(); - map.put("measuresList", GFcutRoadService.listAllMeasures(pd)); - map.put("result", errInfo); - return map; - } + /** + * 列表 + * + * @param page + * @throws Exception + */ + @RequestMapping(value = "/jhlist") + @ResponseBody + public Object jhlist(Page page) throws Exception { + Map map = new HashMap(); + String errInfo = "success"; + PageData pd = new PageData(); + pd = this.getPageData(); + String KEYWORDS = pd.getString("KEYWORDS"); //关键词检索条件 + if (Tools.notEmpty(KEYWORDS)) pd.put("KEYWORDS", KEYWORDS.trim()); + page.setPd(pd); + List varList = GFcutRoadService.jhlist(page); //列出confinedspace列表 + map.put("varList", varList); + map.put("page", page); + map.put("result", errInfo); + return map; + } - /**去修改页面获取数据 - * @param - * @throws Exception - */ - @RequestMapping(value="/goEdit") - @ResponseBody - public Object goEdit() throws Exception{ - Map map = new HashMap(); - String errInfo = "success"; - PageData pd = new PageData(); - pd = this.getPageData(); - pd = GFcutRoadService.findById(pd); //根据ID读取 - map.put("pd", pd); - map.put("measuresList", GFcutRoadService.listAllMeasures(pd)); - map.put("imgList",cutroadacceptuserService.findByIds(pd)); - map.put("imgList1",cutroadacceptuserService.findById(pd)); - map.put("result", errInfo); - return map; - } + /** + * 列表 + * + * @param page + * @throws Exception + */ + @RequestMapping(value = "/aqlist") + @ResponseBody + public Object aqlist(Page page) throws Exception { + Map map = new HashMap(); + String errInfo = "success"; + PageData pd = new PageData(); + pd = this.getPageData(); + String KEYWORDS = pd.getString("KEYWORDS"); //关键词检索条件 + if (Tools.notEmpty(KEYWORDS)) pd.put("KEYWORDS", KEYWORDS.trim()); + page.setPd(pd); + List varList = GFcutRoadService.aqlist(page); //列出confinedspace列表 + map.put("varList", varList); + map.put("page", page); + map.put("result", errInfo); + return map; + } - /**批量删除 - * @param - * @throws Exception - */ - @RequestMapping(value="/deleteAll") - @ResponseBody - public Object deleteAll() throws Exception{ - Map map = new HashMap(); - String errInfo = "success"; - PageData pd = new PageData(); - pd = this.getPageData(); - String DATA_IDS = pd.getString("DATA_IDS"); - if(Tools.notEmpty(DATA_IDS)){ - String ArrayDATA_IDS[] = DATA_IDS.split(","); - GFcutRoadService.deleteAll(ArrayDATA_IDS); - errInfo = "success"; - }else{ - errInfo = "error"; - } - map.put("result", errInfo); //返回结果 - return map; - } + /** + * 列表 + * + * @param page + * @throws Exception + */ + @RequestMapping(value = "/jslist") + @ResponseBody + public Object jslist(Page page) throws Exception { + Map map = new HashMap(); + String errInfo = "success"; + PageData pd = new PageData(); + pd = this.getPageData(); + String KEYWORDS = pd.getString("KEYWORDS"); //关键词检索条件 + if (Tools.notEmpty(KEYWORDS)) pd.put("KEYWORDS", KEYWORDS.trim()); + page.setPd(pd); + List varList = GFcutRoadService.jslist(page); //列出confinedspace列表 + map.put("varList", varList); + map.put("page", page); + map.put("result", errInfo); + return map; + } - /** - * 选择短信模板 - * @param appStatus 阶段 - * @param pd2 参数集合 - * @throws Exception - */ - private void switchMessages(String appStatus, PageData pd2) throws Exception { - PageData mes = new PageData(); + /** + * 列表 + * + * @param page + * @throws Exception + */ + @RequestMapping(value = "/list") + @ResponseBody + public Object list(Page page) throws Exception { + Map map = new HashMap(); + String errInfo = "success"; + PageData pd = new PageData(); + pd = this.getPageData(); + String KEYWORDS = pd.getString("KEYWORDS"); //关键词检索条件 + if (Tools.notEmpty(KEYWORDS)) pd.put("KEYWORDS", KEYWORDS.trim()); + page.setPd(pd); + List varList = GFcutRoadService.list(page); //列出CutRoad列表 + map.put("varList", varList); + map.put("page", page); + map.put("result", errInfo); + return map; + } - List paramsList = new ArrayList(); - PageData params1 = new PageData(); - PageData params2 = new PageData(); - PageData params3 = new PageData(); - PageData params4 = new PageData(); - System.out.println((pd2.get("APPLY_STATUS"))); - switch (appStatus) { - case "2"://作业负责单位 - System.out.println(pd2.get("APPLY_STATUS")); - if("2".equals(pd2.get("APPLY_STATUS"))){ - mes.put("RECEIVER_ID", pd2.get("PRODUCTION_USER_ID"));// 收信人userid - mes.put("templateCode", "DL_Y02");// 短信模板编码 - mes.put("SMSCode", "SMS_227245922");// 短信模板编码 - mes.put("CORPINFO_ID", pd2.get("CORPINFO_ID"));// 企业id - }else if("3".equals(pd2.get("APPLY_STATUS"))){ - mes.put("RECEIVER_ID", pd2.get("SAFETY_USER_ID"));// 收信人userid - mes.put("templateCode", "DL_Y03");// 短信模板编码 - mes.put("SMSCode", "SMS_227245922");// 短信模板编码 - mes.put("CORPINFO_ID", pd2.get("CORPINFO_ID"));// 企业id - }else if("4".equals(pd2.get("APPLY_STATUS"))){ - mes.put("RECEIVER_ID", pd2.get("LEADER_USER_ID"));// 收信人userid - mes.put("templateCode", "DL_Y04");// 短信模板编码 - mes.put("SMSCode", "SMS_227245922");// 短信模板编码 - mes.put("CORPINFO_ID", pd2.get("CORPINFO_ID"));// 企业id - }else if("5".equals(pd2.get("APPLY_STATUS"))){ - mes.put("RECEIVER_ID", pd2.get("ACCEPT_USER_ID"));// 收信人userid - mes.put("templateCode", "DL_Y05");// 短信模板编码 - mes.put("SMSCode", "SMS_227245922");// 短信模板编码 - mes.put("CORPINFO_ID", pd2.get("CORPINFO_ID"));// 企业id - }else if("6".equals(pd2.get("APPLY_STATUS"))){ - mes.put("RECEIVER_ID", pd2.get("APPLY_USER_ID"));// 收信人userid - mes.put("templateCode", "DL_Y06");// 短信模板编码 - mes.put("SMSCode", "SMS_227250920");// 短信模板编码 - mes.put("CORPINFO_ID", pd2.get("CORPINFO_ID"));// 企业id - } - // 发短信 + /** + * 去修改页面获取数据 + * + * @param + * @throws Exception + */ + @RequestMapping(value = "/goAdd") + @ResponseBody + public Object goAdd() throws Exception { + Map map = new HashMap(); + String errInfo = "success"; + PageData pd = new PageData(); + map.put("measuresList", GFcutRoadService.listAllMeasures(pd)); + map.put("result", errInfo); + return map; + } - // 第1个参数 - params1.put("name", "number");// 存入短信模板中的参数名称 - params1.put("value", pd2.get("CHECK_NO"));// 存入上面参数名称所传递的值 - paramsList.add(params1); + /** + * 去修改页面获取数据 + * + * @param + * @throws Exception + */ + @RequestMapping(value = "/goEdit") + @ResponseBody + public Object goEdit() throws Exception { + Map map = new HashMap(); + String errInfo = "success"; + PageData pd = new PageData(); + pd = this.getPageData(); + pd = GFcutRoadService.findById(pd); //根据ID读取 + map.put("pd", pd); + map.put("measuresList", GFcutRoadService.listAllMeasures(pd)); + map.put("imgList", cutroadacceptuserService.findByIds(pd)); + map.put("imgList1", cutroadacceptuserService.findById(pd)); + map.put("result", errInfo); + return map; + } - // 第2个参数 - params2.put("name", "params1");// 存入短信模板中的参数名称 - params2.put("value", "断路作业");// 存入上面参数名称所传递的值 - paramsList.add(params2); - // 第3个参数 - params3.put("name", "params2");// 存入短信模板中的参数名称 - params3.put("value", "所在单位");// 存入上面参数名称所传递的值 - paramsList.add(params3); - // 第4个参数 - params4.put("name", "params3");// 存入短信模板中的参数名称 - params4.put("value", "审核");// 存入上面参数名称所传递的值 - paramsList.add(params4); - sendMessageUtil.sendMessages(mes, paramsList); - break; + /** + * 批量删除 + * + * @param + * @throws Exception + */ + @RequestMapping(value = "/deleteAll") + @ResponseBody + public Object deleteAll() throws Exception { + Map map = new HashMap(); + String errInfo = "success"; + PageData pd = new PageData(); + pd = this.getPageData(); + String DATA_IDS = pd.getString("DATA_IDS"); + if (Tools.notEmpty(DATA_IDS)) { + String ArrayDATA_IDS[] = DATA_IDS.split(","); + GFcutRoadService.deleteAll(ArrayDATA_IDS); + errInfo = "success"; + } else { + errInfo = "error"; + } + map.put("result", errInfo); //返回结果 + return map; + } - case "3"://所在单位 + /** + * 选择短信模板 + * + * @param appStatus 阶段 + * @param pd2 参数集合 + * @throws Exception + */ + private void switchMessages(String appStatus, PageData pd2) throws Exception { + PageData mes = new PageData(); - // 发短信 - if("3".equals(pd2.get("APPLY_STATUS"))){ - mes.put("RECEIVER_ID", pd2.get("SAFETY_USER_ID"));// 收信人userid - mes.put("templateCode", "DL_Y03");// 短信模板编码 - mes.put("SMSCode", "SMS_227245922");// 短信模板编码 - mes.put("CORPINFO_ID", pd2.get("CORPINFO_ID"));// 企业id - }else if("4".equals(pd2.get("APPLY_STATUS"))){ - mes.put("RECEIVER_ID", pd2.get("LEADER_USER_ID"));// 收信人userid - mes.put("templateCode", "DL_Y04");// 短信模板编码 - mes.put("SMSCode", "SMS_227245922");// 短信模板编码 - mes.put("CORPINFO_ID", pd2.get("CORPINFO_ID"));// 企业id - }else if("5".equals(pd2.get("APPLY_STATUS"))){ - mes.put("RECEIVER_ID", pd2.get("ACCEPT_USER_ID"));// 收信人userid - mes.put("templateCode", "DL_Y05");// 短信模板编码 - mes.put("SMSCode", "SMS_227245922");// 短信模板编码 - mes.put("CORPINFO_ID", pd2.get("CORPINFO_ID"));// 企业id - }else if("6".equals(pd2.get("APPLY_STATUS"))){ - mes.put("RECEIVER_ID", pd2.get("APPLY_USER_ID"));// 收信人userid - mes.put("templateCode", "DL_Y06");// 短信模板编码 - mes.put("SMSCode", "SMS_227250920");// 短信模板编码 - mes.put("CORPINFO_ID", pd2.get("CORPINFO_ID"));// 企业id - } - // 第1个参数 - params1.put("name", "number");// 存入短信模板中的参数名称 - params1.put("value", pd2.get("CHECK_NO"));// 存入上面参数名称所传递的值 - paramsList.add(params1); + List paramsList = new ArrayList(); + PageData params1 = new PageData(); + PageData params2 = new PageData(); + PageData params3 = new PageData(); + PageData params4 = new PageData(); + System.out.println((pd2.get("APPLY_STATUS"))); + switch (appStatus) { + case "2"://作业负责单位 + System.out.println(pd2.get("APPLY_STATUS")); + if ("2".equals(pd2.get("APPLY_STATUS"))) { + mes.put("RECEIVER_ID", pd2.get("PRODUCTION_USER_ID"));// 收信人userid + mes.put("templateCode", "DL_Y02");// 短信模板编码 + mes.put("SMSCode", "SMS_227245922");// 短信模板编码 + mes.put("CORPINFO_ID", pd2.get("CORPINFO_ID"));// 企业id + } else if ("3".equals(pd2.get("APPLY_STATUS"))) { + mes.put("RECEIVER_ID", pd2.get("SAFETY_USER_ID"));// 收信人userid + mes.put("templateCode", "DL_Y03");// 短信模板编码 + mes.put("SMSCode", "SMS_227245922");// 短信模板编码 + mes.put("CORPINFO_ID", pd2.get("CORPINFO_ID"));// 企业id + } else if ("4".equals(pd2.get("APPLY_STATUS"))) { + mes.put("RECEIVER_ID", pd2.get("LEADER_USER_ID"));// 收信人userid + mes.put("templateCode", "DL_Y04");// 短信模板编码 + mes.put("SMSCode", "SMS_227245922");// 短信模板编码 + mes.put("CORPINFO_ID", pd2.get("CORPINFO_ID"));// 企业id + } else if ("5".equals(pd2.get("APPLY_STATUS"))) { + mes.put("RECEIVER_ID", pd2.get("ACCEPT_USER_ID"));// 收信人userid + mes.put("templateCode", "DL_Y05");// 短信模板编码 + mes.put("SMSCode", "SMS_227245922");// 短信模板编码 + mes.put("CORPINFO_ID", pd2.get("CORPINFO_ID"));// 企业id + } else if ("6".equals(pd2.get("APPLY_STATUS"))) { + mes.put("RECEIVER_ID", pd2.get("APPLY_USER_ID"));// 收信人userid + mes.put("templateCode", "DL_Y06");// 短信模板编码 + mes.put("SMSCode", "SMS_227250920");// 短信模板编码 + mes.put("CORPINFO_ID", pd2.get("CORPINFO_ID"));// 企业id + } + // 发短信 - // 第2个参数 - params2.put("name", "params1");// 存入短信模板中的参数名称 - params2.put("value", "断路作业");// 存入上面参数名称所传递的值 - paramsList.add(params2); - // 第3个参数 - params3.put("name", "params2");// 存入短信模板中的参数名称 - params3.put("value", "安全部门");// 存入上面参数名称所传递的值 - paramsList.add(params3); - // 第4个参数 - params4.put("name", "params3");// 存入短信模板中的参数名称 - params4.put("value", "审核");// 存入上面参数名称所传递的值 - paramsList.add(params4); - sendMessageUtil.sendMessages(mes, paramsList); - break; + // 第1个参数 + params1.put("name", "number");// 存入短信模板中的参数名称 + params1.put("value", pd2.get("CHECK_NO"));// 存入上面参数名称所传递的值 + paramsList.add(params1); - case "4"://安全部门 + // 第2个参数 + params2.put("name", "params1");// 存入短信模板中的参数名称 + params2.put("value", "断路作业");// 存入上面参数名称所传递的值 + paramsList.add(params2); + // 第3个参数 + params3.put("name", "params2");// 存入短信模板中的参数名称 + params3.put("value", "所在单位");// 存入上面参数名称所传递的值 + paramsList.add(params3); + // 第4个参数 + params4.put("name", "params3");// 存入短信模板中的参数名称 + params4.put("value", "审核");// 存入上面参数名称所传递的值 + paramsList.add(params4); + sendMessageUtil.sendMessages(mes, paramsList); + break; - // 发短信 - if("4".equals(pd2.get("APPLY_STATUS"))){ - mes.put("RECEIVER_ID", pd2.get("LEADER_USER_ID"));// 收信人userid - mes.put("templateCode", "DL_Y04");// 短信模板编码 - mes.put("SMSCode", "SMS_227245922");// 短信模板编码 - mes.put("CORPINFO_ID", pd2.get("CORPINFO_ID"));// 企业id - }else if("5".equals(pd2.get("APPLY_STATUS"))){ - mes.put("RECEIVER_ID", pd2.get("ACCEPT_USER_ID"));// 收信人userid - mes.put("templateCode", "DL_Y05");// 短信模板编码 - mes.put("SMSCode", "SMS_227245922");// 短信模板编码 - mes.put("CORPINFO_ID", pd2.get("CORPINFO_ID"));// 企业id - }else if("6".equals(pd2.get("APPLY_STATUS"))){ - mes.put("RECEIVER_ID", pd2.get("APPLY_USER_ID"));// 收信人userid - mes.put("templateCode", "DL_Y06");// 短信模板编码 - mes.put("SMSCode", "SMS_227250920");// 短信模板编码 - mes.put("CORPINFO_ID", pd2.get("CORPINFO_ID"));// 企业id - } - // 第1个参数 - params1.put("name", "number");// 存入短信模板中的参数名称 - params1.put("value", pd2.get("CHECK_NO"));// 存入上面参数名称所传递的值 - paramsList.add(params1); + case "3"://所在单位 - // 第2个参数 - params2.put("name", "params1");// 存入短信模板中的参数名称 - params2.put("value", "断路作业");// 存入上面参数名称所传递的值 - paramsList.add(params2); - // 第3个参数 - params3.put("name", "params2");// 存入短信模板中的参数名称 - params3.put("value", "审批部门");// 存入上面参数名称所传递的值 - paramsList.add(params3); - // 第4个参数 - params4.put("name", "params3");// 存入短信模板中的参数名称 - params4.put("value", "审批");// 存入上面参数名称所传递的值 - paramsList.add(params4); - sendMessageUtil.sendMessages(mes, paramsList); - break; + // 发短信 + if ("3".equals(pd2.get("APPLY_STATUS"))) { + mes.put("RECEIVER_ID", pd2.get("SAFETY_USER_ID"));// 收信人userid + mes.put("templateCode", "DL_Y03");// 短信模板编码 + mes.put("SMSCode", "SMS_227245922");// 短信模板编码 + mes.put("CORPINFO_ID", pd2.get("CORPINFO_ID"));// 企业id + } else if ("4".equals(pd2.get("APPLY_STATUS"))) { + mes.put("RECEIVER_ID", pd2.get("LEADER_USER_ID"));// 收信人userid + mes.put("templateCode", "DL_Y04");// 短信模板编码 + mes.put("SMSCode", "SMS_227245922");// 短信模板编码 + mes.put("CORPINFO_ID", pd2.get("CORPINFO_ID"));// 企业id + } else if ("5".equals(pd2.get("APPLY_STATUS"))) { + mes.put("RECEIVER_ID", pd2.get("ACCEPT_USER_ID"));// 收信人userid + mes.put("templateCode", "DL_Y05");// 短信模板编码 + mes.put("SMSCode", "SMS_227245922");// 短信模板编码 + mes.put("CORPINFO_ID", pd2.get("CORPINFO_ID"));// 企业id + } else if ("6".equals(pd2.get("APPLY_STATUS"))) { + mes.put("RECEIVER_ID", pd2.get("APPLY_USER_ID"));// 收信人userid + mes.put("templateCode", "DL_Y06");// 短信模板编码 + mes.put("SMSCode", "SMS_227250920");// 短信模板编码 + mes.put("CORPINFO_ID", pd2.get("CORPINFO_ID"));// 企业id + } + // 第1个参数 + params1.put("name", "number");// 存入短信模板中的参数名称 + params1.put("value", pd2.get("CHECK_NO"));// 存入上面参数名称所传递的值 + paramsList.add(params1); - case "5"://审批部门 + // 第2个参数 + params2.put("name", "params1");// 存入短信模板中的参数名称 + params2.put("value", "断路作业");// 存入上面参数名称所传递的值 + paramsList.add(params2); + // 第3个参数 + params3.put("name", "params2");// 存入短信模板中的参数名称 + params3.put("value", "安全部门");// 存入上面参数名称所传递的值 + paramsList.add(params3); + // 第4个参数 + params4.put("name", "params3");// 存入短信模板中的参数名称 + params4.put("value", "审核");// 存入上面参数名称所传递的值 + paramsList.add(params4); + sendMessageUtil.sendMessages(mes, paramsList); + break; - // 发短信 - if("4".equals(pd2.get("APPLY_STATUS"))){ - mes.put("RECEIVER_ID", pd2.get("ACCEPT_USER_ID"));// 收信人userid - mes.put("templateCode", "DL_Y05");// 短信模板编码 - mes.put("SMSCode", "SMS_227245922");// 短信模板编码 - mes.put("CORPINFO_ID", pd2.get("CORPINFO_ID"));// 企业id - }else if("5".equals(pd2.get("APPLY_STATUS"))){ - mes.put("RECEIVER_ID", pd2.get("APPLY_USER_ID"));// 收信人userid - mes.put("templateCode", "DL_Y06");// 短信模板编码 - mes.put("SMSCode", "SMS_227250920");// 短信模板编码 - mes.put("CORPINFO_ID", pd2.get("CORPINFO_ID"));// 企业id - } - // 第1个参数 - params1.put("name", "number");// 存入短信模板中的参数名称 - params1.put("value", pd2.get("CHECK_NO"));// 存入上面参数名称所传递的值 - paramsList.add(params1); + case "4"://安全部门 - // 第2个参数 - params2.put("name", "params1");// 存入短信模板中的参数名称 - params2.put("value", "断路作业");// 存入上面参数名称所传递的值 - paramsList.add(params2); - // 第3个参数 - params3.put("name", "params2");// 存入短信模板中的参数名称 - params3.put("value", "验收");// 存入上面参数名称所传递的值 - paramsList.add(params3); - // 第4个参数 - params4.put("name", "params3");// 存入短信模板中的参数名称 - params4.put("value", "验收");// 存入上面参数名称所传递的值 - paramsList.add(params4); - sendMessageUtil.sendMessages(mes, paramsList); - break; + // 发短信 + if ("4".equals(pd2.get("APPLY_STATUS"))) { + mes.put("RECEIVER_ID", pd2.get("LEADER_USER_ID"));// 收信人userid + mes.put("templateCode", "DL_Y04");// 短信模板编码 + mes.put("SMSCode", "SMS_227245922");// 短信模板编码 + mes.put("CORPINFO_ID", pd2.get("CORPINFO_ID"));// 企业id + } else if ("5".equals(pd2.get("APPLY_STATUS"))) { + mes.put("RECEIVER_ID", pd2.get("ACCEPT_USER_ID"));// 收信人userid + mes.put("templateCode", "DL_Y05");// 短信模板编码 + mes.put("SMSCode", "SMS_227245922");// 短信模板编码 + mes.put("CORPINFO_ID", pd2.get("CORPINFO_ID"));// 企业id + } else if ("6".equals(pd2.get("APPLY_STATUS"))) { + mes.put("RECEIVER_ID", pd2.get("APPLY_USER_ID"));// 收信人userid + mes.put("templateCode", "DL_Y06");// 短信模板编码 + mes.put("SMSCode", "SMS_227250920");// 短信模板编码 + mes.put("CORPINFO_ID", pd2.get("CORPINFO_ID"));// 企业id + } + // 第1个参数 + params1.put("name", "number");// 存入短信模板中的参数名称 + params1.put("value", pd2.get("CHECK_NO"));// 存入上面参数名称所传递的值 + paramsList.add(params1); - case "6"://验收人 + // 第2个参数 + params2.put("name", "params1");// 存入短信模板中的参数名称 + params2.put("value", "断路作业");// 存入上面参数名称所传递的值 + paramsList.add(params2); + // 第3个参数 + params3.put("name", "params2");// 存入短信模板中的参数名称 + params3.put("value", "审批部门");// 存入上面参数名称所传递的值 + paramsList.add(params3); + // 第4个参数 + params4.put("name", "params3");// 存入短信模板中的参数名称 + params4.put("value", "审批");// 存入上面参数名称所传递的值 + paramsList.add(params4); + sendMessageUtil.sendMessages(mes, paramsList); + break; - // 发短信 - mes.put("RECEIVER_ID", pd2.get("APPLY_USER_ID"));// 收信人userid - mes.put("templateCode", "DL_Y06");// 短信模板编码 - mes.put("SMSCode", "SMS_227250920");// 短信模板编码 - mes.put("CORPINFO_ID", pd2.get("CORPINFO_ID"));// 企业id - // 第1个参数 - params1.put("name", "number");// 存入短信模板中的参数名称 - params1.put("value", pd2.get("CHECK_NO"));// 存入上面参数名称所传递的值 - paramsList.add(params1); + case "5"://审批部门 - // 第2个参数 - params2.put("name", "type");// 存入短信模板中的参数名称 - params2.put("value", "断路作业");// 存入上面参数名称所传递的值 - paramsList.add(params2); - sendMessageUtil.sendMessages(mes, paramsList); - break; - case "-2"://作业负责单位 - // 发短信 - mes.put("RECEIVER_ID", pd2.get("APPLY_USER_ID"));// 收信人userid - mes.put("templateCode", "DL_N02");// 短信模板编码 - mes.put("SMSCode", "SMS_223580715");// 短信模板编码 - mes.put("CORPINFO_ID", pd2.get("CORPINFO_ID"));// 企业id - // 第1个参数 - params1.put("name", "params1");// 存入短信模板中的参数名称 - params1.put("value", pd2.get("CHECK_NO"));// 存入上面参数名称所传递的值 - paramsList.add(params1); + // 发短信 + if ("4".equals(pd2.get("APPLY_STATUS"))) { + mes.put("RECEIVER_ID", pd2.get("ACCEPT_USER_ID"));// 收信人userid + mes.put("templateCode", "DL_Y05");// 短信模板编码 + mes.put("SMSCode", "SMS_227245922");// 短信模板编码 + mes.put("CORPINFO_ID", pd2.get("CORPINFO_ID"));// 企业id + } else if ("5".equals(pd2.get("APPLY_STATUS"))) { + mes.put("RECEIVER_ID", pd2.get("APPLY_USER_ID"));// 收信人userid + mes.put("templateCode", "DL_Y06");// 短信模板编码 + mes.put("SMSCode", "SMS_227250920");// 短信模板编码 + mes.put("CORPINFO_ID", pd2.get("CORPINFO_ID"));// 企业id + } + // 第1个参数 + params1.put("name", "number");// 存入短信模板中的参数名称 + params1.put("value", pd2.get("CHECK_NO"));// 存入上面参数名称所传递的值 + paramsList.add(params1); - // 第2个参数 - params2.put("name", "params2");// 存入短信模板中的参数名称 - params2.put("value", "断路作业");// 存入上面参数名称所传递的值 - paramsList.add(params2); - // 第3个参数 - params3.put("name", "params3");// 存入短信模板中的参数名称 - params3.put("value", "作业负责单位");// 存入上面参数名称所传递的值 - paramsList.add(params3); - sendMessageUtil.sendMessages(mes, paramsList); - break; - case "-3"://所在单位打回 - // 发短信 - mes.put("RECEIVER_ID", pd2.get("APPLY_USER_ID"));// 收信人userid - mes.put("templateCode", "DL_N03");// 短信模板编码 - mes.put("SMSCode", "SMS_223580715");// 短信模板编码 - mes.put("CORPINFO_ID", pd2.get("CORPINFO_ID"));// 企业id - // 第1个参数 - params1.put("name", "params1");// 存入短信模板中的参数名称 - params1.put("value", pd2.get("CHECK_NO"));// 存入上面参数名称所传递的值 - paramsList.add(params1); + // 第2个参数 + params2.put("name", "params1");// 存入短信模板中的参数名称 + params2.put("value", "断路作业");// 存入上面参数名称所传递的值 + paramsList.add(params2); + // 第3个参数 + params3.put("name", "params2");// 存入短信模板中的参数名称 + params3.put("value", "验收");// 存入上面参数名称所传递的值 + paramsList.add(params3); + // 第4个参数 + params4.put("name", "params3");// 存入短信模板中的参数名称 + params4.put("value", "验收");// 存入上面参数名称所传递的值 + paramsList.add(params4); + sendMessageUtil.sendMessages(mes, paramsList); + break; - // 第2个参数 - params2.put("name", "params2");// 存入短信模板中的参数名称 - params2.put("value", "断路作业");// 存入上面参数名称所传递的值 - paramsList.add(params2); - // 第3个参数 - params3.put("name", "params3");// 存入短信模板中的参数名称 - params3.put("value", "所在单位");// 存入上面参数名称所传递的值 - paramsList.add(params3); - sendMessageUtil.sendMessages(mes, paramsList); - break; - case "-4"://安全部门打回 + case "6"://验收人 - // 发短信 - mes.put("RECEIVER_ID", pd2.get("APPLY_USER_ID"));// 收信人userid - mes.put("templateCode", "DL_N04");// 短信模板编码 - mes.put("SMSCode", "SMS_223580715");// 短信模板编码 - mes.put("CORPINFO_ID", pd2.get("CORPINFO_ID"));// 企业id - // 第1个参数 - params1.put("name", "params1");// 存入短信模板中的参数名称 - params1.put("value", pd2.get("CHECK_NO"));// 存入上面参数名称所传递的值 - paramsList.add(params1); + // 发短信 + mes.put("RECEIVER_ID", pd2.get("APPLY_USER_ID"));// 收信人userid + mes.put("templateCode", "DL_Y06");// 短信模板编码 + mes.put("SMSCode", "SMS_227250920");// 短信模板编码 + mes.put("CORPINFO_ID", pd2.get("CORPINFO_ID"));// 企业id + // 第1个参数 + params1.put("name", "number");// 存入短信模板中的参数名称 + params1.put("value", pd2.get("CHECK_NO"));// 存入上面参数名称所传递的值 + paramsList.add(params1); - // 第2个参数 - params2.put("name", "params2");// 存入短信模板中的参数名称 - params2.put("value", "断路作业");// 存入上面参数名称所传递的值 - paramsList.add(params2); - // 第3个参数 - params3.put("name", "params3");// 存入短信模板中的参数名称 - params3.put("value", "安全部门");// 存入上面参数名称所传递的值 - paramsList.add(params3); - sendMessageUtil.sendMessages(mes, paramsList); - break; - case "-5"://审批打回 - // 发短信 - mes.put("RECEIVER_ID", pd2.get("APPLY_USER_ID"));// 收信人userid - mes.put("templateCode", "DL_N05");// 短信模板编码 - mes.put("SMSCode", "SMS_223580715");// 短信模板编码 - mes.put("CORPINFO_ID", pd2.get("CORPINFO_ID"));// 企业id - // 第1个参数 - params1.put("name", "params1");// 存入短信模板中的参数名称 - params1.put("value", pd2.get("CHECK_NO"));// 存入上面参数名称所传递的值 - paramsList.add(params1); + // 第2个参数 + params2.put("name", "type");// 存入短信模板中的参数名称 + params2.put("value", "断路作业");// 存入上面参数名称所传递的值 + paramsList.add(params2); + sendMessageUtil.sendMessages(mes, paramsList); + break; + case "-2"://作业负责单位 + // 发短信 + mes.put("RECEIVER_ID", pd2.get("APPLY_USER_ID"));// 收信人userid + mes.put("templateCode", "DL_N02");// 短信模板编码 + mes.put("SMSCode", "SMS_223580715");// 短信模板编码 + mes.put("CORPINFO_ID", pd2.get("CORPINFO_ID"));// 企业id + // 第1个参数 + params1.put("name", "params1");// 存入短信模板中的参数名称 + params1.put("value", pd2.get("CHECK_NO"));// 存入上面参数名称所传递的值 + paramsList.add(params1); - // 第2个参数 - params2.put("name", "params2");// 存入短信模板中的参数名称 - params2.put("value", "断路作业");// 存入上面参数名称所传递的值 - paramsList.add(params2); - // 第3个参数 - params3.put("name", "params3");// 存入短信模板中的参数名称 - params3.put("value", "审批部门");// 存入上面参数名称所传递的值 - paramsList.add(params3); - sendMessageUtil.sendMessages(mes, paramsList); - break; - case "-6"://验收打回 - // 发短信 - mes.put("RECEIVER_ID", pd2.get("APPLY_USER_ID"));// 收信人userid - mes.put("templateCode", "DL_N06");// 短信模板编码 - mes.put("SMSCode", "SMS_223580715");// 短信模板编码 - mes.put("CORPINFO_ID", pd2.get("CORPINFO_ID"));// 企业id - // 第1个参数 - params1.put("name", "params1");// 存入短信模板中的参数名称 - params1.put("value", pd2.get("CHECK_NO"));// 存入上面参数名称所传递的值 - paramsList.add(params1); + // 第2个参数 + params2.put("name", "params2");// 存入短信模板中的参数名称 + params2.put("value", "断路作业");// 存入上面参数名称所传递的值 + paramsList.add(params2); + // 第3个参数 + params3.put("name", "params3");// 存入短信模板中的参数名称 + params3.put("value", "作业负责单位");// 存入上面参数名称所传递的值 + paramsList.add(params3); + sendMessageUtil.sendMessages(mes, paramsList); + break; + case "-3"://所在单位打回 + // 发短信 + mes.put("RECEIVER_ID", pd2.get("APPLY_USER_ID"));// 收信人userid + mes.put("templateCode", "DL_N03");// 短信模板编码 + mes.put("SMSCode", "SMS_223580715");// 短信模板编码 + mes.put("CORPINFO_ID", pd2.get("CORPINFO_ID"));// 企业id + // 第1个参数 + params1.put("name", "params1");// 存入短信模板中的参数名称 + params1.put("value", pd2.get("CHECK_NO"));// 存入上面参数名称所传递的值 + paramsList.add(params1); - // 第2个参数 - params2.put("name", "params2");// 存入短信模板中的参数名称 - params2.put("value", "断路作业");// 存入上面参数名称所传递的值 - paramsList.add(params2); - // 第3个参数 - params3.put("name", "params3");// 存入短信模板中的参数名称 - params3.put("value", "验收部门");// 存入上面参数名称所传递的值 - paramsList.add(params3); - sendMessageUtil.sendMessages(mes, paramsList); - break; - default: - break; - } - } + // 第2个参数 + params2.put("name", "params2");// 存入短信模板中的参数名称 + params2.put("value", "断路作业");// 存入上面参数名称所传递的值 + paramsList.add(params2); + // 第3个参数 + params3.put("name", "params3");// 存入短信模板中的参数名称 + params3.put("value", "所在单位");// 存入上面参数名称所传递的值 + paramsList.add(params3); + sendMessageUtil.sendMessages(mes, paramsList); + break; + case "-4"://安全部门打回 - /**待办作业数统计 - * @param - * @throws Exception - */ - @RequestMapping(value="/countCheck") - @ResponseBody - public Object countCheck() throws Exception{ - Map map = new HashMap(); - String errInfo = "success"; - PageData pd = new PageData(); - pd = this.getPageData(); - PageData count = GFcutRoadService.countCheck(pd); - map.put("result", errInfo); - map.put("count", count); - return map; - } + // 发短信 + mes.put("RECEIVER_ID", pd2.get("APPLY_USER_ID"));// 收信人userid + mes.put("templateCode", "DL_N04");// 短信模板编码 + mes.put("SMSCode", "SMS_223580715");// 短信模板编码 + mes.put("CORPINFO_ID", pd2.get("CORPINFO_ID"));// 企业id + // 第1个参数 + params1.put("name", "params1");// 存入短信模板中的参数名称 + params1.put("value", pd2.get("CHECK_NO"));// 存入上面参数名称所传递的值 + paramsList.add(params1); + + // 第2个参数 + params2.put("name", "params2");// 存入短信模板中的参数名称 + params2.put("value", "断路作业");// 存入上面参数名称所传递的值 + paramsList.add(params2); + // 第3个参数 + params3.put("name", "params3");// 存入短信模板中的参数名称 + params3.put("value", "安全部门");// 存入上面参数名称所传递的值 + paramsList.add(params3); + sendMessageUtil.sendMessages(mes, paramsList); + break; + case "-5"://审批打回 + // 发短信 + mes.put("RECEIVER_ID", pd2.get("APPLY_USER_ID"));// 收信人userid + mes.put("templateCode", "DL_N05");// 短信模板编码 + mes.put("SMSCode", "SMS_223580715");// 短信模板编码 + mes.put("CORPINFO_ID", pd2.get("CORPINFO_ID"));// 企业id + // 第1个参数 + params1.put("name", "params1");// 存入短信模板中的参数名称 + params1.put("value", pd2.get("CHECK_NO"));// 存入上面参数名称所传递的值 + paramsList.add(params1); + + // 第2个参数 + params2.put("name", "params2");// 存入短信模板中的参数名称 + params2.put("value", "断路作业");// 存入上面参数名称所传递的值 + paramsList.add(params2); + // 第3个参数 + params3.put("name", "params3");// 存入短信模板中的参数名称 + params3.put("value", "审批部门");// 存入上面参数名称所传递的值 + paramsList.add(params3); + sendMessageUtil.sendMessages(mes, paramsList); + break; + case "-6"://验收打回 + // 发短信 + mes.put("RECEIVER_ID", pd2.get("APPLY_USER_ID"));// 收信人userid + mes.put("templateCode", "DL_N06");// 短信模板编码 + mes.put("SMSCode", "SMS_223580715");// 短信模板编码 + mes.put("CORPINFO_ID", pd2.get("CORPINFO_ID"));// 企业id + // 第1个参数 + params1.put("name", "params1");// 存入短信模板中的参数名称 + params1.put("value", pd2.get("CHECK_NO"));// 存入上面参数名称所传递的值 + paramsList.add(params1); + + // 第2个参数 + params2.put("name", "params2");// 存入短信模板中的参数名称 + params2.put("value", "断路作业");// 存入上面参数名称所传递的值 + paramsList.add(params2); + // 第3个参数 + params3.put("name", "params3");// 存入短信模板中的参数名称 + params3.put("value", "验收部门");// 存入上面参数名称所传递的值 + paramsList.add(params3); + sendMessageUtil.sendMessages(mes, paramsList); + break; + default: + break; + } + } + + /** + * 待办作业数统计 + * + * @param + * @throws Exception + */ + @RequestMapping(value = "/countCheck") + @ResponseBody + public Object countCheck() throws Exception { + Map map = new HashMap(); + String errInfo = "success"; + PageData pd = new PageData(); + pd = this.getPageData(); + PageData count = GFcutRoadService.countCheck(pd); + map.put("result", errInfo); + map.put("count", count); + return map; + } } diff --git a/src/main/java/com/zcloud/controller/gf/AppGFHighWorkController.java b/src/main/java/com/zcloud/controller/gf/AppGFHighWorkController.java index 0acf912e..96aa845c 100644 --- a/src/main/java/com/zcloud/controller/gf/AppGFHighWorkController.java +++ b/src/main/java/com/zcloud/controller/gf/AppGFHighWorkController.java @@ -2,6 +2,7 @@ package com.zcloud.controller.gf; 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; @@ -76,6 +77,7 @@ public class AppGFHighWorkController extends BaseController { @RequestMapping(value="/add") @ResponseBody @Transactional + @DockAnnotation public Object add() throws Exception{ Map map = new HashMap(); String errInfo = "success"; @@ -101,12 +103,14 @@ public class AppGFHighWorkController extends BaseController { if(pd.get("APPLY_STATUS").equals("1")) { PageData log = new PageData(); + log.put("HIGHWORKLOG_ID", this.get32UUID()); log.put("ACTION", "提交申请"); log.put("HIGHWORK_ID", pd.get("HIGHWORK_ID")); log.put("CREATOR",pd.get("ACTION_USER")); log.put("CREATTIME", DateUtil.date2Str(new Date())); GFhighWorkLogService.save(log); + pd.put("logData",JSON.toJSONString(log)); // 发短信 PageData mes = new PageData(); @@ -139,6 +143,7 @@ public class AppGFHighWorkController extends BaseController { sendMessageUtil.sendMessages(mes, paramsList); } map.put("result", errInfo); + map.put("dockData", JSON.toJSONString(pd)); return map; } @@ -148,6 +153,7 @@ public class AppGFHighWorkController extends BaseController { */ @RequestMapping(value="/delete") @ResponseBody + @DockAnnotation public Object delete() throws Exception{ Map map = new HashMap(); String errInfo = "success"; @@ -155,6 +161,7 @@ public class AppGFHighWorkController extends BaseController { pd = this.getPageData(); GFhighworkService.delete(pd); map.put("result", errInfo); //返回结果 + map.put("dockData", JSON.toJSONString(pd)); //返回结果 return map; } @@ -221,6 +228,7 @@ public class AppGFHighWorkController extends BaseController { @RequestMapping(value="/editGuardian") @ResponseBody @Transactional + @DockAnnotation(hasAnnex = true) public Object editGuardian( @RequestParam(value="FFILE",required=false) MultipartFile[] files ) throws Exception{ @@ -232,13 +240,14 @@ public class AppGFHighWorkController extends BaseController { pd2 = GFhighworkService.findById(pd); pd2.put("OPERATOR", pd.get("OPERATOR")); //修改人 pd2.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间 + ArrayList sendPicturesList = new ArrayList<>(); if (files != null && files.length > 0) { MultipartFile file = files[0]; 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); - + sendPicturesList.add(Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile + "/" + fileName+"@@"+fileName); pd2.put("GUARDIAN_USER_SIGNER_PATH", Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile + "/" + fileName); pd2.put("GUARDIAN_USER_SIGNER_TIME", pd.get("SIGNER_TIME")); // pd2.put("GUARDIAN_CONTENT", pd.get("CONTENT")); @@ -288,6 +297,8 @@ public class AppGFHighWorkController extends BaseController { // sendMessageUtil.sendMessages(mes, paramsList); // } map.put("result", errInfo); + map.put("dockData", JSON.toJSONString(pd2)); + map.put("sendPicturesList", JSON.toJSONString(sendPicturesList)); return map; } /**修改 @@ -297,6 +308,7 @@ public class AppGFHighWorkController extends BaseController { @RequestMapping(value="/editConfess") @ResponseBody @Transactional + @DockAnnotation(hasAnnex = true) public Object editConfess( @RequestParam(value="FFILE",required=false) MultipartFile[] files ) throws Exception{ @@ -306,6 +318,7 @@ public class AppGFHighWorkController extends BaseController { pd = this.getPageData(); PageData pd2 = new PageData(); pd2 = GFhighworkService.findById(pd); + ArrayList sendPicturesList = new ArrayList<>(); pd2.put("OPERATOR", pd.get("OPERATOR")); //修改人 pd2.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间 if (files != null && files.length > 0) { @@ -314,7 +327,7 @@ public class AppGFHighWorkController 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); - + sendPicturesList.add(Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile + "/" + fileName+"@@"+fileName); pd2.put("CONFESS_USER_SIGNER_PATH", Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile + "/" + fileName); pd2.put("CONFESS_USER_SIGNER_TIME", pd.get("SIGNER_TIME")); // pd2.put("GUARDIAN_CONTENT", pd.get("CONTENT")); @@ -322,6 +335,8 @@ public class AppGFHighWorkController extends BaseController { GFhighworkService.edit(pd2); } map.put("result", errInfo); + map.put("dockData", JSON.toJSONString(pd2)); + map.put("sendPicturesList", JSON.toJSONString(sendPicturesList)); return map; } /**修改 @@ -331,11 +346,11 @@ public class AppGFHighWorkController extends BaseController { @RequestMapping(value="/editAcceptconfess") @ResponseBody @Transactional + @DockAnnotation(hasAnnex = true) public Object editAcceptconfess(MultipartRequest request) throws Exception { Map map = new HashMap(); String errInfo = "success"; - PageData pd = new PageData(); - pd = this.getPageData(); + PageData pd = this.getPageData(); PageData pd2 = new PageData(); pd2 = GFhighworkService.findById(pd); pd2.put("OPERATOR", pd.get("OPERATOR")); //修改人 @@ -343,18 +358,23 @@ public class AppGFHighWorkController extends BaseController { List fileList = new ArrayList(); String signertime = ""; String SIGNTIME[] = pd.getString("SIGNTIME").split(","); - + ArrayList sendPicturesList = new ArrayList<>(); + ArrayList highworkacceptuserList = new ArrayList<>(); for (int i = 0; i < SIGNTIME.length; i++) { signertime = SIGNTIME[i]; fileList.add(request.getFile("file"+i)); MultipartFile[] fileArr = new MultipartFile[fileList.size()]; - saveImg(fileList.toArray(fileArr),signertime,pd.getString("HIGHWORK_ID"),pd.getString("CORPINFO_ID"),pd.getString("ACCEPT_CONFESS_USER_ID"),pd.getString("ACCEPT_CONFESS_DEPARTMENT_ID")); + saveImg(sendPicturesList,highworkacceptuserList,fileList.toArray(fileArr),signertime,pd.getString("HIGHWORK_ID"),pd.getString("CORPINFO_ID"),pd.getString("ACCEPT_CONFESS_USER_ID"),pd.getString("ACCEPT_CONFESS_DEPARTMENT_ID")); fileList.clear(); } + PageData dockData = new PageData(); + dockData.put("highworkacceptuserList", JSON.toJSONString(highworkacceptuserList)); map.put("result", errInfo); + map.put("dockData", dockData); + map.put("sendPicturesList", JSON.toJSONString(sendPicturesList)); return map; } - private void saveImg(MultipartFile[] files,String signertime, String HIGHWORK_ID, String CORPINFO_ID, String ACCEPT_CONFESS_USER_ID, String ACCEPT_CONFESS_DEPARTMENT_ID) throws Exception{ + private void saveImg(ArrayList sendPicturesList,ArrayList highworkacceptuserList,MultipartFile[] files,String signertime, String HIGHWORK_ID, String CORPINFO_ID, String ACCEPT_CONFESS_USER_ID, String ACCEPT_CONFESS_DEPARTMENT_ID) throws Exception{ if (files != null && files.length > 0) { for (int i = 0; i < files.length; i++) { PageData pd = new PageData(); @@ -363,6 +383,7 @@ public class AppGFHighWorkController extends BaseController { String ffile = DateUtil.getDays(); String fileName = this.get32UUID()+file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".")); smb.sshSftp(file, fileName,Const.FILEPATHFILE + CORPINFO_ID + "/" + ffile); + sendPicturesList.add(Const.FILEPATHFILE + CORPINFO_ID + "/" + ffile + "/" + fileName+"@@"+fileName); pd.put("ACCEPT_CONFESS_USER_SIGNER_TIME", signertime); pd.put("ACCEPT_CONFESS_ID", this.get32UUID()); pd.put("OPERATOR", pd.get("OPERATOR")); //修改人 @@ -376,6 +397,7 @@ public class AppGFHighWorkController extends BaseController { pd.put("ACCEPT_USER_ID",""); pd.put("ACCEPT_DEPARTMENT_ID", ""); highworkacceptuserService.save(pd); + highworkacceptuserList.add(pd); } } } @@ -532,6 +554,7 @@ public class AppGFHighWorkController extends BaseController { @RequestMapping(value="/editStatus") @ResponseBody @Transactional + @DockAnnotation(hasAnnex = true) public Object editStatus( @RequestParam(value="FFILE",required=false) MultipartFile[] files ) throws Exception{ @@ -545,6 +568,8 @@ public class AppGFHighWorkController extends BaseController { pd2.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间 // pd2.put("OTHER_PROTECTIVE_MEASURES", pd.get("OTHER_PROTECTIVE_MEASURES")); //修改人 // pd2.put("HAZARD_IDENTIFICATION", pd.get("HAZARD_IDENTIFICATION")); //修改人 + ArrayList sendPicturesList = new ArrayList<>(); + ArrayList toMeasuresList = new ArrayList<>(); PageData log = new PageData(); log.put("HIGHWORKLOG_ID", this.get32UUID()); // log.put("ACTION", "审核打回"); @@ -577,6 +602,7 @@ public class AppGFHighWorkController 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); + sendPicturesList.add(Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile + "/" + fileName + "@@" + fileName); pd2.put("CONSTRUCTION_USER_SIGNER_PATH", Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile + "/" + fileName); pd2.put("CONSTRUCTION_USER_SIGNER_TIME", pd.get("SIGNER_TIME")); @@ -604,6 +630,7 @@ public class AppGFHighWorkController extends BaseController { measures.put("CONFIRM_ID", pd.get("OPERATOR")); measures.put("CONFIRM_NAME", pd.get("ACTION_USER")); GFhighWorkToMeasuresService.save(measures); + toMeasuresList.add(measures); } log.put("ACTION", "作业单位通过"); @@ -664,6 +691,7 @@ public class AppGFHighWorkController 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); + sendPicturesList.add(Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile + "/" + fileName + "@@" + fileName); pd2.put("LEADER_USER_SIGNER_PATH", Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile + "/" + fileName); pd2.put("LEADER_USER_SIGNER_TIME", pd.get("SIGNER_TIME")); @@ -730,6 +758,7 @@ public class AppGFHighWorkController 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); + sendPicturesList.add(Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile + "/" + fileName + "@@" + fileName); pd2.put("AUDIT_USER_SIGNER_PATH", Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile + "/" + fileName); pd2.put("AUDIT_USER_SIGNER_TIME", pd.get("SIGNER_TIME")); @@ -788,6 +817,7 @@ public class AppGFHighWorkController 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); + sendPicturesList.add(Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile + "/" + fileName + "@@" + fileName); pd2.put("APPROVE_USER_SIGNER_PATH", Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile + "/" + fileName); pd2.put("APPROVE_USER_SIGNER_TIME", pd.get("SIGNER_TIME")); @@ -836,6 +866,7 @@ public class AppGFHighWorkController 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); + sendPicturesList.add(Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile + "/" + fileName + "@@" + fileName); pd2.put("ACCEPT_USER_SIGNER_PATH", Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile + "/" + fileName); pd2.put("ACCEPT_USER_SIGNER_TIME", pd.get("SIGNER_TIME")); @@ -1026,6 +1057,13 @@ public class AppGFHighWorkController extends BaseController { break; } GFhighWorkLogService.save(log); + PageData dockData = new PageData(); + dockData.put("logData",JSON.toJSONString(log)); + dockData.put("STATUS",status); + dockData.put("saveData",JSON.toJSONString(pd2)); + dockData.put("requestData",JSON.toJSONString(pd)); + dockData.put("toMeasuresList",JSON.toJSONString(toMeasuresList)); + map.put("dockData", JSON.toJSONString(dockData)); map.put("result", errInfo); 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..3edf4ba2 100644 --- a/src/main/java/com/zcloud/controller/keyProjects/OutSourcedController.java +++ b/src/main/java/com/zcloud/controller/keyProjects/OutSourcedController.java @@ -445,7 +445,8 @@ public class OutSourcedController extends BaseController { pdImg.put("TYPE", "300"); pdImg.put("FOREIGN_KEY", pd.getString("OUTSOURCED_ID")); imgfilesService.save(pdImg); - Smb.sshSftp(file9One, fileName, Const.FILEPATHYHTP + Jurisdiction.getCORPINFO_ID() + "/" + ffile,IMGFILES_ID,pd.getString("OUTSOURCED_ID"),"300"); + Smb.sshSftp(file9One, fileName, Const.FILEPATHYHTP + Jurisdiction.getCORPINFO_ID() + "/" + ffile + ,IMGFILES_ID,pd.getString("OUTSOURCED_ID"),"300"); }