|
@@ -77,19 +77,19 @@
|
|
</select>
|
|
</select>
|
|
|
|
|
|
<update id="dataUpdate">
|
|
<update id="dataUpdate">
|
|
- update t_oe_exam_record t set
|
|
|
|
- t.${colName}=#{colValue} where t.id=#{recordId}
|
|
|
|
- </update>
|
|
|
|
|
|
+ update t_oe_exam_record t
|
|
|
|
+ set t.${colName}=#{colValue}
|
|
|
|
+ where t.id = #{recordId}
|
|
|
|
+ </update>
|
|
|
|
|
|
<sql id="invigilatePageHead">
|
|
<sql id="invigilatePageHead">
|
|
- select
|
|
|
|
- distinct t.exam_id examId,
|
|
|
|
- tee.name as examName,
|
|
|
|
- t.exam_activity_id examActivityId,
|
|
|
|
- teea.code as examActivityCode,
|
|
|
|
- t.exam_student_id examStudentId,
|
|
|
|
- t.id examRecordId,
|
|
|
|
- s.identity identity,
|
|
|
|
|
|
+ select distinct t.exam_id examId,
|
|
|
|
+ tee.name as examName,
|
|
|
|
+ t.exam_activity_id examActivityId,
|
|
|
|
+ teea.code as examActivityCode,
|
|
|
|
+ t.exam_student_id examStudentId,
|
|
|
|
+ t.id examRecordId,
|
|
|
|
+ s.identity identity,
|
|
s.room_code roomCode,
|
|
s.room_code roomCode,
|
|
s.room_name roomName,
|
|
s.room_name roomName,
|
|
s.name name,
|
|
s.name name,
|
|
@@ -105,14 +105,14 @@
|
|
t.client_last_sync_time as updateTime,
|
|
t.client_last_sync_time as updateTime,
|
|
t.monitor_video_source as monitorVideoSource,
|
|
t.monitor_video_source as monitorVideoSource,
|
|
t.monitor_record as monitorRecord
|
|
t.monitor_record as monitorRecord
|
|
- </sql>
|
|
|
|
|
|
+ </sql>
|
|
|
|
|
|
<sql id="invigilatePageMiddle">
|
|
<sql id="invigilatePageMiddle">
|
|
- from t_oe_exam_record t
|
|
|
|
|
|
+ from t_oe_exam_record t
|
|
left join t_e_exam_student s on t.exam_student_id = s.id
|
|
left join t_e_exam_student s on t.exam_student_id = s.id
|
|
left join t_e_exam tee on tee.id = t.exam_id
|
|
left join t_e_exam tee on tee.id = t.exam_id
|
|
left join t_e_exam_activity teea on teea.id = t.exam_activity_id
|
|
left join t_e_exam_activity teea on teea.id = t.exam_activity_id
|
|
- </sql>
|
|
|
|
|
|
+ </sql>
|
|
|
|
|
|
<sql id="invigilatePageFoot">
|
|
<sql id="invigilatePageFoot">
|
|
<where>
|
|
<where>
|
|
@@ -163,7 +163,7 @@
|
|
</sql>
|
|
</sql>
|
|
|
|
|
|
<sql id="invigilatePageHistoryFoot">
|
|
<sql id="invigilatePageHistoryFoot">
|
|
- <where> 1 = 1
|
|
|
|
|
|
+ <where>1 = 1
|
|
<if test="examId != null and examId != ''">
|
|
<if test="examId != null and examId != ''">
|
|
and t.exam_id = #{examId}
|
|
and t.exam_id = #{examId}
|
|
</if>
|
|
</if>
|
|
@@ -221,7 +221,8 @@
|
|
and t.paper_download = #{paperDownload}
|
|
and t.paper_download = #{paperDownload}
|
|
</if>
|
|
</if>
|
|
<if test="status == null or status == ''">
|
|
<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')
|
|
|
|
|
|
+ and (t.status = 'FIRST_PREPARE' or t.status = 'ANSWERING' or t.status = 'BREAK_OFF' or t.status =
|
|
|
|
+ 'RESUME_PREPARE')
|
|
</if>
|
|
</if>
|
|
) t,
|
|
) t,
|
|
(SELECT @i := 0) as i
|
|
(SELECT @i := 0) as i
|
|
@@ -234,16 +235,18 @@
|
|
t.*
|
|
t.*
|
|
from
|
|
from
|
|
(
|
|
(
|
|
- <include refid="invigilatePageHead" />
|
|
|
|
|
|
+ <include refid="invigilatePageHead"/>
|
|
<!--,t.monitor_live_url as monitorLiveUrl-->
|
|
<!--,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" />
|
|
|
|
|
|
+ ,(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">
|
|
<if test="paperDownload != null and paperDownload != '' or paperDownload == 0">
|
|
and t.paper_download = #{paperDownload}
|
|
and t.paper_download = #{paperDownload}
|
|
</if>
|
|
</if>
|
|
<if test="status == null or status == ''">
|
|
<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')
|
|
|
|
|
|
+ and (t.status = 'FIRST_PREPARE' or t.status = 'ANSWERING' or t.status = 'BREAK_OFF' or t.status =
|
|
|
|
+ 'RESUME_PREPARE')
|
|
</if>
|
|
</if>
|
|
<if test="cameraMonitorStatus != null and cameraMonitorStatus != ''">
|
|
<if test="cameraMonitorStatus != null and cameraMonitorStatus != ''">
|
|
and t.camera_monitor_status = upper(#{cameraMonitorStatus})
|
|
and t.camera_monitor_status = upper(#{cameraMonitorStatus})
|
|
@@ -263,31 +266,35 @@
|
|
</select>
|
|
</select>
|
|
|
|
|
|
<select id="invigilatePageListVideoRandom" resultType="com.qmth.themis.business.bean.admin.InvigilateListVideoBean">
|
|
<select id="invigilatePageListVideoRandom" resultType="com.qmth.themis.business.bean.admin.InvigilateListVideoBean">
|
|
- <include refid="invigilatePageHead" />
|
|
|
|
|
|
+ <include refid="invigilatePageHead"/>
|
|
<!--,t.monitor_live_url as monitorLiveUrl-->
|
|
<!--,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" />
|
|
|
|
- <where> 1 = 1
|
|
|
|
|
|
+ ,(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"/>
|
|
|
|
+ <where>1 = 1
|
|
<if test="examId != null and examId != ''">
|
|
<if test="examId != null and examId != ''">
|
|
and t.exam_id = #{examId}
|
|
and t.exam_id = #{examId}
|
|
</if>
|
|
</if>
|
|
<if test="orgId != null and orgId != ''">
|
|
<if test="orgId != null and orgId != ''">
|
|
and tee.org_id = #{orgId}
|
|
and tee.org_id = #{orgId}
|
|
</if>
|
|
</if>
|
|
- and (t.status = 'FIRST_PREPARE' or t.status = 'ANSWERING' or t.status = 'BREAK_OFF' or t.status = 'RESUME_PREPARE')
|
|
|
|
|
|
+ and (t.status = 'FIRST_PREPARE' or t.status = 'ANSWERING' or t.status = 'BREAK_OFF' or t.status =
|
|
|
|
+ 'RESUME_PREPARE')
|
|
</where>
|
|
</where>
|
|
ORDER BY RAND() LIMIT #{randomNum}
|
|
ORDER BY RAND() LIMIT #{randomNum}
|
|
</select>
|
|
</select>
|
|
|
|
|
|
<select id="invigilatePagePatrolList" resultType="com.qmth.themis.business.bean.admin.InvigilateListPatrolBean">
|
|
<select id="invigilatePagePatrolList" resultType="com.qmth.themis.business.bean.admin.InvigilateListPatrolBean">
|
|
- select (@i := @i + 1) as seq,t.* from(<include refid="invigilatePageHead" />
|
|
|
|
|
|
+ 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_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 count(1) from t_ie_invigilate_warn_info tiiwi where tiiwi.exam_record_id = t.id and tiiwi.`type` =
|
|
'FACE_COUNT_ERROR' and tiiwi.`level` = 'D8') as multipleFaceCount
|
|
'FACE_COUNT_ERROR' and tiiwi.`level` = 'D8') as multipleFaceCount
|
|
- <include refid="invigilatePageMiddle" />
|
|
|
|
- <include refid="invigilatePageFoot" />
|
|
|
|
|
|
+ <include refid="invigilatePageMiddle"/>
|
|
|
|
+ <include refid="invigilatePageFoot"/>
|
|
<if test="status == null or status == ''">
|
|
<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')
|
|
|
|
|
|
+ and (t.status = 'FIRST_PREPARE' or t.status = 'ANSWERING' or t.status = 'BREAK_OFF' or t.status =
|
|
|
|
+ 'RESUME_PREPARE')
|
|
</if>
|
|
</if>
|
|
) t,(SELECT @i := 0) as i
|
|
) t,(SELECT @i := 0) as i
|
|
<where>
|
|
<where>
|
|
@@ -337,7 +344,7 @@
|
|
left join t_e_exam_activity teea on teea.id = tiiwi.exam_activity_id
|
|
left join t_e_exam_activity teea on teea.id = tiiwi.exam_activity_id
|
|
left join t_oe_exam_record toer on toer.id = tiiwi.exam_record_id
|
|
left join t_oe_exam_record toer on toer.id = tiiwi.exam_record_id
|
|
left join t_e_exam_student tees on tees.id = tiiwi.exam_student_id
|
|
left join t_e_exam_student tees on tees.id = tiiwi.exam_student_id
|
|
- <where> 1 = 1
|
|
|
|
|
|
+ <where>1 = 1
|
|
<if test="examId != null and examId != ''">
|
|
<if test="examId != null and examId != ''">
|
|
and tiiwi.exam_id = #{examId}
|
|
and tiiwi.exam_id = #{examId}
|
|
</if>
|
|
</if>
|
|
@@ -399,7 +406,7 @@
|
|
left join t_e_exam_activity teea on teea.id = tiiwi.exam_activity_id
|
|
left join t_e_exam_activity teea on teea.id = tiiwi.exam_activity_id
|
|
left join t_oe_exam_record toer on toer.id = tiiwi.exam_record_id
|
|
left join t_oe_exam_record toer on toer.id = tiiwi.exam_record_id
|
|
left join t_e_exam_student tees on tees.id = tiiwi.exam_student_id
|
|
left join t_e_exam_student tees on tees.id = tiiwi.exam_student_id
|
|
- <where> 1 = 1
|
|
|
|
|
|
+ <where>1 = 1
|
|
<if test="examId != null and examId != ''">
|
|
<if test="examId != null and examId != ''">
|
|
and tiiwi.exam_id = #{examId}
|
|
and tiiwi.exam_id = #{examId}
|
|
</if>
|
|
</if>
|
|
@@ -434,7 +441,7 @@
|
|
</if>
|
|
</if>
|
|
</where>
|
|
</where>
|
|
) t
|
|
) t
|
|
- <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>
|
|
@@ -463,7 +470,8 @@
|
|
tees.name,
|
|
tees.name,
|
|
tees.course_code as courseCode,
|
|
tees.course_code as courseCode,
|
|
tees.course_name as courseName,
|
|
tees.course_name as courseName,
|
|
- if(tee.exam_count - tees.already_exam_count <![CDATA[ < ]]> 0,0,tee.exam_count - tees.already_exam_count) as leftExamCount,
|
|
|
|
|
|
+ if(tee.exam_count - tees.already_exam_count <![CDATA[ < ]]> 0,0,tee.exam_count - tees.already_exam_count) as
|
|
|
|
+ leftExamCount,
|
|
if((select count(1) from t_oe_exam_record toer where toer.exam_student_id =
|
|
if((select count(1) from t_oe_exam_record toer where toer.exam_student_id =
|
|
tees.id and (toer.status = 'FINISHED' or toer.status = 'PERSISTED') >
|
|
tees.id and (toer.status = 'FINISHED' or toer.status = 'PERSISTED') >
|
|
0),'已完成','未完成') as status,
|
|
0),'已完成','未完成') as status,
|
|
@@ -475,7 +483,7 @@
|
|
left join t_e_exam_activity teea on
|
|
left join t_e_exam_activity teea on
|
|
teea.id = tees.exam_activity_id
|
|
teea.id = tees.exam_activity_id
|
|
left join t_e_student tes on tees.student_id = tes.id
|
|
left join t_e_student tes on tees.student_id = tes.id
|
|
- <where> 1 = 1
|
|
|
|
|
|
+ <where>1 = 1
|
|
<if test="examId != null and examId != ''">
|
|
<if test="examId != null and examId != ''">
|
|
and tees.exam_id = #{examId}
|
|
and tees.exam_id = #{examId}
|
|
</if>
|
|
</if>
|
|
@@ -507,7 +515,8 @@
|
|
order by tees.room_code
|
|
order by tees.room_code
|
|
</select>
|
|
</select>
|
|
|
|
|
|
- <select id="invigilatePageProgressListExport" resultType="com.qmth.themis.business.bean.admin.InvigilateListProgressExcelBean">
|
|
|
|
|
|
+ <select id="invigilatePageProgressListExport"
|
|
|
|
+ resultType="com.qmth.themis.business.bean.admin.InvigilateListProgressExcelBean">
|
|
select
|
|
select
|
|
distinct tee.id as examId,
|
|
distinct tee.id as examId,
|
|
tee.name as examName,
|
|
tee.name as examName,
|
|
@@ -518,7 +527,8 @@
|
|
tees.`identity`,
|
|
tees.`identity`,
|
|
tees.name,
|
|
tees.name,
|
|
group_concat(tees.course_name,CONCAT(CONCAT('(',tees.course_code),')')) as courseName,
|
|
group_concat(tees.course_name,CONCAT(CONCAT('(',tees.course_code),')')) as courseName,
|
|
- if(tee.exam_count - tees.already_exam_count <![CDATA[ < ]]> 0,0,tee.exam_count - tees.already_exam_count) as leftExamCount,
|
|
|
|
|
|
+ if(tee.exam_count - tees.already_exam_count <![CDATA[ < ]]> 0,0,tee.exam_count - tees.already_exam_count) as
|
|
|
|
+ leftExamCount,
|
|
if((select count(1) from t_oe_exam_record toer where toer.exam_student_id =
|
|
if((select count(1) from t_oe_exam_record toer where toer.exam_student_id =
|
|
tees.id and (toer.status = 'FINISHED' or toer.status = 'PERSISTED') >
|
|
tees.id and (toer.status = 'FINISHED' or toer.status = 'PERSISTED') >
|
|
0),'已完成','未完成') as status,
|
|
0),'已完成','未完成') as status,
|
|
@@ -530,7 +540,7 @@
|
|
left join t_e_exam_activity teea on
|
|
left join t_e_exam_activity teea on
|
|
teea.id = tees.exam_activity_id
|
|
teea.id = tees.exam_activity_id
|
|
left join t_e_student tes on tees.student_id = tes.id
|
|
left join t_e_student tes on tees.student_id = tes.id
|
|
- <where> 1 = 1
|
|
|
|
|
|
+ <where>1 = 1
|
|
<if test="examId != null and examId != ''">
|
|
<if test="examId != null and examId != ''">
|
|
and tees.exam_id = #{examId}
|
|
and tees.exam_id = #{examId}
|
|
</if>
|
|
</if>
|
|
@@ -559,21 +569,22 @@
|
|
</if>
|
|
</if>
|
|
and tee.monitor_status <![CDATA[ <> ]]> 'FINISHED'
|
|
and tee.monitor_status <![CDATA[ <> ]]> 'FINISHED'
|
|
</where>
|
|
</where>
|
|
- group by tee.id,tees.room_code,tee.name,teea.id,teea.code,tees.`identity`,tees.name,leftExamCount,status,tes.mobile_number
|
|
|
|
|
|
+ group by
|
|
|
|
+ tee.id,tees.room_code,tee.name,teea.id,teea.code,tees.`identity`,tees.name,leftExamCount,status,tes.mobile_number
|
|
order by tees.room_code
|
|
order by tees.room_code
|
|
</select>
|
|
</select>
|
|
|
|
|
|
<select id="invigilatePageListHistory" resultType="com.qmth.themis.business.bean.admin.InvigilateListHistoryBean">
|
|
<select id="invigilatePageListHistory" resultType="com.qmth.themis.business.bean.admin.InvigilateListHistoryBean">
|
|
select (@i := @i + 1) as seq,t.* from(
|
|
select (@i := @i + 1) as seq,t.* from(
|
|
- <include refid="invigilatePageHead" />
|
|
|
|
|
|
+ <include refid="invigilatePageHead"/>
|
|
,tes.mobile_number as mobileNumber
|
|
,tes.mobile_number as mobileNumber
|
|
,t.finish_type as finishType
|
|
,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 count(1) from t_ie_invigilate_warn_info tiiwi where tiiwi.exam_record_id = t.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 = t.id) as exceptionCount
|
|
,(select count(1) from t_ie_invigilate_exception_info tiiei where tiiei.exam_record_id = t.id) as exceptionCount
|
|
- <include refid="invigilatePageMiddle" />
|
|
|
|
|
|
+ <include refid="invigilatePageMiddle"/>
|
|
left join t_e_student tes on s.student_id = tes.id
|
|
left join t_e_student tes on s.student_id = tes.id
|
|
- <include refid="invigilatePageHistoryFoot" />
|
|
|
|
|
|
+ <include refid="invigilatePageHistoryFoot"/>
|
|
<if test="breachStatus != null and breachStatus != '' or breachStatus == 0">
|
|
<if test="breachStatus != null and breachStatus != '' or breachStatus == 0">
|
|
<if test="breachStatus == 0">
|
|
<if test="breachStatus == 0">
|
|
and t.breach_status = #{breachStatus}
|
|
and t.breach_status = #{breachStatus}
|
|
@@ -653,9 +664,10 @@
|
|
</select>
|
|
</select>
|
|
|
|
|
|
<select id="getCountByExamId" resultType="java.lang.Long">
|
|
<select id="getCountByExamId" resultType="java.lang.Long">
|
|
- select count(1) from t_oe_exam_record f
|
|
|
|
- where f.exam_id = #{examId}
|
|
|
|
- </select>
|
|
|
|
|
|
+ select count(1)
|
|
|
|
+ from t_oe_exam_record f
|
|
|
|
+ where f.exam_id = #{examId}
|
|
|
|
+ </select>
|
|
|
|
|
|
<select id="findOneByExamId" resultType="com.qmth.themis.business.entity.TOeExamRecord">
|
|
<select id="findOneByExamId" resultType="com.qmth.themis.business.entity.TOeExamRecord">
|
|
select f.* from t_oe_exam_record f
|
|
select f.* from t_oe_exam_record f
|
|
@@ -671,28 +683,32 @@
|
|
</select>
|
|
</select>
|
|
|
|
|
|
<select id="getListByExamIdAndStartId" resultType="com.qmth.themis.business.entity.TOeExamRecord">
|
|
<select id="getListByExamIdAndStartId" resultType="com.qmth.themis.business.entity.TOeExamRecord">
|
|
- select f.* from t_oe_exam_record f
|
|
|
|
- where f.exam_id = #{examId} and f.id>#{startId}
|
|
|
|
- order by f.id
|
|
|
|
- limit 500
|
|
|
|
- </select>
|
|
|
|
|
|
+ select f.*
|
|
|
|
+ from t_oe_exam_record f
|
|
|
|
+ where f.exam_id = #{examId}
|
|
|
|
+ and f.id > #{startId}
|
|
|
|
+ order by f.id limit 500
|
|
|
|
+ </select>
|
|
|
|
|
|
<update id="updateObjectiveScore">
|
|
<update id="updateObjectiveScore">
|
|
- update t_oe_exam_record t set t.objective_score=#{score} where t.id=#{recordId}
|
|
|
|
- </update>
|
|
|
|
|
|
+ update t_oe_exam_record t
|
|
|
|
+ set t.objective_score=#{score}
|
|
|
|
+ where t.id = #{recordId}
|
|
|
|
+ </update>
|
|
|
|
|
|
<select id="findOneByPaperId" resultType="com.qmth.themis.business.entity.TOeExamRecord">
|
|
<select id="findOneByPaperId" resultType="com.qmth.themis.business.entity.TOeExamRecord">
|
|
- select f.* from t_oe_exam_record f
|
|
|
|
- where f.paper_id = #{paperId}
|
|
|
|
- limit 1
|
|
|
|
- </select>
|
|
|
|
|
|
+ select f.*
|
|
|
|
+ from t_oe_exam_record f
|
|
|
|
+ where f.paper_id = #{paperId} limit 1
|
|
|
|
+ </select>
|
|
|
|
|
|
<select id="patrolReport" resultType="com.qmth.themis.business.bean.admin.InvigilateListPatrolReportBean">
|
|
<select id="patrolReport" resultType="com.qmth.themis.business.bean.admin.InvigilateListPatrolReportBean">
|
|
select
|
|
select
|
|
t.roomCode,
|
|
t.roomCode,
|
|
t.roomName,
|
|
t.roomName,
|
|
sum(t.warningCount) as warningCount,
|
|
sum(t.warningCount) as warningCount,
|
|
- count((t.client_websocket_status = 'OFF_LINE' or t.client_websocket_status is null) or null) as clientWebsocketStatusCount
|
|
|
|
|
|
+ count((t.client_websocket_status = 'OFF_LINE' or t.client_websocket_status is null) or null) as
|
|
|
|
+ clientWebsocketStatusCount
|
|
from
|
|
from
|
|
(
|
|
(
|
|
select
|
|
select
|
|
@@ -715,8 +731,12 @@
|
|
where tbeiu.user_id = #{userId}
|
|
where tbeiu.user_id = #{userId}
|
|
and tbeiu.exam_id = t.exam_id and tbeiu.room_code = s.room_code)
|
|
and tbeiu.exam_id = t.exam_id and tbeiu.room_code = s.room_code)
|
|
</if>
|
|
</if>
|
|
- and (t.status <![CDATA[ <> ]]> 'PERSISTED' and t.status <![CDATA[ <> ]]> 'FINISHED')
|
|
|
|
- </where> ) t
|
|
|
|
|
|
+ and (t.STATUS = 'FIRST_PREPARE'
|
|
|
|
+ or t.STATUS = 'ANSWERING'
|
|
|
|
+ or t.STATUS = 'BREAK_OFF'
|
|
|
|
+ or t.STATUS = 'RESUME_PREPARE')
|
|
|
|
+ </where>
|
|
|
|
+ ) t
|
|
group by
|
|
group by
|
|
t.roomCode,
|
|
t.roomCode,
|
|
t.roomName
|
|
t.roomName
|
|
@@ -746,12 +766,12 @@
|
|
t_oe_exam_record f
|
|
t_oe_exam_record f
|
|
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
|
|
|
|
- f. STATUS != 'FINISHED'
|
|
|
|
|
|
+ WHERE 1 = 1
|
|
<if test="orgId != null">
|
|
<if test="orgId != null">
|
|
and h.org_id=#{orgId}
|
|
and h.org_id=#{orgId}
|
|
</if>
|
|
</if>
|
|
- AND f. STATUS != 'PERSISTED'
|
|
|
|
|
|
+ and (f.STATUS = 'FIRST_PREPARE' or f.STATUS = 'ANSWERING'
|
|
|
|
+ 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">
|
|
@@ -761,12 +781,12 @@
|
|
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
|
|
|
|
- f. STATUS != 'FINISHED'
|
|
|
|
|
|
+ WHERE 1 = 1
|
|
<if test="orgId != null">
|
|
<if test="orgId != null">
|
|
and h.org_id=#{orgId}
|
|
and h.org_id=#{orgId}
|
|
</if>
|
|
</if>
|
|
- AND f. STATUS != 'PERSISTED'
|
|
|
|
|
|
+ and (f.STATUS = 'FIRST_PREPARE' or f.STATUS = 'ANSWERING'
|
|
|
|
+ or f.STATUS = 'BREAK_OFF' or f.STATUS = 'RESUME_PREPARE')
|
|
AND t.type!='NONE'
|
|
AND t.type!='NONE'
|
|
AND t.id IS NOT NULL
|
|
AND t.id IS NOT NULL
|
|
</select>
|
|
</select>
|
|
@@ -783,12 +803,12 @@
|
|
t_oe_exam_record f
|
|
t_oe_exam_record f
|
|
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. STATUS != 'FINISHED'
|
|
|
|
|
|
+ WHERE 1 = 1
|
|
<if test="orgId != null">
|
|
<if test="orgId != null">
|
|
and h.org_id=#{orgId}
|
|
and h.org_id=#{orgId}
|
|
</if>
|
|
</if>
|
|
- AND f. STATUS != 'PERSISTED'
|
|
|
|
|
|
+ and (f.STATUS = 'FIRST_PREPARE' or f.STATUS = 'ANSWERING'
|
|
|
|
+ or f.STATUS = 'BREAK_OFF' or f.STATUS = 'RESUME_PREPARE')
|
|
AND f.client_websocket_status='ON_LINE'
|
|
AND f.client_websocket_status='ON_LINE'
|
|
GROUP BY
|
|
GROUP BY
|
|
h.org_id
|
|
h.org_id
|
|
@@ -809,12 +829,12 @@
|
|
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_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. STATUS != 'FINISHED'
|
|
|
|
|
|
+ WHERE 1 = 1
|
|
<if test="orgId != null">
|
|
<if test="orgId != null">
|
|
and h.org_id=#{orgId}
|
|
and h.org_id=#{orgId}
|
|
</if>
|
|
</if>
|
|
- AND f. STATUS != 'PERSISTED'
|
|
|
|
|
|
+ and (f.STATUS = 'FIRST_PREPARE' or f.STATUS = 'ANSWERING'
|
|
|
|
+ or f.STATUS = 'BREAK_OFF' or f.STATUS = 'RESUME_PREPARE')
|
|
AND w.id IS NOT NULL
|
|
AND w.id IS NOT NULL
|
|
AND w.type!='NONE'
|
|
AND w.type!='NONE'
|
|
GROUP BY
|
|
GROUP BY
|
|
@@ -830,12 +850,12 @@
|
|
t_oe_exam_record f
|
|
t_oe_exam_record f
|
|
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
|
|
|
|
- f. STATUS != 'FINISHED'
|
|
|
|
|
|
+ WHERE 1 = 1
|
|
<if test="orgId != null">
|
|
<if test="orgId != null">
|
|
and h.org_id=#{orgId}
|
|
and h.org_id=#{orgId}
|
|
</if>
|
|
</if>
|
|
- AND f. STATUS != 'PERSISTED'
|
|
|
|
|
|
+ and (f.STATUS = 'FIRST_PREPARE' or f.STATUS = 'ANSWERING'
|
|
|
|
+ or f.STATUS = 'BREAK_OFF' or f.STATUS = 'RESUME_PREPARE')
|
|
AND w.id IS NOT NULL
|
|
AND w.id IS NOT NULL
|
|
AND w.type!='NONE'
|
|
AND w.type!='NONE'
|
|
GROUP BY
|
|
GROUP BY
|
|
@@ -845,7 +865,7 @@
|
|
SELECT
|
|
SELECT
|
|
FROM_UNIXTIME(w.create_time / 1000,'%H') hour,
|
|
FROM_UNIXTIME(w.create_time / 1000,'%H') hour,
|
|
count(1) count
|
|
count(1) count
|
|
- 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">
|
|
@@ -856,8 +876,10 @@
|
|
</select>
|
|
</select>
|
|
|
|
|
|
<update id="updateHasAnswerFile">
|
|
<update id="updateHasAnswerFile">
|
|
- update t_oe_exam_record t set t.has_answer_file=#{hasAnswerFile} where t.id=#{recordId}
|
|
|
|
- </update>
|
|
|
|
|
|
+ update t_oe_exam_record t
|
|
|
|
+ set t.has_answer_file=#{hasAnswerFile}
|
|
|
|
+ where t.id = #{recordId}
|
|
|
|
+ </update>
|
|
|
|
|
|
<select id="findExamRecordNeedMark" resultType="com.qmth.themis.business.bean.admin.OpenRecordNeedMarkBean">
|
|
<select id="findExamRecordNeedMark" resultType="com.qmth.themis.business.bean.admin.OpenRecordNeedMarkBean">
|
|
SELECT t.id as id,
|
|
SELECT t.id as id,
|
|
@@ -891,4 +913,148 @@
|
|
group by
|
|
group by
|
|
toer.id,toer.paper_id,toer.finish_time order by toer.objective_score desc,toer.finish_time desc
|
|
toer.id,toer.paper_id,toer.finish_time order by toer.objective_score desc,toer.finish_time desc
|
|
</select>
|
|
</select>
|
|
|
|
+
|
|
|
|
+ <select id="findByOrgId" resultType="java.lang.Long">
|
|
|
|
+ select count(1) as c
|
|
|
|
+ from t_oe_exam_record toer
|
|
|
|
+ where exists(
|
|
|
|
+ select teea.id
|
|
|
|
+ from t_e_exam_activity teea
|
|
|
|
+ where exists(
|
|
|
|
+ select tee.id
|
|
|
|
+ from t_e_exam tee
|
|
|
|
+ where tee.org_id = #{orgId}
|
|
|
|
+ and tee.id = teea.exam_id
|
|
|
|
+ )
|
|
|
|
+ and toer.exam_activity_id = teea.id)
|
|
|
|
+ and (toer.STATUS = 'FIRST_PREPARE'
|
|
|
|
+ or toer.STATUS = 'ANSWERING'
|
|
|
|
+ or toer.STATUS = 'BREAK_OFF'
|
|
|
|
+ or toer.STATUS = 'RESUME_PREPARE')
|
|
|
|
+ and toer.client_websocket_status = 'ON_LINE'
|
|
|
|
+ union all
|
|
|
|
+ select count(1) as c
|
|
|
|
+ from t_oe_exam_record toer
|
|
|
|
+ where exists(
|
|
|
|
+ select teea.id
|
|
|
|
+ from t_e_exam_activity teea
|
|
|
|
+ where exists(
|
|
|
|
+ select tee.id
|
|
|
|
+ from t_e_exam tee
|
|
|
|
+ where tee.org_id = #{orgId}
|
|
|
|
+ and tee.id = teea.exam_id
|
|
|
|
+ )
|
|
|
|
+ and toer.exam_activity_id = teea.id)
|
|
|
|
+ and toer.STATUS = 'FIRST_PREPARE'
|
|
|
|
+ and toer.client_websocket_status = 'ON_LINE'
|
|
|
|
+ union all
|
|
|
|
+ select count(1) as c
|
|
|
|
+ from t_oe_exam_record toer
|
|
|
|
+ where exists(
|
|
|
|
+ select teea.id
|
|
|
|
+ from t_e_exam_activity teea
|
|
|
|
+ where exists(
|
|
|
|
+ select tee.id
|
|
|
|
+ from t_e_exam tee
|
|
|
|
+ where tee.org_id = #{orgId}
|
|
|
|
+ and tee.id = teea.exam_id
|
|
|
|
+ )
|
|
|
|
+ and toer.exam_activity_id = teea.id)
|
|
|
|
+ and toer.STATUS = 'ANSWERING'
|
|
|
|
+ and toer.client_websocket_status = 'ON_LINE'
|
|
|
|
+ </select>
|
|
|
|
+
|
|
|
|
+ <select id="findByStopInfo" resultType="com.qmth.themis.business.bean.admin.CountStopBean">
|
|
|
|
+ select
|
|
|
|
+ count((t.client_websocket_status = 'OFF_LINE' or t.client_websocket_status is null) or null) as
|
|
|
|
+ clientWebsocketStatusOffCount,
|
|
|
|
+ count(t.client_websocket_status = 'ON_LINE') as clientWebsocketStatusOnCount,
|
|
|
|
+ count(t.camera_monitor_status = 'STOP') as cameraMonitorStatusStop,
|
|
|
|
+ count(t.screen_monitor_status = 'STOP') as screenMonitorStatusStop,
|
|
|
|
+ count(t.mobile_first_monitor_status = 'STOP') as mobileFirstMonitorStatusStop,
|
|
|
|
+ count(t.mobile_second_monitor_status = 'STOP') as mobileSecondMonitorStatusStop
|
|
|
|
+ from
|
|
|
|
+ t_oe_exam_record t
|
|
|
|
+ left join t_e_exam_student s on
|
|
|
|
+ t.exam_student_id = s.id
|
|
|
|
+ left join t_e_exam tee on
|
|
|
|
+ tee.id = t.exam_id
|
|
|
|
+ left join t_e_exam_activity teea on
|
|
|
|
+ teea.id = t.exam_activity_id
|
|
|
|
+ where
|
|
|
|
+ t.exam_id = #{examId}
|
|
|
|
+ and s.room_code in
|
|
|
|
+ <foreach collection="roomCodeSet" item="roomCode" index="index" open="(" close=")" separator=",">
|
|
|
|
+ #{roomCode}
|
|
|
|
+ </foreach>
|
|
|
|
+ and (t.STATUS = 'FIRST_PREPARE'
|
|
|
|
+ or t.STATUS = 'ANSWERING'
|
|
|
|
+ or t.STATUS = 'BREAK_OFF'
|
|
|
|
+ or t.STATUS = 'RESUME_PREPARE')
|
|
|
|
+ group by
|
|
|
|
+ t.client_websocket_status,
|
|
|
|
+ t.camera_monitor_status,
|
|
|
|
+ t.screen_monitor_status,
|
|
|
|
+ t.mobile_first_monitor_status,
|
|
|
|
+ t.mobile_second_monitor_status
|
|
|
|
+ </select>
|
|
|
|
+
|
|
|
|
+ <select id="findByOnlineInfo" resultType="java.lang.Integer">
|
|
|
|
+ select
|
|
|
|
+ count(1) as c
|
|
|
|
+ from
|
|
|
|
+ t_oe_exam_record t
|
|
|
|
+ left join t_e_exam_student s on
|
|
|
|
+ t.exam_student_id = s.id
|
|
|
|
+ left join t_e_exam tee on
|
|
|
|
+ tee.id = t.exam_id
|
|
|
|
+ left join t_e_exam_activity teea on
|
|
|
|
+ teea.id = t.exam_activity_id
|
|
|
|
+ where
|
|
|
|
+ t.exam_id = #{examId}
|
|
|
|
+ and s.room_code in
|
|
|
|
+ <foreach collection="roomCodeSet" item="roomCode" index="index" open="(" close=")" separator=",">
|
|
|
|
+ #{roomCode}
|
|
|
|
+ </foreach>
|
|
|
|
+ and t.STATUS = 'FIRST_PREPARE'
|
|
|
|
+ and t.client_websocket_status = 'ON_LINE'
|
|
|
|
+ union all
|
|
|
|
+ select
|
|
|
|
+ count(1) as c
|
|
|
|
+ from
|
|
|
|
+ t_oe_exam_record t
|
|
|
|
+ left join t_e_exam_student s on
|
|
|
|
+ t.exam_student_id = s.id
|
|
|
|
+ left join t_e_exam tee on
|
|
|
|
+ tee.id = t.exam_id
|
|
|
|
+ left join t_e_exam_activity teea on
|
|
|
|
+ teea.id = t.exam_activity_id
|
|
|
|
+ where
|
|
|
|
+ t.exam_id = #{examId}
|
|
|
|
+ and s.room_code in
|
|
|
|
+ <foreach collection="roomCodeSet" item="roomCode" index="index" open="(" close=")" separator=",">
|
|
|
|
+ #{roomCode}
|
|
|
|
+ </foreach>
|
|
|
|
+ and t.STATUS = 'ANSWERING'
|
|
|
|
+ and t.client_websocket_status = 'ON_LINE'
|
|
|
|
+ union all
|
|
|
|
+ select
|
|
|
|
+ count(1) as c
|
|
|
|
+ from
|
|
|
|
+ t_oe_exam_record t
|
|
|
|
+ left join t_e_exam_student s on
|
|
|
|
+ t.exam_student_id = s.id
|
|
|
|
+ left join t_e_exam tee on
|
|
|
|
+ tee.id = t.exam_id
|
|
|
|
+ left join t_e_exam_activity teea on
|
|
|
|
+ teea.id = t.exam_activity_id
|
|
|
|
+ where
|
|
|
|
+ t.exam_id = #{examId}
|
|
|
|
+ and s.room_code in
|
|
|
|
+ <foreach collection="roomCodeSet" item="roomCode" index="index" open="(" close=")" separator=",">
|
|
|
|
+ #{roomCode}
|
|
|
|
+ </foreach>
|
|
|
|
+ and (t.STATUS = 'FINISHED'
|
|
|
|
+ or t.STATUS = 'PERSISTED')
|
|
|
|
+ </select>
|
|
</mapper>
|
|
</mapper>
|