From 41381a9702a423e72451e9930b0faa51a29e14f8 Mon Sep 17 00:00:00 2001
From: zwl <1051256694@qq.com>
Date: 星期四, 19 三月 2026 18:52:07 +0800
Subject: [PATCH] #

---
 src/main/java/com/zy/core/utils/WmsOperateUtils.java |   23 +++++++++++++++++++++++
 1 files changed, 23 insertions(+), 0 deletions(-)

diff --git a/src/main/java/com/zy/core/utils/WmsOperateUtils.java b/src/main/java/com/zy/core/utils/WmsOperateUtils.java
index 9967283..67e1df5 100644
--- a/src/main/java/com/zy/core/utils/WmsOperateUtils.java
+++ b/src/main/java/com/zy/core/utils/WmsOperateUtils.java
@@ -26,6 +26,7 @@
 import com.zy.system.entity.Config;
 import com.zy.system.service.ConfigService;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.scheduling.annotation.Async;
 import org.springframework.stereotype.Component;
 
 import java.util.ArrayList;
@@ -392,6 +393,22 @@
         return response;
     }
 
+    @Async
+    public void reportCrnDb110StatusAsync(Integer crnNo, List<Integer> indices) {
+        try {
+            if (crnNo == null || indices == null || indices.isEmpty()) {
+                return;
+            }
+            reportCrnDb110Status(crnNo, indices);
+        } catch (Exception e) {
+            News.error("寮傛涓婃姤鍫嗗灈鏈篋B110鐘舵�佸紓甯革紝crnNo={}锛宨ndices={}", crnNo, JSON.toJSONString(indices), e);
+        } finally {
+            if (crnNo != null) {
+                redisUtil.del(RedisKeyType.REPORT_CRN_DB110_STATUS_LIMIT.key + crnNo);
+            }
+        }
+    }
+
     // 涓婃姤鍫嗗灈鏈篋B110鐘舵�佹暟鎹�
     public void reportCrnDb110Status(Integer crnNo, List<Integer> indices) {
         Object systemConfigMapObj = redisUtil.get(RedisKeyType.SYSTEM_CONFIG_MAP.key);
@@ -453,6 +470,12 @@
                         News.info("璇锋眰WMS鍫嗗灈鏈虹姸鎬佷笂鎶ユ帴鍙f垚鍔燂紒锛侊紒url锛歿}锛況equest锛歿}锛況esponse锛歿}", wmsUrl + wmsSystemCrnStatusUrl,
                                 JSON.toJSONString(locMast.getBarcode()), response);
                     } else {
+                        result = 0;
+                        CrnCommand command = new CrnCommand();
+                        command.setLocNo(locMast.getLocNo());
+                        command.setIndex(idx);
+                        command.setValue((short)0);
+                        MessageQueue.offer(SlaveType.Crn, crnNo, new Task(5, command));
                         News.info("璇锋眰WMS鍫嗗灈鏈虹姸鎬佷笂鎶ユ帴鍙eけ璐ワ紝鎺ュ彛杩斿洖Code寮傚父锛侊紒锛乽rl锛歿}锛況equest锛歿}锛況esponse锛歿}",
                                 wmsUrl + wmsSystemCrnStatusUrl, JSON.toJSONString(locMast.getBarcode()), response);
                     }

--
Gitblit v1.9.1