|
@@ -136,7 +136,7 @@
|
|
|
<if test="status != null and status != ''">
|
|
|
<choose>
|
|
|
<when test="status == 'EXAMING'">
|
|
|
- and (t.status = 'ANSWERING' or t.status = 'RESUME_PREPARE')
|
|
|
+ and (t.status = 'ANSWERING' or t.status = 'RESUME_PREPARE' or t.status = 'BREAK_OFF')
|
|
|
</when>
|
|
|
<otherwise>
|
|
|
and t.status = #{status}
|
|
@@ -230,37 +230,135 @@
|
|
|
</select>
|
|
|
|
|
|
<select id="invigilatePageListVideo" resultType="com.qmth.themis.business.bean.admin.InvigilateListVideoBean">
|
|
|
+ select (@i := @i + 1) as seq,t.* from(
|
|
|
select
|
|
|
- (@i := @i + 1) as seq,
|
|
|
- t.*
|
|
|
+ temp.*,
|
|
|
+ toer.id as examRecordId,
|
|
|
+ IFNULL(toer.paper_download,1) as paperDownload,
|
|
|
+ toer.status as statusCode,
|
|
|
+ TRUNCATE(toer.answer_progress,2) as progress,
|
|
|
+ IFNULL(toer.client_current_ip,'无') as clientCurrentIp,
|
|
|
+ IFNULL(toer.warning_count,0) as warningCount,
|
|
|
+ IFNULL(toer.breach_status,1) as breachStatus,
|
|
|
+ IFNULL(toer.client_websocket_status,'OFF_LINE') as clientWebsocketStatus,
|
|
|
+ toer.client_last_sync_time as updateTime,
|
|
|
+ toer.monitor_video_source as monitorVideoSource,
|
|
|
+ toer.monitor_record as monitorRecord,
|
|
|
+ toer.finish_type as finishType
|
|
|
+ ,(select count(1) from t_ie_invigilate_warn_info tiiwi where tiiwi.exam_record_id = toer.id and
|
|
|
+ tiiwi.approve_status = 0) as warningNew
|
|
|
from
|
|
|
(
|
|
|
- <include refid="invigilatePageHead"/>
|
|
|
- <!--,t.monitor_live_url as monitorLiveUrl-->
|
|
|
- ,(select count(1) from t_ie_invigilate_warn_info tiiwi where tiiwi.exam_record_id = t.id and
|
|
|
- tiiwi.approve_status = 0) as warningNew
|
|
|
- <include refid="invigilatePageMiddle"/>
|
|
|
- <include refid="invigilatePageFoot"/>
|
|
|
- <if test="paperDownload != null and paperDownload != '' or paperDownload == 0">
|
|
|
- and t.paper_download = #{paperDownload}
|
|
|
+ select
|
|
|
+ distinct s.exam_id as examId,
|
|
|
+ tee.name as examName,
|
|
|
+ s.exam_activity_id as examActivityId,
|
|
|
+ teea.code as examActivityCode,
|
|
|
+ s.id as examStudentId,
|
|
|
+ s.identity,
|
|
|
+ s.room_code as roomCode,
|
|
|
+ s.room_name as roomName,
|
|
|
+ s.name,
|
|
|
+ s.course_name as courseName,
|
|
|
+ s.course_code as courseCode,
|
|
|
+ tes.mobile_number as mobileNumber
|
|
|
+ from
|
|
|
+ t_e_exam_student s
|
|
|
+ left join t_e_exam tee on
|
|
|
+ tee.id = s.exam_id
|
|
|
+ left join t_e_exam_activity teea on
|
|
|
+ teea.id = s.exam_activity_id
|
|
|
+ left join t_e_student tes on
|
|
|
+ s.student_id = tes.id
|
|
|
+ WHERE
|
|
|
+ <choose>
|
|
|
+ <when test="status != null and status != '' and status == 'UN_FINISH'">
|
|
|
+ NOT EXISTS(
|
|
|
+ </when>
|
|
|
+ <otherwise>
|
|
|
+ EXISTS(
|
|
|
+ </otherwise>
|
|
|
+ </choose>
|
|
|
+ select
|
|
|
+ toer.exam_student_id
|
|
|
+ from
|
|
|
+ t_oe_exam_record toer
|
|
|
+ where
|
|
|
+ s.id = toer.exam_student_id
|
|
|
+ <!--<if test="status != null and status != '' and status == 'UN_FINISH'">
|
|
|
+ and (toer.STATUS = 'FINISHED' or toer.STATUS = 'PERSISTED')
|
|
|
+ and toer.first_start_time is not null
|
|
|
+ </if>-->
|
|
|
+ )
|
|
|
+ <if test="examId != null and examId != ''">
|
|
|
+ and s.exam_id = #{examId}
|
|
|
</if>
|
|
|
- <if test="status == null or status == ''">
|
|
|
- and (t.status = 'FIRST_PREPARE' or t.status = 'ANSWERING' or t.status = 'BREAK_OFF' or t.status =
|
|
|
- 'RESUME_PREPARE')
|
|
|
+ <if test="userId != null and userId != ''">
|
|
|
+ and exists (select tbeiu.exam_id from t_b_exam_invigilate_user tbeiu
|
|
|
+ where tbeiu.user_id = #{userId}
|
|
|
+ and tbeiu.exam_id = s.exam_id and tbeiu.room_code = s.room_code)
|
|
|
</if>
|
|
|
- <if test="cameraMonitorStatus != null and cameraMonitorStatus != ''">
|
|
|
- and t.camera_monitor_status = upper(#{cameraMonitorStatus})
|
|
|
+ <if test="orgId != null and orgId != ''">
|
|
|
+ and tee.org_id = #{orgId}
|
|
|
</if>
|
|
|
- <if test="screenMonitorStatus != null and screenMonitorStatus != ''">
|
|
|
- and t.screen_monitor_status = upper(#{screenMonitorStatus})
|
|
|
+ <if test="examActivityId != null and examActivityId != ''">
|
|
|
+ and s.exam_activity_id = #{examActivityId}
|
|
|
</if>
|
|
|
- <if test="mobileFirstMonitorStatus != null and mobileFirstMonitorStatus != ''">
|
|
|
- and t.mobile_first_monitor_status = upper(#{mobileFirstMonitorStatus})
|
|
|
+ <if test="roomCode != null and roomCode != ''">
|
|
|
+ and s.room_code = #{roomCode}
|
|
|
</if>
|
|
|
- <if test="mobileSecondMonitorStatus != null and mobileSecondMonitorStatus != ''">
|
|
|
- and t.mobile_second_monitor_status = upper(#{mobileSecondMonitorStatus})
|
|
|
+ <if test="name != null and name !=''">
|
|
|
+ and s.name like CONCAT('%', #{name},'%')
|
|
|
</if>
|
|
|
- ) t,
|
|
|
+ <if test="identity != null and identity !=''">
|
|
|
+ and s.identity like CONCAT('%', #{identity},'%')
|
|
|
+ </if>
|
|
|
+ and teea.finish_time > unix_timestamp(current_timestamp()) * 1000
|
|
|
+ ) temp
|
|
|
+ left join t_oe_exam_record toer on
|
|
|
+ toer.exam_student_id = temp.examStudentId
|
|
|
+ <where> 1 = 1
|
|
|
+ <if test="status != null and status != '' and status != 'UN_FINISH'">
|
|
|
+ <choose>
|
|
|
+ <when test="status == 'EXAMING'">
|
|
|
+ and (toer.status = 'ANSWERING' or toer.status = 'RESUME_PREPARE' or toer.status = 'BREAK_OFF')
|
|
|
+ </when>
|
|
|
+ <otherwise>
|
|
|
+ and toer.status = #{status}
|
|
|
+ </otherwise>
|
|
|
+ </choose>
|
|
|
+ </if>
|
|
|
+ <!--<if test="status != null and status != '' and status == 'UN_FINISH'">
|
|
|
+ and (toer.first_start_time is null or toer.first_prepare_time is null)
|
|
|
+ </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>
|
|
|
+ <if test="clientWebsocketStatus != null and clientWebsocketStatus != ''">
|
|
|
+ and toer.client_websocket_status = #{clientWebsocketStatus}
|
|
|
+ </if>
|
|
|
+ <if test="paperDownload != null and paperDownload != '' or paperDownload == 0">
|
|
|
+ and toer.paper_download = #{paperDownload}
|
|
|
+ </if>
|
|
|
+ <if test="status == null or status == ''">
|
|
|
+ and (toer.status = 'FIRST_PREPARE' or toer.status = 'ANSWERING' or toer.status = 'BREAK_OFF' or toer.status = 'RESUME_PREPARE')
|
|
|
+ </if>
|
|
|
+ <if test="cameraMonitorStatus != null and cameraMonitorStatus != ''">
|
|
|
+ and toer.camera_monitor_status = upper(#{cameraMonitorStatus})
|
|
|
+ </if>
|
|
|
+ <if test="screenMonitorStatus != null and screenMonitorStatus != ''">
|
|
|
+ and toer.screen_monitor_status = upper(#{screenMonitorStatus})
|
|
|
+ </if>
|
|
|
+ <if test="mobileFirstMonitorStatus != null and mobileFirstMonitorStatus != ''">
|
|
|
+ and toer.mobile_first_monitor_status = upper(#{mobileFirstMonitorStatus})
|
|
|
+ </if>
|
|
|
+ <if test="mobileSecondMonitorStatus != null and mobileSecondMonitorStatus != ''">
|
|
|
+ and toer.mobile_second_monitor_status = upper(#{mobileSecondMonitorStatus})
|
|
|
+ </if>
|
|
|
+ </where>) t,
|
|
|
(SELECT @i := 0) as i
|
|
|
order by t.warningNew desc
|
|
|
</select>
|
|
@@ -286,18 +384,122 @@
|
|
|
|
|
|
<select id="invigilatePagePatrolList" resultType="com.qmth.themis.business.bean.admin.InvigilateListPatrolBean">
|
|
|
select (@i := @i + 1) as seq,t.* from(
|
|
|
- <include refid="invigilatePageHead"/>
|
|
|
- ,(select count(1) from t_ie_invigilate_exception_info tiiei where tiiei.exam_record_id = t.id) as exceptionCount
|
|
|
- ,(select count(1) from t_ie_invigilate_warn_info tiiwi where tiiwi.exam_record_id = t.id and tiiwi.`type` =
|
|
|
+ select
|
|
|
+ temp.*,
|
|
|
+ toer.id as examRecordId,
|
|
|
+ IFNULL(toer.paper_download,1) as paperDownload,
|
|
|
+ toer.status as statusCode,
|
|
|
+ TRUNCATE(toer.answer_progress,2) as progress,
|
|
|
+ IFNULL(toer.client_current_ip,'无') as clientCurrentIp,
|
|
|
+ IFNULL(toer.warning_count,0) as warningCount,
|
|
|
+ IFNULL(toer.breach_status,1) as breachStatus,
|
|
|
+ IFNULL(toer.client_websocket_status,'OFF_LINE') as clientWebsocketStatus,
|
|
|
+ toer.client_last_sync_time as updateTime,
|
|
|
+ toer.monitor_video_source as monitorVideoSource,
|
|
|
+ toer.monitor_record as monitorRecord,
|
|
|
+ toer.finish_type as finishType
|
|
|
+ ,(select count(1) from t_ie_invigilate_exception_info tiiei where tiiei.exam_record_id = toer.id) as exceptionCount
|
|
|
+ ,(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
|
|
|
- <include refid="invigilatePageMiddle"/>
|
|
|
- <include refid="invigilatePageFoot"/>
|
|
|
- <if test="status == null or status == ''">
|
|
|
- and (t.status = 'FIRST_PREPARE' or t.status = 'ANSWERING' or t.status = 'BREAK_OFF' or t.status =
|
|
|
- 'RESUME_PREPARE')
|
|
|
+ from
|
|
|
+ (
|
|
|
+ select
|
|
|
+ distinct s.exam_id as examId,
|
|
|
+ tee.name as examName,
|
|
|
+ s.exam_activity_id as examActivityId,
|
|
|
+ teea.code as examActivityCode,
|
|
|
+ s.id as examStudentId,
|
|
|
+ s.identity,
|
|
|
+ s.room_code as roomCode,
|
|
|
+ s.room_name as roomName,
|
|
|
+ s.name,
|
|
|
+ s.course_name as courseName,
|
|
|
+ s.course_code as courseCode,
|
|
|
+ tes.mobile_number as mobileNumber
|
|
|
+ from
|
|
|
+ t_e_exam_student s
|
|
|
+ left join t_e_exam tee on
|
|
|
+ tee.id = s.exam_id
|
|
|
+ left join t_e_exam_activity teea on
|
|
|
+ teea.id = s.exam_activity_id
|
|
|
+ left join t_e_student tes on
|
|
|
+ s.student_id = tes.id
|
|
|
+ WHERE
|
|
|
+ <choose>
|
|
|
+ <when test="status != null and status != '' and status == 'UN_FINISH'">
|
|
|
+ NOT EXISTS(
|
|
|
+ </when>
|
|
|
+ <otherwise>
|
|
|
+ EXISTS(
|
|
|
+ </otherwise>
|
|
|
+ </choose>
|
|
|
+ select
|
|
|
+ toer.exam_student_id
|
|
|
+ from
|
|
|
+ t_oe_exam_record toer
|
|
|
+ where
|
|
|
+ s.id = toer.exam_student_id
|
|
|
+ <!--<if test="status != null and status != '' and status == 'UN_FINISH'">
|
|
|
+ and (toer.STATUS = 'FINISHED' or toer.STATUS = 'PERSISTED')
|
|
|
+ and toer.first_start_time is not null
|
|
|
+ </if>-->
|
|
|
+ )
|
|
|
+ <if test="examId != null and examId != ''">
|
|
|
+ and s.exam_id = #{examId}
|
|
|
</if>
|
|
|
- ) t,(SELECT @i := 0) as i
|
|
|
- <where>
|
|
|
+ <if test="userId != null and userId != ''">
|
|
|
+ and exists (select tbeiu.exam_id from t_b_exam_invigilate_user tbeiu
|
|
|
+ where tbeiu.user_id = #{userId}
|
|
|
+ and tbeiu.exam_id = s.exam_id and tbeiu.room_code = s.room_code)
|
|
|
+ </if>
|
|
|
+ <if test="orgId != null and orgId != ''">
|
|
|
+ and tee.org_id = #{orgId}
|
|
|
+ </if>
|
|
|
+ <if test="examActivityId != null and examActivityId != ''">
|
|
|
+ and s.exam_activity_id = #{examActivityId}
|
|
|
+ </if>
|
|
|
+ <if test="roomCode != null and roomCode != ''">
|
|
|
+ and s.room_code = #{roomCode}
|
|
|
+ </if>
|
|
|
+ <if test="name != null and name !=''">
|
|
|
+ and s.name like CONCAT('%', #{name},'%')
|
|
|
+ </if>
|
|
|
+ <if test="identity != null and identity !=''">
|
|
|
+ and s.identity like CONCAT('%', #{identity},'%')
|
|
|
+ </if>
|
|
|
+ and teea.finish_time > unix_timestamp(current_timestamp()) * 1000
|
|
|
+ ) temp
|
|
|
+ left join t_oe_exam_record toer on
|
|
|
+ toer.exam_student_id = temp.examStudentId
|
|
|
+ <where> 1 = 1
|
|
|
+ <if test="status != null and status != '' and status != 'UN_FINISH'">
|
|
|
+ <choose>
|
|
|
+ <when test="status == 'EXAMING'">
|
|
|
+ and (toer.status = 'ANSWERING' or toer.status = 'RESUME_PREPARE' or toer.status = 'BREAK_OFF')
|
|
|
+ </when>
|
|
|
+ <otherwise>
|
|
|
+ and toer.status = #{status}
|
|
|
+ </otherwise>
|
|
|
+ </choose>
|
|
|
+ </if>
|
|
|
+ <!--<if test="status != null and status != '' and status == 'UN_FINISH'">
|
|
|
+ and (toer.first_start_time is null or toer.first_prepare_time is null)
|
|
|
+ </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>
|
|
|
+ <if test="clientWebsocketStatus != null and clientWebsocketStatus != ''">
|
|
|
+ and toer.client_websocket_status = #{clientWebsocketStatus}
|
|
|
+ </if>
|
|
|
+ <if test="status == null or status == ''">
|
|
|
+ and (toer.status = 'FIRST_PREPARE' or toer.status = 'ANSWERING' or toer.status = 'BREAK_OFF' or toer.status = 'RESUME_PREPARE')
|
|
|
+ </if>
|
|
|
+ </where>) t,
|
|
|
+ (SELECT @i := 0) as i
|
|
|
+ <where> 1 = 1
|
|
|
<if test="minMultipleFaceCount != null and minMultipleFaceCount != '' or minMultipleFaceCount == 0">
|
|
|
and t.multipleFaceCount >= #{minMultipleFaceCount}
|
|
|
</if>
|
|
@@ -311,7 +513,7 @@
|
|
|
and t.exceptionCount <= #{maxExceptionCount}
|
|
|
</if>
|
|
|
</where>
|
|
|
- order by t.roomCode
|
|
|
+ order by t.roomCode desc
|
|
|
</select>
|
|
|
|
|
|
<select id="invigilatePageWarningList" resultType="com.qmth.themis.business.bean.admin.InvigilateListWarningBean">
|
|
@@ -379,7 +581,7 @@
|
|
|
</if>
|
|
|
</where>
|
|
|
) t,(SELECT @i := 0) as i
|
|
|
- <where>
|
|
|
+ <where> 1 = 1
|
|
|
<if test="minMultipleFaceCount != null and minMultipleFaceCount != '' or minMultipleFaceCount == 0">
|
|
|
and t.multipleFaceCount >= #{minMultipleFaceCount}
|
|
|
</if>
|
|
@@ -575,33 +777,141 @@
|
|
|
</select>
|
|
|
|
|
|
<select id="invigilatePageListHistory" resultType="com.qmth.themis.business.bean.admin.InvigilateListHistoryBean">
|
|
|
+ <include refid="invigilatePageListHistorySql" />
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <sql id="invigilatePageListHistorySql">
|
|
|
select (@i := @i + 1) as seq,t.* from(
|
|
|
- <include refid="invigilatePageHead"/>
|
|
|
- ,tes.mobile_number as mobileNumber
|
|
|
- ,t.finish_type as finishType
|
|
|
- ,(select count(1) from t_ie_invigilate_warn_info tiiwi where tiiwi.exam_record_id = t.id and tiiwi.`type` =
|
|
|
+ select
|
|
|
+ temp.*,
|
|
|
+ toer.id as examRecordId,
|
|
|
+ IFNULL(toer.paper_download,1) as paperDownload,
|
|
|
+ toer.status as statusCode,
|
|
|
+ TRUNCATE(toer.answer_progress,2) as progress,
|
|
|
+ IFNULL(toer.client_current_ip,'无') as clientCurrentIp,
|
|
|
+ IFNULL(toer.warning_count,0) as warningCount,
|
|
|
+ IFNULL(toer.breach_status,1) as breachStatus,
|
|
|
+ IFNULL(toer.client_websocket_status,'OFF_LINE') as clientWebsocketStatus,
|
|
|
+ toer.client_last_sync_time as updateTime,
|
|
|
+ toer.monitor_video_source as monitorVideoSource,
|
|
|
+ toer.monitor_record as monitorRecord,
|
|
|
+ toer.finish_type as finishType
|
|
|
+ ,(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 = t.id) as exceptionCount
|
|
|
- <include refid="invigilatePageMiddle"/>
|
|
|
- left join t_e_student tes on s.student_id = tes.id
|
|
|
- <include refid="invigilatePageHistoryFoot"/>
|
|
|
- <if test="breachStatus != null and breachStatus != '' or breachStatus == 0">
|
|
|
- <if test="breachStatus == 0">
|
|
|
- and t.breach_status = #{breachStatus}
|
|
|
- </if>
|
|
|
- <if test="breachStatus == 1">
|
|
|
- and (t.breach_status = #{breachStatus} or t.breach_status is null)
|
|
|
- </if>
|
|
|
+ ,(select count(1) from t_ie_invigilate_exception_info tiiei where tiiei.exam_record_id = toer.id) as exceptionCount
|
|
|
+ from
|
|
|
+ (
|
|
|
+ select
|
|
|
+ distinct s.exam_id as examId,
|
|
|
+ tee.name as examName,
|
|
|
+ s.exam_activity_id as examActivityId,
|
|
|
+ teea.code as examActivityCode,
|
|
|
+ s.id as examStudentId,
|
|
|
+ s.identity,
|
|
|
+ s.room_code as roomCode,
|
|
|
+ s.room_name as roomName,
|
|
|
+ s.name,
|
|
|
+ s.course_name as courseName,
|
|
|
+ s.course_code as courseCode,
|
|
|
+ tes.mobile_number as mobileNumber
|
|
|
+ from
|
|
|
+ t_e_exam_student s
|
|
|
+ left join t_e_exam tee on
|
|
|
+ tee.id = s.exam_id
|
|
|
+ left join t_e_exam_activity teea on
|
|
|
+ teea.id = s.exam_activity_id
|
|
|
+ left join t_e_student tes on
|
|
|
+ s.student_id = tes.id
|
|
|
+ WHERE
|
|
|
+ <choose>
|
|
|
+ <when test="status != null and status != '' and status == 'UN_FINISH'">
|
|
|
+ NOT EXISTS(
|
|
|
+ </when>
|
|
|
+ <otherwise>
|
|
|
+ EXISTS(
|
|
|
+ </otherwise>
|
|
|
+ </choose>
|
|
|
+ select
|
|
|
+ toer.exam_student_id
|
|
|
+ from
|
|
|
+ t_oe_exam_record toer
|
|
|
+ where
|
|
|
+ s.id = toer.exam_student_id
|
|
|
+ <!--<if test="status != null and status != '' and status == 'UN_FINISH'">
|
|
|
+ and (toer.STATUS = 'FINISHED' or toer.STATUS = 'PERSISTED')
|
|
|
+ and toer.first_start_time is not null
|
|
|
+ </if>-->
|
|
|
+ )
|
|
|
+ <if test="examId != null and examId != ''">
|
|
|
+ and s.exam_id = #{examId}
|
|
|
+ </if>
|
|
|
+ <if test="userId != null and userId != ''">
|
|
|
+ and exists (select tbeiu.exam_id from t_b_exam_invigilate_user tbeiu
|
|
|
+ where tbeiu.user_id = #{userId}
|
|
|
+ and tbeiu.exam_id = s.exam_id and tbeiu.room_code = s.room_code)
|
|
|
+ </if>
|
|
|
+ <if test="orgId != null and orgId != ''">
|
|
|
+ and tee.org_id = #{orgId}
|
|
|
+ </if>
|
|
|
+ <if test="examActivityId != null and examActivityId != ''">
|
|
|
+ and s.exam_activity_id = #{examActivityId}
|
|
|
+ </if>
|
|
|
+ <if test="roomCode != null and roomCode != ''">
|
|
|
+ and s.room_code = #{roomCode}
|
|
|
+ </if>
|
|
|
+ <if test="name != null and name !=''">
|
|
|
+ and s.name like CONCAT('%', #{name},'%')
|
|
|
</if>
|
|
|
- <if test="finishType != null and finishType != ''">
|
|
|
- and t.finish_type = #{finishType}
|
|
|
+ <if test="identity != null and identity !=''">
|
|
|
+ and s.identity like CONCAT('%', #{identity},'%')
|
|
|
</if>
|
|
|
<if test="courseCode != null and courseCode != ''">
|
|
|
and s.course_code like CONCAT('%', #{courseCode},'%')
|
|
|
</if>
|
|
|
- ) t,
|
|
|
+ ) temp
|
|
|
+ left join t_oe_exam_record toer on
|
|
|
+ toer.exam_student_id = temp.examStudentId
|
|
|
+ <where> 1 = 1
|
|
|
+ <if test="status != null and status != '' and status != 'UN_FINISH'">
|
|
|
+ <choose>
|
|
|
+ <when test="status == 'EXAMING'">
|
|
|
+ and (toer.status = 'ANSWERING' or toer.status = 'RESUME_PREPARE' or toer.status = 'BREAK_OFF')
|
|
|
+ </when>
|
|
|
+ <otherwise>
|
|
|
+ and toer.status = #{status}
|
|
|
+ </otherwise>
|
|
|
+ </choose>
|
|
|
+ </if>
|
|
|
+ <!--<if test="status != null and status != '' and status == 'UN_FINISH'">
|
|
|
+ and (toer.first_start_time is null or toer.first_prepare_time is null)
|
|
|
+ </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>
|
|
|
+ <if test="breachStatus != null and breachStatus != '' or breachStatus == 0">
|
|
|
+ <if test="breachStatus == 0">
|
|
|
+ and toer.breach_status = #{breachStatus}
|
|
|
+ </if>
|
|
|
+ <if test="breachStatus == 1">
|
|
|
+ and (toer.breach_status = #{breachStatus} or toer.breach_status is null)
|
|
|
+ </if>
|
|
|
+ </if>
|
|
|
+ <if test="finishType != null and finishType != ''">
|
|
|
+ <choose>
|
|
|
+ <when test="finishType == 'ALL'">
|
|
|
+ and (toer.finish_type = 'MANUAL' or toer.finish_type = 'AUTO' or toer.finish_type = 'BREACH' or toer.finish_type = 'INTERRUPT')
|
|
|
+ </when>
|
|
|
+ <otherwise>
|
|
|
+ and toer.finish_type = #{finishType}
|
|
|
+ </otherwise>
|
|
|
+ </choose>
|
|
|
+ </if>
|
|
|
+ </where>) t,
|
|
|
(SELECT @i := 0) as i
|
|
|
- <where>
|
|
|
+ <where> 1 = 1
|
|
|
<if test="minMultipleFaceCount != null and minMultipleFaceCount != '' or minMultipleFaceCount == 0">
|
|
|
and t.multipleFaceCount >= #{minMultipleFaceCount}
|
|
|
</if>
|
|
@@ -616,6 +926,10 @@
|
|
|
</if>
|
|
|
</where>
|
|
|
order by t.roomCode
|
|
|
+ </sql>
|
|
|
+
|
|
|
+ <select id="invigilatePageListHistoryExport" resultType="com.qmth.themis.business.bean.admin.InvigilateListHistoryBean">
|
|
|
+ <include refid="invigilatePageListHistorySql" />
|
|
|
</select>
|
|
|
|
|
|
<select id="getDoneCount" resultType="java.util.Map">
|
|
@@ -1021,7 +1335,6 @@
|
|
|
#{roomCode}
|
|
|
</foreach>
|
|
|
and t.STATUS = 'FIRST_PREPARE'
|
|
|
- and t.client_websocket_status = 'ON_LINE'
|
|
|
union all
|
|
|
select
|
|
|
count(1) as c
|
|
@@ -1035,8 +1348,9 @@
|
|
|
<foreach collection="roomCodeSet" item="roomCode" index="index" open="(" close=")" separator=",">
|
|
|
#{roomCode}
|
|
|
</foreach>
|
|
|
- and t.STATUS = 'ANSWERING'
|
|
|
- and t.client_websocket_status = 'ON_LINE'
|
|
|
+ and ((t.STATUS = 'ANSWERING' and t.client_websocket_status = 'ON_LINE')
|
|
|
+ or t.STATUS = 'RESUME_PREPARE'
|
|
|
+ or t.STATUS = 'BREAK_OFF')
|
|
|
union all
|
|
|
select
|
|
|
count(distinct t.exam_student_id) as c
|
|
@@ -1052,6 +1366,71 @@
|
|
|
</foreach>
|
|
|
and (t.STATUS = 'FINISHED'
|
|
|
or t.STATUS = 'PERSISTED')
|
|
|
+ union all
|
|
|
+ select
|
|
|
+ count(distinct t.id) as c
|
|
|
+ from
|
|
|
+ t_e_exam_student t
|
|
|
+ left join t_e_exam_activity f on
|
|
|
+ t.exam_activity_id = f.id
|
|
|
+ left join t_e_exam tee on
|
|
|
+ tee.id = t.exam_id
|
|
|
+ where
|
|
|
+ NOT EXISTS(
|
|
|
+ select
|
|
|
+ toer.exam_student_id
|
|
|
+ from
|
|
|
+ t_oe_exam_record toer
|
|
|
+ where
|
|
|
+ t.id = toer.exam_student_id)
|
|
|
+ and t.exam_id = #{examId}
|
|
|
+ and t.room_code in
|
|
|
+ <foreach collection="roomCodeSet" item="roomCode" index="index" open="(" close=")" separator=",">
|
|
|
+ #{roomCode}
|
|
|
+ </foreach>
|
|
|
+ <!--
|
|
|
+ union all
|
|
|
+ select
|
|
|
+ count(distinct toer.exam_student_id) as c
|
|
|
+ from
|
|
|
+ t_oe_exam_record toer
|
|
|
+ left join t_e_exam_student t on
|
|
|
+ t.id = toer.exam_student_id
|
|
|
+ and t.exam_id = toer.exam_id
|
|
|
+ and t.exam_activity_id = toer.exam_activity_id
|
|
|
+ left join t_e_exam_activity f on
|
|
|
+ t.exam_activity_id = f.id
|
|
|
+ left join t_e_exam tee on
|
|
|
+ tee.id = t.exam_id
|
|
|
+ where
|
|
|
+ toer.exam_id = #{examId} and t.room_code in
|
|
|
+ <foreach collection="roomCodeSet" item="roomCode" index="index" open="(" close=")" separator=",">
|
|
|
+ #{roomCode}
|
|
|
+ </foreach>
|
|
|
+ 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 t.first_start_time is not null
|
|
|
+ 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">
|
|
@@ -1184,7 +1563,40 @@
|
|
|
</where>
|
|
|
)) t
|
|
|
where
|
|
|
- t.id = toer.exam_student_id)
|
|
|
+ t.id = toer.exam_student_id
|
|
|
+ <if test="monitorStatus != null and monitorStatus != '' and monitorStatus == 'FINISHED'">
|
|
|
+ and toer.first_start_time is not null
|
|
|
+ </if>)
|
|
|
+ union all
|
|
|
+ select
|
|
|
+ count(1)
|
|
|
+ from
|
|
|
+ t_e_exam_student tees
|
|
|
+ join t_e_exam tee on
|
|
|
+ tees.exam_id = tee.id
|
|
|
+ where
|
|
|
+ NOT EXISTS(
|
|
|
+ select
|
|
|
+ toer.exam_student_id
|
|
|
+ from
|
|
|
+ t_oe_exam_record toer
|
|
|
+ where
|
|
|
+ tees.id = toer.exam_student_id)
|
|
|
+ <if test="orgId != null and orgId != ''">
|
|
|
+ and tee.org_id = #{orgId}
|
|
|
+ </if>
|
|
|
+ <if test="examId != null and examId != ''">
|
|
|
+ and tees.exam_id = #{examId}
|
|
|
+ </if>
|
|
|
+ <if test="examActivityId != null and examActivityId != ''">
|
|
|
+ and tees.exam_activity_id = #{examActivityId}
|
|
|
+ </if>
|
|
|
+ <if test="roomCode != null and roomCode != ''">
|
|
|
+ and tees.room_code = #{roomCode}
|
|
|
+ </if>
|
|
|
+ <if test="courseCode != null and courseCode != ''">
|
|
|
+ and tees.course_code = #{courseCode}
|
|
|
+ </if>
|
|
|
</select>
|
|
|
|
|
|
<select id="examRecordDetailQuery" resultType="com.qmth.themis.business.cache.bean.ExamRecordDetailBean">
|