package com.gic.haoban.manage.service.service;

import java.util.List;

import com.gic.haoban.manage.api.dto.DepartmentDTO;
import com.gic.haoban.manage.api.dto.DepartmentShortDTO;
import com.gic.haoban.manage.service.entity.TabHaobanDepartment;
import com.github.pagehelper.Page;

public interface DepartmentService {

	List<TabHaobanDepartment> listByParentId(String parentId);

	TabHaobanDepartment selectById(String departmentId);

	String add(DepartmentDTO department);

	void edit(DepartmentDTO department);

	void del(String departmentId);

	TabHaobanDepartment selectByRelatedId(String relatedId);

	TabHaobanDepartment getByWxId(String wxDepartmentId, String wxEnterpriseId);

	void recycle(String departmentId);

	Page<TabHaobanDepartment> pageDepartmentByParams(String wxEnterpriseId, String keyword, Integer storeFlag, Integer recycleFlag);

	DepartmentDTO getRootByEnterpriseId(String wxEnterpriseId);

	Page<TabHaobanDepartment> pageByParentId(String parentId, String keyword);

	List<TabHaobanDepartment> listByChainId(String chainId, String wxEnterpriseId);

	Integer departmentRecycleCount(String wxEnterpriseId);

	int countSyncDepartmentByEnterpriseId(String enterpriseId);

	int countByDepartment(String departmentId);

	Integer totalStoreCountByEnterpriseId(String wxEnterpriseId);

	/**
	 * 清空数据
	 * @param wxEnterpriseId
	 * @param wxDepartmentList
	 * @return
	 */
	Integer cleanDepartment(String wxEnterpriseId,List<String> wxDepartmentList);

	/**
	 * 清空数据
	 * @param wxEnterpriseId
	 * @param wxDepartmentList
	 * @return
	 */
	List<DepartmentDTO> listDepartmentByWxDepartIds(String wxEnterpriseId,List<String> wxDepartmentList);

	/**
	 * 搜索 返回10条
	 * @param search
	 * @param wxEnterpriseId
	 * @return
	 */
	List<DepartmentShortDTO> searchDepartment(String search,String wxEnterpriseId);

	/**
	 * 获取搜友部门
	 * @param wxEnterpriseId
	 * @return
	 */
	List<DepartmentShortDTO> listAllDepartment(String wxEnterpriseId);
}
