wangliang 4 tahun lalu
induk
melakukan
676f4751e9

+ 2 - 4
themis-business/src/main/resources/mapper/TEExamReexamMapper.xml

@@ -14,11 +14,9 @@
             tees.course_name as courseName,
             tees.exam_id as examId,
             tee.exam_count - tees.already_exam_count as examCount,
-            toer.status
+            (select count(1) from t_oe_exam_record toer where toer.status <![CDATA[ <> ]]> 'FINISHED') as statusCount
         from
             t_e_exam_student tees
-            left join t_oe_exam_record toer on
-            toer.exam_student_id = toer.exam_student_id
             left join t_e_exam tee on
             tees.exam_id = tee.id
             inner join (select distinct tbeiu.room_code from t_b_exam_invigilate_user tbeiu
@@ -47,7 +45,7 @@
                 </if>
                 and tees.enable = 1
             </where>
-        ) t where t.examCount = 0 and status = 'finished'
+        ) t where t.examCount = 0 and statusCount = 0
             order by t.roomCode
     </select>