liyong
5 天以前 536774eea8902efc088c5b904ff75bbe0af33418
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
package cn.iocoder.yudao.module.mes.service.qc.defect;
 
import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.module.mes.controller.admin.qc.defect.vo.MesQcDefectPageReqVO;
import cn.iocoder.yudao.module.mes.controller.admin.qc.defect.vo.MesQcDefectSaveReqVO;
import cn.iocoder.yudao.module.mes.dal.dataobject.qc.defect.MesQcDefectDO;
import jakarta.validation.Valid;
 
import java.util.Collection;
import java.util.List;
import java.util.Map;
 
import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertMap;
 
/**
 * MES 缺陷类型 Service 接口
 *
 * @author 芋道源码
 */
public interface MesQcDefectService {
 
    /**
     * 创建缺陷类型
     *
     * @param createReqVO 创建信息
     * @return 编号
     */
    Long createDefect(@Valid MesQcDefectSaveReqVO createReqVO);
 
    /**
     * 更新缺陷类型
     *
     * @param updateReqVO 更新信息
     */
    void updateDefect(@Valid MesQcDefectSaveReqVO updateReqVO);
 
    /**
     * 删除缺陷类型
     *
     * @param id 编号
     */
    void deleteDefect(Long id);
 
    /**
     * 获得缺陷类型
     *
     * @param id 编号
     * @return 缺陷类型
     */
    MesQcDefectDO getDefect(Long id);
 
    /**
     * 获得缺陷类型分页
     *
     * @param pageReqVO 分页查询
     * @return 缺陷类型分页
     */
    PageResult<MesQcDefectDO> getDefectPage(MesQcDefectPageReqVO pageReqVO);
 
    /**
     * 获得缺陷类型列表
     *
     * @return 缺陷类型列表
     */
    List<MesQcDefectDO> getDefectList();
 
    /**
     * 获得缺陷类型列表
     *
     * @param ids 编号数组
     * @return 缺陷类型列表
     */
    List<MesQcDefectDO> getDefectList(Collection<Long> ids);
 
    /**
     * 获得缺陷类型 Map
     *
     * @param ids 编号数组
     * @return 缺陷类型 Map
     */
    default Map<Long, MesQcDefectDO> getDefectMap(Collection<Long> ids) {
        return convertMap(getDefectList(ids), MesQcDefectDO::getId);
    }
 
}