|
@@ -418,12 +418,6 @@
|
|
|
|
|
|
<select id="invigilatePageProgressList" resultType="com.qmth.themis.business.bean.admin.InvigilateListProgressBean">
|
|
<select id="invigilatePageProgressList" resultType="com.qmth.themis.business.bean.admin.InvigilateListProgressBean">
|
|
select
|
|
select
|
|
- *,
|
|
|
|
- if(t.statusTemp > 0,
|
|
|
|
- '已完成',
|
|
|
|
- '未完成') as status
|
|
|
|
- from
|
|
|
|
- (select
|
|
|
|
distinct tee.id as examId,
|
|
distinct tee.id as examId,
|
|
tee.name as examName,
|
|
tee.name as examName,
|
|
teea.id as examActivityId,
|
|
teea.id as examActivityId,
|
|
@@ -436,25 +430,10 @@
|
|
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
|
|
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 1 = 1
|
|
|
|
- <if test="examId != null and examId != ''">
|
|
|
|
- and toer.exam_id = #{examId}
|
|
|
|
- </if>
|
|
|
|
- and toer.exam_student_id = tees.id and toer.status in ('FINISHED','PERSISTED') and toer.first_start_time is not
|
|
|
|
- null) as
|
|
|
|
- statusTemp,
|
|
|
|
- <!--tes.mobile_number as mobileNumber,-->
|
|
|
|
|
|
+ if(tees.already_exam_count > 0,'已完成','未完成') as status,
|
|
t.id as examRecordId,
|
|
t.id as examRecordId,
|
|
- IFNULL(IF(t.tencent_video_url is not null, 1, null),(
|
|
|
|
- select
|
|
|
|
- count(1)
|
|
|
|
- from
|
|
|
|
- t_m_tencent_video_message tmtvm
|
|
|
|
- where
|
|
|
|
- tmtvm.exam_record_id = t.id)) as videoCount,
|
|
|
|
|
|
+ IFNULL(IF(t.tencent_video_url is not null, 1, null),( select count(1) from t_m_tencent_video_message tmtvm where 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,
|
|
|
|
t.tencent_video_url as tencentVideoUrl,
|
|
t.tencent_video_url as tencentVideoUrl,
|
|
IFNULL(t.breach_status,1) as breachStatus,
|
|
IFNULL(t.breach_status,1) as breachStatus,
|
|
tees.class_no as classNo
|
|
tees.class_no as classNo
|
|
@@ -492,67 +471,46 @@
|
|
<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.monitor_status <![CDATA[ <> ]]> 'FINISHED'
|
|
|
|
- </where>
|
|
|
|
- group by t.id,
|
|
|
|
- tees.room_code,
|
|
|
|
- tees.room_name,
|
|
|
|
- tees.course_code,tees.course_name,tee.name,teea.id,teea.code,tees.`identity`,tees.name,leftExamCount,statusTemp,tes.mobile_number,t.breach_status,tees.class_no) t
|
|
|
|
- <where>
|
|
|
|
<if test="status != null and status != '' or status == 0">
|
|
<if test="status != null and status != '' or status == 0">
|
|
<choose>
|
|
<choose>
|
|
<when test="status == 0">
|
|
<when test="status == 0">
|
|
- and t.statusTemp = 0
|
|
|
|
|
|
+ and tees.already_exam_count = 0
|
|
</when>
|
|
</when>
|
|
<otherwise>
|
|
<otherwise>
|
|
- and t.statusTemp <![CDATA[ > ]]> 0
|
|
|
|
|
|
+ and tees.already_exam_count <![CDATA[ > ]]> 0
|
|
</otherwise>
|
|
</otherwise>
|
|
</choose>
|
|
</choose>
|
|
</if>
|
|
</if>
|
|
<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.breachStatus = #{breachStatus}
|
|
|
|
|
|
+ and t.breach_status = #{breachStatus}
|
|
</if>
|
|
</if>
|
|
<if test="breachStatus == 1">
|
|
<if test="breachStatus == 1">
|
|
- and (t.breachStatus = #{breachStatus} or t.breachStatus is null)
|
|
|
|
|
|
+ and (t.breach_status = #{breachStatus} or t.breach_status is null)
|
|
</if>
|
|
</if>
|
|
</if>
|
|
</if>
|
|
|
|
+ and tee.monitor_status <![CDATA[ <> ]]> 'FINISHED'
|
|
</where>
|
|
</where>
|
|
- order by CAST(t.examActivityCode AS UNSIGNED),CAST(t.roomCode AS UNSIGNED)
|
|
|
|
|
|
+ order by CAST(teea.code AS UNSIGNED),CAST(tees.room_code AS UNSIGNED)
|
|
</select>
|
|
</select>
|
|
|
|
|
|
<select id="invigilatePageProgressListExport"
|
|
<select id="invigilatePageProgressListExport"
|
|
resultType="com.qmth.themis.business.bean.admin.InvigilateListProgressExcelBean">
|
|
resultType="com.qmth.themis.business.bean.admin.InvigilateListProgressExcelBean">
|
|
- select
|
|
|
|
- *,
|
|
|
|
- if(t.statusTemp > 0,
|
|
|
|
- '已完成',
|
|
|
|
- '未完成') as status,
|
|
|
|
- if(t.breachStatusTemp = 0,
|
|
|
|
- '违纪',
|
|
|
|
- '正常') as breachStatus
|
|
|
|
- from
|
|
|
|
- (select
|
|
|
|
- distinct tee.id as examId,
|
|
|
|
|
|
+ select distinct tee.id as examId,
|
|
tee.name as examName,
|
|
tee.name as examName,
|
|
teea.id as examActivityId,
|
|
teea.id as examActivityId,
|
|
teea.code as examActivityCode,
|
|
teea.code as examActivityCode,
|
|
|
|
+ tees.room_name as roomName,
|
|
tees.room_code as roomCode,
|
|
tees.room_code as roomCode,
|
|
- group_concat(tees.room_name,CONCAT(CONCAT('(',tees.room_code),')')) as roomName,
|
|
|
|
|
|
+ tees.course_name as courseName,
|
|
|
|
+ tees.course_code as courseCode,
|
|
|
|
+ <!--group_concat(tees.room_name,CONCAT(CONCAT('(',tees.room_code),')')) as roomName,-->
|
|
tees.`identity`,
|
|
tees.`identity`,
|
|
tees.name,
|
|
tees.name,
|
|
- 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,
|
|
|
|
- (select count(1) from t_oe_exam_record toer where 1 = 1
|
|
|
|
- <if test="examId != null and examId != ''">
|
|
|
|
- and toer.exam_id = #{examId}
|
|
|
|
- </if>
|
|
|
|
- and toer.exam_student_id = tees.id and toer.status in ('FINISHED','PERSISTED') and toer.first_start_time is not
|
|
|
|
- null) as
|
|
|
|
- statusTemp,
|
|
|
|
- <!--tes.mobile_number as mobileNumber,-->
|
|
|
|
- t.breach_status as breachStatusTemp,
|
|
|
|
|
|
+ <!--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(tees.already_exam_count > 0,'已完成','未完成') as status,
|
|
|
|
+ if(t.breach_status = 0,'违纪','正常') as breachStatus,
|
|
tees.class_no as classNo
|
|
tees.class_no as classNo
|
|
from
|
|
from
|
|
t_e_exam_student tees
|
|
t_e_exam_student tees
|
|
@@ -591,33 +549,27 @@
|
|
<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.monitor_status <![CDATA[ <> ]]> 'FINISHED'
|
|
|
|
- </where>
|
|
|
|
- group by t.id,
|
|
|
|
- tees.room_code,
|
|
|
|
- tees.room_name,
|
|
|
|
- tees.course_code,tees.course_name,tee.name,teea.id,teea.code,tees.`identity`,tees.name,leftExamCount,statusTemp,tes.mobile_number,t.breach_status,tees.class_no) t
|
|
|
|
- <where>
|
|
|
|
<if test="status != null and status != '' or status == 0">
|
|
<if test="status != null and status != '' or status == 0">
|
|
<choose>
|
|
<choose>
|
|
<when test="status == 0">
|
|
<when test="status == 0">
|
|
- and t.statusTemp = 0
|
|
|
|
|
|
+ and tees.already_exam_count = 0
|
|
</when>
|
|
</when>
|
|
<otherwise>
|
|
<otherwise>
|
|
- and t.statusTemp <![CDATA[ > ]]> 0
|
|
|
|
|
|
+ and tees.already_exam_count <![CDATA[ > ]]> 0
|
|
</otherwise>
|
|
</otherwise>
|
|
</choose>
|
|
</choose>
|
|
</if>
|
|
</if>
|
|
<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.breachStatusTemp = #{breachStatus}
|
|
|
|
|
|
+ and t.breach_status = #{breachStatus}
|
|
</if>
|
|
</if>
|
|
<if test="breachStatus == 1">
|
|
<if test="breachStatus == 1">
|
|
- and (t.breachStatusTemp = #{breachStatus} or t.breachStatusTemp is null)
|
|
|
|
|
|
+ and (t.breach_status = #{breachStatus} or t.breach_status is null)
|
|
</if>
|
|
</if>
|
|
</if>
|
|
</if>
|
|
|
|
+ and tee.monitor_status <![CDATA[ <> ]]> 'FINISHED'
|
|
</where>
|
|
</where>
|
|
- order by CAST(t.examActivityCode AS UNSIGNED),CAST(t.roomCode AS UNSIGNED)
|
|
|
|
|
|
+ order by CAST(teea.code AS UNSIGNED),CAST(tees.room_code AS UNSIGNED)
|
|
</select>
|
|
</select>
|
|
|
|
|
|
<select id="invigilatePageListHistory" resultType="com.qmth.themis.business.bean.admin.InvigilateListHistoryBean">
|
|
<select id="invigilatePageListHistory" resultType="com.qmth.themis.business.bean.admin.InvigilateListHistoryBean">
|