郑永安
2023-06-19 7a6abd05683528032687c75e80e0bd2030a3e46c
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
package com.gkhy.safePlatform.account.service;
 
import com.gkhy.safePlatform.account.entity.enterprise.DepartmentInfo;
import com.gkhy.safePlatform.account.model.dto.req.DepartmentAddReqDTO;
import com.gkhy.safePlatform.account.model.dto.req.DepartmentModReqDTO;
import com.gkhy.safePlatform.account.model.dto.resp.DepRespDTO;
import com.gkhy.safePlatform.account.model.dto.resp.DepartmentRespDTO;
import com.gkhy.safePlatform.commons.co.ContextCacheUser;
 
import java.util.List;
 
public interface DepartmentService {
 
    /**
    * @Description: 获取所有启用的部门
    */
    List<DepartmentRespDTO> getDepartmentEnableList();
 
    /**
    * @Description: 新增部门
    */
    void addDepartment(ContextCacheUser currentUser, DepartmentAddReqDTO departmentAddReqDTO);
 
 
    /**
    * @Description: 修改部门
    */
    void modDepartment(ContextCacheUser currentUser, DepartmentModReqDTO departmentAddReqDTO);
 
 
    /**
    * @Description: 删除部门
    */
    void delDepartment(ContextCacheUser currentUser, Long depId);
 
 
    /**
     * @Description: controller 控制层调用 根据部门id获取部门信息 不存在返回 null  否则 返回对象
     */
    DepRespDTO getEnableDepartmentInfoByDepId(Long userId, Long depId);
 
 
    /**
     * @Description: rpc 业务层调用
     */
    DepRespDTO getDepartmentInfoByDepId(Long depId);
 
 
    /**
    * @Description: 根据 depId 获取该部门的父部门信息
    */
    DepRespDTO getParentDepInfoByDepId(Long depId);
 
    /**
    * @Description: 判断 depId1 是否 在depId 或者他的子部门下
    */
    boolean isSelfOrSubDep(Long depId, Long depId1);
 
 
    /**
     * @Description: 根据 depName 获取 部门信息
     */
    DepRespDTO getDepartmentInfoByDepName(String depName);
 
    /**
     * @Description: 获取部门和子部门的 ids
     */
    List<Long> listDepAndSubDepIds(Long depId);
 
    /**
     * @Description: 根据 depId 获取所有子部门 (包含本部门)
     */
    List<DepRespDTO> listDepAndSubByDepId(Long depId);
 
    /**
     * @Description: 根据 depIds 获取部门信息
     */
    List<DepRespDTO> listDepByDepIds(List<Long> depIds);
 
 
    /**
     * @Description: 根据 depId 获取部门下的所有部门 不包含 自身
     */
    List<DepRespDTO> listSubDepsByDepId(Long depId);
 
 
}