|
@@ -541,85 +541,7 @@
|
|
|
) as user_id,
|
|
|
(SELECT e.exam_name FROM exam e where cme.exam_id = e.exam_id) as type_name,
|
|
|
null as class_hours,
|
|
|
- 4 as type,
|
|
|
- (
|
|
|
- SELECT
|
|
|
- ups.record_start_time
|
|
|
- FROM
|
|
|
- user_period_status ups
|
|
|
- LEFT JOIN user_period up ON up.id = ups.period_id
|
|
|
- WHERE
|
|
|
- period_status = 1
|
|
|
- AND up.course_id = cme.course_id
|
|
|
- <if test="goodsId != null and goodsId !='' ">
|
|
|
- AND up.goods_id = #{goodsId}
|
|
|
- </if>
|
|
|
- and cme.module_id = up.module_id
|
|
|
- AND up.exam_id = cme.exam_id
|
|
|
-
|
|
|
- ) AS study_start_time,
|
|
|
- (
|
|
|
- SELECT
|
|
|
- ups.record_end_time
|
|
|
- FROM
|
|
|
- user_period_status ups
|
|
|
- LEFT JOIN user_period up ON up.id = ups.period_id
|
|
|
- WHERE
|
|
|
- period_status = 1
|
|
|
-
|
|
|
- AND up.course_id = cme.course_id
|
|
|
-
|
|
|
- <if test="goodsId != null and goodsId !='' ">
|
|
|
- AND up.goods_id = #{goodsId}
|
|
|
- </if>
|
|
|
- and cme.module_id = up.module_id
|
|
|
- AND up.exam_id = cme.exam_id
|
|
|
- ) AS study_end_time,
|
|
|
- (
|
|
|
- SELECT
|
|
|
- ups.`status`
|
|
|
- FROM
|
|
|
- user_period_status ups
|
|
|
- LEFT JOIN user_period up ON up.id = ups.period_id
|
|
|
- WHERE
|
|
|
- period_status = 1
|
|
|
- AND up.course_id = cme.course_id
|
|
|
- <if test="goodsId != null and goodsId !='' ">
|
|
|
- AND up.goods_id = #{goodsId}
|
|
|
- </if>
|
|
|
- and cme.module_id = up.module_id
|
|
|
- AND up.exam_id = cme.exam_id
|
|
|
- ) AS STATUS,
|
|
|
- (
|
|
|
- SELECT
|
|
|
- ups.create_time
|
|
|
- FROM
|
|
|
- user_period_status ups
|
|
|
- LEFT JOIN user_period up ON up.id = ups.period_id
|
|
|
- WHERE
|
|
|
- period_status = 1
|
|
|
- AND up.course_id = cme.course_id
|
|
|
- <if test="goodsId != null and goodsId !='' ">
|
|
|
- AND up.goods_id = #{goodsId}
|
|
|
- </if>
|
|
|
- and cme.module_id = up.module_id
|
|
|
- AND up.exam_id = cme.exam_id
|
|
|
- ) AS audit_time,
|
|
|
- (
|
|
|
- SELECT
|
|
|
- COUNT( ups.id )
|
|
|
- FROM
|
|
|
- user_period_status ups
|
|
|
- LEFT JOIN user_period up ON up.id = ups.period_id
|
|
|
- WHERE
|
|
|
- period_status = 1
|
|
|
- AND up.course_id = cme.course_id
|
|
|
- <if test="goodsId != null and goodsId !='' ">
|
|
|
- AND up.goods_id = #{goodsId}
|
|
|
- </if>
|
|
|
- and cme.module_id = up.module_id
|
|
|
- AND up.exam_id = cme.exam_id
|
|
|
- ) AS audit_num
|
|
|
+ 4 as type
|
|
|
FROM
|
|
|
course_menu_exam cme
|
|
|
LEFT JOIN exam e ON cme.exam_id = e.exam_id
|
|
@@ -627,6 +549,9 @@
|
|
|
<if test="courseId != null and courseId !='' ">
|
|
|
AND cme.course_id=#{courseId}
|
|
|
</if>
|
|
|
+ <if test="chapterId != null and chapterId !='' ">
|
|
|
+ AND cme.chapter_id =#{chapterId}
|
|
|
+ </if>
|
|
|
<if test="moduleId != null and moduleId !='' ">
|
|
|
AND cme.module_id =#{moduleId}
|
|
|
</if>
|