qh 2 lat temu
rodzic
commit
df6dc0c0a7

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

@@ -1067,7 +1067,7 @@ public class BusRoomBookingOrdersServiceImpl extends ServiceImpl<BusRoomBookingO
                 if(baseRooms.size() > 0) {
                     baseRooms.forEach(s->{
                         s.setRoomStatus(RoomStatusEnum.EMPTY_DIRTY.getKey());
-                        s.setLivingOrderId(null);
+                        s.setLivingOrderId("");
                     });
                     roomsService.updateBatchById(baseRooms);
                 }
@@ -1108,7 +1108,7 @@ public class BusRoomBookingOrdersServiceImpl extends ServiceImpl<BusRoomBookingO
         if(baseRooms.size() > 0) {
             baseRooms.forEach(s->{
                 s.setRoomStatus(RoomStatusEnum.EMPTY_DIRTY.getKey());
-                s.setLivingOrderId(null);
+                s.setLivingOrderId("");
             });
             roomsService.updateBatchById(baseRooms);
         }
@@ -1161,7 +1161,7 @@ public class BusRoomBookingOrdersServiceImpl extends ServiceImpl<BusRoomBookingO
             List<CesRooms> rooms = roomsService.list(Wrappers.<CesRooms>query()
             .in("living_order_id",livingOrderIds));
             rooms.forEach(s->{
-                s.setLivingOrderId(null);
+                s.setLivingOrderId("");
                 s.setRoomStatus(RoomStatusEnum.EMPTY_DIRTY.getKey());
             });
             bookingLivings.forEach(s->s.setSettleType(SettleTypeEnum.SETTLE_LEAVE.getKey()));
@@ -1175,7 +1175,7 @@ public class BusRoomBookingOrdersServiceImpl extends ServiceImpl<BusRoomBookingO
             if(bookingRooms.getIsMain().equals(true)) throw new JeecgBootException("主房不能单独先走不结");
             CesRooms room = roomsService.getOne(Wrappers.<CesRooms>query().eq("living_order_id",livingOrderId));
             if(room == null) throw new JeecgBootException("未找到订单信息");
-            room.setLivingOrderId(null);
+            room.setLivingOrderId("");
             room.setRoomStatus(RoomStatusEnum.EMPTY_DIRTY.getKey());
 
             livingOrder.setSettleType(SettleTypeEnum.SETTLE_LEAVE.getKey());
@@ -1222,12 +1222,10 @@ public class BusRoomBookingOrdersServiceImpl extends ServiceImpl<BusRoomBookingO
         });
         feeService.updateBatchById(feeItems);
     }
-
     private List<BusOrderFee> getLivingOrderFees(String livingOrderId) {
         return feeService.list(Wrappers.<BusOrderFee>query()
         .eq("living_order_id",livingOrderId));
     }
-
     private Map<String,String> bookingRoomToLiving(BookingOrderSaveDto livingData, List<ExtendBusBookingRoomsVo> roomIds, BookingOrderEditVo bookingOrderVo) {
         Map<String,String> results = new HashMap<>();
 
@@ -1269,7 +1267,6 @@ public class BusRoomBookingOrdersServiceImpl extends ServiceImpl<BusRoomBookingO
         });
         return results;
     }
-
     private BigDecimal currentDayFee(List<BusLivingLayoutDayPrice> dayPrices, BigDecimal defaultPrice){
         Optional<BusLivingLayoutDayPrice> opDayPrice = dayPrices.stream().filter(
                 s-> DateUtils.formatDate(s.getDayTime())
@@ -1281,9 +1278,6 @@ public class BusRoomBookingOrdersServiceImpl extends ServiceImpl<BusRoomBookingO
             return defaultPrice;
         }
     }
-
-
-
     private BusRoomsLivingOrder copyBookingToAcceptOrder(BusRoomBookingOrders bkOrder) {
         BusRoomsLivingOrder livingOrder = new BusRoomsLivingOrder();
         livingOrder.setAgencyName(bkOrder.getAgencyName());
@@ -1319,7 +1313,6 @@ public class BusRoomBookingOrdersServiceImpl extends ServiceImpl<BusRoomBookingO
         livingOrder.setBookingOrderId(bkOrder.getId());
         return livingOrder;
     }
-
     private BusRoomBookingOrders  copyBookingToAcceptOrder(BusRoomsLivingOrder  bkOrder) {
         BusRoomBookingOrders livingOrder = new BusRoomBookingOrders();
         livingOrder.setAgencyName(bkOrder.getAgencyName());
@@ -1354,7 +1347,6 @@ public class BusRoomBookingOrdersServiceImpl extends ServiceImpl<BusRoomBookingO
         livingOrder.setTeamPeopleNumber(bkOrder.getTeamPeopleNumber());
         return livingOrder;
     }
-
     private BusRoomsLivingOrder copyBookingToAcceptOrder(BusBookingBatch bkOrder, BusRoomBookingOrders bookingOrder) {
         BusRoomsLivingOrder livingOrder = new BusRoomsLivingOrder();
         livingOrder.setAgencyName(bkOrder.getAgencyName());
@@ -1390,8 +1382,6 @@ public class BusRoomBookingOrdersServiceImpl extends ServiceImpl<BusRoomBookingO
         livingOrder.setBookingOrderId(bkOrder.getId());
         return livingOrder;
     }
-
-
     private BusBookingBatch copyBatchToBase(BookingBatchRoomsDto data) {
         BusBookingBatch batch = new BookingBatchRoomsDto();
         batch.setBatchNo(data.getBatchNo());
@@ -1420,7 +1410,6 @@ public class BusRoomBookingOrdersServiceImpl extends ServiceImpl<BusRoomBookingO
         batch.setBookingStatus(data.getBookingStatus());
         return batch;
     }
-
     private BookingBatchRoomsVo copyBaseToBatch(BusBookingBatch data) {
         BookingBatchRoomsVo batch = new BookingBatchRoomsVo();
         batch.setBatchNo(data.getBatchNo());
@@ -1450,7 +1439,6 @@ public class BusRoomBookingOrdersServiceImpl extends ServiceImpl<BusRoomBookingO
         batch.setBookingStatus(data.getBookingStatus());
         return batch;
     }
-
     void setBatchOrderInfo(BusRoomBookingOrders order, BookingBatchRoomsDto batchDto){
         batchDto.setBreakfastNum(order.getBreakfastNum());
         batchDto.setLunchNum(order.getLunchNum());