diff --git a/src/main/java/com/zcloud/controller/app/highriskwork/AppHotworkCfdController.java b/src/main/java/com/zcloud/controller/app/highriskwork/AppHotworkCfdController.java index c807eace..ba9ab934 100644 --- a/src/main/java/com/zcloud/controller/app/highriskwork/AppHotworkCfdController.java +++ b/src/main/java/com/zcloud/controller/app/highriskwork/AppHotworkCfdController.java @@ -1663,8 +1663,31 @@ public class AppHotworkCfdController extends BaseController { PageData condition = new PageData(); condition.put("showInfo",pd.getString("showInfo")); condition.put("HOTWORK_ID",pd.getString("HOTWORK_ID")); - map.put("measuresList", hotworkCfdService.listAllMeasures(condition)); - +// map.put("measuresList", hotworkCfdService.listAllMeasures(condition)); + List measuresList = hotworkCfdService.listAllMeasures(condition); + for (PageData measure : measuresList) { + String order = measure.getString("ORDER"); + String protectiveMeasures = measure.getString("PROTECTIVE_MEASURES"); + if ("2".equals(order)) { + String answer1 = measure.getString("ANSWER1"); + int startIndex = protectiveMeasures.indexOf('('); + int endIndex = protectiveMeasures.indexOf(')'); + if (startIndex != -1 && endIndex != -1 && startIndex < endIndex) { + protectiveMeasures = protectiveMeasures.substring(0, endIndex) + answer1 + protectiveMeasures.substring(endIndex); + } + measure.put("PROTECTIVE_MEASURES", protectiveMeasures); + } else if ("8".equals(order)) { + String[] answers = {measure.getString("ANSWER1"), measure.getString("ANSWER2"), measure.getString("ANSWER3")}; + for (String answer : answers) { + int index = protectiveMeasures.indexOf("()"); + if (index != -1) { + protectiveMeasures = protectiveMeasures.substring(0, index + 1) + answer + protectiveMeasures.substring(index + 1); + } + } + measure.put("PROTECTIVE_MEASURES", protectiveMeasures); + } + } + map.put("measuresList", measuresList); pd = hotworkCfdService.findById(pd); //根据ID读取 // created by liu jun 添加(交底人、项目主管部门负责人、安全措施确认人) diff --git a/src/main/java/com/zcloud/controller/highriskwork/HotworkCfdController.java b/src/main/java/com/zcloud/controller/highriskwork/HotworkCfdController.java index a68e9cad..10739baa 100644 --- a/src/main/java/com/zcloud/controller/highriskwork/HotworkCfdController.java +++ b/src/main/java/com/zcloud/controller/highriskwork/HotworkCfdController.java @@ -141,13 +141,36 @@ public class HotworkCfdController extends BaseController { PageData condition = new PageData(); condition.put("showInfo",pd.getString("showInfo")); condition.put("HOTWORK_ID",pd.getString("HOTWORK_ID")); - map.put("measuresList", hotworkCfdService.listAllMeasures(condition)); - +// map.put("measuresList", hotworkCfdService.listAllMeasures(condition)); + List measuresList = hotworkCfdService.listAllMeasures(condition); + for (PageData measure : measuresList) { + String order = measure.getString("ORDER"); + String protectiveMeasures = measure.getString("PROTECTIVE_MEASURES"); + if ("2".equals(order)) { + String answer1 = measure.getString("ANSWER1"); + int startIndex = protectiveMeasures.indexOf('('); + int endIndex = protectiveMeasures.indexOf(')'); + if (startIndex != -1 && endIndex != -1 && startIndex < endIndex) { + protectiveMeasures = protectiveMeasures.substring(0, endIndex) + answer1 + protectiveMeasures.substring(endIndex); + } + measure.put("PROTECTIVE_MEASURES", protectiveMeasures); + } else if ("8".equals(order)) { + String[] answers = {measure.getString("ANSWER1"), measure.getString("ANSWER2"), measure.getString("ANSWER3")}; + for (String answer : answers) { + int index = protectiveMeasures.indexOf("()"); + if (index != -1) { + protectiveMeasures = protectiveMeasures.substring(0, index + 1) + answer + protectiveMeasures.substring(index + 1); + } + } + measure.put("PROTECTIVE_MEASURES", protectiveMeasures); + } + } + map.put("measuresList", measuresList); pd = hotworkCfdService.findById(pd); //根据ID读取 // created by liu jun 添加(交底人、项目主管部门负责人、安全措施确认人) hotworkCfdService.addInfo(pd); - map.put("measuresList", hotworkCfdService.listAllMeasures(pd)); +// map.put("measuresList", hotworkCfdService.listAllMeasures(pd)); map.put("gasList", hotworkGasCfdService.listAll(pd)); // imgList是接受交底人签字 map.put("imgList", hotworkAcceptUserCfdService.findByIds(pd)); diff --git a/src/main/java/com/zcloud/service/highriskwork/impl/HotworkCfdServiceImpl.java b/src/main/java/com/zcloud/service/highriskwork/impl/HotworkCfdServiceImpl.java index 7d860a5c..de302e57 100644 --- a/src/main/java/com/zcloud/service/highriskwork/impl/HotworkCfdServiceImpl.java +++ b/src/main/java/com/zcloud/service/highriskwork/impl/HotworkCfdServiceImpl.java @@ -485,7 +485,7 @@ public class HotworkCfdServiceImpl implements HotworkCfdService { sumCount += Integer.parseInt(info.getString("belongingNum", "0")); sumCount += Integer.parseInt(info.getString("COUNTGUARDIAN", "0")); sumCount += Integer.parseInt(info.getString("confessNum", "0")); - sumCount += Integer.parseInt(info.getString("COUNTACCEPTCONFESS", "0")); +// sumCount += Integer.parseInt(info.getString("COUNTACCEPTCONFESS", "0")); sumCount += Integer.parseInt(info.getString("COUNTCONFIRM", "0")); sumCount += Integer.parseInt(info.getString("COUNTCONFESS", "0")); sumCount += Integer.parseInt(info.getString("COUNTAUDIT", "0")); @@ -518,6 +518,7 @@ public class HotworkCfdServiceImpl implements HotworkCfdService { x.put("CONFESS_USER_NAME", x.get("USER_NAME")); x.put("CONFESS_DEPARTMENT_ID", x.get("DEPARTMENT_ID")); x.put("CONFESS_DEPARTMENT_NAME", x.get("DEPARTMENT_NAME")); + x.put("CONFESS_USER_SIGNER_PATH", x.get("APPROVAL_SIGNATURE")); } pd.put("confessUserNames", confess.stream().map(x -> x.getString("USER_NAME")).collect(Collectors.joining(","))); pd.put("confessList", confess); @@ -550,6 +551,7 @@ public class HotworkCfdServiceImpl implements HotworkCfdService { .collect(Collectors.toList()); for (PageData x : safetyList) { x.put("APPROVAL_STATUS", x.get("APPROVAL_STATUS")); + x.put("APPROVAL_SIGNATURE", x.get("APPROVAL_SIGNATURE")); } pd.put("safetyList", safetyList); // 项目责任负责人 diff --git a/src/main/java/com/zcloud/service/map/impl/MapEightCfdServiceImpl.java b/src/main/java/com/zcloud/service/map/impl/MapEightCfdServiceImpl.java index 4706a68c..66a265a2 100644 --- a/src/main/java/com/zcloud/service/map/impl/MapEightCfdServiceImpl.java +++ b/src/main/java/com/zcloud/service/map/impl/MapEightCfdServiceImpl.java @@ -62,7 +62,31 @@ public class MapEightCfdServiceImpl implements MapEightCfdService { PageData condition = new PageData(); condition.put("showInfo",pd.getString("showInfo")); condition.put("HOTWORK_ID",pd.getString("HOTWORK_ID")); - map.put("measuresList", hotworkCfdService.listAllMeasures(condition)); +// map.put("measuresList", hotworkCfdService.listAllMeasures(condition)); + List measuresList = hotworkCfdService.listAllMeasures(condition); + for (PageData measure : measuresList) { + String order = measure.getString("ORDER"); + String protectiveMeasures = measure.getString("PROTECTIVE_MEASURES"); + if ("2".equals(order)) { + String answer1 = measure.getString("ANSWER1"); + int startIndex = protectiveMeasures.indexOf('('); + int endIndex = protectiveMeasures.indexOf(')'); + if (startIndex != -1 && endIndex != -1 && startIndex < endIndex) { + protectiveMeasures = protectiveMeasures.substring(0, endIndex) + answer1 + protectiveMeasures.substring(endIndex); + } + measure.put("PROTECTIVE_MEASURES", protectiveMeasures); + } else if ("8".equals(order)) { + String[] answers = {measure.getString("ANSWER1"), measure.getString("ANSWER2"), measure.getString("ANSWER3")}; + for (String answer : answers) { + int index = protectiveMeasures.indexOf("()"); + if (index != -1) { + protectiveMeasures = protectiveMeasures.substring(0, index + 1) + answer + protectiveMeasures.substring(index + 1); + } + } + measure.put("PROTECTIVE_MEASURES", protectiveMeasures); + } + } + map.put("measuresList", measuresList); map.put("gasList", hotworkGasCfdService.listAll(pd)); map.put("imgList", hotworkacceptuserCfdService.findByIds(pd)); map.put("imgList1", hotworkacceptuserCfdService.findById(pd)); diff --git a/src/main/resources/mybatis/datasource/highriskwork/BusHotworkCfdExamineMapper.xml b/src/main/resources/mybatis/datasource/highriskwork/BusHotworkCfdExamineMapper.xml index b92b0544..9dcf8563 100644 --- a/src/main/resources/mybatis/datasource/highriskwork/BusHotworkCfdExamineMapper.xml +++ b/src/main/resources/mybatis/datasource/highriskwork/BusHotworkCfdExamineMapper.xml @@ -134,8 +134,40 @@ select * from bus_hotwork_cfd_examine f where f.IS_DELETE = '0' and f.HOTWORK_ID = #{HOTWORK_ID} + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/resources/mybatis/datasource/highriskwork/HotworkCfdMapper.xml b/src/main/resources/mybatis/datasource/highriskwork/HotworkCfdMapper.xml index c73ab389..dd95a7f4 100644 --- a/src/main/resources/mybatis/datasource/highriskwork/HotworkCfdMapper.xml +++ b/src/main/resources/mybatis/datasource/highriskwork/HotworkCfdMapper.xml @@ -506,9 +506,9 @@ f.OTHER_PROTECTIVE_MEASURES, f.ACCEPT_DEPARTMENT_ID, f.ACCEPT_USER_ID, - f.ACCEPT_USER_SIGNER_PATH, - f.ACCEPT_USER_SIGNER_TIME, - IFNULL(f.ACCEPT_CONTENT,'无') as ACCEPT_CONTENT, + bhac.ACCEPT_USER_SIGNER_PATH, + bhac.ACCEPT_USER_SIGNER_TIME, + IFNULL(f.ACCEPT_CONTENT,'同意') as ACCEPT_CONTENT, f.APPLY_DEPARTMENT_ID, f.APPLY_USER_ID, f.WORK_PLACE, @@ -554,83 +554,64 @@ f.CONFIRM_OTHER_CONTENT, ad.NAME as APPLY_DEPARTMENT_NAME, au.NAME as APPLY_USER_NAME, - cd.NAME as CONFIRM_DEPARTMENT_NAME, cu.NAME as CONFIRM_USER_NAME, - gd.NAME as GUARDIAN_DEPARTMENT_NAME, gu.NAME as GUARDIAN_USER_NAME, - ld.NAME as LEADER_DEPARTMENT_NAME, lu.NAME as LEADER_USER_NAME, - aud.NAME as AUDIT_DEPARTMENT_NAME, auu.NAME as AUDIT_USER_NAME, - apd.NAME as APPROVE_DEPARTMENT_NAME, apu.NAME as APPROVE_USER_NAME, - md.NAME as MONITOR_DEPARTMENT_NAME, mu.NAME as MONITOR_USER_NAME, - acd.NAME as ACCEPT_DEPARTMENT_NAME, acu.NAME as ACCEPT_USER_NAME, - ac.NAME as CONFESS_DEPARTMENT_NAME, accu.NAME as CONFESS_USER_NAME, - aac.NAME as ACCEPT_CONFESS_DEPARTMENT_NAME, aacu.NAME as ACCEPT_CONFESS_USER_NAME, - anad.NAME as ANALYZE_DEPARTMENT_NAME, anau.NAME as ANALYZE_USER_NAME, - bhe.USER_NAME as EXAMINE_USER_NAME, bhe.APPROVAL_OPINIONS as EXAMINE_APPROVAL_OPINIONS, bhe.APPROVAL_SIGNATURE as EXAMINE_APPROVAL_SIGNATURE, bhe.CREATE_TIME as EXAMINE_APPROVAL_CREATE_TIME - from f left join OA_DEPARTMENT ad on ad.DEPARTMENT_ID = f.APPLY_DEPARTMENT_ID left join SYS_USER au on au.USER_ID = f.APPLY_USER_ID - left join OA_DEPARTMENT aac on aac.DEPARTMENT_ID = f.ACCEPT_CONFESS_DEPARTMENT_ID left join SYS_USER aacu on aacu.USER_ID = f.ACCEPT_CONFESS_USER_ID - left join OA_DEPARTMENT ac on ac.DEPARTMENT_ID = f.CONFESS_DEPARTMENT_ID left join SYS_USER accu on accu.USER_ID = f.CONFESS_USER_ID - left join OA_DEPARTMENT cd on cd.DEPARTMENT_ID = f.CONFIRM_DEPARTMENT_ID left join SYS_USER cu on cu.USER_ID = f.CONFIRM_USER_ID - left join OA_DEPARTMENT gd on gd.DEPARTMENT_ID = f.GUARDIAN_DEPARTMENT_ID left join SYS_USER gu on gu.USER_ID = f.GUARDIAN_USER_ID - left join OA_DEPARTMENT ld on ld.DEPARTMENT_ID = f.LEADER_DEPARTMENT_ID left join SYS_USER lu on lu.USER_ID = f.LEADER_USER_ID - left join OA_DEPARTMENT aud on aud.DEPARTMENT_ID = f.AUDIT_DEPARTMENT_ID left join SYS_USER auu on auu.USER_ID = f.AUDIT_USER_ID - left join OA_DEPARTMENT apd on apd.DEPARTMENT_ID = f.APPROVE_DEPARTMENT_ID left join SYS_USER apu on apu.USER_ID = f.APPROVE_USER_ID - left join OA_DEPARTMENT md on md.DEPARTMENT_ID = f.MONITOR_DEPARTMENT_ID left join SYS_USER mu on mu.USER_ID = f.MONITOR_USER_ID - left join OA_DEPARTMENT acd on acd.DEPARTMENT_ID = f.ACCEPT_DEPARTMENT_ID left join SYS_USER acu on acu.USER_ID = f.ACCEPT_USER_ID - left join OA_DEPARTMENT anad on anad.DEPARTMENT_ID = f.ANALYZE_DEPARTMENT_ID left join SYS_USER anau on anau.USER_ID = f.ANALYZE_USER_ID - - left join bus_hotwork_cfd_examine bhe on bhe.HOTWORK_ID = f.HOTWORK_ID and bhe.TYPE = 1 - + left join bus_hotwork_cfd_examine bhe on + bhe.HOTWORK_ID = f.HOTWORK_ID + and bhe.TYPE = 1 + and bhe.IS_DELETE = '0' + left join bus_hotwork_acceptuser_cfd bhac on bhac.HOTWORK_ID = f.HOTWORK_ID where f.HOTWORK_ID = #{HOTWORK_ID} +