|
|
@@ -665,7 +665,10 @@ public class BusRoomBookingOrdersServiceImpl extends ServiceImpl<BusRoomBookingO
|
|
|
|
|
|
// BusBookingBatch batchItem = copyBatchToBase(c);
|
|
|
// BusBookingBatch batchItem = copyBatchToBase(c);
|
|
|
- bookingBatchService.save(c);
|
|
|
+ if(item.getOrderInfo().getId() != null && !item.getOrderInfo().getId().isEmpty()) {
|
|
|
+ bookingBatchService.updateById(c);
|
|
|
+ }
|
|
|
+ else bookingBatchService.save(c);
|
|
|
List<BusBookingRooms> batchBookingRooms = new ArrayList<>();
|
|
|
long mainCount = item.getRoomIds().stream().filter(t->t.getIsMain()!=null&&t.getIsMain()).count();
|
|
|
item.getRoomIds().forEach(s-> {
|
|
|
@@ -713,6 +716,24 @@ public class BusRoomBookingOrdersServiceImpl extends ServiceImpl<BusRoomBookingO
|
|
|
return c.getBatchNo();
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 设置批次预定状态
|
|
|
+ * @param batchOrder
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @Override
|
|
|
+ public Boolean setBatchOrderStatus(BusBookingBatch batchOrder) {
|
|
|
+ if(batchOrder == null || batchOrder.getId() == null || batchOrder.getId().isEmpty()
|
|
|
+ || BookingStatusTypeEnum.val(batchOrder.getBookingStatus()) == null
|
|
|
+ )
|
|
|
+ throw new JeecgBootException("参数错误");
|
|
|
+ BusBookingBatch queryBatchOrder = bookingBatchService.getById(batchOrder.getId());
|
|
|
+ if(queryBatchOrder == null) throw new JeecgBootException("订单批次不存在");
|
|
|
+ queryBatchOrder.setBookingStatus(batchOrder.getBookingStatus());
|
|
|
+ bookingBatchService.updateById(queryBatchOrder);
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
private BusBookingBatch copyBatchToBase(BookingBatchRoomsDto data) {
|
|
|
BusBookingBatch batch = new BookingBatchRoomsDto();
|