lihang
2023-05-04 3579af2945dd38d841a23cd340acd474bb63773a
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
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
package com.vci.ubcs.omd.service;
 
import com.vci.ubcs.omd.dto.BtmTypeDTO;
import com.vci.ubcs.omd.dto.BtmTypeLinkAttributesDTO;
import com.vci.ubcs.omd.entity.BtmType;
import com.vci.ubcs.omd.entity.BtmTypeAttribute;
import com.vci.ubcs.omd.entity.ModifyAttributeInfo;
import com.vci.ubcs.omd.vo.BtmTypeVO;
import com.vci.ubcs.omd.vo.BtmTypeAttributeVO;
import com.vci.ubcs.omd.vo.LinkTypeVO;
import org.springblade.core.log.exception.ServiceException;
import org.springblade.core.mp.base.BaseService;
import org.springblade.core.tool.api.R;
 
import java.util.Collection;
import java.util.Date;
import java.util.List;
import java.util.Map;
 
/**
 * 业务类型服务接口
 * @author weidy
 * @date 2019/10/13 2:33 PM
 */
public interface IBtmTypeService extends BaseService<BtmType> {
 
    /**
     * 设置平台本身的业务类型
     * @param platformBtmType 平台本身的业务类型
     */
    void setPlatformBtmType(Collection<String> platformBtmType);
 
    /**
     * 根据主键获取业务类型
     * @param pkBtmType 业务类型主键
     * @return 业务类型,如果不存在会返回null
     * @throws ServiceException 参数为空或者查询出错时会抛出错误
     */
    BtmTypeVO getBtmTypeByOid(String pkBtmType) throws ServiceException;
 
    /**
     * 根据主键批量获取业务类型
     * @param pkBtmTypes 业务类型主键,用逗号分隔
     * @return 业务类型列表,如果有不存在的不会返回,全部不存在的则返回空列表
     * @throws ServiceException 参数为空或者查询出错时会抛出错误
     */
    List<BtmTypeVO> listBtmTypeByOids(String pkBtmTypes) throws ServiceException;
 
    /**
     * 批量根据主键获取业务类型
     * @param pkBtmTypeCollection 业务类型主键集合
     * @return 业务类型列表,如果有不存在的不会返回,全部不存在的则返回空列表
     * @throws ServiceException 参数为空或者查询出错时会抛出错误
     */
    List<BtmTypeVO> listBtmTypeByOidCollection(Collection<String> pkBtmTypeCollection) throws ServiceException;
 
    /**
     * 根据英文名称获取业务类型
     * @param id 英文名称
     * @return 业务类型,如果不存在会返回null
     * @throws ServiceException 参数为空或者查询出错时会抛出错误
     */
    BtmTypeVO getBtmTypeById(String id) throws ServiceException;
 
    /**
     * 根据英文名称批量获取业务类型
     * @param ids 英文名称,使用逗号分隔
     * @return  业务类型列表,如果有不存在的不会返回,全部不存在的则返回空列表
     * @throws ServiceException 参数为空或者查询出错时会抛出错误
     */
    List<BtmTypeVO> listBtmTypeByIds(String ids) throws ServiceException;
 
    /**
     * 根据英文名称集合批量获取业务类型
     * @param idCollection 英文名称集合
     * @return 业务类型列表,如果有不存在的不会返回,全部不存在的则返回空列表
     * @throws ServiceException 参数为空或者查询出错时会抛出错误
     */
    List<BtmTypeVO> listBtmTypeByIdCollection(Collection<String> idCollection) throws ServiceException;
 
    /**
     * 根据英文名称集合批量获取业务类型的数据对象
     * @param idCollection 英文名称集合
     * @return 业务类型列表,如果有不存在的不会返回,全部不存在的则返回空列表
     * @throws ServiceException  参数为空或者查询出错时会抛出错误
     */
    List<BtmType> listBtmTypeDOByIdCollection(Collection<String> idCollection) throws ServiceException;
 
    /**
     * 根据主键集合批量获取业务类型的数据对象
     * @param oidCollection 主键
     * @return 业务类型列表,如果有不存在的不会返回,全部不存在的则返回空列表
     * @throws ServiceException  参数为空或者查询出错时会抛出错误
     */
    List<BtmType> listBtmTypeDOByOidCollection(Collection<String> oidCollection) throws ServiceException;
 
    /**
     * 根据业务类型主键获取中文名称
     * @param oid 业务类型主键,多个使用逗号分隔
     * @return 中文名称,如果不存在会返回null;多个会以逗号分隔
     * @throws ServiceException 参数为空或者查询出错时会抛出错误
     */
    String getNameByOid(String oid) throws ServiceException;
 
    /**
     * 根据业务类型英文名称获取中文名称
     * @param id 业务类型英文名称
     * @return 中文名称,如果不存在会返回null;多个会以逗号分隔
     * @throws ServiceException 参数为空或者查询出错时会抛出错误
     */
    String getNameById(String id) throws ServiceException;
 
    /**
     * 根据业务类型主键获取关联的所有属性对象
     * @param oid 业务类型主键
     * @return 所有的属性对象,包括系统属性
     * @throws ServiceException 业务类型不存在,参数为空或查询出错时会抛出错误
     */
    List<BtmTypeAttributeVO> listHasAttributesByOid(String oid) throws ServiceException;
 
    /**
     * 根据业务类型英文名称获取关联的所有属性对象
     * @param id 业务类型英文名称
     * @return 所有的属性对象,包括系统内置属性
     * @throws ServiceException 业务类型不存在,参数为空或者查询出错时会抛出异常
     */
    List<BtmTypeAttributeVO> listHasAttributeById(String id) throws ServiceException;
 
    /**
     * 根据业务类型主键获取关联的所有属性对象
     *
     * @param oidCollection 业务类型主键集合
     * @return 所有的属性对象,包括系统内置属性,key是业务类型主键,value是包含的属性
     * @throws ServiceException 业务类型不存在,参数为空或者查询出错时会抛出异常
     */
    Map<String,List<BtmTypeAttributeVO>> batchListHasAttributesByOidCollection(Collection<String> oidCollection) throws ServiceException;
 
    /**
     * 根据业务类型英文名称获取关联的所有属性对象
     *
     * @param idCollection 业务类型英文名称集合
     * @return 所有的属性对象,包括系统内置属性,key是业务类型主键,value是包含的属性
     * @throws ServiceException 业务类型不存在,参数为空或者查询出错时会抛出异常
     */
    Map<String,List<BtmTypeAttributeVO>> batchListHasAttributesByIdCollection(Collection<String> idCollection) throws ServiceException;
 
 
    /**
     * 获取使用业务类型的链接类型
     * @param pkBtmType 业务类型主键
     * @return 引用的链接类型
     * @throws ServiceException 参数为空或者查询出错时会抛出异常
     */
    List<LinkTypeVO> listLinkTypeForUsedBtmType(String pkBtmType) throws ServiceException;
 
    /**
     * 校验业务类型是否被引用
     * @param pkBtmType 业务类型的主键
     * @return true表示被引用, false表示没有被引用
     * @throws ServiceException 参数为空或者查询出错时会抛出错误
     */
    boolean checkBtmTypeUsed(String pkBtmType) throws ServiceException;
 
    /**
     * 校验业务类型是否被引用
     *
     * @param oidCollection 业务类型的主键集合
     * @return true表示被引用, false表示没有被引用
     * @throws ServiceException 参数为空或者查询出错时会抛出错误
     */
    boolean checkBtmTypeUseds(Collection<String> oidCollection) throws ServiceException;
 
    /**
     * 删除业务类型
     * @param btmTypeVO 业务类型显示对象
     * @param autoDeleteTable 自动删除表格
     * @throws ServiceException 如果业务类型被引用,或者删除出错时会抛出异常
     */
    void delete(BtmTypeVO btmTypeVO, boolean autoDeleteTable) throws ServiceException;
 
    /**
     * 批量删除业务类型
     * @param btmTypeVOList 要删除的业务类型显示对象列表
     * @param autoDeleteTable 自动删除表格
     * @throws ServiceException 如果业务类型被引用,或者删除出错时会抛出异常
     */
    void batchDelete(List<BtmTypeVO> btmTypeVOList, boolean autoDeleteTable) throws ServiceException;
 
    /**
     * 检查业务类型与数据库表是否一致
     * @param pkBtmType 业务类型主键
     * @return 不同的属性信息
     * @throws ServiceException 参数为空或者查询出错时会抛出异常
     */
    List<ModifyAttributeInfo> checkDbTableSame(String pkBtmType) throws ServiceException;
 
    /**
     * 获取数据库表,支持业务类型和视图
     * @param id 业务类型的名称
     * @param domain 领域名称
     * @return 数据库表的名称
     * @throws ServiceException 参数为空的时候会抛出异常
     */
    String getTableName(String id,String domain) throws ServiceException;
 
    /**
     * 新增或修改业务类型
     * @param btmTypeDTO 业务类型页面传输对象
     * @param autoCreateTable 自动创建表
     * @return 执行结果
     */
    R submit(BtmTypeDTO btmTypeDTO,boolean autoCreateTable);
}