Pārlūkot izejas kodu

增加区域取值判断

wangb 2 gadi atpakaļ
vecāks
revīzija
fa41b7b236

+ 14 - 6
web/runeconomy-xk/src/main/java/com/gyee/runeconomy/service/monitor/MonitorService.java

@@ -572,14 +572,22 @@ public class MonitorService {
 
             }
             List<ProBasicEnergyGroup> gpls = CacheContext.gpls;
-            if (!gpls.isEmpty()){
-                for (ProBasicEnergyGroup gp : gpls){
-                    qt.put("fdzzjrl",gp.getWindCapacity()/1000);
-                    qt.put("gfzzjrl",gp.getCapacity()/1000);
-                    qt.put("zzjrl",(gp.getWindCapacity() + gp.getCapacity())/1000);
+            List<ProBasicRegion> rgls = CacheContext.rgls;
+
+            for (ProBasicEnergyGroup gp : gpls){
+                if (wpId.contains(gp.getId())) {
+                    qt.put("fdzzjrl", gp.getWindCapacity() / 1000);
+                    qt.put("gfzzjrl", gp.getCapacity() / 1000);
+                    qt.put("zzjrl", (gp.getWindCapacity() + gp.getCapacity()) / 1000);
+                }
+            }
+            for (ProBasicRegion rg : rgls){
+                if (wpId.contains(rg.getId())) {
+                    qt.put("fdzzjrl", rg.getJrwindCapacity() / 1000);
+                    qt.put("gfzzjrl", rg.getJrCapacity() / 1000);
+                    qt.put("zzjrl", (rg.getJrwindCapacity() + rg.getJrCapacity()) / 1000);
                 }
             }
-
             qt.put("aqts", MathUtil.twoBit(aqts));
             qt.put("sjgl", MathUtil.twoBit(sjgl));
             qt.put("yfdl", MathUtil.twoBit(yfdl));