package com.keao.edu.user.dao;


import com.keao.edu.common.dal.BaseDAO;
import com.keao.edu.user.dto.ExamReviewDto;
import com.keao.edu.user.dto.ExamReviewRecordDto;
import com.keao.edu.user.entity.ExamReview;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface ExamReviewDao extends BaseDAO<Long, ExamReview> {

    /**
     * @describe 获取考试结果
     * @author Joburgess
     * @date 2020.06.24
     * @param params:
     * @return java.util.List<com.keao.edu.user.dto.ExamReviewDto>
     */
    List<ExamReviewDto> findExamResult(Map<String, Object> params);
    int countExamResult(Map<String, Object> params);

    /**
     * 监考页面评审列表查询
     * @param params
     * @return
     */
    int countExamReviewRecordList(Map<String, Object> params);

    /**
     * 监考页面评审列表查询
     * @param params
     * @return
     */
    List<ExamReviewRecordDto> queryExamReviewRecordList(Map<String, Object> params);

    ExamReview findByRegistrationId(@Param("examRegistrationId") Long examRegistrationId, @Param("teacherId") Integer teacherId);

    /**
     * @describe 获取考场中学员的评审记录
     * @author Joburgess
     * @date 2020.07.30
     * @param examRoomId:
     * @return java.util.List<com.keao.edu.user.entity.ExamReview>
     */
    List<ExamReview> getWithExamRoom(@Param("examRoomId") Long examRoomId);

    /**
     * 是否有未评审的学员
     * @param examRoomId
     * @return
     */
    int getCloseFlag(Long examRoomId);
}
