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 d12d9fe96..9c79dd8ff 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 @@ -4,7 +4,6 @@ import cn.hutool.core.date.DateUtil; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.google.common.collect.Lists; import com.zhgd.jeecg.common.api.vo.Result; -import com.zhgd.jeecg.common.mybatis.EntityMap; import com.zhgd.xmgl.modules.worker.service.IEnterpriseInfoService; import com.zhgd.xmgl.modules.xz.entity.vo.SafetyDetailTotalScoreVo; import com.zhgd.xmgl.modules.xz.entity.vo.SafetyScoreDetail; @@ -141,7 +140,7 @@ public class SafetyInspectionStandardBigScreenController { List allTopTypes = xzSecurityDangerTypeRecordService.getTopTypes(topCodes); List allTypeRecords = xzSecurityDangerTypeRecordService.list(); List allItemRecords = xzSecurityDangerItemRecordService.list(); - List inspectionRecords = xzSecurityQualityInspectionRecordService.selectQualityInspectionRecordPage(new MapBuilder().put("month", 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(); Map> tenTopTypes = allTopTypes.stream().collect(Collectors.groupingBy(XzSecurityDangerTypeRecord::getTenType)); for (Map.Entry> tenEntry : tenTopTypes.entrySet()) { Integer tenType = tenEntry.getKey(); @@ -172,7 +171,7 @@ public class SafetyInspectionStandardBigScreenController { } BigDecimal tScore; BigDecimal mustReduce = safetyScoreDetails.stream().filter(s -> Objects.equals(s.getProjectType(), 1)).map(s -> s.getScore()).reduce(BigDecimal.ZERO, BigDecimal::add); - if (safetyScoreDetails.stream().anyMatch(s -> s.getShouldScore().equals(new BigDecimal(0))) + if (safetyScoreDetails.stream().anyMatch(s -> s.getScore().compareTo(BigDecimal.ZERO) == 0) || mustReduce.compareTo(new BigDecimal(40)) < 0) { //保证项目中有一项未得分或保证项目小计得分不足40分,此分项检查评分表不应得分 tScore = new BigDecimal(0); @@ -228,7 +227,7 @@ 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("month", 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 safetyScoreDetails = new ArrayList<>(); for (XzSecurityDangerTypeRecord typeRecord : typeRecords) { Long typeId = typeRecord.getId(); @@ -250,7 +249,7 @@ public class SafetyInspectionStandardBigScreenController { } BigDecimal tScore; BigDecimal mustReduce = safetyScoreDetails.stream().filter(s -> Objects.equals(s.getProjectType(), 1)).map(s -> s.getScore()).reduce(BigDecimal.ZERO, BigDecimal::add); - if (safetyScoreDetails.stream().anyMatch(s -> s.getShouldScore().equals(new BigDecimal(0))) + if (safetyScoreDetails.stream().anyMatch(s -> s.getScore().compareTo(BigDecimal.ZERO) == 0) || mustReduce.compareTo(new BigDecimal(40)) < 0) { //保证项目中有一项未得分或保证项目小计得分不足40分,此分项检查评分表不应得分 tScore = BigDecimal.ZERO; 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 7bdc02819..65e7bb725 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 @@ -273,9 +273,8 @@ LEFT JOIN (SELECT quality_id,MAX(rectify_time) as rectify_time FROM xz_security_quality_rectify_record GROUP BY quality_id) r ON r.quality_id = t.id WHERE t.project_sn = #{param.projectSn} - - and t.inspect_time >= #{param.month} - and t.inspect_time <= concat(#{param.month},'-31 23:59:59') + + and t.inspect_time <= concat(#{param.endMonth},'-31 23:59:59') and t.status != 6