ludc
2025-01-16 986aa62ed00bee39363bab41b4eeb8259d446efd
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
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
package com.vci.web.service;
 
import com.vci.corba.common.PLException;
import com.vci.corba.omd.btm.BizType;
import com.vci.dto.OsBtmTypeDTO;
import com.vci.model.IndexObject;
import com.vci.pagemodel.*;
import com.vci.starter.web.pagemodel.BaseResult;
import com.vci.starter.web.pagemodel.DataGrid;
import com.vci.starter.web.pagemodel.PageHelper;
import com.vci.starter.web.pagemodel.Tree;
import org.springframework.web.multipart.MultipartFile;
 
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.text.ParseException;
import java.util.Collection;
import java.util.List;
import java.util.Map;
 
/**
 * 业务类型服务
 * @author weidy
 * @date 2021-2-15
 */
public interface OsBtmServiceI extends OsBaseServiceI{
 
    /**
     * 修改业务类型中对应属性名的属性
     * @param apName
     * @return
     * @throws PLException
     */
    boolean alterAp(String apName) throws PLException;
 
    /**
     * 判断该属性是否已经在业务类型中产生了数据
     * @param abName
     * @return
     * @throws PLException
     */
    boolean hasInstance(String abName) throws PLException;
 
    /**
     * 查询所有的业务类型
     * @return 业务类型对象
     */
    List<OsBtmTypeVO> selectAllBtm();
    /**
     * 查询所有的业务类型
     * @return 业务类型对象
     */
    List<OsBtmTypeVO> selectAllBtm(Map<String, OsAttributeVO> attributeVOMap);
 
    /**
     * 获取名字以filter开始的业务类型(for 查询),主要用于属性池的业务类型选择对话框
     * 获取全部业务类型,传参filter为""
     * @param btmName
     * @return
     * @throws PLException
     */
    BizType[] getBizTypes(String btmName) throws PLException;
 
    /**
     * 业务类型列表查询,非树结构:用于UI定义左侧业务类型查询,只返回name和lable
     * @param btmName
     * @return
     * @throws PLException
     */
    Tree getBizTree(String btmName) throws PLException;
 
    /**
     * 查询所有的业务类型映射
     * @return key 是业务的英文名称的小写
     */
    Map<String,OsBtmTypeVO> selectAllBtmMap();
 
    /**
     * 查询所有的业务类型映射
     * @return key 是业务的英文名称的小写
     */
    Map<String,OsBtmTypeVO> selectAllBtmMap(Map<String, OsAttributeVO> attributeVOMap);
 
    /**
     * 数据对象转换为显示对象
     * @param btmItems 数据对象
     * @return 显示对象
     */
    List<OsBtmTypeVO> btmDO2VOs(Collection<BizType> btmItems,Map<String, OsAttributeVO> attributeVOMap);
 
    /**
     * 数据对象转换为显示对象
     * @param btmItem 数据对象
     * @return 显示对象
     */
    OsBtmTypeVO btmDO2VO(BizType btmItem, Map<String, OsAttributeVO> attributeVOMap);
 
    /**
     * 使用编号获取业务类型
     * @param btmIds 编号
     * @return 业务类型
     */
    List<OsBtmTypeVO> listBtmByIds(Collection<String> btmIds);
 
    /**
     * TODO:尽量别用这个方法很慢,做了一次全查再转来转去
     * 使用编号获取业务类型
     * @param id 编号
     * @return 业务类型
     */
    OsBtmTypeVO getBtmById(String id) throws PLException;
 
    /**
     * 使用类型名获取业务类型,查不到直接报错
     * @param btmName 类型名
     * @return 业务类型
     * @throws
     */
    OsBtmTypeVO getBtmByName(String btmName) throws PLException;
 
    /**
     * 使用编号获取业务类型
     * @param id 编号
     * @return 业务类型
     */
    OsBtmTypeVO getBtmById(String id, Map<String, OsAttributeVO> attributeVOMap);
 
    /**
     * 获取业务类型的在哪个属性中使用
     * @param btmName 业务类型
     * @return 引用的信息
     */
    List<OsUsedAttributeVO> listBtmUsedInfo(String btmName);
 
    /**
     * 获取业务类型的在哪个属性中使用
     *
     * @param btmId 业务类型
     * @param hasLink 是否包含链接类型中
     * @return 引用的信息
     */
    List<OsUsedAttributeVO> listBtmUsedInfo(String btmId, boolean hasLink);
 
    /**
     * 根据业务类型获取包含的属性--不包含基础属性
     * @param btmId 业务类型的编号
     * @return 属性的内容
     */
    List<OsBtmTypeAttributeVO> listAttributeByBtmId(String btmId) throws PLException;
 
    /**
     * 根据业务类型获取包含的属性--包含基础属性
     * @param btmId 业务类型的编号
     * @return 属性的内容
     */
    List<OsBtmTypeAttributeVO> listAttributeByBtmIdHasDefault(String btmId) throws PLException;
 
    /**
     * 参照业务类型
     *
     * @param conditionMap 查询条件
     * @param pageHelper   分页的对象
     * @return 业务类型的信息
     */
    DataGrid<OsBtmTypeVO> referDataGrid(Map<String, String> conditionMap, PageHelper pageHelper);
 
    /**
     * 使用主键查询
     * @param oid 主键
     * @return 业务类型
     */
    OsBtmTypeVO selectByOid(String oid);
 
    /**
     * 使用编号获取枚举的名称
     * @param id 枚举的英文
     * @return 枚举的名称
     */
    String getNameById(String id) throws PLException;
 
    /**
     * 根据业务类型和链接类型生成ER图
     * @param btmId 业务类型主键
     */
    OsERVO createERDiagram(String btmId) throws PLException;
 
     /**
     * 获取使用这个业务类型的E-R图
     * @param btmId 业务类型编号
     * @return 执行结果
     */
    OsERVO createERUsed(String btmId) throws PLException;
 
    /**
     * 获取所有业务类型(树形结构)
     * @return 查询结果
     */
    List<Tree> getTreeBizTypes() throws PLException;
 
    /**
     * 获取所有业务类型名称集合
     * @return
     */
    List<String> getAllBtmName() throws PLException;
 
    /**
     * 获取业务全部属性类型
     * @param btmName 业务类型名称
     * @return 属性的信息
     */
    List<OsBtmTypeAttributeVO> getBizTypeQTDs(String btmName) throws PLException, ParseException;
 
    /**
     * 创建新的业务类型
     * @return
     * @throws PLException
     */
    boolean addBtmType(OsBtmTypeDTO btmTypeDTO) throws PLException;
 
    /**
     * 批量新增业务类型
     * @param bizTypes
     * @return
     */
    //boolean addBtmTypes(List<BizType> bizTypes);
 
    /**
     * 修改业务类型
     * @param btmTypeDTO
     * @return
     * @throws PLException
     */
    boolean updateBtmType(OsBtmTypeDTO btmTypeDTO) throws PLException;
 
    /**
     * 删除业务类型
     * @param btmTypeDTO
     * @return
     * @throws PLException
     */
    boolean deleteBtmType(OsBtmTypeDTO btmTypeDTO) throws PLException;
 
    /**
     * 一致性检查
     * @return
     * @throws PLException
     */
    BaseResult checkBtmConsistency() throws PLException;
 
    /**
     * 一致性检查修复功能
     * @param repairData
     * @return
     */
    BaseResult executeRepair(String repairData) throws Exception;
 
    /**
     * 创建视图
     * @return
     * @throws PLException
     */
    boolean createView() throws PLException;
 
    /**
     * 删除数据界面的查询
     * @return 业务类型,链接类型
     */
    BaseResult getObjectData() throws PLException;
 
    /**
     * 删除数据
     * @param btmNames 业务类型名
     * @param linkNames 链接类型名
     * @return
     * @throws PLException
     */
    List<Map> truncateTable(String[] btmNames,String[] linkNames) throws PLException;
 
    /**
     * 删除全部类型
     * @return
     * @throws PLException
     */
    BaseResult deleteAllType() throws PLException;
 
    /**
     * 根据业务类型名称和索引名称查询获取已有的索引
     * @param conditionMap 根据查询条件传参: typename:业务类型名;indexname:索引名
     * @return
     */
    List<IndexObject> getIndexByCondition(Map<String,String> conditionMap) throws PLException;
 
    /**
     * 根据业务类型名称和其下的属性名称删除索引
     * @param btmName
     * @param indexName
     * @return
     */
    boolean delIndex(String btmName,String indexName) throws PLException;
 
    /**
     * 给业务类型下的指定属性新增索引
     * @param indexObjectList
     * @return
     */
    boolean addIndex(List<IndexObject> indexObjectList) throws PLException;
 
    /**
     * 导出业务类型
     * oid 业务类型名称
     * @return
     */
    void expData(String oid, HttpServletResponse response) throws PLException, IOException;
 
    /**
     * 导入业务类型
     * @param file 上传的文件
     * @return
     */
    BaseResult impData(MultipartFile file) throws Exception;
 
}