|
|
@@ -134,7 +134,7 @@
|
|
|
ORDER BY t2.sort_code,t1.sort_code
|
|
|
</select>
|
|
|
|
|
|
- <select id="getClassStudetBed" resultType="com.xjrsoft.module.room.vo.AdjustBedClassPageVo">
|
|
|
+ <select id="getClassStudetBed" parameterType="com.xjrsoft.module.room.dto.AdjustClassPageDto" resultType="com.xjrsoft.module.room.vo.AdjustBedClassPageVo">
|
|
|
SELECT t1.user_id,t4.id AS class_id, t4.name AS class_name,t2.name AS student_name,REPLACE(REPLACE(t2.gender,1,'男'),2,'女') AS gender_cn,t7.name AS build_name,t6.room_name,t5.bed_number FROM base_student t1
|
|
|
LEFT JOIN xjr_user t2 ON t1.user_id = t2.id
|
|
|
LEFT JOIN base_student_school_roll t3 ON t1.user_id = t3.user_id
|
|
|
@@ -143,6 +143,29 @@
|
|
|
LEFT JOIN room t6 ON t5.room_id = t6.id
|
|
|
LEFT JOIN base_office_build t7 ON t6.office_build_id = t7.id
|
|
|
WHERE t1.delete_mark = 0 AND t2.delete_mark = 0
|
|
|
+ <if test="dto.gradeId != null">
|
|
|
+ and t4.grade_id = #{dto.gradeId}
|
|
|
+ </if>
|
|
|
+ <if test="dto.classId != null">
|
|
|
+ and t4.class_id = #{dto.classId}
|
|
|
+ </if>
|
|
|
+ <if test="dto.gender != null and dto.gender != ''">
|
|
|
+ and t6.gender = #{dto.gender}
|
|
|
+ </if>
|
|
|
+ <if test="dto.gender != null and dto.gender != ''">
|
|
|
+ and t6.gender = #{dto.gender}
|
|
|
+ </if>
|
|
|
+ <if test="dto.isDistribute != null">
|
|
|
+ <if test="dto.isDistribute == 1">
|
|
|
+ and t5.student_user_id is not null
|
|
|
+ </if>
|
|
|
+ <if test="dto.isDistribute == 0">
|
|
|
+ and t5.student_user_id is null
|
|
|
+ </if>
|
|
|
+ </if>
|
|
|
+ <if test="dto.studentName != null and dto.studentName != ''">
|
|
|
+ and t2.name like concat('%', #{dto.studentName}, '%')
|
|
|
+ </if>
|
|
|
</select>
|
|
|
|
|
|
<select id="getBedStudentInfo" parameterType="com.xjrsoft.module.room.dto.AdjustBedPageDto" resultType="com.xjrsoft.module.room.vo.AdjustBedStudentPageVo">
|
|
|
@@ -153,6 +176,9 @@
|
|
|
LEFT JOIN xjr_dictionary_detail t5 ON t2.gender = t5.code AND t5.item_id = 2023000000000000004
|
|
|
LEFT JOIN room_student_appoint t6 ON t6.room_bed_id = t1.id
|
|
|
WHERE t1.delete_mark = 0 AND t2.delete_mark = 0
|
|
|
+ <if test="dto.isEmptyRoom != null">
|
|
|
+ and t2.name like concat('%', #{dto.studentName}, '%')
|
|
|
+ </if>
|
|
|
ORDER BY t2.sort_code,t1.sort_code
|
|
|
</select>
|
|
|
|