From 4162e856413f8b75de9389db617eb6a1e64ba1cb Mon Sep 17 00:00:00 2001 From: yang_shj <1069818635@QQ.com> Date: Thu, 4 Jan 2024 11:25:19 +0800 Subject: [PATCH] =?UTF-8?q?#=E6=B0=B4=E7=94=B5=E7=AB=99=E5=8D=95=E4=BD=8D?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../operational/main/service/impl/HydropowerServiceImpl.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) 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;