|
|
@@ -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);
|
|
|
});
|