liujie
2026-01-21 d93d1a2fee31453c0010fcf3d084c5e0a0862dca
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
package com.estate.expert.admin.service;
 
import com.estate.expert.admin.domain.standard.hierachy.Hierarchy;
import com.estate.expert.admin.domain.standard.hierachy.HierarchyData;
import com.estate.expert.admin.domain.standard.hierachy.HierarchyDto;
import com.estate.expert.admin.service.common.CrudServiceBase;
import com.estate.expert.admin.utils.tree.TreeNode;
import com.estate.expert.admin.utils.tree.TreeRoot;
 
import java.util.List;
 
/**
 * 体系服务
*/
public interface HierarchyService extends CrudServiceBase<Hierarchy, HierarchyDto> {
 
    /////       常规方法       //////
    /**
     * 获取根节点
     * @param id 体系ID
     * @return 根节点
     */
    TreeRoot<HierarchyData> root(Integer id);
 
    /**
     * 获取节点
     * @param id 体系ID
     * @param path 路径
     * @param includeChildren 是否包含子节点
     * @return 节点
     */
    TreeNode<HierarchyData> node(Integer id, String path, boolean includeChildren);
 
    /**
     * 获取子节点
     * @param id 体系ID
     * @param path 路径
     * @param keyword 关键词
     * @return 子节点
     */
    List<TreeNode<HierarchyData>> children(Integer id, String path, String keyword);
 
    /**
     * 编辑节点
     * @param id 体系ID
     * @param path 路径
     * @param name 名称
     * @param data 数据
     */
    void edit(Integer id, String path, String name, HierarchyData data);
 
    /**
     * 添加子节点
     * @param id 体系ID
     * @param parentPath 父节点路径
     * @param name 名称
     * @param data 数据
     * @return 子节点
     */
    TreeNode<HierarchyData> addChild(Integer id, String parentPath, String name, HierarchyData data);
 
    /**
     * 删除节点
     * @param id 体系ID
     * @param path 路径
     */
    void deleteNode(Integer id, String path);
 
    /**
     * 删除节点
     * @param id 体系ID
     * @param paths 路径列表
     */
    void deleteNodes(Integer id, List<String> paths);
    
    /**
     * 获取若干层级下所有的节点路径
     */
    List<String> findAllPaths(Integer id, List<String> hierarchyPaths);
 
    /**
     * 克隆节点(包括所有子节点和关联的问题)到同一个父节点下
     * 新节点名称为:原名称(克隆)
     * @param id 体系ID
     * @param sourcePath 源节点路径
     * @return 新节点
     */
    TreeNode<HierarchyData> cloneNode(Integer id, String sourcePath);
 
 
 
    /////       数据导入时候特殊用到的方法       //////
 
//    void create(HierarchyType type, TreeNode<HierarchyData> root);
 
//    void delete(HierarchyType type);
 
//    TreeNode<HierarchyData> getByNamePath(HierarchyType type, String namePath);
}