From 90cf24d60788e9228f02ffd96539d09c9b1c6bd1 Mon Sep 17 00:00:00 2001
From: skyouc <958836976@qq.com>
Date: 星期五, 06 二月 2026 17:42:11 +0800
Subject: [PATCH] 更改

---
 src/main/java/com/zy/core/network/real/ZyDualCrnRealConnect.java |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/src/main/java/com/zy/core/network/real/ZyDualCrnRealConnect.java b/src/main/java/com/zy/core/network/real/ZyDualCrnRealConnect.java
index c37ed43..d73416b 100644
--- a/src/main/java/com/zy/core/network/real/ZyDualCrnRealConnect.java
+++ b/src/main/java/com/zy/core/network/real/ZyDualCrnRealConnect.java
@@ -126,6 +126,7 @@
                             Object lock = redisUtil.get(RedisKeyType.DUAL_CRN_SEND_COMMAND_LOCK.key + deviceConfig.getDeviceNo());
                             if (lock == null) {
                                 OperateResult taskClearResult = siemensNet.Write("DB100.0", array);
+                                redisUtil.set(RedisKeyType.CLEAR_DUAL_CRN_TASK_LIMIT.key + deviceConfig.getDeviceNo(), "lock", 3);
                             }
                         }
                     }
@@ -181,7 +182,7 @@
     @Override
     public CommandResponse sendCommand(DualCrnCommand command) {
         RedisUtil redisUtil = SpringUtils.getBean(RedisUtil.class);
-        redisUtil.set(RedisKeyType.DUAL_CRN_SEND_COMMAND_LOCK.key + deviceConfig.getDeviceNo(), "lock", 5);
+        redisUtil.set(RedisKeyType.DUAL_CRN_SEND_COMMAND_LOCK.key + deviceConfig.getDeviceNo(), "lock", 10);
         CommandResponse response = new CommandResponse(false);
          try {
              if (null == command) {
@@ -260,6 +261,7 @@
                  OutputQueue.CRN.offer(MessageFormat.format("銆恵0}銆慬id:{1}] >>>>> 鍛戒护涓嬪彂锛� {2}", DateUtils.convert(new Date()), command.getCrnNo(), JSON.toJSON(command)));
                  response.setResult(true);
                  response.setMessage("鍛戒护涓嬪彂鎴愬姛");
+                 redisUtil.set(RedisKeyType.DUAL_CRN_SEND_COMMAND_LOCK.key + deviceConfig.getDeviceNo(), "lock", 5);
              } else {
                  News.error("鍙屽伐浣嶅爢鍨涙満鍐欏叆鍫嗗灈鏈簆lc鏁版嵁澶辫触 ===>> [id:{}]", command.getCrnNo());
                  OutputQueue.CRN.offer(MessageFormat.format("銆恵0}銆戝啓鍏ュ爢鍨涙満plc鏁版嵁澶辫触 ===>> [id:{1}]", DateUtils.convert(new Date()), command.getCrnNo()));

--
Gitblit v1.9.1