package com.xhkjedu.smarking.mapper.papercheck;

import com.xhkjedu.base.TkMapper;
import com.xhkjedu.smarking.model.papercheck.MsPaperCheckTeacher;
import com.xhkjedu.smarking.model.papercheck.MsPaperCheckTeacherProblem;
import com.xhkjedu.smarking.vo.papercheck.MsCheckParam;
import com.xhkjedu.smarking.vo.papercheck.MsPaperCheckVo;
import org.apache.ibatis.annotations.Param;

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

/**
 * @Description 疑难卷教师任务表 Mapper 接口
 * @Author auto
 * @Date 2024-11-21
 */
public interface MsPaperCheckTeacherProblemMapper extends TkMapper<MsPaperCheckTeacherProblem> {
    //疑难卷题块列表
    List<Map> listBlockProblem(@Param("param") MsCheckParam param);

    //疑难卷试题列表
    List<Map> listQuestionProblem(@Param("param") MsCheckParam param);

    //获取疑难卷任务
    Map getCorrectProblem(@Param("param") MsCheckParam param);

    //获取疑难卷数量
    MsPaperCheckTeacher getPCheckNum(@Param("param") MsCheckParam param);

    //获取上一份疑难卷
    Map getPreProblem(@Param("param") MsCheckParam param);

    //历史记录列表
    List<Map> listHistory(@Param("param") MsCheckParam param);

    //历史记录详情
    Map detailHistory(@Param("param") MsCheckParam param);

    //保存或更新单个任务
    void save(@Param("m") MsPaperCheckTeacherProblem task);

    //删除单个任务
    void deleteByMpsbidAndMpid(@Param("mpsbid") Integer mpsbid,@Param("mpid") Integer mpid);

    //打回重阅
    void backCorrect(@Param("param") MsPaperCheckVo param);

    //更新疑难卷状态
    void updateHasProblem(@Param("param") MsCheckParam param);

    //处理疑难卷
    void correct(@Param("param") MsPaperCheckVo param);

    //根据题块/试题id获取学生试卷id
    Integer getMpsIdByMpsbid(@Param("mpsbid") Integer mpsbid,@Param("correcttype") Integer correcttype);
}
