From f7009ef55b73941d904f57e642bbe30b86421634 Mon Sep 17 00:00:00 2001
From: Junjie <fallin.jie@qq.com>
Date: 星期一, 13 四月 2026 18:26:56 +0800
Subject: [PATCH] #入库命令耗时日志
---
src/main/java/com/zy/core/plugin/store/StoreInTaskGenerationService.java | 11 +++++++++--
1 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/src/main/java/com/zy/core/plugin/store/StoreInTaskGenerationService.java b/src/main/java/com/zy/core/plugin/store/StoreInTaskGenerationService.java
index 522b34f..5eb4023 100644
--- a/src/main/java/com/zy/core/plugin/store/StoreInTaskGenerationService.java
+++ b/src/main/java/com/zy/core/plugin/store/StoreInTaskGenerationService.java
@@ -33,6 +33,7 @@
import org.springframework.stereotype.Service;
import java.util.HashMap;
+import java.util.List;
import java.util.Map;
@Service
@@ -335,13 +336,13 @@
request.getBarcode(), request.getSourceStaNo(), result.getResponse(), result.getMessage());
redisUtil.set(policy.getGenerateLockKey(context), "lock", policy.getRetryLockSeconds(context));
policy.onApplyFailed(context, result);
- triggerStationBackOnApplyFailed(context, request, result);
+ triggerStationBackOnApplyFailed(policy, context, request, result);
}
/**
* WMS 鐢宠鍏ュ簱澶辫触鍚庯紝璐х墿浠嶅仠鐣欏湪鎵爜绔欙紝姝ゆ椂琛ュ彂閫�鍥炲埌鍏ュ簱绔欑殑杈撻�佸懡浠わ紝閬垮厤璐х墿闀挎湡婊炵暀銆�
*/
- private void triggerStationBackOnApplyFailed(StoreInTaskContext context,
+ private void triggerStationBackOnApplyFailed(StoreInTaskPolicy policy, StoreInTaskContext context,
InTaskApplyRequest request,
InTaskApplyResult result) {
if (context == null || context.getStationThread() == null || context.getStationObjModel() == null) {
@@ -412,6 +413,12 @@
}
redisUtil.set(lockKey, "lock", APPLY_FAIL_STATION_BACK_LOCK_SECONDS);
+ String currentWarning = stationProtocol.getSystemWarning();
+ String backWarning = "WMS鍏ュ簱澶辫触锛屽凡閫�鍥炲叆搴撶珯";
+ if (!Cools.isEmpty(currentWarning)) {
+ backWarning = currentWarning + ";" + backWarning;
+ }
+ policy.setSystemWarning(context, backWarning);
News.warn("WMS鍏ュ簱澶辫触锛屽凡瑙﹀彂璐х墿閫�鍥炲叆搴撶珯銆俠arcode={}锛宻tationId={}锛宐ackStationId={}锛寃arning={}",
request == null ? null : request.getBarcode(),
currentStationId,
--
Gitblit v1.9.1