|
@@ -1015,7 +1015,8 @@ public class BusRoomBookingOrdersServiceImpl extends ServiceImpl<BusRoomBookingO
|
|
|
roomFee.setRoomId(bkRoom.getRoomId());
|
|
roomFee.setRoomId(bkRoom.getRoomId());
|
|
|
roomFee.setLivingOrderId(livingOrderId);
|
|
roomFee.setLivingOrderId(livingOrderId);
|
|
|
roomFee.setFeeType(1); // 消费
|
|
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)
|
|
if(dayRoomFee == null)
|
|
|
throw new JeecgBootException("未找到当日房价");
|
|
throw new JeecgBootException("未找到当日房价");
|
|
|
roomFee.setMoney(dayRoomFee); // 取当日房费的优惠价 其他时间要查询房价方案、每日房价,房型门市价按照规则去取
|
|
roomFee.setMoney(dayRoomFee); // 取当日房费的优惠价 其他时间要查询房价方案、每日房价,房型门市价按照规则去取
|
|
@@ -1027,8 +1028,8 @@ public class BusRoomBookingOrdersServiceImpl extends ServiceImpl<BusRoomBookingO
|
|
|
return results;
|
|
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())
|
|
s-> DateUtils.formatDate(s.getDayTime())
|
|
|
.equals(DateUtils.formatDate(new Date())
|
|
.equals(DateUtils.formatDate(new Date())
|
|
|
)).findFirst();
|
|
)).findFirst();
|