2026-06-29 940c8481d2fdcf51341db4ccd6fd6fcc2d43debb
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
93
94
95
96
97
98
99
package cn.iocoder.yudao.module.mes.service.dv.subject;
 
import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.module.mes.controller.admin.dv.subject.vo.MesDvSubjectPageReqVO;
import cn.iocoder.yudao.module.mes.controller.admin.dv.subject.vo.MesDvSubjectSaveReqVO;
import cn.iocoder.yudao.module.mes.dal.dataobject.dv.subject.MesDvSubjectDO;
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 MesDvSubjectService {
 
    /**
     * 创建点检保养项目
     *
     * @param createReqVO 创建信息
     * @return 编号
     */
    Long createSubject(@Valid MesDvSubjectSaveReqVO createReqVO);
 
    /**
     * 更新点检保养项目
     *
     * @param updateReqVO 更新信息
     */
    void updateSubject(@Valid MesDvSubjectSaveReqVO updateReqVO);
 
    /**
     * 删除点检保养项目
     *
     * @param id 编号
     */
    void deleteSubject(Long id);
 
    /**
     * 获得点检保养项目
     *
     * @param id 编号
     * @return 点检保养项目
     */
    MesDvSubjectDO getSubject(Long id);
 
    /**
     * 获得点检保养项目分页
     *
     * @param pageReqVO 分页查询
     * @return 点检保养项目分页
     */
    PageResult<MesDvSubjectDO> getSubjectPage(MesDvSubjectPageReqVO pageReqVO);
 
    /**
     * 校验点检保养项目存在
     *
     * @param id 编号
     */
    void validateSubjectExists(Long id);
 
    /**
     * 校验点检保养项目存在且启用
     *
     * @param id 编号
     */
    void validateSubjectExistsAndEnable(Long id);
 
    /**
     * 获得点检保养项目列表
     *
     * @return 项目列表
     */
    List<MesDvSubjectDO> getSubjectList();
 
    /**
     * 获得点检保养项目列表
     *
     * @param ids 编号数组
     * @return 点检保养项目列表
     */
    List<MesDvSubjectDO> getSubjectList(Collection<Long> ids);
 
    /**
     * 获得点检保养项目 Map
     *
     * @param ids 编号数组
     * @return 点检保养项目 Map
     */
    default Map<Long, MesDvSubjectDO> getSubjectMap(Collection<Long> ids) {
        return convertMap(getSubjectList(ids), MesDvSubjectDO::getId);
    }
 
}