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 | 25 ++++++++++++++++++++++++-
1 files changed, 24 insertions(+), 1 deletions(-)
diff --git a/src/main/java/com/zy/core/utils/WmsOperateUtils.java b/src/main/java/com/zy/core/utils/WmsOperateUtils.java
index 107733a..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);
@@ -423,7 +440,7 @@
String[] split = crnNo1.getArr().split(",");
for (Integer idx : indices) {
LocMast locMast = locMastService.selectOne(new EntityWrapper<LocMast>().eq("loc_no", split[idx]));
- if (locMast == null||Cools.isEmpty(locMast.getBarcode())) {
+ if (locMast == null||Cools.isEmpty(locMast.getBarcode())||locMast.getLocSts().equals("O")) {
News.info("娌℃湁鏌ヨ鍒拌搴撲綅鎴栬�呮病鏈夋壘鍒拌搴撲綅瀵瑰簲鎵樼洏鐮� 锛歿}", split[idx]);
CrnCommand command = new CrnCommand();
command.setLocNo(locMast.getLocNo());
@@ -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