liyong
4 天以前 be5783c8a7e13bbc76d33c95643d75779cce21db
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
package cn.iocoder.yudao.module.mes.service.qc.oqc;
 
import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.module.mes.controller.admin.qc.oqc.vo.MesQcOqcPageReqVO;
import cn.iocoder.yudao.module.mes.controller.admin.qc.oqc.vo.MesQcOqcSaveReqVO;
import cn.iocoder.yudao.module.mes.dal.dataobject.qc.defectrecord.MesQcDefectRecordDO;
import cn.iocoder.yudao.module.mes.dal.dataobject.qc.oqc.MesQcOqcDO;
import cn.iocoder.yudao.module.mes.dal.dataobject.wm.productsales.MesWmProductSalesLineDO;
import jakarta.validation.Valid;
 
import java.util.List;
 
/**
 * MES 出货检验单(OQC) Service 接口
 *
 * @author 芋道源码
 */
public interface MesQcOqcService {
 
    /**
     * 创建出货检验单
     *
     * @param createReqVO 创建信息
     * @return 编号
     */
    Long createOqc(@Valid MesQcOqcSaveReqVO createReqVO);
 
    /**
     * 更新出货检验单
     *
     * @param updateReqVO 更新信息
     */
    void updateOqc(@Valid MesQcOqcSaveReqVO updateReqVO);
 
    /**
     * 完成出货检验单
     *
     * @param id 编号
     */
    void finishOqc(Long id);
 
    /**
     * 删除出货检验单
     *
     * @param id 编号
     */
    void deleteOqc(Long id);
 
    /**
     * 校验出货检验单存在
     *
     * @param id 编号
     * @return 出货检验单
     */
    MesQcOqcDO validateOqcExists(Long id);
 
    /**
     * 获得出货检验单
     *
     * @param id 编号
     * @return 出货检验单
     */
    MesQcOqcDO getOqc(Long id);
 
    /**
     * 获得出货检验单分页
     *
     * @param pageReqVO 分页查询
     * @return 出货检验单分页
     */
    PageResult<MesQcOqcDO> getOqcPage(MesQcOqcPageReqVO pageReqVO);
 
    /**
     * 根据缺陷记录重新计算主表的缺陷统计(含行级下沉)
     *
     * @param oqcId   出货检验单 ID
     * @param records 缺陷记录列表
     */
    void recalculateDefectStats(Long oqcId, List<MesQcDefectRecordDO> records);
 
    /**
     * 根据销售出库单明细自动创建 OQC 检验单
     *
     * @param salesId       销售出库单 ID
     * @param line          销售出库单明细
     * @param salesCode     销售出库单编码
     * @param clientId      客户 ID
     * @return OQC 检验单 ID
     */
    Long createOqcFromProductSales(Long salesId, MesWmProductSalesLineDO line, String salesCode, Long clientId);
 
}