From 3039d97f91bc6e636340ac97aa395782ae89a9c7 Mon Sep 17 00:00:00 2001 From: yang_shj <1069818635@QQ.com> Date: Fri, 8 Nov 2024 13:53:25 +0800 Subject: [PATCH] =?UTF-8?q?#=E7=BB=BC=E5=90=88=E6=8A=A5=E8=A1=A8=EF=BC=8C?= =?UTF-8?q?=E7=AD=89=E6=95=88=E5=B0=8F=E6=97=B6=E8=AE=A1=E7=AE=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../hnac/hzims/electric/service/impl/ElectricReportServiceImpl.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/hzims-service/equipment/src/main/java/com/hnac/hzims/electric/service/impl/ElectricReportServiceImpl.java b/hzims-service/equipment/src/main/java/com/hnac/hzims/electric/service/impl/ElectricReportServiceImpl.java index 59159f7..e9b6211 100644 --- a/hzims-service/equipment/src/main/java/com/hnac/hzims/electric/service/impl/ElectricReportServiceImpl.java +++ b/hzims-service/equipment/src/main/java/com/hnac/hzims/electric/service/impl/ElectricReportServiceImpl.java @@ -301,7 +301,6 @@ public class ElectricReportServiceImpl implements IElectricReportService { ComprehensiveElectricVo comprehensive = new ComprehensiveElectricVo(); comprehensive.setMonth(current.getMonth() + 1 + "月"); String currentMon = DateUtil.format(calendar.getTime(),"yyyy-MM"); - String currentYear = DateUtil.format(calendar.getTime(),"yyyy"); if(calendar.getTime().compareTo(new Date()) > 0){ comprehensive.setMonthGenerate(-1.0); comprehensive.setLastMonthGenerate(-1.0); @@ -324,7 +323,6 @@ public class ElectricReportServiceImpl implements IElectricReportService { } calendar.add(Calendar.YEAR,-1); String lastMon = DateUtil.format(calendar.getTime(),"yyyy-MM"); - String lastYear = DateUtil.format(calendar.getTime(),"yyyy"); calendar.add(Calendar.YEAR,1); // 电量 if(CollectionUtil.isNotEmpty(threes)){ @@ -352,13 +350,13 @@ public class ElectricReportServiceImpl implements IElectricReportService { // 本月等效小时 if(comprehensive.getMonthGenerate() > 0){ - comprehensive.setMonthEquivalent(BigDecimal.valueOf(comprehensive.getMonthGenerate() / installedCapacity).setScale(2, RoundingMode.HALF_UP).doubleValue()); + comprehensive.setMonthEquivalent(BigDecimal.valueOf((comprehensive.getMonthGenerate() * 10000) / installedCapacity).setScale(2, RoundingMode.HALF_UP).doubleValue()); }else{ comprehensive.setMonthEquivalent(0.0); } // 去年同月等效小时 if(comprehensive.getLastMonthGenerate() > 0){ - comprehensive.setLastMonthEquivalent(BigDecimal.valueOf(comprehensive.getLastMonthGenerate() / installedCapacity).setScale(2, RoundingMode.HALF_UP).doubleValue()); + comprehensive.setLastMonthEquivalent(BigDecimal.valueOf((comprehensive.getLastMonthGenerate() * 10000) / installedCapacity).setScale(2, RoundingMode.HALF_UP).doubleValue()); }else{ comprehensive.setLastMonthEquivalent(0.0); }