|
|
@ -128,181 +128,181 @@ public class OperStationMonthReportServiceImpl implements IOperStationMonthRepor |
|
|
|
**/ |
|
|
|
**/ |
|
|
|
private static final String STATION_REPORT_OUTSIDE = "1"; |
|
|
|
private static final String STATION_REPORT_OUTSIDE = "1"; |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
// @Override
|
|
|
|
public StationReportAllVO getStationMonthReport(String yearAndMonth, DeptVO deptVO) { |
|
|
|
// public StationReportAllVO getStationMonthReport(String yearAndMonth, DeptVO deptVO) {
|
|
|
|
StationReportAllVO stationReportAllVo = new StationReportAllVO(); |
|
|
|
// StationReportAllVO stationReportAllVo = new StationReportAllVO();
|
|
|
|
stationReportAllVo.setStationName(deptVO.getDeptName()); |
|
|
|
// stationReportAllVo.setStationName(deptVO.getDeptName());
|
|
|
|
stationReportAllVo.setYearMonth(YearMonth.parse(yearAndMonth).format(DateTimeFormatter.ofPattern("yyyy年MM月"))); |
|
|
|
// stationReportAllVo.setYearMonth(YearMonth.parse(yearAndMonth).format(DateTimeFormatter.ofPattern("yyyy年MM月")));
|
|
|
|
//处理请求参数
|
|
|
|
// //处理请求参数
|
|
|
|
Map<String, Object> params = new HashMap<>(); |
|
|
|
// Map<String, Object> params = new HashMap<>();
|
|
|
|
//使用预定义实例来转换
|
|
|
|
// //使用预定义实例来转换
|
|
|
|
DateTimeFormatter fmt = DateTimeFormatter.ISO_LOCAL_DATE; |
|
|
|
// DateTimeFormatter fmt = DateTimeFormatter.ISO_LOCAL_DATE;
|
|
|
|
LocalDate startDate = DateUtil.getFirstDayByYearMonth(yearAndMonth); |
|
|
|
// LocalDate startDate = DateUtil.getFirstDayByYearMonth(yearAndMonth);
|
|
|
|
LocalDate endDate = DateUtil.getLastDayByYearMonth(yearAndMonth); |
|
|
|
// LocalDate endDate = DateUtil.getLastDayByYearMonth(yearAndMonth);
|
|
|
|
params.put("startDate", fmt.format(startDate)); |
|
|
|
// params.put("startDate", fmt.format(startDate));
|
|
|
|
params.put("endDate", fmt.format(endDate)); |
|
|
|
// params.put("endDate", fmt.format(endDate));
|
|
|
|
|
|
|
|
//
|
|
|
|
List<Long> deptIdList = new ArrayList<>(); |
|
|
|
// List<Long> deptIdList = new ArrayList<>();
|
|
|
|
deptIdList.add(deptVO.getId()); |
|
|
|
// deptIdList.add(deptVO.getId());
|
|
|
|
//获取下属机构
|
|
|
|
// //获取下属机构
|
|
|
|
R<List<Dept>> childDeptListR = sysClient.getDeptChild(deptVO.getId()); |
|
|
|
// R<List<Dept>> childDeptListR = sysClient.getDeptChild(deptVO.getId());
|
|
|
|
if (childDeptListR.isSuccess() && CollectionUtil.isNotEmpty(childDeptListR.getData())) { |
|
|
|
// if (childDeptListR.isSuccess() && CollectionUtil.isNotEmpty(childDeptListR.getData())) {
|
|
|
|
deptIdList.addAll(childDeptListR.getData().stream().map(Dept::getId).collect(Collectors.toList())); |
|
|
|
// deptIdList.addAll(childDeptListR.getData().stream().map(Dept::getId).collect(Collectors.toList()));
|
|
|
|
} |
|
|
|
// }
|
|
|
|
params.put("deptId", deptIdList); |
|
|
|
// params.put("deptId", deptIdList);
|
|
|
|
|
|
|
|
//
|
|
|
|
//获取机构及子机构下的站点
|
|
|
|
// //获取机构及子机构下的站点
|
|
|
|
List<StationEntity> stationEntityList = stationService.list(new LambdaQueryWrapper<StationEntity>() {{ |
|
|
|
// List<StationEntity> stationEntityList = stationService.list(new LambdaQueryWrapper<StationEntity>() {{
|
|
|
|
in(StationEntity::getRefDept, deptIdList); |
|
|
|
// in(StationEntity::getRefDept, deptIdList);
|
|
|
|
}}); |
|
|
|
// }});
|
|
|
|
|
|
|
|
//
|
|
|
|
//监控线程执行完后返回结果
|
|
|
|
// //监控线程执行完后返回结果
|
|
|
|
CountDownLatch countDownLatch = new CountDownLatch(POOL_QUANTITY); |
|
|
|
// CountDownLatch countDownLatch = new CountDownLatch(POOL_QUANTITY);
|
|
|
|
long startMillis = System.currentTimeMillis(); |
|
|
|
// long startMillis = System.currentTimeMillis();
|
|
|
|
//电站发电情况
|
|
|
|
// //电站发电情况
|
|
|
|
pool.execute(() -> { |
|
|
|
// pool.execute(() -> {
|
|
|
|
try { |
|
|
|
// try {
|
|
|
|
List<StationReportVO> powerList = new ArrayList<>(); |
|
|
|
// List<StationReportVO> powerList = new ArrayList<>();
|
|
|
|
stationEntityList.forEach(stationEntity -> { |
|
|
|
// stationEntityList.forEach(stationEntity -> {
|
|
|
|
List<StationReportVO> stationReportVOList = mainSystemMonitoringService.getElectricSituation(yearAndMonth, stationEntity.getCode()); |
|
|
|
// List<StationReportVO> stationReportVOList = mainSystemMonitoringService.getElectricSituation(yearAndMonth, stationEntity.getCode());
|
|
|
|
powerList.addAll(stationReportVOList); |
|
|
|
// powerList.addAll(stationReportVOList);
|
|
|
|
}); |
|
|
|
// });
|
|
|
|
stationReportAllVo.setStationReportVOList(powerList); |
|
|
|
// stationReportAllVo.setStationReportVOList(powerList);
|
|
|
|
} finally { |
|
|
|
// } finally {
|
|
|
|
countDownLatch.countDown(); |
|
|
|
// countDownLatch.countDown();
|
|
|
|
log.info("电站发电耗时:"+(System.currentTimeMillis()-startMillis)+"ms"); |
|
|
|
// log.info("电站发电耗时:"+(System.currentTimeMillis()-startMillis)+"ms");
|
|
|
|
System.out.print("电站发电耗时:"+(System.currentTimeMillis()-startMillis)+"ms"); |
|
|
|
// System.out.print("电站发电耗时:"+(System.currentTimeMillis()-startMillis)+"ms");
|
|
|
|
} |
|
|
|
// }
|
|
|
|
}); |
|
|
|
// });
|
|
|
|
//值班情况
|
|
|
|
// //值班情况
|
|
|
|
pool.execute(() -> { |
|
|
|
// pool.execute(() -> {
|
|
|
|
try { |
|
|
|
// try {
|
|
|
|
// List<DutyReportVO> dutyReportVOList = iImsDutyMainService.getDutyMainStatisticsByClassId(params);
|
|
|
|
//// List<DutyReportVO> dutyReportVOList = iImsDutyMainService.getDutyMainStatisticsByClassId(params);
|
|
|
|
// stationReportAllVo.setDutyReportVOList(dutyReportVOList);
|
|
|
|
//// stationReportAllVo.setDutyReportVOList(dutyReportVOList);
|
|
|
|
} finally { |
|
|
|
// } finally {
|
|
|
|
countDownLatch.countDown(); |
|
|
|
// countDownLatch.countDown();
|
|
|
|
log.info("值班情况耗时:"+(System.currentTimeMillis()-startMillis)+"ms"); |
|
|
|
// log.info("值班情况耗时:"+(System.currentTimeMillis()-startMillis)+"ms");
|
|
|
|
System.out.print("值班情况耗时:"+(System.currentTimeMillis()-startMillis)+"ms"); |
|
|
|
// System.out.print("值班情况耗时:"+(System.currentTimeMillis()-startMillis)+"ms");
|
|
|
|
} |
|
|
|
// }
|
|
|
|
}); |
|
|
|
// });
|
|
|
|
//日常维护
|
|
|
|
// //日常维护
|
|
|
|
pool.execute(() -> { |
|
|
|
// pool.execute(() -> {
|
|
|
|
try { |
|
|
|
// try {
|
|
|
|
List<MaintenanceReportVO> maintenanceList = operMaintenanceTaskService.getMaintenanceStatisticsByDisposer(params); |
|
|
|
// List<MaintenanceReportVO> maintenanceList = operMaintenanceTaskService.getMaintenanceStatisticsByDisposer(params);
|
|
|
|
stationReportAllVo.setMaintenanceReportVOList(maintenanceList); |
|
|
|
// stationReportAllVo.setMaintenanceReportVOList(maintenanceList);
|
|
|
|
} finally { |
|
|
|
// } finally {
|
|
|
|
countDownLatch.countDown(); |
|
|
|
// countDownLatch.countDown();
|
|
|
|
log.info("日常维护:"+(System.currentTimeMillis()-startMillis)+"ms"); |
|
|
|
// log.info("日常维护:"+(System.currentTimeMillis()-startMillis)+"ms");
|
|
|
|
System.out.print("日常维护:"+(System.currentTimeMillis()-startMillis)+"ms"); |
|
|
|
// System.out.print("日常维护:"+(System.currentTimeMillis()-startMillis)+"ms");
|
|
|
|
} |
|
|
|
// }
|
|
|
|
}); |
|
|
|
// });
|
|
|
|
//检修
|
|
|
|
// //检修
|
|
|
|
pool.execute(() -> { |
|
|
|
// pool.execute(() -> {
|
|
|
|
try { |
|
|
|
// try {
|
|
|
|
// List<AccessRunReportVO> accessList = operAccessTaskService.getAccessTaskByName(params);
|
|
|
|
//// List<AccessRunReportVO> accessList = operAccessTaskService.getAccessTaskByName(params);
|
|
|
|
// stationReportAllVo.setAccessReportVOList(accessList);
|
|
|
|
//// stationReportAllVo.setAccessReportVOList(accessList);
|
|
|
|
} finally { |
|
|
|
// } finally {
|
|
|
|
countDownLatch.countDown(); |
|
|
|
// countDownLatch.countDown();
|
|
|
|
log.info("检修:"+(System.currentTimeMillis()-startMillis)+"ms"); |
|
|
|
// log.info("检修:"+(System.currentTimeMillis()-startMillis)+"ms");
|
|
|
|
System.out.print("检修:"+(System.currentTimeMillis()-startMillis)+"ms"); |
|
|
|
// System.out.print("检修:"+(System.currentTimeMillis()-startMillis)+"ms");
|
|
|
|
} |
|
|
|
// }
|
|
|
|
}); |
|
|
|
// });
|
|
|
|
//缺陷
|
|
|
|
// //缺陷
|
|
|
|
pool.execute(() -> { |
|
|
|
// pool.execute(() -> {
|
|
|
|
try { |
|
|
|
// try {
|
|
|
|
List<DefectReportsVO> defectList = operDefectService.getFaultByFaultCode(params); |
|
|
|
// List<DefectReportsVO> defectList = operDefectService.getFaultByFaultCode(params);
|
|
|
|
stationReportAllVo.setDefectReportsVOList(defectList); |
|
|
|
// stationReportAllVo.setDefectReportsVOList(defectList);
|
|
|
|
} finally { |
|
|
|
// } finally {
|
|
|
|
countDownLatch.countDown(); |
|
|
|
// countDownLatch.countDown();
|
|
|
|
log.info("缺陷:"+(System.currentTimeMillis()-startMillis)+"ms"); |
|
|
|
// log.info("缺陷:"+(System.currentTimeMillis()-startMillis)+"ms");
|
|
|
|
System.out.print("缺陷:"+(System.currentTimeMillis()-startMillis)+"ms"); |
|
|
|
// System.out.print("缺陷:"+(System.currentTimeMillis()-startMillis)+"ms");
|
|
|
|
} |
|
|
|
// }
|
|
|
|
}); |
|
|
|
// });
|
|
|
|
//两票统计
|
|
|
|
// //两票统计
|
|
|
|
pool.execute(() -> { |
|
|
|
// pool.execute(() -> {
|
|
|
|
try { |
|
|
|
// try {
|
|
|
|
String deptIds = deptIdList.stream().map(deptId -> deptId.toString()).collect(Collectors.joining(",")); |
|
|
|
// String deptIds = deptIdList.stream().map(deptId -> deptId.toString()).collect(Collectors.joining(","));
|
|
|
|
TicketStatisticDTO ticketStatisticDTO = new TicketStatisticDTO(); |
|
|
|
// TicketStatisticDTO ticketStatisticDTO = new TicketStatisticDTO();
|
|
|
|
ticketStatisticDTO.setStartDate(fmt.format(startDate)); |
|
|
|
// ticketStatisticDTO.setStartDate(fmt.format(startDate));
|
|
|
|
ticketStatisticDTO.setEndDate(fmt.format(endDate)); |
|
|
|
// ticketStatisticDTO.setEndDate(fmt.format(endDate));
|
|
|
|
ticketStatisticDTO.setDeptIds(deptIds); |
|
|
|
// ticketStatisticDTO.setDeptIds(deptIds);
|
|
|
|
List<TicketInfoStatisticVO> ticketVOS = ticketInfoAllClient.getTicketReportStatistic(ticketStatisticDTO); |
|
|
|
// List<TicketInfoStatisticVO> ticketVOS = ticketInfoAllClient.getTicketReportStatistic(ticketStatisticDTO);
|
|
|
|
stationReportAllVo.setTicketInfoStatisticVOList(ticketVOS); |
|
|
|
// stationReportAllVo.setTicketInfoStatisticVOList(ticketVOS);
|
|
|
|
} finally { |
|
|
|
// } finally {
|
|
|
|
countDownLatch.countDown(); |
|
|
|
// countDownLatch.countDown();
|
|
|
|
log.info("两票统计:"+(System.currentTimeMillis()-startMillis)+"ms"); |
|
|
|
// log.info("两票统计:"+(System.currentTimeMillis()-startMillis)+"ms");
|
|
|
|
System.out.print("两票统计:"+(System.currentTimeMillis()-startMillis)+"ms"); |
|
|
|
// System.out.print("两票统计:"+(System.currentTimeMillis()-startMillis)+"ms");
|
|
|
|
} |
|
|
|
// }
|
|
|
|
}); |
|
|
|
// });
|
|
|
|
//巡检
|
|
|
|
// //巡检
|
|
|
|
pool.execute(() -> { |
|
|
|
// pool.execute(() -> {
|
|
|
|
try { |
|
|
|
// try {
|
|
|
|
List<TaskReportVO> taskReportVOS = taskReportClient.getInspectTaskReport(params); |
|
|
|
// List<TaskReportVO> taskReportVOS = taskReportClient.getInspectTaskReport(params);
|
|
|
|
this.fillInspectProblem(startDate, endDate, deptIdList, taskReportVOS); |
|
|
|
// this.fillInspectProblem(startDate, endDate, deptIdList, taskReportVOS);
|
|
|
|
stationReportAllVo.setInspectReportVOList(taskReportVOS); |
|
|
|
// stationReportAllVo.setInspectReportVOList(taskReportVOS);
|
|
|
|
} finally { |
|
|
|
// } finally {
|
|
|
|
countDownLatch.countDown(); |
|
|
|
// countDownLatch.countDown();
|
|
|
|
log.info("巡检:"+(System.currentTimeMillis()-startMillis)+"ms"); |
|
|
|
// log.info("巡检:"+(System.currentTimeMillis()-startMillis)+"ms");
|
|
|
|
System.out.print("巡检:"+(System.currentTimeMillis()-startMillis)+"ms"); |
|
|
|
// System.out.print("巡检:"+(System.currentTimeMillis()-startMillis)+"ms");
|
|
|
|
} |
|
|
|
// }
|
|
|
|
}); |
|
|
|
// });
|
|
|
|
//智能诊断
|
|
|
|
// //智能诊断
|
|
|
|
pool.execute(() -> { |
|
|
|
// pool.execute(() -> {
|
|
|
|
if (CollectionUtil.isNotEmpty(stationEntityList)) { |
|
|
|
// if (CollectionUtil.isNotEmpty(stationEntityList)) {
|
|
|
|
StatisticStatusDTO statisticStatusDTO = new StatisticStatusDTO(); |
|
|
|
// StatisticStatusDTO statisticStatusDTO = new StatisticStatusDTO();
|
|
|
|
List<String> stationIds = stationEntityList.stream().map(StationEntity::getCode).collect(Collectors.toList()); |
|
|
|
// List<String> stationIds = stationEntityList.stream().map(StationEntity::getCode).collect(Collectors.toList());
|
|
|
|
String[] stationIdArray = new String[stationIds.size()]; |
|
|
|
// String[] stationIdArray = new String[stationIds.size()];
|
|
|
|
stationIds.toArray(stationIdArray); |
|
|
|
// stationIds.toArray(stationIdArray);
|
|
|
|
statisticStatusDTO.setStationIds(stationIdArray); |
|
|
|
// statisticStatusDTO.setStationIds(stationIdArray);
|
|
|
|
statisticStatusDTO.setThreshold(0.3f); |
|
|
|
// statisticStatusDTO.setThreshold(0.3f);
|
|
|
|
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"); |
|
|
|
// DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
|
|
|
|
statisticStatusDTO.setStart(formatter.format(LocalDateTime.of(startDate, LocalTime.MIN))); |
|
|
|
// statisticStatusDTO.setStart(formatter.format(LocalDateTime.of(startDate, LocalTime.MIN)));
|
|
|
|
statisticStatusDTO.setEnd(formatter.format(LocalDateTime.of(endDate, LocalTime.MAX))); |
|
|
|
// statisticStatusDTO.setEnd(formatter.format(LocalDateTime.of(endDate, LocalTime.MAX)));
|
|
|
|
R<Map<String, List<StatisticStatusVO>>> diagnoseResult = diagnoseClient.getStatisticStatus(statisticStatusDTO); |
|
|
|
// R<Map<String, List<StatisticStatusVO>>> diagnoseResult = diagnoseClient.getStatisticStatus(statisticStatusDTO);
|
|
|
|
List<String> diagnoseConclusionList = new ArrayList<>(); |
|
|
|
// List<String> diagnoseConclusionList = new ArrayList<>();
|
|
|
|
if (diagnoseResult.isSuccess()) { |
|
|
|
// if (diagnoseResult.isSuccess()) {
|
|
|
|
Map<String, List<StatisticStatusVO>> statisticStatusVOList = diagnoseResult.getData(); |
|
|
|
// Map<String, List<StatisticStatusVO>> statisticStatusVOList = diagnoseResult.getData();
|
|
|
|
statisticStatusVOList.forEach((k, v) -> { |
|
|
|
// statisticStatusVOList.forEach((k, v) -> {
|
|
|
|
if (v.size() > 5) { |
|
|
|
// if (v.size() > 5) {
|
|
|
|
v = v.subList(0, 5); |
|
|
|
// v = v.subList(0, 5);
|
|
|
|
} |
|
|
|
// }
|
|
|
|
String diagnoseConclusion = v.stream().map(s -> { |
|
|
|
// String diagnoseConclusion = v.stream().map(s -> {
|
|
|
|
String riskLevel = ""; |
|
|
|
// String riskLevel = "";
|
|
|
|
if (s.getSeverity() >= 3) { |
|
|
|
// if (s.getSeverity() >= 3) {
|
|
|
|
riskLevel = "高风险"; |
|
|
|
// riskLevel = "高风险";
|
|
|
|
} else if (s.getSeverity() == 2) { |
|
|
|
// } else if (s.getSeverity() == 2) {
|
|
|
|
riskLevel = "一般"; |
|
|
|
// riskLevel = "一般";
|
|
|
|
} else if (s.getSeverity() == 1) { |
|
|
|
// } else if (s.getSeverity() == 1) {
|
|
|
|
riskLevel = "低风险"; |
|
|
|
// riskLevel = "低风险";
|
|
|
|
} |
|
|
|
// }
|
|
|
|
String c = "发生在" + s.getOrd() + "的" + s.getName() + ",风险等级:" + riskLevel + ",最后一次出现的时间:" + s.getLastBeginTime() + ";";//,持续时长:"+s.getLongTime()+"
|
|
|
|
// String c = "发生在" + s.getOrd() + "的" + s.getName() + ",风险等级:" + riskLevel + ",最后一次出现的时间:" + s.getLastBeginTime() + ";";//,持续时长:"+s.getLongTime()+"
|
|
|
|
return c; |
|
|
|
// return c;
|
|
|
|
}).collect(Collectors.joining("\n")); |
|
|
|
// }).collect(Collectors.joining("\n"));
|
|
|
|
if (StringUtil.isNotBlank(diagnoseConclusion)) { |
|
|
|
// if (StringUtil.isNotBlank(diagnoseConclusion)) {
|
|
|
|
StationEntity stationEntity = stationService.getById(k); |
|
|
|
// StationEntity stationEntity = stationService.getById(k);
|
|
|
|
if (ObjectUtil.isNotEmpty(stationEntity)) { |
|
|
|
// if (ObjectUtil.isNotEmpty(stationEntity)) {
|
|
|
|
diagnoseConclusion = stationEntity.getName() + "本月智能诊断服务预警前五位的可能存在风险的故障信息:\n" + diagnoseConclusion; |
|
|
|
// diagnoseConclusion = stationEntity.getName() + "本月智能诊断服务预警前五位的可能存在风险的故障信息:\n" + diagnoseConclusion;
|
|
|
|
diagnoseConclusionList.add(diagnoseConclusion); |
|
|
|
// diagnoseConclusionList.add(diagnoseConclusion);
|
|
|
|
} |
|
|
|
// }
|
|
|
|
} |
|
|
|
// }
|
|
|
|
}); |
|
|
|
// });
|
|
|
|
stationReportAllVo.setDiagnoseConclusion(diagnoseConclusionList.stream().collect(Collectors.joining("\n"))); |
|
|
|
// stationReportAllVo.setDiagnoseConclusion(diagnoseConclusionList.stream().collect(Collectors.joining("\n")));
|
|
|
|
stationReportAllVo.setStatisticStatusVOList(statisticStatusVOList); |
|
|
|
// stationReportAllVo.setStatisticStatusVOList(statisticStatusVOList);
|
|
|
|
} |
|
|
|
// }
|
|
|
|
} |
|
|
|
// }
|
|
|
|
countDownLatch.countDown(); |
|
|
|
// countDownLatch.countDown();
|
|
|
|
}); |
|
|
|
// });
|
|
|
|
//所有模板数据获取完成后释放锁
|
|
|
|
// //所有模板数据获取完成后释放锁
|
|
|
|
try { |
|
|
|
// try {
|
|
|
|
countDownLatch.await(); |
|
|
|
// countDownLatch.await();
|
|
|
|
} catch (InterruptedException e) { |
|
|
|
// } catch (InterruptedException e) {
|
|
|
|
e.printStackTrace(); |
|
|
|
// e.printStackTrace();
|
|
|
|
Thread.currentThread().interrupt(); |
|
|
|
// Thread.currentThread().interrupt();
|
|
|
|
} |
|
|
|
// }
|
|
|
|
//小结
|
|
|
|
// //小结
|
|
|
|
this.getStationReportConclusion(stationReportAllVo, params); |
|
|
|
// this.getStationReportConclusion(stationReportAllVo, params);
|
|
|
|
return stationReportAllVo; |
|
|
|
// return stationReportAllVo;
|
|
|
|
} |
|
|
|
// }
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public StationRunReportAllVO getStationMonthReportV2(String yearAndMonth, DeptVO deptVO) { |
|
|
|
public StationRunReportAllVO getStationMonthReportV2(String yearAndMonth, DeptVO deptVO) { |
|
|
|
StationRunReportAllVO stationReportAllVo = new StationRunReportAllVO(); |
|
|
|
StationRunReportAllVO stationReportAllVo = new StationRunReportAllVO(); |
|
|
@ -1217,8 +1217,10 @@ public class OperStationMonthReportServiceImpl implements IOperStationMonthRepor |
|
|
|
//日常维护任务统计
|
|
|
|
//日常维护任务统计
|
|
|
|
if (CollectionUtil.isNotEmpty(stationReportAllVo.getMaintenanceReportVOList())) { |
|
|
|
if (CollectionUtil.isNotEmpty(stationReportAllVo.getMaintenanceReportVOList())) { |
|
|
|
List<RunReportVO> maintenanceReportVOList = stationReportAllVo.getMaintenanceReportVOList(); |
|
|
|
List<RunReportVO> maintenanceReportVOList = stationReportAllVo.getMaintenanceReportVOList(); |
|
|
|
int completeTaskNum = maintenanceReportVOList.stream().filter(vo -> Func.isNotEmpty(vo.getCompleteNum())).mapToInt(RunReportVO::getCompleteNum).sum(); |
|
|
|
int completeTaskNum = maintenanceReportVOList.stream().filter(vo ->"合计".equals(vo.getUserName())) |
|
|
|
int incompleteTaskNum = maintenanceReportVOList.stream().filter(vo -> Func.isNotEmpty(vo.getIncompleteNum())).mapToInt(RunReportVO::getIncompleteNum).sum(); |
|
|
|
.filter(vo -> Func.isNotEmpty(vo.getCompleteNum())).mapToInt(RunReportVO::getCompleteNum).sum(); |
|
|
|
|
|
|
|
int incompleteTaskNum = maintenanceReportVOList.stream().filter(vo ->"合计".equals(vo.getUserName())) |
|
|
|
|
|
|
|
.filter(vo -> Func.isNotEmpty(vo.getIncompleteNum())).mapToInt(RunReportVO::getIncompleteNum).sum(); |
|
|
|
if (completeTaskNum == 0 && incompleteTaskNum == 0) { |
|
|
|
if (completeTaskNum == 0 && incompleteTaskNum == 0) { |
|
|
|
conclusion.append("2、无日常维护任务;\r\n"); |
|
|
|
conclusion.append("2、无日常维护任务;\r\n"); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|