浏览代码

解决床位管理查询条件不生效的问题

dzx 1 年之前
父节点
当前提交
4e48e48e90

+ 3 - 0
src/main/java/com/xjrsoft/module/room/dto/RoomBedPageDto.java

@@ -40,4 +40,7 @@ public class RoomBedPageDto extends PageInput {
 
     @ApiModelProperty("学号")
     public String studentId;
+
+    @ApiModelProperty("入住身份")
+    public String identity;
 }

+ 4 - 0
src/main/resources/mapper/room/RoomBedMapper.xml

@@ -14,6 +14,7 @@
         LEFT JOIN base_grade t7 ON t6.grade_id = t7.id
         LEFT JOIN base_class t8 ON t6.class_id = t8.id
         LEFT JOIN xjr_dictionary_detail t9 ON t2.gender = t9.code AND t9.item_id = 2023000000000000004
+        where t1.delete_mark = 0 and t2.delete_mark = 0
         <if test="dto.officeBuildId != null">
             and t2.office_build_id = #{dto.officeBuildId}
         </if>
@@ -38,6 +39,9 @@
         <if test="dto.studentId != null">
             and t5.student_id like concat('%',#{dto.studentId},'%')
         </if>
+        <if test="dto.identity != null and dto.identity != ''">
+            and t5.check_in_status like concat('%',#{dto.identity},'%')
+        </if>
         ORDER BY t1.sort_code
     </select>
     <select id="getMaxSortCode" resultType="java.lang.Integer">