Commit d011f37f by xuwenhao

修改分班规则

parent a547e428
...@@ -54,7 +54,7 @@ public class CurriculaStudentServiceImpl extends ServiceImpl<CurriculaStudentMap ...@@ -54,7 +54,7 @@ public class CurriculaStudentServiceImpl extends ServiceImpl<CurriculaStudentMap
//查询学生成绩 //查询学生成绩
LambdaQueryWrapper<SchoolStudentScore> wrapper = new LambdaQueryWrapper<>(); LambdaQueryWrapper<SchoolStudentScore> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(SchoolStudentScore::getStudentId,curriculaStudentVo1.getStudentId()) wrapper.eq(SchoolStudentScore::getStudentId,curriculaStudentVo1.getStudentId())
.like(SchoolStudentScore::getExamType,"1,2,3") .in(SchoolStudentScore::getExamType,1,2,3)
.orderByDesc(SchoolStudentScore::getExamType).last("LIMIT 1"); .orderByDesc(SchoolStudentScore::getExamType).last("LIMIT 1");
SchoolStudentScore schoolStudentScore = studentScoreMapper.selectOne(wrapper); SchoolStudentScore schoolStudentScore = studentScoreMapper.selectOne(wrapper);
if (StringUtils.isNotNull(schoolStudentScore)){ if (StringUtils.isNotNull(schoolStudentScore)){
......
...@@ -54,6 +54,7 @@ ...@@ -54,6 +54,7 @@
<if test="courseType != null and courseType != ''">and xk.course_type = #{courseType}</if> <if test="courseType != null and courseType != ''">and xk.course_type = #{courseType}</if>
<if test="curriculaState != null and curriculaState != ''">and xk.curricula_state = #{curriculaState}</if> <if test="curriculaState != null and curriculaState != ''">and xk.curricula_state = #{curriculaState}</if>
<if test="studentName != null and studentName != ''">and xs.student_name like concat('%', #{studentName}, '%')</if> <if test="studentName != null and studentName != ''">and xs.student_name like concat('%', #{studentName}, '%')</if>
group by xk.id,xk.student_id,xk.curricula_id,bj.class_name,xs.student_name,xs.id_card,xs.school_no,xk.course_type,xk.curricula_time,xk.curricula_state,xk.selected_course,xk.selected_major,xk.selected_subject,dc.division_classes_name
</select> </select>
<!--春季选课情况列表--> <!--春季选课情况列表-->
...@@ -84,6 +85,7 @@ ...@@ -84,6 +85,7 @@
<if test="classId != null">and xs.class_id = #{classId}</if> <if test="classId != null">and xs.class_id = #{classId}</if>
<if test="selectedMajor != null and selectedMajor != ''">and xk.selected_major like concat('%', #{selectedMajor}, '%')</if> <if test="selectedMajor != null and selectedMajor != ''">and xk.selected_major like concat('%', #{selectedMajor}, '%')</if>
<if test="studentName != null and studentName != ''">and xs.student_name like concat('%', #{studentName}, '%')</if> <if test="studentName != null and studentName != ''">and xs.student_name like concat('%', #{studentName}, '%')</if>
group by xk.id,xk.student_id,xk.curricula_id,bj.class_name,xs.student_name,xs.id_card,xs.school_no,xk.course_type,xk.curricula_time,xk.curricula_state,xk.selected_course,xk.selected_major,xk.selected_subject,dc.division_classes_name
</select> </select>
<!--夏季选课情况列表--> <!--夏季选课情况列表-->
...@@ -114,6 +116,7 @@ ...@@ -114,6 +116,7 @@
<if test="classId != null">and xs.class_id = #{classId}</if> <if test="classId != null">and xs.class_id = #{classId}</if>
<if test="selectedCourse != null and selectedCourse != ''">and xk.selected_course = #{selectedCourse}</if> <if test="selectedCourse != null and selectedCourse != ''">and xk.selected_course = #{selectedCourse}</if>
<if test="studentName != null and studentName != ''">and xs.student_name like concat('%', #{studentName}, '%')</if> <if test="studentName != null and studentName != ''">and xs.student_name like concat('%', #{studentName}, '%')</if>
group by xk.id,xk.student_id,xk.curricula_id,bj.class_name,xs.student_name,xs.id_card,xs.school_no,xk.course_type,xk.curricula_time,xk.curricula_state,xk.selected_course,xk.selected_major,xk.selected_subject
ORDER BY xk.selected_course ASC ORDER BY xk.selected_course ASC
</select> </select>
...@@ -145,6 +148,7 @@ ...@@ -145,6 +148,7 @@
<if test="classId != null">and xs.class_id = #{classId}</if> <if test="classId != null">and xs.class_id = #{classId}</if>
<if test="selectedCourse != null and selectedCourse != ''">and xk.selected_course = #{selectedCourse}</if> <if test="selectedCourse != null and selectedCourse != ''">and xk.selected_course = #{selectedCourse}</if>
<if test="studentName != null and studentName != ''">and xs.student_name like concat('%', #{studentName}, '%')</if> <if test="studentName != null and studentName != ''">and xs.student_name like concat('%', #{studentName}, '%')</if>
GROUP BY xk.id,xk.student_id,xk.curricula_id,bj.class_name,xs.student_name,xs.id_card,xs.school_no,xk.course_type,xk.curricula_time,xk.curricula_state,xk.selected_course,xk.selected_major,xk.selected_subject
ORDER BY xk.selected_course ASC ORDER BY xk.selected_course ASC
</select> </select>
...@@ -176,6 +180,7 @@ ...@@ -176,6 +180,7 @@
<if test="classId != null">and xs.class_id = #{classId}</if> <if test="classId != null">and xs.class_id = #{classId}</if>
<if test="selectedSubject != null and selectedSubject != ''">and xk.selected_subject = #{selectedSubject}</if> <if test="selectedSubject != null and selectedSubject != ''">and xk.selected_subject = #{selectedSubject}</if>
<if test="studentName != null and studentName != ''">and xs.student_name like concat('%', #{studentName}, '%')</if> <if test="studentName != null and studentName != ''">and xs.student_name like concat('%', #{studentName}, '%')</if>
GROUP BY xk.id,xk.student_id,xk.curricula_id,bj.class_name,xs.student_name,xs.id_card,xs.school_no,xk.course_type,xk.curricula_time,xk.curricula_state,xk.selected_course,xk.selected_major,xk.selected_subject,dc.division_classes_name
ORDER BY xk.selected_subject ASC ORDER BY xk.selected_subject ASC
</select> </select>
...@@ -209,6 +214,7 @@ ...@@ -209,6 +214,7 @@
<if test="classId != null and classId != ''">and xs.class_id = #{classId}</if> <if test="classId != null and classId != ''">and xs.class_id = #{classId}</if>
<if test="curriculaState != null and curriculaState != ''">and xk.curricula_state = #{curriculaState}</if> <if test="curriculaState != null and curriculaState != ''">and xk.curricula_state = #{curriculaState}</if>
<if test="studentName != null and studentName != ''">and xs.student_name like concat('%', #{studentName}, '%')</if> <if test="studentName != null and studentName != ''">and xs.student_name like concat('%', #{studentName}, '%')</if>
GROUP BY xk.id,xk.student_id,xk.curricula_id,xs.class_id,bj.class_name,xs.student_name,xs.id_card,xs.school_no,xk.course_type,xk.curricula_time,xk.curricula_state,xk.selected_course,xk.selected_major,xk.selected_subject
</select> </select>
</mapper> </mapper>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment