package com.qmth.jkserver.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.qmth.jkserver.enums.ExamFinishStatusEnum;
import com.qmth.jkserver.model.ExamStage;
import com.qmth.jkserver.model.ExamStudent;

import java.util.List;

public interface ExamStudentService extends IService<ExamStudent> {

    public ExamStudent saveService(ExamStudent examStudent);

    /**
     * 更新考生考试装填
     *
     * @param examCode     考试识别码
     * @param courseCode   科目编码
     * @param ticketNumber 准考证号
     * @param examStatus   考试状态
     */
    boolean updateExamStudentExamStatus(String examCode, String courseCode, String ticketNumber, ExamFinishStatusEnum examStatus);

    public ExamStudent findStudent(String examCode, String ticketNo, String courseCode);

    public List<ExamStudent> findByExamCodeAndTicketNo(String examCode, String ticketNo);

    /**
     * 根据身份证号查找考生信息
     *
     * @param idcard
     * @return
     */
    public List<ExamStudent> findByIdcard(String idcard);

    public List<ExamStudent> findByExamCode(String examCode);

    //监考端数据下载 查询
    public List<ExamStudent> findJkDeviceKwStudents(String examCode, String placeCode, String roomCode);

    //监考端批次下载   查询
    public List<ExamStage> findJkDeviceBatchStages(String examCode);

    //根据准考证号查询视唱考生
    public ExamStudent findSolfegeStudent(String examCode, String ticketNo);

    //计算视唱机考一个考点一个考场里面的考生人数
    public Integer countSolfegeStudent(String examCode, String placeCode, String roomCode);

    public ExamStudent findById(String id);

    /**
     * 根据条件查询考生
     *
     * @param examCode   考试识别码
     * @param idCard     身份证号
     * @param ticketNo   准考证号
     * @param batchId    批次编号
     * @param stageId    场次编号
     * @param placeCode  考点编号
     * @param roomCode   考场编号
     * @param courseCode 课程代码
     * @param courseName 课程名称
     * @return 根据条件查询考生信息集合
     */
    List<ExamStudent> findExamStudentByQuery(String examCode, String idCard, String ticketNo, String batchId, String stageId, String placeCode, String roomCode, String courseCode, String courseName);
}
