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); }