xieshengjie 2 лет назад
Родитель
Сommit
764e2c46fe

+ 32 - 0
realtime/computing-services7001/src/main/java/com/gyee/generation/service/StatusService.java

@@ -73,6 +73,38 @@ public class StatusService {
     }
 
     /**
+     * 判断整场通讯
+     */
+    public void calWpStatus(){
+        init();
+        wpls.stream().forEach(wp->{
+            Windpowerstationpointnew windpowerstationpointnew = wppointmap.get(wp.getId()).get(Contant.FJ5T);
+
+            List<Windturbine> windturbines = wtls.stream().filter(wt -> wt.getWindpowerstationid().equals(wp.getId())).collect(Collectors.toList());
+            List<String> list = new ArrayList<>();
+            List<PointData> realData = null;
+            windturbines.stream().forEach(wt->{
+                Windturbinetestingpointnew windturbinetestingpointnew = wtpAimap.get(wt.getId()).get(Contant.FJ5T);
+                list.add(windturbinetestingpointnew.getCode());
+            });
+            try {
+                realData = edosUtil.getRealData(list);
+            } catch (Exception e) {
+                e.printStackTrace();
+            }
+            boolean b = realData.stream().allMatch(pointData -> pointData.getPointValueInDouble() == 3.0);
+            if (b){
+                try {
+                    edosUtil.sendSinglePoint(createWpPoint(new AtomicInteger(1),windpowerstationpointnew));
+                } catch (Exception e) {
+                    e.printStackTrace();
+                }
+            }
+
+        });
+    }
+
+    /**
      * 计算状态
      * @throws Exception
      */

+ 10 - 1
realtime/computing-services7001/src/main/java/com/gyee/generation/task/SaticScheduleTask.java

@@ -195,7 +195,16 @@ public class SaticScheduleTask {
         fiveLossesService.saveShutdownevent();
         XxlJobHelper.log("故障事件调度程序执行完成!........");
     }
-
+    /**
+     * 判断整场通讯
+     * 2分钟执行一次
+     */
+    @XxlJob("wpstatus7001-realtime")
+    public void wpstatus(){
+        XxlJobHelper.log("整场通讯程序执行开始!........");
+        statusService.calWpStatus();
+        XxlJobHelper.log("整场通讯调度程序执行完成!........");
+    }
 
 
 }

+ 32 - 0
realtime/computing-services7002/src/main/java/com/gyee/generation/service/StatusService.java

@@ -73,6 +73,38 @@ public class StatusService {
     }
 
     /**
+     * 判断整场通讯
+     */
+    public void calWpStatus(){
+        init();
+        wpls.stream().forEach(wp->{
+            Windpowerstationpointnew windpowerstationpointnew = wppointmap.get(wp.getId()).get(Contant.FJ5T);
+
+            List<Windturbine> windturbines = wtls.stream().filter(wt -> wt.getWindpowerstationid().equals(wp.getId())).collect(Collectors.toList());
+            List<String> list = new ArrayList<>();
+            List<PointData> realData = null;
+            windturbines.stream().forEach(wt->{
+                Windturbinetestingpointnew windturbinetestingpointnew = wtpAimap.get(wt.getId()).get(Contant.FJ5T);
+                list.add(windturbinetestingpointnew.getCode());
+            });
+            try {
+                realData = edosUtil.getRealData(list);
+            } catch (Exception e) {
+                e.printStackTrace();
+            }
+            boolean b = realData.stream().allMatch(pointData -> pointData.getPointValueInDouble() == 3.0);
+            if (b){
+                try {
+                    edosUtil.sendSinglePoint(createWpPoint(new AtomicInteger(1),windpowerstationpointnew));
+                } catch (Exception e) {
+                    e.printStackTrace();
+                }
+            }
+
+        });
+    }
+
+    /**
      * 计算状态
      * @throws Exception
      */

+ 11 - 0
realtime/computing-services7002/src/main/java/com/gyee/generation/task/SaticScheduleTask.java

@@ -197,6 +197,17 @@ public class SaticScheduleTask {
         XxlJobHelper.log("故障事件调度程序执行完成!........");
     }
 
+    /**
+     * 判断整场通讯
+     * 2分钟执行一次
+     */
+    @XxlJob("wpstatus7002-realtime")
+    public void wpstatus(){
+        XxlJobHelper.log("整场通讯程序执行开始!........");
+        statusService.calWpStatus();
+        XxlJobHelper.log("整场通讯调度程序执行完成!........");
+    }
+
 
 
 }

+ 32 - 0
realtime/computing-services7003/src/main/java/com/gyee/generation/service/StatusService.java

@@ -73,6 +73,38 @@ public class StatusService {
     }
 
     /**
+     * 判断整场通讯
+     */
+    public void calWpStatus(){
+        init();
+        wpls.stream().forEach(wp->{
+            Windpowerstationpointnew windpowerstationpointnew = wppointmap.get(wp.getId()).get(Contant.FJ5T);
+
+            List<Windturbine> windturbines = wtls.stream().filter(wt -> wt.getWindpowerstationid().equals(wp.getId())).collect(Collectors.toList());
+            List<String> list = new ArrayList<>();
+            List<PointData> realData = null;
+            windturbines.stream().forEach(wt->{
+                Windturbinetestingpointnew windturbinetestingpointnew = wtpAimap.get(wt.getId()).get(Contant.FJ5T);
+                list.add(windturbinetestingpointnew.getCode());
+            });
+            try {
+                realData = edosUtil.getRealData(list);
+            } catch (Exception e) {
+                e.printStackTrace();
+            }
+            boolean b = realData.stream().allMatch(pointData -> pointData.getPointValueInDouble() == 3.0);
+            if (b){
+                try {
+                    edosUtil.sendSinglePoint(createWpPoint(new AtomicInteger(1),windpowerstationpointnew));
+                } catch (Exception e) {
+                    e.printStackTrace();
+                }
+            }
+
+        });
+    }
+
+    /**
      * 计算状态
      * @throws Exception
      */

+ 10 - 1
realtime/computing-services7003/src/main/java/com/gyee/generation/task/SaticScheduleTask.java

@@ -196,7 +196,16 @@ public class SaticScheduleTask {
         fiveLossesService.saveShutdownevent();
         XxlJobHelper.log("故障事件调度程序执行完成!........");
     }
-
+    /**
+     * 判断整场通讯
+     * 2分钟执行一次
+     */
+    @XxlJob("wpstatus7003-realtime")
+    public void wpstatus(){
+        XxlJobHelper.log("整场通讯程序执行开始!........");
+        statusService.calWpStatus();
+        XxlJobHelper.log("整场通讯调度程序执行完成!........");
+    }
 
 
 }