|
@@ -1045,6 +1045,8 @@ public class BusRoomBookingOrdersServiceImpl extends ServiceImpl<BusRoomBookingO
|
|
|
Optional<BusRoomsLivingOrder> opMainRoomOrder = livingOrders.stream().filter(s->s.getBookingRoomId().equals(mainRoom.getId())).findFirst();
|
|
Optional<BusRoomsLivingOrder> opMainRoomOrder = livingOrders.stream().filter(s->s.getBookingRoomId().equals(mainRoom.getId())).findFirst();
|
|
|
if(!opMainRoomOrder.isPresent()) throw new JeecgBootException("没有找到主房订单");
|
|
if(!opMainRoomOrder.isPresent()) throw new JeecgBootException("没有找到主房订单");
|
|
|
BusRoomsLivingOrder mainRoomOrder = opMainRoomOrder.get();
|
|
BusRoomsLivingOrder mainRoomOrder = opMainRoomOrder.get();
|
|
|
|
|
+ livingOrders.forEach(s->s.setSettleType(SettleTypeEnum.SETTLE_LEAVE.getKey()));
|
|
|
|
|
+ roomsLivingOrderService.updateBatchById(livingOrders);
|
|
|
if(livingOrders.size() > 0) {
|
|
if(livingOrders.size() > 0) {
|
|
|
List<BusOrderFee> feeItems = getLivingOrderFee(bookingOrderId).stream().filter(
|
|
List<BusOrderFee> feeItems = getLivingOrderFee(bookingOrderId).stream().filter(
|
|
|
s->s.getPreferentialStatus().equals(1)// 找到未结账的
|
|
s->s.getPreferentialStatus().equals(1)// 找到未结账的
|
|
@@ -1085,7 +1087,8 @@ public class BusRoomBookingOrdersServiceImpl extends ServiceImpl<BusRoomBookingO
|
|
|
|
|
|
|
|
BusRoomsLivingOrder mainRoomOrder = livingOrder;
|
|
BusRoomsLivingOrder mainRoomOrder = livingOrder;
|
|
|
|
|
|
|
|
-
|
|
|
|
|
|
|
+ livingOrder.setSettleType(SettleTypeEnum.SETTLE_LEAVE.getKey());
|
|
|
|
|
+ roomsLivingOrderService.updateById(livingOrder);
|
|
|
List<BusOrderFee> feeItems = getLivingOrderFees(livingOrderId).stream().filter(
|
|
List<BusOrderFee> feeItems = getLivingOrderFees(livingOrderId).stream().filter(
|
|
|
s->s.getPreferentialStatus().equals(1)// 找到未结账的
|
|
s->s.getPreferentialStatus().equals(1)// 找到未结账的
|
|
|
).collect(Collectors.toList());
|
|
).collect(Collectors.toList());
|
|
@@ -1156,6 +1159,8 @@ public class BusRoomBookingOrdersServiceImpl extends ServiceImpl<BusRoomBookingO
|
|
|
s.setLivingOrderId(null);
|
|
s.setLivingOrderId(null);
|
|
|
s.setRoomStatus(RoomStatusEnum.EMPTY_DIRTY.getKey());
|
|
s.setRoomStatus(RoomStatusEnum.EMPTY_DIRTY.getKey());
|
|
|
});
|
|
});
|
|
|
|
|
+ bookingLivings.forEach(s->s.setSettleType(SettleTypeEnum.SETTLE_LEAVE.getKey()));
|
|
|
|
|
+ roomsLivingOrderService.updateBatchById(bookingLivings);
|
|
|
roomsService.updateBatchById(rooms);
|
|
roomsService.updateBatchById(rooms);
|
|
|
} else if(livingOrderId != null && !livingOrderId.isEmpty()) {
|
|
} else if(livingOrderId != null && !livingOrderId.isEmpty()) {
|
|
|
BusRoomsLivingOrder livingOrder = roomsLivingOrderService.getById(livingOrderId);
|
|
BusRoomsLivingOrder livingOrder = roomsLivingOrderService.getById(livingOrderId);
|
|
@@ -1167,6 +1172,9 @@ public class BusRoomBookingOrdersServiceImpl extends ServiceImpl<BusRoomBookingO
|
|
|
if(room == null) throw new JeecgBootException("未找到订单信息");
|
|
if(room == null) throw new JeecgBootException("未找到订单信息");
|
|
|
room.setLivingOrderId(null);
|
|
room.setLivingOrderId(null);
|
|
|
room.setRoomStatus(RoomStatusEnum.EMPTY_DIRTY.getKey());
|
|
room.setRoomStatus(RoomStatusEnum.EMPTY_DIRTY.getKey());
|
|
|
|
|
+
|
|
|
|
|
+ livingOrder.setSettleType(SettleTypeEnum.SETTLE_LEAVE.getKey());
|
|
|
|
|
+ roomsLivingOrderService.updateById(livingOrder);
|
|
|
roomsService.updateById(room);
|
|
roomsService.updateById(room);
|
|
|
} else throw new JeecgBootException("参数错误");
|
|
} else throw new JeecgBootException("参数错误");
|
|
|
return true;
|
|
return true;
|