From e10c196ff7348a4461e8facee10a208779244ece Mon Sep 17 00:00:00 2001
From: 吴羡 <16976746+Xian-TT3@user.noreply.gitee.com>
Date: 星期三, 30 九月 2026 15:33:30 +0800
Subject: [PATCH] 宁夏万通需求:出库单行支持主/辅单位录入;考勤节假日配置改为时间段;物料型号维护;设备批量删除;来料检验默认方案解析

---
 yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/qc/template/MesQcTemplateItemController.java |   12 +++++++++++-
 1 files changed, 11 insertions(+), 1 deletions(-)

diff --git a/yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/qc/template/MesQcTemplateItemController.java b/yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/qc/template/MesQcTemplateItemController.java
index cdd5397..e4f02e4 100644
--- a/yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/qc/template/MesQcTemplateItemController.java
+++ b/yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/qc/template/MesQcTemplateItemController.java
@@ -28,6 +28,7 @@
 import java.util.Collections;
 import java.util.List;
 import java.util.Map;
+import java.util.stream.Collectors;
 
 import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertSet;
 import static cn.iocoder.yudao.framework.common.util.collection.MapUtils.findAndThen;
@@ -91,13 +92,22 @@
     }
 
     @GetMapping("/list-by-item-and-type")
-    @Operation(summary = "鏍规嵁鐗╂枡鎴栧伐鍗�/浠诲姟鍜屾娴嬬绫昏幏鍙栧彲鐢ㄨ川妫�鏂规")
+    @Operation(summary = "鏍规嵁鐗╂枡鎴栧伐鍗�/浠诲姟鍜屾娴嬬绫昏幏鍙栧彲鐢ㄨ川妫�鏂规锛堟湭鎸囧畾鐗╂枡/宸ュ崟/浠诲姟鏃惰繑鍥炶妫�娴嬬绫讳笅鍏ㄩ儴鍚敤鏂规锛�")
     @PreAuthorize("@ss.hasPermission('mes:qc-template:query')")
     public CommonResult<List<MesQcTemplateItemOptionRespVO>> getTemplateItemOptionList(
             @RequestParam(value = "qcType", required = false) Integer qcType,
             @RequestParam(value = "itemId", required = false) Long itemId,
             @RequestParam(value = "workOrderId", required = false) Long workOrderId,
             @RequestParam(value = "taskId", required = false) Long taskId) {
+        // 鏈寚瀹氱墿鏂�/宸ュ崟/浠诲姟鏃讹紝鎸夋娴嬬绫昏繑鍥炲叏閮ㄥ惎鐢ㄧ殑璐ㄦ鏂规锛堜笉闄愬埗浜у搧鐗╂枡鍏宠仈锛�
+        if (itemId == null && workOrderId == null && taskId == null && qcType != null) {
+            List<MesQcTemplateItemOptionRespVO> options = templateService.getEnabledTemplateListByType(qcType)
+                    .stream().map(template -> new MesQcTemplateItemOptionRespVO()
+                            .setTemplateId(template.getId()).setTemplateCode(template.getCode())
+                            .setTemplateName(template.getName()))
+                    .collect(Collectors.toList());
+            return success(options);
+        }
         List<MesQcTemplateItemDO> list = templateItemService.getTemplateItemList(
                 itemId, qcType, workOrderId, taskId);
         if (CollUtil.isEmpty(list)) {

--
Gitblit v1.9.3