package com.xhkjedu.sstudy.mapper.question;

import com.xhkjedu.base.TkMapper;
import com.xhkjedu.sstudy.model.question.TQuestionClass;
import com.xhkjedu.sstudy.vo.paperstudent.PaperStudentQuestionVo;
import com.xhkjedu.sstudy.vo.question.QuestionClassDetailVo;
import com.xhkjedu.sstudy.vo.question.QuestionClassVo;
import com.xhkjedu.sstudy.vo.subjectbook.SubjectQuestiontypeVo;
import org.apache.ibatis.annotations.Param;

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

public interface QuestionClassMapper extends TkMapper<TQuestionClass> {
    //获取详情
    QuestionClassVo findById(@Param("questionid") String questionid);

    //章节班级错题列表
    List<QuestionClassVo> directorList(@Param("question") TQuestionClass question);

    //知识点班级错题列表
    List<QuestionClassVo> pointList(@Param("question") TQuestionClass question);

    //作业统计按题
    List<TQuestionClass> getQuestionAnalyze(@Param("paperid") Long paperid, @Param("classid") Integer classid, @Param("qctype") Integer qctype);

    //答题卡作业统计按题
    List<TQuestionClass> getSQuestionAnalyze(@Param("paperid") Long paperid, @Param("classid") Integer classid);

    //学校错误率%
    Integer getErrorRateBySchoolId(Integer schoolid);

    //题型列表
    List<SubjectQuestiontypeVo> listQtype(@Param("question") TQuestionClass question);

    //客观题详情
    QuestionClassDetailVo objectiveDetail(@Param("question") TQuestionClass question);

    //答题卡客观题详情
    QuestionClassDetailVo objectiveSDetail(@Param("question") TQuestionClass question);

    //主观题详情
    QuestionClassDetailVo subjectiveDetail(@Param("question") TQuestionClass question);

    //答题卡主观题详情
    QuestionClassDetailVo subjectiveSDetail(@Param("question") TQuestionClass question);

    //获取班级下作业总人数
    Integer getTotalnum(Long paperid, Integer classid, Integer qctype);

    //获取试题知识点ids
    String getPointIds(String questionid);

    //获取举一反三试题列表
    List<Map> listJYFSQuestion(@Param("pointIds") String pointIds, @Param("questionid") String questionid
            , @Param("userid") Integer userid, @Param("schoolid") Integer schoolid);

    //获取作业、课堂试卷中试题
    List<Map> listObjsByPaperid(Long paperid,Integer qctype);

    //根据试题id获取试题信息
    List<QuestionClassVo> getQuestionById(@Param("questionids") List<String> questionids);

    //根据试题id获取答题卡信息
    List<QuestionClassVo> getScantronById(@Param("questionids") List<String> questionids);

    //获取试题是否被某人收藏
    Integer getCollected(String questionid, Integer userid);

    //获取试题关联知识点
    String getPointName(String questionid);

    //复合题详情
    QuestionClassDetailVo complexDetail(@Param("question") TQuestionClass question);

    //班级作业学生
    List<Map> listStus(@Param("question") QuestionClassDetailVo question);

    //班级作业学生作答情况
    List<PaperStudentQuestionVo> listStusAnswer(@Param("question") QuestionClassDetailVo question);

    //删除作业错题
    void deleteQuestionByPaperId(Integer paperid);

    //取上传视频讲解老师归属学校年份
    Integer getYearBySchoolTeacherid(@Param("userid") Integer userid);
}
