|
|
@ -349,13 +349,13 @@ public class AreaMonthReportServiceImpl implements IAreaMonthReportService { |
|
|
|
wrapper.eq(OperPhenomenonEntity::getDiscriminateStatus, TreatMethodConstant.AUTO_SCREENED); |
|
|
|
wrapper.eq(OperPhenomenonEntity::getDiscriminateStatus, TreatMethodConstant.AUTO_SCREENED); |
|
|
|
wrapper.in(OperPhenomenonEntity::getCreateDept, deptIds); |
|
|
|
wrapper.in(OperPhenomenonEntity::getCreateDept, deptIds); |
|
|
|
List<OperPhenomenonEntity> monPhenomenonList = operPhenomenonService.list(wrapper); |
|
|
|
List<OperPhenomenonEntity> monPhenomenonList = operPhenomenonService.list(wrapper); |
|
|
|
monPhenomenonList = monPhenomenonList.stream().filter(s -> s.getDefectLevel() != null).collect(Collectors.toList()); |
|
|
|
monPhenomenonList = monPhenomenonList.stream().filter(s -> s.getDefectGrading() != null).collect(Collectors.toList()); |
|
|
|
List<OperPhenomenonEntity> monConclusionList = monPhenomenonList.stream().filter(s -> "1".equals(s.getConclusionStatus())).collect(Collectors.toList()); |
|
|
|
List<OperPhenomenonEntity> monConclusionList = monPhenomenonList.stream().filter(s -> "1".equals(s.getConclusionStatus())).collect(Collectors.toList()); |
|
|
|
// 只填写二类及以上缺陷
|
|
|
|
// 只填写二类及以上缺陷
|
|
|
|
List<OperPhenomenonEntity> monConclusionListBy = monConclusionList.stream().filter(s -> !"1".equals(s.getDefectGrading())).sorted(Comparator.comparing(OperPhenomenonEntity::getCreateDept).reversed().thenComparing(OperPhenomenonEntity::getDefectGrading)).collect(Collectors.toList()); |
|
|
|
List<OperPhenomenonEntity> monConclusionListByDefectGrading = monConclusionList.stream().filter(s -> !"1".equals(s.getDefectGrading())).sorted(Comparator.comparing(OperPhenomenonEntity::getCreateDept).reversed().thenComparing(OperPhenomenonEntity::getDefectGrading)).collect(Collectors.toList()); |
|
|
|
// 各电站缺陷处理统计表
|
|
|
|
// 各电站缺陷处理统计表
|
|
|
|
ArrayList<HashMap<String, String>> checkList = new ArrayList<>(); |
|
|
|
ArrayList<HashMap<String, String>> checkList = new ArrayList<>(); |
|
|
|
for (OperPhenomenonEntity operPhenomenonEntity : monConclusionListBy) { |
|
|
|
for (OperPhenomenonEntity operPhenomenonEntity : monConclusionListByDefectGrading) { |
|
|
|
Long createDept = operPhenomenonEntity.getCreateDept(); |
|
|
|
Long createDept = operPhenomenonEntity.getCreateDept(); |
|
|
|
R<String> createDeptName = sysClient.getDeptName(createDept); |
|
|
|
R<String> createDeptName = sysClient.getDeptName(createDept); |
|
|
|
if (!createDeptName.isSuccess() && createDeptName.getData() != null) { |
|
|
|
if (!createDeptName.isSuccess() && createDeptName.getData() != null) { |
|
|
@ -423,8 +423,8 @@ public class AreaMonthReportServiceImpl implements IAreaMonthReportService { |
|
|
|
if (findShortagesYear != 0 && shortagesYear != 0) { |
|
|
|
if (findShortagesYear != 0 && shortagesYear != 0) { |
|
|
|
shortagesRate = BigDecimal.valueOf(shortagesYear).divide(BigDecimal.valueOf(findShortagesYear), 2, BigDecimal.ROUND_UP).doubleValue(); |
|
|
|
shortagesRate = BigDecimal.valueOf(shortagesYear).divide(BigDecimal.valueOf(findShortagesYear), 2, BigDecimal.ROUND_UP).doubleValue(); |
|
|
|
} |
|
|
|
} |
|
|
|
Integer findShortagesMon = (int) Optional.ofNullable(monPhenomenonList).orElse(new ArrayList<>()).stream().filter(s -> s.getDefectGrading().equals(levelList.getKey())).count(); |
|
|
|
int findShortagesMon = (int) Optional.ofNullable(monPhenomenonList).orElse(new ArrayList<>()).stream().filter(s -> s.getDefectGrading().equals(levelList.getKey())).count(); |
|
|
|
Integer shortagesMon = (int) Optional.ofNullable(monConclusionList).orElse(new ArrayList<>()).stream().filter(s -> s.getDefectGrading().equals(levelList.getKey())).count(); |
|
|
|
int shortagesMon = (int) Optional.ofNullable(monConclusionList).orElse(new ArrayList<>()).stream().filter(s -> s.getDefectGrading().equals(levelList.getKey())).count(); |
|
|
|
CheckChartVo checkChartVo = new CheckChartVo(deptName1.getData(), levelList.getKey(), findShortagesMon, shortagesMon, findShortagesYear, shortagesYear, shortagesRate); |
|
|
|
CheckChartVo checkChartVo = new CheckChartVo(deptName1.getData(), levelList.getKey(), findShortagesMon, shortagesMon, findShortagesYear, shortagesYear, shortagesRate); |
|
|
|
checkChartRes.add(checkChartVo); |
|
|
|
checkChartRes.add(checkChartVo); |
|
|
|
} |
|
|
|
} |
|
|
@ -438,8 +438,8 @@ public class AreaMonthReportServiceImpl implements IAreaMonthReportService { |
|
|
|
if (findShortagesYear != 0 && shortagesYear != 0) { |
|
|
|
if (findShortagesYear != 0 && shortagesYear != 0) { |
|
|
|
shortagesRate = BigDecimal.valueOf(shortagesYear).divide(BigDecimal.valueOf(findShortagesYear), 2, BigDecimal.ROUND_UP).doubleValue(); |
|
|
|
shortagesRate = BigDecimal.valueOf(shortagesYear).divide(BigDecimal.valueOf(findShortagesYear), 2, BigDecimal.ROUND_UP).doubleValue(); |
|
|
|
} |
|
|
|
} |
|
|
|
Integer findShortagesMon = (int) Optional.ofNullable(monPhenomenonList).orElse(new ArrayList<>()).stream().filter(s -> s.getDefectGrading().equals(levelPhenomenon.getKey())).count(); |
|
|
|
int findShortagesMon = (int) Optional.ofNullable(monPhenomenonList).orElse(new ArrayList<>()).stream().filter(s -> s.getDefectGrading().equals(levelPhenomenon.getKey())).count(); |
|
|
|
Integer shortagesMon = (int) Optional.ofNullable(monConclusionList).orElse(new ArrayList<>()).stream().filter(s -> s.getDefectGrading().equals(levelPhenomenon.getKey())).count(); |
|
|
|
int shortagesMon = (int) Optional.ofNullable(monConclusionList).orElse(new ArrayList<>()).stream().filter(s -> s.getDefectGrading().equals(levelPhenomenon.getKey())).count(); |
|
|
|
CheckChartVo checkChartVo = new CheckChartVo("总计", levelPhenomenon.getKey(), findShortagesMon, shortagesMon, findShortagesYear, shortagesYear, shortagesRate); |
|
|
|
CheckChartVo checkChartVo = new CheckChartVo("总计", levelPhenomenon.getKey(), findShortagesMon, shortagesMon, findShortagesYear, shortagesYear, shortagesRate); |
|
|
|
checkChartRes.add(checkChartVo); |
|
|
|
checkChartRes.add(checkChartVo); |
|
|
|
} |
|
|
|
} |
|
|
|