|
@@ -394,6 +394,93 @@
|
|
|
order by t.roomCode
|
|
|
</select>
|
|
|
|
|
|
+ <update id="approveStatusListUpdate">
|
|
|
+ update t_ie_invigilate_warn_info tiiwi set tiiwi.approve_status = 0
|
|
|
+ where exists(
|
|
|
+ select t.warningId from(select
|
|
|
+ tiiwi.id as warningId,
|
|
|
+ tee.id as examId,
|
|
|
+ tee.name as examName,
|
|
|
+ teea.id as examActivityId,
|
|
|
+ tees.id as examStudentId,
|
|
|
+ teea.code as examActivityCode,
|
|
|
+ tees.room_code as roomCode,
|
|
|
+ tees.room_name as roomName,
|
|
|
+ toer.id as examRecordId,
|
|
|
+ tees.`identity`,
|
|
|
+ tees.name,
|
|
|
+ tees.course_code as courseCode,
|
|
|
+ tees.course_name as courseName,
|
|
|
+ toer.status as statusCode,
|
|
|
+ IFNULL(toer.warning_count,0) as warningCount,
|
|
|
+ IFNULL(toer.breach_status,1) as breachStatus,
|
|
|
+ toer.client_last_sync_time as updateTime,
|
|
|
+ tiiwi.approve_status as approveStatus
|
|
|
+ ,(select count(1) from t_ie_invigilate_warn_info tiiwi where
|
|
|
+ tiiwi.exam_record_id = toer.id and tiiwi.`type` =
|
|
|
+ 'FACE_COUNT_ERROR' and tiiwi.`level` = 'D8') as multipleFaceCount
|
|
|
+ ,(select count(1) from t_ie_invigilate_exception_info tiiei where
|
|
|
+ tiiei.exam_record_id = toer.id) as exceptionCount
|
|
|
+ from t_ie_invigilate_warn_info tiiwi
|
|
|
+ left join t_e_exam tee on tee.id = tiiwi.exam_id
|
|
|
+ left join t_e_exam_activity teea on teea.id = tiiwi.exam_activity_id
|
|
|
+ inner join (select toer.id from t_oe_exam_record toer where EXISTS(select
|
|
|
+ tees.id from t_e_exam_student tees where EXISTS (select distinct
|
|
|
+ tbeiu.room_code from t_b_exam_invigilate_user tbeiu
|
|
|
+ where
|
|
|
+ <if test="userId != null and userId != ''">
|
|
|
+ tbeiu.user_id = #{userId} and
|
|
|
+ </if>
|
|
|
+ tbeiu.room_code = tees.room_code and toer.exam_student_id = tees.id)))
|
|
|
+ t on t.id = tiiwi.exam_record_id
|
|
|
+ left join t_oe_exam_record toer on toer.id = t.id
|
|
|
+ left join t_e_exam_student tees on tees.id = tiiwi.exam_student_id
|
|
|
+ <where>
|
|
|
+ <if test="examId != null and examId != ''">
|
|
|
+ and tiiwi.exam_id = #{examId}
|
|
|
+ </if>
|
|
|
+ <if test="examActivityId != null and examActivityId != ''">
|
|
|
+ and tiiwi.exam_activity_id = #{examActivityId}
|
|
|
+ </if>
|
|
|
+ <if test="roomCode != null and roomCode != ''">
|
|
|
+ and tees.room_code = #{roomCode}
|
|
|
+ </if>
|
|
|
+ <if test="approveStatus != null and approveStatus != '' or approveStatus == 0">
|
|
|
+ and tiiwi.approve_status = #{approveStatus}
|
|
|
+ </if>
|
|
|
+ <if test="name != null and name !=''">
|
|
|
+ and tees.name like CONCAT('%', #{name},'%')
|
|
|
+ </if>
|
|
|
+ <if test="identity != null and identity !=''">
|
|
|
+ and tees.identity like CONCAT('%', #{identity},'%')
|
|
|
+ </if>
|
|
|
+ <if test="maxWarningCount != null and maxWarningCount != '' or maxWarningCount == 0">
|
|
|
+ and toer.warning_count <= #{maxWarningCount}
|
|
|
+ </if>
|
|
|
+ <if test="minWarningCount != null and minWarningCount != '' or minWarningCount == 0">
|
|
|
+ and toer.warning_count >= #{minWarningCount}
|
|
|
+ </if>
|
|
|
+ and tee.enable = 1
|
|
|
+ and teea.enable = 1
|
|
|
+ </where>
|
|
|
+ ) t
|
|
|
+ <where> 1 = 1
|
|
|
+ <if test="minMultipleFaceCount != null and minMultipleFaceCount != '' or minMultipleFaceCount == 0">
|
|
|
+ and t.multipleFaceCount >= #{minMultipleFaceCount}
|
|
|
+ </if>
|
|
|
+ <if test="maxMultipleFaceCount != null and maxMultipleFaceCount != '' or maxMultipleFaceCount == 0">
|
|
|
+ and t.multipleFaceCount <= #{maxMultipleFaceCount}
|
|
|
+ </if>
|
|
|
+ <if test="minExceptionCount != null and minExceptionCount != '' or minExceptionCount == 0">
|
|
|
+ and t.exceptionCount >= #{minExceptionCount}
|
|
|
+ </if>
|
|
|
+ <if test="maxExceptionCount != null and maxExceptionCount != '' or maxExceptionCount == 0">
|
|
|
+ and t.exceptionCount <= #{maxExceptionCount}
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ and t.warningId = tiiwi.id)
|
|
|
+ </update>
|
|
|
+
|
|
|
<select id="invigilatePageProgressList" resultType="com.qmth.themis.business.bean.backend.InvigilateListProgressBean">
|
|
|
select
|
|
|
distinct tee.id as examId,
|