From 520d4be5c6b8136f61811c9227515fec8937c709 Mon Sep 17 00:00:00 2001
From: vincentlu <t1341870251@gmail.com>
Date: 星期四, 07 五月 2026 10:22:56 +0800
Subject: [PATCH] #latent_code
---
zy-acs-manager/src/main/java/com/zy/acs/manager/core/HandlerController.java | 20 ++++++++++++--------
1 files changed, 12 insertions(+), 8 deletions(-)
diff --git a/zy-acs-manager/src/main/java/com/zy/acs/manager/core/HandlerController.java b/zy-acs-manager/src/main/java/com/zy/acs/manager/core/HandlerController.java
index 877c983..4e7316e 100644
--- a/zy-acs-manager/src/main/java/com/zy/acs/manager/core/HandlerController.java
+++ b/zy-acs-manager/src/main/java/com/zy/acs/manager/core/HandlerController.java
@@ -323,7 +323,8 @@
if (null == destSta) {
return R.error("鐩爣绔欑偣涓嶅瓨鍦�");
}
- if (!agvAreaDispatcher.match(agv.getId(), destSta.getCode())) {
+ Long locToStaDestCodeId = staService.resolveWorkCodeId(destSta, agv.getId());
+ if (!agvAreaDispatcher.match(agv.getId(), locToStaDestCodeId)) {
// throw new BusinessException("AGV " + agv.getUuid() + " failed to reach target code " + destSta.getCode$());
throw new BusinessException("AGV銆�" + agv.getUuid() + "銆戞棤娉曞埌杈剧洰鏍囩珯鐐广��" + destSta.getStaNo() + "銆�");
}
@@ -334,7 +335,7 @@
task.setOriLoc(oriLoc.getId());
task.setOriCode(oriLoc.getCode());
task.setDestSta(destSta.getId());
- task.setDestCode(destSta.getCode());
+ task.setDestCode(locToStaDestCodeId);
staReserveService.allocateCallBack(task, agv.getId());
break;
@@ -349,7 +350,8 @@
if (null == oriSta) {
return R.error("璧峰绔欑偣涓嶅瓨鍦�");
}
- if (!agvAreaDispatcher.match(agv.getId(), oriSta.getCode())) {
+ Long staToLocOriCodeId = staService.resolveWorkCodeId(oriSta, agv.getId());
+ if (!agvAreaDispatcher.match(agv.getId(), staToLocOriCodeId)) {
// throw new BusinessException("AGV " + agv.getUuid() + " failed to reach target code " + oriSta.getCode$());
throw new BusinessException("AGV銆�" + agv.getUuid() + "銆戞棤娉曞埌杈捐捣濮嬬珯鐐广��" + oriSta.getStaNo() + "銆�");
}
@@ -384,7 +386,7 @@
// task
task.setOriSta(oriSta.getId());
- task.setOriCode(oriSta.getCode());
+ task.setOriCode(staToLocOriCodeId);
task.setDestLoc(destLoc.getId());
task.setDestCode(destLoc.getCode());
@@ -401,7 +403,8 @@
if (null == oriSta) {
return R.error("璧峰绔欑偣涓嶅瓨鍦�");
}
- if (!agvAreaDispatcher.match(agv.getId(), oriSta.getCode())) {
+ Long staToStaOriCodeId = staService.resolveWorkCodeId(oriSta, agv.getId());
+ if (!agvAreaDispatcher.match(agv.getId(), staToStaOriCodeId)) {
// throw new BusinessException("AGV " + agv.getUuid() + " failed to reach target code " + oriSta.getCode$());
throw new BusinessException("AGV銆�" + agv.getUuid() + "銆戞棤娉曞埌杈捐捣濮嬬珯鐐广��" + oriSta.getStaNo() + "銆�");
}
@@ -420,7 +423,8 @@
if (null == destSta) {
return R.error("鐩爣绔欑偣涓嶅瓨鍦�");
}
- if (!agvAreaDispatcher.match(agv.getId(), destSta.getCode())) {
+ Long staToStaDestCodeId = staService.resolveWorkCodeId(destSta, agv.getId());
+ if (!agvAreaDispatcher.match(agv.getId(), staToStaDestCodeId)) {
// throw new BusinessException("AGV " + agv.getUuid() + " failed to reach target code " + destSta.getCode$());
throw new BusinessException("AGV銆�" + agv.getUuid() + "銆戞棤娉曞埌杈剧洰鏍囩珯鐐广��" + destSta.getStaNo() + "銆�");
}
@@ -430,9 +434,9 @@
// task
task.setOriSta(oriSta.getId());
- task.setOriCode(oriSta.getCode());
+ task.setOriCode(staToStaOriCodeId);
task.setDestSta(destSta.getId());
- task.setDestCode(destSta.getCode());
+ task.setDestCode(staToStaDestCodeId);
staReserveService.allocateCallBack(task, agv.getId());
break;
--
Gitblit v1.9.1