package com.mortals.xhx.module.attendance.service;
import com.mortals.framework.model.Context;
import com.mortals.framework.service.ICRUDService;
import com.mortals.xhx.module.attendance.model.AttendanceRecordErrorEntity;
import com.mortals.xhx.module.attendance.model.AttendanceRecordErrorQuery;
import com.mortals.xhx.module.attendance.model.vo.ErrorSummaryVo;

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

/**
* AttendanceRecordErrorService
*
* 考勤打卡记录异常信息 service接口
*
* @author zxfei
* @date 2023-04-08
*/
public interface AttendanceRecordErrorService extends ICRUDService<AttendanceRecordErrorEntity,Long>{

    /***
     * 考勤异常确认前检测，如果当天有请假记录则返回false
     * @param errorId
     * @return
     */
    boolean errorConfirm(Long errorId);

    /**
     * 自动处理异常考勤记录
     * @param date
     */
    void doAutoProcess(Date date);

    /**
     * 按时间从新生成已处理的考勤绩效核查数据
     * @param query
     */
    void doReprocess(AttendanceRecordErrorQuery query, Context context);

    /**
     * 统计每月异常次数top10
     * @param query
     * @return
     */
    List<ErrorSummaryVo> getMonthTop10(AttendanceRecordErrorQuery query);
}