|
@@ -11,15 +11,16 @@
|
|
tes.enable,
|
|
tes.enable,
|
|
tes.base_photo_path as basePhotoPath,
|
|
tes.base_photo_path as basePhotoPath,
|
|
IF(tes.base_photo_path is null,0,1) as photo,
|
|
IF(tes.base_photo_path is null,0,1) as photo,
|
|
- (select tbu.name from t_b_user tbu where tbu.id = tes.create_id) as createName,
|
|
|
|
- (select tbu.name from t_b_user tbu where tbu.id = tes.update_id) as updateName,
|
|
|
|
|
|
+ tbu1.name as createName,
|
|
|
|
+ tbu2.name as updateName,
|
|
tes.create_time as createTime,
|
|
tes.create_time as createTime,
|
|
tes.update_time as updateTime,
|
|
tes.update_time as updateTime,
|
|
tes.mobile_number as mobileNumber
|
|
tes.mobile_number as mobileNumber
|
|
from
|
|
from
|
|
t_e_student tes
|
|
t_e_student tes
|
|
- left join t_b_org tbo on
|
|
|
|
- tbo.id = tes.org_id
|
|
|
|
|
|
+ left join t_b_org tbo on tbo.id = tes.org_id
|
|
|
|
+ left join t_b_user tbu1 on tes.create_id = tbu1.id
|
|
|
|
+ left join t_b_user tbu2 on tes.update_id = tbu2.id
|
|
<where>
|
|
<where>
|
|
<if test="identity != null and identity != ''">
|
|
<if test="identity != null and identity != ''">
|
|
and tes.identity like concat('%', #{identity}, '%')
|
|
and tes.identity like concat('%', #{identity}, '%')
|
|
@@ -61,25 +62,18 @@
|
|
toer.status,
|
|
toer.status,
|
|
toer.first_start_time as firstStartTime,
|
|
toer.first_start_time as firstStartTime,
|
|
toer.finish_time as finishTime,
|
|
toer.finish_time as finishTime,
|
|
- IFNULL(IF(toer.tencent_video_url is not null, 1, null),(
|
|
|
|
- select
|
|
|
|
- count(1)
|
|
|
|
- from
|
|
|
|
- t_m_tencent_video_message t
|
|
|
|
- where
|
|
|
|
- t.exam_record_id = toer.id)) as videoCount,
|
|
|
|
|
|
+ IFNULL(IF(toer.tencent_video_url is not null, 1, null),count(t1.id)) as videoCount,
|
|
toer.monitor_record as monitorRecord,
|
|
toer.monitor_record as monitorRecord,
|
|
- (select GROUP_CONCAT(t.video_source) from t_m_tencent_video_message t where t.exam_record_id = toer.id) as videoSource,
|
|
|
|
|
|
+ GROUP_CONCAT(t2.video_source) as videoSource,
|
|
toer.tencent_video_url as tencentVideoUrl,
|
|
toer.tencent_video_url as tencentVideoUrl,
|
|
toer.video_status as videoStatus
|
|
toer.video_status as videoStatus
|
|
from
|
|
from
|
|
t_e_exam_student tees
|
|
t_e_exam_student tees
|
|
- join t_e_exam tee on
|
|
|
|
- tee.id = tees.exam_id
|
|
|
|
- join t_oe_exam_record toer on
|
|
|
|
- toer.exam_student_id = tees.id and toer.exam_id = tee.id
|
|
|
|
- join t_e_student tes on
|
|
|
|
- tes.id = tees.student_id
|
|
|
|
|
|
+ join t_e_exam tee on tee.id = tees.exam_id
|
|
|
|
+ join t_oe_exam_record toer on toer.exam_student_id = tees.id
|
|
|
|
+ join t_e_student tes on tes.id = tees.student_id
|
|
|
|
+ left join t_m_tencent_video_message t1 on t1.exam_record_id = toer.id
|
|
|
|
+ left join t_m_tencent_video_message t2 on t2.exam_record_id = toer.id
|
|
<where>
|
|
<where>
|
|
<if test="studentId != null and studentId != ''">
|
|
<if test="studentId != null and studentId != ''">
|
|
and tes.id = #{studentId}
|
|
and tes.id = #{studentId}
|
|
@@ -88,6 +82,22 @@
|
|
and tee.id = #{examId}
|
|
and tee.id = #{examId}
|
|
</if>
|
|
</if>
|
|
</where>
|
|
</where>
|
|
|
|
+ group by
|
|
|
|
+ tee.id,
|
|
|
|
+ tee.name,
|
|
|
|
+ tees.id,
|
|
|
|
+ toer.id,
|
|
|
|
+ tees.course_code,
|
|
|
|
+ tees.course_name ,
|
|
|
|
+ tees.`identity`,
|
|
|
|
+ tees.name,
|
|
|
|
+ toer.objective_score,
|
|
|
|
+ toer.status,
|
|
|
|
+ toer.first_start_time,
|
|
|
|
+ toer.finish_time,
|
|
|
|
+ toer.monitor_record,
|
|
|
|
+ toer.tencent_video_url,
|
|
|
|
+ toer.video_status
|
|
order by toer.first_start_time desc
|
|
order by toer.first_start_time desc
|
|
</select>
|
|
</select>
|
|
|
|
|