package com.palmnest.dao.dinner;

import com.palmnest.application.bean.Page;
import com.palmnest.dao.GenericDao;
import com.palmnest.model.dinner.Department;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * @Author hxt
 * @Description TODO
 * @Date 2019/1/3 17:45
 **/
public interface DeptDao extends GenericDao<Department, Long> {

	Page deptList(int pageNo, int pageSize, HashMap<String, String> map);

	List<Department> getDeptByVirIdAndDeptName(int virId, String deptName);

	Map<String, Object> getDeptInfo(long deptId);

	/**
	 * 获取有效的部门
	 *
	 * @param orgId
	 * @param virId
	 * @return
	 */
	List<Department> getDeptByOrgIdAndVirId(String orgId, String virId, String name);

	/**
	 * 根据部门名称获取部门
	 *
	 * @param virId
	 * @param name
	 * @return
	 */
	Department getDeptByName(String virId, String name);


	/**
	 * 将指定部门下的员工的部门字段置为null
	 *
	 * @param id
	 */
	void delUserDept(Long id);

	Department getDeptByNameAndVirId(int virId, String name);
}
