liyong
9 天以前 88e384da863bb2f7324cb1e1474885df3b7cce91
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
package cn.iocoder.yudao.module.mes.service.qc.iqc;
 
import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.module.mes.controller.admin.qc.iqc.vo.line.MesQcIqcLinePageReqVO;
import cn.iocoder.yudao.module.mes.dal.dataobject.qc.iqc.MesQcIqcLineDO;
 
import cn.iocoder.yudao.module.mes.dal.dataobject.qc.defectrecord.MesQcDefectRecordDO;
 
import java.util.List;
 
/**
 * MES 来料检验单行 Service 接口
 *
 * @author 芋道源码
 */
public interface MesQcIqcLineService {
 
    /**
     * 校验来料检验行存在
     *
     * @param id 编号
     * @return 来料检验行
     */
    MesQcIqcLineDO validateIqcLineExists(Long id);
 
    /**
     * 获得来料检验行
     *
     * @param id 编号
     * @return 来料检验行
     */
    MesQcIqcLineDO getIqcLine(Long id);
 
    /**
     * 获得来料检验行分页
     *
     * @param pageReqVO 分页查询
     * @return 来料检验行分页
     */
    PageResult<MesQcIqcLineDO> getIqcLinePage(MesQcIqcLinePageReqVO pageReqVO);
 
    /**
     * 从模板指标自动生成检验行
     *
     * @param iqcId 来料检验单 ID
     * @param templateId 模板 ID
     */
    void createLinesFromTemplate(Long iqcId, Long templateId);
 
    /**
     * 根据缺陷记录重新计算各行的缺陷统计数量
     *
     * @param iqcId   来料检验单 ID
     * @param records 缺陷记录列表
     */
    void recalculateLineDefectStats(Long iqcId, List<MesQcDefectRecordDO> records);
 
    /**
     * 根据来料检验单 ID 获取所有行
     *
     * @param iqcId 来料检验单 ID
     * @return 行列表
     */
    List<MesQcIqcLineDO> getIqcLineListByIqcId(Long iqcId);
 
    /**
     * 根据来料检验单 ID 级联删除所有行
     *
     * @param iqcId 来料检验单 ID
     */
    void deleteListByIqcId(Long iqcId);
 
    /**
     * 统计使用指定计量单位的来料检验行数量
     *
     * @param unitMeasureId 计量单位编号
     * @return 引用数量
     */
    Long getIqcLineCountByUnitMeasureId(Long unitMeasureId);
 
}