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

import java.util.Date;
import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.gic.haoban.manage.service.entity.TabHaobanStaffDepartmentRelated;

public interface StaffDepartmentRelatedMapper {

    int insert(TabHaobanStaffDepartmentRelated record);

    int updateByPrimaryKeySelective(TabHaobanStaffDepartmentRelated record);

	List<TabHaobanStaffDepartmentRelated> listByDepartmentId(String departmentId);
	
	List<TabHaobanStaffDepartmentRelated> listStaffDepartmentByStaffId(String staffId);

    TabHaobanStaffDepartmentRelated getById(String staffDepartmentRelatedId);

    int delByStaffid(@Param("staffId") String staffId);

//	TabHaobanStaffDepartmentRelated getDepartmentIdAndStaffId(@Param("departmentId")String departmentId, @Param("staffId")String staffId);

//	TabHaobanStaffDepartmentRelated getDepartmentIdAndCode(@Param("departmentId")String departmentId, @Param("clerkCode")String code);

	int countByDepartmentIds(@Param("departmentIds")List<String> departmentIds);
	
	List<TabHaobanStaffDepartmentRelated> listStaffDepartmentByStaffIds(@Param("staffIds")List<String> staffIds);
	
	List<TabHaobanStaffDepartmentRelated> listByDepartmentIds(@Param("departmentIds")List<String> departmentIds);
	
	int cleanStaffDepartment(@Param("wxEnterpriseId")String wxEnterpriseId,@Param("staffIds")List<String> staffIds);

	List<TabHaobanStaffDepartmentRelated> listByWxEnterpriseIdAndStaffId(
			@Param("wxEnterpriseId") String wxEnterpriseId,
			@Param("staffId") String staffId
	);
	
	List<String> listNoDepartStaff(@Param("wxEnterpriseId")String wxEnterpriseId , @Param("addDate")Date addDate) ;
}