|
@@ -38,11 +38,14 @@
|
|
|
bes.major_name majorName
|
|
|
FROM
|
|
|
(select * from t_r_exam_student where student_code not in ('目标分','平均分','各课程目标平均分')) res
|
|
|
- LEFT JOIN
|
|
|
- t_r_basic_info rbi ON res.r_basic_info_id = rbi.id
|
|
|
+ LEFT JOIN t_r_basic_info rbi ON res.r_basic_info_id = rbi.id
|
|
|
left join basic_exam_student bes on rbi.exam_id = bes.exam_id and rbi.paper_number = bes.paper_number and res.student_code = bes.student_code
|
|
|
left join basic_course bc on rbi.course_id = bc.id
|
|
|
- where rbi.culture_program_id = #{cultureProgramId}
|
|
|
+ <where>
|
|
|
+ bes.school_id = #{schoolId}
|
|
|
+ <if test="cultureProgramId != null and cultureProgramId != ''">
|
|
|
+ and rbi.culture_program_id = #{cultureProgramId}
|
|
|
+ </if>
|
|
|
<if test="studentCodeOrName != null and studentCodeOrName != ''">
|
|
|
AND (res.name LIKE CONCAT('%', #{studentCodeOrName}, '%')
|
|
|
OR res.student_code LIKE CONCAT('%', #{studentCodeOrName}, '%'))
|
|
@@ -61,5 +64,8 @@
|
|
|
</foreach>
|
|
|
</if>
|
|
|
</if>
|
|
|
+ and rbi.culture_program_id is not null
|
|
|
+ </where>
|
|
|
+ order by res.student_code desc
|
|
|
</select>
|
|
|
</mapper>
|