|
@@ -1429,39 +1429,19 @@
|
|
|
count(1) as c
|
|
|
from
|
|
|
t_e_exam_student tees
|
|
|
- join t_e_student tes on
|
|
|
- tees.student_id = tes.id
|
|
|
where 1 = 1
|
|
|
<if test="examId != null and examId != ''">
|
|
|
and tees.exam_id = #{examId}
|
|
|
</if>
|
|
|
- <if test="orgId != null and orgId != ''">
|
|
|
- and tes.org_id = #{orgId}
|
|
|
+ <if test="examActivityId != null and examActivityId != ''">
|
|
|
+ and tees.exam_activity_id = #{examActivityId}
|
|
|
+ </if>
|
|
|
+ <if test="roomCode != null and roomCode != ''">
|
|
|
+ and tees.room_code = #{roomCode}
|
|
|
+ </if>
|
|
|
+ <if test="courseCode != null and courseCode != ''">
|
|
|
+ and tees.course_code = #{courseCode}
|
|
|
</if>
|
|
|
- and exists(
|
|
|
- select
|
|
|
- tee.id
|
|
|
- from
|
|
|
- t_e_exam tee
|
|
|
- <where>1 = 1
|
|
|
- <if test="orgId != null and orgId != ''">
|
|
|
- and tee.org_id = #{orgId}
|
|
|
- </if>
|
|
|
- <if test="examId != null and examId != ''">
|
|
|
- and tee.id = #{examId}
|
|
|
- </if>
|
|
|
- <if test="examActivityId != null and examActivityId != ''">
|
|
|
- and tees.exam_activity_id = #{examActivityId}
|
|
|
- </if>
|
|
|
- <if test="roomCode != null and roomCode != ''">
|
|
|
- and tees.room_code = #{roomCode}
|
|
|
- </if>
|
|
|
- <if test="courseCode != null and courseCode != ''">
|
|
|
- and tees.course_code = #{courseCode}
|
|
|
- </if>
|
|
|
- and tes.org_id = tee.org_id
|
|
|
- </where>
|
|
|
- )
|
|
|
union all
|
|
|
select
|
|
|
count(distinct toer.exam_student_id) as c
|
|
@@ -1471,50 +1451,28 @@
|
|
|
<if test="examId != null and examId != ''">
|
|
|
and toer.exam_id = #{examId}
|
|
|
</if>
|
|
|
- and exists (
|
|
|
- select
|
|
|
- *
|
|
|
- from
|
|
|
- (
|
|
|
- select
|
|
|
+ and exists (select
|
|
|
tees.id
|
|
|
from
|
|
|
t_e_exam_student tees
|
|
|
- join t_e_student tes on
|
|
|
- tees.student_id = tes.id
|
|
|
where 1 = 1
|
|
|
<if test="examId != null and examId != ''">
|
|
|
and tees.exam_id = #{examId}
|
|
|
</if>
|
|
|
- and exists(
|
|
|
- select
|
|
|
- tee.id
|
|
|
- from
|
|
|
- t_e_exam tee
|
|
|
- <where> 1 = 1
|
|
|
- <if test="orgId != null and orgId != ''">
|
|
|
- and tee.org_id = #{orgId}
|
|
|
- </if>
|
|
|
- <if test="examId != null and examId != ''">
|
|
|
- and tee.id = #{examId}
|
|
|
- </if>
|
|
|
- <if test="examActivityId != null and examActivityId != ''">
|
|
|
- and tees.exam_activity_id = #{examActivityId}
|
|
|
- </if>
|
|
|
- <if test="roomCode != null and roomCode != ''">
|
|
|
- and tees.room_code = #{roomCode}
|
|
|
- </if>
|
|
|
- <if test="courseCode != null and courseCode != ''">
|
|
|
- and tees.course_code = #{courseCode}
|
|
|
- </if>
|
|
|
- and tes.org_id = tee.org_id
|
|
|
- </where>
|
|
|
- )) t
|
|
|
- where
|
|
|
- t.id = toer.exam_student_id
|
|
|
+ <if test="examActivityId != null and examActivityId != ''">
|
|
|
+ and tees.exam_activity_id = #{examActivityId}
|
|
|
+ </if>
|
|
|
+ <if test="roomCode != null and roomCode != ''">
|
|
|
+ and tees.room_code = #{roomCode}
|
|
|
+ </if>
|
|
|
+ <if test="courseCode != null and courseCode != ''">
|
|
|
+ and tees.course_code = #{courseCode}
|
|
|
+ </if>
|
|
|
+ and toer.exam_student_id = tees.id
|
|
|
+ )
|
|
|
<if test="monitorStatus != null and monitorStatus != '' and monitorStatus == 'FINISHED'">
|
|
|
and toer.first_start_time is not null
|
|
|
- </if>)
|
|
|
+ </if>
|
|
|
union all
|
|
|
select
|
|
|
count(1)
|