wangb 1 year ago
parent
commit
401ecf34e4

+ 8 - 4
web/runeconomy-jjyx/src/main/java/com/gyee/runeconomy/service/bmk/BenchmarkingService.java

@@ -1588,8 +1588,12 @@ public class BenchmarkingService {
                         .map(el -> el.getWindpowerstationId()).distinct().collect(Collectors.toList());
             }
         }
-        qw.in("windpowerstation_id", wpList).groupBy("windpowerstation_id");
-        pepi1.in("windpowerstation_id", wpList).groupBy("windpowerstation_id");
+        if(StringUtils.isNotEmpty(wpList)){
+            qw.in("windpowerstation_id", wpList);
+            pepi1.in("windpowerstation_id", wpList);
+        }
+        qw.groupBy("windpowerstation_id");
+        pepi1.groupBy("windpowerstation_id");
         List<ProEconPowerstationInfoDay7> lpepi7 = iProEconPowerstationInfoDay7Service.list(qw);
         Map<String, List<ProBasicOrganizeEquipment>> equipmentStationMap = CacheContext.organizeEquipmentList.stream().collect(Collectors.groupingBy(ProBasicOrganizeEquipment::getWindpowerstationId));
 
@@ -1603,11 +1607,11 @@ public class BenchmarkingService {
         for (ProEconPowerstationInfoDay7 day7 : lpepi7) {
             String wpId = day7.getWindpowerstationId();
             OperationalAnalysis oa = new OperationalAnalysis();
-            oa.setWpsName(CacheContext.proBasicOrganizeTreesMap.get(wpids).getAname());
+            oa.setWpsName(CacheContext.proBasicOrganizeTreesMap.get(wpId).getAname());
             oa.setWpsId(wpId);
             oa.setModelId(equipmentStationMap.get(wpId).get(0).getModelId());
             oa.setConversionRate(day7.getRnbqzhxl().doubleValue());
-            oa.setUtilizationHour(pepid1Map.get(wpId).getRfdl().doubleValue() / (CacheContext.proBasicOrganizeTreesMap.get(wpids).getZjCapacity()));
+            oa.setUtilizationHour(pepid1Map.get(wpId).getRfdl().doubleValue() / (CacheContext.proBasicOrganizeTreesMap.get(wpId).getZjCapacity()));
             List<PointData> historyDatasRaw = edosUtil.getHistoryDatasRaw(collect.get(wpId).getNemCode(), date1.getTime() / 1000, date2.getTime() / 1000);
             double v = historyDatasRaw.stream().mapToDouble(PointData::getPointValueInDouble).average().orElse(0);
             oa.setIlluminationUtilizationRate(v);