|
@@ -187,7 +187,7 @@
|
|
and (toer.STATUS = 'FINISHED' or toer.STATUS = 'PERSISTED')
|
|
and (toer.STATUS = 'FINISHED' or toer.STATUS = 'PERSISTED')
|
|
and toer.first_start_time is not null
|
|
and toer.first_start_time is not null
|
|
</if>-->
|
|
</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>
|
|
@@ -215,7 +215,7 @@
|
|
) temp
|
|
) temp
|
|
left join t_oe_exam_record toer on
|
|
left join t_oe_exam_record toer on
|
|
toer.exam_student_id = temp.examStudentId
|
|
toer.exam_student_id = temp.examStudentId
|
|
- <where> 1 = 1
|
|
|
|
|
|
+ <where>1 = 1
|
|
<if test="status != null and status != '' and status != 'UN_FINISH'">
|
|
<if test="status != null and status != '' and status != 'UN_FINISH'">
|
|
<choose>
|
|
<choose>
|
|
<when test="status == 'EXAMING'">
|
|
<when test="status == 'EXAMING'">
|
|
@@ -242,7 +242,8 @@
|
|
and toer.paper_download = #{paperDownload}
|
|
and toer.paper_download = #{paperDownload}
|
|
</if>
|
|
</if>
|
|
<if test="status == null or status == ''">
|
|
<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')
|
|
|
|
|
|
+ and (toer.status = 'FIRST_PREPARE' or toer.status = 'ANSWERING' or toer.status = 'BREAK_OFF' or
|
|
|
|
+ toer.status = 'RESUME_PREPARE')
|
|
</if>
|
|
</if>
|
|
<if test="cameraMonitorStatus != null and cameraMonitorStatus != ''">
|
|
<if test="cameraMonitorStatus != null and cameraMonitorStatus != ''">
|
|
and toer.camera_monitor_status = upper(#{cameraMonitorStatus})
|
|
and toer.camera_monitor_status = upper(#{cameraMonitorStatus})
|
|
@@ -256,7 +257,8 @@
|
|
<if test="mobileSecondMonitorStatus != null and mobileSecondMonitorStatus != ''">
|
|
<if test="mobileSecondMonitorStatus != null and mobileSecondMonitorStatus != ''">
|
|
and toer.mobile_second_monitor_status = upper(#{mobileSecondMonitorStatus})
|
|
and toer.mobile_second_monitor_status = upper(#{mobileSecondMonitorStatus})
|
|
</if>
|
|
</if>
|
|
- </where>) t,
|
|
|
|
|
|
+ </where>
|
|
|
|
+ ) t,
|
|
(SELECT @i := 0) as i
|
|
(SELECT @i := 0) as i
|
|
order by t.identity desc
|
|
order by t.identity desc
|
|
</select>
|
|
</select>
|
|
@@ -296,7 +298,8 @@
|
|
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_exception_info tiiei where tiiei.exam_record_id = toer.id) as exceptionCount
|
|
|
|
|
|
+ ,(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` =
|
|
,(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
|
|
'FACE_COUNT_ERROR' and tiiwi.`level` = 'D8') as multipleFaceCount
|
|
from
|
|
from
|
|
@@ -341,7 +344,7 @@
|
|
and (toer.STATUS = 'FINISHED' or toer.STATUS = 'PERSISTED')
|
|
and (toer.STATUS = 'FINISHED' or toer.STATUS = 'PERSISTED')
|
|
and toer.first_start_time is not null
|
|
and toer.first_start_time is not null
|
|
</if>-->
|
|
</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>
|
|
@@ -369,7 +372,7 @@
|
|
) temp
|
|
) temp
|
|
left join t_oe_exam_record toer on
|
|
left join t_oe_exam_record toer on
|
|
toer.exam_student_id = temp.examStudentId
|
|
toer.exam_student_id = temp.examStudentId
|
|
- <where> 1 = 1
|
|
|
|
|
|
+ <where>1 = 1
|
|
<if test="status != null and status != '' and status != 'UN_FINISH'">
|
|
<if test="status != null and status != '' and status != 'UN_FINISH'">
|
|
<choose>
|
|
<choose>
|
|
<when test="status == 'EXAMING'">
|
|
<when test="status == 'EXAMING'">
|
|
@@ -393,11 +396,13 @@
|
|
and toer.client_websocket_status = #{clientWebsocketStatus}
|
|
and toer.client_websocket_status = #{clientWebsocketStatus}
|
|
</if>
|
|
</if>
|
|
<if test="status == null or status == ''">
|
|
<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')
|
|
|
|
|
|
+ and (toer.status = 'FIRST_PREPARE' or toer.status = 'ANSWERING' or toer.status = 'BREAK_OFF' or
|
|
|
|
+ toer.status = 'RESUME_PREPARE')
|
|
</if>
|
|
</if>
|
|
- </where>) t,
|
|
|
|
|
|
+ </where>
|
|
|
|
+ ) t,
|
|
(SELECT @i := 0) as i
|
|
(SELECT @i := 0) as i
|
|
- <where> 1 = 1
|
|
|
|
|
|
+ <where>1 = 1
|
|
<if test="minMultipleFaceCount != null and minMultipleFaceCount != '' or minMultipleFaceCount == 0">
|
|
<if test="minMultipleFaceCount != null and minMultipleFaceCount != '' or minMultipleFaceCount == 0">
|
|
and t.multipleFaceCount >= #{minMultipleFaceCount}
|
|
and t.multipleFaceCount >= #{minMultipleFaceCount}
|
|
</if>
|
|
</if>
|
|
@@ -479,7 +484,7 @@
|
|
</if>
|
|
</if>
|
|
</where>
|
|
</where>
|
|
) t,(SELECT @i := 0) as i
|
|
) t,(SELECT @i := 0) as i
|
|
- <where> 1 = 1
|
|
|
|
|
|
+ <where>1 = 1
|
|
<if test="minMultipleFaceCount != null and minMultipleFaceCount != '' or minMultipleFaceCount == 0">
|
|
<if test="minMultipleFaceCount != null and minMultipleFaceCount != '' or minMultipleFaceCount == 0">
|
|
and t.multipleFaceCount >= #{minMultipleFaceCount}
|
|
and t.multipleFaceCount >= #{minMultipleFaceCount}
|
|
</if>
|
|
</if>
|
|
@@ -617,7 +622,8 @@
|
|
and tees.identity like CONCAT('%', #{identity},'%')
|
|
and tees.identity like CONCAT('%', #{identity},'%')
|
|
</if>
|
|
</if>
|
|
and tee.monitor_status <![CDATA[ <> ]]> 'FINISHED'
|
|
and tee.monitor_status <![CDATA[ <> ]]> 'FINISHED'
|
|
- </where> ) t
|
|
|
|
|
|
+ </where>
|
|
|
|
+ ) t
|
|
<where>
|
|
<where>
|
|
<if test="status != null and status != '' or status == 0">
|
|
<if test="status != null and status != '' or status == 0">
|
|
<choose>
|
|
<choose>
|
|
@@ -654,7 +660,8 @@
|
|
if(tee.exam_count - tees.already_exam_count <![CDATA[ < ]]> 0,0,tee.exam_count - tees.already_exam_count) as
|
|
if(tee.exam_count - tees.already_exam_count <![CDATA[ < ]]> 0,0,tee.exam_count - tees.already_exam_count) as
|
|
leftExamCount,
|
|
leftExamCount,
|
|
(select count(1) from t_oe_exam_record toer where toer.exam_student_id =
|
|
(select count(1) from t_oe_exam_record toer where toer.exam_student_id =
|
|
- tees.id and (toer.status = 'FINISHED' or toer.status = 'PERSISTED') and toer.first_start_time is not null) as statusTemp,
|
|
|
|
|
|
+ tees.id and (toer.status = 'FINISHED' or toer.status = 'PERSISTED') and toer.first_start_time is not null) as
|
|
|
|
+ statusTemp,
|
|
tes.mobile_number as mobileNumber
|
|
tes.mobile_number as mobileNumber
|
|
from
|
|
from
|
|
t_e_exam_student tees
|
|
t_e_exam_student tees
|
|
@@ -693,7 +700,8 @@
|
|
and tee.monitor_status <![CDATA[ <> ]]> 'FINISHED'
|
|
and tee.monitor_status <![CDATA[ <> ]]> 'FINISHED'
|
|
</where>
|
|
</where>
|
|
group by
|
|
group by
|
|
- tee.id,tees.room_code,tee.name,teea.id,teea.code,tees.`identity`,tees.name,leftExamCount,statusTemp,tes.mobile_number) t
|
|
|
|
|
|
+ tee.id,tees.room_code,tee.name,teea.id,teea.code,tees.`identity`,tees.name,leftExamCount,statusTemp,tes.mobile_number)
|
|
|
|
+ t
|
|
<where>
|
|
<where>
|
|
<if test="status != null and status != '' or status == 0">
|
|
<if test="status != null and status != '' or status == 0">
|
|
<choose>
|
|
<choose>
|
|
@@ -710,7 +718,7 @@
|
|
</select>
|
|
</select>
|
|
|
|
|
|
<select id="invigilatePageListHistory" resultType="com.qmth.themis.business.bean.admin.InvigilateListHistoryBean">
|
|
<select id="invigilatePageListHistory" resultType="com.qmth.themis.business.bean.admin.InvigilateListHistoryBean">
|
|
- <include refid="invigilatePageListHistorySql" />
|
|
|
|
|
|
+ <include refid="invigilatePageListHistorySql"/>
|
|
</select>
|
|
</select>
|
|
|
|
|
|
<sql id="invigilatePageListHistorySql">
|
|
<sql id="invigilatePageListHistorySql">
|
|
@@ -731,7 +739,8 @@
|
|
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` =
|
|
,(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
|
|
'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
|
|
|
|
|
|
+ ,(select count(1) from t_ie_invigilate_exception_info tiiei where tiiei.exam_record_id = toer.id) as
|
|
|
|
+ exceptionCount
|
|
from
|
|
from
|
|
(
|
|
(
|
|
select
|
|
select
|
|
@@ -774,7 +783,7 @@
|
|
and (toer.STATUS = 'FINISHED' or toer.STATUS = 'PERSISTED')
|
|
and (toer.STATUS = 'FINISHED' or toer.STATUS = 'PERSISTED')
|
|
and toer.first_start_time is not null
|
|
and toer.first_start_time is not null
|
|
</if>-->
|
|
</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>
|
|
@@ -804,7 +813,7 @@
|
|
) temp
|
|
) temp
|
|
left join t_oe_exam_record toer on
|
|
left join t_oe_exam_record toer on
|
|
toer.exam_student_id = temp.examStudentId
|
|
toer.exam_student_id = temp.examStudentId
|
|
- <where> 1 = 1
|
|
|
|
|
|
+ <where>1 = 1
|
|
<if test="status != null and status != '' and status != 'UN_FINISH'">
|
|
<if test="status != null and status != '' and status != 'UN_FINISH'">
|
|
<choose>
|
|
<choose>
|
|
<when test="status == 'EXAMING'">
|
|
<when test="status == 'EXAMING'">
|
|
@@ -835,16 +844,18 @@
|
|
<if test="finishType != null and finishType != ''">
|
|
<if test="finishType != null and finishType != ''">
|
|
<choose>
|
|
<choose>
|
|
<when test="finishType == 'ALL'">
|
|
<when test="finishType == 'ALL'">
|
|
- and (toer.finish_type = 'MANUAL' or toer.finish_type = 'AUTO' or toer.finish_type = 'BREACH' or toer.finish_type = 'INTERRUPT')
|
|
|
|
|
|
+ and (toer.finish_type = 'MANUAL' or toer.finish_type = 'AUTO' or toer.finish_type = 'BREACH' or
|
|
|
|
+ toer.finish_type = 'INTERRUPT')
|
|
</when>
|
|
</when>
|
|
<otherwise>
|
|
<otherwise>
|
|
and toer.finish_type = #{finishType}
|
|
and toer.finish_type = #{finishType}
|
|
</otherwise>
|
|
</otherwise>
|
|
</choose>
|
|
</choose>
|
|
</if>
|
|
</if>
|
|
- </where>) t,
|
|
|
|
|
|
+ </where>
|
|
|
|
+ ) t,
|
|
(SELECT @i := 0) as i
|
|
(SELECT @i := 0) as i
|
|
- <where> 1 = 1
|
|
|
|
|
|
+ <where>1 = 1
|
|
<if test="minMultipleFaceCount != null and minMultipleFaceCount != '' or minMultipleFaceCount == 0">
|
|
<if test="minMultipleFaceCount != null and minMultipleFaceCount != '' or minMultipleFaceCount == 0">
|
|
and t.multipleFaceCount >= #{minMultipleFaceCount}
|
|
and t.multipleFaceCount >= #{minMultipleFaceCount}
|
|
</if>
|
|
</if>
|
|
@@ -861,8 +872,9 @@
|
|
order by t.roomCode
|
|
order by t.roomCode
|
|
</sql>
|
|
</sql>
|
|
|
|
|
|
- <select id="invigilatePageListHistoryExport" resultType="com.qmth.themis.business.bean.admin.InvigilateListHistoryBean">
|
|
|
|
- <include refid="invigilatePageListHistorySql" />
|
|
|
|
|
|
+ <select id="invigilatePageListHistoryExport"
|
|
|
|
+ resultType="com.qmth.themis.business.bean.admin.InvigilateListHistoryBean">
|
|
|
|
+ <include refid="invigilatePageListHistorySql"/>
|
|
</select>
|
|
</select>
|
|
|
|
|
|
<select id="getDoneCount" resultType="java.util.Map">
|
|
<select id="getDoneCount" resultType="java.util.Map">
|
|
@@ -872,7 +884,7 @@
|
|
left join t_e_exam_student t on f.exam_student_id=t.id
|
|
left join t_e_exam_student t on f.exam_student_id=t.id
|
|
left join t_e_student h on t.student_id=h.id
|
|
left join t_e_student h on t.student_id=h.id
|
|
where f.exam_id = #{examId}
|
|
where f.exam_id = #{examId}
|
|
- <if test="orgId != null">
|
|
|
|
|
|
+ <if test="orgId != null and orgId != ''">
|
|
and h.org_id=#{orgId}
|
|
and h.org_id=#{orgId}
|
|
</if>
|
|
</if>
|
|
<if test="activityId != null and activityId != ''">
|
|
<if test="activityId != null and activityId != ''">
|
|
@@ -894,7 +906,7 @@
|
|
left join t_e_exam_student t on f.exam_student_id=t.id
|
|
left join t_e_exam_student t on f.exam_student_id=t.id
|
|
left join t_e_student h on t.student_id=h.id
|
|
left join t_e_student h on t.student_id=h.id
|
|
where f.exam_id = #{examId}
|
|
where f.exam_id = #{examId}
|
|
- <if test="orgId != null">
|
|
|
|
|
|
+ <if test="orgId != null and orgId != ''">
|
|
and h.org_id=#{orgId}
|
|
and h.org_id=#{orgId}
|
|
</if>
|
|
</if>
|
|
<if test="activityId != null and activityId != ''">
|
|
<if test="activityId != null and activityId != ''">
|
|
@@ -994,18 +1006,11 @@
|
|
select count(1) from t_oe_exam_record f
|
|
select count(1) from t_oe_exam_record f
|
|
left join t_e_exam h on f.exam_id=h.id
|
|
left join t_e_exam h on f.exam_id=h.id
|
|
where f.client_websocket_status='ON_LINE'
|
|
where f.client_websocket_status='ON_LINE'
|
|
- <if test="orgId != null">
|
|
|
|
- and h.org_id=#{orgId}
|
|
|
|
- </if>
|
|
|
|
- </select>
|
|
|
|
- <select id="getExamingCount" resultType="java.lang.Long">
|
|
|
|
- select count(1) from t_oe_exam_record f
|
|
|
|
- left join t_e_exam h on f.exam_id=h.id
|
|
|
|
- where f.status != 'FINISHED' and f.status != 'PERSISTED' and f.client_websocket_status='ON_LINE'
|
|
|
|
- <if test="orgId != null">
|
|
|
|
|
|
+ <if test="orgId != null and orgId != ''">
|
|
and h.org_id=#{orgId}
|
|
and h.org_id=#{orgId}
|
|
</if>
|
|
</if>
|
|
</select>
|
|
</select>
|
|
|
|
+
|
|
<select id="getExceptionCount" resultType="java.lang.Long">
|
|
<select id="getExceptionCount" resultType="java.lang.Long">
|
|
SELECT
|
|
SELECT
|
|
count(DISTINCT(f.id))
|
|
count(DISTINCT(f.id))
|
|
@@ -1014,22 +1019,23 @@
|
|
LEFT JOIN t_ie_invigilate_exception_info t ON f.id = t.exam_record_id
|
|
LEFT JOIN t_ie_invigilate_exception_info t ON f.id = t.exam_record_id
|
|
left join t_e_exam h on f.exam_id=h.id
|
|
left join t_e_exam h on f.exam_id=h.id
|
|
WHERE 1 = 1
|
|
WHERE 1 = 1
|
|
- <if test="orgId != null">
|
|
|
|
|
|
+ <if test="orgId != null and orgId != ''">
|
|
and h.org_id=#{orgId}
|
|
and h.org_id=#{orgId}
|
|
</if>
|
|
</if>
|
|
and (f.STATUS = 'FIRST_PREPARE' or f.STATUS = 'ANSWERING'
|
|
and (f.STATUS = 'FIRST_PREPARE' or f.STATUS = 'ANSWERING'
|
|
or f.STATUS = 'BREAK_OFF' or f.STATUS = 'RESUME_PREPARE')
|
|
or f.STATUS = 'BREAK_OFF' or f.STATUS = 'RESUME_PREPARE')
|
|
AND t.id IS NOT NULL
|
|
AND t.id IS NOT NULL
|
|
</select>
|
|
</select>
|
|
|
|
+
|
|
<select id="getWarnCount" resultType="java.lang.Long">
|
|
<select id="getWarnCount" resultType="java.lang.Long">
|
|
SELECT
|
|
SELECT
|
|
- count(DISTINCT(f.id))
|
|
|
|
|
|
+ count(f.id)
|
|
FROM
|
|
FROM
|
|
t_oe_exam_record f
|
|
t_oe_exam_record f
|
|
LEFT JOIN t_ie_invigilate_warn_info t ON f.id = t.exam_record_id
|
|
LEFT JOIN t_ie_invigilate_warn_info t ON f.id = t.exam_record_id
|
|
left join t_e_exam h on f.exam_id=h.id
|
|
left join t_e_exam h on f.exam_id=h.id
|
|
WHERE 1 = 1
|
|
WHERE 1 = 1
|
|
- <if test="orgId != null">
|
|
|
|
|
|
+ <if test="orgId != null and orgId != ''">
|
|
and h.org_id=#{orgId}
|
|
and h.org_id=#{orgId}
|
|
</if>
|
|
</if>
|
|
and (f.STATUS = 'FIRST_PREPARE' or f.STATUS = 'ANSWERING'
|
|
and (f.STATUS = 'FIRST_PREPARE' or f.STATUS = 'ANSWERING'
|
|
@@ -1037,6 +1043,126 @@
|
|
AND t.type!='NONE'
|
|
AND t.type!='NONE'
|
|
AND t.id IS NOT NULL
|
|
AND t.id IS NOT NULL
|
|
</select>
|
|
</select>
|
|
|
|
+
|
|
|
|
+ <select id="getBreachCount" resultType="java.lang.Long">
|
|
|
|
+ SELECT
|
|
|
|
+ count(f.id)
|
|
|
|
+ FROM
|
|
|
|
+ t_oe_exam_record f
|
|
|
|
+ LEFT JOIN t_e_exam_breach_log t ON f.id = t.exam_record_id
|
|
|
|
+ left join t_e_exam h on f.exam_id=h.id
|
|
|
|
+ WHERE 1 = 1
|
|
|
|
+ <if test="orgId != null and orgId != ''">
|
|
|
|
+ and h.org_id=#{orgId}
|
|
|
|
+ </if>
|
|
|
|
+ and (f.STATUS = 'FIRST_PREPARE' or f.STATUS = 'ANSWERING'
|
|
|
|
+ or f.STATUS = 'BREAK_OFF' or f.STATUS = 'RESUME_PREPARE')
|
|
|
|
+ AND t.status = 0
|
|
|
|
+ AND t.id IS NOT NULL
|
|
|
|
+ </select>
|
|
|
|
+
|
|
|
|
+ <select id="getWarnDistribution" resultType="com.qmth.themis.business.bean.admin.ExaminationMonitorWarnDistributionBean">
|
|
|
|
+ select
|
|
|
|
+ tiiwi.info as type,
|
|
|
|
+ count(tiiwi.exam_record_id) as warnCount
|
|
|
|
+ from
|
|
|
|
+ t_ie_invigilate_warn_info tiiwi
|
|
|
|
+ join t_oe_exam_record toer on tiiwi.exam_record_id = toer.id
|
|
|
|
+ join t_e_exam tee on toer.exam_id = tee.id
|
|
|
|
+ WHERE 1 = 1
|
|
|
|
+ <if test="orgId != null and orgId != ''">
|
|
|
|
+ and tee.org_id = #{orgId}
|
|
|
|
+ </if>
|
|
|
|
+ and (toer.STATUS = 'FIRST_PREPARE' or toer.STATUS = 'ANSWERING'
|
|
|
|
+ or toer.STATUS = 'BREAK_OFF' or toer.STATUS = 'RESUME_PREPARE')
|
|
|
|
+ group by
|
|
|
|
+ tiiwi.`info`
|
|
|
|
+ </select>
|
|
|
|
+
|
|
|
|
+ <select id="getWarnRegionDistribution" resultType="com.qmth.themis.business.bean.admin.ExaminationMonitorWarnRegionDistributionBean">
|
|
|
|
+ select
|
|
|
|
+ tir.country,
|
|
|
|
+ tir.province,
|
|
|
|
+ count(tiiwi.exam_record_id) as warnCount
|
|
|
|
+ from
|
|
|
|
+ t_ip_region tir
|
|
|
|
+ join t_oe_exam_record toer on
|
|
|
|
+ tir.exam_record_id = toer.id
|
|
|
|
+ left join t_ie_invigilate_warn_info tiiwi on
|
|
|
|
+ tiiwi.exam_record_id = toer.id
|
|
|
|
+ join t_e_exam tee on toer.exam_id = tee.id
|
|
|
|
+ WHERE 1 = 1
|
|
|
|
+ <if test="orgId != null and orgId != ''">
|
|
|
|
+ and tee.org_id = #{orgId}
|
|
|
|
+ </if>
|
|
|
|
+ and (toer.STATUS = 'FIRST_PREPARE' or toer.STATUS = 'ANSWERING'
|
|
|
|
+ or toer.STATUS = 'BREAK_OFF' or toer.STATUS = 'RESUME_PREPARE')
|
|
|
|
+ group by
|
|
|
|
+ tir.country,
|
|
|
|
+ tir.province;
|
|
|
|
+ </select>
|
|
|
|
+
|
|
|
|
+ <select id="getMap" resultType="com.qmth.themis.business.bean.admin.ExaminationMonitorMapBean">
|
|
|
|
+ select
|
|
|
|
+ t.country,
|
|
|
|
+ t.province,
|
|
|
|
+ sum(t.onlineCount) as onlineCount,
|
|
|
|
+ sum(t.warnCount) as warnCount
|
|
|
|
+ from
|
|
|
|
+ (
|
|
|
|
+ select
|
|
|
|
+ tir.country,
|
|
|
|
+ tir.province,
|
|
|
|
+ count(toer.id) as onlineCount,
|
|
|
|
+ 0 as warnCount
|
|
|
|
+ from
|
|
|
|
+ t_ip_region tir
|
|
|
|
+ join t_oe_exam_record toer on
|
|
|
|
+ tir.exam_record_id = toer.id
|
|
|
|
+ join t_e_exam tee on
|
|
|
|
+ toer.exam_id = tee.id
|
|
|
|
+ WHERE 1 = 1
|
|
|
|
+ <if test="orgId != null and orgId != ''">
|
|
|
|
+ and tee.org_id = #{orgId}
|
|
|
|
+ </if>
|
|
|
|
+ and toer.client_websocket_status = 'ON_LINE'
|
|
|
|
+ and (toer.STATUS = 'FIRST_PREPARE'
|
|
|
|
+ or toer.STATUS = 'ANSWERING'
|
|
|
|
+ or toer.STATUS = 'BREAK_OFF'
|
|
|
|
+ or toer.STATUS = 'RESUME_PREPARE')
|
|
|
|
+ group by
|
|
|
|
+ tir.country,
|
|
|
|
+ tir.province
|
|
|
|
+ union all
|
|
|
|
+ select
|
|
|
|
+ tir.country,
|
|
|
|
+ tir.province,
|
|
|
|
+ 0 as onlineCount,
|
|
|
|
+ count(tiiwi.exam_record_id) as warnCount
|
|
|
|
+ from
|
|
|
|
+ t_ip_region tir
|
|
|
|
+ join t_oe_exam_record toer on
|
|
|
|
+ tir.exam_record_id = toer.id
|
|
|
|
+ left join t_ie_invigilate_warn_info tiiwi on
|
|
|
|
+ tiiwi.exam_record_id = tir.exam_record_id
|
|
|
|
+ join t_e_exam tee on
|
|
|
|
+ toer.exam_id = tee.id
|
|
|
|
+ WHERE 1 = 1
|
|
|
|
+ <if test="orgId != null and orgId != ''">
|
|
|
|
+ and tee.org_id = #{orgId}
|
|
|
|
+ </if>
|
|
|
|
+ and (toer.STATUS = 'FIRST_PREPARE'
|
|
|
|
+ or toer.STATUS = 'ANSWERING'
|
|
|
|
+ or toer.STATUS = 'BREAK_OFF'
|
|
|
|
+ or toer.STATUS = 'RESUME_PREPARE')
|
|
|
|
+ group by
|
|
|
|
+ tir.country,
|
|
|
|
+ tir.province) t
|
|
|
|
+ group by
|
|
|
|
+ t.country,
|
|
|
|
+ t.province
|
|
|
|
+ </select>
|
|
|
|
+
|
|
<select id="getOrgExamingCount" resultType="java.util.Map">
|
|
<select id="getOrgExamingCount" resultType="java.util.Map">
|
|
SELECT
|
|
SELECT
|
|
o. NAME orgName,
|
|
o. NAME orgName,
|
|
@@ -1051,7 +1177,7 @@
|
|
LEFT JOIN t_e_exam_student t ON f.exam_student_id = t.id
|
|
LEFT JOIN t_e_exam_student t ON f.exam_student_id = t.id
|
|
LEFT JOIN t_e_student h ON t.student_id = h.id
|
|
LEFT JOIN t_e_student h ON t.student_id = h.id
|
|
WHERE 1 = 1
|
|
WHERE 1 = 1
|
|
- <if test="orgId != null">
|
|
|
|
|
|
+ <if test="orgId != null and orgId != ''">
|
|
and h.org_id=#{orgId}
|
|
and h.org_id=#{orgId}
|
|
</if>
|
|
</if>
|
|
and (f.STATUS = 'FIRST_PREPARE' or f.STATUS = 'ANSWERING'
|
|
and (f.STATUS = 'FIRST_PREPARE' or f.STATUS = 'ANSWERING'
|
|
@@ -1062,6 +1188,7 @@
|
|
) tem
|
|
) tem
|
|
LEFT JOIN t_b_org o ON o.id = tem.orgId
|
|
LEFT JOIN t_b_org o ON o.id = tem.orgId
|
|
</select>
|
|
</select>
|
|
|
|
+
|
|
<select id="getOrgDistribution" resultType="java.util.Map">
|
|
<select id="getOrgDistribution" resultType="java.util.Map">
|
|
SELECT
|
|
SELECT
|
|
o. NAME orgName,
|
|
o. NAME orgName,
|
|
@@ -1077,7 +1204,7 @@
|
|
LEFT JOIN t_e_exam_student t ON f.exam_student_id = t.id
|
|
LEFT JOIN t_e_exam_student t ON f.exam_student_id = t.id
|
|
LEFT JOIN t_e_student h ON t.student_id = h.id
|
|
LEFT JOIN t_e_student h ON t.student_id = h.id
|
|
WHERE 1 = 1
|
|
WHERE 1 = 1
|
|
- <if test="orgId != null">
|
|
|
|
|
|
+ <if test="orgId != null and orgId != ''">
|
|
and h.org_id=#{orgId}
|
|
and h.org_id=#{orgId}
|
|
</if>
|
|
</if>
|
|
and (f.STATUS = 'FIRST_PREPARE' or f.STATUS = 'ANSWERING'
|
|
and (f.STATUS = 'FIRST_PREPARE' or f.STATUS = 'ANSWERING'
|
|
@@ -1089,6 +1216,7 @@
|
|
) tem
|
|
) tem
|
|
LEFT JOIN t_b_org o ON o.id = tem.orgId
|
|
LEFT JOIN t_b_org o ON o.id = tem.orgId
|
|
</select>
|
|
</select>
|
|
|
|
+
|
|
<select id="getTypeDistribution" resultType="java.util.Map">
|
|
<select id="getTypeDistribution" resultType="java.util.Map">
|
|
SELECT
|
|
SELECT
|
|
substring(w.info,instr(w.info,"【") + 1,instr(w.info,"】") - 2) as type,
|
|
substring(w.info,instr(w.info,"【") + 1,instr(w.info,"】") - 2) as type,
|
|
@@ -1098,7 +1226,7 @@
|
|
LEFT JOIN t_ie_invigilate_warn_info w ON f.id = w.exam_record_id
|
|
LEFT JOIN t_ie_invigilate_warn_info w ON f.id = w.exam_record_id
|
|
left join t_e_exam h on f.exam_id=h.id
|
|
left join t_e_exam h on f.exam_id=h.id
|
|
WHERE 1 = 1
|
|
WHERE 1 = 1
|
|
- <if test="orgId != null">
|
|
|
|
|
|
+ <if test="orgId != null and orgId != ''">
|
|
and h.org_id=#{orgId}
|
|
and h.org_id=#{orgId}
|
|
</if>
|
|
</if>
|
|
and (f.STATUS = 'FIRST_PREPARE' or f.STATUS = 'ANSWERING'
|
|
and (f.STATUS = 'FIRST_PREPARE' or f.STATUS = 'ANSWERING'
|
|
@@ -1108,6 +1236,7 @@
|
|
GROUP BY
|
|
GROUP BY
|
|
w.info
|
|
w.info
|
|
</select>
|
|
</select>
|
|
|
|
+
|
|
<select id="getWarnTrend" resultType="com.qmth.themis.business.bean.admin.ExaminationMonitorHourWarnCountBean">
|
|
<select id="getWarnTrend" resultType="com.qmth.themis.business.bean.admin.ExaminationMonitorHourWarnCountBean">
|
|
SELECT
|
|
SELECT
|
|
FROM_UNIXTIME(w.create_time / 1000,'%H') hour,
|
|
FROM_UNIXTIME(w.create_time / 1000,'%H') hour,
|
|
@@ -1115,7 +1244,7 @@
|
|
FROM t_ie_invigilate_warn_info w
|
|
FROM t_ie_invigilate_warn_info w
|
|
left join t_e_exam h on w.exam_id=h.id
|
|
left join t_e_exam h on w.exam_id=h.id
|
|
WHERE w.type!='NONE' and w.create_time>=#{startTime}
|
|
WHERE w.type!='NONE' and w.create_time>=#{startTime}
|
|
- <if test="orgId != null">
|
|
|
|
|
|
+ <if test="orgId != null and orgId != ''">
|
|
and h.org_id=#{orgId}
|
|
and h.org_id=#{orgId}
|
|
</if>
|
|
</if>
|
|
GROUP BY
|
|
GROUP BY
|
|
@@ -1282,8 +1411,8 @@
|
|
#{roomCode}
|
|
#{roomCode}
|
|
</foreach>
|
|
</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')
|
|
|
|
|
|
+ or t.STATUS = 'RESUME_PREPARE'
|
|
|
|
+ or t.STATUS = 'BREAK_OFF')
|
|
union all
|
|
union all
|
|
select
|
|
select
|
|
count(distinct t.exam_student_id) as c
|
|
count(distinct t.exam_student_id) as c
|
|
@@ -1325,37 +1454,37 @@
|
|
|
|
|
|
<select id="findByViewAdmin" resultType="java.lang.Integer">
|
|
<select id="findByViewAdmin" resultType="java.lang.Integer">
|
|
select
|
|
select
|
|
- count(1) as c
|
|
|
|
|
|
+ count(1) as c
|
|
from
|
|
from
|
|
- t_e_exam_student tees
|
|
|
|
- join t_e_student tes on
|
|
|
|
- tees.student_id = tes.id
|
|
|
|
|
|
+ t_e_exam_student tees
|
|
|
|
+ join t_e_student tes on
|
|
|
|
+ tees.student_id = tes.id
|
|
where
|
|
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>
|
|
|
|
- )
|
|
|
|
|
|
+ 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>
|
|
|
|
+ )
|
|
union all
|
|
union all
|
|
select
|
|
select
|
|
count(distinct toer.exam_student_id) as c
|
|
count(distinct toer.exam_student_id) as c
|
|
@@ -1379,7 +1508,7 @@
|
|
tee.id
|
|
tee.id
|
|
from
|
|
from
|
|
t_e_exam tee
|
|
t_e_exam tee
|
|
- <where> 1 = 1
|
|
|
|
|
|
+ <where>1 = 1
|
|
<if test="orgId != null and orgId != ''">
|
|
<if test="orgId != null and orgId != ''">
|
|
and tee.org_id = #{orgId}
|
|
and tee.org_id = #{orgId}
|
|
</if>
|
|
</if>
|
|
@@ -1454,7 +1583,8 @@
|
|
from t_oe_exam_record toer
|
|
from t_oe_exam_record toer
|
|
join t_e_exam tee on tee.id = toer.exam_id
|
|
join t_e_exam tee on tee.id = toer.exam_id
|
|
join t_e_exam_activity teea on teea.exam_id = toer.exam_id and teea.id = toer.exam_activity_id
|
|
join t_e_exam_activity teea on teea.exam_id = toer.exam_id and teea.id = toer.exam_activity_id
|
|
- join t_e_exam_student tees on tees.exam_id = toer.exam_id and tees.exam_activity_id = toer.exam_activity_id and tees.id = toer.exam_student_id
|
|
|
|
|
|
+ join t_e_exam_student tees on tees.exam_id = toer.exam_id and tees.exam_activity_id = toer.exam_activity_id and
|
|
|
|
+ tees.id = toer.exam_student_id
|
|
<where>
|
|
<where>
|
|
toer.first_start_time is not null
|
|
toer.first_start_time is not null
|
|
<if test="examId != null and examId != ''">
|
|
<if test="examId != null and examId != ''">
|
|
@@ -1472,7 +1602,8 @@
|
|
<if test="finishType != null and finishType != ''">
|
|
<if test="finishType != null and finishType != ''">
|
|
<choose>
|
|
<choose>
|
|
<when test="finishType == 'ALL'">
|
|
<when test="finishType == 'ALL'">
|
|
- and (toer.finish_type = 'MANUAL' or toer.finish_type = 'AUTO' or toer.finish_type = 'BREACH' or toer.finish_type = 'INTERRUPT')
|
|
|
|
|
|
+ and (toer.finish_type = 'MANUAL' or toer.finish_type = 'AUTO' or toer.finish_type = 'BREACH' or
|
|
|
|
+ toer.finish_type = 'INTERRUPT')
|
|
</when>
|
|
</when>
|
|
<otherwise>
|
|
<otherwise>
|
|
and toer.finish_type = #{finishType}
|
|
and toer.finish_type = #{finishType}
|
|
@@ -1495,7 +1626,8 @@
|
|
from t_oe_exam_record toer
|
|
from t_oe_exam_record toer
|
|
join t_e_exam tee on tee.id = toer.exam_id
|
|
join t_e_exam tee on tee.id = toer.exam_id
|
|
join t_e_exam_activity teea on teea.exam_id = toer.exam_id and teea.id = toer.exam_activity_id
|
|
join t_e_exam_activity teea on teea.exam_id = toer.exam_id and teea.id = toer.exam_activity_id
|
|
- join t_e_exam_student tees on tees.exam_id = toer.exam_id and tees.exam_activity_id = toer.exam_activity_id and tees.id = toer.exam_student_id
|
|
|
|
|
|
+ join t_e_exam_student tees on tees.exam_id = toer.exam_id and tees.exam_activity_id = toer.exam_activity_id and
|
|
|
|
+ tees.id = toer.exam_student_id
|
|
<where>
|
|
<where>
|
|
toer.first_start_time is not null
|
|
toer.first_start_time is not null
|
|
<if test="examId != null and examId != ''">
|
|
<if test="examId != null and examId != ''">
|