Browse Source

调整计算

xieshengjie 2 years ago
parent
commit
7bc983377a

+ 2 - 2
realtime/generationXK-service/src/main/java/com/gyee/generation/init/CacheContext.java

@@ -384,8 +384,8 @@ public class CacheContext implements CommandLineRunner {
             });
             subwppointmap.put(sub.getId(),stringWindpowerstationpointnewMap);
 
-//            List<ProBasicEquipment> collect = wtls.stream().filter(wt -> wt.getSubstationId().equals(sub.getId())).collect(Collectors.toList());
-//            subWtsMap.put(sub.getId(),collect);
+            List<ProBasicEquipment> collect = wtls.stream().filter(wt -> wt.getSubstationId().equals(sub.getId())).collect(Collectors.toList());
+            subWtsMap.put(sub.getId(),collect);
 
         });
 

+ 4 - 3
realtime/generationXK-service/src/main/java/com/gyee/generation/service/realtimelibrary/RealtimeService.java

@@ -99,8 +99,9 @@ public class RealtimeService {
                 ssbfPointDate = PointUtil.createPointData(currentDate, ssbf, ssbfPoint.getNemCode(), ssbfPoint.getName());
             }
             wtResultList.add(ssbfPointDate);
+            double v = DoubleUtils.keepPrecision(ssbf, 2);
             if (theoreticalPowerMap.containsKey(wt.getModelId())){
-                double v = DoubleUtils.keepPrecision(ssbf, 2);
+//                double v = DoubleUtils.keepPrecision(ssbf, 2);
                 if (theoreticalPowerMap.get(wt.getModelId()).containsKey(v)){
                     ProBasicModelPowerRd basicModelPowerRd = theoreticalPowerMap.get(wt.getModelId()).get(v);
                     wtResultList.add(PointUtil.createPointData(currentDate, basicModelPowerRd.getTheoryPower(), llglPoint.getNemCode(), llglPoint.getName()));
@@ -111,8 +112,8 @@ public class RealtimeService {
                 }
             }
             if (curveFittingPowerMap.containsKey(wt.getId())){
-                if (curveFittingPowerMap.get(wt.getId()).containsKey(ssbf)){
-                    ProEconWtPowerCurveFitting wtPowerCurveFitting = curveFittingPowerMap.get(wt.getId()).get(ssbf);
+                if (curveFittingPowerMap.get(wt.getId()).containsKey(v)){
+                    ProEconWtPowerCurveFitting wtPowerCurveFitting = curveFittingPowerMap.get(wt.getId()).get(v);
                     Double actualPower = wtPowerCurveFitting.getActualPower();
                     double[] underissuanceArray = {0, 1, 2, 3, 8, 9, 11};
                     double qfzt = 0;