Browse Source

#首页接口优化

zhongwei
yang_shj 3 months ago
parent
commit
853207bc26
  1. 2
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/homePage/service/impl/HydroelectricServiceImpl.java

2
hzims-service/operational/src/main/java/com/hnac/hzims/operational/homePage/service/impl/HydroelectricServiceImpl.java

@ -254,7 +254,7 @@ public class HydroelectricServiceImpl implements HydroelectricService {
// 日发电量
area.setGenerateDay(targets.stream().mapToDouble(HydropowerUnitTargetVo::getPowerDay).sum());
// 年计划发电量
area.setGeneratePlanYear(planClient.getPlanPowerYear(stations.stream().map(StationEntity::getCode).collect(Collectors.toList()), DateUtil.format(new Date(),"yyyy")));
area.setGeneratePlanYear(plans.stream().mapToDouble(PlanGenerationEntity::getPlanGeneration).sum());
if(area.getGeneratePlanYear() <= 0 || area.getGenerateYear() <= 0){
area.setGenerateRate(0.0);
}else{

Loading…
Cancel
Save