This commit is contained in:
邹宗楠
2022-06-01 15:43:39 +08:00
parent b5a0ab5757
commit cfc3dd27d4

View File

@@ -531,8 +531,8 @@ func (s *DefScheduler) OnWaybillStatusChanged(bill *model.Waybill, isPending boo
}
} else if order.Status > model.OrderStatusEndBegin {
s.ProxyCancelWaybill(order, bill, partner.CancelWaybillReasonNotAcceptIntime, partner.CancelWaybillReasonStrNotAcceptIntime) // 取消三方配送调度
s.SelfDeliverDelivered(order, "自送或三方") // 取消当前运单调度
s.swtich2SelfDeliverWithRetry(savedOrderInfo, bill, switch2SelfDeliverRetryCount, switch2SelfDeliverRetryGap) // 转自送
s.SelfDeliverDelivered(order, "自送或三方") // 取消当前运单调度
partner.CurOrderManager.OnOrderMsg(order, "订单处于结束状态来的运单", "取消三方运单转自送1")
} else {
needAddTip := order.WaybillTipMoney > 0 && !model.IsWaybillPlatformOwn(bill)
@@ -640,6 +640,7 @@ func (s *DefScheduler) OnWaybillStatusChanged(bill *model.Waybill, isPending boo
if order.Status > model.OrderStatusEndBegin {
s.ProxyCancelWaybill(order, bill, partner.CancelWaybillReasonNotAcceptIntime, partner.CancelWaybillReasonStrNotAcceptIntime)
s.swtich2SelfDeliverWithRetry(savedOrderInfo, bill, switch2SelfDeliverRetryCount, switch2SelfDeliverRetryGap) // 转自送
s.SelfDeliverDelivered(order, "自配送结束") // 取消当前运单调度
partner.CurOrderManager.OnOrderMsg(order, "订单处于结束状态来的运单", "取消三方运单,转自送")
}
// 判断订单来源与运单是否为同一来源
@@ -654,10 +655,6 @@ func (s *DefScheduler) OnWaybillStatusChanged(bill *model.Waybill, isPending boo
if model.IsOrderDeliveryByStore(savedOrderInfo.order) {
// 转自送失败,取消三方配送
if err := s.SelfDeliverDelivering(order, bill.CourierMobile); err != nil {
if err := s.ProxyCancelWaybill(order, bill, partner.CancelWaybillReasonNotAcceptIntime, partner.CancelWaybillReasonStrSwitch2SelfFailed); err != nil {
// 如果转自送失败,且取消三方失败,循环多次转自送
partner.CurOrderManager.OnOrderMsg(order, "自送出设置失败", err.Error())
}
partner.CurOrderManager.OnOrderMsg(order, "转自送失败,并多次转自送", err.Error())
}
s.notify3rdPartyWaybill(order, bill, isBillAlreadyCandidate)