liyong
6 天以前 274dd8b724dd4485658e1d2a3f825a007f625bd7
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
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.line.MesQcOqcLinePageReqVO;
import cn.iocoder.yudao.module.mes.dal.dataobject.qc.defectrecord.MesQcDefectRecordDO;
import cn.iocoder.yudao.module.mes.dal.dataobject.qc.oqc.MesQcOqcLineDO;
 
import java.util.List;
 
/**
 * MES 出货检验单行 Service 接口
 *
 * @author 芋道源码
 */
public interface MesQcOqcLineService {
 
    /**
     * 获得出货检验行
     *
     * @param id 编号
     * @return 出货检验行
     */
    MesQcOqcLineDO getOqcLine(Long id);
 
    /**
     * 获得出货检验行分页
     *
     * @param pageReqVO 分页查询
     * @return 出货检验行分页
     */
    PageResult<MesQcOqcLineDO> getOqcLinePage(MesQcOqcLinePageReqVO pageReqVO);
 
    /**
     * 根据出货检验单 ID 查询所有行
     *
     * @param oqcId 出货检验单 ID
     * @return 行列表
     */
    List<MesQcOqcLineDO> getOqcLineListByOqcId(Long oqcId);
 
    /**
     * 从模板指标自动生成检验行
     *
     * @param oqcId      出货检验单 ID
     * @param templateId 模板 ID
     */
    void createLinesFromTemplate(Long oqcId, Long templateId);
 
    /**
     * 根据出货检验单 ID 级联删除所有行
     *
     * @param oqcId 出货检验单 ID
     */
    void deleteByOqcId(Long oqcId);
 
    /**
     * 校验出货检验行存在
     *
     * @param id 编号
     * @return 出货检验行
     */
    MesQcOqcLineDO validateOqcLineExists(Long id);
 
    /**
     * 根据缺陷记录重新计算行级缺陷统计
     *
     * @param oqcId   出货检验单 ID
     * @param records 缺陷记录列表
     */
    void recalculateLineDefectStats(Long oqcId, List<MesQcDefectRecordDO> records);
 
    /**
     * 统计使用指定计量单位的出货检验行数量
     *
     * @param unitMeasureId 计量单位编号
     * @return 引用数量
     */
    Long getOqcLineCountByUnitMeasureId(Long unitMeasureId);
 
}