|
@@ -2,7 +2,7 @@
|
|
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
<mapper namespace="com.qmth.teachcloud.report.business.mapper.TAExamCourseMapper">
|
|
|
|
|
|
- <select id="surveyTeacherList" resultType="com.qmth.teachcloud.report.business.bean.result.TAExamCourseResult">
|
|
|
+ <sql id="commonHead">
|
|
|
select
|
|
|
taec.id,
|
|
|
taec.course_code as courseCode,
|
|
@@ -18,23 +18,57 @@
|
|
|
taec.past_total_count as pastTotalCount,
|
|
|
taec.past_reality_count as pastRealityCount,
|
|
|
taec.absent_count as absentCount,
|
|
|
- taec.avg_score as avgScoreBefore,
|
|
|
- (1 - taec.pass_rate) as notPassRateBefore,
|
|
|
- taec.current_avg_score as currentAvgScoreBefore,
|
|
|
- (1 - taec.current_pass_rate) as currentNotPassRateBefore
|
|
|
+ taec.paper_avg_score as avgScoreBefore,
|
|
|
+ (1 - taec.paper_pass_rate) as notPassRateBefore,
|
|
|
+ taec.paper_current_avg_score as currentAvgScoreBefore,
|
|
|
+ (1 - taec.paper_current_pass_rate) as currentNotPassRateBefore,
|
|
|
+ taec.avg_score as avgScoreAfter,
|
|
|
+ (1 - taec.pass_rate) as notPassRateAfter,
|
|
|
+ taec.current_avg_score as currentAvgScoreAfter,
|
|
|
+ (1 - taec.current_pass_rate) as currentNotPassRateAfter,
|
|
|
+ taec.coefficient
|
|
|
+ </sql>
|
|
|
+
|
|
|
+ <sql id="commonCondition">
|
|
|
+ <if test="schoolId != null and schoolId != ''">
|
|
|
+ and taec.school_id = #{schoolId}
|
|
|
+ </if>
|
|
|
+ <if test="examId != null and examId != ''">
|
|
|
+ and taec.exam_id = #{examId}
|
|
|
+ </if>
|
|
|
+ </sql>
|
|
|
+
|
|
|
+ <sql id="commonMiddle">
|
|
|
from t_a_exam_course taec
|
|
|
- join t_b_exam tbe
|
|
|
+ join t_b_exam tbe
|
|
|
on tbe.id = taec.exam_id
|
|
|
+ </sql>
|
|
|
+
|
|
|
+ <select id="surveyTeacherList" resultType="com.qmth.teachcloud.report.business.bean.result.TAExamCourseResult">
|
|
|
+ <include refid="commonHead" />
|
|
|
+ <include refid="commonMiddle" />
|
|
|
<where>
|
|
|
- <if test="schoolId != null and schoolId != ''">
|
|
|
- and taec.school_id = #{schoolId}
|
|
|
- </if>
|
|
|
- <if test="examId != null and examId != ''">
|
|
|
- and taec.exam_id = #{examId}
|
|
|
- </if>
|
|
|
+ <include refid="commonCondition" />
|
|
|
<if test="semester != null and semester != ''">
|
|
|
and tbe.semester = #{courseCode}
|
|
|
</if>
|
|
|
</where>
|
|
|
</select>
|
|
|
+
|
|
|
+ <select id="surveyAspointsList" resultType="com.qmth.teachcloud.report.business.bean.result.TAExamCourseResult">
|
|
|
+ <include refid="commonHead" />
|
|
|
+ ,tbec.publish_status as status
|
|
|
+ <include refid="commonMiddle" />
|
|
|
+ on tbec.course_code = taec.course_code and tbec.exam_id = taec.exam_id
|
|
|
+ and tbec.school_id = taec.school_id
|
|
|
+ <where>
|
|
|
+ <include refid="commonCondition" />
|
|
|
+ <if test="courseCode != null and courseCode != ''">
|
|
|
+ and taec.course_code = #{courseCode}
|
|
|
+ </if>
|
|
|
+ <if test="publishStatus != null and publishStatus != ''">
|
|
|
+ and tbec.publish_status = #{publishStatus}
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ </select>
|
|
|
</mapper>
|