qh 2 年 前
コミット
7754233530

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

@@ -1015,7 +1015,8 @@ public class BusRoomBookingOrdersServiceImpl extends ServiceImpl<BusRoomBookingO
             roomFee.setRoomId(bkRoom.getRoomId());
             roomFee.setLivingOrderId(livingOrderId);
             roomFee.setFeeType(1); // 消费
-            BigDecimal dayRoomFee =  currentDayFee(bkRoom.getLayoutDayPrices(),null);
+            List<BusLivingLayoutDayPrice> roomDayPrice = livingData.getLivingRoomDayPrices().stream().filter(i->i.getRoomId().equals(bkRoom.getRoomId())).collect(Collectors.toList());
+            BigDecimal dayRoomFee =  currentDayFee(roomDayPrice,null);
             if(dayRoomFee == null)
                 throw new JeecgBootException("未找到当日房价");
             roomFee.setMoney(dayRoomFee); // 取当日房费的优惠价  其他时间要查询房价方案、每日房价,房型门市价按照规则去取
@@ -1027,8 +1028,8 @@ public class BusRoomBookingOrdersServiceImpl extends ServiceImpl<BusRoomBookingO
         return results;
     }
 
-    private BigDecimal currentDayFee(List<BusBookingLayoutDayPrice> dayPrices, BigDecimal defaultPrice){
-        Optional<BusBookingLayoutDayPrice> opDayPrice = dayPrices.stream().filter(
+    private BigDecimal currentDayFee(List<BusLivingLayoutDayPrice> dayPrices, BigDecimal defaultPrice){
+        Optional<BusLivingLayoutDayPrice> opDayPrice = dayPrices.stream().filter(
                 s-> DateUtils.formatDate(s.getDayTime())
                         .equals(DateUtils.formatDate(new Date())
         )).findFirst();