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

Commit 4603ba61 authored by jiangxiulong's avatar jiangxiulong

test refund price

parent 93959e55
...@@ -474,14 +474,12 @@ public class KylinOrderTicketsServiceImpl implements IKylinOrderTicketsService { ...@@ -474,14 +474,12 @@ public class KylinOrderTicketsServiceImpl implements IKylinOrderTicketsService {
// 订单状态表 判断是退到正在退款 已付款 部分退款?(取消,完成,失败) // 订单状态表 判断是退到正在退款 已付款 部分退款?(取消,完成,失败)
int newIsPayment = 0; int newIsPayment = 0;
int refundingEntitiesCount = 0; int refundingEntitiesCount = 0;
BigDecimal entitiesAllPrice = BigDecimal.valueOf(0);
for (KylinOrderRefundsVo item2 : orderRefundsVoList) { for (KylinOrderRefundsVo item2 : orderRefundsVoList) {
int status = item2.getStatus(); int status = item2.getStatus();
if (!item2.getOrderRefundsId().equals(orderRefundsId) && (status != 2 && status != 4 && status != 5)) { if (!item2.getOrderRefundsId().equals(orderRefundsId) && (status != 2 && status != 4 && status != 5)) {
for (KylinOrderRefundEntitiesVo item3 : item2.getOrderRefundEntitiesVoList()) { for (KylinOrderRefundEntitiesVo item3 : item2.getOrderRefundEntitiesVoList()) {
if (item3.getOrderTicketEntitiesId().equals(item.getOrderTicketEntitiesId())) { if (item3.getOrderTicketEntitiesId().equals(item.getOrderTicketEntitiesId())) {
refundingEntitiesCount += 1; refundingEntitiesCount += 1;
entitiesAllPrice.add(item3.getRefundPrice());
} }
} }
} }
...@@ -502,12 +500,11 @@ public class KylinOrderTicketsServiceImpl implements IKylinOrderTicketsService { ...@@ -502,12 +500,11 @@ public class KylinOrderTicketsServiceImpl implements IKylinOrderTicketsService {
} }
} }
log.info("entitiesAllPrice =" +entitiesAllPrice);
log.info("getRefundPrice =" +entitiesVo.getRefundPrice()); log.info("getRefundPrice =" +entitiesVo.getRefundPrice());
if (refundingEntitiesCount > 0) { // 存在其他正在退款的该入场人订单 if (refundingEntitiesCount > 0) { // 存在其他正在退款的该入场人订单
newIsPayment = KylinTableStatusConst.ENTITIES_IS_PAYMENT2; newIsPayment = KylinTableStatusConst.ENTITIES_IS_PAYMENT2;
} else { } else {
if (entitiesAllPrice.subtract(entitiesVo.getRefundPrice()).doubleValue() > 0) { // 已经有退完的 那就是部分退款了 if (orderTicketVo.getPriceRefund().compareTo(BigDecimal.ZERO) > 0) { // 已经有退完的 那就是部分退款了
newIsPayment = KylinTableStatusConst.ENTITIES_IS_PAYMENT4; newIsPayment = KylinTableStatusConst.ENTITIES_IS_PAYMENT4;
} else { } else {
newIsPayment = KylinTableStatusConst.ENTITIES_IS_PAYMENT1; newIsPayment = KylinTableStatusConst.ENTITIES_IS_PAYMENT1;
......
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