ludc
2023-03-27 82a410d9ec7a5d15eed27e9990cff371feab43a1
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
package org.springblade.code.service;
 
 
import com.vci.mdm.dto.CodeClassifyTemplateDTO;
import com.vci.mdm.model.CodeClassifyTemplateDO;
import com.vci.mdm.pagemodel.CodeClassifyTemplateVO;
import com.vci.starter.web.exception.VciBaseException;
import com.vci.starter.web.pagemodel.*;
 
import java.util.Collection;
import java.util.List;
import java.util.Map;
 
/**
 * 分类模板对象服务接口
 *
 * @author weidy
 * @date 2022-01-24
 */
public interface CodeClassifyTemplateServiceI {
    /**
     * 查询分类模板对象 树
     * @param treeQueryObject 树查询对象
     * @return 分类模板对象 显示树
     * @throws VciBaseException 查询条件不符合要求的时候会抛出异常
     */
    List<Tree> treeCodeClassifyTemplate(TreeQueryObject treeQueryObject) throws VciBaseException;
    /**
      * 根据树形查询对象来查询数据对象
      *
      * @param treeQueryObject 树形查询对象
      * @return 查询结果,数据对象
      */
    List<CodeClassifyTemplateDO> selectCodeClassifyTemplateDOByTree(TreeQueryObject treeQueryObject);
 
    /**
     * 批量数据对象转换为显示对象
     * @param codeClassifyTemplateDOs 数据对象列表
     * @return 显示对象
     * @throws VciBaseException 参数为空或者不存在的时候会抛出异常
     */
    List<CodeClassifyTemplateVO> codeClassifyTemplateDO2VOs(Collection<CodeClassifyTemplateDO>  codeClassifyTemplateDOs) throws VciBaseException;
 
    /**
     * 批量数据对象转换为显示对象
     * @param codeClassifyTemplateDOs 数据对象列表
     * @param hasAttr 是否包含属性
     * @return 显示对象
     * @throws VciBaseException 参数为空或者不存在的时候会抛出异常
     */
    List<CodeClassifyTemplateVO> codeClassifyTemplateDO2VOs(Collection<CodeClassifyTemplateDO> codeClassifyTemplateDOs, boolean hasAttr) throws VciBaseException;
 
    /**
     * 数据对象转换为显示对象
     * @param  codeClassifyTemplateDO 数据对象
     * @return 显示对象
     * @throws VciBaseException 拷贝属性出错的时候会抛出异常
     */
    CodeClassifyTemplateVO codeClassifyTemplateDO2VO(CodeClassifyTemplateDO codeClassifyTemplateDO) throws VciBaseException;
 
    /**
     * 增加分类模板对象
     * @param codeClassifyTemplateDTO 分类模板对象数据传输对象
     * @return 执行结果
     * @throws VciBaseException 参数为空,唯一项,必输项不通过时会抛出异常
     */
    BaseResult<CodeClassifyTemplateVO> addSave(CodeClassifyTemplateDTO codeClassifyTemplateDTO) throws VciBaseException;
 
    /**
     * 修改分类模板对象
     * @param codeClassifyTemplateDTO 分类模板对象数据传输对象
     * @return 执行结果
     * @throws VciBaseException 参数为空,唯一项,必输项不通过时会抛出异常
     */
    BaseResult editSave(CodeClassifyTemplateDTO codeClassifyTemplateDTO) throws VciBaseException;
 
    /**
     * 检查 分类模板对象是否删除
     * @param codeClassifyTemplateDTO 分类模板对象数据传输对象,必须要有oid和ts属性
     * @return 执行结果 success为true为可以删除,false表示有数据引用,obj为true表示有下级
     * @throws VciBaseException 参数为空,被引用时抛出异常
     */
    BaseResult checkIsCanDelete(CodeClassifyTemplateDTO codeClassifyTemplateDTO) throws VciBaseException;
 
    /**
     * 检查是否有下级是否关联了数据
     *
     * @param oid 主键
     * @return true 表示有引用,false表示没有引用
     * @throws VciBaseException 参数为空和有引用的时候会抛出异常
     */
     boolean checkChildIsLinked(String oid) throws VciBaseException;
 
    /**
      * 校验是否有下级节点,不校验是否关联了数据
      *
      * @param oid 主键
      * @return true表示有下级,false表示没有下级
      * @throws VciBaseException 参数错误,或者数据不存在的时候会抛出异常
      */
    boolean checkHasChild(String oid) throws VciBaseException;
 
    /**
     * 删除分类模板对象
     * @param codeClassifyTemplateDTO 分类模板对象数据传输对象,oid和ts需要传输
     * @return 删除结果反馈::success:成功,fail:失败
     * @throws VciBaseException 参数为空,被引用时抛出异常
     */
    BaseResult deleteCodeClassifyTemplate(CodeClassifyTemplateDTO codeClassifyTemplateDTO) throws VciBaseException;
 
    /**
    * 主键获取分类模板对象
    * @param oid 主键
    * @return 分类模板对象显示对象
    * @throws VciBaseException 参数为空,数据不存在时会抛出异常
    */
    CodeClassifyTemplateVO getObjectByOid(String oid) throws VciBaseException;
 
    /**
     * 主键获取分类模板对象(包含属性)
     * @param oid 主键
     * @return 分类模板对象显示对象
     * @throws VciBaseException 参数为空,数据不存在时会抛出异常
     */
    CodeClassifyTemplateVO getObjectHasAttrByOid(String oid) throws VciBaseException;
 
    /**
     * 主键批量获取分类模板对象
     * @param oidCollections 主键集合,但是受性能影响,建议一次查询不超过10000个
     * @return 分类模板对象显示对象
     * @throws VciBaseException 查询出现异常时会抛出
     */
    Collection<CodeClassifyTemplateVO> listCodeClassifyTemplateByOids(Collection<String> oidCollections) throws VciBaseException;
 
 
 
    /**
     * 参照树 分类模板对象
     * @param treeQueryObject 树形查询对象
     * @return 分类模板对象显示树
     * @throws VciBaseException 查询条件和分页出错的时候会抛出异常
     */
     List<Tree> referTree(TreeQueryObject treeQueryObject)  throws VciBaseException;
 
    /**
     * 分类模板列表
     * @param conditionMap 查询条件
     * @param pageHelper 分页对象
     * @return 显示对象
     * @throws VciBaseException 查询出错的时候会抛出异常
     */
    DataGrid<CodeClassifyTemplateVO> gridCodeClassifyTemplate(Map<String, String> conditionMap, PageHelper pageHelper) throws VciBaseException;
 
    /**
     * 启用、停用
     * @param oid
     * @param lcStatus
     * @return
     */
    BaseResult updateLcStatus( String oid, String lcStatus);
 
    /**
     * 升版
     */
    BaseResult Upgrade(CodeClassifyTemplateDTO codeClassifyDTO);
 
    /**
     * 模板克隆
     */
    BaseResult copyTemplate(CodeClassifyTemplateDTO codeClassifyDTO);
 
    /**
     * 使用主题库的分类主键,获取生效的模板
     * @param codeClassifyOid 主题库分类主键
     * @param hasAttribute 是否包含属性
     * @return 模板的信息
     */
    List<CodeClassifyTemplateVO> listReleaseTemplateByClassifyOid(String codeClassifyOid,boolean hasAttribute);
 
    /**
     * 用模板的版本来排序
     * @param templateVOList 模板的显示对象
     * @return 排序后的列表
     */
    List<CodeClassifyTemplateVO> sortTemplateByRevision(List<CodeClassifyTemplateVO> templateVOList);
 
    /**
     * 校验子分类是否相同的模板
     * @param codeClassifyOid 父分类的主键
     * @return true表示相同
     */
    boolean checkChildHasSameTemplate(String codeClassifyOid);
    /**
     * 获取所有子分类模板
     * @param codeClassifyOid 父分类的主键
     * @return true表示相同
     */
    List<CodeClassifyTemplateVO> childTemplates(String codeClassifyOid);
}