package com.yeejoin.precontrol.common.service;

import java.util.List;
import java.util.Set;

import com.baomidou.mybatisplus.extension.service.IService;
import com.yeejoin.precontrol.common.dto.CompanyDepartmentDto;
import com.yeejoin.precontrol.common.entity.CompanyDepartment;

/**
 * 部门信息 服务类
 *
 * @author duanwei
 * @date 2021-09-07
 */
public interface ICompanyDepartmentService extends IService<CompanyDepartment> {

	List<CompanyDepartmentDto> treeByCompanyId(Long companyId, String name);

	boolean removeTreeById(Long id);

	boolean saveOne(CompanyDepartment companyDepartment);

	boolean updateOneById(CompanyDepartment companyDepartment);
	
	List<CompanyDepartmentDto> allChildrenList(Long departmentId);
	
	int countChildrenPerson(Long departmentId,Set<String> roleIds,Long projectId);
}
