diff --git a/hzims-service-api/equipment-api/src/main/java/com/hnac/hzims/equipment/feign/IPlanGenertionClient.java b/hzims-service-api/equipment-api/src/main/java/com/hnac/hzims/equipment/feign/IPlanGenertionClient.java index 2b2ed6d..d550a9f 100644 --- a/hzims-service-api/equipment-api/src/main/java/com/hnac/hzims/equipment/feign/IPlanGenertionClient.java +++ b/hzims-service-api/equipment-api/src/main/java/com/hnac/hzims/equipment/feign/IPlanGenertionClient.java @@ -76,12 +76,11 @@ public interface IPlanGenertionClient { /** * 年计划/实际发电量 - * @param stationIds - * @param date + * @param param * @return */ - @GetMapping(GET_POWER_YEAR) - Double getPlanPowerYear(@RequestParam(value = "stationIds", required = false) List stationIds, @RequestParam(value = "date", required = false) String date); + @PostMapping(GET_POWER_YEAR) + Double getPlanPowerYear(@RequestBody DevicePlanGenerationVo param); /** * 计划发电量查询 diff --git a/hzims-service-api/equipment-api/src/main/java/com/hnac/hzims/equipment/feign/IPlanGenertionClientBack.java b/hzims-service-api/equipment-api/src/main/java/com/hnac/hzims/equipment/feign/IPlanGenertionClientBack.java index 3a5c2d7..3ef10f4 100644 --- a/hzims-service-api/equipment-api/src/main/java/com/hnac/hzims/equipment/feign/IPlanGenertionClientBack.java +++ b/hzims-service-api/equipment-api/src/main/java/com/hnac/hzims/equipment/feign/IPlanGenertionClientBack.java @@ -48,7 +48,7 @@ public class IPlanGenertionClientBack implements IPlanGenertionClient { } @Override - public Double getPlanPowerYear(List stationIds, String date) { + public Double getPlanPowerYear(DevicePlanGenerationVo param) { return null; } diff --git a/hzims-service/equipment/src/main/java/com/hnac/hzims/equipment/feign/PlanGenertionClient.java b/hzims-service/equipment/src/main/java/com/hnac/hzims/equipment/feign/PlanGenertionClient.java index c549eae..ef65993 100644 --- a/hzims-service/equipment/src/main/java/com/hnac/hzims/equipment/feign/PlanGenertionClient.java +++ b/hzims-service/equipment/src/main/java/com/hnac/hzims/equipment/feign/PlanGenertionClient.java @@ -107,14 +107,13 @@ public class PlanGenertionClient implements IPlanGenertionClient{ /** * 年计划发电量/实际发电量 - * @param stationIds - * @param date 'yyyy' + * @param param * @return */ - @GetMapping(GET_POWER_YEAR) + @PostMapping(GET_POWER_YEAR) @Override - public Double getPlanPowerYear(List stationIds, String date) { - return service.getPlanPowerYear(stationIds,date); + public Double getPlanPowerYear(DevicePlanGenerationVo param) { + return service.getPlanPowerYear(param.getStationIds(),param.getDate()); } /** diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/homePage/service/impl/HydroelectricServiceImpl.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/homePage/service/impl/HydroelectricServiceImpl.java index 5c6dbcf..936a09d 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/homePage/service/impl/HydroelectricServiceImpl.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/homePage/service/impl/HydroelectricServiceImpl.java @@ -363,7 +363,10 @@ public class HydroelectricServiceImpl implements HydroelectricService { // 日发电量 group.setGenerateDay(stationTargets.stream().mapToDouble(HydropowerUnitTargetVo::getPowerDay).sum()); // 年计划发电量 - group.setGeneratePlanYear(planClient.getPlanPowerYear(stations.stream().map(StationEntity::getCode).collect(Collectors.toList()), DateUtil.format(new Date(),"yyyy"))); + DevicePlanGenerationVo planParam = new DevicePlanGenerationVo(); + param.setStationIds(stations.stream().map(StationEntity::getCode).collect(Collectors.toList())); + param.setDate(DateUtil.format(new Date(),"yyyy")); + group.setGeneratePlanYear(planClient.getPlanPowerYear(planParam)); if(group.getGeneratePlanYear() <= 0 || group.getGenerateYear() <= 0){ group.setGenerateRate(0.0); }else{ diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/impl/HydropowerServiceImpl.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/impl/HydropowerServiceImpl.java index dd93e24..62da01b 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/impl/HydropowerServiceImpl.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/impl/HydropowerServiceImpl.java @@ -756,7 +756,10 @@ public class HydropowerServiceImpl implements HydropowerService { // 日发电量 kpi.setGenerateDay(targets.stream().mapToDouble(HydropowerUnitTargetVo::getPowerDay).sum()); // 年计划发电量 - Double plan = planGenertionClient.getPlanPowerYear(stations.stream().map(StationEntity::getCode).collect(Collectors.toList()), DateUtil.format(new Date(),"yyyy")); + DevicePlanGenerationVo param = new DevicePlanGenerationVo(); + param.setStationIds(stations.stream().map(StationEntity::getCode).collect(Collectors.toList())); + param.setDate(DateUtil.format(new Date(),"yyyy")); + Double plan = planGenertionClient.getPlanPowerYear(param); kpi.setPlan(plan); if(Math.abs(plan) <= 0){ kpi.setPlanRate(0.0); diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/impl/MainSystemMonitoringServiceImpl.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/impl/MainSystemMonitoringServiceImpl.java index f7bdf3f..389194f 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/impl/MainSystemMonitoringServiceImpl.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/impl/MainSystemMonitoringServiceImpl.java @@ -1386,7 +1386,10 @@ public class MainSystemMonitoringServiceImpl implements IMainSystemMonitoringSer BigDecimal powerYear = value.entrySet().stream().filter(s -> listByYear.contains(s.getKey())).map(s -> BigDecimal.valueOf(s.getValue()).setScale(1, RoundingMode.UP)).reduce(BigDecimal.ZERO, BigDecimal::add); stationReportVO.setFinishPowerYear(objDivide(String.valueOf(powerYear)).toString()); //获取计划年发电量 - Double planPowerYear = planGenertionClient.getPlanPowerYear(Collections.singletonList(stationEntity.getCode()), yearMon[0]); + DevicePlanGenerationVo param = new DevicePlanGenerationVo(); + param.setStationIds(Collections.singletonList(stationEntity.getCode())); + param.setDate(yearMon[0]); + Double planPowerYear = planGenertionClient.getPlanPowerYear(param); stationReportVO.setPowerYearPlan(objDivide(String.valueOf(planPowerYear)).doubleValue()); if (ObjectUtil.isNotEmpty(stationReportVO.getPowerMonPlan()) &&ObjectUtil.isNotEmpty(stationReportVO.getFinishPowerMon()) @@ -1483,7 +1486,10 @@ public class MainSystemMonitoringServiceImpl implements IMainSystemMonitoringSer Double finishPowerYear = BigDecimal.valueOf(powerCountYear.get()).doubleValue(); stationReportVO.setFinishPowerYear(objDivide(String.valueOf(finishPowerYear)).toString()); //当年的计划发电量 - Double planPowerYear = planGenertionClient.getPlanPowerYear(Collections.singletonList(stationId), year); + DevicePlanGenerationVo param = new DevicePlanGenerationVo(); + param.setStationIds(Collections.singletonList(stationEntity.getCode())); + param.setDate(year); + Double planPowerYear = planGenertionClient.getPlanPowerYear(param); stationReportVO.setPowerYearPlan(objDivide(String.valueOf(planPowerYear)).doubleValue()); //当月的计划发电量 R planPowerMonR = planGenertionClient.planGenerationMonthCount(stationId, month);