|
@@ -696,9 +696,21 @@
|
|
group by bes.teacher_id, su.real_name, bes.teach_class_name
|
|
group by bes.teacher_id, su.real_name, bes.teach_class_name
|
|
</select>
|
|
</select>
|
|
<select id="selectCountByQuery" resultType="java.lang.Integer">
|
|
<select id="selectCountByQuery" resultType="java.lang.Integer">
|
|
- select count(1) from mark_student ms left join basic_course bc on ms.course_id = bc.id
|
|
|
|
|
|
+ select count(1) from mark_student ms INNER join basic_course bc on ms.course_id = bc.id
|
|
|
|
+ <if test="dpr != null and dpr.orgIdSet != null and dpr.orgIdSet != '' and dpr.orgIdSet.size > 0">
|
|
|
|
+ AND bc.teaching_room_id IN
|
|
|
|
+ <foreach collection="dpr.orgIdSet" item="item" index="index" open="(" separator="," close=")">
|
|
|
|
+ #{item}
|
|
|
|
+ </foreach>
|
|
|
|
+ </if>
|
|
|
|
+ <if test="markStudent.markPaperStatus != null">
|
|
|
|
+ INNER JOIN mark_paper mp ON ms.exam_id = mp.exam_id
|
|
|
|
+ and ms.paper_number = mp.paper_number
|
|
|
|
+ and ms.paper_type = mp.paper_type
|
|
|
|
+ and mp.status = #{markStudent.markPaperStatus}
|
|
|
|
+ </if>
|
|
<where>
|
|
<where>
|
|
- and ms.exam_id = #{markStudent.examId}
|
|
|
|
|
|
+ ms.exam_id = #{markStudent.examId}
|
|
<if test="markStudent.courseId != null">
|
|
<if test="markStudent.courseId != null">
|
|
and ms.course_id = #{markStudent.courseId}
|
|
and ms.course_id = #{markStudent.courseId}
|
|
</if>
|
|
</if>
|
|
@@ -726,20 +738,8 @@
|
|
<if test="markStudent.missScan != null">
|
|
<if test="markStudent.missScan != null">
|
|
and ms.miss_scan = #{markStudent.missScan}
|
|
and ms.miss_scan = #{markStudent.missScan}
|
|
</if>
|
|
</if>
|
|
- <if test="dpr != null">
|
|
|
|
- <if test="dpr.requestUserId != null">
|
|
|
|
- AND ms.create_id = #{dpr.requestUserId}
|
|
|
|
- </if>
|
|
|
|
- <if test="dpr.orgIdSet != null and dpr.orgIdSet != '' and dpr.orgIdSet.size > 0">
|
|
|
|
- AND bc.teaching_room_id IN
|
|
|
|
- <foreach collection="dpr.orgIdSet" item="item" index="index" open="(" separator="," close=")">
|
|
|
|
- #{item}
|
|
|
|
- </foreach>
|
|
|
|
- </if>
|
|
|
|
- </if>
|
|
|
|
- <if test="markStudent.markPaperStatus != null">
|
|
|
|
- AND exists(select 1 from mark_paper mp where ms.exam_id = mp.exam_id and ms.paper_number =
|
|
|
|
- mp.paper_number and ms.paper_type = mp.paper_type and mp.status = #{markStudent.markPaperStatus})
|
|
|
|
|
|
+ <if test="dpr != null and dpr.requestUserId != null">
|
|
|
|
+ AND ms.create_id = #{dpr.requestUserId}
|
|
</if>
|
|
</if>
|
|
</where>
|
|
</where>
|
|
</select>
|
|
</select>
|
|
@@ -749,6 +749,18 @@
|
|
FROM
|
|
FROM
|
|
mark_student ms
|
|
mark_student ms
|
|
LEFT JOIN basic_course bc ON ms.course_id = bc.id
|
|
LEFT JOIN basic_course bc ON ms.course_id = bc.id
|
|
|
|
+ <if test="dpr != null and dpr.orgIdSet != null and dpr.orgIdSet != '' and dpr.orgIdSet.size > 0">
|
|
|
|
+ AND bc.teaching_room_id IN
|
|
|
|
+ <foreach collection="dpr.orgIdSet" item="item" index="index" open="(" separator="," close=")">
|
|
|
|
+ #{item}
|
|
|
|
+ </foreach>
|
|
|
|
+ </if>
|
|
|
|
+ <if test="markStudent.markPaperStatus != null">
|
|
|
|
+ INNER JOIN mark_paper mp ON ms.exam_id = mp.exam_id
|
|
|
|
+ and ms.paper_number = mp.paper_number
|
|
|
|
+ and ms.paper_type = mp.paper_type
|
|
|
|
+ and mp.status = #{markStudent.markPaperStatus}
|
|
|
|
+ </if>
|
|
<where>
|
|
<where>
|
|
ms.exam_id = #{markStudent.examId}
|
|
ms.exam_id = #{markStudent.examId}
|
|
<if test="markStudent.courseId != null">
|
|
<if test="markStudent.courseId != null">
|
|
@@ -763,20 +775,8 @@
|
|
<if test="markStudent.assignConfirmed != null">
|
|
<if test="markStudent.assignConfirmed != null">
|
|
AND ms.assign_confirmed = #{markStudent.assignConfirmed}
|
|
AND ms.assign_confirmed = #{markStudent.assignConfirmed}
|
|
</if>
|
|
</if>
|
|
- <if test="dpr != null">
|
|
|
|
- <if test="dpr.requestUserId != null">
|
|
|
|
- AND ms.create_id = #{dpr.requestUserId}
|
|
|
|
- </if>
|
|
|
|
- <if test="dpr.orgIdSet != null and dpr.orgIdSet != '' and dpr.orgIdSet.size > 0">
|
|
|
|
- AND bc.teaching_room_id IN
|
|
|
|
- <foreach collection="dpr.orgIdSet" item="item" index="index" open="(" separator="," close=")">
|
|
|
|
- #{item}
|
|
|
|
- </foreach>
|
|
|
|
- </if>
|
|
|
|
- </if>
|
|
|
|
- <if test="markStudent.markPaperStatus != null">
|
|
|
|
- AND exists(select 1 from mark_paper mp where ms.exam_id = mp.exam_id and ms.paper_number =
|
|
|
|
- mp.paper_number and ms.paper_type = mp.paper_type and mp.status = #{markStudent.markPaperStatus})
|
|
|
|
|
|
+ <if test="dpr != null and dpr.requestUserId != null">
|
|
|
|
+ AND ms.create_id = #{dpr.requestUserId}
|
|
</if>
|
|
</if>
|
|
</where>
|
|
</where>
|
|
</select>
|
|
</select>
|