|
@@ -5,8 +5,14 @@
|
|
|
<mapper namespace="com.xjrsoft.module.banding.mapper.BandingTaskClassMapper">
|
|
|
<select id="getList" parameterType="com.xjrsoft.module.banding.dto.BandingTaskClassPageDto" resultType="com.xjrsoft.module.banding.vo.BandingTaskClassPageVo">
|
|
|
SELECT t1.id, t1.major_set_id,t2.name AS major_set_name, t1.name, t1.number,t1.sort_code,t1.is_order_class,
|
|
|
- (SELECT COUNT(*) FROM base_new_student WHERE delete_mark = 0 AND first_ambition_id = t1.major_set_id) AS first_ambition_count,
|
|
|
- (SELECT COUNT(*) FROM base_new_student WHERE delete_mark = 0 AND second_ambition_id = t1.major_set_id) AS second_ambition_count,
|
|
|
+ (SELECT COUNT(*) FROM base_new_student a1
|
|
|
+ INNER JOIN enrollment_plan a2 ON a1.enrollment_plan_id = a2.id
|
|
|
+ WHERE a1.delete_mark = 0 AND a1.first_ambition_id = t1.major_set_id
|
|
|
+ AND a2.enroll_type = #{enrollType} AND a2.grade_id =#{gradeId} ) AS first_ambition_count,
|
|
|
+ (SELECT COUNT(*) FROM base_new_student a1
|
|
|
+ INNER JOIN enrollment_plan a2 ON a1.enrollment_plan_id = a2.id
|
|
|
+ WHERE a1.delete_mark = 0 AND a1.second_ambition_id = t1.major_set_id
|
|
|
+ AND a2.enroll_type = #{enrollType} AND a2.grade_id =#{gradeId} ) AS second_ambition_count,
|
|
|
t5.height, t5.score, (
|
|
|
SELECT count(a1.id) FROM base_new_student a1
|
|
|
INNER JOIN banding_task_class_student t5 ON a1.id = t5.new_student_id
|