|
@@ -860,17 +860,18 @@
|
|
|
<result property="practiceNotStartTeacherNames" column="practice_not_start_teacher_names_"/>
|
|
|
<result property="teacherId" column="teacher_id_"/>
|
|
|
<result property="teacherName" column="real_name_"/>
|
|
|
+ <result property="organName" column="organ_name_"/>
|
|
|
</resultMap>
|
|
|
<select id="exportStudentVipPractice" resultMap="StudentVipPracticeExportDto">
|
|
|
- SELECT s.user_id_,su.username_,
|
|
|
+ SELECT s.user_id_,su.username_,o.name_ organ_name_,
|
|
|
COUNT(CASE WHEN cssp.group_type_ = 'VIP' AND cs.status_ != 'NOT_START' THEN 1 ELSE NULL END) vip_over_num_,
|
|
|
COUNT(CASE WHEN cssp.group_type_ = 'VIP' AND cs.status_ = 'NOT_START' THEN 1 ELSE NULL END) vip_not_start_num_,
|
|
|
- GROUP_CONCAT(DISTINCT (CASE WHEN cssp.group_type_ = 'VIP' AND cs.status_ != 'NOT_START' THEN sut.id_ ELSE NULL END) ORDER BY cs.class_date_ DESC,start_class_time_ DESC) vip_over_teacher_ids_,
|
|
|
- GROUP_CONCAT(DISTINCT (CASE WHEN cssp.group_type_ = 'VIP' AND cs.status_ != 'NOT_START' THEN sut.real_name_ ELSE NULL END) ORDER BY cs.class_date_ DESC,start_class_time_ DESC) vip_over_teacher_names_,
|
|
|
+ GROUP_CONCAT(DISTINCT (CASE WHEN cssp.group_type_ = 'VIP' AND cs.status_ != 'NOT_START' THEN sut.id_ ELSE NULL END) ORDER BY cs.class_date_ ASC,start_class_time_ ASC) vip_over_teacher_ids_,
|
|
|
+ GROUP_CONCAT(DISTINCT (CASE WHEN cssp.group_type_ = 'VIP' AND cs.status_ != 'NOT_START' THEN sut.real_name_ ELSE NULL END) ORDER BY cs.class_date_ ASC,start_class_time_ ASC) vip_over_teacher_names_,
|
|
|
COUNT(CASE WHEN cssp.group_type_ = 'PRACTICE' AND cs.status_ != 'NOT_START' THEN 1 ELSE NULL END) practice_over_num_,
|
|
|
COUNT(CASE WHEN cssp.group_type_ = 'PRACTICE' AND cs.status_ = 'NOT_START' THEN 1 ELSE NULL END) practice_not_start_num_,
|
|
|
- GROUP_CONCAT(DISTINCT (CASE WHEN cssp.group_type_ = 'PRACTICE' AND cs.status_ != 'NOT_START' THEN sut.id_ ELSE NULL END) ORDER BY cs.class_date_ DESC,start_class_time_ DESC) practice_over_teacher_ids_,
|
|
|
- GROUP_CONCAT(DISTINCT (CASE WHEN cssp.group_type_ = 'PRACTICE' AND cs.status_ != 'NOT_START' THEN sut.real_name_ ELSE NULL END) ORDER BY cs.class_date_ DESC,start_class_time_ DESC) practice_over_teacher_names_,
|
|
|
+ GROUP_CONCAT(DISTINCT (CASE WHEN cssp.group_type_ = 'PRACTICE' AND cs.status_ != 'NOT_START' THEN sut.id_ ELSE NULL END) ORDER BY cs.class_date_ ASC,start_class_time_ ASC) practice_over_teacher_ids_,
|
|
|
+ GROUP_CONCAT(DISTINCT (CASE WHEN cssp.group_type_ = 'PRACTICE' AND cs.status_ != 'NOT_START' THEN sut.real_name_ ELSE NULL END) ORDER BY cs.class_date_ ASC,start_class_time_ ASC) practice_over_teacher_names_,
|
|
|
s.teacher_id_,ste.real_name_
|
|
|
FROM student s
|
|
|
LEFT JOIN course_schedule_student_payment cssp FORCE INDEX(group_type_) ON cssp.user_id_ = s.user_id_
|
|
@@ -878,6 +879,7 @@
|
|
|
LEFT JOIN sys_user su ON s.user_id_ = su.id_
|
|
|
LEFT JOIN sys_user ste ON s.teacher_id_ = ste.id_
|
|
|
LEFT JOIN sys_user sut ON cs.actual_teacher_id_ = sut.id_
|
|
|
+ LEFT JOIN organization o ON o.id_ = su.organ_id_
|
|
|
WHERE cssp.group_type_ IN ('VIP','PRACTICE')
|
|
|
<if test="organId != null">
|
|
|
AND su.organ_id_ = #{organId}
|