This commit is contained in:
richboo111
2023-06-12 14:16:00 +08:00
parent 3293103285
commit 866aa16bc5
5 changed files with 31 additions and 7 deletions

View File

@@ -259,6 +259,18 @@ func (c *DeliveryHandler) GetDeliverLiquidatedDamages(orderId string, deliverId
return api.UuAPI.GetOrderLiquidatedDamages(deliverId, orderId)
}
func (c *DeliveryHandler) GetRidderPosition(ctx *jxcontext.Context, vendorOrgCode, vendorOrderID, vendorWaybillID, vendorWaybillID2 string) (lng, lat float64, err error) {
if rider, err := api.UuAPI.GetOrderDetail(vendorWaybillID); err == nil && len(rider.DriverLastloc) > 0 {
te := strings.Split(rider.DriverLastloc, ",")
if len(te) > 0 {
lng = utils.Str2Float64(te[0])
lat = utils.Str2Float64(te[1])
}
return lng, lat, nil
}
return 0, 0, err
}
//辅助函数
func getOrderPrice(order *model.GoodsOrder) (orderPrice *uuptapi.GetOrderPriceResp, err error) {
store, err := dao.GetStoreDetail(dao.GetDB(), getReallyStoreID(order.StoreID, order.JxStoreID), 0, "")