|
@@ -538,6 +538,9 @@
|
|
SELECT COUNT(cssp.id_)
|
|
SELECT COUNT(cssp.id_)
|
|
FROM course_schedule_student_payment cssp
|
|
FROM course_schedule_student_payment cssp
|
|
LEFT JOIN course_schedule cs ON cs.id_ = cssp.course_schedule_id_
|
|
LEFT JOIN course_schedule cs ON cs.id_ = cssp.course_schedule_id_
|
|
|
|
+ <include refid="exportStudentAttendancesQueryPageSql"/>
|
|
|
|
+ </select>
|
|
|
|
+ <sql id="exportStudentAttendancesQueryPageSql">
|
|
<where>
|
|
<where>
|
|
<if test="organId != null">
|
|
<if test="organId != null">
|
|
AND FIND_IN_SET(cs.organ_id_,#{organId})
|
|
AND FIND_IN_SET(cs.organ_id_,#{organId})
|
|
@@ -545,8 +548,14 @@
|
|
<if test="groupType != null">
|
|
<if test="groupType != null">
|
|
AND cssp.group_type_ = #{groupType}
|
|
AND cssp.group_type_ = #{groupType}
|
|
</if>
|
|
</if>
|
|
|
|
+ <if test="classStartDate != null and classStartDate != ''">
|
|
|
|
+ AND cs.class_date_ >= #{classStartDate}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="classEndDate != null and classEndDate != ''">
|
|
|
|
+ AND cs.class_date_ <= #{classEndDate}
|
|
|
|
+ </if>
|
|
</where>
|
|
</where>
|
|
- </select>
|
|
|
|
|
|
+ </sql>
|
|
<select id="exportStudentAttendancesQueryPage"
|
|
<select id="exportStudentAttendancesQueryPage"
|
|
resultMap="ExportStudentAttendanceDtoMap">
|
|
resultMap="ExportStudentAttendanceDtoMap">
|
|
SELECT o.name_ organ_name_,o.id_ organ_id_,cs.music_group_id_,mg.name_ music_group_name_,su.username_,cssp.user_id_,
|
|
SELECT o.name_ organ_name_,o.id_ organ_id_,cs.music_group_id_,mg.name_ music_group_name_,su.username_,cssp.user_id_,
|
|
@@ -571,14 +580,7 @@
|
|
LEFT JOIN student st ON st.user_id_ = cssp.user_id_
|
|
LEFT JOIN student st ON st.user_id_ = cssp.user_id_
|
|
LEFT JOIN sys_user su ON su.id_ = cssp.user_id_
|
|
LEFT JOIN sys_user su ON su.id_ = cssp.user_id_
|
|
LEFT JOIN sys_user su2 ON su2.id_ = st.teacher_id_
|
|
LEFT JOIN sys_user su2 ON su2.id_ = st.teacher_id_
|
|
- <where>
|
|
|
|
- <if test="organId != null">
|
|
|
|
- AND FIND_IN_SET(cs.organ_id_,#{organId})
|
|
|
|
- </if>
|
|
|
|
- <if test="groupType != null">
|
|
|
|
- AND cssp.group_type_ = #{groupType}
|
|
|
|
- </if>
|
|
|
|
- </where>
|
|
|
|
|
|
+ <include refid="exportStudentAttendancesQueryPageSql"/>
|
|
ORDER BY cssp.music_group_id_ DESC,cssp.id_ DESC
|
|
ORDER BY cssp.music_group_id_ DESC,cssp.id_ DESC
|
|
<include refid="global.limit"/>
|
|
<include refid="global.limit"/>
|
|
</select>
|
|
</select>
|