|
@@ -15,9 +15,11 @@
|
|
|
</select>
|
|
|
|
|
|
<select id="page" resultType="cn.com.qmth.mps.vo.paper.PaperVo">
|
|
|
- select t.*,c.name courseName,c.code courseCode,e.name examName from mps_paper
|
|
|
+ select t.*,c.name courseName,c.code courseCode,e.name examName from
|
|
|
+ mps_paper
|
|
|
t left join mps_course c on t.course_id=c.id
|
|
|
- left join mps_exam e on t.exam_id=e.id
|
|
|
+ left join
|
|
|
+ mps_exam e on t.exam_id=e.id
|
|
|
where
|
|
|
t.school_id=#{req.schoolId}
|
|
|
<if test="req.examId != null">
|
|
@@ -32,23 +34,67 @@
|
|
|
<if test="req.courseName != null and req.courseName !=''">
|
|
|
and c.name like concat('%', #{req.courseName}, '%')
|
|
|
</if>
|
|
|
- <if test="req.name != null and req.name !=''">
|
|
|
- and t.name like concat('%', #{req.name}, '%')
|
|
|
- </if>
|
|
|
<if test="req.totalScoreMin != null">
|
|
|
and t.total_score >=#{req.totalScoreMin}
|
|
|
</if>
|
|
|
<if test="req.totalScoreMax != null">
|
|
|
and t.total_score <=#{req.totalScoreMax}
|
|
|
</if>
|
|
|
-
|
|
|
+
|
|
|
order by t.update_time desc
|
|
|
</select>
|
|
|
<select id="list" resultType="cn.com.qmth.mps.vo.paper.PaperVo">
|
|
|
- select t.*,c.name courseName,c.code courseCode,e.name examName from mps_paper
|
|
|
- t left join mps_course c on t.course_id=c.id
|
|
|
+ select t.*,c.name courseName,c.code
|
|
|
+ courseCode,e.name examName from mps_paper
|
|
|
+ t left join mps_course c on
|
|
|
+ t.course_id=c.id
|
|
|
left join mps_exam e on t.exam_id=e.id
|
|
|
- where t.exam_id =#{req.examId}
|
|
|
+ where t.exam_id
|
|
|
+ =#{req.examId}
|
|
|
order by t.update_time desc
|
|
|
</select>
|
|
|
+
|
|
|
+ <select id="subjectiveList"
|
|
|
+ resultType="cn.com.qmth.mps.vo.paper.PaperStructInfoVo">
|
|
|
+ select t.*,t.id paperId,c.name courseName,c.code courseCode,d.name
|
|
|
+ detailname,d.number detailNumber,u.number
|
|
|
+ unitNumber,u.score,u.score_step,gg.number groupNumber from mps_paper
|
|
|
+ t
|
|
|
+ left join mps_course
|
|
|
+ c on t.course_id=c.id
|
|
|
+ left join mps_exam e on
|
|
|
+ t.exam_id=e.id
|
|
|
+ left join
|
|
|
+ mps_paper_detail d on t.id=d.paper_id
|
|
|
+ left join
|
|
|
+ mps_paper_detail_unit u on d.id=u.detail_id
|
|
|
+ left join
|
|
|
+ mps_paper_group_unit g on g.paper_id=t.id and g.detail_number=d.number
|
|
|
+ and
|
|
|
+ g.detail_unit_number=u.number
|
|
|
+ left join mps_paper_group gg on
|
|
|
+ g.group_id=gg.id
|
|
|
+ where
|
|
|
+ t.school_id=#{req.schoolId}
|
|
|
+ <if test="req.examId != null">
|
|
|
+ and t.exam_id =#{req.examId}
|
|
|
+ </if>
|
|
|
+ <if test="req.groupFinish != null">
|
|
|
+ and t.group_finish =#{req.groupFinish}
|
|
|
+ </if>
|
|
|
+ <if test="req.courseCode != null and req.courseCode !=''">
|
|
|
+ and c.code like concat('%', #{req.courseCode}, '%')
|
|
|
+ </if>
|
|
|
+ <if test="req.courseName != null and req.courseName !=''">
|
|
|
+ and c.name like concat('%', #{req.courseName}, '%')
|
|
|
+ </if>
|
|
|
+ <if test="req.totalScoreMin != null">
|
|
|
+ and t.total_score >=#{req.totalScoreMin}
|
|
|
+ </if>
|
|
|
+ <if test="req.totalScoreMax != null">
|
|
|
+ and t.total_score <=#{req.totalScoreMax}
|
|
|
+ </if>
|
|
|
+
|
|
|
+ order by t.id,d.number,u.number
|
|
|
+ </select>
|
|
|
</mapper>
|