|
|
@ -344,16 +344,19 @@ public class OperStationMonthReportServiceImpl implements IOperStationMonthRepor |
|
|
|
Integer currentYear = calendar.get(Calendar.YEAR); |
|
|
|
Integer currentYear = calendar.get(Calendar.YEAR); |
|
|
|
if (year>currentYear-3) { |
|
|
|
if (year>currentYear-3) { |
|
|
|
mainSystemMonitoringService.getElectricSituationByRedis(yearAndMonth, reportVOS, stationEntityList); |
|
|
|
mainSystemMonitoringService.getElectricSituationByRedis(yearAndMonth, reportVOS, stationEntityList); |
|
|
|
|
|
|
|
log.info("电站发电情况"+reportVOS.toString()); |
|
|
|
}else { |
|
|
|
}else { |
|
|
|
stationEntityList.forEach(stationEntity -> { |
|
|
|
stationEntityList.forEach(stationEntity -> { |
|
|
|
List<StationRunReportVO> stationReportVOList = mainSystemMonitoringService.getElectricSituationV2(yearAndMonth, stationEntity.getCode()); |
|
|
|
List<StationRunReportVO> stationReportVOList = mainSystemMonitoringService.getElectricSituationV2(yearAndMonth, stationEntity.getCode()); |
|
|
|
reportVOS.addAll(stationReportVOList); |
|
|
|
reportVOS.addAll(stationReportVOList); |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
log.info("电站发电情况"+reportVOS.toString()); |
|
|
|
} |
|
|
|
} |
|
|
|
getSumStationRunReport(reportVOS); |
|
|
|
getSumStationRunReport(reportVOS); |
|
|
|
stationReportAllVo.setStationReportVOList(reportVOS); |
|
|
|
stationReportAllVo.setStationReportVOList(reportVOS); |
|
|
|
|
|
|
|
log.info("电站发电量总览"+reportVOS.toString()); |
|
|
|
}catch (Exception e){ |
|
|
|
}catch (Exception e){ |
|
|
|
log.error("", e); |
|
|
|
log.error("getStationMonthReportV2电站发电量报错", e); |
|
|
|
System.out.println(e); |
|
|
|
System.out.println(e); |
|
|
|
}finally { |
|
|
|
}finally { |
|
|
|
countDownLatch.countDown(); |
|
|
|
countDownLatch.countDown(); |
|
|
@ -523,11 +526,12 @@ public class OperStationMonthReportServiceImpl implements IOperStationMonthRepor |
|
|
|
stationRunReportVO.setStationName("合计"); |
|
|
|
stationRunReportVO.setStationName("合计"); |
|
|
|
if (CollectionUtil.isNotEmpty(reportVOS)){ |
|
|
|
if (CollectionUtil.isNotEmpty(reportVOS)){ |
|
|
|
double sumPowerMonPlan = reportVOS.stream().mapToDouble(StationRunReportVO::getPowerMonPlan).sum(); |
|
|
|
double sumPowerMonPlan = reportVOS.stream().mapToDouble(StationRunReportVO::getPowerMonPlan).sum(); |
|
|
|
stationRunReportVO.setPowerMonPlan(sumPowerMonPlan); |
|
|
|
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)).sum(); |
|
|
|
stationRunReportVO.setFinishPowerMon(String.valueOf(sumFinishPowerMon)); |
|
|
|
stationRunReportVO.setFinishPowerMon(new BigDecimal(sumFinishPowerMon).setScale(2,BigDecimal.ROUND_UP).toString()); |
|
|
|
if (!ObjectUtils.isEmpty(sumPowerMonPlan)) { |
|
|
|
if (!ObjectUtils.isEmpty(sumPowerMonPlan)) { |
|
|
|
BigDecimal powerMonRate = new BigDecimal(sumFinishPowerMon).divide(new BigDecimal(sumPowerMonPlan)).setScale(2, BigDecimal.ROUND_UP); |
|
|
|
BigDecimal powerMonRate = new BigDecimal(sumFinishPowerMon).divide(new BigDecimal(sumPowerMonPlan),4,BigDecimal.ROUND_UP) |
|
|
|
|
|
|
|
.multiply(new BigDecimal(100)).setScale(2, BigDecimal.ROUND_UP); |
|
|
|
stationRunReportVO.setPowerMonRate(String.valueOf(powerMonRate)); |
|
|
|
stationRunReportVO.setPowerMonRate(String.valueOf(powerMonRate)); |
|
|
|
}else { |
|
|
|
}else { |
|
|
|
stationRunReportVO.setPowerMonRate("0.0"); |
|
|
|
stationRunReportVO.setPowerMonRate("0.0"); |
|
|
@ -537,7 +541,8 @@ public class OperStationMonthReportServiceImpl implements IOperStationMonthRepor |
|
|
|
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(); |
|
|
|
stationRunReportVO.setFinishPowerYear(String.valueOf(sumFinishPowerYear)); |
|
|
|
stationRunReportVO.setFinishPowerYear(String.valueOf(sumFinishPowerYear)); |
|
|
|
if (!ObjectUtils.isEmpty(sumPowerYearPlan)){ |
|
|
|
if (!ObjectUtils.isEmpty(sumPowerYearPlan)){ |
|
|
|
BigDecimal powerYearRate = new BigDecimal(sumFinishPowerYear).divide(new BigDecimal(sumPowerYearPlan)).setScale(2, BigDecimal.ROUND_UP); |
|
|
|
BigDecimal powerYearRate = new BigDecimal(sumFinishPowerYear).divide(new BigDecimal(sumPowerYearPlan),4,BigDecimal.ROUND_UP) |
|
|
|
|
|
|
|
.multiply(new BigDecimal(100)).setScale(2, BigDecimal.ROUND_UP); |
|
|
|
stationRunReportVO.setPowerYearRate(String.valueOf(powerYearRate)); |
|
|
|
stationRunReportVO.setPowerYearRate(String.valueOf(powerYearRate)); |
|
|
|
}else { |
|
|
|
}else { |
|
|
|
stationRunReportVO.setPowerYearRate("0.0"); |
|
|
|
stationRunReportVO.setPowerYearRate("0.0"); |
|
|
|