ludc
2023-05-05 4cd535de8ef099afa96238e5458e6866edccfea7
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
package com.vci.ubcs.code.service;
 
 
import com.baomidou.mybatisplus.extension.service.IService;
 
import com.vci.ubcs.code.dto.CodeClassifyValueDTO;
import com.vci.ubcs.code.entity.CodeClassifyValue;
import com.vci.ubcs.code.vo.pagemodel.CodeClassifyTemplateAttrVO;
import com.vci.ubcs.code.vo.pagemodel.CodeClassifyValueVO;
 
import com.vci.ubcs.starter.exception.VciBaseException;
import com.vci.ubcs.starter.revision.model.TreeQueryObject;
import com.vci.ubcs.starter.web.pagemodel.DataGrid;
import com.vci.ubcs.starter.web.pagemodel.PageHelper;
import com.vci.ubcs.starter.web.pagemodel.Tree;
import org.springblade.core.tool.api.R;
 
 
import java.util.Collection;
import java.util.List;
import java.util.Map;
 
/**
 * 分类码段的码值服务接口
 *
 * @author ludc
 * @date 2022-01-24
 */
public interface ICodeClassifyValueService extends IService<CodeClassifyValue> {
 
    /**
     * 查询分类码段的码值 树
     * @param treeQueryObject 树查询对象
     * @return 分类码段的码值 显示树
     * @throws VciBaseException 查询条件不符合要求的时候会抛出异常
     */
    List<Tree> treeCodeClassifyValue(TreeQueryObject treeQueryObject) throws VciBaseException;
 
    /**
     * 增加分类码段的码值
     * @param codeClassifyValueDTO 分类码段的码值数据传输对象
     * @return 执行结果
     * @throws VciBaseException 参数为空,唯一项,必输项不通过时会抛出异常
     */
    boolean addSave(CodeClassifyValueDTO codeClassifyValueDTO) throws VciBaseException;
 
    /**
     * 修改分类码段的码值
     * @param codeClassifyValueDTO 分类码段的码值数据传输对象
     * @return 执行结果
     * @throws VciBaseException 参数为空,唯一项,必输项不通过时会抛出异常
     */
    boolean editSave(CodeClassifyValueDTO codeClassifyValueDTO) throws VciBaseException;
 
    /**
     * 检查 分类码段的码值是否删除
     * @param codeClassifyValueDTO 分类码段的码值数据传输对象,必须要有oid和ts属性
     * @return 执行结果 success为true为可以删除,false表示有数据引用,obj为true表示有下级
     * @throws VciBaseException 参数为空,被引用时抛出异常
     */
    R checkIsCanDelete(CodeClassifyValueDTO codeClassifyValueDTO) throws VciBaseException;
 
    /**
     * 校验是否有下级节点,不校验是否关联了数据
     *
     * @param oid 主键
     * @return true表示有下级,false表示没有下级
     * @throws VciBaseException 参数错误,或者数据不存在的时候会抛出异常
     */
    boolean checkHasChild(String oid) throws VciBaseException;
 
    /**
     * 删除分类码段的码值
     * @param codeClassifyValueDTO 分类码段的码值数据传输对象,oid和ts需要传输
     * @return 删除结果反馈::success:成功,fail:失败
     * @throws VciBaseException 参数为空,被引用时抛出异常
     */
    R deleteCodeClassifyValue(CodeClassifyValueDTO codeClassifyValueDTO) throws VciBaseException;
 
    /**
     * 检查是否有下级是否关联了数据
     *
     * @param oid 主键
     * @return true 表示有引用,false表示没有引用
     * @throws VciBaseException 参数为空和有引用的时候会抛出异常
     */
    boolean checkChildIsLinked(String oid) throws VciBaseException;
 
    /**
     * 主键获取分类码段的码值
     * @param oid 主键
     * @return 分类码段的码值显示对象
     * @throws VciBaseException 参数为空,数据不存在时会抛出异常
     */
    CodeClassifyValueVO getObjectByOid(String oid) throws VciBaseException;
 
    /**
     * 主键批量获取分类码段的码值
     * @param oidCollections 主键集合,但是受性能影响,建议一次查询不超过10000个
     * @return 分类码段的码值显示对象
     * @throws VciBaseException 查询出现异常时会抛出
     */
    Collection<CodeClassifyValueVO> listCodeClassifyValueByOids(Collection<String> oidCollections) throws VciBaseException;
 
    /**
     * 参照树 分类码段的码值
     * @param treeQueryObject 树形查询对象
     * @return 分类码段的码值显示树
     * @throws VciBaseException 查询条件和分页出错的时候会抛出异常
     */
    List<Tree> referTree(TreeQueryObject treeQueryObject)  throws VciBaseException;
 
    /**
     * 批量添加分类码段的码值,如果保存的集合中不存在已在数据库中的码值则删除。主要是保存码值的序号
     * @param dtoList 分类码段的码值列表
     * @param codeclassifysecoid 分类码段的主键
     * @return 执行结果
     */
    R batchSave4Order(List<CodeClassifyValueDTO> dtoList, String codeclassifysecoid);
 
}