Browse Source

分班调整

dzx 9 tháng trước cách đây
mục cha
commit
72e3bf50e0

+ 5 - 4
src/main/resources/mapper/student/BaseNewStudentMapper.xml

@@ -273,14 +273,14 @@
     <select id="getFirstAmbitionStudentCount" resultType="com.xjrsoft.module.outint.vo.IdCountVo">
         SELECT t1.first_ambition_id,COUNT(t1.id) FROM base_new_student t1
         INNER JOIN enrollment_plan t2 ON t1.enrollment_plan_id = t2.id
-        WHERE t1.delete_mark = 0 AND t2.grade_id = #{gradeId} AND t2.enroll_type = #{enrollType}
+        WHERE t1.delete_mark = 0 AND t2.grade_id = #{gradeId} AND t2.enroll_type = #{enrollType} and t1.is_can_banding = 1
         GROUP BY t1.first_ambition_id
     </select>
 
     <select id="getSecondAmbitionStudentCount" resultType="com.xjrsoft.module.outint.vo.IdCountVo">
         SELECT t1.second_ambition_id,COUNT(t1.id) FROM base_new_student t1
         INNER JOIN enrollment_plan t2 ON t1.enrollment_plan_id = t2.id
-        WHERE t1.delete_mark = 0 AND t2.grade_id = #{gradeId} AND t2.enroll_type = #{enrollType}
+        WHERE t1.delete_mark = 0 AND t2.grade_id = #{gradeId} AND t2.enroll_type = #{enrollType} and t1.is_can_banding = 1
         GROUP BY t1.second_ambition_id
     </select>
     <select id="getMajorStudentCount" resultType="com.xjrsoft.module.banding.vo.IdManyCountVo">
@@ -288,16 +288,17 @@
         SELECT COUNT(id) FROM base_new_student WHERE delete_mark = 0
         AND (first_ambition_id = t1.id OR second_ambition_id = t1.id)
         AND score >= IFNULL(t2.score,0) AND height >= IFNULL(t2.height,0)
+        and is_can_banding = 1
         ) AS count,(
         SELECT COUNT(id) FROM base_new_student WHERE delete_mark = 0
         AND (first_ambition_id = t1.id OR second_ambition_id = t1.id)
         AND score >= IFNULL(t2.score,0) AND height >= IFNULL(t2.height,0)
-        AND gender = 'SB10001'
+        AND gender = 'SB10001' and is_can_banding = 1
         ) AS male_count,(
         SELECT COUNT(id) FROM base_new_student WHERE delete_mark = 0
         AND (first_ambition_id = t1.id OR second_ambition_id = t1.id)
         AND score >= IFNULL(t2.score,0) AND height >= IFNULL(t2.height,0)
-        AND gender = 'SB10002'
+        AND gender = 'SB10002' and is_can_banding = 1
         ) AS female_count FROM base_major_set t1
         LEFT JOIN banding_task_major_condition t2 ON t1.id = t2.major_set_id AND t2.banding_task_id = #{id}
         AND t2.delete_mark = 0