xieshengjie 2 years ago
parent
commit
a8bec2d35c

+ 9 - 5
realtime/computing-services7001/src/main/java/com/gyee/generation/service/StatusService.java

@@ -41,7 +41,7 @@ public class StatusService {
     public static Map<String,List<Windturbine>> linewtmap;
     @Resource
     private IEdosUtil edosUtil;
-//    @Resource
+    //    @Resource
 //    private IEdosUtil edosUtilTd;
     @Value("${clauStatus.ai}")
     private String clauStatusAi;
@@ -93,14 +93,18 @@ public class StatusService {
                 e.printStackTrace();
             }
             boolean b = realData.stream().allMatch(pointData -> pointData.getPointValueInDouble() == 3.0);
-            if (b){
-                try {
+
+            try {
+                if (b){
                     edosUtil.sendSinglePoint(createWpPoint(new AtomicInteger(1),windpowerstationpointnew));
-                } catch (Exception e) {
-                    e.printStackTrace();
+                }else{
+                    edosUtil.sendSinglePoint(createWpPoint(new AtomicInteger(0),windpowerstationpointnew));
                 }
+            } catch (Exception e) {
+                e.printStackTrace();
             }
 
+
         });
     }
 

+ 9 - 5
realtime/computing-services7002/src/main/java/com/gyee/generation/service/StatusService.java

@@ -41,7 +41,7 @@ public class StatusService {
     public static Map<String,List<Windturbine>> linewtmap;
     @Resource
     private IEdosUtil edosUtil;
-//    @Resource
+    //    @Resource
 //    private IEdosUtil edosUtilTd;
     @Value("${clauStatus.ai}")
     private String clauStatusAi;
@@ -93,14 +93,18 @@ public class StatusService {
                 e.printStackTrace();
             }
             boolean b = realData.stream().allMatch(pointData -> pointData.getPointValueInDouble() == 3.0);
-            if (b){
-                try {
+
+            try {
+                if (b){
                     edosUtil.sendSinglePoint(createWpPoint(new AtomicInteger(1),windpowerstationpointnew));
-                } catch (Exception e) {
-                    e.printStackTrace();
+                }else{
+                    edosUtil.sendSinglePoint(createWpPoint(new AtomicInteger(0),windpowerstationpointnew));
                 }
+            } catch (Exception e) {
+                e.printStackTrace();
             }
 
+
         });
     }
 

+ 7 - 3
realtime/computing-services7003/src/main/java/com/gyee/generation/service/StatusService.java

@@ -93,13 +93,17 @@ public class StatusService {
                 e.printStackTrace();
             }
             boolean b = realData.stream().allMatch(pointData -> pointData.getPointValueInDouble() == 3.0);
-            if (b){
+
                 try {
-                    edosUtil.sendSinglePoint(createWpPoint(new AtomicInteger(1),windpowerstationpointnew));
+                    if (b){
+                        edosUtil.sendSinglePoint(createWpPoint(new AtomicInteger(1),windpowerstationpointnew));
+                    }else{
+                        edosUtil.sendSinglePoint(createWpPoint(new AtomicInteger(0),windpowerstationpointnew));
+                    }
                 } catch (Exception e) {
                     e.printStackTrace();
                 }
-            }
+
 
         });
     }