Browse Source

fix: 解决统计月报中无巡检数据的问题

zhongwei
liwen 8 months ago
parent
commit
2dd91c8e0c
  1. 5
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/report/service/impl/OperStationMonthReportServiceImpl.java

5
hzims-service/operational/src/main/java/com/hnac/hzims/operational/report/service/impl/OperStationMonthReportServiceImpl.java

@ -624,7 +624,7 @@ public class OperStationMonthReportServiceImpl implements IOperStationMonthRepor
map.put("inspectReportSum", sumList);
continue;
}
fillMapByClass(inspectReportVOList,list);
fillMapByClass(inspectReport, list);
}
map.put("inspectReportVOList", list);
}
@ -1222,7 +1222,8 @@ public class OperStationMonthReportServiceImpl implements IOperStationMonthRepor
int sum = stationReportAllVo.getTicketInfoStatisticVOList().stream().filter(s->"合计".equals(s.getTicketInfoType())).mapToInt(TicketInfoStatisticVO::getTicketInfoNumber).sum();
int qualifiedNum = stationReportAllVo.getTicketInfoStatisticVOList().stream().filter(s->"合计".equals(s.getTicketInfoType())).mapToInt(TicketInfoStatisticVO::getTicketInfoQualifiedNum).sum();
// double ticketInfoProportion = new BigDecimal(qualifiedNum ).divide(sum,2, RoundingMode.HALF_DOWN).doubleValue();
double ticketInfoProportion = new BigDecimal(qualifiedNum ).divide(new BigDecimal(sum*100),2, RoundingMode.HALF_DOWN).doubleValue();
double ticketInfoProportion = sum == 0 ? 0 : new BigDecimal(qualifiedNum).divide(new BigDecimal(sum*100),2,
RoundingMode.HALF_DOWN).doubleValue();
String phenomenonConclusion = "5、本月开票%s张,合格率%s;";
conclusion.append(String.format(phenomenonConclusion, sum, ticketInfoProportion)).append(";\r\n");
}else {

Loading…
Cancel
Save