package com.xhkjedu.sstudy.mapper.paper;

import com.xhkjedu.base.TkMapper;
import com.xhkjedu.sstudy.model.paper.TPaper;
import com.xhkjedu.sstudy.model.paper.TPaperAnalyze;
import com.xhkjedu.sstudy.model.paperstudent.TPaperClass;
import com.xhkjedu.sstudy.vo.gradeclass.CStudentVo;
import com.xhkjedu.sstudy.vo.paper.AStudentPaperVo;
import com.xhkjedu.sstudy.vo.paper.AnalyzeQuestionVo;
import com.xhkjedu.sstudy.vo.paper.AnalyzeSearchVo;
import com.xhkjedu.sstudy.vo.paper.AnalyzeStudentVo;
import com.xhkjedu.sstudy.vo.paper.PaperAnalyzeVo;
import com.xhkjedu.sstudy.vo.paper.PaperCAnalyzeVo;
import com.xhkjedu.sstudy.vo.paper.PaperGAnalyzeVo;
import com.xhkjedu.sstudy.vo.paper.QuestionAnalyzeVo;
import com.xhkjedu.sstudy.vo.paperstudent.PaperStudentQuestionVo;
import com.xhkjedu.sstudy.vo.paperstudent.StudentPaperTypeVo;
import com.xhkjedu.sstudy.vo.paperstudent.StudentPaperVo;
import com.xhkjedu.sstudy.vo.paperstudent.StudentPointScoreVo;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

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

/**
 *功能描述  作业分析
 * @author WN
 * @date 2020/6/11
 * @param  * @param null
 * @return
 */

@Repository
public interface PaperAnalyzeMapper extends TkMapper<TPaperAnalyze> {


    /**
     * 作业分析
     * @Param [paperid]
     * @Author ywx
     * @Date 2020/6/10 14:47
     * @return com.xhkjedu.model.paper.TPaperAnalyze
     **/
    TPaperAnalyze getAnalyzeByPaperid(@Param("paperid") Integer paperid);

    /**
     *功能描述  删除--根据作业id
     * @author WN
     * @date 2020/6/11
     * @param  * @param paperid
     * @return void
     */
    void deleteByPaperid(@Param("paperid") Integer paperid);

    /**
     * 获取作业分析
     * @Param [paperid]
     * @Author ywx
     * @Date 2020/6/24 15:02
     * @return com.xhkjedu.vo.paper.PaperAnalyzeVo
     **/
    PaperAnalyzeVo getPaperAnalyze(@Param("paperid") Integer paperid, @Param("papertype") Integer papertype, @Param("classid") Integer classid);

    /**
     * 作业统计--按人
     * @Param [paper]
     * @Author ywx
     * @Date 2020/6/24 15:03
     * @return java.util.List<com.xhkjedu.vo.paper.AnalyzeStudentVo>
     **/
    List<AnalyzeStudentVo> getPeopleAnalyze(@Param("paper") TPaper paper);

    /**
     * 作业统计--按题
     *
     * @return java.util.List<com.xhkjedu.vo.paper.AnalyzeQuestionVo>
     * @Param [paperid]
     * @Author ywx
     * @Date 2020/6/24 15:05
     **/
    List<AnalyzeQuestionVo> getQuestionAnalyze(@Param("paperid") Integer paperid, @Param("papertype") Integer papertype, @Param("classid") Integer classid);

    /**
     * 获取作业人数
     * @Param [paperid]
     * @Author ywx
     * @Date 2020/6/24 15:12
     * @return java.lang.Integer
     **/
    Integer getStuNum(Integer paperid, Integer classid);

    /**
     * 作业统计--按题详情
     * @Param [paperid, questionid]
     * @Author ywx
     * @Date 2020/6/24 15:37
     * @return com.xhkjedu.vo.paper.QuestionAnalyzeVo
     **/
    QuestionAnalyzeVo getQuestionDetailAnalyze(@Param("question") AnalyzeQuestionVo question);

    //作业统计--按题详情--学生列表
    List<AnalyzeStudentVo> listQuestionStu(Integer paperid, String questionid, Integer classid, Integer od);

    /**
     * 答题卡作业统计--按题
     * @Param [paperid]
     * @Author ywx
     * @Date 2020/6/27 16:28
     * @return java.util.List<com.xhkjedu.vo.paper.AnalyzeQuestionVo>
     **/
    List<AnalyzeQuestionVo> getSQuestionAnalyze(@Param("paperid") Integer paperid, @Param("classid") Integer classid);

    /**
     * 答题卡作业统计--按题详情
     * @Param [paperid, ptqorder]
     * @Author ywx
     * @Date 2020/6/27 16:50
     * @return com.xhkjedu.vo.paper.QuestionAnalyzeVo
     **/
    List<AnalyzeStudentVo> getSQuestionDetailAnalyze(@Param("paperid") Integer paperid, @Param("ptqorder") Integer ptqorder
            , @Param("classid") Integer classid, @Param("od") Integer od);

    /**
     * 作业统计--按人详情
     * @Param [psid]
     * @Author ywx
     * @Date 2020/6/28 10:06
     * @return com.xhkjedu.vo.paperstudent.StudentPaperVo
     **/
    StudentPaperVo getStudentPaperAnalyze(Integer psid);

    /**
     * 作业统计--按人详情 题型列表
     * @Param [psid]
     * @Author ywx
     * @Date 2020/6/28 10:06
     * @return java.util.List<com.xhkjedu.vo.paperstudent.StudentPaperTypeVo>
     **/
    List<StudentPaperTypeVo> listPeopleDetailAnalyze(Integer psid);

    /**
     * 答题卡作业统计--按人详情 题型列表
     * @Param [psid]
     * @Author ywx
     * @Date 2020/6/28 10:08
     * @return java.util.List<com.xhkjedu.vo.paperstudent.StudentPaperTypeVo>
     **/
    List<StudentPaperTypeVo> listPeopleSDetailAnalyze(Integer psid);

    /**
     * @Description 答题卡作业统计 按人详情 题型列表
     * @Param [psid]
     * @Author ywx
     * @Date 2023/5/6 10:30
     * @return java.util.List<com.xhkjedu.sstudy.vo.paperstudent.StudentPaperTypeVo>
     **/
    List<StudentPaperTypeVo> listStuDetailAnalyze(Integer psid);

    /**
     * 获取作业提交情况
     * @Param [papernum, createid]
     * @Author ywx
     * @Date 2020/7/9 11:10
     * @return java.util.List<com.xhkjedu.vo.paper.PaperCAnalyzeVo>
     **/
    List<PaperCAnalyzeVo> listCommitAnalyze(@Param("papernum") Integer papernum, @Param("createid") Integer createid);

    //////////////////////////////////////////////学生WEB端//////////////////////////////////////////////
    /**
     * 作业详情
     * @Param [psid]
     * @Author ywx
     * @Date 2020/9/5 10:29
     * @return com.xhkjedu.vo.paperstudent.StudentPaperVo
     **/
    StudentPaperVo getStudentPaperAnalyzeWeb(Integer psid);

    /**
     * 知识点得分情况
     * @Param [paperid]
     * @Author ywx
     * @Date 2020/9/5 11:23
     * @return java.util.List<com.xhkjedu.vo.paperstudent.StudentPointScoreVo>
     **/
    List<StudentPointScoreVo> listPointScoreByPsId(Integer paperid);

    /**
     * 获取作业班级列表
     * @Param [paperid]
     * @Author ywx
     * @Date 2020/9/23 16:58
     * @return java.util.List<com.xhkjedu.vo.gradeclass.ClassVo>
     **/
    List<Map> listPaperClass(@Param("paperid") Integer paperid,@Param("schoolid") Integer schoolid
            ,@Param("classids") String classids);

    /**
     * 作业班级学生列表
     * @Param [paper]
     * @Author ywx
     * @Date 2020/9/24 10:05
     * @return java.util.List<com.xhkjedu.vo.gradeclass.CStudentVo>
     **/
    List<CStudentVo> listPaperClassStudent(@Param("paper") TPaperClass paper);

    //作业统计：年级下教师列表
    List<PaperGAnalyzeVo> listUser(@Param("paper") AnalyzeSearchVo paper);

    //作业统计：教师作业统计
    List<PaperGAnalyzeVo> getPaperGrade(@Param("paper") AnalyzeSearchVo paper);
    /**
     * 获取年级下作业统计列表
     * @Param [paper]
     * @Author ywx
     * @Date 2020/9/28 10:21
     * @return java.util.List<com.xhkjedu.vo.paper.PaperGAnalyzeVo>
     **/
    //List<PaperGAnalyzeVo> listPaperGrade(@Param("paper") AnalyzeSearchVo paper);

    //作业统计--按学生列表
    List<Map> listPaperStuGrade(@Param("paper") AnalyzeSearchVo paper);

    //作业统计--按学生详情
    List<AStudentPaperVo> listPaperStuDetail(@Param("paper") AnalyzeSearchVo paper);

    //作业统计--按学生作业列表
    List<AStudentPaperVo> listPaperStuExport(@Param("paper") AnalyzeSearchVo paper);

    //作业统计--按学生--年级下所有学生作业情况
    List<AStudentPaperVo> listPaperAllClassStu(@Param("paper") AnalyzeSearchVo paper);

    //作业母题列表
    List<PaperStudentQuestionVo> listQuestionByQuestionIds(@Param("questionids") List<String> questionids);

    //作业母题列表（无知识点）
    List<PaperStudentQuestionVo> listQuestionNoPointByQuestionIds(@Param("questionids") List<String> questionids);
}
