|
@@ -95,6 +95,7 @@
|
|
|
<resultMap type="com.zhongzheng.modules.grade.vo.ClassPeriodChapterVo" id="ClassPeriodChapterVo">
|
|
|
<result property="userId" column="user_id"/>
|
|
|
<result property="id" column="id"/>
|
|
|
+ <result property="courseId" column="course_id"/>
|
|
|
<result property="typeName" column="type_name"/>
|
|
|
<result property="realName" column="realname"/>
|
|
|
<result property="classHours" column="class_hours"/>
|
|
@@ -417,108 +418,6 @@
|
|
|
AND cm.type=3
|
|
|
</select>
|
|
|
|
|
|
- <select id="listPeriodAuditSection" parameterType="com.zhongzheng.modules.grade.bo.ClassGradeUserQueryBo"
|
|
|
- resultMap="ClassPeriodVo">
|
|
|
- SELECT
|
|
|
- cm.menu_id as id,
|
|
|
- cm.course_id,
|
|
|
- (SELECT u.realname FROM `user` u where 1=1
|
|
|
- <if test="userId != null and userId !='' ">
|
|
|
- and u.user_id = #{userId}
|
|
|
- </if>
|
|
|
- ) as realname,
|
|
|
- (SELECT u.user_id FROM `user` u where 1=1
|
|
|
- <if test="userId != null and userId !='' ">
|
|
|
- and u.user_id = #{userId}
|
|
|
- </if>
|
|
|
- ) as user_id,
|
|
|
- (SELECT cs.`name` FROM course_section cs where cm.menu_id = cs.section_id) as type_name,
|
|
|
- null as class_hours,
|
|
|
- 3 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 = gc.course_id
|
|
|
- <if test="goodsId != null and goodsId !='' ">
|
|
|
- AND up.goods_id = #{goodsId}
|
|
|
- </if>
|
|
|
-
|
|
|
- AND up.section_id = cm.menu_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 = gc.course_id
|
|
|
-
|
|
|
- <if test="goodsId != null and goodsId !='' ">
|
|
|
- AND up.goods_id = #{goodsId}
|
|
|
- </if>
|
|
|
- AND up.section_id = cm.menu_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 = gc.course_id
|
|
|
- <if test="goodsId != null and goodsId !='' ">
|
|
|
- AND up.goods_id = #{goodsId}
|
|
|
- </if>
|
|
|
- AND up.section_id = cm.menu_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 = gc.course_id
|
|
|
- <if test="goodsId != null and goodsId !='' ">
|
|
|
- AND up.goods_id = #{goodsId}
|
|
|
- </if>
|
|
|
- AND up.section_id = cm.menu_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 = gc.course_id
|
|
|
- <if test="goodsId != null and goodsId !='' ">
|
|
|
- AND up.goods_id = #{goodsId}
|
|
|
- </if>
|
|
|
- AND up.section_id = cm.menu_id
|
|
|
- ) AS audit_num
|
|
|
- FROM
|
|
|
- course_menu cm
|
|
|
- LEFT JOIN goods_course gc on gc.course_id = cm.course_id
|
|
|
- where 1=1
|
|
|
- <if test="goodsId != null and goodsId !='' ">
|
|
|
- and gc.goods_id = #{goodsId}
|
|
|
- </if>
|
|
|
- AND cm.type=3
|
|
|
- </select>
|
|
|
-
|
|
|
<select id="listPeriodAuditExam" parameterType="map" resultMap="ClassPeriodChapterVo">
|
|
|
SELECT
|
|
|
cme.exam_id as id,
|
|
@@ -618,7 +517,9 @@
|
|
|
LEFT JOIN goods_course gc on gc.course_id = cme.course_id
|
|
|
LEFT JOIN course_menu cm on cme.section_id = cm.menu_id
|
|
|
where 1=1
|
|
|
- and gc.goods_id=11
|
|
|
+ <if test="goodsId != null and goodsId !='' ">
|
|
|
+ and gc.goods_id= #{goodsId}
|
|
|
+ </if>
|
|
|
AND cm.type=3 and cme.chapter_id=0 and cme.module_id=0 and cme.type=1 and cm.type=3
|
|
|
</select>
|
|
|
|