1
This commit is contained in:
@@ -439,7 +439,7 @@ func (c *DeliveryHandler) GetRiderInfo(orderId string, deliveryId int64, mtPeiso
|
|||||||
ThirdCarrierOrderId: mtPeisongId,
|
ThirdCarrierOrderId: mtPeisongId,
|
||||||
CourierName: order.TransporterName,
|
CourierName: order.TransporterName,
|
||||||
CourierPhone: order.TransporterPhone,
|
CourierPhone: order.TransporterPhone,
|
||||||
LogisticsProviderCode: string(mtpsapi.DaDaCode),
|
LogisticsProviderCode: mtpsapi.DaDaCode,
|
||||||
LogisticsStatus: order.StatusCode,
|
LogisticsStatus: order.StatusCode,
|
||||||
Latitude: order.TransporterLat,
|
Latitude: order.TransporterLat,
|
||||||
Longitude: order.TransporterLng,
|
Longitude: order.TransporterLng,
|
||||||
|
|||||||
@@ -307,7 +307,7 @@ func (c *DeliveryHandler) GetRiderInfo(orderId string, deliveryId int64, mtPeiso
|
|||||||
ThirdCarrierOrderId: utils.Int64ToStr(order.TrackingId),
|
ThirdCarrierOrderId: utils.Int64ToStr(order.TrackingId),
|
||||||
CourierName: knightInfo.CarrierDriverName,
|
CourierName: knightInfo.CarrierDriverName,
|
||||||
CourierPhone: knightInfo.CarrierDriverPhone,
|
CourierPhone: knightInfo.CarrierDriverPhone,
|
||||||
LogisticsProviderCode: string(mtpsapi.FnPsCode),
|
LogisticsProviderCode: mtpsapi.FnPsCode,
|
||||||
LogisticsStatus: order.OrderStatus, // 默认正在配送中
|
LogisticsStatus: order.OrderStatus, // 默认正在配送中
|
||||||
Latitude: knightInfo.CarrierDriverLatitude,
|
Latitude: knightInfo.CarrierDriverLatitude,
|
||||||
Longitude: knightInfo.CarrierDriverLongitude,
|
Longitude: knightInfo.CarrierDriverLongitude,
|
||||||
|
|||||||
@@ -401,23 +401,23 @@ func (c *DeliveryHandler) GetRiderInfo(orderId string, deliveryId int64, mtPeiso
|
|||||||
ThirdCarrierOrderId: utils.Interface2String(order["mt_peisong_id"]),
|
ThirdCarrierOrderId: utils.Interface2String(order["mt_peisong_id"]),
|
||||||
CourierName: utils.Interface2String(order["courier_name"]),
|
CourierName: utils.Interface2String(order["courier_name"]),
|
||||||
CourierPhone: utils.Interface2String(order["courier_phone"]),
|
CourierPhone: utils.Interface2String(order["courier_phone"]),
|
||||||
LogisticsProviderCode: string(mtpsapi.MTPsCode),
|
LogisticsProviderCode: mtpsapi.MTPsCode,
|
||||||
LogisticsStatus: int(utils.MustInterface2Int64(order["status"])), // 默认正在配送中
|
LogisticsStatus: int(utils.MustInterface2Int64(order["status"])), // 默认正在配送中
|
||||||
Latitude: utils.Float64ToStr(jxutils.IntCoordinate2Standard(lat)),
|
Latitude: utils.Float64ToStr(jxutils.IntCoordinate2Standard(lat)),
|
||||||
Longitude: utils.Float64ToStr(jxutils.IntCoordinate2Standard(lng)),
|
Longitude: utils.Float64ToStr(jxutils.IntCoordinate2Standard(lng)),
|
||||||
}
|
}
|
||||||
switch int(utils.MustInterface2Int64(order["status"])) {
|
switch int(utils.MustInterface2Int64(order["status"])) {
|
||||||
case 20 : //已接单
|
case 20: //已接单
|
||||||
result.LogisticsStatus = model.WaybillStatusCourierAssigned
|
result.LogisticsStatus = model.WaybillStatusCourierAssigned
|
||||||
case 30 : //已取货
|
case 30: //已取货
|
||||||
result.LogisticsStatus = model.WaybillStatusDelivering
|
result.LogisticsStatus = model.WaybillStatusDelivering
|
||||||
case 50 : //已送达
|
case 50: //已送达
|
||||||
result.LogisticsStatus = model.WaybillStatusDelivered
|
result.LogisticsStatus = model.WaybillStatusDelivered
|
||||||
case 90 : //已取消
|
case 90: //已取消
|
||||||
result.LogisticsStatus = model.WaybillStatusCanceled
|
result.LogisticsStatus = model.WaybillStatusCanceled
|
||||||
default:
|
default:
|
||||||
result.LogisticsStatus = model.WaybillStatusDeliverFailed
|
result.LogisticsStatus = model.WaybillStatusDeliverFailed
|
||||||
}
|
}
|
||||||
|
|
||||||
return result, nil
|
return result, nil
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -78,16 +78,16 @@ func GetOrderRiderInfoToPlatform(orderId string) {
|
|||||||
globals.SugarLogger.Debug("同步外卖骑手位置信息到美团失败,为获取到订单的骑手信息:", "----")
|
globals.SugarLogger.Debug("同步外卖骑手位置信息到美团失败,为获取到订单的骑手信息:", "----")
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
if v.WaybillVendorID == model.VendorIDDada {
|
//if v.WaybillVendorID == model.VendorIDDada {
|
||||||
riderInfo.LogisticsProviderCode = string(mtpsapi.DaDaCode)
|
// riderInfo.LogisticsProviderCode = "10002"
|
||||||
riderInfo.OrderId = v.VendorOrderID // 运单id
|
// riderInfo.OrderId = v.VendorOrderID // 运单id
|
||||||
}
|
//}
|
||||||
if v.WaybillVendorID == model.VendorIDFengNiao {
|
//if v.WaybillVendorID == model.VendorIDFengNiao {
|
||||||
riderInfo.LogisticsProviderCode = string(mtpsapi.FnPsCode)
|
// riderInfo.LogisticsProviderCode = "10004"
|
||||||
}
|
//}
|
||||||
if v.WaybillVendorID == model.VendorIDMTPS {
|
//if v.WaybillVendorID == model.VendorIDMTPS {
|
||||||
riderInfo.LogisticsProviderCode = string(mtpsapi.MTPsCode)
|
// riderInfo.LogisticsProviderCode = "10032"
|
||||||
}
|
//}
|
||||||
riderInfo.ThirdCarrierOrderId = v.VendorWaybillID
|
riderInfo.ThirdCarrierOrderId = v.VendorWaybillID
|
||||||
switch riderInfo.LogisticsStatus {
|
switch riderInfo.LogisticsStatus {
|
||||||
case 20: //配送中
|
case 20: //配送中
|
||||||
|
|||||||
Reference in New Issue
Block a user