|
@@ -662,6 +662,12 @@
|
|
|
|
|
|
<select id="invigilatePageProgressList" resultType="com.qmth.themis.business.bean.admin.InvigilateListProgressBean">
|
|
|
select
|
|
|
+ *,
|
|
|
+ if(t.statusTemp > 0,
|
|
|
+ '已完成',
|
|
|
+ '未完成') as status
|
|
|
+ from
|
|
|
+ (select
|
|
|
distinct tee.id as examId,
|
|
|
tee.name as examName,
|
|
|
teea.id as examActivityId,
|
|
@@ -674,9 +680,9 @@
|
|
|
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((select count(1) from t_oe_exam_record toer where toer.exam_student_id =
|
|
|
- tees.id and (toer.status = 'FINISHED' or toer.status = 'PERSISTED') >
|
|
|
- 0),'已完成','未完成') as status,
|
|
|
+ (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,
|
|
|
tes.mobile_number as mobileNumber
|
|
|
from
|
|
|
t_e_exam_student tees
|
|
@@ -713,13 +719,31 @@
|
|
|
and tees.identity like CONCAT('%', #{identity},'%')
|
|
|
</if>
|
|
|
and tee.monitor_status <![CDATA[ <> ]]> 'FINISHED'
|
|
|
+ </where> ) t
|
|
|
+ <where>
|
|
|
+ <if test="status != null and status != '' or status == 0">
|
|
|
+ <choose>
|
|
|
+ <when test="status == 0">
|
|
|
+ and t.statusTemp = 0
|
|
|
+ </when>
|
|
|
+ <otherwise>
|
|
|
+ and t.statusTemp <![CDATA[ > ]]> 0
|
|
|
+ </otherwise>
|
|
|
+ </choose>
|
|
|
+ </if>
|
|
|
</where>
|
|
|
- order by tees.room_code
|
|
|
+ order by t.roomCode
|
|
|
</select>
|
|
|
|
|
|
<select id="invigilatePageProgressListExport"
|
|
|
resultType="com.qmth.themis.business.bean.admin.InvigilateListProgressExcelBean">
|
|
|
select
|
|
|
+ *,
|
|
|
+ if(t.statusTemp > 0,
|
|
|
+ '已完成',
|
|
|
+ '未完成') as status
|
|
|
+ from
|
|
|
+ (select
|
|
|
distinct tee.id as examId,
|
|
|
tee.name as examName,
|
|
|
teea.id as examActivityId,
|
|
@@ -731,9 +755,8 @@
|
|
|
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((select count(1) from t_oe_exam_record toer where toer.exam_student_id =
|
|
|
- tees.id and (toer.status = 'FINISHED' or toer.status = 'PERSISTED') >
|
|
|
- 0),'已完成','未完成') as status,
|
|
|
+ (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,
|
|
|
tes.mobile_number as mobileNumber
|
|
|
from
|
|
|
t_e_exam_student tees
|
|
@@ -772,8 +795,20 @@
|
|
|
and tee.monitor_status <![CDATA[ <> ]]> 'FINISHED'
|
|
|
</where>
|
|
|
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
|
|
|
+ tee.id,tees.room_code,tee.name,teea.id,teea.code,tees.`identity`,tees.name,leftExamCount,statusTemp,tes.mobile_number) t
|
|
|
+ <where>
|
|
|
+ <if test="status != null and status != '' or status == 0">
|
|
|
+ <choose>
|
|
|
+ <when test="status == 0">
|
|
|
+ and t.statusTemp = 0
|
|
|
+ </when>
|
|
|
+ <otherwise>
|
|
|
+ and t.statusTemp <![CDATA[ > ]]> 0
|
|
|
+ </otherwise>
|
|
|
+ </choose>
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ order by t.roomCode
|
|
|
</select>
|
|
|
|
|
|
<select id="invigilatePageListHistory" resultType="com.qmth.themis.business.bean.admin.InvigilateListHistoryBean">
|
|
@@ -1620,6 +1655,7 @@
|
|
|
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
|
|
|
<where>
|
|
|
+ toer.first_start_time is not null
|
|
|
<if test="examId != null and examId != ''">
|
|
|
and toer.exam_id = #{examId}
|
|
|
</if>
|
|
@@ -1653,6 +1689,7 @@
|
|
|
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
|
|
|
<where>
|
|
|
+ toer.first_start_time is not null
|
|
|
<if test="examId != null and examId != ''">
|
|
|
and toer.exam_id = #{examId}
|
|
|
</if>
|