This commit is contained in:
邹宗楠
2023-09-11 16:06:34 +08:00
parent f7d3eee018
commit b53d8b9406
2 changed files with 1 additions and 5 deletions

View File

@@ -5,7 +5,6 @@ import (
"fmt"
"git.rosy.net.cn/baseapi/platformapi/autonavi"
"git.rosy.net.cn/baseapi/platformapi/baidunavi"
"git.rosy.net.cn/jx-callback/globals"
"math"
"reflect"
"regexp"
@@ -649,7 +648,6 @@ func GetSToURidingDistance2(sLng, sLat, uLng, uLat float64, orderId string) (way
// 如果是三方配送,更新骑手信息
if handler := partner.GetDeliveryPlatformFromVendorID(v.WaybillVendorID); handler != nil {
riderInfo, _ := handler.Handler.GetRiderInfo(v.VendorOrderID, v.ID+1000000, v.VendorWaybillID)
globals.SugarLogger.Debugf("=======riderInfo := %s", utils.Format4Output(riderInfo, false))
if riderInfo != nil {
if len(riderInfo.Longitude) < len("104.065861") || riderInfo.Longitude != "" {
riderInfo.Longitude += "0"
@@ -668,7 +666,6 @@ func GetSToURidingDistance2(sLng, sLat, uLng, uLat float64, orderId string) (way
// 如果是平台配送,获取骑手信息
if handler := partner.GetPurchaseOrderHandlerFromVendorID(v.WaybillVendorID); handler != nil {
riderInfo, _ := handler.OrderLogisticsStatus(v.VendorOrderID)
globals.SugarLogger.Debugf("=======riderInfo := %s", utils.Format4Output(riderInfo, false))
if riderInfo != nil {
if len(riderInfo.Longitude) < len("104.065861") || riderInfo.Longitude != "" {
riderInfo.Longitude += "0"
@@ -705,7 +702,6 @@ func GetSToURidingDistance2(sLng, sLat, uLng, uLat float64, orderId string) (way
}
}
globals.SugarLogger.Debugf("=========v := %s", utils.Format4Output(v, false))
dao.UpdateEntity(db, v, "OriginalData", "CourierCoordinate", "Distance", "DurationTime")
if v.CourierName == "" || v.CourierMobile == "" {
v.CourierName = "暂无骑手"

View File

@@ -927,7 +927,7 @@ func (c *PurchaseHandler) OrderLogisticsStatus(orderId string) (*utils.RiderInfo
}
// 获取骑手坐标最后一个
lng, lat, _ := api.GetDeliveryPath(utils.Str2Int64(orderId), orderInfo.VendorOrderID)
lng, lat, _ := api.GetDeliveryPath(utils.Str2Int64(orderId), orderInfo.VendorStoreID)
status.Longitude = utils.Float64ToStr(jxutils.IntCoordinate2Standard(int(lng)))
status.Latitude = utils.Float64ToStr(jxutils.IntCoordinate2Standard(int(lat)))
return status, nil