|
@@ -363,7 +363,46 @@
|
|
</if>
|
|
</if>
|
|
and toer.status = 'FIRST_PREPARE'
|
|
and toer.status = 'FIRST_PREPARE'
|
|
and (toer.first_start_time is null
|
|
and (toer.first_start_time is null
|
|
- or toer.first_prepare_time is null)) t
|
|
|
|
|
|
+ or toer.first_prepare_time is null)
|
|
|
|
+ and not exists(
|
|
|
|
+ select
|
|
|
|
+ *
|
|
|
|
+ from
|
|
|
|
+ (
|
|
|
|
+ select
|
|
|
|
+ distinct t.exam_student_id as id
|
|
|
|
+ from
|
|
|
|
+ t_oe_exam_record t
|
|
|
|
+ left join t_e_exam_student s on
|
|
|
|
+ t.exam_student_id = s.id
|
|
|
|
+ where
|
|
|
|
+ t.exam_id = #{examId}
|
|
|
|
+ and (t.STATUS = 'FINISHED'
|
|
|
|
+ or t.STATUS = 'PERSISTED')
|
|
|
|
+ and t.exam_activity_id in
|
|
|
|
+ <foreach collection="activityIds" item="acid" index="index"
|
|
|
|
+ open="(" close=")" separator=",">
|
|
|
|
+ #{acid}
|
|
|
|
+ </foreach>
|
|
|
|
+ <if test="activityId != null and activityId != ''">
|
|
|
|
+ and s.exam_activity_id = #{activityId}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="roomCode != null and roomCode != ''">
|
|
|
|
+ and s.room_code =#{roomCode}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="courseCode != null and courseCode != ''">
|
|
|
|
+ and s.course_code = #{courseCode}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="identity != null and identity != ''">
|
|
|
|
+ and s.identity like concat('%',#{identity},'%')
|
|
|
|
+ </if>
|
|
|
|
+ <if test="name != null and name != ''">
|
|
|
|
+ and s.name like concat('%',#{name},'%')
|
|
|
|
+ </if>
|
|
|
|
+ ) temp
|
|
|
|
+ where
|
|
|
|
+ temp.id = toer.exam_student_id)
|
|
|
|
+ ) t
|
|
order by
|
|
order by
|
|
t.examActivityId,
|
|
t.examActivityId,
|
|
t.roomCode
|
|
t.roomCode
|