From 1ae015b46bdf543b6ecf4e507bd2531111d6efcf Mon Sep 17 00:00:00 2001 From: yang_shj <1069818635@QQ.com> Date: Mon, 26 Feb 2024 09:29:22 +0800 Subject: [PATCH] =?UTF-8?q?#=E9=A6=96=E9=A1=B5=E5=85=B3=E8=81=94=E5=8F=91?= =?UTF-8?q?=E7=94=B5=E9=87=8F=E8=AE=BE=E5=A4=87=E5=90=8D=E7=A7=B0=E6=98=BE?= =?UTF-8?q?=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../hnac/hzims/operational/census/service/impl/TargetServiceImpl.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/census/service/impl/TargetServiceImpl.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/census/service/impl/TargetServiceImpl.java index 3213b3c..39b5f09 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/census/service/impl/TargetServiceImpl.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/census/service/impl/TargetServiceImpl.java @@ -203,7 +203,7 @@ public class TargetServiceImpl implements TargetService { double sum = targets.stream().filter(target->target.getDeptId().equals(station.getRefDept())).mapToDouble(HydropowerUnitTargetVo::getPowerYear).sum(); item.setElectricGeneration(sum); // 发电量详情 - List details = targets.stream().filter(target->target.getDeptId().equals(station.getRefDept())).map(target-> "[" + Optional.ofNullable(target.getDeviceCode()).orElse("填报电量") + " " + target.getPowerYear() +"kWh]").collect(Collectors.toList()); + List details = targets.stream().filter(target->target.getDeptId().equals(station.getRefDept())).map(target-> "[" + Optional.ofNullable(target.getDeviceName()).orElse("填报电量") + " " + target.getPowerYear() +"kWh]").collect(Collectors.toList()); item.setDetail(String.join("|",details)); return item; }).filter(generate->Math.abs(generate.getElectricGeneration()) > 0).collect(Collectors.toList()); @@ -225,7 +225,7 @@ public class TargetServiceImpl implements TargetService { double sum = targets.stream().filter(target -> target.getDeptId().equals(station.getRefDept())).mapToDouble(PhotovoltaicTargetVo::getGenerationYear).sum(); item.setElectricGeneration(sum); // 发电量详情 - List details = targets.stream().filter(target -> target.getDeptId().equals(station.getRefDept())).map(target -> "[" + Optional.ofNullable(target.getDeviceCode()).orElse("填报电量") + " " + target.getGenerationYear() + "kWh]").collect(Collectors.toList()); + List details = targets.stream().filter(target -> target.getDeptId().equals(station.getRefDept())).map(target -> "[" + Optional.ofNullable(target.getDeviceName()).orElse("填报电量") + " " + target.getGenerationYear() + "kWh]").collect(Collectors.toList()); item.setDetail(String.join("|", details)); return item; }).filter(generate -> Math.abs(generate.getElectricGeneration()) > 0).collect(Collectors.toList());