package cn.wisenergy.service;

import cn.wisenergy.model.app.WorkDept;
import cn.wisenergy.model.dto.DeptOfProjectAndOrderType;
import cn.wisenergy.model.dto.OrganizationStructureDto;

import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author chenqi
 * @since 2021-01-19
 */
public interface WorkDeptService {

    WorkDept getById(Integer id);

    /**
     * 获取全部部门信息或单条信息，部门主键为空查询全部部门信息
     * @param deptId
     * @return
     */
    List<WorkDept> getDeptInfo(Integer deptId);

    List<OrganizationStructureDto> getAllDeptByAllCentreId();

    Boolean updateManagerIdISNullById(Integer id);

    Boolean updateById(WorkDept workDept);

    List<WorkDept> getDeptByManagerId(Integer userId);

    /**
     * 获取管理员所管理的项目的部门
     * @param userId
     * @return
     */
    List<WorkDept> getDeptOfProjectOfManager(Integer userId);

    List<DeptOfProjectAndOrderType> getDeptOfProjectAndOrderType(Integer userId,Integer deptId);
}
