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 {