فهرست منبع

分配床位功能寝室列表增加查询条件

dzx 1 سال پیش
والد
کامیت
20384213b1

+ 5 - 12
src/main/java/com/xjrsoft/module/room/dto/DistributeRoomBedPageDto.java

@@ -22,22 +22,15 @@ public class DistributeRoomBedPageDto extends PageInput {
     @ApiModelProperty("楼层")
     public Integer floorNumber;
 
-
-    @ApiModelProperty("寝室id")
-    public Long roomId;
+    @ApiModelProperty("寝室号")
+    public String roomName;
 
     @ApiModelProperty("入住性别")
     public String gender;
 
-    @ApiModelProperty("寝室id")
-    public Long gradeId;
-
-    @ApiModelProperty("年级id")
+    @ApiModelProperty("班级id")
     public Long classId;
 
-    @ApiModelProperty("寝室id")
-    public String studentName;
-
-    @ApiModelProperty("学号")
-    public String studentId;
+    @ApiModelProperty("入住身份")
+    public String checkInStatus;
 }

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

@@ -129,6 +129,18 @@
         <if test="dto.gender != null and dto.gender != ''">
             and t1.gender = #{dto.gender}
         </if>
+        <if test="dto.officeBuildId != null">
+            and t2.id = #{dto.officeBuildId}
+        </if>
+        <if test="dto.floorNumber != null">
+            and t1.floor_number = #{dto.floorNumber}
+        </if>
+        <if test="dto.checkInStatus != null and dto.checkInStatus !=''">
+            and t1.check_in_status = #{dto.checkInStatus}
+        </if>
+        <if test="dto.roomName != null and dto.roomName !=''">
+            and t1.room_name like concat('%',#{dto.roomName},'%')
+        </if>
         ORDER BY t1.sort_code
     </select>