From 10ee450a249e4e5698765048472e7793056b7603 Mon Sep 17 00:00:00 2001
From: 云 <2163098428@qq.com>
Date: 星期一, 26 十月 2026 10:53:13 +0800
Subject: [PATCH] feat(mes): 增加物料编号集合查询参数并优化工艺路线验证逻辑
---
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/service/pro/route/MesProRouteServiceImpl.java | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/service/pro/route/MesProRouteServiceImpl.java b/yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/service/pro/route/MesProRouteServiceImpl.java
index e30fe31..8b6392d 100644
--- a/yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/service/pro/route/MesProRouteServiceImpl.java
+++ b/yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/service/pro/route/MesProRouteServiceImpl.java
@@ -187,8 +187,13 @@
.max(Comparator.comparing(MesProRouteProcessDO::getSort)).orElseThrow();
for (MesProRouteProcessDO process : processList) {
Set<Long> outputIds = parseOutputItemIds(process.getOutputItemId());
+ boolean last = process.getId().equals(lastProcess.getId());
if (CollUtil.isEmpty(outputIds)) {
- throw exception(PRO_ROUTE_PROCESS_OUTPUT_REQUIRED, process.getProcessId());
+ // 涓棿宸ュ簭涓嶄竴瀹氬舰鎴愬彲鍏ュ簱鐨勭嫭绔嬪崐鎴愬搧锛屽厑璁镐笉閰嶇疆浜у嚭锛涙湯閬撳伐搴忓繀椤讳骇鍑烘垚鍝併��
+ if (last) {
+ throw exception(PRO_ROUTE_LAST_OUTPUT_INVALID, process.getProcessId());
+ }
+ continue;
}
for (Long outputId : outputIds) {
if (!boundItemIds.contains(outputId)) {
@@ -196,7 +201,7 @@
throw exception(PRO_ROUTE_PROCESS_OUTPUT_NOT_BOUND, item.getName());
}
}
- if (process.getId().equals(lastProcess.getId())) {
+ if (last) {
if (finishedItemIds.isEmpty() || !outputIds.equals(finishedItemIds)) {
throw exception(PRO_ROUTE_LAST_OUTPUT_INVALID, process.getProcessId());
}
--
Gitblit v1.9.3