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

Commit ca413949 authored by jiangxiulong's avatar jiangxiulong

Merge remote-tracking branch 'origin/jxl_1214_refund' into dev_merchant

parents a319da14 f916cf99
...@@ -87,6 +87,22 @@ public class KylinOrderTicketsRefundServiceImpl { ...@@ -87,6 +87,22 @@ public class KylinOrderTicketsRefundServiceImpl {
return ResponseDto.failure(ErrorMapping.get("20003")); return ResponseDto.failure(ErrorMapping.get("20003"));
} }
} }
// 可退快递费
// 快递费 判断是否是最后一张入场人票 减去已经退的快递费
BigDecimal canRefundPriceExpress = BigDecimal.valueOf(0);
// 正在和已经退的快递票金额 正在和已经退的票数量
Integer refundNum = 0;
BigDecimal priceExpressOld = BigDecimal.valueOf(0);
for (KylinOrderRefundsVo refundVo : kylinOrderRefundsVoBaseList) {
int status = refundVo.getStatus();
if (status != KylinTableStatusConst.ORDER_REFUND_STATUS_CANCEL && status != KylinTableStatusConst.ORDER_REFUND_STATUS_REJECT) { //退款流程未完成和已完成的
refundNum ++;
priceExpressOld = priceExpressOld.add(refundVo.getPriceExpress());
}
}
if (refundNum + 1 == orderTicketVo.getNumber()) {
canRefundPriceExpress = orderTicketVo.getPriceExpress().subtract(priceExpressOld);
}
// 入场人 数据脱敏/退款 // 入场人 数据脱敏/退款
List<KylinOrderTicketEntitiesVo> kylinOrderTicketEntitiesVoList = orderTicketVo.getEntitiesVoList(); List<KylinOrderTicketEntitiesVo> kylinOrderTicketEntitiesVoList = orderTicketVo.getEntitiesVoList();
List<KylinOrderTicketEntitiesPreRefundVo> kylinOrderTicketEntitiesPreRefundVos = ObjectUtil.getKylinOrderTicketEntitiesPreRefundVoArrayList(); List<KylinOrderTicketEntitiesPreRefundVo> kylinOrderTicketEntitiesPreRefundVos = ObjectUtil.getKylinOrderTicketEntitiesPreRefundVoArrayList();
...@@ -103,7 +119,7 @@ public class KylinOrderTicketsRefundServiceImpl { ...@@ -103,7 +119,7 @@ public class KylinOrderTicketsRefundServiceImpl {
// 手续费处理 // 手续费处理
BigDecimal chargesRatio = getChargesRatio(orderTicketVo.getUseStart(), performanceVo.getIsRefundPoundage()); BigDecimal chargesRatio = getChargesRatio(orderTicketVo.getUseStart(), performanceVo.getIsRefundPoundage());
BigDecimal chargesPrice = item.getPriceCanRefund().multiply(chargesRatio).setScale(2, BigDecimal.ROUND_HALF_UP); BigDecimal chargesPrice = item.getPriceCanRefund().multiply(chargesRatio).setScale(2, BigDecimal.ROUND_HALF_UP);
item.setPriceCanRefund(item.getPriceCanRefund().subtract(chargesPrice)); item.setPriceCanRefund(item.getPriceCanRefund().subtract(chargesPrice).add(canRefundPriceExpress));
item.setChargesRatio(chargesRatio); item.setChargesRatio(chargesRatio);
item.setChargesPrice(chargesPrice); item.setChargesPrice(chargesPrice);
......
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