记得上下班打卡 | git大法好,push需谨慎

Commit 4414eac5 authored by 胡佳晨's avatar 胡佳晨

TODO 手续费计算改成 按照实付金额计算

parent 862088b1
...@@ -103,9 +103,9 @@ public class KylinOrderTicketsRefundServiceImpl { ...@@ -103,9 +103,9 @@ public class KylinOrderTicketsRefundServiceImpl {
} }
item.setPriceActual(orderTicketVo.getPriceActual().subtract(orderTicketVo.getPriceExpress()).divide(BigDecimal.valueOf(orderTicketVo.getNumber()), 2, BigDecimal.ROUND_HALF_UP)); item.setPriceActual(orderTicketVo.getPriceActual().subtract(orderTicketVo.getPriceExpress()).divide(BigDecimal.valueOf(orderTicketVo.getNumber()), 2, BigDecimal.ROUND_HALF_UP));
item.setPriceCanRefund(dataUtils.getCanRefundOrderEntitiesPrice(orderTicketVo, kylinOrderRefundsVoBaseList, item.getOrderTicketEntitiesId())); item.setPriceCanRefund(dataUtils.getCanRefundOrderEntitiesPrice(orderTicketVo, kylinOrderRefundsVoBaseList, item.getOrderTicketEntitiesId()));
// 手续费处理 // 手续费处理 TODO 手续费计算改成 按照实付金额计算
BigDecimal chargesRatio = getChargesRatio(orderTicketVo.getUseStart(), performanceVo.getIsRefundPoundage(dataUtils.getRefundPoundage(1, performanceVo.getPerformancesId()).size()), performanceVo.getPerformancesId()); BigDecimal chargesRatio = getChargesRatio(orderTicketVo.getUseStart(), performanceVo.getIsRefundPoundage(dataUtils.getRefundPoundage(1, performanceVo.getPerformancesId()).size()), performanceVo.getPerformancesId());
BigDecimal chargesPrice = item.getPriceCanRefund().multiply(chargesRatio).setScale(2, BigDecimal.ROUND_HALF_UP); BigDecimal chargesPrice = item.getPriceActual().multiply(chargesRatio).setScale(2, BigDecimal.ROUND_HALF_UP);
item.setPriceCanRefund(item.getPriceCanRefund().subtract(chargesPrice)); item.setPriceCanRefund(item.getPriceCanRefund().subtract(chargesPrice));
item.setChargesRatio(chargesRatio); item.setChargesRatio(chargesRatio);
item.setChargesPrice(chargesPrice); item.setChargesPrice(chargesPrice);
...@@ -233,9 +233,10 @@ public class KylinOrderTicketsRefundServiceImpl { ...@@ -233,9 +233,10 @@ public class KylinOrderTicketsRefundServiceImpl {
return ResponseDto.failure("申请金额不得小于0"); return ResponseDto.failure("申请金额不得小于0");
} }
// 手续费处理 BigDecimal singlePrice = orderTicketVo.getPriceActual().subtract(orderTicketVo.getPriceExpress()).divide(BigDecimal.valueOf(orderTicketVo.getNumber()), 2, BigDecimal.ROUND_HALF_UP);
// 手续费处理 TODO 修改了手续费根据票单算
BigDecimal chargesRatio = getChargesRatio(orderTicketVo.getUseStart(), performanceVo.getIsRefundPoundage(dataUtils.getRefundPoundage(1, performanceVo.getPerformancesId()).size()), performanceVo.getPerformancesId()); BigDecimal chargesRatio = getChargesRatio(orderTicketVo.getUseStart(), performanceVo.getIsRefundPoundage(dataUtils.getRefundPoundage(1, performanceVo.getPerformancesId()).size()), performanceVo.getPerformancesId());
BigDecimal priceCharges = refundSinglePrice.multiply(chargesRatio).setScale(2, BigDecimal.ROUND_HALF_UP); BigDecimal priceCharges = singlePrice.multiply(chargesRatio).setScale(2, BigDecimal.ROUND_HALF_UP);
refundSinglePrice = refundSinglePrice.subtract(priceCharges); refundSinglePrice = refundSinglePrice.subtract(priceCharges);
if (refundSinglePrice.compareTo(BigDecimal.ZERO) <= 0) { if (refundSinglePrice.compareTo(BigDecimal.ZERO) <= 0) {
return ResponseDto.failure("申请金额不得小于0哦~"); return ResponseDto.failure("申请金额不得小于0哦~");
......
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