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);
|
}
|