Преглед на файлове

在线考试2022/05/20临时上线需求更改,缺考修改

wangliang преди 3 години
родител
ревизия
3b678d4952

+ 40 - 1
themis-business/src/main/resources/mapper/TEExamStudentMapper.xml

@@ -363,7 +363,46 @@
         </if>
         and toer.status = 'FIRST_PREPARE'
         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
         t.examActivityId,
         t.roomCode

+ 22 - 0
themis-business/src/main/resources/mapper/TOeExamRecordMapper.xml

@@ -1385,6 +1385,28 @@
         and toer.status = 'FIRST_PREPARE'
         and (toer.first_start_time is null
         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 s.room_code in
+        <foreach collection="roomCodeSet" item="roomCode" index="index" open="(" close=")" separator=",">
+            #{roomCode}
+        </foreach>
+        ) temp
+        where
+        temp.id = toer.exam_student_id)
     </select>
 
     <select id="findByOnlineInfoRecord" resultType="com.qmth.themis.business.entity.TOeExamRecord">