1
This commit is contained in:
@@ -622,6 +622,7 @@ func (s *DefScheduler) OnWaybillStatusChanged(bill *model.Waybill, isPending boo
|
|||||||
if order.Status > model.OrderStatusEndBegin {
|
if order.Status > model.OrderStatusEndBegin {
|
||||||
s.ProxyCancelWaybill(order, bill, partner.CancelWaybillReasonNotAcceptIntime, partner.CancelWaybillReasonStrNotAcceptIntime)
|
s.ProxyCancelWaybill(order, bill, partner.CancelWaybillReasonNotAcceptIntime, partner.CancelWaybillReasonStrNotAcceptIntime)
|
||||||
s.SelfDeliverDelivered(order, "自送或三方")
|
s.SelfDeliverDelivered(order, "自送或三方")
|
||||||
|
partner.CurOrderManager.OnOrderMsg(order, "订单处于结束状态来的运单", "取消三方运单,转自送")
|
||||||
}
|
}
|
||||||
// 判断订单来源与运单是否为同一来源
|
// 判断订单来源与运单是否为同一来源
|
||||||
if model.IsWaybillPlatformOwn(bill) {
|
if model.IsWaybillPlatformOwn(bill) {
|
||||||
@@ -639,7 +640,7 @@ func (s *DefScheduler) OnWaybillStatusChanged(bill *model.Waybill, isPending boo
|
|||||||
// 如果转自送失败,且取消三方失败,循环多次转自送
|
// 如果转自送失败,且取消三方失败,循环多次转自送
|
||||||
s.swtich2SelfDeliverWithRetry(savedOrderInfo, bill, switch2SelfDeliverRetryCount, switch2SelfDeliverRetryGap)
|
s.swtich2SelfDeliverWithRetry(savedOrderInfo, bill, switch2SelfDeliverRetryCount, switch2SelfDeliverRetryGap)
|
||||||
}
|
}
|
||||||
partner.CurOrderManager.OnOrderMsg(order, "自送出设置失败", err.Error())
|
partner.CurOrderManager.OnOrderMsg(order, "转自送失败,并多次转自送", err.Error())
|
||||||
}
|
}
|
||||||
s.notify3rdPartyWaybill(order, bill, isBillAlreadyCandidate)
|
s.notify3rdPartyWaybill(order, bill, isBillAlreadyCandidate)
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import (
|
|||||||
"git.rosy.net.cn/baseapi/utils"
|
"git.rosy.net.cn/baseapi/utils"
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
|
"time"
|
||||||
|
|
||||||
"git.rosy.net.cn/jx-callback/business/jxutils"
|
"git.rosy.net.cn/jx-callback/business/jxutils"
|
||||||
"git.rosy.net.cn/jx-callback/business/partner/delivery"
|
"git.rosy.net.cn/jx-callback/business/partner/delivery"
|
||||||
@@ -200,23 +201,20 @@ func (c *DeliveryHandler) GetWaybillFee(order *model.GoodsOrder) (deliveryFeeInf
|
|||||||
|
|
||||||
// 订单状态
|
// 订单状态
|
||||||
func OnWaybillMsg(msg *fnpsapi.OrderStatusNottify) (resp *fnpsapi.CallbackResponse) {
|
func OnWaybillMsg(msg *fnpsapi.OrderStatusNottify) (resp *fnpsapi.CallbackResponse) {
|
||||||
cc := &fnpsapi.OrderCallbackParam{}
|
|
||||||
if err := utils.Map2StructByJson(msg.Param, cc, true); err != nil {
|
|
||||||
globals.SugarLogger.Debugf("FNPS strconv.Atoi fail :[%s]", err)
|
|
||||||
return fnpsapi.Err2CallbackResponse(err, "")
|
|
||||||
}
|
|
||||||
|
|
||||||
order := &model.Waybill{
|
order := &model.Waybill{
|
||||||
VendorWaybillID: utils.Int64ToStr(cc.OrderId),
|
VendorWaybillID: utils.Int64ToStr(msg.Param.OrderId),
|
||||||
VendorWaybillID2: cc.PartnerOrderCode,
|
VendorWaybillID2: msg.Param.PartnerOrderCode,
|
||||||
WaybillVendorID: model.VendorIDFengNiao,
|
WaybillVendorID: model.VendorIDFengNiao,
|
||||||
CourierName: cc.CarrierDriverName,
|
CourierName: msg.Param.CarrierDriverName,
|
||||||
CourierMobile: cc.CarrierDriverPhone,
|
CourierMobile: msg.Param.CarrierDriverPhone,
|
||||||
VendorStatus: utils.Int2Str(cc.OrderStatus),
|
VendorStatus: utils.Int2Str(msg.Param.OrderStatus),
|
||||||
StatusTime: utils.Timestamp2Time(cc.PushTime),
|
StatusTime: utils.Timestamp2Time(msg.Param.PushTime),
|
||||||
Remark: cc.Description,
|
Remark: msg.Param.Description,
|
||||||
}
|
}
|
||||||
order.VendorOrderID, order.OrderVendorID = jxutils.SplitUniversalOrderID(cc.PartnerOrderCode)
|
if msg.Param.PushTime == 0 {
|
||||||
|
order.StatusTime = time.Now()
|
||||||
|
}
|
||||||
|
order.VendorOrderID, order.OrderVendorID = jxutils.SplitUniversalOrderID(utils.Int64ToStr(msg.Param.OrderId))
|
||||||
orderStatus, err := strconv.Atoi(order.VendorStatus)
|
orderStatus, err := strconv.Atoi(order.VendorStatus)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
globals.SugarLogger.Debugf("FNPS strconv.Atoi fail :[%s]", err)
|
globals.SugarLogger.Debugf("FNPS strconv.Atoi fail :[%s]", err)
|
||||||
|
|||||||
Reference in New Issue
Block a user