package com.yida.data.attendance.service;


import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yida.data.attendance.vo.AttendanceResultDormVO;
import com.yida.data.attendance.vo.ResultDetailVO;
import com.yida.data.attendance.vo.RuleTimeVO;
import com.yida.data.attendance.vo.StayStudentResultVO;
import com.yida.data.common.core.entity.attendance.EduAttendanceResult;
import com.yida.data.common.core.entity.attendance.EduAttendanceVerifyDorm;
import com.yida.data.common.core.entity.constant.FebsConstant;
import com.yida.data.attendance.dto.AttendanceResultPageDTO;
import com.yida.data.attendance.dto.ListStudentResultDTO;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import org.springframework.scheduling.annotation.Async;

/**
 * 考勤结果 Service接口
 *
 * @author wjm
 * @date 2021-09-15 09:56:24
 */
public interface EduAttendanceResultService extends IService<EduAttendanceResult> {

    /**
     * 查询宿舍楼学生考勤信息
     */
    List<StayStudentResultVO> listResultByDorm(Long dormId, String date, Integer time, String keyword, Integer status);

    /**
     * 查询寝室的学生考勤信息
     *
     * @param roomId
     * @param date
     * @param time
     * @return
     */
    List<StayStudentResultVO> listStudentResByDormRoom(Long roomId, String date, Integer time);

    /**
     * 改变学生的归寝状态
     *
     * @param studentId
     * @param date
     * @param time
     * @param status
     */
    void changeStayStudentStatus(Long studentId, String date, Integer time, Integer status);

    /**
     * 完成某个寝室的查寝
     */
    void verifyDormRoom(EduAttendanceVerifyDorm verifyDorm);

    void exportAttendanceResult(AttendanceResultPageDTO dto, HttpServletResponse response);

    /**
     * 查询考勤记录
     *
     * @param dto
     * @return
     */
    IPage<AttendanceResultDormVO> listAttendanceResultPage(AttendanceResultPageDTO dto);


    /**
     * 定时处理考勤记录
     */
    @Async(FebsConstant.ASYNC_POOL)
    void dealAttendanceResult();

    /**
     * 发送未到消息
     */
    @Async(FebsConstant.ASYNC_POOL)
    void pushNotArriveMsg();

    /**
     * 查询某年级某天校门考勤记录的规则时间列表
     */
    List<RuleTimeVO> listGradeResultTime(Long gradeId, String date);

    /**
     * 查询学生考勤记录
     */
    List<ResultDetailVO> listStudentResultDetail(ListStudentResultDTO dto);
}
