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

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

parents e25805d1 117b61b5
...@@ -283,7 +283,6 @@ public class BaseOrderBiz extends BaseBiz<BaseOrderMapper, BaseOrder> implements ...@@ -283,7 +283,6 @@ public class BaseOrderBiz extends BaseBiz<BaseOrderMapper, BaseOrder> implements
} }
} }
} }
//getDaysBetweenDateTimeHasStartEnd(endTime, nowTime) == 1--同一天;>1-- 延后;<1--提前;
/** /**
* 提前还车 * 提前还车
*/ */
...@@ -292,19 +291,13 @@ public class BaseOrderBiz extends BaseBiz<BaseOrderMapper, BaseOrder> implements ...@@ -292,19 +291,13 @@ public class BaseOrderBiz extends BaseBiz<BaseOrderMapper, BaseOrder> implements
//提前的天数, 当天就算使用一天 //提前的天数, 当天就算使用一天
int noUsedDay = actualDay - userUsedDay; int noUsedDay = actualDay - userUsedDay;
//退还未使用的天数,或者金额,扣除违约金,实际未使用天数的金额,最多3000元 //退还未使用的天数,或者金额,扣除违约金,实际未使用天数的金额,最多3000元
// InProgressVO inProgressVO = new InProgressVO();
// inProgressVO.setViolateAmount(new BigDecimal(200));
// inProgressVO.setExtraAmount(new BigDecimal(200));
InProgressVO inProgressVO = orderCalculateBiz.inProgressCalculate(orderPageVO, userUsedDay); InProgressVO inProgressVO = orderCalculateBiz.inProgressCalculate(orderPageVO, userUsedDay);
if (inProgressVO != null) { if (inProgressVO != null) {
//消费超额金 //消费超额金
if(inProgressVO.getExtraAmount() != null) { if(inProgressVO.getExtraAmount() != null) {
dedDetailDTO.setExcessCost(inProgressVO.getExtraAmount()); dedDetailDTO.setExcessCost(inProgressVO.getExtraAmount());
} }
// stringBuilder.append("违约金( ¥");
stringBuilder.append("违约金( "); stringBuilder.append("违约金( ");
// stringBuilder.append(amount);
// stringBuilder.append(" x ");
stringBuilder.append(noUsedDay); stringBuilder.append(noUsedDay);
stringBuilder.append("天) = "); stringBuilder.append("天) = ");
stringBuilder.append(inProgressVO.getViolateAmount()); stringBuilder.append(inProgressVO.getViolateAmount());
...@@ -315,21 +308,21 @@ public class BaseOrderBiz extends BaseBiz<BaseOrderMapper, BaseOrder> implements ...@@ -315,21 +308,21 @@ public class BaseOrderBiz extends BaseBiz<BaseOrderMapper, BaseOrder> implements
*/ */
} else if (userUsedDay - actualDay > 0) { } else if (userUsedDay - actualDay > 0) {
StringBuilder stringBuilder = new StringBuilder(); StringBuilder stringBuilder = new StringBuilder();
// stringBuilder.append("违约金( ¥");
stringBuilder.append("违约金( "); stringBuilder.append("违约金( ");
//延期的天数, 延期违约金是延期天数*200% //延期的天数, 延期违约金是延期天数*200%
InProgressVO inProgressVO = orderCalculateBiz.inProgressCalculate(orderPageVO, userUsedDay);
if (inProgressVO != null) {
int extraUsedDay = userUsedDay - actualDay; int extraUsedDay = userUsedDay - actualDay;
if(extraUsedDay > 0) { if(extraUsedDay > 0) {
// stringBuilder.append(amount);
// stringBuilder.append(" x ");
stringBuilder.append(extraUsedDay); stringBuilder.append(extraUsedDay);
stringBuilder.append("(天)"); stringBuilder.append("(天)");
stringBuilder.append(" x 2)"); stringBuilder.append(" x 2)");
BigDecimal cost = amount.multiply(new BigDecimal(extraUsedDay+ "")).multiply(new BigDecimal(2+ ""));
stringBuilder.append(" = "); stringBuilder.append(" = ");
stringBuilder.append(cost); stringBuilder.append(inProgressVO.getViolateAmount());
stringBuilder.append("元"); stringBuilder.append("元");
initDedDetail(dedDetailDTO, OrderViolateEnum.AFTER.getCode(), cost, stringBuilder); initDedDetail(dedDetailDTO, OrderViolateEnum.AFTER.getCode(), inProgressVO.getViolateAmount(), stringBuilder);
}
} }
} }
JSONArray jsonArray = new JSONArray(); JSONArray jsonArray = new JSONArray();
......
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