Commit f02a9ced authored by 周健威's avatar 周健威

修改订单明细bug

parent 44747221
...@@ -113,8 +113,11 @@ public class VehicleItemDTO extends OrderItem { ...@@ -113,8 +113,11 @@ public class VehicleItemDTO extends OrderItem {
} }
BigDecimal usedAmount = BigDecimal.ZERO; BigDecimal usedAmount = BigDecimal.ZERO;
for(VMCalendarPriceCostDTO vmcpcd : vmcpds) { // for(VMCalendarPriceCostDTO vmcpcd : vmcpds) {
usedAmount.add(vmcpcd.getPrice()); // usedAmount.add(vmcpcd.getPrice());
// }
for(int i = 0; i < useDays; i++) {
usedAmount = usedAmount.add(vmcpds.get(i).getPrice());
} }
return usedAmount; return usedAmount;
} }
...@@ -133,11 +136,11 @@ public class VehicleItemDTO extends OrderItem { ...@@ -133,11 +136,11 @@ public class VehicleItemDTO extends OrderItem {
BigDecimal freeAmount = BigDecimal.ZERO; BigDecimal freeAmount = BigDecimal.ZERO;
if(null != offsetDay) { if(null != offsetDay) {
for(int i = 0; i < offsetDay; i++) { for(int i = 0; i < offsetDay; i++) {
freeAmount.add(vmcpds.get(i).getFreeAmount()); freeAmount = freeAmount.add(vmcpds.get(i).getFreeAmount());
} }
}else { }else {
for(VMCalendarPriceCostDTO vmcpcd : vmcpds) { for(VMCalendarPriceCostDTO vmcpcd : vmcpds) {
freeAmount.add(vmcpcd.getFreeAmount()); freeAmount = freeAmount.add(vmcpcd.getFreeAmount());
} }
} }
return freeAmount; return freeAmount;
......
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