From 9c75abec22f0d4695f676fcb0e00dc832701c80c Mon Sep 17 00:00:00 2001
From: Administrator <pjb>
Date: 星期五, 11 七月 2025 10:04:00 +0800
Subject: [PATCH] 1

---
 src/main/java/com/zy/core/thread/SiemensDevpThread.java |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/src/main/java/com/zy/core/thread/SiemensDevpThread.java b/src/main/java/com/zy/core/thread/SiemensDevpThread.java
index 0a1d090..2c70193 100644
--- a/src/main/java/com/zy/core/thread/SiemensDevpThread.java
+++ b/src/main/java/com/zy/core/thread/SiemensDevpThread.java
@@ -197,6 +197,7 @@
         }
     }
 
+
     @Override
     public boolean connect() {
         boolean result = false;
@@ -318,7 +319,7 @@
                     if (staProtocol != null) {
                         while (iterator.hasNext()) {
                             String next = iterator.next();
-                            if (next.length() < 7 || next.length() > 10) {
+                            if (next.length() < 7 || next.length() > 10 || !next.matches("[0-9]*")) {
                                 iterator.remove();
                             }
                         }
@@ -777,19 +778,19 @@
 
         if (slave.getId() == 1 && this.ioModeOf2F1 != null) {
             if (!siemensS7Net.Write("DB105.10", this.ioModeOf2F1.id).IsSuccess) {
-                OutputQueue.DEVP.offer(MessageFormat.format("銆恵0}銆戝啓鍏ヨ緭閫佺嚎2F2鍏ュ嚭搴撴ā寮忓け璐ャ�傝緭閫佺嚎plc缂栧彿={1}", slave.getId()));
+                OutputQueue.DEVP.offer(MessageFormat.format("銆恵0}銆戝啓鍏ヨ緭閫佺嚎2F1鍏ュ嚭搴撴ā寮忓け璐ャ�傝緭閫佺嚎plc缂栧彿={1}", slave.getId()));
                 log.error("鍐欏叆杈撻�佺嚎2F1鍏ュ嚭搴撴ā寮忓け璐ャ�傝緭閫佺嚎plc缂栧彿={}", slave.getId());
             }
         }
         if (slave.getId() == 1 && this.ioModeOf2F2 != null) {
             if (!siemensS7Net.Write("DB105.12", this.ioModeOf2F2.id).IsSuccess) {
-                OutputQueue.DEVP.offer(MessageFormat.format("銆恵0}銆戝啓鍏ヨ緭閫佺嚎3F1鍏ュ嚭搴撴ā寮忓け璐ャ�傝緭閫佺嚎plc缂栧彿={1}", slave.getId()));
+                OutputQueue.DEVP.offer(MessageFormat.format("銆恵0}銆戝啓鍏ヨ緭閫佺嚎2F2鍏ュ嚭搴撴ā寮忓け璐ャ�傝緭閫佺嚎plc缂栧彿={1}", slave.getId()));
                 log.error("鍐欏叆杈撻�佺嚎2F2鍏ュ嚭搴撴ā寮忓け璐ャ�傝緭閫佺嚎plc缂栧彿={}", slave.getId());
             }
         }
         if (slave.getId() == 1 && this.ioModeOf2F3 != null) {
             if (!siemensS7Net.Write("DB105.14", this.ioModeOf2F3.id).IsSuccess) {
-                OutputQueue.DEVP.offer(MessageFormat.format("銆恵0}銆戝啓鍏ヨ緭閫佺嚎3F2鍏ュ嚭搴撴ā寮忓け璐ャ�傝緭閫佺嚎plc缂栧彿={1}", slave.getId()));
+                OutputQueue.DEVP.offer(MessageFormat.format("銆恵0}銆戝啓鍏ヨ緭閫佺嚎2F3鍏ュ嚭搴撴ā寮忓け璐ャ�傝緭閫佺嚎plc缂栧彿={1}", slave.getId()));
                 log.error("鍐欏叆杈撻�佺嚎2F3鍏ュ嚭搴撴ā寮忓け璐ャ�傝緭閫佺嚎plc缂栧彿={}", slave.getId());
             }
         }

--
Gitblit v1.9.1