package com.zcloud.modules.oa.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.zcloud.common.utils.PageUtils;
import com.zcloud.modules.oa.entity.OaDepartmentEntity;

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


/**
 * 字典管理
 */
public interface OaDepartmentService extends IService<OaDepartmentEntity> {

	PageUtils queryPage(Map<String, Object> params);

	/**
	 * 根据父字典，查询子字典
	 * @param parentId 父字典ID
	 */
	List<OaDepartmentEntity> queryListParentId(String parentId,String corpinfoId);
	/**
	 * 删除
	 */
	void delete(String departmentId);

	/**
	 * 返回树形部门
	 */
    List<OaDepartmentEntity> getDeptTree(String parentId,String corpinfoId);

	/**
	 *	添加部门
	 */
	boolean saveDepartment(OaDepartmentEntity department);

	OaDepartmentEntity getByName(String name);

	/**
	 * 修改部门领导openid
	 * @param phone
	 * @param openid
	 */
    void editOpenid(String phone, String openid);
}
