Commit a889bf19 authored by libin's avatar libin

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

parents e809c6e4 ef3f9ced
......@@ -21,7 +21,7 @@ import java.util.List;
public class VehicleItemDTO extends OrderItem {
public static final int topNum = 2;
//已抵消天数
private Integer offsetNum;
private Integer offsetNum = 0;
public BigDecimal calculateVehicleUnitPrice(BigDecimal vehicleAmount, BigDecimal metaVehicleAmount, Boolean isSetRealAmount) {
if(isSetRealAmount) {
setRealAmount(vehicleAmount);
......@@ -138,7 +138,7 @@ public class VehicleItemDTO extends OrderItem {
}else if(ableFreeDays > cycleNum){ //本次累加天数 小于等于 可用免费天数
setCutNum(getCutNum()+ dto.getFreeDays());
//直接设置价格
dto.setFreeAndConsumeAmount(dto.getPrice(), BigDecimal.ZERO);
dto.setFreeAndConsumeAmount(dto.getPrice(), dto.getPrice());
this.offsetNum += 1;
}else { //上次累加天数 大于 可用天数
//直接设置价格
......
......@@ -274,9 +274,9 @@ public class OrderRentVehicleService extends AbstractOrderHandle<OrderRentVehicl
// }
// }
// vehicleOrderItem.setCutNum(cutDayNum);
vehicleOrderItem.initDetail(dto.getRentFreeDays());
freeDayNum = vehicleOrderItem.getCutNum();
offsetNum = vehicleOrderItem.getOffsetNum();
vehicleOrderItem.initDetail(dto.getRentFreeDays());
vehicleDayNum = detail.getDayNum() - offsetNum;
detail.getOrder().setHasMemberRight(SYS_TRUE);
}else {
......
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