|
@@ -488,7 +488,7 @@
|
|
|
su.username_,su.phone_,su.avatar_,cs.teach_mode_,cs.type_ course_type_,o.name_ organ_name_,tu.real_name_ teacher_name_,cs.name_ course_schedule_name_,cs.status_ course_status_,
|
|
su.username_,su.phone_,su.avatar_,cs.teach_mode_,cs.type_ course_type_,o.name_ organ_name_,tu.real_name_ teacher_name_,cs.name_ course_schedule_name_,cs.status_ course_status_,
|
|
|
cs.actual_teacher_id_ teacher_id_,cs.class_date_ ,cs.start_class_time_,cs.end_class_time_
|
|
cs.actual_teacher_id_ teacher_id_,cs.class_date_ ,cs.start_class_time_,cs.end_class_time_
|
|
|
FROM course_schedule_student_payment cssp left join course_schedule cs on cs.id_ = cssp.course_schedule_id_
|
|
FROM course_schedule_student_payment cssp left join course_schedule cs on cs.id_ = cssp.course_schedule_id_
|
|
|
- left join student_attendance sa on cssp.course_schedule_id_ = sa.course_schedule_id_
|
|
|
|
|
|
|
+ left join student_attendance sa on cssp.course_schedule_id_ = sa.course_schedule_id_ and cssp.user_id_ = sa.user_id_
|
|
|
LEFT JOIN sys_user su ON cssp.user_id_ = su.id_
|
|
LEFT JOIN sys_user su ON cssp.user_id_ = su.id_
|
|
|
left join sys_user tu on tu.id_ = cs.actual_teacher_id_
|
|
left join sys_user tu on tu.id_ = cs.actual_teacher_id_
|
|
|
left join organization o on o.id_ = cs.organ_id_
|
|
left join organization o on o.id_ = cs.organ_id_
|
|
@@ -497,7 +497,7 @@
|
|
|
cssp.course_schedule_id_ = #{courseScheduleId}
|
|
cssp.course_schedule_id_ = #{courseScheduleId}
|
|
|
</if>
|
|
</if>
|
|
|
<if test="search != null">
|
|
<if test="search != null">
|
|
|
- cssp.course_schedule_id_ = #{search}
|
|
|
|
|
|
|
+ and cssp.course_schedule_id_ = #{search}
|
|
|
</if>
|
|
</if>
|
|
|
<if test="studentID != null">
|
|
<if test="studentID != null">
|
|
|
and cssp.user_id_ = #{studentID}
|
|
and cssp.user_id_ = #{studentID}
|
|
@@ -526,6 +526,9 @@
|
|
|
<if test="musicGroupId != null">
|
|
<if test="musicGroupId != null">
|
|
|
and cssp.music_group_id_ = #{musicGroupId}
|
|
and cssp.music_group_id_ = #{musicGroupId}
|
|
|
</if>
|
|
</if>
|
|
|
|
|
+ <if test="organId != null and organId != ''">
|
|
|
|
|
+ AND FIND_IN_SET(cs.organ_id_,#{organId})
|
|
|
|
|
+ </if>
|
|
|
</where>
|
|
</where>
|
|
|
ORDER BY cs.id_ DESC
|
|
ORDER BY cs.id_ DESC
|
|
|
<include refid="global.limit"/>
|
|
<include refid="global.limit"/>
|
|
@@ -534,13 +537,13 @@
|
|
|
<select id="countStudentAttendance" resultType="java.lang.Integer">
|
|
<select id="countStudentAttendance" resultType="java.lang.Integer">
|
|
|
SELECT count(cssp.id_)
|
|
SELECT count(cssp.id_)
|
|
|
FROM course_schedule_student_payment cssp left join course_schedule cs on cs.id_ = cssp.course_schedule_id_
|
|
FROM course_schedule_student_payment cssp left join course_schedule cs on cs.id_ = cssp.course_schedule_id_
|
|
|
- left join student_attendance sa on cssp.course_schedule_id_ = sa.course_schedule_id_
|
|
|
|
|
|
|
+ left join student_attendance sa on cssp.course_schedule_id_ = sa.course_schedule_id_ and cssp.user_id_ = sa.user_id_
|
|
|
<where>
|
|
<where>
|
|
|
<if test="courseScheduleId != null">
|
|
<if test="courseScheduleId != null">
|
|
|
cssp.course_schedule_id_ = #{courseScheduleId}
|
|
cssp.course_schedule_id_ = #{courseScheduleId}
|
|
|
</if>
|
|
</if>
|
|
|
<if test="search != null">
|
|
<if test="search != null">
|
|
|
- cssp.course_schedule_id_ = #{search}
|
|
|
|
|
|
|
+ and cssp.course_schedule_id_ = #{search}
|
|
|
</if>
|
|
</if>
|
|
|
<if test="studentID != null">
|
|
<if test="studentID != null">
|
|
|
and cssp.user_id_ = #{studentID}
|
|
and cssp.user_id_ = #{studentID}
|
|
@@ -569,6 +572,9 @@
|
|
|
<if test="musicGroupId != null">
|
|
<if test="musicGroupId != null">
|
|
|
and cssp.music_group_id_ = #{musicGroupId}
|
|
and cssp.music_group_id_ = #{musicGroupId}
|
|
|
</if>
|
|
</if>
|
|
|
|
|
+ <if test="organId != null and organId != ''">
|
|
|
|
|
+ AND FIND_IN_SET(cs.organ_id_,#{organId})
|
|
|
|
|
+ </if>
|
|
|
</where>
|
|
</where>
|
|
|
</select>
|
|
</select>
|
|
|
<select id="findByCourseId" resultMap="StudentAttendance">
|
|
<select id="findByCourseId" resultMap="StudentAttendance">
|