From 47d5daf4d99de5210f9ac005d6a407d0c532b6aa Mon Sep 17 00:00:00 2001
From: wuyouming666 <2265557248@qq.com>
Date: 星期四, 07 十二月 2023 09:41:54 +0800
Subject: [PATCH] 修改按钮名称

---
 springboot-vue3/src/main/java/com/example/springboot/component/Plcalarm.java |   16 ++++++++--------
 1 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/springboot-vue3/src/main/java/com/example/springboot/component/Plcalarm.java b/springboot-vue3/src/main/java/com/example/springboot/component/Plcalarm.java
index 22a103a..ecf88ea 100644
--- a/springboot-vue3/src/main/java/com/example/springboot/component/Plcalarm.java
+++ b/springboot-vue3/src/main/java/com/example/springboot/component/Plcalarm.java
@@ -28,7 +28,7 @@
     FileInputStream fileInputStream;
     try {
       // 浠庢枃浠朵腑璇诲彇瀛楄妭鏁版嵁瀛樺叆 fileInputStream
-      fileInputStream = new FileInputStream("CanadaMes-ui/src/configuration/Alarm.json");
+      fileInputStream = new FileInputStream("src/main/resources/Alarm.json");
       // 璇诲彇 fileInputStream 涓瓧鑺傚苟灏嗗叾瑙g爜涓哄瓧绗�
       InputStreamReader inputStreamReader = new InputStreamReader(fileInputStream, "utf-8");
       // 鎻愰珮璇诲彇鏁堢巼锛屽湪 BufferedReader 鍐呭寘瑁� InputStreamReader
@@ -82,13 +82,13 @@
         e.printStackTrace();
       }
 
-      this.readValue();
-      String PlcAddress = this.name;
-      Integer Plccount = this.count;
+//      this.readValue();
+//      String PlcAddress = this.name;
+//      Integer Plccount = this.count;
 
       // 鏍规嵁鍦板潃璇诲彇PCL鏁版嵁
-      // List<Boolean> plclist = S7control.getinstance().ReadBits("DB104.0.0", 71);
-      List<Boolean> plclist = S7control.getinstance().ReadBits(PlcAddress, Plccount);
+      List<Boolean> plclist = S7control.getinstance().ReadBits("DB104.0.0", 71);
+//      List<Boolean> plclist = S7control.getinstance().ReadBits(PlcAddress, Plccount);
       // System.out.println(plclist);
       // Boolean[] values = { false, false, true, false, true, false, true, false,
       // true, false, true, false, true, false,
@@ -121,7 +121,7 @@
         List<String> myCollection;
         myCollection = readValue();
         String[] array1 = myCollection.toArray(new String[myCollection.size()]);
-
+      //  System.out.println(array1.length);
         alarmMapper = WebSocketServer.applicationContext.getBean(AlarmMapper.class);
         for (short i = 0; i < array1.length; i++) {
           // 鏌ヨ瀵瑰簲鎶ヨ淇℃伅缁撴潫鏃堕棿涓簄ull鐨勬潯鏁�
@@ -130,7 +130,7 @@
           // System.out.println(result);
           if (shuzu1[i] == 1 && result == 0) {
             // 濉姞涓�鏉℃姤璀︿俊鎭�,鏈夊紑濮嬫椂闂�
-            // alarmMapper.Insertalarm(array1[i]);
+             alarmMapper.Insertalarm(array1[i]);
           } else if (shuzu1[i] == 0 && result > 0) {
             // 淇敼璇ユ潯鎶ヨ淇℃伅鐨勭粨鏉熸椂闂�
             alarmMapper.updatealarm(array1[i]);

--
Gitblit v1.8.0