package com.xhkjedu.smarking.mapper.scan;

import com.xhkjedu.base.TkMapper;
import com.xhkjedu.smarking.model.exam.MsExam;
import com.xhkjedu.smarking.model.scan.MsScanbatch;
import com.xhkjedu.smarking.vo.scan.ScanParams;
import org.apache.ibatis.annotations.Param;

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

/**
 * @Description 阅卷答题卡扫描批次表 Mapper 接口
 * @Author auto
 * @Date 2024-10-15
 */
public interface MsScanbatchMapper extends TkMapper<MsScanbatch> {

    //扫描答卷-考试试卷信息
    Map<String, Object> getExamPaperScanInfo(@Param("mpid")Integer mpid);

    //扫描答卷-扫描信息
    List<Map<String,Object>> listScanBatchForPaper(@Param("mpid")Integer mpid);

    //获取批次名称模糊数量
    Integer getBatchNumByBatchname(@Param("batchname")String batchname);

    //获取试卷所有扫描批次
    List<Map<String,Object>> listScanBatchByMpidForSel(@Param("mpid")Integer mpid);

    //扫描记录-扫描信息
    Map<String,Object> getScanPaperRecord(@Param("mpid")Integer mpid);

    //扫描记录-按班级
    List<Map<String,Object>> listRecordClassStudents(@Param("params")ScanParams params);

    //扫描记录-按批次
    List<Map<String,Object>> listRecordBatchStudents(@Param("params")ScanParams params);

    //修改扫描数量
    int updateScannum(@Param("batchid")Integer batchid);
    int updateScannumAndErrornum(@Param("batchid")Integer batchid);
    //修改识别数量
    int updateIdentifynum(@Param("batchid")Integer batchid);
    //修改缺考数量
    int updateQknum(@Param("batchid")Integer batchid);
    //修改违规数量
    int updateWgnum(@Param("batchid")Integer batchid);

    //根据试卷ID获取考试状态和ID
    MsExam getExamStateAndId(@Param("mpid")Integer mpid);
    //根据批次ID获取考试状态
    Integer getExamStateByBatchid(@Param("batchid")Integer batchid);
}
