|
@@ -520,13 +520,17 @@
|
|
|
left join t_e_exam_activity teea on
|
|
|
teea.id = tees.exam_activity_id
|
|
|
left join t_e_student tes on tees.student_id = tes.id
|
|
|
- inner join (select distinct tbeiu.room_code from t_b_exam_invigilate_user
|
|
|
- tbeiu
|
|
|
- <if test="userId != null and userId != ''">
|
|
|
- where tbeiu.user_id = #{userId}
|
|
|
- </if>
|
|
|
- ) t on t.room_code = tees.room_code
|
|
|
<where>
|
|
|
+ exists(
|
|
|
+ select
|
|
|
+ distinct tbeiu.exam_id
|
|
|
+ from
|
|
|
+ t_b_exam_invigilate_user tbeiu where 1 = 1
|
|
|
+ <if test="userId != null and userId != ''">
|
|
|
+ and tbeiu.user_id = #{userId}
|
|
|
+ </if>
|
|
|
+ and tbeiu.exam_id = tees.exam_id
|
|
|
+ )
|
|
|
<if test="examId != null and examId != ''">
|
|
|
and tees.exam_id = #{examId}
|
|
|
</if>
|
|
@@ -578,13 +582,17 @@
|
|
|
left join t_e_exam_activity teea on
|
|
|
teea.id = tees.exam_activity_id
|
|
|
left join t_e_student tes on tees.student_id = tes.id
|
|
|
- inner join (select distinct tbeiu.room_code from t_b_exam_invigilate_user
|
|
|
- tbeiu
|
|
|
- <if test="userId != null and userId != ''">
|
|
|
- where tbeiu.user_id = #{userId}
|
|
|
- </if>
|
|
|
- ) t on t.room_code = tees.room_code
|
|
|
<where>
|
|
|
+ exists(
|
|
|
+ select
|
|
|
+ distinct tbeiu.exam_id
|
|
|
+ from
|
|
|
+ t_b_exam_invigilate_user tbeiu where 1 = 1
|
|
|
+ <if test="userId != null and userId != ''">
|
|
|
+ and tbeiu.user_id = #{userId}
|
|
|
+ </if>
|
|
|
+ and tbeiu.exam_id = tees.exam_id
|
|
|
+ )
|
|
|
<if test="examId != null and examId != ''">
|
|
|
and tees.exam_id = #{examId}
|
|
|
</if>
|
|
@@ -757,15 +765,13 @@
|
|
|
where
|
|
|
EXISTS (
|
|
|
select
|
|
|
- distinct tbeiu.room_code
|
|
|
+ distinct tbeiu.exam_id
|
|
|
from
|
|
|
- t_b_exam_invigilate_user tbeiu
|
|
|
- where
|
|
|
+ t_b_exam_invigilate_user tbeiu where 1 = 1
|
|
|
<if test="userId != null and userId != ''">
|
|
|
- tbeiu.user_id = #{userId} and
|
|
|
+ and tbeiu.user_id = #{userId}
|
|
|
</if>
|
|
|
- tbeiu.room_code = tees.room_code
|
|
|
- and toer.exam_student_id = tees.id))) t1 on
|
|
|
+ and tbeiu.exam_id = tees.exam_id))) t1 on
|
|
|
t1.id = t.id
|
|
|
<where> 1 = 1
|
|
|
<if test="examId != null and examId != ''">
|