diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/defect/service/impl/DefectCheckServiceImpl.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/defect/service/impl/DefectCheckServiceImpl.java index 8e6eaa6..a8f69d7 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/defect/service/impl/DefectCheckServiceImpl.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/defect/service/impl/DefectCheckServiceImpl.java @@ -186,7 +186,7 @@ public class DefectCheckServiceImpl extends BaseServiceImpl result = processClient.startProcessInstanceContainNameByKey(TreatMethodConstant.DEFECT_CHECK, businessKey, processName, variable); // 流程开启失败 if (!result.isSuccess()) { - throw new ServiceException("缺陷流程开启失败,错误描述 : " + result.getCode()); + throw new ServiceException("缺陷流程开启失败,错误描述 : " + result.getMsg()); } // 关联流程唯一键 entity.setCheckProcessInstanceId(result.getData().getProcessInstanceId()); diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/impl/AreaMonthReportServiceImpl.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/impl/AreaMonthReportServiceImpl.java index bcc9c75..592fae1 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/impl/AreaMonthReportServiceImpl.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/impl/AreaMonthReportServiceImpl.java @@ -349,13 +349,13 @@ public class AreaMonthReportServiceImpl implements IAreaMonthReportService { wrapper.eq(OperPhenomenonEntity::getDiscriminateStatus, TreatMethodConstant.AUTO_SCREENED); wrapper.in(OperPhenomenonEntity::getCreateDept, deptIds); List 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 monConclusionList = monPhenomenonList.stream().filter(s -> "1".equals(s.getConclusionStatus())).collect(Collectors.toList()); // 只填写二类及以上缺陷 - List monConclusionListBy = monConclusionList.stream().filter(s -> !"1".equals(s.getDefectGrading())).sorted(Comparator.comparing(OperPhenomenonEntity::getCreateDept).reversed().thenComparing(OperPhenomenonEntity::getDefectGrading)).collect(Collectors.toList()); + List monConclusionListByDefectGrading = monConclusionList.stream().filter(s -> !"1".equals(s.getDefectGrading())).sorted(Comparator.comparing(OperPhenomenonEntity::getCreateDept).reversed().thenComparing(OperPhenomenonEntity::getDefectGrading)).collect(Collectors.toList()); // 各电站缺陷处理统计表 ArrayList> checkList = new ArrayList<>(); - for (OperPhenomenonEntity operPhenomenonEntity : monConclusionListBy) { + for (OperPhenomenonEntity operPhenomenonEntity : monConclusionListByDefectGrading) { Long createDept = operPhenomenonEntity.getCreateDept(); R createDeptName = sysClient.getDeptName(createDept); if (!createDeptName.isSuccess() && createDeptName.getData() != null) { @@ -423,8 +423,8 @@ public class AreaMonthReportServiceImpl implements IAreaMonthReportService { if (findShortagesYear != 0 && shortagesYear != 0) { 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(); - Integer shortagesMon = (int) Optional.ofNullable(monConclusionList).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(); + 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); checkChartRes.add(checkChartVo); } @@ -438,8 +438,8 @@ public class AreaMonthReportServiceImpl implements IAreaMonthReportService { if (findShortagesYear != 0 && shortagesYear != 0) { 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(); - Integer shortagesMon = (int) Optional.ofNullable(monConclusionList).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(); + 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); checkChartRes.add(checkChartVo); }