From 4c9169967a879b54c04b0754ab9830a5a6baa708 Mon Sep 17 00:00:00 2001
From: vincentlu <t1341870251@gmail.com>
Date: 星期二, 18 三月 2025 14:30:48 +0800
Subject: [PATCH] #
---
zy-acs-manager/src/main/java/com/zy/acs/manager/core/service/ValidService.java | 24 +++++++++++++-----------
1 files changed, 13 insertions(+), 11 deletions(-)
diff --git a/zy-acs-manager/src/main/java/com/zy/acs/manager/core/service/ValidService.java b/zy-acs-manager/src/main/java/com/zy/acs/manager/core/service/ValidService.java
index 31435f3..1c75b7f 100644
--- a/zy-acs-manager/src/main/java/com/zy/acs/manager/core/service/ValidService.java
+++ b/zy-acs-manager/src/main/java/com/zy/acs/manager/core/service/ValidService.java
@@ -37,7 +37,7 @@
@Autowired
private SnowflakeIdWorker snowflakeIdWorker;
- public List<Task> validBusDto(List<TaskDto> taskDtoList) {
+ public List<Task> validTaskDtoList(List<TaskDto> taskDtoList) {
List<Task> taskList = new ArrayList<>();
for (TaskDto taskDto : taskDtoList) {
if (Cools.isEmpty(taskDto.getSeqNum())) {
@@ -56,6 +56,7 @@
throw new BusinessException("oriLoc: " + taskDto.getOriLoc() + " doesn't exist!");
}
task.setOriLoc(oriLoc.getId());
+// task.setOriCode(oriLoc.getCode());
}
if (!Cools.isEmpty(taskDto.getOriSta())) {
Sta oriSta = staService.selectByStaNo(taskDto.getOriSta());
@@ -63,6 +64,7 @@
throw new BusinessException("oriSta: " + taskDto.getOriSta() + " doesn't exist!");
}
task.setOriSta(oriSta.getId());
+// task.setOriCode(oriSta.getCode());
}
// dest --------------------------
if (!Cools.isEmpty(taskDto.getDestLoc())) {
@@ -125,8 +127,8 @@
oriLoc = locService.getById(task.getOriLoc());
destLoc = locService.getById(task.getDestLoc());
- startCode = codeService.getById(oriLoc.getCode());
- endCode = codeService.getById(destLoc.getCode());
+ startCode = codeService.getCacheById(oriLoc.getCode());
+ endCode = codeService.getCacheById(destLoc.getCode());
if (null == startCode) {
throw new BusinessException("oriLoc锛�" + oriLoc.getLocNo() + " hasn't been bound to a QrCode yet");
}
@@ -143,8 +145,8 @@
oriLoc = locService.getById(task.getOriLoc());
destSta = staService.getById(task.getDestSta());
- startCode = codeService.getById(oriLoc.getCode());
- endCode = codeService.getById(destSta.getCode());
+ startCode = codeService.getCacheById(oriLoc.getCode());
+ endCode = codeService.getCacheById(destSta.getCode());
if (null == startCode) {
throw new BusinessException("oriLoc锛�" + oriLoc.getLocNo() + " hasn't been bound to QrCode yet");
}
@@ -161,8 +163,8 @@
oriSta = staService.getById(task.getOriSta());
destLoc = locService.getById(task.getDestLoc());
- startCode = codeService.getById(oriSta.getCode());
- endCode = codeService.getById(destLoc.getCode());
+ startCode = codeService.getCacheById(oriSta.getCode());
+ endCode = codeService.getCacheById(destLoc.getCode());
if (null == startCode) {
throw new BusinessException("oriSta锛�" + oriSta.getStaNo() + " hasn't bound to QrCode yet");
}
@@ -179,13 +181,13 @@
oriSta = staService.getById(task.getOriSta());
destSta = staService.getById(task.getDestSta());
- startCode = codeService.getById(oriSta.getCode());
- endCode = codeService.getById(destSta.getCode());
+ startCode = codeService.getCacheById(oriSta.getCode());
+ endCode = codeService.getCacheById(destSta.getCode());
if (null == startCode) {
- throw new BusinessException("oriSta锛�" + oriSta.getStaNo() + " 鏈粦瀹氬湴闈㈢爜");
+ throw new BusinessException("oriSta锛�" + oriSta.getStaNo() + " hasn't been bound to a QrCode yet");
}
if (null == endCode) {
- throw new BusinessException("destSta锛�" + destSta.getStaNo() + " 鏈粦瀹氬湴闈㈢爜");
+ throw new BusinessException("destSta锛�" + destSta.getStaNo() + " is not bound to a QrCode yet");
}
pathList = mapService.validFeasibility(startCode, endCode);
if (Cools.isEmpty(pathList)) {
--
Gitblit v1.9.1