Переглянути джерело

fix房间退房时设置当前时间为正式的离店时间,不然日历房态会有逻辑性问题

覃浩 2 роки тому
батько
коміт
82da33ab87

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

@@ -1207,6 +1207,8 @@ public class BusRoomBookingOrdersServiceImpl extends ServiceImpl<BusRoomBookingO
             if(!opMainRoomOrder.isPresent()) throw new JeecgBootException("没有找到主房订单");
             BusRoomsLivingOrder mainRoomOrder = opMainRoomOrder.get();
             livingOrders.forEach(s->{
+                // fix-bug 当结账后设置离店时间 2023-05-09
+                s.setDueOutTime(new Date());
                 s.setSettleType(SettleTypeEnum.SETTLE_LEAVE.getKey());
                 s.setIsUnionSettled(s.getId().equals(mainRoomOrder.getId())?0:1);
             });
@@ -1267,7 +1269,8 @@ public class BusRoomBookingOrdersServiceImpl extends ServiceImpl<BusRoomBookingO
         if(mainRoom == null) throw new JeecgBootException("没有找到主房");
 
         BusRoomsLivingOrder mainRoomOrder = livingOrder;
-
+        // fixbug 当结账后设置离店时间 2023-05-09
+        livingOrder.setDueOutTime(new Date());
         livingOrder.setSettleType(SettleTypeEnum.SETTLE_LEAVE.getKey());
         roomsLivingOrderService.updateById(livingOrder);
         List<BusOrderFee> feeItems = getLivingOrderFees(livingOrderId).stream().filter(