
package org.sky.scientific.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.apache.ibatis.annotations.Param;
import org.sky.scientific.pojo.dto.AttendanceDto;
import org.sky.scientific.pojo.entity.AttendanceEntity;
import org.sky.scientific.pojo.vo.AttendanceVO;
import org.sky.scientific.pojo.vo.DailyAttendance;

import java.util.List;

/**
 * 考勤 Mapper 接口
 *
 * @author Kd
 * @since 2025-06-29
 */
public interface AttendanceMapper extends BaseMapper<AttendanceEntity> {

	List<AttendanceEntity> selectByYearAndMonth(@Param("yearAndMonth") String yearAndMonth);

	int batchUpdate(List<AttendanceEntity> list);

	Long selectPrimaryKeyByUnicodeAndWorkDate(@Param("unicode") String unicode, @Param("workDate") String workDate);

	int batchInsert(List<AttendanceEntity> list);

	List<DailyAttendance> selectDailyAttendanceByUnicodeAndMonth(@Param("unicode") String unicode, @Param("yearAndMonth") String yearAndMonth);

	List<AttendanceVO> selectAttendancePage(IPage<AttendanceVO> page, @Param("ew") AttendanceDto attendance);

	int clearUnicodeAndMonthly(@Param("unicode") String unicode, @Param("yearAndMonth") String yearAndMonth);
}
