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 80c7fcc..c4f94d0 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 @@ -1553,12 +1553,6 @@ public class HydropowerServiceImpl implements HydropowerService { hydropower.setMinTemp(this.intervalTemp(weekWeather,station.getCode(),false)); // 装机容量 hydropower.setCapacity(reals.stream().filter(real-> real.getDeptId().equals(station.getRefDept())).mapToDouble(HydropowerUnitRealVo::getInstalledCapacity).sum()); - // 出力 - if(Math.abs(hydropower.getCapacity()) > 0){ - hydropower.setOutput(BigDecimal.valueOf(hydropower.getLoad() / hydropower.getCapacity() * 100).setScale(2, RoundingMode.HALF_UP).doubleValue()); - }else{ - hydropower.setOutput(0.0); - } // 运行天数 hydropower.setRunDay(this.getRunDay(station)); // 告警 @@ -1595,6 +1589,12 @@ public class HydropowerServiceImpl implements HydropowerService { }else{ hydropower.setLoad(0.0); } + // 出力 + if(Math.abs(hydropower.getLoad()) > 0 && Math.abs(hydropower.getCapacity()) > 0){ + hydropower.setOutput(BigDecimal.valueOf(hydropower.getLoad() / hydropower.getCapacity() * 100).setScale(2, RoundingMode.HALF_UP).doubleValue()); + }else{ + hydropower.setOutput(0.0); + } // 负荷单位 hydropower.setLoadUnit("kW"); return hydropower;