郑永安
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
package com.gkhy.safePlatform.account.service.baseService;
 
import com.baomidou.mybatisplus.extension.service.IService;
import com.gkhy.safePlatform.account.entity.enterprise.DepartmentInfo;
import com.gkhy.safePlatform.account.entity.enterprise.DepartmentInfoDO;
import com.gkhy.safePlatform.account.enums.DepartmentStatusEnum;
 
import java.util.List;
 
public interface DepartmentInfoService extends IService<DepartmentInfo> {
 
    /**
    * @Description: 根据status获取部门信息
    */
    List<DepartmentInfoDO> getDepartmentByStatus(DepartmentStatusEnum status);
 
    /**
    * @Description: 根据id判断部门是否存在
    */
    boolean departmentExist(Long id);
 
    /**
    * @Description: 保存部门信息
    */
    void saveDepartmentInfo(DepartmentInfo departmentInfo);
 
    /**
    * @Description: 根据id获取部门信息
    */
    DepartmentInfo getDepartmentInfoById(Long id);
 
    /**
     * @Description: 根据id获取部门信息
     */
    DepartmentInfoDO getDepartmentInfoDOById(Long id);
 
    /**
    * @Description: 根据parentId获取同级部门信息,null 则为根部门
    */
    List<DepartmentInfoDO> getDepartmentByParentId(Long parentId);
 
    /**
    * @Description: 修改部门信息
    */
    void updateDepartmentInfo(DepartmentInfo departmentInfo);
 
    /**
    * @Description: 部门下有多少子部门
    */
    long countByParentDepId(Long depId);
 
 
    DepartmentInfoDO getParentDepartmentInfoDOByDepId(Long depId);
 
    /**
    * @Description: 根据 name 查询部门
    */
    DepartmentInfo getDepartmentInfoByName(String name);
 
 
    List<Long> listSubDepIdsByParentId(Long depId);
 
 
    /**
    * @Description: 根据 depCode 判断数据库是否存在 depCode
    */
    DepartmentInfo getDepartmentInfoByCode(String depCode);
}