1
This commit is contained in:
@@ -142,7 +142,7 @@ func (c *BaseScheduler) SelfDeliverDelivering(order *model.GoodsOrder, userName
|
|||||||
localBill, _ := partner.CurOrderManager.LoadWaybill(order.VendorWaybillID, order.WaybillVendorID)
|
localBill, _ := partner.CurOrderManager.LoadWaybill(order.VendorWaybillID, order.WaybillVendorID)
|
||||||
// 获取抖音配送状态
|
// 获取抖音配送状态
|
||||||
tiktokWayBillStatus, _ := partner.GetPurchasePlatformFromVendorID(order.VendorID).OrderLogisticsStatus(order.VendorOrderID)
|
tiktokWayBillStatus, _ := partner.GetPurchasePlatformFromVendorID(order.VendorID).OrderLogisticsStatus(order.VendorOrderID)
|
||||||
if tiktokWayBillStatus != nil && tiktokWayBillStatus.LogisticsStatus >= tiktokShop.ShipmentStatusReceived {
|
if tiktokWayBillStatus != nil && tiktokWayBillStatus.LogisticsStatus >= tiktokShop.ShipmentStatusReceived && tiktokWayBillStatus.LogisticsStatus != tiktokShop.ShipmentStatusCanceled {
|
||||||
//取消抖音配送转自送
|
//取消抖音配送转自送
|
||||||
err = c.CancelWaybill(localBill, partner.CancelWaybillReasonDYPSCancel, partner.CancelWaybillReasonStrDYPSCancel+"抖音骑手已经接单,无法取消")
|
err = c.CancelWaybill(localBill, partner.CancelWaybillReasonDYPSCancel, partner.CancelWaybillReasonStrDYPSCancel+"抖音骑手已经接单,无法取消")
|
||||||
partner.CurOrderManager.OnOrderMsg(order, "取消抖音配送,转用门店自配送/三方配送", "抖音骑手已经接单,无法取消")
|
partner.CurOrderManager.OnOrderMsg(order, "取消抖音配送,转用门店自配送/三方配送", "抖音骑手已经接单,无法取消")
|
||||||
|
|||||||
@@ -734,10 +734,14 @@ func GetCyclingLine(sLng, sLat, uLng, uLat float64) (polyLineList []string, dist
|
|||||||
})
|
})
|
||||||
|
|
||||||
coords, err = api.BaiDuNaviAPI.BatchCoordinateConvert(coords, baidunavi.CoordSysGCJ02, baidunavi.CoordSysBaiDu)
|
coords, err = api.BaiDuNaviAPI.BatchCoordinateConvert(coords, baidunavi.CoordSysGCJ02, baidunavi.CoordSysBaiDu)
|
||||||
|
globals.SugarLogger.Debugf("=========coords := %s", utils.Format4Output(coords, false))
|
||||||
|
globals.SugarLogger.Debugf("=========err := %v", err)
|
||||||
if err != nil || len(coords) <= model.NO {
|
if err != nil || len(coords) <= model.NO {
|
||||||
return nil, 0, 0, err
|
return nil, 0, 0, err
|
||||||
}
|
}
|
||||||
data, err := api.BaiDuNaviAPI.DirectionLiteRide(coords)
|
data, err := api.BaiDuNaviAPI.DirectionLiteRide(coords)
|
||||||
|
globals.SugarLogger.Debugf("=========data := %s", utils.Format4Output(data, false))
|
||||||
|
globals.SugarLogger.Debugf("=========err := %v", err)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, 0, 0, err
|
return nil, 0, 0, err
|
||||||
}
|
}
|
||||||
@@ -758,26 +762,5 @@ func GetCyclingLine(sLng, sLat, uLng, uLat float64) (polyLineList []string, dist
|
|||||||
polyLineList = append(polyLineList, strings.Split(v.Path, ";")...)
|
polyLineList = append(polyLineList, strings.Split(v.Path, ";")...)
|
||||||
}
|
}
|
||||||
|
|
||||||
// 高德()免费次数太少暂时不用
|
|
||||||
//for {
|
|
||||||
// polyLineList, distance, duration, errCode = api.AutonaviAPI.GetCyclingPlan(origin, destination)
|
|
||||||
// if errCode != nil {
|
|
||||||
// ddmsg.SendUserMessage(dingdingapi.MsgTyeText, "2452A93EEB9111EC9B06525400E86DC0", "获取骑行路线:", utils.Format4Output(errCode, false))
|
|
||||||
// }
|
|
||||||
// if errCode != nil && (errCode.Error() == autonavi.DAILYQUERYOVERLIMIT || errCode.Error() == autonavi.USERDAILYQUERYOVERLIMIT) {
|
|
||||||
// AutonaviKeyIndex += model.YES
|
|
||||||
// if AutonaviKeyIndex >= len(AutonaviKeyList) {
|
|
||||||
// AutonaviKeyIndex = model.NO
|
|
||||||
// }
|
|
||||||
// api.AutonaviAPI.SetKey(AutonaviKeyList[AutonaviKeyIndex])
|
|
||||||
// } else if errCode != nil {
|
|
||||||
// return nil, 0, 0, errCode
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// if len(polyLineList) > model.NO {
|
|
||||||
// return polyLineList, distance, duration, errCode
|
|
||||||
// }
|
|
||||||
//}
|
|
||||||
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user