懒羊羊
2024-01-31 e57a8990ae56f657a59c435a0613c5f7a8728003
提交 | 用户 | 时间
e57a89 1 package com.jcdm.system.service;
2
3 import java.util.List;
4 import com.jcdm.common.core.domain.TreeSelect;
5 import com.jcdm.common.core.domain.entity.SysDept;
6
7 /**
8  * 部门管理 服务层
9  * 
10  * @author jc
11  */
12 public interface ISysDeptService
13 {
14     /**
15      * 查询部门管理数据
16      * 
17      * @param dept 部门信息
18      * @return 部门信息集合
19      */
20     public List<SysDept> selectDeptList(SysDept dept);
21
22     /**
23      * 查询部门树结构信息
24      * 
25      * @param dept 部门信息
26      * @return 部门树信息集合
27      */
28     public List<TreeSelect> selectDeptTreeList(SysDept dept);
29
30     /**
31      * 构建前端所需要树结构
32      * 
33      * @param depts 部门列表
34      * @return 树结构列表
35      */
36     public List<SysDept> buildDeptTree(List<SysDept> depts);
37
38     /**
39      * 构建前端所需要下拉树结构
40      * 
41      * @param depts 部门列表
42      * @return 下拉树结构列表
43      */
44     public List<TreeSelect> buildDeptTreeSelect(List<SysDept> depts);
45
46     /**
47      * 根据角色ID查询部门树信息
48      * 
49      * @param roleId 角色ID
50      * @return 选中部门列表
51      */
52     public List<Long> selectDeptListByRoleId(Long roleId);
53
54     /**
55      * 根据部门ID查询信息
56      * 
57      * @param deptId 部门ID
58      * @return 部门信息
59      */
60     public SysDept selectDeptById(Long deptId);
61
62     /**
63      * 根据ID查询所有子部门(正常状态)
64      * 
65      * @param deptId 部门ID
66      * @return 子部门数
67      */
68     public int selectNormalChildrenDeptById(Long deptId);
69
70     /**
71      * 是否存在部门子节点
72      * 
73      * @param deptId 部门ID
74      * @return 结果
75      */
76     public boolean hasChildByDeptId(Long deptId);
77
78     /**
79      * 查询部门是否存在用户
80      * 
81      * @param deptId 部门ID
82      * @return 结果 true 存在 false 不存在
83      */
84     public boolean checkDeptExistUser(Long deptId);
85
86     /**
87      * 校验部门名称是否唯一
88      * 
89      * @param dept 部门信息
90      * @return 结果
91      */
92     public boolean checkDeptNameUnique(SysDept dept);
93
94     /**
95      * 校验部门是否有数据权限
96      * 
97      * @param deptId 部门id
98      */
99     public void checkDeptDataScope(Long deptId);
100
101     /**
102      * 新增保存部门信息
103      * 
104      * @param dept 部门信息
105      * @return 结果
106      */
107     public int insertDept(SysDept dept);
108
109     /**
110      * 修改保存部门信息
111      * 
112      * @param dept 部门信息
113      * @return 结果
114      */
115     public int updateDept(SysDept dept);
116
117     /**
118      * 删除部门管理信息
119      * 
120      * @param deptId 部门ID
121      * @return 结果
122      */
123     public int deleteDeptById(Long deptId);
124 }