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

Commit 131d4d5e authored by 胡佳晨's avatar 胡佳晨

修改退款

parent f5b042c6
...@@ -474,16 +474,25 @@ public class KylinOrderTicketsServiceImpl implements IKylinOrderTicketsService { ...@@ -474,16 +474,25 @@ 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 && status != 6)) { if (!item2.getOrderRefundsId().equals(orderRefundsId) && (status != 2 && status != 4 && status != 5 && status != 6)) {
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;
} }
} }
} }
for (KylinOrderRefundEntitiesVo item3 : item2.getOrderRefundEntitiesVoList()) {
if (item3.getOrderTicketEntitiesId().equals(item.getOrderTicketEntitiesId())) {
entitiesAllPrice.add(item3.getRefundPrice());
}
}
} }
KylinOrderTicketEntitiesVo entitiesVo = null; KylinOrderTicketEntitiesVo entitiesVo = null;
for (KylinOrderTicketEntitiesVo entitiesVo1 : orderTicketVo.getEntitiesVoList()) { for (KylinOrderTicketEntitiesVo entitiesVo1 : orderTicketVo.getEntitiesVoList()) {
if (entitiesVo1.getOrderTicketEntitiesId().equals(item.getOrderTicketEntitiesId())) { if (entitiesVo1.getOrderTicketEntitiesId().equals(item.getOrderTicketEntitiesId())) {
...@@ -491,10 +500,11 @@ public class KylinOrderTicketsServiceImpl implements IKylinOrderTicketsService { ...@@ -491,10 +500,11 @@ public class KylinOrderTicketsServiceImpl implements IKylinOrderTicketsService {
break; break;
} }
} }
if (refundingEntitiesCount > 0) { // 存在其他正在退款的该入场人订单 if (refundingEntitiesCount > 0) { // 存在其他正在退款的该入场人订单
newIsPayment = KylinTableStatusConst.ENTITIES_IS_PAYMENT2; newIsPayment = KylinTableStatusConst.ENTITIES_IS_PAYMENT2;
} else { } else {
if (entitiesVo.getRefundPrice().doubleValue() > 0) { // 已经有退完的 那就是部分退款了 if (entitiesAllPrice.subtract(entitiesVo.getRefundPrice()).doubleValue() > 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