Bläddra i källkod

新增升压站功率计算,修改判断光伏离线

xieshengjie 1 år sedan
förälder
incheckning
f001552cec

+ 2 - 2
common/src/main/java/com/gyee/common/contant/ContantXk.java

@@ -15,7 +15,7 @@ public class ContantXk {
     public static final String  SSPJFS= "SSPJFS";//场站实时平均风速
     public static final String  SSPJGZD = "SSPJGZD";
     public static final String  SSZGL= "SSZGL";//场站实时总功率
-    public static final String  SSZGLSYZ= "SSZGL";//场站实时总功率 升压站
+    public static final String  SSZGLSYZ= "SSZGLSYZ";//场站实时总功率 升压站
     public static final String  SSZLLGL= "SSZLLGL";//场站实时总理论功率
     public static final String  SSZBZGL= "SSZBZGL";//场站实时总保证功率
     public static final String  SSZNHGLZS= "SSZNHGLZS";//场站实时总拟合功率(自算)
@@ -192,7 +192,7 @@ public class ContantXk {
     public static final String TPOINT_WP_YCGL = "FCFGCDQ0001";// 预测功率
 
 
-    public static final String SSZGSYZ= "SSGLSYZ";//线路实时功率 升压站 采集点
+    public static final String SSGLSYZ= "SSGLSYZ";//线路实时功率 升压站 采集点
 
 
 

+ 38 - 0
realtime/generationXK-service/src/main/java/com/gyee/generation/service/realtimelibrary/RealtimeService.java

@@ -175,6 +175,20 @@ public class RealtimeService {
             ProBasicPowerstationPoint zyglWpPoint = proBasicWppointMap.get(ContantXk.SSZZYGL);
             ProBasicPowerstationPoint kyglWpPoint = proBasicWppointMap.get(ContantXk.SSZKYGL);
 
+            double ssglsyz = 0;
+            if (proBasicWppointMap.containsKey(ContantXk.SSGLSYZ)){
+                ProBasicPowerstationPoint ssglsyzpoint = proBasicWppointMap.get(ContantXk.SSGLSYZ);
+                try {
+                    ssglsyz = edosUtil.getRealData(ssglsyzpoint).getPointValueInDouble();
+                } catch (Exception e) {
+                    e.printStackTrace();
+                }
+            }
+            if (proBasicWppointMap.containsKey(ContantXk.SSZGLSYZ)){
+                ProBasicPowerstationPoint sszglsyzpoint = proBasicWppointMap.get(ContantXk.SSZGLSYZ);
+                lineResultList.add(PointUtil.createPointData(currentDate, ssglsyz, sszglsyzpoint.getNemCode(), sszglsyzpoint.getName()));
+            }
+
             proBasicWindturbines.stream().forEach(wt -> {
                 Map<String, ProBasicEquipmentPoint> equipmentPointMap = wtpAimap.get(wt.getId());
 
@@ -277,6 +291,7 @@ public class RealtimeService {
             AtomicReference<Double> zzsgl = new AtomicReference<>((double) 0);
             AtomicReference<Double> zzygl = new AtomicReference<>((double) 0);
             AtomicReference<Double> zkygl = new AtomicReference<>((double) 0);
+            AtomicReference<Double> zssglsyz = new AtomicReference<>((double) 0);
 
             ProBasicPowerstationPoint ssfsWpPoint = null;
             if (project.getSpare4().equals("1")){
@@ -290,6 +305,7 @@ public class RealtimeService {
             ProBasicPowerstationPoint zsglWpPoint = proBasicWppointMap.get(ContantXk.SSZNHGLZS);
             ProBasicPowerstationPoint zyglWpPoint = proBasicWppointMap.get(ContantXk.SSZZYGL);
             ProBasicPowerstationPoint kyglWpPoint = proBasicWppointMap.get(ContantXk.SSZKYGL);
+            ProBasicPowerstationPoint ssglsyzWpPoint = proBasicWppointMap.get(ContantXk.SSZGLSYZ);
 
             proBasicLines.stream().forEach(wp -> {
                 Map<String, ProBasicPowerstationPoint> basicWppointMap = linepointmap.get(wp.getId());
@@ -301,6 +317,7 @@ public class RealtimeService {
                 }
 
                 ProBasicPowerstationPoint ssglPoint = basicWppointMap.get(ContantXk.SSZGL);
+                ProBasicPowerstationPoint ssglsyzPoint = basicWppointMap.get(ContantXk.SSZGLSYZ);
                 //理论功率测点
                 ProBasicPowerstationPoint llglPoint = basicWppointMap.get(ContantXk.SSZLLGL);
                 //保证功率测点
@@ -329,6 +346,14 @@ public class RealtimeService {
                     }
                     return v;
                 });
+                zssglsyz.updateAndGet(v -> {
+                    try {
+                        return new Double((double) (v + edosUtil.getRealData(ssglsyzPoint).getPointValueInDouble()));
+                    } catch (Exception e) {
+                        e.printStackTrace();
+                    }
+                    return v;
+                });
                 zllgl.updateAndGet(v -> {
                     try {
                         return new Double((double) (v + edosUtil.getRealData(llglPoint).getPointValueInDouble()));
@@ -372,6 +397,7 @@ public class RealtimeService {
             });
             projectResultList.add(PointUtil.createPointData(currentDate, zssbf.get() / proBasicLines.size(), ssfsWpPoint.getNemCode(), ssfsWpPoint.getName()));
             projectResultList.add(PointUtil.createPointData(currentDate, zssgl.get(), ssglWpPoint.getNemCode(), ssglWpPoint.getName()));
+            projectResultList.add(PointUtil.createPointData(currentDate, zssglsyz.get(), ssglsyzWpPoint.getNemCode(), ssglsyzWpPoint.getName()));
             projectResultList.add(PointUtil.createPointData(currentDate, zllgl.get(), llglWpPoint.getNemCode(), llglWpPoint.getName()));
             projectResultList.add(PointUtil.createPointData(currentDate, zbzgl.get(), bzglWpPoint.getNemCode(), bzglWpPoint.getName()));
             projectResultList.add(PointUtil.createPointData(currentDate, zzsgl.get(), zsglWpPoint.getNemCode(), zsglWpPoint.getName()));
@@ -386,6 +412,7 @@ public class RealtimeService {
             Map<String, ProBasicPowerstationPoint> proBasicWppointMap = wppointmap.get(wps.getId());
             AtomicReference<Double> zssbf = new AtomicReference<>((double) 0);
             AtomicReference<Double> zssgl = new AtomicReference<>((double) 0);
+            AtomicReference<Double> zssglsyz = new AtomicReference<>((double) 0);
             AtomicReference<Double> zllgl = new AtomicReference<>((double) 0);
             AtomicReference<Double> zbzgl = new AtomicReference<>((double) 0);
             AtomicReference<Double> zzsgl = new AtomicReference<>((double) 0);
@@ -400,6 +427,7 @@ public class RealtimeService {
             }
 
             ProBasicPowerstationPoint ssglWpPoint = proBasicWppointMap.get(ContantXk.SSZGL);
+            ProBasicPowerstationPoint ssglsyzWpPoint = proBasicWppointMap.get(ContantXk.SSZGLSYZ);
             ProBasicPowerstationPoint llglWpPoint = proBasicWppointMap.get(ContantXk.SSZLLGL);
             ProBasicPowerstationPoint bzglWpPoint = proBasicWppointMap.get(ContantXk.SSZBZGL);
             ProBasicPowerstationPoint zsglWpPoint = proBasicWppointMap.get(ContantXk.SSZNHGLZS);
@@ -416,6 +444,7 @@ public class RealtimeService {
                     ssbfPoint = basicWppointMap.get(ContantXk.SSPJGZD);
                 }
                 ProBasicPowerstationPoint ssglPoint = basicWppointMap.get(ContantXk.SSZGL);
+                ProBasicPowerstationPoint ssglsyzPoint = basicWppointMap.get(ContantXk.SSZGLSYZ);
                 //理论功率测点
                 ProBasicPowerstationPoint llglPoint = basicWppointMap.get(ContantXk.SSZLLGL);
                 //保证功率测点
@@ -444,6 +473,14 @@ public class RealtimeService {
                     }
                     return v;
                 });
+                zssglsyz.updateAndGet(v -> {
+                    try {
+                        return new Double((double) (v + edosUtil.getRealData(ssglsyzPoint).getPointValueInDouble()));
+                    } catch (Exception e) {
+                        e.printStackTrace();
+                    }
+                    return v;
+                });
                 zllgl.updateAndGet(v -> {
                     try {
                         return new Double((double) (v + edosUtil.getRealData(llglPoint).getPointValueInDouble()));
@@ -487,6 +524,7 @@ public class RealtimeService {
             });
             wpResultList.add(PointUtil.createPointData(currentDate, zssbf.get() / proBasicProjects.size(), ssfsWpPoint.getNemCode(), ssfsWpPoint.getName()));
             wpResultList.add(PointUtil.createPointData(currentDate, zssgl.get(), ssglWpPoint.getNemCode(), ssglWpPoint.getName()));
+            wpResultList.add(PointUtil.createPointData(currentDate, zssglsyz.get(), ssglsyzWpPoint.getNemCode(), ssglsyzWpPoint.getName()));
             wpResultList.add(PointUtil.createPointData(currentDate, zllgl.get(), llglWpPoint.getNemCode(), llglWpPoint.getName()));
             wpResultList.add(PointUtil.createPointData(currentDate, zbzgl.get(), bzglWpPoint.getNemCode(), bzglWpPoint.getName()));
             wpResultList.add(PointUtil.createPointData(currentDate, zzsgl.get(), zsglWpPoint.getNemCode(), zsglWpPoint.getName()));

+ 36 - 0
realtime/generationXK-service/src/main/java/com/gyee/generation/service/realtimelibrary/RegionCalreService.java

@@ -117,6 +117,7 @@ public class RegionCalreService  {
         ProBasicPowerstationPoint zaqtsPoint = powerstationPointMap.get(ContantXk.AQTS);
         ProBasicPowerstationPoint zczztPoint = powerstationPointMap.get(ContantXk.CZZT);
         ProBasicPowerstationPoint zsszglPoint = powerstationPointMap.get(ContantXk.SSZGL);
+        ProBasicPowerstationPoint zsszglsyzPoint = powerstationPointMap.get(ContantXk.SSZGLSYZ);
         ProBasicPowerstationPoint zsszllglPoint = powerstationPointMap.get(ContantXk.SSZLLGL);
         ProBasicPowerstationPoint zsszbzglPoint = powerstationPointMap.get(ContantXk.SSZBZGL);
         ProBasicPowerstationPoint zssznhglzsPoint = powerstationPointMap.get(ContantXk.SSZNHGLZS);
@@ -149,6 +150,7 @@ public class RegionCalreService  {
         AtomicReference<Double> sspjfs = new AtomicReference<>((double) 0);
         AtomicReference<Double> sspjgzd = new AtomicReference<>((double) 0);
         AtomicReference<Double> sszgl = new AtomicReference<>((double) 0);
+        AtomicReference<Double> sszglsyz = new AtomicReference<>((double) 0);
         AtomicReference<Double> zllgl = new AtomicReference<>((double) 0);
         AtomicReference<Double> zbzgl = new AtomicReference<>((double) 0);
         AtomicReference<Double> znhglzs = new AtomicReference<>((double) 0);
@@ -212,6 +214,7 @@ public class RegionCalreService  {
                 ProBasicPowerstationPoint aqtsPoint = powerstationPointMap1.get(ContantXk.AQTS);
                 ProBasicPowerstationPoint czztPoint = powerstationPointMap1.get(ContantXk.CZZT);
                 ProBasicPowerstationPoint sszglPoint = powerstationPointMap1.get(ContantXk.SSZGL);
+                ProBasicPowerstationPoint sszglsyzPoint = powerstationPointMap1.get(ContantXk.SSZGLSYZ);
                 ProBasicPowerstationPoint sszllglPoint = powerstationPointMap1.get(ContantXk.SSZLLGL);
                 ProBasicPowerstationPoint sszbzglPoint = powerstationPointMap1.get(ContantXk.SSZBZGL);
                 ProBasicPowerstationPoint ssznhglzsPoint = powerstationPointMap1.get(ContantXk.SSZNHGLZS);
@@ -309,6 +312,14 @@ public class RegionCalreService  {
                     }
                     return v;
                 });
+                sszglsyz.updateAndGet(v -> {
+                    try {
+                        return new Double((double) (v + edosUtil.getRealData(sszglsyzPoint).getPointValueInDouble()));
+                    } catch (Exception e) {
+                        e.printStackTrace();
+                    }
+                    return v;
+                });
                 zllgl.updateAndGet(v -> {
                     try {
                         return new Double((double) (v + edosUtil.getRealData(sszllglPoint).getPointValueInDouble()));
@@ -552,6 +563,7 @@ public class RegionCalreService  {
         resultList.add(PointUtil.createPointData(currentDate,aqts,zaqtsPoint.getNemCode(),zaqtsPoint.getName()));
         resultList.add(PointUtil.createPointData(currentDate,zczzt,zczztPoint.getNemCode(),zczztPoint.getName()));
         resultList.add(PointUtil.createPointData(currentDate,sszgl.get(),zsszglPoint.getNemCode(),zsszglPoint.getName()));
+        resultList.add(PointUtil.createPointData(currentDate,sszglsyz.get(),zsszglsyzPoint.getNemCode(),zsszglsyzPoint.getName()));
         resultList.add(PointUtil.createPointData(currentDate,zllgl.get(),zsszllglPoint.getNemCode(),zsszllglPoint.getName()));
         resultList.add(PointUtil.createPointData(currentDate,zbzgl.get(),zsszbzglPoint.getNemCode(),zsszbzglPoint.getName()));
         resultList.add(PointUtil.createPointData(currentDate,znhglzs.get(),zssznhglzsPoint.getNemCode(),zssznhglzsPoint.getName()));
@@ -606,6 +618,7 @@ public class RegionCalreService  {
         ProBasicPowerstationPoint zaqtsPoint = powerstationPointMap.get(ContantXk.AQTS);
         ProBasicPowerstationPoint zczztPoint = powerstationPointMap.get(ContantXk.CZZT);
         ProBasicPowerstationPoint zsszglPoint = powerstationPointMap.get(ContantXk.SSZGL);
+        ProBasicPowerstationPoint zsszglsyzPoint = powerstationPointMap.get(ContantXk.SSZGLSYZ);
         ProBasicPowerstationPoint zsszllglPoint = powerstationPointMap.get(ContantXk.SSZLLGL);
         ProBasicPowerstationPoint zsszbzglPoint = powerstationPointMap.get(ContantXk.SSZBZGL);
         ProBasicPowerstationPoint zssznhglzsPoint = powerstationPointMap.get(ContantXk.SSZNHGLZS);
@@ -637,6 +650,7 @@ public class RegionCalreService  {
         AtomicReference<Double> sspjfs = new AtomicReference<>((double) 0);
         AtomicReference<Double> sspjgzd = new AtomicReference<>((double) 0);
         AtomicReference<Double> sszgl = new AtomicReference<>((double) 0);
+        AtomicReference<Double> sszglsyz = new AtomicReference<>((double) 0);
         AtomicReference<Double> zllgl = new AtomicReference<>((double) 0);
         AtomicReference<Double> zbzgl = new AtomicReference<>((double) 0);
         AtomicReference<Double> znhglzs = new AtomicReference<>((double) 0);
@@ -685,6 +699,7 @@ public class RegionCalreService  {
             ProBasicPowerstationPoint aqtsPoint = powerstationPointMap1.get(ContantXk.AQTS);
             ProBasicPowerstationPoint czztPoint = powerstationPointMap1.get(ContantXk.CZZT);
             ProBasicPowerstationPoint sszglPoint = powerstationPointMap1.get(ContantXk.SSZGL);
+            ProBasicPowerstationPoint sszglsyzPoint = powerstationPointMap1.get(ContantXk.SSZGLSYZ);
             ProBasicPowerstationPoint sszllglPoint = powerstationPointMap1.get(ContantXk.SSZLLGL);
             ProBasicPowerstationPoint sszbzglPoint = powerstationPointMap1.get(ContantXk.SSZBZGL);
             ProBasicPowerstationPoint ssznhglzsPoint = powerstationPointMap1.get(ContantXk.SSZNHGLZS);
@@ -763,6 +778,14 @@ public class RegionCalreService  {
                 }
                 return v;
             });
+            sszglsyz.updateAndGet(v -> {
+                try {
+                    return new Double((double) (v + edosUtil.getRealData(sszglsyzPoint).getPointValueInDouble()));
+                } catch (Exception e) {
+                    e.printStackTrace();
+                }
+                return v;
+            });
             zllgl.updateAndGet(v -> {
                 try {
                     return new Double((double) (v + edosUtil.getRealData(sszllglPoint).getPointValueInDouble()));
@@ -997,6 +1020,7 @@ public class RegionCalreService  {
         resultList.add(PointUtil.createPointData(currentDate,aqts,zaqtsPoint.getNemCode(),zaqtsPoint.getName()));
         resultList.add(PointUtil.createPointData(currentDate,zczzt,zczztPoint.getNemCode(),zczztPoint.getName()));
         resultList.add(PointUtil.createPointData(currentDate,sszgl.get(),zsszglPoint.getNemCode(),zsszglPoint.getName()));
+        resultList.add(PointUtil.createPointData(currentDate,sszglsyz.get(),zsszglsyzPoint.getNemCode(),zsszglsyzPoint.getName()));
         resultList.add(PointUtil.createPointData(currentDate,zllgl.get(),zsszllglPoint.getNemCode(),zsszllglPoint.getName()));
         resultList.add(PointUtil.createPointData(currentDate,zbzgl.get(),zsszbzglPoint.getNemCode(),zsszbzglPoint.getName()));
         resultList.add(PointUtil.createPointData(currentDate,znhglzs.get(),zssznhglzsPoint.getNemCode(),zssznhglzsPoint.getName()));
@@ -1050,6 +1074,7 @@ public class RegionCalreService  {
         ProBasicPowerstationPoint zaqtsPoint = powerstationPointMap.get(ContantXk.AQTS);
         ProBasicPowerstationPoint zczztPoint = powerstationPointMap.get(ContantXk.CZZT);
         ProBasicPowerstationPoint zsszglPoint = powerstationPointMap.get(ContantXk.SSZGL);
+        ProBasicPowerstationPoint zsszglsyzPoint = powerstationPointMap.get(ContantXk.SSZGLSYZ);
         ProBasicPowerstationPoint zsszllglPoint = powerstationPointMap.get(ContantXk.SSZLLGL);
         ProBasicPowerstationPoint zsszbzglPoint = powerstationPointMap.get(ContantXk.SSZBZGL);
         ProBasicPowerstationPoint zssznhglzsPoint = powerstationPointMap.get(ContantXk.SSZNHGLZS);
@@ -1081,6 +1106,7 @@ public class RegionCalreService  {
         AtomicReference<Double> sspjfs = new AtomicReference<>((double) 0);
         AtomicReference<Double> sspjgzd = new AtomicReference<>((double) 0);
         AtomicReference<Double> sszgl = new AtomicReference<>((double) 0);
+        AtomicReference<Double> sszglsyz = new AtomicReference<>((double) 0);
         AtomicReference<Double> zllgl = new AtomicReference<>((double) 0);
         AtomicReference<Double> zbzgl = new AtomicReference<>((double) 0);
         AtomicReference<Double> znhglzs = new AtomicReference<>((double) 0);
@@ -1129,6 +1155,7 @@ public class RegionCalreService  {
             ProBasicPowerstationPoint aqtsPoint = powerstationPointMap1.get(ContantXk.AQTS);
             ProBasicPowerstationPoint czztPoint = powerstationPointMap1.get(ContantXk.CZZT);
             ProBasicPowerstationPoint sszglPoint = powerstationPointMap1.get(ContantXk.SSZGL);
+            ProBasicPowerstationPoint sszglsyzPoint = powerstationPointMap1.get(ContantXk.SSZGLSYZ);
             ProBasicPowerstationPoint sszllglPoint = powerstationPointMap1.get(ContantXk.SSZLLGL);
             ProBasicPowerstationPoint sszbzglPoint = powerstationPointMap1.get(ContantXk.SSZBZGL);
             ProBasicPowerstationPoint ssznhglzsPoint = powerstationPointMap1.get(ContantXk.SSZNHGLZS);
@@ -1207,6 +1234,14 @@ public class RegionCalreService  {
                 }
                 return v;
             });
+            sszglsyz.updateAndGet(v -> {
+                try {
+                    return new Double((double) (v + edosUtil.getRealData(sszglsyzPoint).getPointValueInDouble()));
+                } catch (Exception e) {
+                    e.printStackTrace();
+                }
+                return v;
+            });
             zllgl.updateAndGet(v -> {
                 try {
                     return new Double((double) (v + edosUtil.getRealData(sszllglPoint).getPointValueInDouble()));
@@ -1441,6 +1476,7 @@ public class RegionCalreService  {
         resultList.add(PointUtil.createPointData(currentDate,aqts,zaqtsPoint.getNemCode(),zaqtsPoint.getName()));
         resultList.add(PointUtil.createPointData(currentDate,zczzt,zczztPoint.getNemCode(),zczztPoint.getName()));
         resultList.add(PointUtil.createPointData(currentDate,sszgl.get(),zsszglPoint.getNemCode(),zsszglPoint.getName()));
+        resultList.add(PointUtil.createPointData(currentDate,sszglsyz.get(),zsszglsyzPoint.getNemCode(),zsszglsyzPoint.getName()));
         resultList.add(PointUtil.createPointData(currentDate,zllgl.get(),zsszllglPoint.getNemCode(),zsszllglPoint.getName()));
         resultList.add(PointUtil.createPointData(currentDate,zbzgl.get(),zsszbzglPoint.getNemCode(),zsszbzglPoint.getName()));
         resultList.add(PointUtil.createPointData(currentDate,znhglzs.get(),zssznhglzsPoint.getNemCode(),zssznhglzsPoint.getName()));

+ 6 - 1
realtime/generationXK-service/src/main/java/com/gyee/generation/service/realtimelibrary/StatusService.java

@@ -277,8 +277,13 @@ public class StatusService {
             //状态持续时间,以秒计算
             ProBasicEquipmentPoint ztcxsjPoint = equipmentPointMap.get(ContantXk.ZTCXSJ);
 
+            String[] interruption = null;
+            if (wt.getEquipmentCategory()==-1){
+                interruption = ContantXk.INTERRUPTION.split(",");
+            }else if (wt.getEquipmentCategory()==-2){
+                interruption = ContantXk.INTERRUPTIONGF.split(",");
+            }
 
-            String[] interruption = ContantXk.INTERRUPTION.split(",");
             List<String> interruptionList = new ArrayList<>();
             Arrays.stream(interruption).forEach(i->{
                 ProBasicEquipmentPoint equipmentPoint = equipmentPointMap.get(i);