|
@@ -297,6 +297,7 @@
|
|
|
m.del_flag_ = 0
|
|
|
AND (m.is_lock_ = 0 OR m.is_lock_ IS NULL)
|
|
|
AND m.status_ = 'OVER'
|
|
|
+ AND (m.new_course_id_ IS NULL OR m.new_course_id_=m.id_)
|
|
|
AND m.organ_id_ IS NOT NULL
|
|
|
<if test="groupType!=null">
|
|
|
AND m.group_type_ = #{groupType,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler}
|
|
@@ -521,4 +522,23 @@
|
|
|
</foreach>
|
|
|
</if>
|
|
|
</select>
|
|
|
+
|
|
|
+ <select id="countStudentAttendanceInfo" resultType="java.lang.Integer">
|
|
|
+ SELECT
|
|
|
+ COUNT( DISTINCT cssp.user_id_ )
|
|
|
+ FROM
|
|
|
+ course_schedule_student_payment cssp
|
|
|
+ LEFT JOIN course_schedule cs ON cssp.course_schedule_id_ = cs.id_
|
|
|
+ LEFT JOIN student_attendance sa ON sa.course_schedule_id_ = cssp.course_schedule_id_ AND sa.user_id_ = cssp.user_id_
|
|
|
+ LEFT JOIN student_visit sv ON cssp.id_=sv.object_id_
|
|
|
+ WHERE
|
|
|
+ ( sa.status_ = 'LEAVE' AND sa.remark_ IS NOT NULL AND sv.id_ IS NULL)
|
|
|
+ OR sa.id_ IS NULL
|
|
|
+ <if test="organIds!=null and organIds.size()>0">
|
|
|
+ AND cs.organ_id_ IN
|
|
|
+ <foreach collection="organIds" item="organId" open="(" close=")" separator=",">
|
|
|
+ #{organId}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ </select>
|
|
|
</mapper>
|