lihang
2023-05-23 1d91a31301494b9f0b7e17b3eef280f8d54e2806
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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
package com.vci.ubcs.omd.service;
 
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.vci.ubcs.omd.entity.Status;
import com.vci.ubcs.omd.vo.StatusVO;
import com.vci.ubcs.starter.exception.VciBaseException;
import com.vci.ubcs.starter.web.pagemodel.PageHelper;
 
import java.util.Collection;
import java.util.List;
import java.util.Map;
 
/**
 * Description: 状态池的服务
 *
 * @author LiHang
 * @date 2023/5/23
 */
public interface IStatusService extends IService<Status> {
 
    /**
     * 获取状态列表
     * @param conditionMap 查询条件
     * @param pageHelper 分页信息和排序信息,默认使用id排序
     * @return 状态对象列表
     * @throws VciBaseException 查询出错时会抛出异常
     */
    IPage<StatusVO> listStatus(Map<String,String> conditionMap, PageHelper pageHelper) throws VciBaseException;
 
    /**
     * 获取状态列表
     * @param conditionMap 查询条件
     * @return 状态对象列表
     * @throws VciBaseException 查询出错时会抛出异常
     */
    List<StatusVO> listStatusNoPage(Map<String,String> conditionMap) throws VciBaseException;
 
    /**
     * 根据主键获取状态
     * @param pkStatus 状态主键
     * @return 状态,如果不存在会返回null
     * @throws VciBaseException 参数为空或者查询出错时会抛出错误
     */
    StatusVO getStatusByOid(String pkStatus) throws VciBaseException;
 
    /**
     * 根据主键批量获取状态
     * @param primaryKeys 状态主键,用逗号分隔
     * @return 状态列表,如果有不存在的不会返回,全部不存在的则返回空列表
     * @throws VciBaseException 参数为空或者查询出错时会抛出错误
     */
    List<StatusVO> listStatusByOids(String primaryKeys) throws VciBaseException;
 
    /**
     * 批量根据主键获取状态
     * @param pkStatusCollection 状态主键集合
     * @return 状态列表,如果有不存在的不会返回,全部不存在的则返回空列表
     * @throws VciBaseException 参数为空或者查询出错时会抛出错误
     */
    List<StatusVO> listStatusByOidCollection(Collection<String> pkStatusCollection) throws VciBaseException;
 
    /**
     * 根据英文名称获取状态
     * @param id 英文名称
     * @return 状态,如果不存在会返回null
     * @throws VciBaseException 查询出错抛出异常
     */
    StatusVO getStatusById(String id) throws VciBaseException;
 
    /**
     * 根据英文名称批量获取状态
     * @param ids 英文名称,使用逗号分隔
     * @return  状态列表,如果有不存在的不会返回,全部不存在的则返回空列表
     * @throws VciBaseException 参数为空或者查询出错时会抛出错误
     */
    List<StatusVO> listStatusByIds(String ids) throws VciBaseException;
 
    /**
     * 根据英文名称集合批量获取状态
     * @param idCollection 英文名称集合
     * @return 状态列表,如果有不存在的不会返回,全部不存在的则返回空列表
     * @throws VciBaseException 参数为空或者查询出错时会抛出错误
     */
    List<StatusVO> listStatusByIdCollection(Collection<String> idCollection) throws VciBaseException;
 
    /**
     * 根据状态主键获取中文名称
     * @param oid 状态主键,多个使用逗号分隔
     * @return 中文名称,如果不存在会返回null
     * @throws VciBaseException 参数为空或者查询出错时会抛出错误
     */
    String getNameByOid(String oid) throws VciBaseException;
 
    /**
     * 根据状态英文名称获取中文名称
     * @param id 状态英文名称
     * @return 中文名称,如果不存在会返回null
     * @throws VciBaseException 参数为空或者查询出错时会抛出错误
     */
    String getNameById(String id) throws VciBaseException;
    /**
     * 添加状态
     * @param statusVO 状态显示对象(和DTO共用)
     * @return 添加后的状态
     * @throws VciBaseException 添加出错的时候会抛出异常
     */
    StatusVO addSave(StatusVO statusVO) throws VciBaseException;
 
    /**
     * 批量添加状态
     * @param statusVOList 状态显示对象列表(和DTO共用)
     * @return 批量添加后的状态
     * @throws VciBaseException 添加出错的时候会抛出异常
     */
    List<StatusVO> batchAddSave(List<StatusVO> statusVOList) throws VciBaseException;
 
 
    /**
     * 修改状态
     * @param statusVO 状态显示对象(和DTO共用)
     * @return 修改后的状态
     * @throws VciBaseException 修改出错的时候会抛出异常
     */
    StatusVO editSave(StatusVO statusVO) throws VciBaseException;
 
    /**
     * 批量修改状态
     * @param statusVOList 状态显示对象列表(和DTO共用)
     * @return 批量修改后的状态
     * @throws VciBaseException 修改出错的时候会抛出异常
     */
    List<StatusVO> batchEditSave(List<StatusVO> statusVOList) throws VciBaseException;
 
    /**
     * 删除状态
     * @param statusVO 状态显示对象
     * @throws VciBaseException 如果状态被引用,或者删除出错时会抛出异常
     */
    void delete(StatusVO statusVO) throws VciBaseException;
 
    /**
     * 批量删除状态
     * @param statusVOList 要删除的状态显示对象列表
     * @throws VciBaseException 如果状态被引用,或者删除出错时会抛出异常
     */
    void batchDelete(List<StatusVO> statusVOList) throws VciBaseException;
 
    /**
     * 批量校验状态是否被使用
     * @param oidCollection 主键集合
     * @return true表示被引用
     */
    boolean checkStatusUseds(Collection<String> oidCollection);
 
    /**
     * 校验状态是否被引用
     * @param pkStatus 状态的主键
     * @return true表示被引用, false表示没有被引用
     * @throws VciBaseException 参数为空或者查询出错时会抛出错误
     */
    boolean checkStatusUsed(String pkStatus) throws VciBaseException;
 
}