2026-07-09 d41fe2e95f3f64c6e3a7229acd9e74e673513a0a
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.ipqc;
 
import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.module.mes.controller.admin.qc.ipqc.vo.line.MesQcIpqcLinePageReqVO;
import cn.iocoder.yudao.module.mes.dal.dataobject.qc.defectrecord.MesQcDefectRecordDO;
import cn.iocoder.yudao.module.mes.dal.dataobject.qc.ipqc.MesQcIpqcLineDO;
 
import java.util.List;
 
/**
 * MES 过程检验单行 Service 接口
 *
 * @author 芋道源码
 */
public interface MesQcIpqcLineService {
 
    /**
     * 校验过程检验行存在
     *
     * @param id 编号
     * @return 过程检验行
     */
    MesQcIpqcLineDO validateIpqcLineExists(Long id);
 
    /**
     * 获得过程检验行
     *
     * @param id 编号
     * @return 过程检验行
     */
    MesQcIpqcLineDO getIpqcLine(Long id);
 
    /**
     * 获得过程检验行分页
     *
     * @param pageReqVO 分页查询
     * @return 过程检验行分页
     */
    PageResult<MesQcIpqcLineDO> getIpqcLinePage(MesQcIpqcLinePageReqVO pageReqVO);
 
    /**
     * 从模板指标自动生成检验行
     *
     * @param ipqcId 过程检验单 ID
     * @param templateId 模板 ID
     */
    void createLinesFromTemplate(Long ipqcId, Long templateId);
 
    /**
     * 根据缺陷记录重新计算行级缺陷统计
     *
     * @param ipqcId  过程检验单 ID
     * @param records 缺陷记录列表
     */
    void recalculateLineDefectStats(Long ipqcId, List<MesQcDefectRecordDO> records);
 
    /**
     * 根据过程检验单 ID 获取所有行
     *
     * @param ipqcId 过程检验单 ID
     * @return 行列表
     */
    List<MesQcIpqcLineDO> getIpqcLineListByIpqcId(Long ipqcId);
 
    /**
     * 根据过程检验单 ID 级联删除所有行
     *
     * @param ipqcId 过程检验单 ID
     */
    void deleteListByIpqcId(Long ipqcId);
 
    /**
     * 统计使用指定计量单位的过程检验行数量
     *
     * @param unitMeasureId 计量单位编号
     * @return 引用数量
     */
    Long getIpqcLineCountByUnitMeasureId(Long unitMeasureId);
 
}