liu
2026-09-04 c6eb0d852595f235b21520dab1d8600ed1b80776
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/service/qc/template/MesQcTemplateItemService.java
@@ -7,10 +7,12 @@
import cn.iocoder.yudao.module.mes.enums.qc.MesQcTypeEnum;
import jakarta.validation.Valid;
import java.util.List;
/**
 * MES 质检方案-产品关联 Service 接口
 *
 * @author 芋道源码
 * @author 超级管理员
 */
public interface MesQcTemplateItemService {
@@ -68,4 +70,15 @@
     */
    MesQcTemplateItemDO getRequiredTemplateByItemIdAndType(Long itemId, Integer qcType);
    /**
     * 根据产品物料(或工单/任务)和 QC 类型,获取所有可用的质检方案产品关联列表
     *
     * @param itemId      产品物料 ID(mes_md_item.id);与 workOrderId/taskId 至少其一
     * @param qcType      检测种类(枚举 {@link MesQcTypeEnum})
     * @param workOrderId 生产工单 ID(可选,IPQC 场景用于解析产品物料)
     * @param taskId      生产任务 ID(可选,优先用于解析产品物料)
     * @return 匹配的产品关联列表(保持原顺序),无匹配返回空列表
     */
    List<MesQcTemplateItemDO> getTemplateItemList(Long itemId, Integer qcType, Long workOrderId, Long taskId);
}