|
@@ -31,11 +31,21 @@
|
|
|
|
|
|
<select id="getClassSure" parameterType="com.xjrsoft.module.banding.dto.BandingTaskClassPageDto" resultType="com.xjrsoft.module.banding.vo.BandingTaskClassSureListVo">
|
|
<select id="getClassSure" parameterType="com.xjrsoft.module.banding.dto.BandingTaskClassPageDto" resultType="com.xjrsoft.module.banding.vo.BandingTaskClassSureListVo">
|
|
SELECT t1.id, t1.major_set_id,t2.name AS major_set_name, t1.name,t1.sort_code,
|
|
SELECT t1.id, t1.major_set_id,t2.name AS major_set_name, t1.name,t1.sort_code,
|
|
- (SELECT COUNT(*) FROM base_new_student WHERE delete_mark = 0) as number,
|
|
|
|
- (SELECT COUNT(*) FROM base_new_student WHERE delete_mark = 0 AND gender = 'SB10001') AS male_count,
|
|
|
|
- (SELECT COUNT(*) FROM base_new_student WHERE delete_mark = 0 AND gender = 'SB10002') AS female_count,
|
|
|
|
- (SELECT COUNT(*) FROM base_new_student WHERE delete_mark = 0 AND stduy_status = 'FB3001') AS not_stay_count,
|
|
|
|
- (SELECT COUNT(*) FROM base_new_student WHERE delete_mark = 0 AND stduy_status = 'FB3002') AS stay_count,
|
|
|
|
|
|
+ (SELECT COUNT(*) FROM base_new_student a1
|
|
|
|
+ INNER JOIN banding_task_class_student a2 ON a1.id = a2.new_student_id
|
|
|
|
+ WHERE a1.delete_mark = 0 AND a2.delete_mark = 0 AND a2.banding_task_class_id = t1.id) AS number,
|
|
|
|
+ (SELECT COUNT(*) FROM base_new_student a1
|
|
|
|
+ INNER JOIN banding_task_class_student a2 ON a1.id = a2.new_student_id
|
|
|
|
+ WHERE a1.delete_mark = 0 AND a2.delete_mark = 0 AND a2.banding_task_class_id = t1.id AND a1.gender = 'SB10001') AS male_count,
|
|
|
|
+ (SELECT COUNT(*) FROM base_new_student a1
|
|
|
|
+ INNER JOIN banding_task_class_student a2 ON a1.id = a2.new_student_id
|
|
|
|
+ WHERE a1.delete_mark = 0 AND a2.delete_mark = 0 AND a2.banding_task_class_id = t1.id AND a1.gender = 'SB10002') AS female_count,
|
|
|
|
+ (SELECT COUNT(*) FROM base_new_student a1
|
|
|
|
+ INNER JOIN banding_task_class_student a2 ON a1.id = a2.new_student_id
|
|
|
|
+ WHERE a1.delete_mark = 0 AND a2.delete_mark = 0 AND a2.banding_task_class_id = t1.id AND a1.stduy_status = 'FB3001') AS not_stay_count,
|
|
|
|
+ (SELECT COUNT(*) FROM base_new_student a1
|
|
|
|
+ INNER JOIN banding_task_class_student a2 ON a1.id = a2.new_student_id
|
|
|
|
+ WHERE a1.delete_mark = 0 AND a2.delete_mark = 0 AND a2.banding_task_class_id = t1.id AND a1.stduy_status = 'FB3002') AS stay_count,
|
|
t3.name AS teacher_name FROM banding_task_class t1
|
|
t3.name AS teacher_name FROM banding_task_class t1
|
|
LEFT JOIN base_major_set t2 ON t1.major_set_id = t2.id
|
|
LEFT JOIN base_major_set t2 ON t1.major_set_id = t2.id
|
|
LEFT JOIN xjr_user t3 ON t1.teacher_id = t3.id
|
|
LEFT JOIN xjr_user t3 ON t1.teacher_id = t3.id
|
|
@@ -63,7 +73,7 @@
|
|
AND t1.name like concat('%', #{dto.name}, '%')
|
|
AND t1.name like concat('%', #{dto.name}, '%')
|
|
</if>
|
|
</if>
|
|
<if test="dto.graduateSchool != null and dto.graduateSchool != ''">
|
|
<if test="dto.graduateSchool != null and dto.graduateSchool != ''">
|
|
- AND t1.graduate_school = #{dto.graduateSchool}
|
|
|
|
|
|
+ AND t1.graduate_school like concat('%', #{dto.graduateSchool}, '%')
|
|
</if>
|
|
</if>
|
|
<if test="dto.graduateClass != null and dto.graduateClass != ''">
|
|
<if test="dto.graduateClass != null and dto.graduateClass != ''">
|
|
AND t1.graduate_class like concat('%', #{dto.graduateClass}, '%')
|
|
AND t1.graduate_class like concat('%', #{dto.graduateClass}, '%')
|