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 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 listDepAndSubDepIds(Long depId); /** * @Description: 根据 depId 获取所有子部门 (包含本部门) */ List listDepAndSubByDepId(Long depId); /** * @Description: 根据 depIds 获取部门信息 */ List listDepByDepIds(List depIds); /** * @Description: 根据 depId 获取部门下的所有部门 不包含 自身 */ List listSubDepsByDepId(Long depId); }