From b0c9f61dfb6330f2e3ef59995a92cd14719cd8ba Mon Sep 17 00:00:00 2001
From: wuyouming666 <2265557248@qq.com>
Date: 星期四, 07 十二月 2023 11:31:41 +0800
Subject: [PATCH] 报警json文件存放在resources

---
 springboot-vue3/src/main/java/com/example/springboot/component/PlcServoManualone.java |   46 +++++++++++++++++++++++-----------------------
 1 files changed, 23 insertions(+), 23 deletions(-)

diff --git a/springboot-vue3/src/main/java/com/example/springboot/component/PlcServoManualone.java b/springboot-vue3/src/main/java/com/example/springboot/component/PlcServoManualone.java
index 1502860..3ee0b87 100644
--- a/springboot-vue3/src/main/java/com/example/springboot/component/PlcServoManualone.java
+++ b/springboot-vue3/src/main/java/com/example/springboot/component/PlcServoManualone.java
@@ -447,29 +447,29 @@
             }
           }
 
-          if (messageArray.getJSONArray(8).size() > 0) {
-            JSONArray jsonArray5 = messageArray.getJSONArray(8);
-            List<Boolean> sValueb5 = new ArrayList<>();
-            for (int i = 0; i < jsonArray5.size(); i++) {
-              Object value = jsonArray5.get(i);
-              if (value != null && !value.toString().equals("null")) {
-                try {
-                  String cleanedValue = value.toString().replaceAll("[^0-9-]", "");
-                  boolean val = "1".equals(cleanedValue.trim());
-                  sValueb5.add(val);
-                  System.out.println("messageValue: " + Arrays.asList(val) + " added to the list");
-                } catch (NumberFormatException e) {
-                  // 濡傛灉鏃犳硶瑙f瀽涓� boolean 绫诲瀷锛屽垯蹇界暐璇ラ儴鍒�
-                  System.err.println("Could not parse value: " + value);
-                }
-              }
-            }
-            if (!sValueb5.isEmpty()) {
-
-              S7control.getinstance().WriteBit(abortresumeTasks, sValueb5);
-              System.out.println("Values " + sValueb5 + " written to PLC at address " + A02Bstart);
-            }
-          }
+//          if (messageArray.getJSONArray(8).size() > 0  ) {
+//            JSONArray jsonArray5 = messageArray.getJSONArray(8);
+//            List<Boolean> sValueb5 = new ArrayList<>();
+//            for (int i = 0; i < jsonArray5.size(); i++) {
+//              Object value = jsonArray5.get(i);
+//              if (value != null && !value.toString().equals("null")) {
+//                try {
+//                  String cleanedValue = value.toString().replaceAll("[^0-9-]", "");
+//                  boolean val = "1".equals(cleanedValue.trim());
+//                  sValueb5.add(val);
+//                  System.out.println("messageValue: " + Arrays.asList(val) + " added to the list");
+//                } catch (NumberFormatException e) {
+//                  // 濡傛灉鏃犳硶瑙f瀽涓� boolean 绫诲瀷锛屽垯蹇界暐璇ラ儴鍒�
+//                  System.err.println("Could not parse value: " + value);
+//                }
+//              }
+//            }
+//            if (!sValueb5.isEmpty()) {
+//
+//              S7control.getinstance().WriteBit(abortresumeTasks, sValueb5);
+//              System.out.println("Values " + sValueb5 + " written to PLC at address " + A02Bstart);
+//            }
+//          }
 
 
           // 娓呯┖娑堟伅鍒楄〃

--
Gitblit v1.8.0