1
This commit is contained in:
@@ -616,7 +616,8 @@ func GetSToURidingDistance2(sLng, sLat, uLng, uLat float64, orderId string) (way
|
|||||||
var (
|
var (
|
||||||
//origin = fmt.Sprintf("%f,%f", sLng, sLat)
|
//origin = fmt.Sprintf("%f,%f", sLng, sLat)
|
||||||
//destination = fmt.Sprintf("%f,%f", uLng, uLat)
|
//destination = fmt.Sprintf("%f,%f", uLng, uLat)
|
||||||
db = dao.GetDB()
|
db = dao.GetDB()
|
||||||
|
vendorMaps = map[int]int{model.VendorIDDada: 1, model.VendorIDFengNiao: 1, model.VendorIDMTPS: 1, model.VendorIDUUPT: 1, model.VendorIDSFPS: 1}
|
||||||
)
|
)
|
||||||
|
|
||||||
for {
|
for {
|
||||||
@@ -643,37 +644,40 @@ func GetSToURidingDistance2(sLng, sLat, uLng, uLat float64, orderId string) (way
|
|||||||
}
|
}
|
||||||
//}
|
//}
|
||||||
|
|
||||||
// 如果是三方配送,更新骑手信息
|
if vendorMaps[v.WaybillVendorID] == model.YES {
|
||||||
if handler := partner.GetDeliveryPlatformFromVendorID(v.WaybillVendorID); handler != nil {
|
// 如果是三方配送,更新骑手信息
|
||||||
riderInfo, _ := handler.Handler.GetRiderInfo(v.VendorOrderID, v.ID+1000000, v.VendorWaybillID)
|
if handler := partner.GetDeliveryPlatformFromVendorID(v.WaybillVendorID); handler != nil {
|
||||||
if riderInfo != nil {
|
riderInfo, _ := handler.Handler.GetRiderInfo(v.VendorOrderID, v.ID+1000000, v.VendorWaybillID)
|
||||||
if len(riderInfo.Longitude) < len("104.065861") && riderInfo.Longitude != "" {
|
if riderInfo != nil {
|
||||||
riderInfo.Longitude += "0"
|
if len(riderInfo.Longitude) < len("104.065861") && riderInfo.Longitude != "" {
|
||||||
}
|
riderInfo.Longitude += "0"
|
||||||
if len(riderInfo.Latitude) < len("27.934441") && riderInfo.Latitude != "" {
|
}
|
||||||
riderInfo.Latitude += "0"
|
if len(riderInfo.Latitude) < len("27.934441") && riderInfo.Latitude != "" {
|
||||||
}
|
riderInfo.Latitude += "0"
|
||||||
v.CourierCoordinate = fmt.Sprintf("%s,%s", riderInfo.Longitude, riderInfo.Latitude)
|
}
|
||||||
if (v.CourierName == "" || v.CourierMobile == "") && riderInfo.CourierName != "" {
|
v.CourierCoordinate = fmt.Sprintf("%s,%s", riderInfo.Longitude, riderInfo.Latitude)
|
||||||
v.CourierName = riderInfo.CourierName
|
if (v.CourierName == "" || v.CourierMobile == "") && riderInfo.CourierName != "" {
|
||||||
v.CourierMobile = riderInfo.CourierPhone
|
v.CourierName = riderInfo.CourierName
|
||||||
|
v.CourierMobile = riderInfo.CourierPhone
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
} else {
|
||||||
// 如果是平台配送,获取骑手信息
|
// 如果是平台配送,获取骑手信息
|
||||||
if handler := partner.GetPurchaseOrderHandlerFromVendorID(v.WaybillVendorID); handler != nil {
|
if handler := partner.GetPurchaseOrderHandlerFromVendorID(v.WaybillVendorID); handler != nil {
|
||||||
riderInfo, _ := handler.OrderLogisticsStatus(v.VendorOrderID)
|
riderInfo, _ := handler.OrderLogisticsStatus(v.VendorOrderID)
|
||||||
if riderInfo != nil {
|
if riderInfo != nil {
|
||||||
if len(riderInfo.Longitude) < len("104.065861") && riderInfo.Longitude != "" {
|
if len(riderInfo.Longitude) < len("104.065861") && riderInfo.Longitude != "" {
|
||||||
riderInfo.Longitude += "0"
|
riderInfo.Longitude += "0"
|
||||||
}
|
}
|
||||||
if len(riderInfo.Latitude) < len("27.934441") && riderInfo.Latitude != "" {
|
if len(riderInfo.Latitude) < len("27.934441") && riderInfo.Latitude != "" {
|
||||||
riderInfo.Latitude += "0"
|
riderInfo.Latitude += "0"
|
||||||
}
|
}
|
||||||
v.CourierCoordinate = fmt.Sprintf("%s,%s", riderInfo.Longitude, riderInfo.Latitude)
|
v.CourierCoordinate = fmt.Sprintf("%s,%s", riderInfo.Longitude, riderInfo.Latitude)
|
||||||
if (v.CourierName == "" || v.CourierMobile == "") && riderInfo.CourierName != "" {
|
if (v.CourierName == "" || v.CourierMobile == "") && riderInfo.CourierName != "" {
|
||||||
v.CourierName = riderInfo.CourierName
|
v.CourierName = riderInfo.CourierName
|
||||||
v.CourierMobile = riderInfo.CourierPhone
|
v.CourierMobile = riderInfo.CourierPhone
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -735,7 +739,7 @@ func GetCyclingLine(sLng, sLat, uLng, uLat float64) (polyLineList []string, dist
|
|||||||
}
|
}
|
||||||
distance = int64(path.Result.Routes[0].Distance) // 距离
|
distance = int64(path.Result.Routes[0].Distance) // 距离
|
||||||
duration = int64(path.Result.Routes[0].Duration) // 时间
|
duration = int64(path.Result.Routes[0].Duration) // 时间
|
||||||
|
|
||||||
for _, v := range path.Result.Routes[0].Steps {
|
for _, v := range path.Result.Routes[0].Steps {
|
||||||
polyLineList = append(polyLineList, strings.Split(v.Path, ";")...)
|
polyLineList = append(polyLineList, strings.Split(v.Path, ";")...)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -281,7 +281,7 @@ func (d DeliveryHandler) GetWaybillFee(order *model.GoodsOrder) (deliveryFeeInfo
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (d DeliveryHandler) ComplaintRider(bill *model.Waybill, resonID int, resonContent string) (err error) {
|
func (d DeliveryHandler) ComplaintRider(bill *model.Waybill, resonID int, resonContent string) (err error) {
|
||||||
return nil
|
return fmt.Errorf("顺丰暂未实现投诉")
|
||||||
}
|
}
|
||||||
|
|
||||||
// GetDeliverLiquidatedDamages 获取取消运单违约金
|
// GetDeliverLiquidatedDamages 获取取消运单违约金
|
||||||
|
|||||||
Reference in New Issue
Block a user