From fbb328409e0145b0854eee2eb05cca55cef7ec60 Mon Sep 17 00:00:00 2001 From: gazebo Date: Sun, 19 May 2019 13:11:21 +0800 Subject: [PATCH] =?UTF-8?q?-=20=E8=B4=AD=E4=B9=B0=E5=B9=B3=E5=8F=B0?= =?UTF-8?q?=E8=87=AA=E5=B7=B1=E7=9A=84=E8=BF=90=E5=8D=95=E4=BA=8B=E4=BB=B6?= =?UTF-8?q?=EF=BC=8C=E5=8F=AA=E6=9C=89=E5=9C=A8=E6=94=B6=E5=88=B0WaybillSt?= =?UTF-8?q?atusDelivering=E6=89=8D=E5=BC=BA=E5=88=B6=E8=AE=BE=E7=BD=AE?= =?UTF-8?q?=E8=AE=A2=E5=8D=95=E7=8A=B6=E6=80=81=E4=B8=BA=E9=85=8D=E9=80=81?= =?UTF-8?q?=E4=B8=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- business/jxcallback/orderman/waybill.go | 8 +++---- .../jxcallback/scheduler/defsch/defsch.go | 24 ++++++++++--------- 2 files changed, 17 insertions(+), 15 deletions(-) diff --git a/business/jxcallback/orderman/waybill.go b/business/jxcallback/orderman/waybill.go index 4ebb1c377..6a95a8c79 100644 --- a/business/jxcallback/orderman/waybill.go +++ b/business/jxcallback/orderman/waybill.go @@ -13,10 +13,10 @@ import ( var ( waybillOrderStatusMap = map[int]int{ - model.WaybillStatusApplyFailedGetGoods: model.WaybillStatusApplyFailedGetGoods, - model.WaybillStatusAgreeFailedGetGoods: model.WaybillStatusAgreeFailedGetGoods, - model.WaybillStatusRefuseFailedGetGoods: model.WaybillStatusRefuseFailedGetGoods, - model.WaybillStatusDeliverFailed: model.WaybillStatusDeliverFailed, + model.WaybillStatusApplyFailedGetGoods: model.OrderStatusApplyFailedGetGoods, + model.WaybillStatusAgreeFailedGetGoods: model.OrderStatusAgreeFailedGetGoods, + model.WaybillStatusRefuseFailedGetGoods: model.OrderStatusRefuseFailedGetGoods, + model.WaybillStatusDeliverFailed: model.OrderStatusDeliverFailed, } ) diff --git a/business/jxcallback/scheduler/defsch/defsch.go b/business/jxcallback/scheduler/defsch/defsch.go index 898d1f4e2..26113e8fc 100644 --- a/business/jxcallback/scheduler/defsch/defsch.go +++ b/business/jxcallback/scheduler/defsch/defsch.go @@ -402,7 +402,7 @@ func (s *DefScheduler) OnWaybillStatusChanged(bill *model.Waybill, isPending boo globals.SugarLogger.Debugf("OnWaybillStatusChanged bill not exist! orderID:%s, bill:%v", bill.VendorOrderID, bill) } switch bill.Status { - case model.WaybillStatusAccepted, model.WaybillStatusDelivering: + case model.WaybillStatusAccepted, model.WaybillStatusCourierArrived, model.WaybillStatusDelivering: s.resetTimer(savedOrderInfo, bill, isPending) if (isBillExist || bill.WaybillVendorID != model.VendorIDDada) && !isPending { // todo 达达运单有错序的情况,临时看看 isBillAlreadyCandidate := s.isBillCandidate(order, bill) @@ -417,9 +417,11 @@ func (s *DefScheduler) OnWaybillStatusChanged(bill *model.Waybill, isPending boo s.cancelOtherWaybillsCheckOrderDeliveryFlag(savedOrderInfo, bill, partner.CancelWaybillReasonNotAcceptIntime, partner.CancelWaybillReasonStrNotAcceptIntime) if model.IsWaybillPlatformOwn(bill) { - // 强制将订单状态置为配送中? - order.Status = model.OrderStatusDelivering - partner.CurOrderManager.UpdateOrderStatusAndFlag(order) + if bill.Status == model.WaybillStatusDelivering { + // 强制将订单状态置为配送中? + order.Status = model.OrderStatusDelivering + partner.CurOrderManager.UpdateOrderStatusAndFlag(order) + } } else { if savedOrderInfo.storeDeliveryType == scheduler.StoreDeliveryTypeByStore || model.IsSpecialOrderPlatformWaybill(bill) { @@ -461,13 +463,13 @@ func (s *DefScheduler) OnWaybillStatusChanged(bill *model.Waybill, isPending boo globals.SugarLogger.Warnf("OnWaybillStatusChanged AcceptCanceled orderID:%s got multiple bill:%v, order details:%v", order.VendorOrderID, bill, order) } } - case model.WaybillStatusCourierArrived: // do nothing - s.resetTimer(savedOrderInfo, bill, isPending) - if s.isBillCandidate(order, bill) { - } else { - // s.ProxyCancelWaybill(order, bill, partner.CancelWaybillReasonNotAcceptIntime, partner.CancelWaybillReasonStrNotAcceptIntime) - globals.SugarLogger.Infof("OnWaybillStatusChanged CourierArrived order(%d, %s) bill(%d, %s), bill:%v shouldn't get here", order.WaybillVendorID, order.VendorWaybillID, bill.WaybillVendorID, bill.VendorWaybillID, bill) - } + // case model.WaybillStatusCourierArrived: // do nothing + // s.resetTimer(savedOrderInfo, bill, isPending) + // if s.isBillCandidate(order, bill) { + // } else { + // // s.ProxyCancelWaybill(order, bill, partner.CancelWaybillReasonNotAcceptIntime, partner.CancelWaybillReasonStrNotAcceptIntime) + // globals.SugarLogger.Infof("OnWaybillStatusChanged CourierArrived order(%d, %s) bill(%d, %s), bill:%v shouldn't get here", order.WaybillVendorID, order.VendorWaybillID, bill.WaybillVendorID, bill.VendorWaybillID, bill) + // } case model.WaybillStatusCanceled, model.WaybillStatusFailed: s.removeWaybillFromMap(savedOrderInfo, bill.WaybillVendorID) if s.isBillCandidate(order, bill) || order.WaybillVendorID == model.VendorIDUnknown {