瀏覽代碼

修改光照

wangb@gyee-china.com 1 年之前
父節點
當前提交
25eca61a30

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

@@ -358,10 +358,12 @@ public class ContantXk {
     public static final String MX011 = "MX011";//环境受累
     public static final String MX012 = "MX012";//通讯中断
     public static final String MX013 = "MX013";//设备离线
-    public static final String FSYC="FSYC";
-    public static final String GZYC = "GZYC";
 
-    public static final String GLYC = "GLYC";
+    //新配置预测
+    public static final String FSYC="FSYC"; //风速预测
+    public static final String GZYC = "GZYC"; //光照预测
+    public static final String GLYC = "GLYC"; //功率预测
+    public static final String GCGZQD = "GCGZQD"; //场站光照
 
 
 

+ 5 - 5
web/runeconomy-xk/src/main/java/com/gyee/runeconomy/service/Forecast/ForecastService.java

@@ -73,7 +73,7 @@ public class ForecastService {
                     fsyc = proBasicPowerstationPointService.getPowerstationPoint(wp.getId(), ContantXk.FSYC);
                 }
                 if (wpId.endsWith("GDC_STA")) {
-                    pjfs = proBasicPowerstationPointService.getPowerstationPoint(wp.getId(), ContantXk.SSPJFS);
+                    pjfs = proBasicPowerstationPointService.getPowerstationPoint(wp.getWindpowerstationId(), ContantXk.GCGZQD);
                     fsyc = proBasicPowerstationPointService.getPowerstationPoint(wp.getId(), ContantXk.GZYC);
                     ycgl = proBasicPowerstationPointService.getPowerstationPoint(wp.getId(), ContantXk.GLYC);
                     sjgl = proBasicPowerstationPointService.getPowerstationPoint(wp.getId(), ContantXk.SSZGL);
@@ -145,7 +145,7 @@ public class ForecastService {
                     fsyc = proBasicPowerstationPointService.getPowerstationPoint(wp.getId(), ContantXk.FSYC);
                 }
                 if (wpId.endsWith("GDC_STA")) {
-                    pjfs = proBasicPowerstationPointService.getPowerstationPoint(wp.getId(), ContantXk.SSPJFS);
+                    pjfs = proBasicPowerstationPointService.getPowerstationPoint(wp.getWindpowerstationId(), ContantXk.GCGZQD);
                     fsyc = proBasicPowerstationPointService.getPowerstationPoint(wp.getId(), ContantXk.GZYC);
                     ycgl = proBasicPowerstationPointService.getPowerstationPoint(wp.getId(), ContantXk.GLYC);
                     sjgl = proBasicPowerstationPointService.getPowerstationPoint(wp.getId(), ContantXk.SSZGL);
@@ -384,7 +384,7 @@ public class ForecastService {
                     llgl = proBasicPowerstationPointService.getPowerstationPoint(wpId, ContantXk.SSZLLGL);
                 }
                 if (wpId.endsWith("GDC_STA")) {
-                    pjfs = proBasicPowerstationPointService.getPowerstationPoint(wpId, ContantXk.SSPJFS);
+                    pjfs = proBasicPowerstationPointService.getPowerstationPoint(wpId, ContantXk.GCGZQD);
                     fsyc = proBasicPowerstationPointService.getPowerstationPoint(wpId, ContantXk.GZYC);
                     ycgl = proBasicPowerstationPointService.getPowerstationPoint(wpId, ContantXk.GLYC);
                     sjgl = proBasicPowerstationPointService.getPowerstationPoint(wpId, ContantXk.SSZGL);
@@ -521,7 +521,7 @@ public class ForecastService {
                         fsyc = proBasicPowerstationPointService.getPowerstationPoint(wp.getId(), ContantXk.FSYC);
                     }
                     if (wpId.endsWith("GDC_STA") && type.equals("G")) {
-                        pjfs = proBasicPowerstationPointService.getPowerstationPoint(wp.getId(), ContantXk.SSPJGZD);
+                        pjfs = proBasicPowerstationPointService.getPowerstationPoint(wp.getWindpowerstationId(), ContantXk.GCGZQD);
                         fsyc = proBasicPowerstationPointService.getPowerstationPoint(wp.getId(), ContantXk.GZYC);
                         ycgl = proBasicPowerstationPointService.getPowerstationPoint(wp.getId(), ContantXk.GLYC);
                         sjgl = proBasicPowerstationPointService.getPowerstationPoint(wp.getId(), ContantXk.SSZGL);
@@ -1059,7 +1059,7 @@ public class ForecastService {
                         llgl1 = proBasicPowerstationPointService.getPowerstationPoint(wpId, ContantXk.SSZLLGL);
                     }
                     if (wpId.endsWith("GDC_STA") && type.equals("G")) {
-                        pjfs1 = proBasicPowerstationPointService.getPowerstationPoint(wpId, ContantXk.SSPJFS);
+                        pjfs1 = proBasicPowerstationPointService.getPowerstationPoint(wpId, ContantXk.GCGZQD);
                         fsyc1 = proBasicPowerstationPointService.getPowerstationPoint(wpId, ContantXk.GZYC);
                         ycgl1 = proBasicPowerstationPointService.getPowerstationPoint(wpId, ContantXk.GLYC);
                         sjgl1 = proBasicPowerstationPointService.getPowerstationPoint(wpId, ContantXk.SSZGL);

+ 6 - 4
web/runeconomy-xk/src/main/java/com/gyee/runeconomy/service/monitor/MatrixService.java

@@ -116,7 +116,7 @@ public class MatrixService {
             if (wp.getWindType().equals("-1")) {
                 wpPoints.add(pointMap.get(ContantXk.SSPJFS).getNemCode());
             } else if (wp.getWindType().equals("-2")) {
-                wpPoints.add(pointMap.get(ContantXk.SSPJGZD).getNemCode());
+                wpPoints.add(pointMap.get(ContantXk.GCGZQD).getNemCode());
             }
 
             wpPoints.add(pointMap.get(ContantXk.SSZBZGL).getNemCode());
@@ -409,7 +409,7 @@ public class MatrixService {
             if (wp.getWindType().equals("-1")) {
                 wpPoints.add(pointMap.get(ContantXk.SSPJFS).getNemCode());
             } else if (wp.getWindType().equals("-2")) {
-                wpPoints.add(pointMap.get(ContantXk.SSPJGZD).getNemCode());
+                wpPoints.add(pointMap.get(ContantXk.GCGZQD).getNemCode());
             }
 
             wpPoints.add(pointMap.get(ContantXk.SSZBZGL).getNemCode());
@@ -572,7 +572,7 @@ public class MatrixService {
         if (powerstation.getWindType().equals("-1")) {
             wpPoints.add(pointMap.get(ContantXk.SSPJFS).getNemCode());
         } else if (powerstation.getWindType().equals("-2")) {
-            wpPoints.add(pointMap.get(ContantXk.SSPJGZD).getNemCode());
+            wpPoints.add(pointMap.get(ContantXk.GCGZQD).getNemCode());
         }
         wpPoints.add(pointMap.get(ContantXk.SSZBZGL).getNemCode());
         wpPoints.add(pointMap.get(ContantXk.SSZNHGLZS).getNemCode());
@@ -691,6 +691,7 @@ public class MatrixService {
         Map<String, List<ProBasicProject>> wppromap = CacheContext.wppromap;
         List<ProBasicProject> projects = wppromap.get(wpid);
         Map<String, Map<String, ProBasicPowerstationPoint>> propointmap = CacheContext.propointmap;
+        Map<String, Map<String, ProBasicPowerstationPoint>> propointmap1 = CacheContext.wppointmap;
         Map<String, Map<String, Object>> wpdatamap = new HashMap<>();
         List<MatrixProVo> proVos = new ArrayList<>();
         projects.stream().forEach(p -> {
@@ -708,7 +709,8 @@ public class MatrixService {
             if (powerstation.getWindType().equals("-1")) {
                 procodes.add(powerstationPointMap.get(ContantXk.SSPJFS).getNemCode());
             } else if (powerstation.getWindType().equals("-2")) {
-                procodes.add(powerstationPointMap.get(ContantXk.SSPJGZD).getNemCode());
+                Map<String, ProBasicPowerstationPoint> powerstationPointMap1 = propointmap1.get(p.getWindpowerstationId());
+                procodes.add(powerstationPointMap1.get(ContantXk.GCGZQD).getNemCode());
             }
             procodes.add(powerstationPointMap.get(ContantXk.SSZBZGL).getNemCode());
             procodes.add(powerstationPointMap.get(ContantXk.SSZNHGLZS).getNemCode());

+ 3 - 2
web/runeconomy-xk/src/main/java/com/gyee/runeconomy/service/monitor/MonitorService.java

@@ -591,7 +591,8 @@ public class MonitorService {
                 nfdl = edosUtil.getRealData(nfdlvalue).getPointValueInDouble();
 
                 //光照指数
-                ProBasicPowerstationPoint gzzsvalue = proBasicPowerstationPointService.getPowerstationPoint(wpId, ContantXk.RPJGZD);
+                List<ProBasicPowerstation> czlss = CacheContext.wplsG.stream().filter(w -> w.getOrderNum().equals(15)).collect(Collectors.toList());
+                ProBasicPowerstationPoint gzzsvalue = proBasicPowerstationPointService.getPowerstationPoint(czlss.get(0).getId(), ContantXk.GCGZQD);
                 gzzs = edosUtil.getRealData(gzzsvalue).getPointValueInDouble();
 
                 //风能利用率
@@ -691,7 +692,7 @@ public class MonitorService {
                 ssfs = edosUtil.getRealData(ssfsvalue).getPointValueInDouble();
 
                 //光照指数
-                ProBasicPowerstationPoint gzzsvalue = proBasicPowerstationPointService.getPowerstationPoint(wpId, ContantXk.RPJGZD);
+                ProBasicPowerstationPoint gzzsvalue = proBasicPowerstationPointService.getPowerstationPoint(wpId, ContantXk.GCGZQD);
                 gzzs = edosUtil.getRealData(gzzsvalue).getPointValueInDouble();
                 //风能利用率
                 ProBasicPowerstationPoint fnlylvalue = proBasicPowerstationPointService.getPowerstationPoint(wpId, ContantXk.FNLYL);

+ 1 - 1
web/runeconomy-xk/src/main/java/com/gyee/runeconomy/service/monitor/PhotovoltaicmatrixService.java

@@ -210,7 +210,7 @@ public class PhotovoltaicmatrixService {
         gfztls.add(proBasicPowerstationPointService.getPowerstationPoint(wpId, ContantXk.LXTSMX).getNemCode());//离线台数
         gfztls.add(proBasicPowerstationPointService.getPowerstationPoint(wpId, ContantXk.TXZDTSMX).getNemCode());//通讯中断台数
 
-        ProBasicPowerstationPoint gzqdvalue = proBasicPowerstationPointService.getPowerstationPoint(wpId, ContantXk.SSPJGZD);
+        ProBasicPowerstationPoint gzqdvalue = proBasicPowerstationPointService.getPowerstationPoint(wpId, ContantXk.GCGZQD);
         gzqd = edosUtil.getRealData(gzqdvalue).getPointValueInDouble();
         ProBasicPowerstationPoint bzglvalue = proBasicPowerstationPointService.getPowerstationPoint(wpId, ContantXk.SSZBZGL);
         bzgl = edosUtil.getRealData(bzglvalue).getPointValueInDouble();

+ 8 - 1
web/runeconomy-xk/src/main/java/com/gyee/runeconomy/service/monitor/StationMonitorService.java

@@ -39,6 +39,7 @@ public class StationMonitorService {
         ProBasicPowerstation proBasicPowerstation = wpmap.get(wpid);
         resultMap.put("jrts", proBasicPowerstation.getJrquantityJz() + proBasicPowerstation.getJrquantityZc() + proBasicPowerstation.getJrwindQuantityHs() + proBasicPowerstation.getJrwindQuantityLd());
         List<String> points = new ArrayList<>();
+        List<String> points1 = new ArrayList<>();
         points.add(powerstationPointMap.get(ContantXk.DJTS).getNemCode());
         points.add(powerstationPointMap.get(ContantXk.DJTSMX).getNemCode());
         points.add(powerstationPointMap.get(ContantXk.SDTJTSMX).getNemCode());
@@ -69,6 +70,7 @@ public class StationMonitorService {
             resultMap.put("jrrl", proBasicPowerstation.getJrwindCapacity());
             resultMap.put("zzjrl", proBasicPowerstation.getWindCapacity());
         } else {
+            points1.add(powerstationPointMap.get(ContantXk.GCGZQD).getNemCode());
             points.add(powerstationPointMap.get(ContantXk.SSPJGZD).getNemCode());
             resultMap.put("czlx", "光电场");
             resultMap.put("jrrl", proBasicPowerstation.getJrCapacity());
@@ -122,6 +124,7 @@ public class StationMonitorService {
         points.add(powerstationPointMap.get(ContantXk.AQTS).getNemCode());
 
         List<PointData> realData = edosUtil.getRealData(points);
+        List<PointData> realData1 = edosUtil.getRealData(points1);
         resultMap.put("djts", realData.get(0).getPointValueInDouble());
         resultMap.put("dfts", realData.get(1).getPointValueInDouble());
         resultMap.put("sdtjts", realData.get(2).getPointValueInDouble());
@@ -230,7 +233,11 @@ public class StationMonitorService {
         nfdl = new BigDecimal(nfdl).divide(new BigDecimal(10000), 2, RoundingMode.HALF_EVEN).doubleValue();
         nfdl1 = nfdl1.divide(new BigDecimal("10000")).setScale(2, RoundingMode.HALF_UP);
         resultMap.put("nfdl", nfdl1.add(BigDecimal.valueOf(rfdl)));
-        resultMap.put("sspjfsgzd", realData.get(24).getPointValueInDouble());
+        if (proBasicPowerstation.getSpare4().equals("1")) {
+            resultMap.put("sspjfsgzd", realData.get(24).getPointValueInDouble());
+        }else {
+            resultMap.put("sspjfsgzd", realData1.get(0).getPointValueInDouble());
+        }
         resultMap.put("yggl", MathUtil.twoBit(realData.get(25).getPointValueInDouble() /1000));
         resultMap.put("fhl", (proBasicPowerstation.getJrwindCapacity() + proBasicPowerstation.getJrCapacity()) != 0 ? realData.get(25).getPointValueInDouble() / (proBasicPowerstation.getJrwindCapacity() + proBasicPowerstation.getJrCapacity()) * 100 : 0);
 //        resultMap.put("ylyxs", realData.get(26).getPointValueInDouble());