<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.xhkjedu.smarking.mapper.report.reportother.MsrExamMapper">

    <!-- 清除单次考试报告 -->
    <delete id="deleteReportByExamid">
        delete from msr_class_goodbad where examid = #{examid};
        delete from msr_class_nearline where examid = #{examid};
        delete from msr_class_qobjsub where examid = #{examid};
        delete from msr_class_qtype where examid = #{examid};
        delete from msr_class_question where examid = #{examid};
        delete from msr_class_question_obj where examid = #{examid};
        delete from msr_class_rankgroup where examid = #{examid};
        delete from msr_class_rankrate where examid = #{examid};
        delete from msr_class_section where examid = #{examid};
        delete from msr_class_subject where examid = #{examid};
        delete from msr_class_subject_grade where examid = #{examid};
        delete from msr_class_top where examid = #{examid};
        delete from msr_exam where examid = #{examid};
        delete from msr_student where examid = #{examid};
        delete from msr_student_point where examid = #{examid};
        delete from msr_subject where examid = #{examid};
        delete from msr_subject_class where examid = #{examid};
        delete from msr_subject_point where examid = #{examid};
        delete from msr_subject_point_section where examid = #{examid};
        delete from msr_subject_question_rankgroup where examid = #{examid};
        delete from msr_subject_question_section where examid = #{examid};
    </delete>
    <!--获取单次考试的总分和最高分-->
    <select id="getFullAndMaxScoreByExamId" resultType="java.util.Map">
        select fullscore,maxscore from msr_exam where examid = #{examid} limit 1
    </select>
    <!--总分基本情况成绩分析-->
    <select id="getExamForHzZf" resultType="java.util.Map">
        select stunum,classnum,fullscore,maxscore,minscore,avgscore,bzc
        from msr_exam where examid = #{examid} limit 1
    </select>
</mapper>
