From 7225bce9f6e79f4c6ac4ea592b644a6447f81c2e Mon Sep 17 00:00:00 2001
From: zhangchao <zc857179121@qq.com>
Date: 星期一, 02 九月 2024 22:04:04 +0800
Subject: [PATCH] 对照协议调整

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

diff --git a/src/main/java/com/zy/core/thread/SiemensCrnThread.java b/src/main/java/com/zy/core/thread/SiemensCrnThread.java
index f3c77e2..aad4505 100644
--- a/src/main/java/com/zy/core/thread/SiemensCrnThread.java
+++ b/src/main/java/com/zy/core/thread/SiemensCrnThread.java
@@ -189,7 +189,7 @@
                 OutputQueue.CRN.offer(MessageFormat.format("銆恵0}銆慬id:{1}] <<<<< 瀹炴椂鏁版嵁鏇存柊鎴愬姛", DateUtils.convert(new Date()), slave.getId()));
                 if (crnProtocol.getMode() == 1) {
                     // 澶嶄綅淇″彿
-                    if (!Cools.isEmpty(crnProtocol.getStatusType()) && crnProtocol.getStatusType().equals(CrnStatusType.WAITING)) {
+                    if (!Cools.isEmpty(crnProtocol.getStatusType()) && crnProtocol.getStatusType().equals(CrnStatusType.WAITING_ONE)) {
                         if (resetFlag) {
                             if (crnProtocol.getTaskNo() == 9999) {
                                 backHpFlag = false;
@@ -203,7 +203,7 @@
                     }
                 } else if (crnProtocol.getMode() == 2) {
                     // 澶嶄綅淇″彿
-                    if (!Cools.isEmpty(crnProtocol.getStatusTypeTwo()) && crnProtocol.getStatusTypeTwo().equals(CrnStatusType.WAITING)) {
+                    if (!Cools.isEmpty(crnProtocol.getStatusTypeTwo()) && crnProtocol.getStatusTypeTwo().equals(CrnStatusType.WAITING_TWO)) {
                         if (resetFlagTwo) {
                             if (crnProtocol.getTaskNo() == 9999) {
                                 backHpFlag = false;
@@ -211,13 +211,13 @@
                             CrnCommand crnCommand = new CrnCommand();
                             crnCommand.setAckFinish((short) 1);
                             if (write(crnCommand)) {
-                                resetFlag = false;
+                                resetFlagTwo = false;
                             }
                         }
                     }
                 } else if (crnProtocol.getMode() == 3) {
                     // 澶嶄綅淇″彿
-                    if (!Cools.isEmpty(crnProtocol.getStatusType()) && crnProtocol.getStatusType().equals(CrnStatusType.WAITING) && !Cools.isEmpty(crnProtocol.getStatusTypeTwo()) && crnProtocol.getStatusTypeTwo().equals(CrnStatusType.WAITING)) {
+                    if (!Cools.isEmpty(crnProtocol.getStatusType()) && crnProtocol.getStatusType().equals(CrnStatusType.WAITING_All)) {
                         if (resetFlag && resetFlagTwo) {
                             if (crnProtocol.getTaskNo() == 9999) {
                                 backHpFlag = false;
@@ -226,6 +226,7 @@
                             crnCommand.setAckFinish((short) 1);
                             if (write(crnCommand)) {
                                 resetFlag = false;
+                                resetFlagTwo = false;
                             }
                         }
                     }

--
Gitblit v1.9.1