diff --git a/pom.xml b/pom.xml index 41b18af82..483c902f6 100644 --- a/pom.xml +++ b/pom.xml @@ -995,7 +995,8 @@ wflow-server-1.0-SNAPSHOT.jar - A31D41A090AA235D29A0DB728D50AEDFD41D8CD98F00B204E9800998ECF8427ED41D8CD98F00B204E9800998ECF8427E + C4DCB483BDB1243684F938A813AD4761D41D8CD98F00B204E9800998ECF8427ED41D8CD98F00B204E9800998ECF8427E + diff --git a/src/main/java/com/zhgd/xmgl/modules/worker/service/impl/WorkerInfoAuditRecordServiceImpl.java b/src/main/java/com/zhgd/xmgl/modules/worker/service/impl/WorkerInfoAuditRecordServiceImpl.java index 79a7d16b3..c059fbaf3 100644 --- a/src/main/java/com/zhgd/xmgl/modules/worker/service/impl/WorkerInfoAuditRecordServiceImpl.java +++ b/src/main/java/com/zhgd/xmgl/modules/worker/service/impl/WorkerInfoAuditRecordServiceImpl.java @@ -77,7 +77,8 @@ public class WorkerInfoAuditRecordServiceImpl extends ServiceImpl queryWrapper = new QueryWrapper<>(); queryWrapper.lambda().eq(WorkerInfo::getProjectSn, workerInfoAuditRecord.getProjectSn()) - .eq(WorkerInfo::getIdCard, workerInfoAuditRecord.getIdCard()); + .eq(WorkerInfo::getIdCard, workerInfoAuditRecord.getIdCard()) + .last(Cts.IGNORE_DATA_SCOPE_CONDITION); int count = workerInfoService.count(queryWrapper); if (count > 0) { throw new OpenAlertException(MessageUtil.get("existsIDCardErr")); diff --git a/src/main/java/com/zhgd/xmgl/modules/xz/controller/SafetyInspectionStandardBigScreenController.java b/src/main/java/com/zhgd/xmgl/modules/xz/controller/SafetyInspectionStandardBigScreenController.java index 4706cc905..334bddd35 100644 --- a/src/main/java/com/zhgd/xmgl/modules/xz/controller/SafetyInspectionStandardBigScreenController.java +++ b/src/main/java/com/zhgd/xmgl/modules/xz/controller/SafetyInspectionStandardBigScreenController.java @@ -115,7 +115,7 @@ public class SafetyInspectionStandardBigScreenController { List allTypeRecords = xzSecurityDangerTypeRecordService.list(); List allItemRecords = xzSecurityDangerItemRecordService.list(); List inspectionRecords = xzSecurityQualityInspectionRecordService.selectQualityInspectionRecordPage(new MapBuilder().put("endMonth", month).put("projectSn", projectSn).put("pageSize", -1).build()).getPage().getRecords(); - inspectionRecords = inspectionRecords.stream().filter(i -> i.getRecordType() == null || i.getRecordType() != 3 || (i.getRecordType() == 3 && !DateUtil.format(i.getRectifyTime(), "yyyy-MM").equals(month))).collect(Collectors.toList()); + inspectionRecords = inspectionRecords.stream().filter(i -> i.getRectifyType() == null || i.getRectifyType() != 3 || (i.getRectifyType() == 3 && !DateUtil.format(i.getRectifyTime(), "yyyy-MM").equals(month))).collect(Collectors.toList()); Map> tenTopTypes = allTopTypes.stream().collect(Collectors.groupingBy(XzSecurityDangerTypeRecord::getTenType)); for (Map.Entry> tenEntry : tenTopTypes.entrySet()) { Integer tenType = tenEntry.getKey(); @@ -212,7 +212,9 @@ public class SafetyInspectionStandardBigScreenController { List typeRecords = xzSecurityDangerTypeRecordService.list(new LambdaQueryWrapper().eq(XzSecurityDangerTypeRecord::getParentId, topType.getId())); List typeIds = typeRecords.stream().map(XzSecurityDangerTypeRecord::getId).collect(Collectors.toList()); List itemRecords = xzSecurityDangerItemRecordService.list(new LambdaQueryWrapper().in(XzSecurityDangerItemRecord::getDangerTypeId, typeIds)); - List inspectionRecords = xzSecurityQualityInspectionRecordService.selectQualityInspectionRecordPage(new MapBuilder().put("endMonth", month).put("status", 60).put("projectSn", projectSn).put("pageSize", -1).build()).getPage().getRecords(); +// List inspectionRecords = xzSecurityQualityInspectionRecordService.selectQualityInspectionRecordPage(new MapBuilder().put("endMonth", month).put("status", 60).put("projectSn", projectSn).put("pageSize", -1).build()).getPage().getRecords(); + List inspectionRecords = xzSecurityQualityInspectionRecordService.selectQualityInspectionRecordPage(new MapBuilder().put("endMonth", month).put("projectSn", projectSn).put("pageSize", -1).build()).getPage().getRecords(); + inspectionRecords = inspectionRecords.stream().filter(i -> i.getRectifyType() == null || i.getRectifyType() != 3 || (i.getRectifyType() == 3 && !DateUtil.format(i.getRectifyTime(), "yyyy-MM").equals(month))).collect(Collectors.toList()); List safetyScoreDetails = new ArrayList<>(); for (XzSecurityDangerTypeRecord typeRecord : typeRecords) { Long typeId = typeRecord.getId(); diff --git a/src/main/java/com/zhgd/xmgl/modules/xz/security/mapper/xml/XzSecurityQualityInspectionRecordMapper.xml b/src/main/java/com/zhgd/xmgl/modules/xz/security/mapper/xml/XzSecurityQualityInspectionRecordMapper.xml index 346b09d5f..19e18935c 100644 --- a/src/main/java/com/zhgd/xmgl/modules/xz/security/mapper/xml/XzSecurityQualityInspectionRecordMapper.xml +++ b/src/main/java/com/zhgd/xmgl/modules/xz/security/mapper/xml/XzSecurityQualityInspectionRecordMapper.xml @@ -290,7 +290,7 @@ LEFT join subdivision_project subsection on subsection.id = t.subsection_id LEFT join subdivision_project subentry on subentry.id = t.subentry_id LEFT join dangerous_engineering_record der on der.id = t.engineering_id - LEFT JOIN (SELECT quality_id,MAX(rectify_time) as rectifyTime,MAX(rectify_time) as rectifyType FROM xz_security_quality_rectify_record GROUP BY + LEFT JOIN (SELECT quality_id,MAX(rectify_time) as rectifyTime,MAX(type) as rectifyType FROM xz_security_quality_rectify_record GROUP BY quality_id) r ON r.quality_id = t.id WHERE t.project_sn = #{param.projectSn} @@ -303,7 +303,7 @@ and t.danger_item_id = #{param.dangerInfoId} - and DATE_FORMAT(t.inspect_time, '%Y-%m') = #{param.endMonth} + and DATE_FORMAT(t.inspect_time, '%Y-%m') <= concat(#{param.endMonth},'-31 23:59:59') and t.status != 6 diff --git a/src/main/java/com/zhgd/xmgl/modules/xz/special/controller/XzSpecialOperationFireSafetyNewController.java b/src/main/java/com/zhgd/xmgl/modules/xz/special/controller/XzSpecialOperationFireSafetyNewController.java index 44daaafd5..6ef63e55c 100644 --- a/src/main/java/com/zhgd/xmgl/modules/xz/special/controller/XzSpecialOperationFireSafetyNewController.java +++ b/src/main/java/com/zhgd/xmgl/modules/xz/special/controller/XzSpecialOperationFireSafetyNewController.java @@ -165,6 +165,11 @@ public class XzSpecialOperationFireSafetyNewController { List homeworkerName = JSONObject.parseObject(JSON.toJSONString(homeworkerArray), List.class); paramMap.put("homeworkerName", homeworkerName == null ? "" : homeworkerName.stream().collect(Collectors.joining(Cts.COMMA))); } + JSONArray certificateNoArray = paramMap.getJSONArray("certificateNo"); + if (certificateNoArray != null) { + List certificateNo = JSONObject.parseObject(JSON.toJSONString(certificateNoArray), List.class); + paramMap.put("certificateNo", certificateNo == null ? "" : certificateNo.stream().collect(Collectors.joining(Cts.COMMA))); + } String[] param1 = {"name", "flag"}; JSONArray safeMeasures = paramMap.getJSONArray("safeMeasure"); JSONArray safeMeasure = new JSONArray(); diff --git a/src/main/java/com/zhgd/xmgl/modules/xz/special/entity/XzSpecialOperationFireSafetyNew.java b/src/main/java/com/zhgd/xmgl/modules/xz/special/entity/XzSpecialOperationFireSafetyNew.java index b12c05b0a..a91a769f8 100644 --- a/src/main/java/com/zhgd/xmgl/modules/xz/special/entity/XzSpecialOperationFireSafetyNew.java +++ b/src/main/java/com/zhgd/xmgl/modules/xz/special/entity/XzSpecialOperationFireSafetyNew.java @@ -57,6 +57,14 @@ public class XzSpecialOperationFireSafetyNew implements Serializable { @Excel(name = "动火作业人", width = 15) @ApiModelProperty(value = "动火作业人") private String homeworkerName; + + /** + * 动火作业人证书编号 + */ + @Excel(name = "动火作业人证书编号", width = 15) + @ApiModelProperty(value = "动火作业人证书编号") + private String certificateNo; + /** * 动火监护人 */