|
|
@@ -1798,10 +1798,16 @@ public class BusRoomBookingOrdersServiceImpl extends ServiceImpl<BusRoomBookingO
|
|
|
order.setLivingType(2);
|
|
|
order.setHourRoomId(info.getFangAnId());
|
|
|
order.setDueOutTime(targetTime);
|
|
|
- updateOrderPrice(info.getPrices());
|
|
|
+ Calendar startCal = Calendar.getInstance();
|
|
|
+ startCal.setTime(order.getArrivalTime());
|
|
|
+ Calendar endCal = Calendar.getInstance();
|
|
|
+ endCal.setTime(targetTime);
|
|
|
+ int dayCount = DateUtils.dateDiff('d',startCal,endCal);
|
|
|
+ order.setDayCount(Math.abs(dayCount));
|
|
|
} else throw new JeecgBootException("请选择时租房规则");
|
|
|
|
|
|
} else if(info.getLiveType().equals(1)) {
|
|
|
+ order.setLivingType(1);
|
|
|
CesAllDayPriceRule rule = allDayPriceRuleService.getOne(Wrappers.<CesAllDayPriceRule>query().eq("hotel_id",order.getHotelId()));
|
|
|
String leaveTime = "13:00";
|
|
|
if(rule == null || rule.getLeaveTime() == null) {
|
|
|
@@ -1865,7 +1871,7 @@ public class BusRoomBookingOrdersServiceImpl extends ServiceImpl<BusRoomBookingO
|
|
|
if(DateUtils.formatDate(new Date()).equals(DateUtils.formatDate(s.getDayTime()))){
|
|
|
// 修改当日房价 产生的当日房费账单也要改
|
|
|
BusOrderFee fee = feeService.getOne(Wrappers.<BusOrderFee>query()
|
|
|
- .eq("day_time",DateUtils.formatDate(new Date())));
|
|
|
+ .eq("DATE_FORMAT(day_time,'%Y-%m-%d')",DateUtils.formatDate(new Date())).eq("living_order_id",s.getLivingOrderId()));
|
|
|
if(fee != null) {
|
|
|
fee.setMoney(s.getPrice());
|
|
|
feeService.updateById(fee);
|