|
|
|
@ -536,9 +536,12 @@ public class OperStationMonthReportServiceImpl implements IOperStationMonthRepor
|
|
|
|
|
}else { |
|
|
|
|
stationRunReportVO.setPowerMonRate("0.0"); |
|
|
|
|
} |
|
|
|
|
double sumPowerYearPlan = reportVOS.stream().mapToDouble(StationRunReportVO::getPowerYearPlan).sum(); |
|
|
|
|
double sumPowerYearPlan = reportVOS.stream().mapToDouble(StationRunReportVO::getPowerYearPlan) |
|
|
|
|
.reduce(0, (a, b) -> new BigDecimal(a).add(new BigDecimal(b)).setScale(2,BigDecimal.ROUND_UP).doubleValue()); |
|
|
|
|
stationRunReportVO.setPowerYearPlan(sumPowerYearPlan); |
|
|
|
|
double sumFinishPowerYear = reportVOS.stream().map(StationRunReportVO::getFinishPowerYear).mapToDouble(s -> Double.valueOf(s)).sum(); |
|
|
|
|
// double sumFinishPowerYear = reportVOS.stream().map(StationRunReportVO::getFinishPowerYear).mapToDouble(s -> Double.valueOf(s)).sum();
|
|
|
|
|
double sumFinishPowerYear = reportVOS.stream().map(StationRunReportVO::getFinishPowerYear).mapToDouble(s -> Double.valueOf(s)) |
|
|
|
|
.reduce(0, (a, b) -> new BigDecimal(a).add(new BigDecimal(b)).setScale(2,BigDecimal.ROUND_UP).doubleValue()); |
|
|
|
|
stationRunReportVO.setFinishPowerYear(String.valueOf(sumFinishPowerYear)); |
|
|
|
|
if (!ObjectUtils.isEmpty(sumPowerYearPlan)){ |
|
|
|
|
BigDecimal powerYearRate = new BigDecimal(sumFinishPowerYear).divide(new BigDecimal(sumPowerYearPlan),4,BigDecimal.ROUND_UP) |
|
|
|
|