From 8e983a58a8064547b4056decf8d98bb66a064df1 Mon Sep 17 00:00:00 2001 From: liujun Date: Wed, 13 Dec 2023 13:02:20 +0800 Subject: [PATCH] =?UTF-8?q?=E7=9F=AD=E8=B7=AF=E5=8A=9F=E8=83=BD=E8=BF=81?= =?UTF-8?q?=E7=A7=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/gf/AppGFHotworkController.java | 452 +++++++++++++++-- .../controller/gf/GFHotworkController.java | 5 +- .../gf/GFHotworkAcceptUserMapper.java | 67 +++ .../mapper/datasource/gf/GFHotworkMapper.java | 16 + .../gf/GFHotworkAcceptUserService.java | 67 +++ .../zcloud/service/gf/GFHotworkService.java | 15 + .../impl/GFHotworkAcceptUserServiceImpl.java | 102 ++++ .../service/gf/impl/GFHotworkServiceImpl.java | 36 ++ .../datasource/gf/HotworkAcceptUserMapper.xml | 217 +++++++++ .../mybatis/datasource/gf/HotworkMapper.xml | 454 +++++++++++++++++- 10 files changed, 1368 insertions(+), 63 deletions(-) create mode 100644 src/main/java/com/zcloud/mapper/datasource/gf/GFHotworkAcceptUserMapper.java create mode 100644 src/main/java/com/zcloud/service/gf/GFHotworkAcceptUserService.java create mode 100644 src/main/java/com/zcloud/service/gf/impl/GFHotworkAcceptUserServiceImpl.java create mode 100644 src/main/resources/mybatis/datasource/gf/HotworkAcceptUserMapper.xml diff --git a/src/main/java/com/zcloud/controller/gf/AppGFHotworkController.java b/src/main/java/com/zcloud/controller/gf/AppGFHotworkController.java index 73c147e8..69f1af4d 100644 --- a/src/main/java/com/zcloud/controller/gf/AppGFHotworkController.java +++ b/src/main/java/com/zcloud/controller/gf/AppGFHotworkController.java @@ -3,21 +3,26 @@ package com.zcloud.controller.gf; import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONObject; import com.zcloud.controller.base.BaseController; +import com.zcloud.dto.mq.Response; +import com.zcloud.dto.mq.TenCorpDto; import com.zcloud.entity.Page; import com.zcloud.entity.PageData; +import com.zcloud.mq.service.SendMessageService; +import com.zcloud.mq.util.TenCorpConst; import com.zcloud.service.gf.*; import com.zcloud.util.*; import org.apache.commons.lang.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.transaction.annotation.Transactional; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestParam; -import org.springframework.web.bind.annotation.ResponseBody; +import org.springframework.web.bind.annotation.*; import org.springframework.web.multipart.MultipartFile; +import org.springframework.web.multipart.MultipartRequest; import javax.annotation.Resource; import java.text.DecimalFormat; +import java.text.ParseException; +import java.text.SimpleDateFormat; import java.util.*; /** @@ -32,7 +37,9 @@ public class AppGFHotworkController extends BaseController { @Resource private GFHotworkService GFhotworkService; - @Resource + @Autowired + private GFHotworkAcceptUserService hotworkacceptuserService; + @Autowired private GFHotworkLogService GFhotworkLogService; @Resource private GFHotworkToMeasuresService GFhotworkToMeasuresService; @@ -40,7 +47,14 @@ public class AppGFHotworkController extends BaseController { private GFHotworkGasService GFhotworkGasService; @Autowired private SendMessageUtil sendMessageUtil; - /**获取编码 + @Autowired + private Smb smb; + @Resource + private SendMessageService mqClient; + + /** + * 获取编码 + * * @param * @throws Exception */ @@ -76,10 +90,22 @@ public class AppGFHotworkController extends BaseController { String errInfo = "success"; PageData pd = new PageData(); pd = this.getPageData(); - pd.put("HOTWORK_ID", this.get32UUID()); //主键 - pd.put("CREATTIME", DateUtil.date2Str(new Date())); //添加时间 - pd.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间 - pd.put("ISDELETE", "0"); //是否删除 1-是 0-否 + 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 = GFhotworkService.getCode(pd2); //根据ID读取 + String code = "DH" + year + month + day + dft.format((Integer.parseInt(pd2.get("code").toString()) + 1)); + pd = this.getPageData(); + pd.put("CHECK_NO", code); + pd.put("HOTWORK_ID", this.get32UUID()); //主键 + pd.put("CREATTIME", DateUtil.date2Str(new Date())); //添加时间 + pd.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间 + pd.put("ISDELETE", "0"); //是否删除 1-是 0-否 GFhotworkService.save(pd); if(pd.get("APPLY_STATUS").equals("1")) { @@ -120,14 +146,41 @@ public class AppGFHotworkController extends BaseController { params4.put("value", "确认");// 存入上面参数名称所传递的值 paramsList.add(params4); sendMessageUtil.sendMessages(mes, paramsList); + + // 发短信 + PageData mes1 = new PageData(); + mes1.put("RECEIVER_ID", pd.get("ANALYZE_USER_ID"));// 收信人userid + mes1.put("templateCode", "DH_QT");// 短信模板编码 + mes1.put("SMSCode", "SMS_223540753");// 短信模板编码 + mes1.put("CORPINFO_ID", pd.get("CORPINFO_ID"));// 企业id + // 参数集合 + List paramsList1 = new ArrayList(); + // 第1个参数 + PageData params5 = new PageData(); + params5.put("name", "params1");// 存入短信模板中的参数名称 + params5.put("value", pd.get("CHECK_NO"));// 存入上面参数名称所传递的值 + paramsList1.add(params5); + // 第2个参数 + PageData params6 = new PageData(); + params6.put("name", "params2");// 存入短信模板中的参数名称 + params6.put("value", "动火作业");// 存入上面参数名称所传递的值 + paramsList1.add(params6); + sendMessageUtil.sendMessages(mes1, paramsList1); } + TenCorpDto tenCorpDto = new TenCorpDto(); + tenCorpDto.setMark(pd.getString("HOTWORK_ID")); + tenCorpDto.setMark_name("HOTWORK_ID"); + tenCorpDto.setTime_stamp(pd.getString("WORK_START_DATE") + ":00:000"); + tenCorpDto.setTopic("eightWork"); + tenCorpDto.setData(pd); + tenCorpDto.setMessage(TenCorpConst.hotWork); + + mqClient.SendDelayQueue(tenCorpDto); map.put("result", errInfo); return map; } /**删除 - * @param out - * @throws Exception */ @RequestMapping(value="/delete") @ResponseBody @@ -194,6 +247,15 @@ public class AppGFHotworkController extends BaseController { paramsList.add(params4); sendMessageUtil.sendMessages(mes, paramsList); } + TenCorpDto tenCorpDto = new TenCorpDto(); + tenCorpDto.setMark(pd.getString("HOTWORK_ID")); + tenCorpDto.setMark_name("HOTWORK_ID"); + tenCorpDto.setTime_stamp(pd.getString("WORK_START_DATE") + ":00:000"); + tenCorpDto.setTopic("eightWork"); + tenCorpDto.setData(pd); + tenCorpDto.setMessage(TenCorpConst.hotWork); + + mqClient.SendDelayQueue(tenCorpDto); map.put("result", errInfo); return map; } @@ -273,9 +335,7 @@ public class AppGFHotworkController extends BaseController { @RequestMapping(value="/editAcceptconfess") @ResponseBody @Transactional - public Object editAcceptconfess( - @RequestParam(value="FFILE",required=false) MultipartFile[] files - ) throws Exception { + public Object editAcceptconfess(MultipartRequest request) throws Exception { Map map = new HashMap(); String errInfo = "success"; PageData pd = new PageData(); @@ -284,23 +344,190 @@ public class AppGFHotworkController extends BaseController { pd2 = GFhotworkService.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]; + List fileList = new ArrayList(); + String signertime = ""; + String SIGNTIME[] = pd.getString("SIGNTIME").split(","); - 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_CONFESS_USER_SIGNER_PATH", Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile + "/" + fileName); - pd2.put("ACCEPT_CONFESS_USER_SIGNER_TIME", pd.get("SIGNER_TIME")); -// pd2.put("GUARDIAN_CONTENT", pd.get("CONTENT")); -// pd2.put("APPLY_STATUS", pd.get("APPLY_STATUS")); - GFhotworkService.edit(pd2); + 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("HOTWORK_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 HOTWORK_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("HOTWORK_ID", HOTWORK_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", ""); + hotworkacceptuserService.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 = GFhotworkService.findById(pd); + pd2.put("OPERATOR", pd.get("OPERATOR")); //修改人 + pd2.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间 + PageData log = new PageData(); + log.put("HOTWORKLOG_ID", this.get32UUID()); +// log.put("ACTION", "审核打回"); + log.put("HOTWORK_ID", pd.get("HOTWORK_ID")); + log.put("CREATOR", pd.get("ACTION_USER")); + log.put("CREATTIME", DateUtil.date2Str(new Date())); + + String status = pd.get("STATUS").toString(); + if ("2".equals(status) || "3".equals(status) || "4".equals(status) || "5".equals(status) || "6".equals(status) || "7".equals(status)) { + pd2.put("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") + ";_;") : ";_;")); + } else if ("-2".equals(status) || "-3".equals(status) || "-4".equals(status) || "-5".equals(status) || "-6".equals(status) || "-7".equals(status) || "-8".equals(status)) { + //打回清空数据 + pd2.put("OTHER_PROTECTIVE_MEASURES", ""); + } + + switch (status) { + + case "8"://验收人 + 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("HOTWORK_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("APPLY_STATUS", pd.get("APPLY_STATUS")); + GFhotworkService.edit(pd2); + log.put("ACTION", "验收通过"); + + // 发短信 + PageData mes = new PageData(); + mes.put("RECEIVER_ID", pd2.get("APPLY_USER_ID"));// 收信人userid + mes.put("templateCode", "DH_Y08");// 短信模板编码 + mes.put("SMSCode", "SMS_227250920");// 短信模板编码 + mes.put("CORPINFO_ID", pd2.get("CORPINFO_ID"));// 企业id + // 参数集合 + List paramsList = new ArrayList(); + // 第1个参数 + PageData params1 = new PageData(); + params1.put("name", "number");// 存入短信模板中的参数名称 + params1.put("value", pd2.get("CHECK_NO"));// 存入上面参数名称所传递的值 + paramsList.add(params1); + // 第2个参数 + PageData params2 = new PageData(); + params2.put("name", "type");// 存入短信模板中的参数名称 + params2.put("value", "动火作业");// 存入上面参数名称所传递的值 + paramsList.add(params2); + sendMessageUtil.sendMessages(mes, paramsList); + break; + + case "-8"://审批打回 + log.put("ACTION", "验收人打回"); + pd2.put("APPLY_STATUS", pd.get("APPLY_STATUS")); + pd2.put("ACCEPT_CONTENT", pd.get("CONTENT")); + GFhotworkService.edit(pd2); + + // 发短信 + PageData mes6 = new PageData(); + mes6.put("RECEIVER_ID", pd2.get("APPLY_USER_ID"));// 收信人userid + mes6.put("templateCode", "DH_N08");// 短信模板编码 + mes6.put("SMSCode", "SMS_223580715");// 短信模板编码 + mes6.put("CORPINFO_ID", pd2.get("CORPINFO_ID"));// 企业id + // 参数集合 + List paramsList6 = new ArrayList(); + // 第1个参数 + PageData params19 = new PageData(); + params19.put("name", "params1");// 存入短信模板中的参数名称 + params19.put("value", pd2.get("CHECK_NO"));// 存入上面参数名称所传递的值 + paramsList6.add(params19); + // 第2个参数 + PageData params20 = new PageData(); + params20.put("name", "params2");// 存入短信模板中的参数名称 + params20.put("value", "动火作业");// 存入上面参数名称所传递的值 + paramsList6.add(params20); + // 第3个参数 + PageData params21 = new PageData(); + params21.put("name", "params3");// 存入短信模板中的参数名称 + params21.put("value", "验收归档");// 存入上面参数名称所传递的值 + paramsList6.add(params21); + sendMessageUtil.sendMessages(mes6, paramsList6); + break; + default: + break; + } + GFhotworkLogService.save(log); + + map.put("result", errInfo); + return map; + } + + private void saveAcceptImg(MultipartFile[] files,String signertime, String HOTWORK_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("HOTWORK_ID", HOTWORK_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); + hotworkacceptuserService.save(cpd); + } + } + } + + /** + * 修改 + * * @param * @throws Exception */ @@ -653,25 +880,25 @@ public class AppGFHotworkController extends BaseController { paramsList.add(params4); sendMessageUtil.sendMessages(mes, paramsList); - // 发短信 - PageData mes1 = new PageData(); - mes1.put("RECEIVER_ID", pd2.get("ANALYZE_USER_ID"));// 收信人userid - mes1.put("templateCode", "DH_QT");// 短信模板编码 - mes1.put("SMSCode", "SMS_223540753");// 短信模板编码 - mes1.put("CORPINFO_ID", pd2.get("CORPINFO_ID"));// 企业id - // 参数集合 - List paramsList1 = new ArrayList(); - // 第1个参数 - PageData params5 = new PageData(); - params5.put("name", "params1");// 存入短信模板中的参数名称 - params5.put("value", pd2.get("CHECK_NO"));// 存入上面参数名称所传递的值 - paramsList1.add(params5); - // 第2个参数 - PageData params6 = new PageData(); - params6.put("name", "params2");// 存入短信模板中的参数名称 - params6.put("value", "动火作业");// 存入上面参数名称所传递的值 - paramsList1.add(params6); - sendMessageUtil.sendMessages(mes1, paramsList1); +// // 发短信 +// PageData mes1 = new PageData(); +// mes1.put("RECEIVER_ID", pd2.get("ANALYZE_USER_ID"));// 收信人userid +// mes1.put("templateCode", "DH_QT");// 短信模板编码 +// mes1.put("SMSCode", "SMS_223540753");// 短信模板编码 +// mes1.put("CORPINFO_ID", pd2.get("CORPINFO_ID"));// 企业id +// // 参数集合 +// List paramsList1 = new ArrayList(); +// // 第1个参数 +// PageData params5 = new PageData(); +// params5.put("name", "params1");// 存入短信模板中的参数名称 +// params5.put("value", pd2.get("CHECK_NO"));// 存入上面参数名称所传递的值 +// paramsList1.add(params5); +// // 第2个参数 +// PageData params6 = new PageData(); +// params6.put("name", "params2");// 存入短信模板中的参数名称 +// params6.put("value", "动火作业");// 存入上面参数名称所传递的值 +// paramsList1.add(params6); +// sendMessageUtil.sendMessages(mes1, paramsList1); } break; @@ -932,8 +1159,136 @@ public class AppGFHotworkController extends BaseController { return map; } - public static void main(String[] args) { - System.out.println(UuidUtil.get32UUID()); + /** + * 作废 + * + */ + @PostMapping(value = "/cancel") + @ResponseBody + public void cancel(@RequestBody PageData pd) throws Exception { + Map map = new HashMap(); + String errInfo = "success"; + System.out.println(JSONObject.toJSONString(pd)); + PageData cpd = new PageData(); + cpd = GFhotworkService.findById(pd); + if (cpd != null && cpd.size() > 0 && cpd.getString("ANALYZE_TIME") != null && cpd.getString("MONITOR_USER_SIGNER_TIME") != null) { +// String WORK_START_DATE = pd.getString("WORK_START_DATE"); +// String ANALYZE_TIME = cpd.getString("ANALYZE_TIME"); +// String MONITOR_USER_SIGNER_TIME = cpd.getString("MONITOR_USER_SIGNER_TIME"); +// SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm"); +// System.out.println(WORK_START_DATE); +// System.out.println(ANALYZE_TIME); +// System.out.println(MONITOR_USER_SIGNER_TIME); +// System.out.println("-------------123----------"); +// try { +// Date date1 = format.parse(WORK_START_DATE); +// Date date2 = format.parse(ANALYZE_TIME); +// Date date3 = format.parse(MONITOR_USER_SIGNER_TIME); +// long workTime = date1.getTime(); +// long analyzeTime = date2.getTime(); +// long monitorTime = date3.getTime(); +// System.out.println(workTime - analyzeTime); +// System.out.println(analyzeTime - workTime); +// System.out.println(workTime - monitorTime); +// if (workTime - analyzeTime >= 0 && workTime - monitorTime >= 0) { + return; +// } else { +// hotworkService.cancel(pd); +// // 发短信 +// PageData mes = new PageData(); +// mes.put("RECEIVER_ID", pd.get("CONFIRM_USER_ID"));// 收信人userid +// mes.put("templateCode", "DH_ZF");// 短信模板编码 +// mes.put("SMSCode", "SMS_462060039");// 短信模板编码 +// 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); +// sendMessageUtil.sendMessages(mes, paramsList); +// } +// } catch (ParseException e) { +// e.printStackTrace(); +// } + }else if (cpd!=null && cpd.size()>0 && cpd.getString("ANALYZE_TIME") == null){ + pd.put("APPLY_STATUS",-98); + GFhotworkService.cancel(pd); + PageData pd2 = new PageData(); + pd2 = GFhotworkService.checkno(pd); + PageData pd3 = new PageData(); + pd3.put("CHECK_NO",pd2.getString("CHECK_NO")); + pd3.put("CORPINFO_ID",pd.getString("CORPINFO_ID")); + GFhotworkService.editSpecialwork(pd3); + GFhotworkService.editSpecialwork1(pd3); + GFhotworkService.editSpecialwork2(pd3); + GFhotworkService.editSpecialwork3(pd3); + GFhotworkService.editSpecialwork4(pd3); + GFhotworkService.editSpecialwork5(pd3); + GFhotworkService.editSpecialwork6(pd3); + GFhotworkService.editSpecialwork7(pd3); + PageData mes = new PageData(); + mes.put("RECEIVER_ID", pd.get("CONFIRM_USER_ID"));// 收信人userid + mes.put("templateCode", "DH_ZF1");// 短信模板编码 + mes.put("SMSCode", "SMS_462060039");// 短信模板编码 + 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); + sendMessageUtil.sendMessages(mes, paramsList); + }else if (cpd!=null && cpd.size()>0 && cpd.getString("ANALYZE_TIME") != null && cpd.getString("MONITOR_USER_SIGNER_TIME") == null){ + pd.put("APPLY_STATUS",-99); + GFhotworkService.cancel(pd); + PageData pd2 = new PageData(); + pd2 = GFhotworkService.checkno(pd); + PageData pd3 = new PageData(); + pd3.put("CHECK_NO",pd2.getString("CHECK_NO")); + pd3.put("CORPINFO_ID",pd.getString("CORPINFO_ID")); + GFhotworkService.editSpecialwork(pd3); + GFhotworkService.editSpecialwork1(pd3); + GFhotworkService.editSpecialwork2(pd3); + GFhotworkService.editSpecialwork3(pd3); + GFhotworkService.editSpecialwork4(pd3); + GFhotworkService.editSpecialwork5(pd3); + GFhotworkService.editSpecialwork6(pd3); + GFhotworkService.editSpecialwork7(pd3); + PageData mes = new PageData(); + mes.put("RECEIVER_ID", pd.get("CONFIRM_USER_ID"));// 收信人userid + mes.put("templateCode", "DH_ZF2");// 短信模板编码 + mes.put("SMSCode", "SMS_462060039");// 短信模板编码 + 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); + sendMessageUtil.sendMessages(mes, paramsList); + } + + map.put("result", errInfo); //返回结果 + return ; } /**列表 @@ -1032,6 +1387,8 @@ public class AppGFHotworkController extends BaseController { pd = GFhotworkService.findById(pd); //根据ID读取 map.put("measuresList", GFhotworkService.listAllMeasures(pd)); map.put("gasList", GFhotworkGasService.listAll(pd)); + map.put("imgList",hotworkacceptuserService.findByIds(pd)); + map.put("imgList1",hotworkacceptuserService.findById(pd)); map.put("pd", pd); map.put("result", errInfo); return map; @@ -1084,6 +1441,7 @@ public class AppGFHotworkController extends BaseController { pd.put("HOTWORKGAS_ID", this.get32UUID()); //主键 pd.put("ISDELETE", "0"); //是否删除 1-是 0-否 GFhotworkGasService.save(pd); + GFhotworkService.edittime(pd); map.put("result", errInfo); //返回结果 return map; } diff --git a/src/main/java/com/zcloud/controller/gf/GFHotworkController.java b/src/main/java/com/zcloud/controller/gf/GFHotworkController.java index a9b3ee7a..d5b7a85f 100644 --- a/src/main/java/com/zcloud/controller/gf/GFHotworkController.java +++ b/src/main/java/com/zcloud/controller/gf/GFHotworkController.java @@ -34,6 +34,8 @@ public class GFHotworkController extends BaseController { private GFHotworkService GFhotworkService; @Autowired private GFHotworkGasService GFhotworkGasService; + @Autowired + private GFHotworkAcceptUserService hotworkacceptuserService; /**新增 * @param * @throws Exception @@ -53,7 +55,6 @@ public class GFHotworkController extends BaseController { } /**删除 - * @param out * @throws Exception */ @RequestMapping(value="/delete") @@ -132,6 +133,8 @@ public class GFHotworkController extends BaseController { map.put("pd", pd); map.put("measuresList", GFhotworkService.listAllMeasures(pd)); map.put("gasList", GFhotworkGasService.listAll(pd)); + map.put("imgList",hotworkacceptuserService.findByIds(pd)); + map.put("imgList1",hotworkacceptuserService.findById(pd)); map.put("result", errInfo); return map; } diff --git a/src/main/java/com/zcloud/mapper/datasource/gf/GFHotworkAcceptUserMapper.java b/src/main/java/com/zcloud/mapper/datasource/gf/GFHotworkAcceptUserMapper.java new file mode 100644 index 00000000..52a907cc --- /dev/null +++ b/src/main/java/com/zcloud/mapper/datasource/gf/GFHotworkAcceptUserMapper.java @@ -0,0 +1,67 @@ +package com.zcloud.mapper.datasource.gf; + +import com.zcloud.entity.Page; +import com.zcloud.entity.PageData; + +import java.util.List; + +/** + * 说明:图片管理 + * 作者:luoxiaobao + * 时间:2020-12-24 + * 官网:www.zcloudchina.com + */ +public interface GFHotworkAcceptUserMapper { + + /**新增 + * @param pd + * @throws Exception + */ + void save(PageData pd); + + /**删除 + * @param pd + * @throws Exception + */ + void delete(PageData pd); + + /**删除 + * @param pd + * @throws Exception + */ + void deleteList(PageData pd); + + /**修改 + * @param pd + * @throws Exception + */ + void edit(PageData pd); + + /**列表 + * @param page + * @throws Exception + */ + List datalistPage(Page page); + + /**列表(全部) + * @param pd + * @throws Exception + */ + List listAll(PageData pd); + + /**通过id获取数据 + * @param pd + * @throws Exception + */ + List findById(PageData pd); + List findByIds(PageData pd); + + /**批量删除 + * @param ArrayDATA_IDS + * @throws Exception + */ + void deleteAll(String[] ArrayDATA_IDS); + List listAllByIds(PageData pd); + +} + diff --git a/src/main/java/com/zcloud/mapper/datasource/gf/GFHotworkMapper.java b/src/main/java/com/zcloud/mapper/datasource/gf/GFHotworkMapper.java index ac8dccc4..ce6b4f38 100644 --- a/src/main/java/com/zcloud/mapper/datasource/gf/GFHotworkMapper.java +++ b/src/main/java/com/zcloud/mapper/datasource/gf/GFHotworkMapper.java @@ -52,6 +52,22 @@ public interface GFHotworkMapper{ */ PageData findById(PageData pd); + void cancel(PageData pd); + + PageData checkno(PageData pd); + + + void editSpecialwork(PageData pd); + void editSpecialwork1(PageData pd); + void editSpecialwork2(PageData pd); + void editSpecialwork3(PageData pd); + void editSpecialwork4(PageData pd); + void editSpecialwork5(PageData pd); + void editSpecialwork6(PageData pd); + void editSpecialwork7(PageData pd); + + void edittime(PageData pd); + /**批量删除 * @param ArrayDATA_IDS * @throws Exception diff --git a/src/main/java/com/zcloud/service/gf/GFHotworkAcceptUserService.java b/src/main/java/com/zcloud/service/gf/GFHotworkAcceptUserService.java new file mode 100644 index 00000000..5b48a4f2 --- /dev/null +++ b/src/main/java/com/zcloud/service/gf/GFHotworkAcceptUserService.java @@ -0,0 +1,67 @@ +package com.zcloud.service.gf; + +import com.zcloud.entity.Page; +import com.zcloud.entity.PageData; + +import java.util.List; + +/** + * 说明:图片管理 + * 作者:luoxiaobao + * 时间:2020-12-24 + * 官网:www.zcloudchina.com + */ +public interface GFHotworkAcceptUserService { + + /**新增 + * @param pd + * @throws Exception + */ + public void save(PageData pd)throws Exception; + + /**删除 + * @param pd + * @throws Exception + */ + public void delete(PageData pd)throws Exception; + + /**删除 + * @param pd + * @throws Exception + */ + public void deleteList(PageData pd)throws Exception; + + /**修改 + * @param pd + * @throws Exception + */ + public void edit(PageData pd)throws Exception; + + /**列表 + * @param page + * @throws Exception + */ + public List list(Page page)throws Exception; + + /**列表(全部) + * @param pd + * @throws Exception + */ + public List listAll(PageData pd)throws Exception; + + /**通过id获取数据 + * @param pd + * @throws Exception + */ + public List findById(PageData pd)throws Exception; + public List findByIds(PageData pd)throws Exception; + + /**批量删除 + * @param ArrayDATA_IDS + * @throws Exception + */ + public void deleteAll(String[] ArrayDATA_IDS)throws Exception; + + public List listAllByIds(PageData pd)throws Exception; +} + diff --git a/src/main/java/com/zcloud/service/gf/GFHotworkService.java b/src/main/java/com/zcloud/service/gf/GFHotworkService.java index 5aef64c7..69be0580 100644 --- a/src/main/java/com/zcloud/service/gf/GFHotworkService.java +++ b/src/main/java/com/zcloud/service/gf/GFHotworkService.java @@ -51,6 +51,21 @@ public interface GFHotworkService{ * @throws Exception */ public PageData findById(PageData pd)throws Exception; + public void cancel(PageData pd)throws Exception; + + public PageData checkno(PageData pd)throws Exception; + + public void editSpecialwork(PageData pd)throws Exception; + public void editSpecialwork1(PageData pd)throws Exception; + public void editSpecialwork2(PageData pd)throws Exception; + public void editSpecialwork3(PageData pd)throws Exception; + public void editSpecialwork4(PageData pd)throws Exception; + public void editSpecialwork5(PageData pd)throws Exception; + public void editSpecialwork6(PageData pd)throws Exception; + public void editSpecialwork7(PageData pd)throws Exception; + + + public void edittime(PageData pd)throws Exception; /**批量删除 * @param ArrayDATA_IDS diff --git a/src/main/java/com/zcloud/service/gf/impl/GFHotworkAcceptUserServiceImpl.java b/src/main/java/com/zcloud/service/gf/impl/GFHotworkAcceptUserServiceImpl.java new file mode 100644 index 00000000..3ddabee5 --- /dev/null +++ b/src/main/java/com/zcloud/service/gf/impl/GFHotworkAcceptUserServiceImpl.java @@ -0,0 +1,102 @@ +package com.zcloud.service.gf.impl; + +import com.zcloud.entity.Page; +import com.zcloud.entity.PageData; +import com.zcloud.mapper.datasource.gf.GFHotworkAcceptUserMapper; +import com.zcloud.service.gf.GFHotworkAcceptUserService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.List; + +/** + * 说明:图片管理 + * 作者:luoxiaobao + * 时间:2020-12-24 + * 官网:www.zcloudchina.com + */ +@Service +@Transactional //开启事物 +public class GFHotworkAcceptUserServiceImpl implements GFHotworkAcceptUserService { + + @Autowired + private GFHotworkAcceptUserMapper hotworkacceptuserMapper; + + /**新增 + * @param pd + * @throws Exception + */ + public void save(PageData pd)throws Exception{ + hotworkacceptuserMapper.save(pd); + } + + /**删除 + * @param pd + * @throws Exception + */ + public void delete(PageData pd)throws Exception{ + hotworkacceptuserMapper.delete(pd); + } + + /**删除 + * @param pd + * @throws Exception + */ + public void deleteList(PageData pd)throws Exception{ + hotworkacceptuserMapper.deleteList(pd); + } + + /**修改 + * @param pd + * @throws Exception + */ + public void edit(PageData pd)throws Exception{ + hotworkacceptuserMapper.edit(pd); + } + + /**列表 + * @param page + * @throws Exception + */ + public List list(Page page)throws Exception{ + return hotworkacceptuserMapper.datalistPage(page); + } + + /**列表(全部) + * @param pd + * @throws Exception + */ + public List listAll(PageData pd)throws Exception{ + return hotworkacceptuserMapper.listAll(pd); + } + + /**通过id获取数据 + * @param pd + * @throws Exception + */ + public List findById(PageData pd)throws Exception{ + return hotworkacceptuserMapper.findById(pd); + } + public List findByIds(PageData pd)throws Exception{ + return hotworkacceptuserMapper.findByIds(pd); + } + + /**批量删除 + * @param ArrayDATA_IDS + * @throws Exception + */ + public void deleteAll(String[] ArrayDATA_IDS)throws Exception{ + hotworkacceptuserMapper.deleteAll(ArrayDATA_IDS); + } + + /**列表(全部) + * @param pd + * @throws Exception + */ + public List listAllByIds(PageData pd)throws Exception{ + return hotworkacceptuserMapper.listAllByIds(pd); + } + +} + diff --git a/src/main/java/com/zcloud/service/gf/impl/GFHotworkServiceImpl.java b/src/main/java/com/zcloud/service/gf/impl/GFHotworkServiceImpl.java index a396403f..12499d07 100644 --- a/src/main/java/com/zcloud/service/gf/impl/GFHotworkServiceImpl.java +++ b/src/main/java/com/zcloud/service/gf/impl/GFHotworkServiceImpl.java @@ -80,6 +80,42 @@ public class GFHotworkServiceImpl implements GFHotworkService { return GFhotworkMapper.findById(pd); } + public void cancel(PageData pd)throws Exception{ + GFhotworkMapper.cancel(pd); + } + public PageData checkno(PageData pd)throws Exception{ + return GFhotworkMapper.checkno(pd); + } + + public void editSpecialwork(PageData pd)throws Exception{ + GFhotworkMapper.editSpecialwork(pd); + } + public void editSpecialwork1(PageData pd)throws Exception{ + GFhotworkMapper.editSpecialwork1(pd); + } + public void editSpecialwork2(PageData pd)throws Exception{ + GFhotworkMapper.editSpecialwork2(pd); + } + public void editSpecialwork3(PageData pd)throws Exception{ + GFhotworkMapper.editSpecialwork3(pd); + } + public void editSpecialwork4(PageData pd)throws Exception{ + GFhotworkMapper.editSpecialwork4(pd); + } + public void editSpecialwork5(PageData pd)throws Exception{ + GFhotworkMapper.editSpecialwork5(pd); + } + public void editSpecialwork6(PageData pd)throws Exception{ + GFhotworkMapper.editSpecialwork6(pd); + } + public void editSpecialwork7(PageData pd)throws Exception{ + GFhotworkMapper.editSpecialwork7(pd); + } + + public void edittime(PageData pd)throws Exception{ + GFhotworkMapper.edittime(pd); + } + /**批量删除 * @param ArrayDATA_IDS * @throws Exception diff --git a/src/main/resources/mybatis/datasource/gf/HotworkAcceptUserMapper.xml b/src/main/resources/mybatis/datasource/gf/HotworkAcceptUserMapper.xml new file mode 100644 index 00000000..164cdf2e --- /dev/null +++ b/src/main/resources/mybatis/datasource/gf/HotworkAcceptUserMapper.xml @@ -0,0 +1,217 @@ + + + + + + + + GF_HOTWORK_ACCEPTUSER + + + + + SYS_DICTIONARIES + + + + f.ACCEPT_CONFESS_ID, + f.HOTWORK_ID, + f.CORPINFO_ID, + f.ISDELETE, + f.OPERATTIME, + f.OPERATOR, + f.ACCEPT_CONFESS_DEPARTMENT_ID, + f.ACCEPT_CONFESS_USER_ID, + f.ACCEPT_CONFESS_USER_SIGNER_PATH, + f.ACCEPT_CONFESS_USER_SIGNER_TIME, + f.ISSELF, + f.ACCEPT_USER_ID, + f.ACCEPT_USER_SIGNER_PATH, + f.ACCEPT_USER_SIGNER_TIME, + f.ACCEPT_DEPARTMENT_ID + + + + + ACCEPT_CONFESS_ID, + HOTWORK_ID, + CORPINFO_ID, + ISDELETE, + OPERATTIME, + OPERATOR, + ACCEPT_CONFESS_DEPARTMENT_ID, + ACCEPT_CONFESS_USER_ID, + ACCEPT_CONFESS_USER_SIGNER_PATH, + ACCEPT_CONFESS_USER_SIGNER_TIME, + ISSELF, + ACCEPT_USER_ID, + ACCEPT_USER_SIGNER_PATH, + ACCEPT_USER_SIGNER_TIME, + ACCEPT_DEPARTMENT_ID + + + + + + #{ACCEPT_CONFESS_ID}, + #{HOTWORK_ID}, + #{CORPINFO_ID}, + #{ISDELETE}, + #{OPERATTIME}, + #{OPERATOR}, + #{ACCEPT_CONFESS_DEPARTMENT_ID}, + #{ACCEPT_CONFESS_USER_ID}, + #{ACCEPT_CONFESS_USER_SIGNER_PATH}, + #{ACCEPT_CONFESS_USER_SIGNER_TIME}, + #{ISSELF}, + #{ACCEPT_USER_ID}, + #{ACCEPT_USER_SIGNER_PATH}, + #{ACCEPT_USER_SIGNER_TIME}, + #{ACCEPT_DEPARTMENT_ID} + + + + + insert into + + ( + + ) values ( + + ) + + + + + delete from + + where + ACCEPT_CONFESS_ID = #{ACCEPT_CONFESS_ID} + + + + + + + update + + set + ACCEPT_CONFESS_ID = #{ACCEPT_CONFESS_ID}, + HOTWORK_ID = #{HOTWORK_ID}, + CORPINFO_ID = #{CORPINFO_ID}, + OPERATTIME = #{OPERATTIME}, + OPERATOR = #{OPERATOR}, + ACCEPT_CONFESS_DEPARTMENT_ID = #{ACCEPT_CONFESS_DEPARTMENT_ID}, + ACCEPT_CONFESS_USER_ID = #{ACCEPT_CONFESS_USER_ID}, + ACCEPT_CONFESS_USER_SIGNER_PATH = #{ACCEPT_CONFESS_USER_SIGNER_PATH}, + ACCEPT_CONFESS_USER_SIGNER_TIME = #{ACCEPT_CONFESS_USER_SIGNER_TIME}, + ISSELF = #{ISSELF} + where + ACCEPT_CONFESS_ID = #{ACCEPT_CONFESS_ID} + + + + + + + + + + + + + + + update + + set + ISDELETE = '1' + where + ACCEPT_CONFESS_ID in + + #{item} + + + + + + + diff --git a/src/main/resources/mybatis/datasource/gf/HotworkMapper.xml b/src/main/resources/mybatis/datasource/gf/HotworkMapper.xml index 2bd1ae62..fd43b6fa 100644 --- a/src/main/resources/mybatis/datasource/gf/HotworkMapper.xml +++ b/src/main/resources/mybatis/datasource/gf/HotworkMapper.xml @@ -85,7 +85,8 @@ f.ACCEPT_CONFESS_DEPARTMENT_ID, f.ACCEPT_CONFESS_USER_ID, f.ACCEPT_CONFESS_USER_SIGNER_PATH, - f.ACCEPT_CONFESS_USER_SIGNER_TIME + f.ACCEPT_CONFESS_USER_SIGNER_TIME, + f.ANALYZE_TIME @@ -161,7 +162,8 @@ ACCEPT_CONFESS_DEPARTMENT_ID, ACCEPT_CONFESS_USER_ID, ACCEPT_CONFESS_USER_SIGNER_PATH, - ACCEPT_CONFESS_USER_SIGNER_TIME + ACCEPT_CONFESS_USER_SIGNER_TIME, + ANALYZE_TIME @@ -237,7 +239,8 @@ #{ACCEPT_CONFESS_DEPARTMENT_ID}, #{ACCEPT_CONFESS_USER_ID}, #{ACCEPT_CONFESS_USER_SIGNER_PATH}, - #{ACCEPT_CONFESS_USER_SIGNER_TIME} + #{ACCEPT_CONFESS_USER_SIGNER_TIME}, + #{ANALYZE_TIME} @@ -260,7 +263,14 @@ where HOTWORK_ID = #{HOTWORK_ID} - + + update + + set + ANALYZE_TIME = #{ANALYZE_TIME} + where + HOTWORK_ID = #{HOTWORK_ID} + update @@ -342,6 +352,105 @@ HOTWORK_ID = #{HOTWORK_ID} + + update + + set + APPLY_STATUS = #{APPLY_STATUS} + where + HOTWORK_ID = #{HOTWORK_ID} + + + + update + bus_confinedspace f + set f.SPECIAL_WORK = REPLACE(f.SPECIAL_WORK,#{CHECK_NO},CONCAT(#{CHECK_NO},'(已作废)')) + WHERE + f.ISDELETE = '0' + AND f.APPLY_STATUS > 0 + AND f.CORPINFO_ID = #{CORPINFO_ID} + and ( FIND_IN_SET( #{CHECK_NO}, f.SPECIAL_WORK ) ) + + + update + bus_blindboard f + set f.SPECIAL_WORK = REPLACE(f.SPECIAL_WORK,#{CHECK_NO},CONCAT(#{CHECK_NO},'(已作废)')) + WHERE + f.ISDELETE = '0' + AND f.APPLY_STATUS > 0 + AND f.CORPINFO_ID = #{CORPINFO_ID} + and ( FIND_IN_SET( #{CHECK_NO}, f.SPECIAL_WORK ) ) + + + update + bus_electricity f + set f.SPECIAL_WORK = REPLACE(f.SPECIAL_WORK,#{CHECK_NO},CONCAT(#{CHECK_NO},'(已作废)')) + WHERE + f.ISDELETE = '0' + AND f.APPLY_STATUS > 0 + AND f.CORPINFO_ID = #{CORPINFO_ID} + and ( FIND_IN_SET( #{CHECK_NO}, f.SPECIAL_WORK ) ) + + + update + bus_hoisting f + set f.SPECIAL_WORK = REPLACE(f.SPECIAL_WORK,#{CHECK_NO},CONCAT(#{CHECK_NO},'(已作废)')) + WHERE + f.ISDELETE = '0' + AND f.APPLY_STATUS > 0 + AND f.CORPINFO_ID = #{CORPINFO_ID} + and ( FIND_IN_SET( #{CHECK_NO}, f.SPECIAL_WORK ) ) + + + update + bus_breakground f + set f.SPECIAL_WORK = REPLACE(f.SPECIAL_WORK,#{CHECK_NO},CONCAT(#{CHECK_NO},'(已作废)')) + WHERE + f.ISDELETE = '0' + AND f.APPLY_STATUS > 0 + AND f.CORPINFO_ID = #{CORPINFO_ID} + and ( FIND_IN_SET( #{CHECK_NO}, f.SPECIAL_WORK ) ) + + + update + bus_cutroad f + set f.SPECIAL_WORK = REPLACE(f.SPECIAL_WORK,#{CHECK_NO},CONCAT(#{CHECK_NO},'(已作废)')) + WHERE + f.ISDELETE = '0' + AND f.APPLY_STATUS > 0 + AND f.CORPINFO_ID = #{CORPINFO_ID} + and ( FIND_IN_SET( #{CHECK_NO}, f.SPECIAL_WORK ) ) + + + update + bus_highwork f + set f.SPECIAL_WORK = REPLACE(f.SPECIAL_WORK,#{CHECK_NO},CONCAT(#{CHECK_NO},'(已作废)')) + WHERE + f.ISDELETE = '0' + AND f.APPLY_STATUS > 0 + AND f.CORPINFO_ID = #{CORPINFO_ID} + and ( FIND_IN_SET( #{CHECK_NO}, f.SPECIAL_WORK ) ) + + + update + bus_hotwork f + set f.SPECIAL_WORK = REPLACE(f.SPECIAL_WORK,#{CHECK_NO},CONCAT(#{CHECK_NO},'(已作废)')) + WHERE + f.ISDELETE = '0' + AND f.APPLY_STATUS > 0 + AND f.CORPINFO_ID = #{CORPINFO_ID} + and ( FIND_IN_SET( #{CHECK_NO}, f.SPECIAL_WORK ) ) + + + select - , + f.CORPINFO_ID, + f.ISDELETE, + f.CREATTIME, + f.CREATOR, + f.OPERATTIME, + f.OPERATOR, + f.CHECK_NO, + f.WORK_CONTENT, + f.WORK_START_DATE, + f.WORK_END_DATE, + f.CONFIRM_DEPARTMENT_ID, + f.CONFIRM_USER_ID, + f.CONFIRM_USER_SIGNER_PATH, + f.CONFIRM_USER_SIGNER_TIME, + f.AUDIT_DEPARTMENT_ID, + f.AUDIT_USER_ID, + f.AUDIT_USER_SIGNER_PATH, + f.AUDIT_USER_SIGNER_TIME, + f.APPROVE_DEPARTMENT_ID, + f.APPROVE_USER_ID, + f.APPROVE_USER_SIGNER_PATH, + f.APPROVE_USER_SIGNER_TIME, + f.APPLY_STATUS, + f.CONFIRM_CONTENT, + f.AUDIT_CONTENT, + f.APPROVE_CONTENT, + f.OTHER_PROTECTIVE_MEASURES, + f.ACCEPT_DEPARTMENT_ID, + f.ACCEPT_USER_ID, + f.ACCEPT_USER_SIGNER_PATH, + f.ACCEPT_USER_SIGNER_TIME, + f.ACCEPT_CONTENT, + f.APPLY_DEPARTMENT_ID, + f.APPLY_USER_ID, + f.WORK_PLACE, + f.WORK_LEVEL, + f.WORK_USER, + f.SPECIAL_WORK, + f.RISK_IDENTIFICATION, + f.WORK_MANAGER, + f.ANALYZE_DEPARTMENT_ID, + f.ANALYZE_USER_ID, + f.GUARDIAN_DEPARTMENT_ID, + f.GUARDIAN_USER_ID, + f.GUARDIAN_USER_SIGNER_PATH, + f.GUARDIAN_USER_SIGNER_TIME, + f.GUARDIAN_CONTENT, + f.LEADER_DEPARTMENT_ID, + f.LEADER_USER_ID, + f.LEADER_USER_SIGNER_PATH, + f.LEADER_USER_SIGNER_TIME, + f.LEADER_CONTENT, + f.MONITOR_DEPARTMENT_ID, + f.MONITOR_USER_ID, + f.MONITOR_USER_SIGNER_PATH, + f.MONITOR_USER_SIGNER_TIME, + f.MONITOR_CONTENT, + f.CONFESS_USER, + f.EDUCATE_USER, + f.ACCEPT_EDUCATE_USER, + f.TRIAL_USER, + f.WORK_FUNCTION, + f.GUARDIAN_USER, + f.HOTWORK_ID, + f.CONFESS_DEPARTMENT_ID, + f.CONFESS_USER_ID, + f.CONFESS_USER_SIGNER_PATH, + f.CONFESS_USER_SIGNER_TIME, + f.ACCEPT_CONFESS_DEPARTMENT_ID, + f.ACCEPT_CONFESS_USER_ID, + + IFNULL((SELECT replace(a.ANALYZE_TIME,'-','/') from bus_hotworkgas a where a.ISDELETE = '0' + AND a.HOTWORK_ID = f.HOTWORK_ID + ORDER BY + a.ANALYZE_TIME DESC LIMIT 1),'无') as ANALYZE_TIME, + + (SELECT a.ACCEPT_CONFESS_USER_SIGNER_TIME from BUS_HOTWORK_ACCEPTUSER a where a.ISDELETE = '0' + AND a.HOTWORK_ID = f.HOTWORK_ID + ORDER BY + a.ACCEPT_CONFESS_USER_SIGNER_TIME DESC LIMIT 1) as ACCEPT_CONFESS_USER_SIGNER_TIME, + ad.NAME as APPLY_DEPARTMENT_NAME, getFullName(ad.DEPARTMENT_ID) APPLY_DEPARTMENT_ALL, au.NAME as APPLY_USER_NAME, @@ -562,7 +755,9 @@ and f.APPLY_STATUS = #{pd.APPLY_STATUS} - + + and f.APPLY_STATUS in ('1','2','4','5','6') + and f.CORPINFO_ID = #{pd.CORPINFO_ID} @@ -667,7 +862,82 @@