|
@@ -110,15 +110,6 @@
|
|
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
|
|
- inner join (select toer.id from t_oe_exam_record toer where EXISTS(select
|
|
|
|
- tees.id from t_e_exam_student tees where EXISTS (select distinct
|
|
|
|
- tbeiu.room_code from t_b_exam_invigilate_user tbeiu
|
|
|
|
- where
|
|
|
|
- <if test="userId != null and userId != ''">
|
|
|
|
- tbeiu.user_id = #{userId} and
|
|
|
|
- </if>
|
|
|
|
- tbeiu.room_code = tees.room_code and tees.exam_id = tbeiu.exam_id and toer.exam_student_id = tees.id)))
|
|
|
|
- t1 on t1.id = t.id
|
|
|
|
</sql>
|
|
</sql>
|
|
|
|
|
|
<sql id="invigilatePageFoot">
|
|
<sql id="invigilatePageFoot">
|
|
@@ -126,6 +117,11 @@
|
|
<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="userId != null and userId != ''">
|
|
|
|
+ and exists (select tbeiu.exam_id from t_b_exam_invigilate_user tbeiu
|
|
|
|
+ where tbeiu.user_id = #{userId}
|
|
|
|
+ and tbeiu.exam_id = s.exam_id and tbeiu.room_code = s.room_code)
|
|
|
|
+ </if>
|
|
<if test="orgId != null and orgId != ''">
|
|
<if test="orgId != null and orgId != ''">
|
|
and tee.org_id = #{orgId}
|
|
and tee.org_id = #{orgId}
|
|
</if>
|
|
</if>
|
|
@@ -160,18 +156,20 @@
|
|
<if test="clientWebsocketStatus != null and clientWebsocketStatus != ''">
|
|
<if test="clientWebsocketStatus != null and clientWebsocketStatus != ''">
|
|
and t.client_websocket_status = #{clientWebsocketStatus}
|
|
and t.client_websocket_status = #{clientWebsocketStatus}
|
|
</if>
|
|
</if>
|
|
- and s.enable = 1
|
|
|
|
- and tee.enable = 1
|
|
|
|
- and teea.enable = 1
|
|
|
|
and teea.finish_time > unix_timestamp(current_timestamp()) * 1000
|
|
and teea.finish_time > unix_timestamp(current_timestamp()) * 1000
|
|
</where>
|
|
</where>
|
|
</sql>
|
|
</sql>
|
|
|
|
|
|
<sql id="invigilatePageHistoryFoot">
|
|
<sql id="invigilatePageHistoryFoot">
|
|
- <where>
|
|
|
|
|
|
+ <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="userId != null and userId != ''">
|
|
|
|
+ and exists (select tbeiu.exam_id from t_b_exam_invigilate_user tbeiu
|
|
|
|
+ where tbeiu.user_id = #{userId}
|
|
|
|
+ and tbeiu.exam_id = t.exam_id and tbeiu.room_code = s.room_code)
|
|
|
|
+ </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>
|
|
@@ -203,13 +201,10 @@
|
|
<if test="minWarningCount != null and minWarningCount != '' or minWarningCount == 0">
|
|
<if test="minWarningCount != null and minWarningCount != '' or minWarningCount == 0">
|
|
and t.warning_count >= #{minWarningCount}
|
|
and t.warning_count >= #{minWarningCount}
|
|
</if>
|
|
</if>
|
|
- and s.enable = 1
|
|
|
|
- and tee.enable = 1
|
|
|
|
- and teea.enable = 1
|
|
|
|
</where>
|
|
</where>
|
|
</sql>
|
|
</sql>
|
|
|
|
|
|
- <select id="invigilatePageList" resultType="com.qmth.themis.business.bean.backend.InvigilateListBean">
|
|
|
|
|
|
+ <select id="invigilatePageList" resultType="com.qmth.themis.business.bean.admin.InvigilateListBean">
|
|
select
|
|
select
|
|
(@i := @i + 1) as seq,
|
|
(@i := @i + 1) as seq,
|
|
t.*
|
|
t.*
|
|
@@ -218,11 +213,6 @@
|
|
<include refid="invigilatePageHead"/>
|
|
<include refid="invigilatePageHead"/>
|
|
,(select count(1) from t_ie_invigilate_warn_info tiiwi where tiiwi.exam_record_id = t.id and
|
|
,(select count(1) from t_ie_invigilate_warn_info tiiwi where tiiwi.exam_record_id = t.id and
|
|
tiiwi.approve_status = 0) as warningNew
|
|
tiiwi.approve_status = 0) as warningNew
|
|
- <!--,case
|
|
|
|
- when tee.mode = 'ANYTIME' then SEC_TO_TIME(IFNULL(teea.max_duration_seconds, tee.max_duration_seconds) - t.duration_seconds)
|
|
|
|
- when tee.mode = 'TOGETHER' and tee.force_finish = 1 then SEC_TO_TIME((IFNULL(teea.finish_time, tee.end_time) - unix_timestamp(current_timestamp()) * 1000) / 1000)
|
|
|
|
- else SEC_TO_TIME(IFNULL(teea.max_duration_seconds, tee.max_duration_seconds) - t.duration_seconds)
|
|
|
|
- end as remainTime-->
|
|
|
|
<include refid="invigilatePageMiddle"/>
|
|
<include refid="invigilatePageMiddle"/>
|
|
<include refid="invigilatePageFoot"/>
|
|
<include refid="invigilatePageFoot"/>
|
|
<if test="paperDownload != null and paperDownload != '' or paperDownload == 0">
|
|
<if test="paperDownload != null and paperDownload != '' or paperDownload == 0">
|
|
@@ -236,7 +226,7 @@
|
|
order by t.warningNew desc
|
|
order by t.warningNew desc
|
|
</select>
|
|
</select>
|
|
|
|
|
|
- <select id="invigilatePageListVideo" resultType="com.qmth.themis.business.bean.backend.InvigilateListVideoBean">
|
|
|
|
|
|
+ <select id="invigilatePageListVideo" resultType="com.qmth.themis.business.bean.admin.InvigilateListVideoBean">
|
|
select
|
|
select
|
|
(@i := @i + 1) as seq,
|
|
(@i := @i + 1) as seq,
|
|
t.*
|
|
t.*
|
|
@@ -245,11 +235,6 @@
|
|
<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
|
|
,(select count(1) from t_ie_invigilate_warn_info tiiwi where tiiwi.exam_record_id = t.id and tiiwi.approve_status = 0) as warningNew
|
|
- <!--,case
|
|
|
|
- when tee.mode = 'ANYTIME' then SEC_TO_TIME(IFNULL(teea.max_duration_seconds, tee.max_duration_seconds) - t.duration_seconds)
|
|
|
|
- when tee.mode = 'TOGETHER' and tee.force_finish = 1 then SEC_TO_TIME((IFNULL(teea.finish_time, tee.end_time) - unix_timestamp(current_timestamp()) * 1000) / 1000)
|
|
|
|
- else SEC_TO_TIME(IFNULL(teea.max_duration_seconds, tee.max_duration_seconds) - t.duration_seconds)
|
|
|
|
- end as remainTime-->
|
|
|
|
<include refid="invigilatePageMiddle" />
|
|
<include refid="invigilatePageMiddle" />
|
|
<include refid="invigilatePageFoot" />
|
|
<include refid="invigilatePageFoot" />
|
|
<if test="paperDownload != null and paperDownload != '' or paperDownload == 0">
|
|
<if test="paperDownload != null and paperDownload != '' or paperDownload == 0">
|
|
@@ -263,15 +248,10 @@
|
|
order by t.warningNew desc
|
|
order by t.warningNew desc
|
|
</select>
|
|
</select>
|
|
|
|
|
|
- <select id="invigilatePageListVideoRandom" resultType="com.qmth.themis.business.bean.backend.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
|
|
,(select count(1) from t_ie_invigilate_warn_info tiiwi where tiiwi.exam_record_id = t.id and tiiwi.approve_status = 0) as warningNew
|
|
- <!--,case
|
|
|
|
- when tee.mode = 'ANYTIME' then SEC_TO_TIME(IFNULL(teea.max_duration_seconds, tee.max_duration_seconds) - t.duration_seconds)
|
|
|
|
- when tee.mode = 'TOGETHER' and tee.force_finish = 1 then SEC_TO_TIME((IFNULL(teea.finish_time, tee.end_time) - unix_timestamp(current_timestamp()) * 1000) / 1000)
|
|
|
|
- else SEC_TO_TIME(IFNULL(teea.max_duration_seconds, tee.max_duration_seconds) - t.duration_seconds)
|
|
|
|
- end as remainTime-->
|
|
|
|
<include refid="invigilatePageMiddle" />
|
|
<include refid="invigilatePageMiddle" />
|
|
<where> 1 = 1
|
|
<where> 1 = 1
|
|
<if test="examId != null and examId != ''">
|
|
<if test="examId != null and examId != ''">
|
|
@@ -285,16 +265,11 @@
|
|
ORDER BY RAND() LIMIT #{randomNum}
|
|
ORDER BY RAND() LIMIT #{randomNum}
|
|
</select>
|
|
</select>
|
|
|
|
|
|
- <select id="invigilatePagePatrolList" resultType="com.qmth.themis.business.bean.backend.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
|
|
- <!--,case
|
|
|
|
- when tee.mode = 'ANYTIME' then SEC_TO_TIME(IFNULL(teea.max_duration_seconds, tee.max_duration_seconds) - t.duration_seconds)
|
|
|
|
- when tee.mode = 'TOGETHER' and tee.force_finish = 1 then SEC_TO_TIME((IFNULL(teea.finish_time, tee.end_time) - unix_timestamp(current_timestamp()) * 1000) / 1000)
|
|
|
|
- else SEC_TO_TIME(IFNULL(teea.max_duration_seconds, tee.max_duration_seconds) - t.duration_seconds)
|
|
|
|
- end as remainTime-->
|
|
|
|
<include refid="invigilatePageMiddle" />
|
|
<include refid="invigilatePageMiddle" />
|
|
<include refid="invigilatePageFoot" />
|
|
<include refid="invigilatePageFoot" />
|
|
<if test="status == null or status == ''">
|
|
<if test="status == null or status == ''">
|
|
@@ -318,7 +293,7 @@
|
|
order by t.roomCode
|
|
order by t.roomCode
|
|
</select>
|
|
</select>
|
|
|
|
|
|
- <select id="invigilatePageWarningList" resultType="com.qmth.themis.business.bean.backend.InvigilateListWarningBean">
|
|
|
|
|
|
+ <select id="invigilatePageWarningList" resultType="com.qmth.themis.business.bean.admin.InvigilateListWarningBean">
|
|
select (@i := @i + 1) as seq,t.* from(select
|
|
select (@i := @i + 1) as seq,t.* from(select
|
|
tiiwi.id as warningId,
|
|
tiiwi.id as warningId,
|
|
tee.id as examId,
|
|
tee.id as examId,
|
|
@@ -346,21 +321,17 @@
|
|
from t_ie_invigilate_warn_info tiiwi
|
|
from t_ie_invigilate_warn_info tiiwi
|
|
left join t_e_exam tee on tee.id = tiiwi.exam_id
|
|
left join t_e_exam tee on tee.id = tiiwi.exam_id
|
|
left join t_e_exam_activity teea on teea.id = tiiwi.exam_activity_id
|
|
left join t_e_exam_activity teea on teea.id = tiiwi.exam_activity_id
|
|
- inner join (select toer.id from t_oe_exam_record toer where EXISTS(select
|
|
|
|
- tees.id from t_e_exam_student tees where EXISTS (select distinct
|
|
|
|
- tbeiu.room_code from t_b_exam_invigilate_user tbeiu
|
|
|
|
- where
|
|
|
|
- <if test="userId != null and userId != ''">
|
|
|
|
- tbeiu.user_id = #{userId} and
|
|
|
|
- </if>
|
|
|
|
- tbeiu.room_code = tees.room_code and tees.exam_id = tbeiu.exam_id and toer.exam_student_id = tees.id)))
|
|
|
|
- t on t.id = tiiwi.exam_record_id
|
|
|
|
- left join t_oe_exam_record toer on toer.id = t.id
|
|
|
|
|
|
+ left join t_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>
|
|
|
|
|
|
+ <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>
|
|
|
|
+ <if test="userId != null and userId != ''">
|
|
|
|
+ and exists (select tbeiu.exam_id from t_b_exam_invigilate_user tbeiu
|
|
|
|
+ where tbeiu.user_id = #{userId}
|
|
|
|
+ and tbeiu.exam_id = tees.exam_id and tbeiu.room_code = tees.room_code)
|
|
|
|
+ </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>
|
|
@@ -385,8 +356,6 @@
|
|
<if test="minWarningCount != null and minWarningCount != '' or minWarningCount == 0">
|
|
<if test="minWarningCount != null and minWarningCount != '' or minWarningCount == 0">
|
|
and toer.warning_count >= #{minWarningCount}
|
|
and toer.warning_count >= #{minWarningCount}
|
|
</if>
|
|
</if>
|
|
- and tee.enable = 1
|
|
|
|
- and teea.enable = 1
|
|
|
|
</where>
|
|
</where>
|
|
) t,(SELECT @i := 0) as i
|
|
) t,(SELECT @i := 0) as i
|
|
<where>
|
|
<where>
|
|
@@ -436,21 +405,17 @@
|
|
from t_ie_invigilate_warn_info tiiwi
|
|
from t_ie_invigilate_warn_info tiiwi
|
|
left join t_e_exam tee on tee.id = tiiwi.exam_id
|
|
left join t_e_exam tee on tee.id = tiiwi.exam_id
|
|
left join t_e_exam_activity teea on teea.id = tiiwi.exam_activity_id
|
|
left join t_e_exam_activity teea on teea.id = tiiwi.exam_activity_id
|
|
- inner join (select toer.id from t_oe_exam_record toer where EXISTS(select
|
|
|
|
- tees.id from t_e_exam_student tees where EXISTS (select distinct
|
|
|
|
- tbeiu.room_code from t_b_exam_invigilate_user tbeiu
|
|
|
|
- where
|
|
|
|
- <if test="userId != null and userId != ''">
|
|
|
|
- tbeiu.user_id = #{userId} and
|
|
|
|
- </if>
|
|
|
|
- tbeiu.room_code = tees.room_code and tees.exam_id = tbeiu.exam_id and toer.exam_student_id = tees.id)))
|
|
|
|
- t on t.id = tiiwi.exam_record_id
|
|
|
|
left join t_oe_exam_record toer on toer.id = t.id
|
|
left join t_oe_exam_record toer on toer.id = t.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>
|
|
|
|
|
|
+ <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>
|
|
|
|
+ <if test="userId != null and userId != ''">
|
|
|
|
+ and exists (select tbeiu.exam_id from t_b_exam_invigilate_user tbeiu
|
|
|
|
+ where tbeiu.user_id = #{userId}
|
|
|
|
+ and tbeiu.exam_id = tees.exam_id and tbeiu.room_code = tees.room_code)
|
|
|
|
+ </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>
|
|
@@ -475,8 +440,6 @@
|
|
<if test="minWarningCount != null and minWarningCount != '' or minWarningCount == 0">
|
|
<if test="minWarningCount != null and minWarningCount != '' or minWarningCount == 0">
|
|
and toer.warning_count >= #{minWarningCount}
|
|
and toer.warning_count >= #{minWarningCount}
|
|
</if>
|
|
</if>
|
|
- and tee.enable = 1
|
|
|
|
- and teea.enable = 1
|
|
|
|
</where>
|
|
</where>
|
|
) t
|
|
) t
|
|
<where> 1 = 1
|
|
<where> 1 = 1
|
|
@@ -496,7 +459,7 @@
|
|
and t.warningId = tiiwi.id)
|
|
and t.warningId = tiiwi.id)
|
|
</update>
|
|
</update>
|
|
|
|
|
|
- <select id="invigilatePageProgressList" resultType="com.qmth.themis.business.bean.backend.InvigilateListProgressBean">
|
|
|
|
|
|
+ <select id="invigilatePageProgressList" resultType="com.qmth.themis.business.bean.admin.InvigilateListProgressBean">
|
|
select
|
|
select
|
|
distinct tee.id as examId,
|
|
distinct tee.id as examId,
|
|
tee.name as examName,
|
|
tee.name as examName,
|
|
@@ -520,20 +483,15 @@
|
|
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>
|
|
|
|
- exists(
|
|
|
|
- select
|
|
|
|
- distinct tbeiu.exam_id
|
|
|
|
- from
|
|
|
|
- t_b_exam_invigilate_user tbeiu where 1 = 1
|
|
|
|
- <if test="userId != null and userId != ''">
|
|
|
|
- and tbeiu.user_id = #{userId}
|
|
|
|
- </if>
|
|
|
|
- and tbeiu.exam_id = tees.exam_id
|
|
|
|
- )
|
|
|
|
|
|
+ <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>
|
|
|
|
+ <if test="userId != null and userId != ''">
|
|
|
|
+ and exists (select tbeiu.exam_id from t_b_exam_invigilate_user tbeiu
|
|
|
|
+ where tbeiu.user_id = #{userId}
|
|
|
|
+ and tbeiu.exam_id = tees.exam_id and tbeiu.room_code = tees.room_code)
|
|
|
|
+ </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>
|
|
@@ -552,14 +510,12 @@
|
|
<if test="identity != null and identity !=''">
|
|
<if test="identity != null and identity !=''">
|
|
and tees.identity like CONCAT('%', #{identity},'%')
|
|
and tees.identity like CONCAT('%', #{identity},'%')
|
|
</if>
|
|
</if>
|
|
- and tee.enable = 1
|
|
|
|
- and teea.enable = 1
|
|
|
|
and tee.monitor_status <![CDATA[ <> ]]> 'FINISHED'
|
|
and tee.monitor_status <![CDATA[ <> ]]> 'FINISHED'
|
|
</where>
|
|
</where>
|
|
order by tees.room_code
|
|
order by tees.room_code
|
|
</select>
|
|
</select>
|
|
|
|
|
|
- <select id="invigilatePageProgressListExport" resultType="com.qmth.themis.business.bean.backend.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,
|
|
@@ -582,20 +538,15 @@
|
|
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>
|
|
|
|
- exists(
|
|
|
|
- select
|
|
|
|
- distinct tbeiu.exam_id
|
|
|
|
- from
|
|
|
|
- t_b_exam_invigilate_user tbeiu where 1 = 1
|
|
|
|
- <if test="userId != null and userId != ''">
|
|
|
|
- and tbeiu.user_id = #{userId}
|
|
|
|
- </if>
|
|
|
|
- and tbeiu.exam_id = tees.exam_id
|
|
|
|
- )
|
|
|
|
|
|
+ <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>
|
|
|
|
+ <if test="userId != null and userId != ''">
|
|
|
|
+ and exists (select tbeiu.exam_id from t_b_exam_invigilate_user tbeiu
|
|
|
|
+ where tbeiu.user_id = #{userId}
|
|
|
|
+ and tbeiu.exam_id = tees.exam_id and tbeiu.room_code = tees.room_code)
|
|
|
|
+ </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>
|
|
@@ -614,15 +565,13 @@
|
|
<if test="identity != null and identity !=''">
|
|
<if test="identity != null and identity !=''">
|
|
and tees.identity like CONCAT('%', #{identity},'%')
|
|
and tees.identity like CONCAT('%', #{identity},'%')
|
|
</if>
|
|
</if>
|
|
- and tee.enable = 1
|
|
|
|
- and teea.enable = 1
|
|
|
|
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.backend.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
|
|
@@ -660,7 +609,7 @@
|
|
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 h.org_id=#{orgId}
|
|
|
|
|
|
+ and h.org_id=#{orgId}
|
|
</if>
|
|
</if>
|
|
<if test="activityId != null and activityId != ''">
|
|
<if test="activityId != null and activityId != ''">
|
|
and f.exam_activity_id = #{activityId}
|
|
and f.exam_activity_id = #{activityId}
|
|
@@ -682,7 +631,7 @@
|
|
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 h.org_id=#{orgId}
|
|
|
|
|
|
+ and h.org_id=#{orgId}
|
|
</if>
|
|
</if>
|
|
<if test="activityId != null and activityId != ''">
|
|
<if test="activityId != null and activityId != ''">
|
|
and f.exam_activity_id = #{activityId}
|
|
and f.exam_activity_id = #{activityId}
|
|
@@ -732,7 +681,7 @@
|
|
limit 1
|
|
limit 1
|
|
</select>
|
|
</select>
|
|
|
|
|
|
- <select id="patrolReport" resultType="com.qmth.themis.business.bean.backend.InvigilateListPatrolReportBean">
|
|
|
|
|
|
+ <select id="patrolReport" resultType="com.qmth.themis.business.bean.admin.InvigilateListPatrolReportBean">
|
|
select
|
|
select
|
|
t.roomCode,
|
|
t.roomCode,
|
|
t.roomName,
|
|
t.roomName,
|
|
@@ -751,35 +700,15 @@
|
|
tee.id = t.exam_id
|
|
tee.id = t.exam_id
|
|
left join t_e_exam_activity teea on
|
|
left join t_e_exam_activity teea on
|
|
teea.id = t.exam_activity_id
|
|
teea.id = t.exam_activity_id
|
|
- inner join (
|
|
|
|
- select
|
|
|
|
- toer.id
|
|
|
|
- from
|
|
|
|
- t_oe_exam_record toer
|
|
|
|
- where
|
|
|
|
- EXISTS(
|
|
|
|
- select
|
|
|
|
- tees.id
|
|
|
|
- from
|
|
|
|
- t_e_exam_student tees
|
|
|
|
- where
|
|
|
|
- EXISTS (
|
|
|
|
- select
|
|
|
|
- distinct tbeiu.exam_id
|
|
|
|
- from
|
|
|
|
- t_b_exam_invigilate_user tbeiu where 1 = 1
|
|
|
|
- <if test="userId != null and userId != ''">
|
|
|
|
- and tbeiu.user_id = #{userId}
|
|
|
|
- </if>
|
|
|
|
- and tbeiu.exam_id = tees.exam_id and tees.room_code = tbeiu.room_code))) t1 on
|
|
|
|
- t1.id = t.id
|
|
|
|
- <where> 1 = 1
|
|
|
|
|
|
+ <where>
|
|
<if test="examId != null and examId != ''">
|
|
<if test="examId != null and examId != ''">
|
|
and t.exam_id = #{examId}
|
|
and t.exam_id = #{examId}
|
|
</if>
|
|
</if>
|
|
- and s.enable = 1
|
|
|
|
- and tee.enable = 1
|
|
|
|
- and teea.enable = 1
|
|
|
|
|
|
+ <if test="userId != null and userId != ''">
|
|
|
|
+ and exists (select tbeiu.exam_id from t_b_exam_invigilate_user tbeiu
|
|
|
|
+ where tbeiu.user_id = #{userId}
|
|
|
|
+ and tbeiu.exam_id = t.exam_id and tbeiu.room_code = s.room_code)
|
|
|
|
+ </if>
|
|
and (t.status <![CDATA[ <> ]]> 'PERSISTED' and t.status <![CDATA[ <> ]]> 'FINISHED')
|
|
and (t.status <![CDATA[ <> ]]> 'PERSISTED' and t.status <![CDATA[ <> ]]> 'FINISHED')
|
|
</where> ) t
|
|
</where> ) t
|
|
group by
|
|
group by
|
|
@@ -793,7 +722,7 @@
|
|
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">
|
|
<if test="orgId != null">
|
|
- and h.org_id=#{orgId}
|
|
|
|
|
|
+ and h.org_id=#{orgId}
|
|
</if>
|
|
</if>
|
|
</select>
|
|
</select>
|
|
<select id="getExamingCount" resultType="java.lang.Long">
|
|
<select id="getExamingCount" resultType="java.lang.Long">
|
|
@@ -801,35 +730,35 @@
|
|
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' and f.status != 'PERSISTED' and f.client_websocket_status='ON_LINE'
|
|
where f.status != 'FINISHED' and f.status != 'PERSISTED' and f.client_websocket_status='ON_LINE'
|
|
<if test="orgId != null">
|
|
<if test="orgId != null">
|
|
- 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
|
|
|
|
- count(DISTINCT(f.id))
|
|
|
|
|
|
+ SELECT
|
|
|
|
+ count(DISTINCT(f.id))
|
|
FROM
|
|
FROM
|
|
- 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
|
|
WHERE
|
|
- f. STATUS != 'FINISHED'
|
|
|
|
|
|
+ f. STATUS != 'FINISHED'
|
|
<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 != 'PERSISTED'
|
|
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(DISTINCT(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
|
|
WHERE
|
|
- f. STATUS != 'FINISHED'
|
|
|
|
|
|
+ f. STATUS != 'FINISHED'
|
|
<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 != 'PERSISTED'
|
|
AND t.type!='NONE'
|
|
AND t.type!='NONE'
|
|
@@ -839,92 +768,92 @@
|
|
SELECT
|
|
SELECT
|
|
o. NAME orgName,
|
|
o. NAME orgName,
|
|
tem.cc count
|
|
tem.cc count
|
|
- FROM
|
|
|
|
|
|
+ FROM
|
|
(
|
|
(
|
|
- SELECT
|
|
|
|
- h.org_id orgId,
|
|
|
|
- count(DISTINCT(h.id)) cc
|
|
|
|
- FROM
|
|
|
|
- t_oe_exam_record f
|
|
|
|
- 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
|
|
|
|
- WHERE
|
|
|
|
- f. STATUS != 'FINISHED'
|
|
|
|
- <if test="orgId != null">
|
|
|
|
- and h.org_id=#{orgId}
|
|
|
|
- </if>
|
|
|
|
- AND f. STATUS != 'PERSISTED'
|
|
|
|
- AND f.client_websocket_status='ON_LINE'
|
|
|
|
- GROUP BY
|
|
|
|
- h.org_id
|
|
|
|
|
|
+ SELECT
|
|
|
|
+ h.org_id orgId,
|
|
|
|
+ count(DISTINCT(h.id)) cc
|
|
|
|
+ FROM
|
|
|
|
+ t_oe_exam_record f
|
|
|
|
+ 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
|
|
|
|
+ WHERE
|
|
|
|
+ f. STATUS != 'FINISHED'
|
|
|
|
+ <if test="orgId != null">
|
|
|
|
+ and h.org_id=#{orgId}
|
|
|
|
+ </if>
|
|
|
|
+ AND f. STATUS != 'PERSISTED'
|
|
|
|
+ AND f.client_websocket_status='ON_LINE'
|
|
|
|
+ GROUP BY
|
|
|
|
+ h.org_id
|
|
) 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,
|
|
tem.cc count
|
|
tem.cc count
|
|
FROM
|
|
FROM
|
|
- (
|
|
|
|
- SELECT
|
|
|
|
- h.org_id orgId,
|
|
|
|
- count(DISTINCT(w.id)) cc
|
|
|
|
- FROM
|
|
|
|
- t_oe_exam_record f
|
|
|
|
- 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_student h ON t.student_id = h.id
|
|
|
|
- WHERE
|
|
|
|
- f. STATUS != 'FINISHED'
|
|
|
|
- <if test="orgId != null">
|
|
|
|
- and h.org_id=#{orgId}
|
|
|
|
- </if>
|
|
|
|
- AND f. STATUS != 'PERSISTED'
|
|
|
|
- AND w.id IS NOT NULL
|
|
|
|
- AND w.type!='NONE'
|
|
|
|
- GROUP BY
|
|
|
|
- h.org_id
|
|
|
|
- ) tem
|
|
|
|
|
|
+ (
|
|
|
|
+ SELECT
|
|
|
|
+ h.org_id orgId,
|
|
|
|
+ count(DISTINCT(w.id)) cc
|
|
|
|
+ FROM
|
|
|
|
+ t_oe_exam_record f
|
|
|
|
+ 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_student h ON t.student_id = h.id
|
|
|
|
+ WHERE
|
|
|
|
+ f. STATUS != 'FINISHED'
|
|
|
|
+ <if test="orgId != null">
|
|
|
|
+ and h.org_id=#{orgId}
|
|
|
|
+ </if>
|
|
|
|
+ AND f. STATUS != 'PERSISTED'
|
|
|
|
+ AND w.id IS NOT NULL
|
|
|
|
+ AND w.type!='NONE'
|
|
|
|
+ GROUP BY
|
|
|
|
+ h.org_id
|
|
|
|
+ ) 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
|
|
- w.type type,
|
|
|
|
- count(DISTINCT(w.id)) count
|
|
|
|
|
|
+ w.type type,
|
|
|
|
+ count(DISTINCT(w.id)) count
|
|
FROM
|
|
FROM
|
|
- 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
|
|
WHERE
|
|
- f. STATUS != 'FINISHED'
|
|
|
|
|
|
+ f. STATUS != 'FINISHED'
|
|
<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 != 'PERSISTED'
|
|
AND w.id IS NOT NULL
|
|
AND w.id IS NOT NULL
|
|
AND w.type!='NONE'
|
|
AND w.type!='NONE'
|
|
GROUP BY
|
|
GROUP BY
|
|
- w.type
|
|
|
|
|
|
+ w.type
|
|
</select>
|
|
</select>
|
|
- <select id="getWarnTrend" resultType="com.qmth.themis.business.bean.backend.ExaminationMonitorHourWarnCountBean">
|
|
|
|
- SELECT
|
|
|
|
- FROM_UNIXTIME(w.create_time / 1000,'%H') hour,
|
|
|
|
- count(1) count
|
|
|
|
- FROM t_ie_invigilate_warn_info w
|
|
|
|
|
|
+ <select id="getWarnTrend" resultType="com.qmth.themis.business.bean.admin.ExaminationMonitorHourWarnCountBean">
|
|
|
|
+ SELECT
|
|
|
|
+ FROM_UNIXTIME(w.create_time / 1000,'%H') hour,
|
|
|
|
+ count(1) count
|
|
|
|
+ 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 h.org_id=#{orgId}
|
|
|
|
|
|
+ and h.org_id=#{orgId}
|
|
</if>
|
|
</if>
|
|
GROUP BY
|
|
GROUP BY
|
|
- FROM_UNIXTIME(w.create_time / 1000,'%H')
|
|
|
|
|
|
+ FROM_UNIXTIME(w.create_time / 1000,'%H')
|
|
</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 t_oe_exam_record t set t.has_answer_file=#{hasAnswerFile} where t.id=#{recordId}
|
|
</update>
|
|
</update>
|
|
|
|
|
|
- <select id="findExamRecordNeedMark" resultType="com.qmth.themis.business.bean.backend.OpenRecordNeedMarkBean">
|
|
|
|
|
|
+ <select id="findExamRecordNeedMark" resultType="com.qmth.themis.business.bean.admin.OpenRecordNeedMarkBean">
|
|
SELECT
|
|
SELECT
|
|
t.id examRecordId,
|
|
t.id examRecordId,
|
|
t.exam_student_id examStudentId,
|
|
t.exam_student_id examStudentId,
|
|
@@ -942,17 +871,17 @@
|
|
LEFT JOIN t_e_exam_activity g ON t.exam_activity_id = g.id
|
|
LEFT JOIN t_e_exam_activity g ON t.exam_activity_id = g.id
|
|
where t.exam_id=#{examId} and t.breach_status!=1 and t.exam_student_id in
|
|
where t.exam_id=#{examId} and t.breach_status!=1 and t.exam_student_id in
|
|
<foreach collection="examStudentIds" item="examStudentId"
|
|
<foreach collection="examStudentIds" item="examStudentId"
|
|
- index="index" open="(" close=")" separator=",">
|
|
|
|
|
|
+ index="index" open="(" close=")" separator=",">
|
|
#{examStudentId}
|
|
#{examStudentId}
|
|
</foreach>
|
|
</foreach>
|
|
</select>
|
|
</select>
|
|
|
|
|
|
<select id="findMaxObjectiveScore" resultType="com.qmth.themis.business.entity.TOeExamRecord">
|
|
<select id="findMaxObjectiveScore" resultType="com.qmth.themis.business.entity.TOeExamRecord">
|
|
select
|
|
select
|
|
- max(toer.objective_score) as objectiveScore,
|
|
|
|
- toer.id,toer.paper_id as paperId,toer.finish_time as finishTime
|
|
|
|
|
|
+ max(toer.objective_score) as objectiveScore,
|
|
|
|
+ toer.id,toer.paper_id as paperId,toer.finish_time as finishTime
|
|
from
|
|
from
|
|
- t_oe_exam_record toer
|
|
|
|
|
|
+ t_oe_exam_record toer
|
|
<where>
|
|
<where>
|
|
(toer.breach_status = 1
|
|
(toer.breach_status = 1
|
|
or breach_status is null)
|
|
or breach_status is null)
|
|
@@ -966,6 +895,6 @@
|
|
</if>
|
|
</if>
|
|
</where>
|
|
</where>
|
|
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>
|
|
-</mapper>
|
|
|
|
|
|
+</mapper>
|