|
|
|
@ -525,9 +525,11 @@ public class OperStationMonthReportServiceImpl implements IOperStationMonthRepor
|
|
|
|
|
StationRunReportVO stationRunReportVO=new StationRunReportVO(); |
|
|
|
|
stationRunReportVO.setStationName("合计"); |
|
|
|
|
if (CollectionUtil.isNotEmpty(reportVOS)){ |
|
|
|
|
double sumPowerMonPlan = reportVOS.stream().mapToDouble(StationRunReportVO::getPowerMonPlan).sum(); |
|
|
|
|
double sumPowerMonPlan = reportVOS.stream().mapToDouble(StationRunReportVO::getPowerMonPlan) |
|
|
|
|
.reduce(0, (a, b) -> new BigDecimal(a).add(new BigDecimal(b)).setScale(2,BigDecimal.ROUND_UP).doubleValue()); |
|
|
|
|
stationRunReportVO.setPowerMonPlan(new BigDecimal(sumPowerMonPlan).setScale(2,BigDecimal.ROUND_UP).doubleValue()); |
|
|
|
|
double sumFinishPowerMon = reportVOS.stream().map(StationRunReportVO::getFinishPowerMon).mapToDouble(s -> Double.valueOf(s)).sum(); |
|
|
|
|
double sumFinishPowerMon = reportVOS.stream().map(StationRunReportVO::getFinishPowerMon).mapToDouble(s -> Double.valueOf(s)) |
|
|
|
|
.reduce(0, (a, b) -> new BigDecimal(a).add(new BigDecimal(b)).setScale(2,BigDecimal.ROUND_UP).doubleValue()); |
|
|
|
|
stationRunReportVO.setFinishPowerMon(new BigDecimal(sumFinishPowerMon).setScale(2,BigDecimal.ROUND_UP).toString()); |
|
|
|
|
if (!ObjectUtils.isEmpty(sumPowerMonPlan)) { |
|
|
|
|
BigDecimal powerMonRate = new BigDecimal(sumFinishPowerMon).divide(new BigDecimal(sumPowerMonPlan),4,BigDecimal.ROUND_UP) |
|
|
|
|