From aba49a367ac8ee94127c326ba9c3a94231d1c1c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E5=AE=97=E6=A5=A0?= Date: Sat, 28 May 2022 13:51:17 +0800 Subject: [PATCH] 1 --- business/jxcallback/scheduler/defsch/defsch.go | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/business/jxcallback/scheduler/defsch/defsch.go b/business/jxcallback/scheduler/defsch/defsch.go index 62995d487..94a069a07 100644 --- a/business/jxcallback/scheduler/defsch/defsch.go +++ b/business/jxcallback/scheduler/defsch/defsch.go @@ -519,24 +519,24 @@ func (s *DefScheduler) OnWaybillStatusChanged(bill *model.Waybill, isPending boo // return nil // } // if (order.DeliveryFlag & model.OrderDeliveryFlagMaskScheduleDisabled) == 0 { // 如果被停止调度,整个不动作 + if bill.Status == model.WaybillStatusNew { s.addWaybill2Map(savedOrderInfo, bill) if !isPending { - if order.Status >= model.OrderStatusDelivering && order.DeliveryType == model.OrderDeliveryTypeStoreSelf{ - s.SelfDeliverDelivered(order, "订单在配送中来了新运单,如果是自送则转自送") - } - if order.Status >= model.OrderStatusDelivering && order.DeliveryType != model.OrderDeliveryTypeStoreSelf{ - s.ProxyCancelWaybill(order, bill, partner.CancelWaybillReasonNotAcceptIntime, partner.CancelWaybillReasonStrNotAcceptIntime) - } - - if order.Status > model.OrderStatusEndBegin { + if order.Status >= model.OrderStatusDelivering && order.Status < model.OrderStatusEndBegin { + if order.DeliveryType == model.OrderDeliveryTypeStoreSelf { + s.SelfDeliverDelivering(order, bill.CourierMobile) + } else { + s.ProxyCancelWaybill(order, bill, partner.CancelWaybillReasonNotAcceptIntime, partner.CancelWaybillReasonStrNotAcceptIntime) + } + } else if order.Status > model.OrderStatusEndBegin { // 订单处于完成状态,来的新运单,取消三方配送,转自送! s.ProxyCancelWaybill(order, bill, partner.CancelWaybillReasonNotAcceptIntime, partner.CancelWaybillReasonStrNotAcceptIntime) s.SelfDeliverDelivered(order, "自送或三方") partner.CurOrderManager.OnOrderMsg(order, "订单处于结束状态来的运单", "取消三方运单,转自送1") } else { needAddTip := order.WaybillTipMoney > 0 && !model.IsWaybillPlatformOwn(bill) - if model.IsOrderHaveWaybill(order) {// 是否有有效运单 + if model.IsOrderHaveWaybill(order) { // 是否有有效运单 globals.SugarLogger.Debugf("OnWaybillStatusChanged multiple waybill created, bill:%v", bill) if model.IsWaybillPlatformOwn(bill) { // 是购物平台运单 if !model.IsOrderHaveOwnWaybill(order) { // 既有运单不是购物平台运单