Commit 5da7d339 by 范富荣

feat:内部结算订单去除审批步骤

1 parent 8e4fbf8b
...@@ -275,18 +275,19 @@ public class PayOrderService { ...@@ -275,18 +275,19 @@ public class PayOrderService {
log.info("创建支付单命中支付完成态,订单将进入支付后自动处理链,订单号={}, 支付类型={}, 交易流水号={}, 订单最终金额={}, 实收金额={}", log.info("创建支付单命中支付完成态,订单将进入支付后自动处理链,订单号={}, 支付类型={}, 交易流水号={}, 订单最终金额={}, 实收金额={}",
orderCode, payOrder.getPayType(), payOrder.getOutTradeNo(), payOrder.getActualMoney(), payOrder.getActualIncomeMoney()); orderCode, payOrder.getPayType(), payOrder.getOutTradeNo(), payOrder.getActualMoney(), payOrder.getActualIncomeMoney());
//特殊订单类型判断 //特殊订单类型判断
if(ObjectUtil.isNull(goodsOrder.getDjOrderType()) || Objects.equals(DjOrderTypeEnum.NORMAL.getValue(), goodsOrder.getDjOrderType())){ if (ObjectUtil.isNull(goodsOrder.getDjOrderType()) || Objects.equals(DjOrderTypeEnum.NORMAL.getValue(), goodsOrder.getDjOrderType())
|| Objects.equals(DjOrderTypeEnum.INNER_SETTLE.getValue(), goodsOrder.getDjOrderType())) {
if (Objects.equals(SceneTypeEnum.SCENE1_0.getValue(), goodsOrder.getSceneType()) if (Objects.equals(SceneTypeEnum.SCENE1_0.getValue(), goodsOrder.getSceneType())
&& Objects.equals(ZYVoucherStatusEnum.WAIT_TO_UPLOAD.getValue(), payOrder.getZyVoucherStatus())) { && Objects.equals(ZYVoucherStatusEnum.WAIT_TO_UPLOAD.getValue(), payOrder.getZyVoucherStatus())) {
o.setStatus(OrderStatus.WAIT_UPLOAD.getValue()); o.setStatus(OrderStatus.WAIT_UPLOAD.getValue());
o.setOperStatus(OrderOperStatus.WAIT_UPLOAD.getValue()); o.setOperStatus(OrderOperStatus.WAIT_UPLOAD.getValue());
o.setProfitAllocationStatus(ProfitAllocationStatus.HANGING.getValue()); o.setProfitAllocationStatus(ProfitAllocationStatus.HANGING.getValue());
}else{ } else {
o.setStatus(OrderStatus.PAYED.getValue()); o.setStatus(OrderStatus.PAYED.getValue());
o.setOperStatus(OrderOperStatus.PAYED.getValue()); o.setOperStatus(OrderOperStatus.PAYED.getValue());
o.setProfitAllocationStatus(ProfitAllocationStatus.WAIT_DIVISION.getValue()); o.setProfitAllocationStatus(ProfitAllocationStatus.WAIT_DIVISION.getValue());
} }
}else { } else {
o.setStatus(OrderStatus.IN_AUDIT.getValue()); o.setStatus(OrderStatus.IN_AUDIT.getValue());
o.setOperStatus(OrderOperStatus.PAYED.getValue()); o.setOperStatus(OrderOperStatus.PAYED.getValue());
o.setProfitAllocationStatus(ProfitAllocationStatus.WAIT_DIVISION.getValue()); o.setProfitAllocationStatus(ProfitAllocationStatus.WAIT_DIVISION.getValue());
...@@ -961,18 +962,19 @@ public class PayOrderService { ...@@ -961,18 +962,19 @@ public class PayOrderService {
o.setInstallUpgradeTime(now); o.setInstallUpgradeTime(now);
o.setOrderCode(orderCode); o.setOrderCode(orderCode);
o.setUpdatedBy(payOrder.getUpdatedBy()); o.setUpdatedBy(payOrder.getUpdatedBy());
if(ObjectUtil.isNull(goodsOrder.getDjOrderType()) || Objects.equals(DjOrderTypeEnum.NORMAL.getValue(),goodsOrder.getDjOrderType())){ if (ObjectUtil.isNull(goodsOrder.getDjOrderType()) || Objects.equals(DjOrderTypeEnum.NORMAL.getValue(), goodsOrder.getDjOrderType())
|| Objects.equals(DjOrderTypeEnum.INNER_SETTLE.getValue(), goodsOrder.getDjOrderType())) {
if (Objects.equals(SceneTypeEnum.SCENE1_0.getValue(), goodsOrder.getSceneType()) if (Objects.equals(SceneTypeEnum.SCENE1_0.getValue(), goodsOrder.getSceneType())
&& Objects.equals(ZYVoucherStatusEnum.WAIT_TO_UPLOAD.getValue(), p.getZyVoucherStatus())) { && Objects.equals(ZYVoucherStatusEnum.WAIT_TO_UPLOAD.getValue(), p.getZyVoucherStatus())) {
o.setStatus(OrderStatus.WAIT_UPLOAD.getValue()); o.setStatus(OrderStatus.WAIT_UPLOAD.getValue());
o.setOperStatus(OrderOperStatus.WAIT_UPLOAD.getValue()); o.setOperStatus(OrderOperStatus.WAIT_UPLOAD.getValue());
o.setProfitAllocationStatus(ProfitAllocationStatus.HANGING.getValue()); o.setProfitAllocationStatus(ProfitAllocationStatus.HANGING.getValue());
}else{ } else {
o.setStatus(OrderStatus.PAYED.getValue()); o.setStatus(OrderStatus.PAYED.getValue());
o.setOperStatus(OrderOperStatus.PAYED.getValue()); o.setOperStatus(OrderOperStatus.PAYED.getValue());
o.setProfitAllocationStatus(ProfitAllocationStatus.WAIT_DIVISION.getValue()); o.setProfitAllocationStatus(ProfitAllocationStatus.WAIT_DIVISION.getValue());
} }
}else { } else {
o.setStatus(OrderStatus.IN_AUDIT.getValue()); o.setStatus(OrderStatus.IN_AUDIT.getValue());
o.setOperStatus(OrderOperStatus.PAYED.getValue()); o.setOperStatus(OrderOperStatus.PAYED.getValue());
o.setProfitAllocationStatus(ProfitAllocationStatus.WAIT_DIVISION.getValue()); o.setProfitAllocationStatus(ProfitAllocationStatus.WAIT_DIVISION.getValue());
...@@ -1553,18 +1555,19 @@ public class PayOrderService { ...@@ -1553,18 +1555,19 @@ public class PayOrderService {
private void initOrderAndPayOrder (GoodsOrder o, PayOrder payOrder, GoodsOrder oldOrder){ private void initOrderAndPayOrder (GoodsOrder o, PayOrder payOrder, GoodsOrder oldOrder){
final Date now = new Date(); final Date now = new Date();
if(Objects.equals(DjOrderTypeEnum.NORMAL.getValue(),oldOrder.getDjOrderType()) && StringUtils.isBlank(payOrder.getNewOutTradeNo())){ if ((Objects.equals(DjOrderTypeEnum.NORMAL.getValue(), oldOrder.getDjOrderType()) || Objects.equals(DjOrderTypeEnum.INNER_SETTLE.getValue(), oldOrder.getDjOrderType()))
&& StringUtils.isBlank(payOrder.getNewOutTradeNo())) {
if (Objects.equals(SceneTypeEnum.SCENE1_0.getValue(), oldOrder.getSceneType()) if (Objects.equals(SceneTypeEnum.SCENE1_0.getValue(), oldOrder.getSceneType())
&& Objects.equals(ZYVoucherStatusEnum.WAIT_TO_UPLOAD.getValue(), payOrder.getZyVoucherStatus())) { && Objects.equals(ZYVoucherStatusEnum.WAIT_TO_UPLOAD.getValue(), payOrder.getZyVoucherStatus())) {
o.setStatus(OrderStatus.WAIT_UPLOAD.getValue()); o.setStatus(OrderStatus.WAIT_UPLOAD.getValue());
o.setOperStatus(OrderOperStatus.WAIT_UPLOAD.getValue()); o.setOperStatus(OrderOperStatus.WAIT_UPLOAD.getValue());
o.setProfitAllocationStatus(ProfitAllocationStatus.HANGING.getValue()); o.setProfitAllocationStatus(ProfitAllocationStatus.HANGING.getValue());
}else{ } else {
o.setStatus(OrderStatus.PAYED.getValue()); o.setStatus(OrderStatus.PAYED.getValue());
o.setOperStatus(OrderOperStatus.PAYED.getValue()); o.setOperStatus(OrderOperStatus.PAYED.getValue());
o.setProfitAllocationStatus(ProfitAllocationStatus.WAIT_DIVISION.getValue()); o.setProfitAllocationStatus(ProfitAllocationStatus.WAIT_DIVISION.getValue());
} }
}else { } else {
//特殊订单类型 //特殊订单类型
o.setStatus(OrderStatus.IN_AUDIT.getValue()); o.setStatus(OrderStatus.IN_AUDIT.getValue());
o.setOperStatus(OrderOperStatus.PAYED.getValue()); o.setOperStatus(OrderOperStatus.PAYED.getValue());
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!