From 63330a04a672494483aa2de3e057fec6cb539f8d Mon Sep 17 00:00:00 2001 From: hzj <826100833@qq.com> Date: Mon, 9 Feb 2026 16:11:14 +0800 Subject: [PATCH] =?UTF-8?q?=E7=94=B5=E8=83=BD=E8=B4=A8=E9=87=8F=E6=B1=A1?= =?UTF-8?q?=E5=8C=BA=E5=9B=BEbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/PollutionSubstationServiceImpl.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pqs-harmonic/harmonic-boot/src/main/java/com/njcn/harmonic/service/impl/PollutionSubstationServiceImpl.java b/pqs-harmonic/harmonic-boot/src/main/java/com/njcn/harmonic/service/impl/PollutionSubstationServiceImpl.java index 62d4c3f18..4223ce883 100644 --- a/pqs-harmonic/harmonic-boot/src/main/java/com/njcn/harmonic/service/impl/PollutionSubstationServiceImpl.java +++ b/pqs-harmonic/harmonic-boot/src/main/java/com/njcn/harmonic/service/impl/PollutionSubstationServiceImpl.java @@ -392,7 +392,7 @@ public class PollutionSubstationServiceImpl extends ServiceImpl pollutionsubVO.setData(t.getValue())); + Optional.ofNullable(rStatPollutionSubstationYPO).ifPresent(a -> pollutionsubVO.setData(BigDecimal.valueOf(a.getValue()).setScale(2, RoundingMode.UP).doubleValue())); } else if (Objects.equals(harmonicPublicParam.getReportFlag(), BizParamConstant.STAT_BIZ_QUARTER)) { QueryWrapper wrapper = new QueryWrapper<>(); wrapper.eq("substation_id", id). @@ -400,7 +400,7 @@ public class PollutionSubstationServiceImpl extends ServiceImpl pollutionsubVO.setData(t.getValue())); + Optional.ofNullable(rStatPollutionSubstationQPO).ifPresent(a -> pollutionsubVO.setData(BigDecimal.valueOf(a.getValue()).setScale(2, RoundingMode.UP).doubleValue())); } else if (Objects.equals(harmonicPublicParam.getReportFlag(), BizParamConstant.STAT_BIZ_MONTH)) { QueryWrapper wrapper = new QueryWrapper<>(); wrapper.eq("substation_id", id). @@ -408,7 +408,7 @@ public class PollutionSubstationServiceImpl extends ServiceImpl pollutionsubVO.setData(t.getValue())); + Optional.ofNullable(rStatPollutionSubstationM).ifPresent(a -> pollutionsubVO.setData(BigDecimal.valueOf(a.getValue()).setScale(2, RoundingMode.UP).doubleValue())); } else if (Objects.equals(harmonicPublicParam.getReportFlag(), BizParamConstant.STAT_BIZ_DAY)) { QueryWrapper wrapper = new QueryWrapper<>(); @@ -417,7 +417,7 @@ public class PollutionSubstationServiceImpl extends ServiceImpl pollutionsubVO.setData(t.getValue())); + Optional.ofNullable(rStatPollutionSubstationDPO).ifPresent(a -> pollutionsubVO.setData(BigDecimal.valueOf(a.getValue()).setScale(2, RoundingMode.UP).doubleValue())); } else if (Objects.equals(harmonicPublicParam.getReportFlag(), BizParamConstant.STAT_BIZ_WEEK)) { QueryWrapper wrapper = new QueryWrapper<>(); wrapper.eq("substation_id", id). @@ -425,7 +425,7 @@ public class PollutionSubstationServiceImpl extends ServiceImpl pollutionsubVO.setData(t.getValue())); + Optional.ofNullable(rStatPollutionSubstationDPO).ifPresent(a -> pollutionsubVO.setData(BigDecimal.valueOf(a.getValue()).setScale(2, RoundingMode.UP).doubleValue())); } }