云
17 小时以前 ac2e2b5af3726ee64dc37c3ebf26989a0346f22a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
package cn.iocoder.yudao.module.mes.service.pro.route;
 
import cn.iocoder.yudao.module.mes.controller.admin.pro.route.vo.process.MesProRouteProcessSaveReqVO;
import cn.iocoder.yudao.module.mes.dal.dataobject.pro.route.MesProRouteProcessDO;
import jakarta.validation.Valid;
 
import java.util.Collection;
import java.util.List;
 
/**
 * MES 工艺路线工序 Service 接口
 *
 * @author 超级管理员
 */
public interface MesProRouteProcessService {
 
    /**
     * 创建工艺路线工序
     */
    Long createRouteProcess(@Valid MesProRouteProcessSaveReqVO createReqVO);
 
    /**
     * 更新工艺路线工序
     */
    void updateRouteProcess(@Valid MesProRouteProcessSaveReqVO updateReqVO);
 
    /**
     * 删除工艺路线工序
     */
    void deleteRouteProcess(Long id);
 
    /**
     * 获得工艺路线工序
     */
    MesProRouteProcessDO getRouteProcess(Long id);
 
    /**
     * 按工艺路线获得工序列表
     */
    List<MesProRouteProcessDO> getRouteProcessListByRouteId(Long routeId);
 
    /**
     * 按多个工艺路线获得工序列表
     *
     * @param routeIds 工艺路线编号数组
     * @return 工序列表
     */
    List<MesProRouteProcessDO> getRouteProcessListByRouteIds(Collection<Long> routeIds);
 
    /**
     * 按工艺路线和工序获得工艺路线工序
     *
     * @param routeId   工艺路线编号
     * @param processId 工序编号
     * @return 工艺路线工序
     */
    MesProRouteProcessDO getRouteProcessByRouteIdAndProcessId(Long routeId, Long processId);
 
    /**
     * 按产品获得工序列表
     *
     * 根据产品查找关联的工艺路线,返回该路线的工序列表
     *
     * @param productId 产品编号
     * @return 工序列表
     */
    List<MesProRouteProcessDO> getRouteProcessListByProductId(Long productId);
 
    /**
     * 获得工序在指定产品下的产出物料编号
     *
     * 按产出归属过滤:归属为空(多产品通用)或归属等于指定产品的产出。
     * 无归属数据时返回 {@code null},调用方需自行回退;有归属数据但该产品无产出时返回空列表。
     *
     * @param routeProcessId 工艺路线工序编号
     * @param productId      产品编号
     * @return 产出物料编号列表(按排序),无归属数据时为 null
     */
    List<Long> getOutputItemIdsByRouteProcessId(Long routeProcessId, Long productId);
 
    /**
     * 获得工序在指定产品下的产出配置(含配比、主产出标记)
     *
     * 结果按「主产出优先,其次 sort、id」排序,并按物料去重。
     *
     * @param routeProcessId 工艺路线工序编号
     * @param productId      产品编号
     * @return 产出配置列表,未配置时返回空列表
     */
    List<cn.iocoder.yudao.module.mes.dal.dataobject.pro.route.MesProRouteProcessOutputDO>
        getProcessOutputs(Long routeProcessId, Long productId);
 
    /**
     * 按工艺路线工序编号批量获得产出归属配置
     *
     * @param routeProcessIds 工艺路线工序编号数组
     * @return 产出归属列表
     */
    List<cn.iocoder.yudao.module.mes.dal.dataobject.pro.route.MesProRouteProcessOutputDO>
        getRouteProcessOutputListByRouteProcessIds(Collection<Long> routeProcessIds);
 
    /**
     * 按产品获得工序投料BOM Map
     *
     * key = 工序ID,value = 该工序下的投料BOM明细列表
     *
     * @param productId 产品编号
     * @return 工序 -> 投料BOM 映射,产品无工艺路线时返回空Map
     */
    java.util.Map<Long, java.util.List<cn.iocoder.yudao.module.mes.dal.dataobject.pro.route.MesProRouteProductBomDO>>
        getRouteProcessBomMapByProductId(Long productId);
 
    /**
     * 按工序获得工艺路线工序列表
     *
     * @param processId 工序编号
     * @return 工艺路线工序列表
     */
    List<MesProRouteProcessDO> getRouteProcessListByProcessId(Long processId);
 
    /**
     * 按工艺路线删除工序(级联删除使用)
     *
     * @param routeId 工艺路线编号
     */
    void deleteRouteProcessByRouteId(Long routeId);
 
}