|
@@ -6,7 +6,7 @@
|
|
<select id="getPage" parameterType="com.xjrsoft.module.student.dto.BaseNewStudentPageDto" resultType="com.xjrsoft.module.student.vo.BaseNewStudentPageVo">
|
|
<select id="getPage" parameterType="com.xjrsoft.module.student.dto.BaseNewStudentPageDto" resultType="com.xjrsoft.module.student.vo.BaseNewStudentPageVo">
|
|
SELECT t1.id,t1.graduate_school,t1.name,t1.gender,t2.name AS gender_cn,t1.credential_number,t1.height,t1.weight,
|
|
SELECT t1.id,t1.graduate_school,t1.name,t1.gender,t2.name AS gender_cn,t1.credential_number,t1.height,t1.weight,
|
|
t1.score,t1.graduate_class,t1.source,t5.name as source_cn,t1.stduy_status,t3.name AS stduy_status_cn,t1.mobile,t7.name as first_ambition,
|
|
t1.score,t1.graduate_class,t1.source,t5.name as source_cn,t1.stduy_status,t3.name AS stduy_status_cn,t1.mobile,t7.name as first_ambition,
|
|
- t8.name as second_ambition,t1.is_adjust,t1.status,t11.name AS class_name,t12.name AS teacher_name FROM base_new_student t1
|
|
|
|
|
|
+ t8.name as second_ambition,t1.is_adjust,t1.status,ifnull(t11.name,t1.delete_reason) AS class_name,t12.name AS teacher_name FROM base_new_student t1
|
|
LEFT JOIN xjr_dictionary_detail t2 ON t1.gender = t2.code AND t2.item_id = 2023000000000000004
|
|
LEFT JOIN xjr_dictionary_detail t2 ON t1.gender = t2.code AND t2.item_id = 2023000000000000004
|
|
LEFT JOIN xjr_dictionary_detail t3 ON t1.stduy_status = t3.code AND t3.item_id = 2023000000000000030
|
|
LEFT JOIN xjr_dictionary_detail t3 ON t1.stduy_status = t3.code AND t3.item_id = 2023000000000000030
|
|
LEFT JOIN xjr_dictionary_detail t5 ON t1.source = t5.code AND t5.item_id = 2023000000000000028
|
|
LEFT JOIN xjr_dictionary_detail t5 ON t1.source = t5.code AND t5.item_id = 2023000000000000028
|
|
@@ -74,6 +74,78 @@
|
|
</if>
|
|
</if>
|
|
</if>
|
|
</if>
|
|
</select>
|
|
</select>
|
|
|
|
+ <select id="getReportPage" parameterType="com.xjrsoft.module.student.dto.BaseNewStudentPageDto" resultType="com.xjrsoft.module.student.vo.BaseNewStudentPageVo">
|
|
|
|
+ SELECT t1.id,t1.graduate_school,t1.name,t1.gender,t2.name AS gender_cn,t1.credential_number,t1.height,t1.weight,
|
|
|
|
+ t1.score,t1.graduate_class,t1.source,t5.name as source_cn,t1.stduy_status,t3.name AS stduy_status_cn,t1.mobile,t7.name as first_ambition,
|
|
|
|
+ t8.name as second_ambition,t1.is_adjust,t1.status,ifnull(t11.name,t1.delete_reason) AS class_name,t12.name AS teacher_name ,t13.report_time,t9.id as user_id FROM base_new_student t1
|
|
|
|
+ LEFT JOIN xjr_dictionary_detail t2 ON t1.gender = t2.code AND t2.item_id = 2023000000000000004
|
|
|
|
+ LEFT JOIN xjr_dictionary_detail t3 ON t1.stduy_status = t3.code AND t3.item_id = 2023000000000000030
|
|
|
|
+ LEFT JOIN xjr_dictionary_detail t5 ON t1.source = t5.code AND t5.item_id = 2023000000000000028
|
|
|
|
+ LEFT JOIN enrollment_plan t4 ON t1.enrollment_plan_id = t4.id
|
|
|
|
+ LEFT JOIN base_major_set t7 ON t1.first_ambition = t7.id
|
|
|
|
+ LEFT JOIN base_major_set t8 ON t1.second_ambition = t8.id
|
|
|
|
+ LEFT JOIN xjr_user t9 ON t1.credential_number = t9.credential_number AND t9.delete_mark = 0
|
|
|
|
+ LEFT JOIN base_student_school_roll t10 ON t9.id = t10.user_id AND t10.delete_mark = 0
|
|
|
|
+ LEFT JOIN base_class t11 ON t10.class_id = t11.id
|
|
|
|
+ LEFT JOIN xjr_user t12 ON t11.teacher_id = t12.id
|
|
|
|
+ LEFT JOIN student_report_record t13 ON t9.id = t13.user_id
|
|
|
|
+ WHERE t1.delete_mark = 0
|
|
|
|
+ <if test="dto.name != null and dto.name != ''">
|
|
|
|
+ and t1.name like concat('%', #{dto.name}, '%')
|
|
|
|
+ </if>
|
|
|
|
+ <if test="dto.credentialNumber != null and dto.credentialNumber != ''">
|
|
|
|
+ and t1.credential_number like concat('%', #{dto.credentialNumber}, '%')
|
|
|
|
+ </if>
|
|
|
|
+ <if test="dto.graduateSchool != null and dto.graduateSchool != ''">
|
|
|
|
+ and t1.graduate_school like concat('%', #{dto.graduateSchool}, '%')
|
|
|
|
+ </if>
|
|
|
|
+ <if test="dto.isImportScore != null">
|
|
|
|
+ <if test="dto.isImportScore == 1">
|
|
|
|
+ and t1.score is not null
|
|
|
|
+ </if>
|
|
|
|
+ <if test="dto.isImportScore == 0">
|
|
|
|
+ and t1.score is null
|
|
|
|
+ </if>
|
|
|
|
+ </if>
|
|
|
|
+ <if test="dto.firstAmbition != null and dto.firstAmbition != ''">
|
|
|
|
+ and t1.first_ambition = #{dto.firstAmbition}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="dto.secondAmbition != null and dto.secondAmbition != ''">
|
|
|
|
+ and t1.second_ambition = #{dto.secondAmbition}
|
|
|
|
+ </if>
|
|
|
|
+
|
|
|
|
+ <if test="dto.startDate != null and dto.endDate != null">
|
|
|
|
+ AND t1.create_date between #{dto.startDate} and #{dto.endDate}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="dto.gender != null and dto.gender != ''">
|
|
|
|
+ AND t1.gender = #{dto.gender}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="dto.status != null">
|
|
|
|
+ AND t1.status = #{dto.status}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="dto.isAdjust != null">
|
|
|
|
+ AND t1.is_adjust = #{dto.isAdjust}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="dto.enrollmentPlanId != null">
|
|
|
|
+ AND t1.enrollment_plan_id = #{dto.enrollmentPlanId}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="dto.treeId != null and dto.treeType != null">
|
|
|
|
+ <if test="dto.treeType == 1">
|
|
|
|
+ AND t4.grade_id = #{dto.treeId}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="dto.treeType == 2">
|
|
|
|
+ AND t4.enroll_type = #{dto.treeId}
|
|
|
|
+ </if>
|
|
|
|
+ </if>
|
|
|
|
+ <if test="dto.field != null and dto.field != '' and dto.field == 'score'">
|
|
|
|
+ <if test="dto.order == 'descend'">
|
|
|
|
+ order by t1.score desc
|
|
|
|
+ </if>
|
|
|
|
+ <if test="dto.order == 'ascend'">
|
|
|
|
+ order by t1.score asc
|
|
|
|
+ </if>
|
|
|
|
+ </if>
|
|
|
|
+ </select>
|
|
<select id="getEnrollmentPlanList" resultType="com.xjrsoft.module.student.vo.EnrollmentPlanTreeVo">
|
|
<select id="getEnrollmentPlanList" resultType="com.xjrsoft.module.student.vo.EnrollmentPlanTreeVo">
|
|
SELECT t1.enroll_type, t2.name AS enroll_type_cn,t3.name AS grade_name, t3.id as grade_id,t1.id FROM enrollment_plan t1
|
|
SELECT t1.enroll_type, t2.name AS enroll_type_cn,t3.name AS grade_name, t3.id as grade_id,t1.id FROM enrollment_plan t1
|
|
LEFT JOIN xjr_dictionary_detail t2 ON t1.enroll_type = t2.code AND t2.item_id = 2023000000000000027
|
|
LEFT JOIN xjr_dictionary_detail t2 ON t1.enroll_type = t2.code AND t2.item_id = 2023000000000000027
|