package com.yida.data.attendance.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.yida.data.attendance.vo.FindStaffRuleVO;
import com.yida.data.attendance.vo.StaffRuleVO;
import com.yida.data.common.core.entity.attendance.EduAttendanceStaffRecord;
import com.yida.data.common.core.entity.attendance.EduAttendanceStaffRule;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 教职工考勤规则 Mapper
 *
 * @author ccl
 * @date 2021-09-27 18:56:21
 */
public interface EduAttendanceStaffRuleMapper extends BaseMapper<EduAttendanceStaffRule> {

    /**
     * 查询规则列表
     *
     * @param iPage
     * @param ruleName
     * @param schoolId
     * @return
     */
    IPage<StaffRuleVO> findStaffRuleList(@Param("iPage") IPage iPage, @Param("ruleName") String ruleName,
        @Param("schoolId") Long schoolId,
        @Param("ruleIds") List<Long> ruleIds);

    /**
     * 通过id查询
     *
     * @param ruleId
     * @return
     */
    FindStaffRuleVO findStaffRuleById(@Param("ruleId") Long ruleId);

    FindStaffRuleVO selectMatchStaffRule(EduAttendanceStaffRecord staffRecord);
}
