package com.saye.hospitalgd.mapper.system;

import com.saye.hospitalgd.model.Departs;
import org.apache.ibatis.annotations.Param;

import java.util.HashMap;
import java.util.HashSet;
import java.util.List;

public interface DepartMapper {
	//通过父节点查询
	public List<Departs> findDepartTreeNodeList(String parentId);
	
	//新增部门
	public int addDepart(HashMap<String,String> map);
	
	//修改部门
	public int modifyDepart(HashMap<String,String> map);
	
	//删除部门以及该部门的子节点
	
	public int removeDepart(HashMap<String,String> map);
	
	//查询所有的部门数据
    public List<Departs> selectDepartTreeList();
    
    /**
     * @description 根据上级id查询部门树
     * @author thuang       
     * @created 2019年11月12日 下午4:51:45 
     * @param parentId
     * @return
     */
    public List<HashMap<Object, Object>> selectDepartTreeListByParentId(String parentId);
    
    //根据部门名称查询部门对象
    public List<Departs> selectDepartBydepartName(String departName);

	public List<HashMap<Object, Object>> findDepartByParentId(HashMap<String, Object> map);


	List<HashMap<Object, Object>> selectAllDeparts();

    List<HashMap<Object, Object>> findDepartById(@Param("set") HashSet<String> set) throws Exception;
}
