|
|
|
@ -487,6 +487,9 @@ public class OperStationMonthReportServiceImpl implements IOperStationMonthRepor
|
|
|
|
|
fdpRunReportVO.setIndex(index); |
|
|
|
|
fdpRunReportVO.setLastBeginTime(fdpFaultHistoryDataEntity.getCreateTime()); |
|
|
|
|
fdpRunReportVO.setType("智能预警"); |
|
|
|
|
fdpRunReportVO.setOrd(fdpFaultHistoryDataEntity.getOrd()); |
|
|
|
|
List<StationEntity> stationEntities = stationEntityList.stream().filter(s -> s.getCode().equals(fdpFaultHistoryDataEntity.getStation())).collect(Collectors.toList()); |
|
|
|
|
fdpRunReportVO.setStation(stationEntities.get(0).getName()); |
|
|
|
|
fdpRunReportVO.setContent(fdpFaultHistoryDataEntity.getName()); |
|
|
|
|
fdpRunReportVO.setNum(String.valueOf(fdpFaultHistoryDataEntities.size())); |
|
|
|
|
fdpRunReportVO.setReason(fdpFaultHistoryDataEntity.getDiagReason()); |
|
|
|
@ -1222,11 +1225,17 @@ public class OperStationMonthReportServiceImpl implements IOperStationMonthRepor
|
|
|
|
|
List<RunReportVO> inspectReportVOList = stationReportAllVo.getInspectReportVOList(); |
|
|
|
|
int completeInspectTaskNum =inspectReportVOList.stream().filter(vo ->"合计".equals(vo.getUserName())).mapToInt(RunReportVO::getCompleteNum).sum(); |
|
|
|
|
int incompleteInspectTaskNum =inspectReportVOList.stream().filter(vo ->"合计".equals(vo.getUserName())).mapToInt(RunReportVO::getIncompleteNum).sum(); |
|
|
|
|
int sum=completeInspectTaskNum+incompleteInspectTaskNum; |
|
|
|
|
Double rate =0.0; |
|
|
|
|
if (sum!=0){ |
|
|
|
|
rate=new BigDecimal(completeInspectTaskNum).divide(new BigDecimal(sum),4,BigDecimal.ROUND_UP) |
|
|
|
|
.multiply(new BigDecimal(100)).setScale(2,BigDecimal.ROUND_UP).doubleValue(); |
|
|
|
|
} |
|
|
|
|
if (completeInspectTaskNum == 0 && incompleteInspectTaskNum == 0) { |
|
|
|
|
conclusion.append("3、无巡检任务;\r\n"); |
|
|
|
|
} else { |
|
|
|
|
String inspectTaskConclusion = "3、%s个巡检任务,已执行%s个巡检任务。"; |
|
|
|
|
conclusion.append(String.format(inspectTaskConclusion, (completeInspectTaskNum + incompleteInspectTaskNum), completeInspectTaskNum)).append(";\r\n"); |
|
|
|
|
String inspectTaskConclusion = "3、%s个巡检任务,已执行%s个巡检任务,完成率%s%%"; |
|
|
|
|
conclusion.append(String.format(inspectTaskConclusion, sum, completeInspectTaskNum,rate)).append(";\r\n"); |
|
|
|
|
} |
|
|
|
|
} else { |
|
|
|
|
conclusion.append("3、无巡检任务;\r\n"); |
|
|
|
|