|
@@ -588,7 +588,7 @@
|
|
(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
|
|
tees.id and (toer.status = 'FINISHED' or toer.status = 'PERSISTED') and toer.first_start_time is not null) as
|
|
statusTemp,
|
|
statusTemp,
|
|
- tes.mobile_number as mobileNumber,
|
|
|
|
|
|
+ <!--tes.mobile_number as mobileNumber,-->
|
|
t.id as examRecordId,
|
|
t.id as examRecordId,
|
|
IFNULL(IF(t.tencent_video_url is not null, 1, null),(
|
|
IFNULL(IF(t.tencent_video_url is not null, 1, null),(
|
|
select
|
|
select
|
|
@@ -599,7 +599,8 @@
|
|
tmtvm.exam_record_id = t.id)) as videoCount,
|
|
tmtvm.exam_record_id = t.id)) as videoCount,
|
|
t.monitor_record as monitorRecord,
|
|
t.monitor_record as monitorRecord,
|
|
(select GROUP_CONCAT(tmtvm.video_source) from t_m_tencent_video_message tmtvm where tmtvm.exam_record_id = t.id) as videoSource,
|
|
(select GROUP_CONCAT(tmtvm.video_source) from t_m_tencent_video_message tmtvm where tmtvm.exam_record_id = t.id) as videoSource,
|
|
- t.tencent_video_url as tencentVideoUrl
|
|
|
|
|
|
+ t.tencent_video_url as tencentVideoUrl,
|
|
|
|
+ IFNULL(t.breach_status,1) as breachStatus
|
|
from
|
|
from
|
|
t_e_exam_student tees
|
|
t_e_exam_student tees
|
|
left join t_e_exam tee on
|
|
left join t_e_exam tee on
|
|
@@ -648,6 +649,14 @@
|
|
</otherwise>
|
|
</otherwise>
|
|
</choose>
|
|
</choose>
|
|
</if>
|
|
</if>
|
|
|
|
+ <if test="breachStatus != null and breachStatus != '' or breachStatus == 0">
|
|
|
|
+ <if test="breachStatus == 0">
|
|
|
|
+ and t.breachStatus = #{breachStatus}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="breachStatus == 1">
|
|
|
|
+ and (t.breachStatus = #{breachStatus} or t.breachStatus is null)
|
|
|
|
+ </if>
|
|
|
|
+ </if>
|
|
</where>
|
|
</where>
|
|
order by t.roomCode
|
|
order by t.roomCode
|
|
</select>
|
|
</select>
|
|
@@ -658,7 +667,10 @@
|
|
*,
|
|
*,
|
|
if(t.statusTemp > 0,
|
|
if(t.statusTemp > 0,
|
|
'已完成',
|
|
'已完成',
|
|
- '未完成') as status
|
|
|
|
|
|
+ '未完成') as status,
|
|
|
|
+ if(t.breachStatusTemp = 0,
|
|
|
|
+ '违纪',
|
|
|
|
+ '正常') as breachStatus
|
|
from
|
|
from
|
|
(select
|
|
(select
|
|
distinct tee.id as examId,
|
|
distinct tee.id as examId,
|
|
@@ -675,7 +687,8 @@
|
|
(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
|
|
tees.id and (toer.status = 'FINISHED' or toer.status = 'PERSISTED') and toer.first_start_time is not null) as
|
|
statusTemp,
|
|
statusTemp,
|
|
- tes.mobile_number as mobileNumber
|
|
|
|
|
|
+ <!--tes.mobile_number as mobileNumber,-->
|
|
|
|
+ t.breach_status as breachStatusTemp
|
|
from
|
|
from
|
|
t_e_exam_student tees
|
|
t_e_exam_student tees
|
|
left join t_e_exam tee on
|
|
left join t_e_exam tee on
|
|
@@ -683,6 +696,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
|
|
|
|
+ left join t_oe_exam_record t on t.exam_id = tees.exam_id and t.exam_activity_id = tees.exam_activity_id and t.exam_student_id = tees.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}
|
|
@@ -713,7 +727,7 @@
|
|
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)
|
|
|
|
|
|
+ tee.id,tees.room_code,tee.name,teea.id,teea.code,tees.`identity`,tees.name,leftExamCount,statusTemp,tes.mobile_number,t.breach_status)
|
|
t
|
|
t
|
|
<where>
|
|
<where>
|
|
<if test="status != null and status != '' or status == 0">
|
|
<if test="status != null and status != '' or status == 0">
|
|
@@ -726,6 +740,14 @@
|
|
</otherwise>
|
|
</otherwise>
|
|
</choose>
|
|
</choose>
|
|
</if>
|
|
</if>
|
|
|
|
+ <if test="breachStatus != null and breachStatus != '' or breachStatus == 0">
|
|
|
|
+ <if test="breachStatus == 0">
|
|
|
|
+ and t.breachStatus = #{breachStatus}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="breachStatus == 1">
|
|
|
|
+ and (t.breachStatus = #{breachStatus} or t.breachStatus is null)
|
|
|
|
+ </if>
|
|
|
|
+ </if>
|
|
</where>
|
|
</where>
|
|
order by t.roomCode
|
|
order by t.roomCode
|
|
</select>
|
|
</select>
|
|
@@ -1304,16 +1326,20 @@
|
|
t_oe_exam_record t
|
|
t_oe_exam_record t
|
|
left join t_e_exam_student s on
|
|
left join t_e_exam_student s on
|
|
t.exam_student_id = s.id
|
|
t.exam_student_id = s.id
|
|
- where
|
|
|
|
|
|
+ <where>
|
|
t.exam_id = #{examId}
|
|
t.exam_id = #{examId}
|
|
and s.room_code in
|
|
and s.room_code in
|
|
<foreach collection="roomCodeSet" item="roomCode" index="index" open="(" close=")" separator=",">
|
|
<foreach collection="roomCodeSet" item="roomCode" index="index" open="(" close=")" separator=",">
|
|
#{roomCode}
|
|
#{roomCode}
|
|
</foreach>
|
|
</foreach>
|
|
|
|
+ <if test="examActivityId != null and examActivityId != ''">
|
|
|
|
+ and t.exam_activity_id = #{examActivityId}
|
|
|
|
+ </if>
|
|
and (t.STATUS = 'FIRST_PREPARE'
|
|
and (t.STATUS = 'FIRST_PREPARE'
|
|
or t.STATUS = 'ANSWERING'
|
|
or t.STATUS = 'ANSWERING'
|
|
or t.STATUS = 'BREAK_OFF'
|
|
or t.STATUS = 'BREAK_OFF'
|
|
or t.STATUS = 'RESUME_PREPARE')
|
|
or t.STATUS = 'RESUME_PREPARE')
|
|
|
|
+ </where>
|
|
group by
|
|
group by
|
|
t.client_websocket_status,
|
|
t.client_websocket_status,
|
|
t.camera_monitor_status,
|
|
t.camera_monitor_status,
|
|
@@ -1331,12 +1357,16 @@
|
|
count(1) as allCount
|
|
count(1) as allCount
|
|
from
|
|
from
|
|
t_e_exam_student t
|
|
t_e_exam_student t
|
|
- where
|
|
|
|
|
|
+ <where>
|
|
t.exam_id = #{examId}
|
|
t.exam_id = #{examId}
|
|
and t.room_code in
|
|
and t.room_code in
|
|
<foreach collection="roomCodeSet" item="roomCode" index="index" open="(" close=")" separator=",">
|
|
<foreach collection="roomCodeSet" item="roomCode" index="index" open="(" close=")" separator=",">
|
|
#{roomCode}
|
|
#{roomCode}
|
|
- </foreach>) t
|
|
|
|
|
|
+ </foreach>
|
|
|
|
+ <if test="examActivityId != null and examActivityId != ''">
|
|
|
|
+ and t.exam_activity_id = #{examActivityId}
|
|
|
|
+ </if>
|
|
|
|
+ </where>) t
|
|
</select>
|
|
</select>
|
|
|
|
|
|
<select id="findByOnlineInfo" resultType="java.lang.Integer">
|
|
<select id="findByOnlineInfo" resultType="java.lang.Integer">
|
|
@@ -1346,13 +1376,17 @@
|
|
t_oe_exam_record t
|
|
t_oe_exam_record t
|
|
left join t_e_exam_student s on
|
|
left join t_e_exam_student s on
|
|
t.exam_student_id = s.id
|
|
t.exam_student_id = s.id
|
|
- where
|
|
|
|
|
|
+ <where>
|
|
t.exam_id = #{examId}
|
|
t.exam_id = #{examId}
|
|
and s.room_code in
|
|
and s.room_code in
|
|
<foreach collection="roomCodeSet" item="roomCode" index="index" open="(" close=")" separator=",">
|
|
<foreach collection="roomCodeSet" item="roomCode" index="index" open="(" close=")" separator=",">
|
|
#{roomCode}
|
|
#{roomCode}
|
|
</foreach>
|
|
</foreach>
|
|
|
|
+ <if test="examActivityId != null and examActivityId != ''">
|
|
|
|
+ and t.exam_activity_id = #{examActivityId}
|
|
|
|
+ </if>
|
|
and t.STATUS = 'FIRST_PREPARE'
|
|
and t.STATUS = 'FIRST_PREPARE'
|
|
|
|
+ </where>
|
|
union all
|
|
union all
|
|
select
|
|
select
|
|
count(1) as c
|
|
count(1) as c
|
|
@@ -1360,15 +1394,19 @@
|
|
t_oe_exam_record t
|
|
t_oe_exam_record t
|
|
left join t_e_exam_student s on
|
|
left join t_e_exam_student s on
|
|
t.exam_student_id = s.id
|
|
t.exam_student_id = s.id
|
|
- where
|
|
|
|
|
|
+ <where>
|
|
t.exam_id = #{examId}
|
|
t.exam_id = #{examId}
|
|
and s.room_code in
|
|
and s.room_code in
|
|
<foreach collection="roomCodeSet" item="roomCode" index="index" open="(" close=")" separator=",">
|
|
<foreach collection="roomCodeSet" item="roomCode" index="index" open="(" close=")" separator=",">
|
|
#{roomCode}
|
|
#{roomCode}
|
|
</foreach>
|
|
</foreach>
|
|
|
|
+ <if test="examActivityId != null and examActivityId != ''">
|
|
|
|
+ and t.exam_activity_id = #{examActivityId}
|
|
|
|
+ </if>
|
|
and ((t.STATUS = 'ANSWERING' and t.client_websocket_status = 'ON_LINE')
|
|
and ((t.STATUS = 'ANSWERING' and t.client_websocket_status = 'ON_LINE')
|
|
or t.STATUS = 'RESUME_PREPARE'
|
|
or t.STATUS = 'RESUME_PREPARE'
|
|
or t.STATUS = 'BREAK_OFF')
|
|
or t.STATUS = 'BREAK_OFF')
|
|
|
|
+ </where>
|
|
union all
|
|
union all
|
|
select
|
|
select
|
|
count(distinct t.exam_student_id) as c
|
|
count(distinct t.exam_student_id) as c
|
|
@@ -1376,14 +1414,18 @@
|
|
t_oe_exam_record t
|
|
t_oe_exam_record t
|
|
left join t_e_exam_student s on
|
|
left join t_e_exam_student s on
|
|
t.exam_student_id = s.id
|
|
t.exam_student_id = s.id
|
|
- where
|
|
|
|
|
|
+ <where>
|
|
t.exam_id = #{examId}
|
|
t.exam_id = #{examId}
|
|
and s.room_code in
|
|
and s.room_code in
|
|
<foreach collection="roomCodeSet" item="roomCode" index="index" open="(" close=")" separator=",">
|
|
<foreach collection="roomCodeSet" item="roomCode" index="index" open="(" close=")" separator=",">
|
|
#{roomCode}
|
|
#{roomCode}
|
|
</foreach>
|
|
</foreach>
|
|
|
|
+ <if test="examActivityId != null and examActivityId != ''">
|
|
|
|
+ and t.exam_activity_id = #{examActivityId}
|
|
|
|
+ </if>
|
|
and (t.STATUS = 'FINISHED'
|
|
and (t.STATUS = 'FINISHED'
|
|
or t.STATUS = 'PERSISTED') and t.first_start_time is not null
|
|
or t.STATUS = 'PERSISTED') and t.first_start_time is not null
|
|
|
|
+ </where>
|
|
union all
|
|
union all
|
|
select
|
|
select
|
|
count(distinct t.id) as c
|
|
count(distinct t.id) as c
|
|
@@ -1399,13 +1441,17 @@
|
|
toer.exam_student_id
|
|
toer.exam_student_id
|
|
from
|
|
from
|
|
t_oe_exam_record toer
|
|
t_oe_exam_record toer
|
|
- where
|
|
|
|
|
|
+ <where>
|
|
t.id = toer.exam_student_id)
|
|
t.id = toer.exam_student_id)
|
|
and t.exam_id = #{examId}
|
|
and t.exam_id = #{examId}
|
|
and t.room_code in
|
|
and t.room_code in
|
|
<foreach collection="roomCodeSet" item="roomCode" index="index" open="(" close=")" separator=",">
|
|
<foreach collection="roomCodeSet" item="roomCode" index="index" open="(" close=")" separator=",">
|
|
#{roomCode}
|
|
#{roomCode}
|
|
</foreach>
|
|
</foreach>
|
|
|
|
+ <if test="examActivityId != null and examActivityId != ''">
|
|
|
|
+ and t.exam_activity_id = #{examActivityId}
|
|
|
|
+ </if>
|
|
|
|
+ </where>
|
|
</select>
|
|
</select>
|
|
|
|
|
|
<select id="findByViewAdmin" resultType="java.lang.Integer">
|
|
<select id="findByViewAdmin" resultType="java.lang.Integer">
|