|
|
@@ -23,43 +23,59 @@
|
|
|
t2.birth_date,
|
|
|
t2.avatar,
|
|
|
t6.name AS nation,
|
|
|
- t10.name AS major_set_name,
|
|
|
+-- t10.name AS major_set_name,
|
|
|
t3.archives_status AS archives_status,
|
|
|
t3.stduy_status AS stduy_status,
|
|
|
t3.roll_modality AS roll_modality,
|
|
|
t3.archives_status AS archivesStatusCode,
|
|
|
t3.stduy_status AS stduyStatusCode,
|
|
|
- t3.roll_modality AS rollModalityCode
|
|
|
+ t3.roll_modality AS rollModalityCode,
|
|
|
+ t11.name AS student_form,
|
|
|
+ CASE
|
|
|
+ WHEN t10.feeitemcode LIKE '999010604%' THEN t10.jfzt
|
|
|
+ ELSE NULL
|
|
|
+ END AS jxf,
|
|
|
+ CASE
|
|
|
+ WHEN t10.feeitemcode LIKE '103042766003001%' THEN t10.jfzt
|
|
|
+ ELSE NULL
|
|
|
+ END AS ssf,
|
|
|
+ CASE
|
|
|
+ WHEN t10.feeitemcode LIKE '999010603%' THEN t10.jfzt
|
|
|
+ ELSE NULL
|
|
|
+ END AS jcf
|
|
|
FROM base_student t1
|
|
|
- INNER JOIN xjr_user t2 ON t1.user_id = t2.id
|
|
|
- INNER JOIN base_student_school_roll t3 ON t1.user_id = t3.user_id
|
|
|
- LEFT JOIN base_class t4 ON t3.class_id = t4.id
|
|
|
- LEFT JOIN xjr_user t5 ON t4.teacher_id = t5.id
|
|
|
- LEFT JOIN base_student_family_member t6 ON t6.user_id = t2.id AND t6.delete_mark = 0 AND t6.is_guardian = 1
|
|
|
- Left JOIN xjr_dictionary_detail t7 ON t7.code = t2.gender
|
|
|
- Left JOIN xjr_dictionary_detail t8 ON t8.code = t3.stduy_status
|
|
|
+ INNER JOIN xjr_user t2 ON t1.user_id = t2.id
|
|
|
+ INNER JOIN base_student_school_roll t3 ON t1.user_id = t3.user_id
|
|
|
+ LEFT JOIN base_class t4 ON t3.class_id = t4.id
|
|
|
+ LEFT JOIN xjr_user t5 ON t4.teacher_id = t5.id
|
|
|
+ LEFT JOIN base_student_family_member t6 ON t6.user_id = t2.id AND t6.delete_mark = 0 AND t6.is_guardian = 1
|
|
|
+ LEFT JOIN xjr_dictionary_detail t7 ON t7.code = t2.gender
|
|
|
+ LEFT JOIN xjr_dictionary_detail t8 ON t8.code = t3.stduy_status
|
|
|
+ LEFT JOIN xjr_dictionary_detail t11 ON t11.code = t3.student_type
|
|
|
+ LEFT JOIN pb_v_xssfdetail t9 ON t9.personalid = t1.student_id
|
|
|
+ LEFT JOIN pb_v_xsxxsfytb t10 ON t10.feeitemcode = t9.feeitemcode
|
|
|
WHERE t2.delete_mark = 0
|
|
|
- AND t1.delete_mark = 0
|
|
|
- AND t3.archives_status = 'FB2901'
|
|
|
+ AND t1.delete_mark = 0
|
|
|
+ AND t3.archives_status = 'FB2901'
|
|
|
<if test="dto.gradeId != null">
|
|
|
- and t4.grade_id = #{dto.gradeId}
|
|
|
+ AND t4.grade_id = #{dto.gradeId}
|
|
|
</if>
|
|
|
<if test="dto.majorSetId != null">
|
|
|
- and t3.major_set_id = #{dto.majorSetId}
|
|
|
+ AND t3.major_set_id = #{dto.majorSetId}
|
|
|
</if>
|
|
|
<if test="dto.classId != null">
|
|
|
- and t4.id = #{dto.classId}
|
|
|
+ AND t4.id = #{dto.classId}
|
|
|
</if>
|
|
|
<if test="dto.teacherId != null">
|
|
|
- and t4.teacher_id = #{dto.teacherId}
|
|
|
+ AND t4.teacher_id = #{dto.teacherId}
|
|
|
</if>
|
|
|
<if test="dto.keyWord != null and dto.keyWord != ''">
|
|
|
- and (t4.name like concat('%', #{dto.keyWord}, '%')
|
|
|
- or t2.name like concat('%', #{dto.keyWord}, '%')
|
|
|
- or t5.name like concat('%', #{dto.keyWord}, '%')
|
|
|
- or t1.student_id like concat('%', #{dto.keyWord}, '%')
|
|
|
- or t2.mobile like concat('%', #{dto.keyWord}, '%')
|
|
|
- or t6.mobile LIKE concat('%', #{dto.keyWord}, '%')
|
|
|
+ AND (t4.name LIKE concat('%', #{dto.keyWord}, '%')
|
|
|
+ OR t2.name LIKE concat('%', #{dto.keyWord}, '%')
|
|
|
+ OR t5.name LIKE concat('%', #{dto.keyWord}, '%')
|
|
|
+ OR t1.student_id LIKE concat('%', #{dto.keyWord}, '%')
|
|
|
+ OR t2.mobile LIKE concat('%', #{dto.keyWord}, '%')
|
|
|
+ OR t6.mobile LIKE concat('%', #{dto.keyWord}, '%')
|
|
|
)
|
|
|
</if>
|
|
|
</select>
|