ソースを参照

房间状态更改

qh 2 年 前
コミット
cd615f6f67

+ 6 - 6
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/business/service/impl/BusRoomBookingOrdersServiceImpl.java

@@ -826,7 +826,11 @@ public class BusRoomBookingOrdersServiceImpl extends ServiceImpl<BusRoomBookingO
         livingOrder.setLivingOrderNo("D"+sdf.format(System.currentTimeMillis()));
         livingOrder.setArrivalTime(new Date());// todo 这个地方的入住开始时间应该怎么算
         roomsLivingOrderService.save(livingOrder);
-
+        CesRooms room = roomsService.getById(bkRoom.getRoomId());
+        if(room==null) throw new JeecgBootException("房间不存在");
+        room.setLivingOrderId(livingOrder.getId());
+        room.setRoomStatus(RoomStatusEnum.LIVE_CLEAR.getKey());
+        roomsService.updateById(room);
         bkRoom.setRoomStatus(RoomStatusEnum.LIVE_DIRTY.getKey());
         bookingRoomsService.updateById(bkRoom);
         //</editor-fold>
@@ -949,11 +953,7 @@ public class BusRoomBookingOrdersServiceImpl extends ServiceImpl<BusRoomBookingO
             List<BusLivingCustomer> customers = livingData.getRoomIds().stream().filter(s->s.getRoomId().equals(bkRoom.getRoomId())).findFirst().get().getLivingCustomers();
             if(customers == null || customers.size() == 0) throw new JeecgBootException("请添加客户信息");
             String livingOrderId = bookingToLive(bkRoom.getId(), customers);
-            CesRooms room = roomsService.getById(bkRoom.getRoomId());
-            if(room==null) throw new JeecgBootException("房间不存在");
-            room.setLivingOrderId(livingOrderId);
-            room.setRoomStatus(RoomStatusEnum.LIVE_CLEAR.getKey());
-            roomsService.updateById(room);
+
 
             results.put(bkRoom.getRoomId(),livingOrderId);
         });

+ 2 - 2
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/rooms/controller/CesRoomsController.java

@@ -147,7 +147,7 @@ public class CesRoomsController {
             String colorStr="";
             switch (s.getValue()) {
                 case "1":
-                    colorStr = "#CDCDCD";
+                    colorStr = "#08F0CC";
                     break;
                 case "2":
                     colorStr = "#0A0A0A";
@@ -162,7 +162,7 @@ public class CesRoomsController {
                     colorStr = "#defabc";
                     break;
                 case "6":
-                    colorStr = "#08F0CC";
+                    colorStr = "#CDCDCD";
                     break;
                 default: colorStr = "#CCCCCC";