|
@@ -11,20 +11,20 @@
|
|
t.exam_student_id examStudentId,
|
|
t.exam_student_id examStudentId,
|
|
t.id examRecordId,
|
|
t.id examRecordId,
|
|
INSERT(rpad(substring(s.identity, 1, 2), char_length(s.identity), '*'),char_length(s.identity)-1,char_length(s.identity),substring(s.identity, char_length(s.identity) - 1 , char_length(s.identity) - 2)) as identity,
|
|
INSERT(rpad(substring(s.identity, 1, 2), char_length(s.identity), '*'),char_length(s.identity)-1,char_length(s.identity),substring(s.identity, char_length(s.identity) - 1 , char_length(s.identity) - 2)) as identity,
|
|
- s.room_code roomCode,
|
|
|
|
- s.room_name roomName,
|
|
|
|
- s.name name,
|
|
|
|
- s.course_name courseName,
|
|
|
|
- s.course_code courseCode,
|
|
|
|
- IFNULL(t.paper_download,1) paperDownload,
|
|
|
|
- t.status statusCode,
|
|
|
|
- TRUNCATE(t.answer_progress,2) progress,
|
|
|
|
- IFNULL(t.client_current_ip,'无') clientCurrentIp,
|
|
|
|
- IFNULL(t.warning_count,0) as warningCount,
|
|
|
|
- IFNULL(t.breach_status,1) as breachStatus,
|
|
|
|
- IFNULL(t.client_websocket_status,'OFF_LINE') as clientWebsocketStatus,
|
|
|
|
- t.client_last_sync_time as updateTime,
|
|
|
|
- t.monitor_video_source as monitorVideoSource,
|
|
|
|
|
|
+ s.room_code roomCode,
|
|
|
|
+ s.room_name roomName,
|
|
|
|
+ s.name name,
|
|
|
|
+ s.course_name courseName,
|
|
|
|
+ s.course_code courseCode,
|
|
|
|
+ IFNULL(t.paper_download,1) paperDownload,
|
|
|
|
+ t.status statusCode,
|
|
|
|
+ TRUNCATE(t.answer_progress,2) progress,
|
|
|
|
+ IFNULL(t.client_current_ip,'无') clientCurrentIp,
|
|
|
|
+ IFNULL(t.warning_count,0) as warningCount,
|
|
|
|
+ IFNULL(t.breach_status,1) as breachStatus,
|
|
|
|
+ IFNULL(t.client_websocket_status,'OFF_LINE') as clientWebsocketStatus,
|
|
|
|
+ t.client_last_sync_time as updateTime,
|
|
|
|
+ t.monitor_video_source as monitorVideoSource,
|
|
t.monitor_record as monitorRecord
|
|
t.monitor_record as monitorRecord
|
|
</sql>
|
|
</sql>
|
|
|
|
|
|
@@ -759,7 +759,18 @@
|
|
<sql id="invigilatePageListHistorySql">
|
|
<sql id="invigilatePageListHistorySql">
|
|
select (@i := @i + 1) as seq,t.* from(
|
|
select (@i := @i + 1) as seq,t.* from(
|
|
select
|
|
select
|
|
- temp.*,
|
|
|
|
|
|
+ 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,
|
|
toer.id as examRecordId,
|
|
toer.id as examRecordId,
|
|
IFNULL(toer.paper_download,1) as paperDownload,
|
|
IFNULL(toer.paper_download,1) as paperDownload,
|
|
toer.status as statusCode,
|
|
toer.status as statusCode,
|
|
@@ -772,26 +783,18 @@
|
|
toer.monitor_video_source as monitorVideoSource,
|
|
toer.monitor_video_source as monitorVideoSource,
|
|
toer.monitor_record as monitorRecord,
|
|
toer.monitor_record as monitorRecord,
|
|
toer.finish_type as finishType
|
|
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 = toer.id) as
|
|
|
|
|
|
+ ,(select count(1) from t_ie_invigilate_warn_info tiiwi where 1 = 1
|
|
|
|
+ <if test="examId != null and examId != ''">
|
|
|
|
+ and tiiwi.exam_id = #{examId}
|
|
|
|
+ </if>
|
|
|
|
+ and 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 1 = 1
|
|
|
|
+ <if test="examId != null and examId != ''">
|
|
|
|
+ and tiiei.exam_id = #{examId}
|
|
|
|
+ </if>
|
|
|
|
+ and tiiei.exam_record_id = toer.id) as
|
|
exceptionCount
|
|
exceptionCount
|
|
from
|
|
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
|
|
t_e_exam_student s
|
|
left join t_e_exam tee on
|
|
left join t_e_exam tee on
|
|
tee.id = s.exam_id
|
|
tee.id = s.exam_id
|
|
@@ -799,33 +802,26 @@
|
|
teea.id = s.exam_activity_id
|
|
teea.id = s.exam_activity_id
|
|
left join t_e_student tes on
|
|
left join t_e_student tes on
|
|
s.student_id = tes.id
|
|
s.student_id = tes.id
|
|
- WHERE
|
|
|
|
|
|
+ left join t_oe_exam_record toer on toer.exam_student_id = s.id
|
|
|
|
+ WHERE 1 = 1
|
|
<choose>
|
|
<choose>
|
|
<when test="status != null and status != '' and status == 'UN_FINISH'">
|
|
<when test="status != null and status != '' and status == 'UN_FINISH'">
|
|
- NOT EXISTS(
|
|
|
|
|
|
+ and toer.id is null
|
|
</when>
|
|
</when>
|
|
<otherwise>
|
|
<otherwise>
|
|
- EXISTS(
|
|
|
|
|
|
+ and toer.id is not null
|
|
</otherwise>
|
|
</otherwise>
|
|
</choose>
|
|
</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 != ''">
|
|
<if test="examId != null and examId != ''">
|
|
and s.exam_id = #{examId}
|
|
and s.exam_id = #{examId}
|
|
</if>
|
|
</if>
|
|
<if test="userId != null and userId != ''">
|
|
<if test="userId != null and userId != ''">
|
|
and exists (select tbeiu.exam_id from t_b_exam_invigilate_user tbeiu
|
|
and exists (select tbeiu.exam_id from t_b_exam_invigilate_user tbeiu
|
|
where tbeiu.user_id = #{userId}
|
|
where tbeiu.user_id = #{userId}
|
|
- and tbeiu.exam_id = s.exam_id and tbeiu.room_code = s.room_code)
|
|
|
|
|
|
+ <if test="orgId != null and orgId != ''">
|
|
|
|
+ and tbeiu.org_id = #{orgId}
|
|
|
|
+ </if>
|
|
|
|
+ and tbeiu.exam_id = s.exam_id and tbeiu.org_id = tee.org_id and tbeiu.room_code = s.room_code)
|
|
</if>
|
|
</if>
|
|
<if test="orgId != null and orgId != ''">
|
|
<if test="orgId != null and orgId != ''">
|
|
and tee.org_id = #{orgId}
|
|
and tee.org_id = #{orgId}
|
|
@@ -845,64 +841,59 @@
|
|
<if test="courseCode != null and courseCode != ''">
|
|
<if test="courseCode != null and courseCode != ''">
|
|
and s.course_code = #{courseCode}
|
|
and s.course_code = #{courseCode}
|
|
</if>
|
|
</if>
|
|
- ) temp
|
|
|
|
- left join t_oe_exam_record toer on
|
|
|
|
- toer.exam_student_id = temp.examStudentId
|
|
|
|
- <where> 1 = 1
|
|
|
|
- <choose>
|
|
|
|
- <when test="status == null">
|
|
|
|
- and toer.status <![CDATA[ <> ]]> 'JUNK'
|
|
|
|
- </when>
|
|
|
|
- <when 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>
|
|
|
|
- </when>
|
|
|
|
- </choose>
|
|
|
|
-<!-- <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="status == null">
|
|
|
|
+ and toer.status <![CDATA[ <> ]]> 'JUNK'
|
|
|
|
+ </when>
|
|
|
|
+ <when test="status != null and status != '' and status != 'UN_FINISH'">
|
|
<choose>
|
|
<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 test="status == 'EXAMING'">
|
|
|
|
+ and (toer.status = 'ANSWERING' or toer.status = 'RESUME_PREPARE' or toer.status = 'BREAK_OFF')
|
|
</when>
|
|
</when>
|
|
<otherwise>
|
|
<otherwise>
|
|
- and toer.finish_type = #{finishType}
|
|
|
|
|
|
+ and toer.status = #{status}
|
|
</otherwise>
|
|
</otherwise>
|
|
</choose>
|
|
</choose>
|
|
|
|
+ </when>
|
|
|
|
+ </choose>
|
|
|
|
+ <!-- <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>
|
|
- </where>
|
|
|
|
|
|
+ <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>
|
|
) t,
|
|
) t,
|
|
(SELECT @i := 0) as i
|
|
(SELECT @i := 0) as i
|
|
<where>1 = 1
|
|
<where>1 = 1
|
|
@@ -919,7 +910,6 @@
|
|
and t.exceptionCount <= #{maxExceptionCount}
|
|
and t.exceptionCount <= #{maxExceptionCount}
|
|
</if>
|
|
</if>
|
|
</where>
|
|
</where>
|
|
- order by t.roomCode
|
|
|
|
</sql>
|
|
</sql>
|
|
|
|
|
|
<select id="invigilatePageListHistoryExport"
|
|
<select id="invigilatePageListHistoryExport"
|
|
@@ -1327,18 +1317,18 @@
|
|
left join t_e_exam_student s on
|
|
left join t_e_exam_student s on
|
|
t.exam_student_id = s.id
|
|
t.exam_student_id = s.id
|
|
<where>
|
|
<where>
|
|
- t.exam_id = #{examId}
|
|
|
|
- and s.room_code in
|
|
|
|
- <foreach collection="roomCodeSet" item="roomCode" index="index" open="(" close=")" separator=",">
|
|
|
|
- #{roomCode}
|
|
|
|
- </foreach>
|
|
|
|
- <if test="examActivityId != null and examActivityId != ''">
|
|
|
|
- and t.exam_activity_id = #{examActivityId}
|
|
|
|
- </if>
|
|
|
|
- and (t.STATUS = 'FIRST_PREPARE'
|
|
|
|
- or t.STATUS = 'ANSWERING'
|
|
|
|
- or t.STATUS = 'BREAK_OFF'
|
|
|
|
- or t.STATUS = 'RESUME_PREPARE')
|
|
|
|
|
|
+ t.exam_id = #{examId}
|
|
|
|
+ and s.room_code in
|
|
|
|
+ <foreach collection="roomCodeSet" item="roomCode" index="index" open="(" close=")" separator=",">
|
|
|
|
+ #{roomCode}
|
|
|
|
+ </foreach>
|
|
|
|
+ <if test="examActivityId != null and examActivityId != ''">
|
|
|
|
+ and t.exam_activity_id = #{examActivityId}
|
|
|
|
+ </if>
|
|
|
|
+ and (t.STATUS = 'FIRST_PREPARE'
|
|
|
|
+ or t.STATUS = 'ANSWERING'
|
|
|
|
+ or t.STATUS = 'BREAK_OFF'
|
|
|
|
+ or t.STATUS = 'RESUME_PREPARE')
|
|
</where>
|
|
</where>
|
|
group by
|
|
group by
|
|
t.client_websocket_status,
|
|
t.client_websocket_status,
|
|
@@ -1358,14 +1348,14 @@
|
|
from
|
|
from
|
|
t_e_exam_student t
|
|
t_e_exam_student t
|
|
<where>
|
|
<where>
|
|
- t.exam_id = #{examId}
|
|
|
|
- and t.room_code in
|
|
|
|
- <foreach collection="roomCodeSet" item="roomCode" index="index" open="(" close=")" separator=",">
|
|
|
|
- #{roomCode}
|
|
|
|
- </foreach>
|
|
|
|
- <if test="examActivityId != null and examActivityId != ''">
|
|
|
|
- and t.exam_activity_id = #{examActivityId}
|
|
|
|
- </if>
|
|
|
|
|
|
+ t.exam_id = #{examId}
|
|
|
|
+ and t.room_code in
|
|
|
|
+ <foreach collection="roomCodeSet" item="roomCode" index="index" open="(" close=")" separator=",">
|
|
|
|
+ #{roomCode}
|
|
|
|
+ </foreach>
|
|
|
|
+ <if test="examActivityId != null and examActivityId != ''">
|
|
|
|
+ and t.exam_activity_id = #{examActivityId}
|
|
|
|
+ </if>
|
|
</where>) t
|
|
</where>) t
|
|
</select>
|
|
</select>
|
|
|
|
|
|
@@ -1377,15 +1367,15 @@
|
|
left join t_e_exam_student s on
|
|
left join t_e_exam_student s on
|
|
t.exam_student_id = s.id
|
|
t.exam_student_id = s.id
|
|
<where>
|
|
<where>
|
|
- t.exam_id = #{examId}
|
|
|
|
- and s.room_code in
|
|
|
|
- <foreach collection="roomCodeSet" item="roomCode" index="index" open="(" close=")" separator=",">
|
|
|
|
- #{roomCode}
|
|
|
|
- </foreach>
|
|
|
|
- <if test="examActivityId != null and examActivityId != ''">
|
|
|
|
- and t.exam_activity_id = #{examActivityId}
|
|
|
|
- </if>
|
|
|
|
- and t.STATUS = 'FIRST_PREPARE'
|
|
|
|
|
|
+ t.exam_id = #{examId}
|
|
|
|
+ and s.room_code in
|
|
|
|
+ <foreach collection="roomCodeSet" item="roomCode" index="index" open="(" close=")" separator=",">
|
|
|
|
+ #{roomCode}
|
|
|
|
+ </foreach>
|
|
|
|
+ <if test="examActivityId != null and examActivityId != ''">
|
|
|
|
+ and t.exam_activity_id = #{examActivityId}
|
|
|
|
+ </if>
|
|
|
|
+ and t.STATUS = 'FIRST_PREPARE'
|
|
</where>
|
|
</where>
|
|
union all
|
|
union all
|
|
select
|
|
select
|
|
@@ -1395,17 +1385,17 @@
|
|
left join t_e_exam_student s on
|
|
left join t_e_exam_student s on
|
|
t.exam_student_id = s.id
|
|
t.exam_student_id = s.id
|
|
<where>
|
|
<where>
|
|
- t.exam_id = #{examId}
|
|
|
|
- and s.room_code in
|
|
|
|
- <foreach collection="roomCodeSet" item="roomCode" index="index" open="(" close=")" separator=",">
|
|
|
|
- #{roomCode}
|
|
|
|
- </foreach>
|
|
|
|
- <if test="examActivityId != null and examActivityId != ''">
|
|
|
|
- and t.exam_activity_id = #{examActivityId}
|
|
|
|
- </if>
|
|
|
|
- and ((t.STATUS = 'ANSWERING' and t.client_websocket_status = 'ON_LINE')
|
|
|
|
- or t.STATUS = 'RESUME_PREPARE'
|
|
|
|
- or t.STATUS = 'BREAK_OFF')
|
|
|
|
|
|
+ t.exam_id = #{examId}
|
|
|
|
+ and s.room_code in
|
|
|
|
+ <foreach collection="roomCodeSet" item="roomCode" index="index" open="(" close=")" separator=",">
|
|
|
|
+ #{roomCode}
|
|
|
|
+ </foreach>
|
|
|
|
+ <if test="examActivityId != null and examActivityId != ''">
|
|
|
|
+ and t.exam_activity_id = #{examActivityId}
|
|
|
|
+ </if>
|
|
|
|
+ and ((t.STATUS = 'ANSWERING' and t.client_websocket_status = 'ON_LINE')
|
|
|
|
+ or t.STATUS = 'RESUME_PREPARE'
|
|
|
|
+ or t.STATUS = 'BREAK_OFF')
|
|
</where>
|
|
</where>
|
|
union all
|
|
union all
|
|
select
|
|
select
|
|
@@ -1415,16 +1405,16 @@
|
|
left join t_e_exam_student s on
|
|
left join t_e_exam_student s on
|
|
t.exam_student_id = s.id
|
|
t.exam_student_id = s.id
|
|
<where>
|
|
<where>
|
|
- t.exam_id = #{examId}
|
|
|
|
- and s.room_code in
|
|
|
|
- <foreach collection="roomCodeSet" item="roomCode" index="index" open="(" close=")" separator=",">
|
|
|
|
- #{roomCode}
|
|
|
|
- </foreach>
|
|
|
|
- <if test="examActivityId != null and examActivityId != ''">
|
|
|
|
- and t.exam_activity_id = #{examActivityId}
|
|
|
|
- </if>
|
|
|
|
- and (t.STATUS = 'FINISHED'
|
|
|
|
- or t.STATUS = 'PERSISTED') and t.first_start_time is not null
|
|
|
|
|
|
+ t.exam_id = #{examId}
|
|
|
|
+ and s.room_code in
|
|
|
|
+ <foreach collection="roomCodeSet" item="roomCode" index="index" open="(" close=")" separator=",">
|
|
|
|
+ #{roomCode}
|
|
|
|
+ </foreach>
|
|
|
|
+ <if test="examActivityId != null and examActivityId != ''">
|
|
|
|
+ and t.exam_activity_id = #{examActivityId}
|
|
|
|
+ </if>
|
|
|
|
+ and (t.STATUS = 'FINISHED'
|
|
|
|
+ or t.STATUS = 'PERSISTED') and t.first_start_time is not null
|
|
</where>
|
|
</where>
|
|
union all
|
|
union all
|
|
select
|
|
select
|
|
@@ -1442,15 +1432,15 @@
|
|
from
|
|
from
|
|
t_oe_exam_record toer
|
|
t_oe_exam_record toer
|
|
<where>
|
|
<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>
|
|
|
|
- <if test="examActivityId != null and examActivityId != ''">
|
|
|
|
- and t.exam_activity_id = #{examActivityId}
|
|
|
|
- </if>
|
|
|
|
|
|
+ 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>
|
|
|
|
+ <if test="examActivityId != null and examActivityId != ''">
|
|
|
|
+ and t.exam_activity_id = #{examActivityId}
|
|
|
|
+ </if>
|
|
</where>
|
|
</where>
|
|
</select>
|
|
</select>
|
|
|
|
|
|
@@ -1459,81 +1449,50 @@
|
|
count(1) as c
|
|
count(1) as c
|
|
from
|
|
from
|
|
t_e_exam_student tees
|
|
t_e_exam_student tees
|
|
- join t_e_student tes on
|
|
|
|
- tees.student_id = tes.id
|
|
|
|
- where
|
|
|
|
- exists(
|
|
|
|
- select
|
|
|
|
- tee.id
|
|
|
|
- from
|
|
|
|
- t_e_exam tee
|
|
|
|
- <where>1 = 1
|
|
|
|
- <if test="orgId != null and orgId != ''">
|
|
|
|
- and tee.org_id = #{orgId}
|
|
|
|
- </if>
|
|
|
|
- <if test="examId != null and examId != ''">
|
|
|
|
- and tee.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>
|
|
|
|
- and tees.exam_id = tee.id
|
|
|
|
- and tes.org_id = tee.org_id
|
|
|
|
- </where>
|
|
|
|
- )
|
|
|
|
|
|
+ where 1 = 1
|
|
|
|
+ <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>
|
|
union all
|
|
union all
|
|
select
|
|
select
|
|
count(distinct toer.exam_student_id) as c
|
|
count(distinct toer.exam_student_id) as c
|
|
from
|
|
from
|
|
t_oe_exam_record toer
|
|
t_oe_exam_record toer
|
|
- where
|
|
|
|
- exists (
|
|
|
|
- select
|
|
|
|
- *
|
|
|
|
- from
|
|
|
|
- (
|
|
|
|
- select
|
|
|
|
|
|
+ where 1 = 1
|
|
|
|
+ <if test="examId != null and examId != ''">
|
|
|
|
+ and toer.exam_id = #{examId}
|
|
|
|
+ </if>
|
|
|
|
+ and exists (select
|
|
tees.id
|
|
tees.id
|
|
from
|
|
from
|
|
t_e_exam_student tees
|
|
t_e_exam_student tees
|
|
- join t_e_student tes on
|
|
|
|
- tees.student_id = tes.id
|
|
|
|
- where
|
|
|
|
- exists(
|
|
|
|
- select
|
|
|
|
- tee.id
|
|
|
|
- from
|
|
|
|
- t_e_exam tee
|
|
|
|
- <where>1 = 1
|
|
|
|
- <if test="orgId != null and orgId != ''">
|
|
|
|
- and tee.org_id = #{orgId}
|
|
|
|
- </if>
|
|
|
|
- <if test="examId != null and examId != ''">
|
|
|
|
- and tee.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>
|
|
|
|
- and tees.exam_id = tee.id
|
|
|
|
- </where>
|
|
|
|
- )) t
|
|
|
|
- where
|
|
|
|
- t.id = toer.exam_student_id
|
|
|
|
|
|
+ where 1 = 1
|
|
|
|
+ <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>
|
|
|
|
+ and toer.exam_student_id = tees.id
|
|
|
|
+ )
|
|
<if test="monitorStatus != null and monitorStatus != '' and monitorStatus == 'FINISHED'">
|
|
<if test="monitorStatus != null and monitorStatus != '' and monitorStatus == 'FINISHED'">
|
|
and toer.first_start_time is not null
|
|
and toer.first_start_time is not null
|
|
- </if>)
|
|
|
|
|
|
+ </if>
|
|
union all
|
|
union all
|
|
select
|
|
select
|
|
count(1)
|
|
count(1)
|
|
@@ -1782,8 +1741,8 @@
|
|
select * from t_oe_exam_record toer
|
|
select * from t_oe_exam_record toer
|
|
where
|
|
where
|
|
toer.exam_id = #{examId}
|
|
toer.exam_id = #{examId}
|
|
- and toer.exam_activity_id = #{examActivityId}
|
|
|
|
- and (toer.status = 'FIRST_PREPARE'
|
|
|
|
|
|
+ and toer.exam_activity_id = #{examActivityId}
|
|
|
|
+ and (toer.status = 'FIRST_PREPARE'
|
|
or toer.status = 'ANSWERING'
|
|
or toer.status = 'ANSWERING'
|
|
or toer.status = 'BREAK_OFF'
|
|
or toer.status = 'BREAK_OFF'
|
|
or toer.status = 'RESUME_PREPARE')
|
|
or toer.status = 'RESUME_PREPARE')
|
|
@@ -1799,106 +1758,106 @@
|
|
and toer.exam_activity_id = #{examActivityId}
|
|
and toer.exam_activity_id = #{examActivityId}
|
|
</if>
|
|
</if>
|
|
and (toer.status = 'FIRST_PREPARE'
|
|
and (toer.status = 'FIRST_PREPARE'
|
|
- or toer.status = 'ANSWERING'
|
|
|
|
- or toer.status = 'BREAK_OFF'
|
|
|
|
- or toer.status = 'RESUME_PREPARE')
|
|
|
|
|
|
+ or toer.status = 'ANSWERING'
|
|
|
|
+ or toer.status = 'BREAK_OFF'
|
|
|
|
+ or toer.status = 'RESUME_PREPARE')
|
|
</where>
|
|
</where>
|
|
</select>
|
|
</select>
|
|
|
|
|
|
<select id="findExamRecordNeedMarkAll" resultType="com.qmth.themis.business.entity.TOeExamRecord">
|
|
<select id="findExamRecordNeedMarkAll" resultType="com.qmth.themis.business.entity.TOeExamRecord">
|
|
select
|
|
select
|
|
- t1.*
|
|
|
|
|
|
+ t1.*
|
|
from
|
|
from
|
|
- (
|
|
|
|
- select
|
|
|
|
- t.exam_student_id
|
|
|
|
- from
|
|
|
|
- t_oe_exam_record t
|
|
|
|
- where
|
|
|
|
- exists(
|
|
|
|
- select
|
|
|
|
- tees.id
|
|
|
|
- from
|
|
|
|
- t_e_exam_student tees
|
|
|
|
- join t_oe_exam_record toer on
|
|
|
|
- toer.exam_id = tees.exam_id
|
|
|
|
- and toer.exam_activity_id = tees.exam_activity_id
|
|
|
|
- and toer.exam_student_id = tees.id
|
|
|
|
- <where>
|
|
|
|
- <if test="examId != null and examId != ''">
|
|
|
|
- and tees.exam_id = #{examId}
|
|
|
|
- </if>
|
|
|
|
- and tees.enable = 1
|
|
|
|
- and tees.already_exam_count is not null
|
|
|
|
- and tees.already_exam_count <![CDATA[ > ]]> 0
|
|
|
|
- <if test="examPaperIdSet != null and examPaperIdSet != '' and examPaperIdSet.size > 0">
|
|
|
|
- and toer.paper_id in
|
|
|
|
- <foreach collection="examPaperIdSet" item="paperId" index="index" open="(" close=")" separator=",">
|
|
|
|
- #{paperId}
|
|
|
|
- </foreach>
|
|
|
|
- </if>
|
|
|
|
- and (toer.status = 'FINISHED' or toer.status = 'PERSISTED')
|
|
|
|
- and toer.first_start_time is not null
|
|
|
|
- and toer.finish_time is not null
|
|
|
|
- <if test="examStudentBreachPush != null and (examStudentBreachPush == false or examStudentBreachPush == 0)">
|
|
|
|
- and (toer.breach_status is null or toer.breach_status = 1)
|
|
|
|
- </if>
|
|
|
|
- and t.exam_student_id = tees.id
|
|
|
|
- </where>)
|
|
|
|
- group by
|
|
|
|
- t.exam_student_id
|
|
|
|
- <if test="many != null and many != '' or many == 0">
|
|
|
|
- <choose>
|
|
|
|
- <when test="many == true">
|
|
|
|
- HAVING count(t.exam_student_id) <![CDATA[ > ]]> 1
|
|
|
|
- </when>
|
|
|
|
- <otherwise>
|
|
|
|
- HAVING count(t.exam_student_id) = 1
|
|
|
|
- </otherwise>
|
|
|
|
- </choose>
|
|
|
|
- </if>
|
|
|
|
- ) t
|
|
|
|
- join t_oe_exam_record t1 on
|
|
|
|
- t1.exam_student_id = t.exam_student_id
|
|
|
|
- where (t1.status = 'FINISHED' or t1.status = 'PERSISTED')
|
|
|
|
- and t1.first_start_time is not null
|
|
|
|
- and t1.finish_time is not null
|
|
|
|
- <if test="examStudentBreachPush != null and (examStudentBreachPush == false or examStudentBreachPush == 0)">
|
|
|
|
- and (t1.breach_status is null or t1.breach_status = 1)
|
|
|
|
- </if>
|
|
|
|
- <!--<if test="many != null and many != '' or many == 0">
|
|
|
|
- <choose>
|
|
|
|
- <when test="many == true">
|
|
|
|
- order by t1.id limit 510
|
|
|
|
- </when>
|
|
|
|
- <otherwise>
|
|
|
|
- order by t1.id limit 500
|
|
|
|
- </otherwise>
|
|
|
|
- </choose>
|
|
|
|
- </if>-->
|
|
|
|
- order by t1.id
|
|
|
|
|
|
+ (
|
|
|
|
+ select
|
|
|
|
+ t.exam_student_id
|
|
|
|
+ from
|
|
|
|
+ t_oe_exam_record t
|
|
|
|
+ where
|
|
|
|
+ exists(
|
|
|
|
+ select
|
|
|
|
+ tees.id
|
|
|
|
+ from
|
|
|
|
+ t_e_exam_student tees
|
|
|
|
+ join t_oe_exam_record toer on
|
|
|
|
+ toer.exam_id = tees.exam_id
|
|
|
|
+ and toer.exam_activity_id = tees.exam_activity_id
|
|
|
|
+ and toer.exam_student_id = tees.id
|
|
|
|
+ <where>
|
|
|
|
+ <if test="examId != null and examId != ''">
|
|
|
|
+ and tees.exam_id = #{examId}
|
|
|
|
+ </if>
|
|
|
|
+ and tees.enable = 1
|
|
|
|
+ and tees.already_exam_count is not null
|
|
|
|
+ and tees.already_exam_count <![CDATA[ > ]]> 0
|
|
|
|
+ <if test="examPaperIdSet != null and examPaperIdSet != '' and examPaperIdSet.size > 0">
|
|
|
|
+ and toer.paper_id in
|
|
|
|
+ <foreach collection="examPaperIdSet" item="paperId" index="index" open="(" close=")" separator=",">
|
|
|
|
+ #{paperId}
|
|
|
|
+ </foreach>
|
|
|
|
+ </if>
|
|
|
|
+ and (toer.status = 'FINISHED' or toer.status = 'PERSISTED')
|
|
|
|
+ and toer.first_start_time is not null
|
|
|
|
+ and toer.finish_time is not null
|
|
|
|
+ <if test="examStudentBreachPush != null and (examStudentBreachPush == false or examStudentBreachPush == 0)">
|
|
|
|
+ and (toer.breach_status is null or toer.breach_status = 1)
|
|
|
|
+ </if>
|
|
|
|
+ and t.exam_student_id = tees.id
|
|
|
|
+ </where>)
|
|
|
|
+ group by
|
|
|
|
+ t.exam_student_id
|
|
|
|
+ <if test="many != null and many != '' or many == 0">
|
|
|
|
+ <choose>
|
|
|
|
+ <when test="many == true">
|
|
|
|
+ HAVING count(t.exam_student_id) <![CDATA[ > ]]> 1
|
|
|
|
+ </when>
|
|
|
|
+ <otherwise>
|
|
|
|
+ HAVING count(t.exam_student_id) = 1
|
|
|
|
+ </otherwise>
|
|
|
|
+ </choose>
|
|
|
|
+ </if>
|
|
|
|
+ ) t
|
|
|
|
+ join t_oe_exam_record t1 on
|
|
|
|
+ t1.exam_student_id = t.exam_student_id
|
|
|
|
+ where (t1.status = 'FINISHED' or t1.status = 'PERSISTED')
|
|
|
|
+ and t1.first_start_time is not null
|
|
|
|
+ and t1.finish_time is not null
|
|
|
|
+ <if test="examStudentBreachPush != null and (examStudentBreachPush == false or examStudentBreachPush == 0)">
|
|
|
|
+ and (t1.breach_status is null or t1.breach_status = 1)
|
|
|
|
+ </if>
|
|
|
|
+ <!--<if test="many != null and many != '' or many == 0">
|
|
|
|
+ <choose>
|
|
|
|
+ <when test="many == true">
|
|
|
|
+ order by t1.id limit 510
|
|
|
|
+ </when>
|
|
|
|
+ <otherwise>
|
|
|
|
+ order by t1.id limit 500
|
|
|
|
+ </otherwise>
|
|
|
|
+ </choose>
|
|
|
|
+ </if>-->
|
|
|
|
+ order by t1.id
|
|
</select>
|
|
</select>
|
|
|
|
|
|
<select id="persistedAnswerBatch" resultType="com.qmth.themis.business.entity.TOeExamRecord">
|
|
<select id="persistedAnswerBatch" resultType="com.qmth.themis.business.entity.TOeExamRecord">
|
|
- select toer.* from t_oe_exam_record toer
|
|
|
|
- left join t_oe_exam_answer toea on toea.exam_record_id = toer.id
|
|
|
|
- <where>
|
|
|
|
- <if test="examId != null and examId != ''">
|
|
|
|
- and toer.exam_id = #{examId}
|
|
|
|
- </if>
|
|
|
|
- <if test="examActivityId != null and examActivityId != ''">
|
|
|
|
- and toer.exam_activity_id = #{examActivityId}
|
|
|
|
- </if>
|
|
|
|
- <if test="status != null and status != ''">
|
|
|
|
- and toer.status = #{status}
|
|
|
|
- </if>
|
|
|
|
- and toer.objective_score > 0
|
|
|
|
- and toea.id is null
|
|
|
|
- and toer.first_start_time is not null
|
|
|
|
- and toer.finish_time is not null
|
|
|
|
- </where>
|
|
|
|
- group by toer.id
|
|
|
|
- having count(toea.id) = 0
|
|
|
|
|
|
+ select toer.* from t_oe_exam_record toer
|
|
|
|
+ left join t_oe_exam_answer toea on toea.exam_record_id = toer.id
|
|
|
|
+ <where>
|
|
|
|
+ <if test="examId != null and examId != ''">
|
|
|
|
+ and toer.exam_id = #{examId}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="examActivityId != null and examActivityId != ''">
|
|
|
|
+ and toer.exam_activity_id = #{examActivityId}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="status != null and status != ''">
|
|
|
|
+ and toer.status = #{status}
|
|
|
|
+ </if>
|
|
|
|
+ and toer.objective_score > 0
|
|
|
|
+ and toea.id is null
|
|
|
|
+ and toer.first_start_time is not null
|
|
|
|
+ and toer.finish_time is not null
|
|
|
|
+ </where>
|
|
|
|
+ group by toer.id
|
|
|
|
+ having count(toea.id) = 0
|
|
</select>
|
|
</select>
|
|
|
|
|
|
<select id="cleanExamFirstPrepareCache" resultType="java.util.Map">
|
|
<select id="cleanExamFirstPrepareCache" resultType="java.util.Map">
|
|
@@ -1907,30 +1866,30 @@
|
|
from
|
|
from
|
|
(
|
|
(
|
|
select
|
|
select
|
|
- tes.id as studentId,
|
|
|
|
- toer.id as examRecordId,
|
|
|
|
- DATE_FORMAT(FROM_UNIXTIME(toer.first_prepare_time / 1000), '%Y-%m-%d %H:%i:%s') as 'firstPrepareTime',
|
|
|
|
- DATE_FORMAT(FROM_UNIXTIME(toer.finish_time / 1000), '%Y-%m-%d %H:%i:%s') as 'finishTime',
|
|
|
|
- DATE_FORMAT(FROM_UNIXTIME(toer.first_start_time / 1000), '%Y-%m-%d %H:%i:%s') as 'firstStartTime',
|
|
|
|
- DATE_FORMAT(FROM_UNIXTIME(toer.start_time / 1000), '%Y-%m-%d %H:%i:%s') as 'startTime',
|
|
|
|
- DATE_FORMAT(FROM_UNIXTIME(toer.end_time / 1000), '%Y-%m-%d %H:%i:%s') as 'endTime'
|
|
|
|
|
|
+ tes.id as studentId,
|
|
|
|
+ toer.id as examRecordId,
|
|
|
|
+ DATE_FORMAT(FROM_UNIXTIME(toer.first_prepare_time / 1000), '%Y-%m-%d %H:%i:%s') as 'firstPrepareTime',
|
|
|
|
+ DATE_FORMAT(FROM_UNIXTIME(toer.finish_time / 1000), '%Y-%m-%d %H:%i:%s') as 'finishTime',
|
|
|
|
+ DATE_FORMAT(FROM_UNIXTIME(toer.first_start_time / 1000), '%Y-%m-%d %H:%i:%s') as 'firstStartTime',
|
|
|
|
+ DATE_FORMAT(FROM_UNIXTIME(toer.start_time / 1000), '%Y-%m-%d %H:%i:%s') as 'startTime',
|
|
|
|
+ DATE_FORMAT(FROM_UNIXTIME(toer.end_time / 1000), '%Y-%m-%d %H:%i:%s') as 'endTime'
|
|
from
|
|
from
|
|
t_oe_exam_record toer
|
|
t_oe_exam_record toer
|
|
join t_e_exam_student tees on tees.id = toer.exam_student_id
|
|
join t_e_exam_student tees on tees.id = toer.exam_student_id
|
|
join t_e_student tes on tes.id = tees.student_id
|
|
join t_e_student tes on tes.id = tees.student_id
|
|
<where>
|
|
<where>
|
|
- toer.status = 'FIRST_PREPARE'
|
|
|
|
- <if test="examIds != null and examIds != ''">
|
|
|
|
- and toer.exam_id in
|
|
|
|
- <foreach collection="examIds" item="examId" index="index" open="(" close=")" separator=",">
|
|
|
|
- #{examId}
|
|
|
|
- </foreach>
|
|
|
|
- </if>
|
|
|
|
- and toer.first_prepare_time is not null
|
|
|
|
- and toer.first_start_time is null
|
|
|
|
- and toer.finish_time is null
|
|
|
|
- and (toer.objective_score is null
|
|
|
|
- or toer.objective_score = 0)
|
|
|
|
|
|
+ toer.status = 'FIRST_PREPARE'
|
|
|
|
+ <if test="examIds != null and examIds != ''">
|
|
|
|
+ and toer.exam_id in
|
|
|
|
+ <foreach collection="examIds" item="examId" index="index" open="(" close=")" separator=",">
|
|
|
|
+ #{examId}
|
|
|
|
+ </foreach>
|
|
|
|
+ </if>
|
|
|
|
+ and toer.first_prepare_time is not null
|
|
|
|
+ and toer.first_start_time is null
|
|
|
|
+ and toer.finish_time is null
|
|
|
|
+ and (toer.objective_score is null
|
|
|
|
+ or toer.objective_score = 0)
|
|
</where>
|
|
</where>
|
|
group by
|
|
group by
|
|
toer.id
|
|
toer.id
|
|
@@ -1987,42 +1946,42 @@
|
|
sum(examCount) as examCount
|
|
sum(examCount) as examCount
|
|
from
|
|
from
|
|
(select
|
|
(select
|
|
- tbo.name,
|
|
|
|
- tbo.code,
|
|
|
|
- count(toer.id) as onlineCount,
|
|
|
|
- 0 as examCount
|
|
|
|
- from
|
|
|
|
- t_b_org tbo
|
|
|
|
- join t_e_exam tee on
|
|
|
|
- tbo.id = tee.org_id
|
|
|
|
- join t_oe_exam_record toer on
|
|
|
|
- tee.id = toer.exam_id
|
|
|
|
- WHERE
|
|
|
|
- toer.client_websocket_status = 'ON_LINE'
|
|
|
|
- group by
|
|
|
|
- tbo.name,
|
|
|
|
- tbo.code
|
|
|
|
- union all
|
|
|
|
- select
|
|
|
|
- tbo.name,
|
|
|
|
- tbo.code,
|
|
|
|
- 0 as onlineCount,
|
|
|
|
- count(toer.id) as examCount
|
|
|
|
- from
|
|
|
|
- t_b_org tbo
|
|
|
|
- join t_e_exam tee on
|
|
|
|
- tbo.id = tee.org_id
|
|
|
|
- join t_oe_exam_record toer on
|
|
|
|
- tee.id = toer.exam_id
|
|
|
|
- WHERE
|
|
|
|
- (toer.STATUS = 'ANSWERING'
|
|
|
|
- or toer.STATUS = 'RESUME_PREPARE')
|
|
|
|
- and toer.client_websocket_status = 'ON_LINE'
|
|
|
|
- group by
|
|
|
|
- tbo.name,
|
|
|
|
- tbo.code) t group by
|
|
|
|
- t.name,
|
|
|
|
- t.code
|
|
|
|
|
|
+ tbo.name,
|
|
|
|
+ tbo.code,
|
|
|
|
+ count(toer.id) as onlineCount,
|
|
|
|
+ 0 as examCount
|
|
|
|
+ from
|
|
|
|
+ t_b_org tbo
|
|
|
|
+ join t_e_exam tee on
|
|
|
|
+ tbo.id = tee.org_id
|
|
|
|
+ join t_oe_exam_record toer on
|
|
|
|
+ tee.id = toer.exam_id
|
|
|
|
+ WHERE
|
|
|
|
+ toer.client_websocket_status = 'ON_LINE'
|
|
|
|
+ group by
|
|
|
|
+ tbo.name,
|
|
|
|
+ tbo.code
|
|
|
|
+ union all
|
|
|
|
+ select
|
|
|
|
+ tbo.name,
|
|
|
|
+ tbo.code,
|
|
|
|
+ 0 as onlineCount,
|
|
|
|
+ count(toer.id) as examCount
|
|
|
|
+ from
|
|
|
|
+ t_b_org tbo
|
|
|
|
+ join t_e_exam tee on
|
|
|
|
+ tbo.id = tee.org_id
|
|
|
|
+ join t_oe_exam_record toer on
|
|
|
|
+ tee.id = toer.exam_id
|
|
|
|
+ WHERE
|
|
|
|
+ (toer.STATUS = 'ANSWERING'
|
|
|
|
+ or toer.STATUS = 'RESUME_PREPARE')
|
|
|
|
+ and toer.client_websocket_status = 'ON_LINE'
|
|
|
|
+ group by
|
|
|
|
+ tbo.name,
|
|
|
|
+ tbo.code) t group by
|
|
|
|
+ t.name,
|
|
|
|
+ t.code
|
|
</select>
|
|
</select>
|
|
|
|
|
|
<select id="mapDataCount" resultType="com.qmth.themis.business.bean.admin.MapDataCountBean">
|
|
<select id="mapDataCount" resultType="com.qmth.themis.business.bean.admin.MapDataCountBean">
|
|
@@ -2038,7 +1997,7 @@
|
|
toer.exam_id = tee.id
|
|
toer.exam_id = tee.id
|
|
WHERE
|
|
WHERE
|
|
toer.client_websocket_status = 'ON_LINE'
|
|
toer.client_websocket_status = 'ON_LINE'
|
|
- and tir.country != '0'
|
|
|
|
|
|
+ and tir.country != '0'
|
|
and tir.province != '0'
|
|
and tir.province != '0'
|
|
group by
|
|
group by
|
|
tir.country,
|
|
tir.country,
|