package com.ssm.manage.mapper;

import com.ssm.core.mapper.BaseMapper;
import com.ssm.manage.dto.BlackListDto;
import com.ssm.manage.entity.JobContentList;
import com.ssm.manage.entity.StaffTemporary;
import com.ssm.manage.entity.StaffTemporaryAndBlackList;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Component;

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

/**
 * (StaffTemporary)表数据库访问层
 *
 * @author makejava
 * @since 2023-12-19 08:59:37
 */
@Component
public interface StaffTemporaryMapper extends BaseMapper<StaffTemporary> {



    List<StaffTemporary> selectByStaffTemporary(BlackListDto dto);

    List<StaffTemporaryAndBlackList> selectByStaffTemporary1(BlackListDto dto);
    long countByStaffTemporary(BlackListDto dto);

    void updateIsUpdateByIds(@Param("ruzhiTime") Date ruzhiTime, @Param("type") Integer type, @Param("ids") List<Long> ids);

    void updateByBeisenDimissionDate(StaffTemporary staffTemporary);

    StaffTemporary selectLastRuzhiByIdentityCard(@Param("identityCard") String identityCard);

    /**
     * 根据指定日期查询未离职
     */
    List<StaffTemporary> selectNotLeaving(@Param("date") Date date);

    String selectByStoreId(@Param("storeId") Long storeId,@Param("identityCard")  String identityCard);

    //根据员工编号查找中控推送部门id和中控推送部门名称(以推送时间为主，获取最新的一个)
    StaffTemporary selectByStaffNum(@Param("staffNum")String staffNum);

    //根据外包服务商查找全部员工身份证号码
    List<String> selectByRemark(@Param("remark") String remark);

    //根据身份证查询最新待入场记录
    StaffTemporary selectByIdentityCardNew(@Param("identityCard") String identityCard);

    //根据身份证批量删除临时工信息
    void delectByIdcards(@Param("delectStaffTemporaryIdcard") List<String> delectStaffTemporaryIdcard);

    //根据id批量删除临时工信息
    void delectByIdss(@Param("delectStaffTemporaryIdlist") List<Long> delectStaffTemporaryIdlist);
}
