Commit 800c919f authored by 周健威's avatar 周健威

Merge remote-tracking branch 'origin/holiday-price' into holiday-price

parents 57d643db 9f32917a
...@@ -261,7 +261,7 @@ public class VehicleModelCalendarPriceBiz extends BaseBiz<VehicleModelCalendarPr ...@@ -261,7 +261,7 @@ public class VehicleModelCalendarPriceBiz extends BaseBiz<VehicleModelCalendarPr
//价格重置 //价格重置
vehicle_price = vehicle_base_price; vehicle_price = vehicle_base_price;
//未乘以会员折扣的价格 //未乘以会员折扣的价格
BigDecimal no_discount_price = new BigDecimal(vehicle_price.doubleValue()); BigDecimal no_discount_price = new BigDecimal(Objects.toString(vehicle_price.doubleValue()));
//免费天数重置 //免费天数重置
Integer free_days = DEFAULT_FREE_DAYS; Integer free_days = DEFAULT_FREE_DAYS;
//节假日对应的价格和免费天数 //节假日对应的价格和免费天数
...@@ -275,17 +275,17 @@ public class VehicleModelCalendarPriceBiz extends BaseBiz<VehicleModelCalendarPr ...@@ -275,17 +275,17 @@ public class VehicleModelCalendarPriceBiz extends BaseBiz<VehicleModelCalendarPr
} else { } else {
switch (vehicleModelCalendarPrice.getType()) { switch (vehicleModelCalendarPrice.getType()) {
case VehicleModelPriceType.MULTIPLE: case VehicleModelPriceType.MULTIPLE:
no_discount_price = vehicle_price.multiply(new BigDecimal(vehicleModelCalendarPrice.getMultiple().doubleValue())); no_discount_price = vehicle_price.multiply(new BigDecimal(String.valueOf(vehicleModelCalendarPrice.getMultiple().doubleValue())));
vehicle_price = no_discount_price.multiply(new BigDecimal(discount / 100.00)); vehicle_price = no_discount_price.multiply(new BigDecimal(Objects.toString(discount / 100.00)));
break; break;
case VehicleModelPriceType.ABS: case VehicleModelPriceType.ABS:
no_discount_price = vehicleModelCalendarPrice.getPrice(); no_discount_price = vehicleModelCalendarPrice.getPrice();
vehicle_price = no_discount_price.multiply(new BigDecimal(discount / 100.00)); vehicle_price = no_discount_price.multiply(new BigDecimal(Objects.toString(discount / 100.00)));
break; break;
case VehicleModelPriceType.MEMBER: case VehicleModelPriceType.MEMBER:
memberLevel = vehicleModelCalendarPrice.getLevel() > memberLevel ? vehicleModelCalendarPrice.getLevel() : memberLevel; memberLevel = vehicleModelCalendarPrice.getLevel() > memberLevel ? vehicleModelCalendarPrice.getLevel() : memberLevel;
Integer level_discount = levelAndDiscountMap.get(memberLevel); Integer level_discount = levelAndDiscountMap.get(memberLevel);
vehicle_price = level_discount == null ? vehicle_price : vehicle_price.multiply(new BigDecimal(level_discount / 100.00)); vehicle_price = level_discount == null ? vehicle_price : vehicle_price.multiply(new BigDecimal(Objects.toString(level_discount / 100.00)));
break; break;
default: default:
break; break;
...@@ -301,7 +301,7 @@ public class VehicleModelCalendarPriceBiz extends BaseBiz<VehicleModelCalendarPr ...@@ -301,7 +301,7 @@ public class VehicleModelCalendarPriceBiz extends BaseBiz<VehicleModelCalendarPr
no_discount_price = (BigDecimal) price_freeDays_map.get(BASE_PRICE_VAL); no_discount_price = (BigDecimal) price_freeDays_map.get(BASE_PRICE_VAL);
} }
vehicleModelCalendarPriceDTO.setNo_discount_price(no_discount_price); vehicleModelCalendarPriceDTO.setNo_discount_price(no_discount_price);
vehicleModelCalendarPriceDTO.setPrice(vehicle_price.setScale(2, RoundingMode.HALF_UP)); vehicleModelCalendarPriceDTO.setPrice(vehicle_price);
vehicleModelCalendarPriceDTO.setFreeDays(free_days); vehicleModelCalendarPriceDTO.setFreeDays(free_days);
final_startLocalDate = final_startLocalDate.plusDays(1); final_startLocalDate = final_startLocalDate.plusDays(1);
vehicleModelCalendarPriceVos.add(vehicleModelCalendarPriceDTO); vehicleModelCalendarPriceVos.add(vehicleModelCalendarPriceDTO);
...@@ -330,7 +330,7 @@ public class VehicleModelCalendarPriceBiz extends BaseBiz<VehicleModelCalendarPr ...@@ -330,7 +330,7 @@ public class VehicleModelCalendarPriceBiz extends BaseBiz<VehicleModelCalendarPr
free_days = vehicleModelHolidayPriceDTO.getFreeDays() == null ? free_days : vehicleModelHolidayPriceDTO.getFreeDays(); free_days = vehicleModelHolidayPriceDTO.getFreeDays() == null ? free_days : vehicleModelHolidayPriceDTO.getFreeDays();
} }
} }
vehicle_price = vehicle_price.multiply(new BigDecimal(discount / 100.00)); vehicle_price = vehicle_price.multiply(new BigDecimal(Objects.toString(discount / 100.00)));
vehicle_price_days_map.put(PRICE_VAL, vehicle_price); vehicle_price_days_map.put(PRICE_VAL, vehicle_price);
vehicle_price_days_map.put(DAYS_VAL, free_days); vehicle_price_days_map.put(DAYS_VAL, free_days);
log.info("(节假日|非节假日未设置的)价格和免费天数 处理【{}】",vehicle_price_days_map); log.info("(节假日|非节假日未设置的)价格和免费天数 处理【{}】",vehicle_price_days_map);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment