饿百订单的坐标

This commit is contained in:
苏尹岚
2020-09-09 14:10:25 +08:00
parent d7344970fb
commit d71edfbd6d
3 changed files with 8 additions and 9 deletions

View File

@@ -235,7 +235,7 @@ func (c *DeliveryHandler) getBillParams(db *dao.DaoDB, order *model.GoodsOrder)
// storeTel = ",门店电话:" + storeDeatail.Tel2
// }
billParams.ReceiverLng, billParams.ReceiverLat, _ = jxutils.IntCoordinate2MarsStandard(order.ConsigneeLng, order.ConsigneeLat, order.CoordinateType)
billParams.Info = fmt.Sprintf("%s第%d号订单, %s", model.VendorChineseNames[order.VendorID], order.OrderSeq, utils.FilterMb4(order.BuyerComment+"取货失败或配送遇到问题请联系18048531223禁止未配送直接完成定单"))
billParams.Info = fmt.Sprintf("%s第%d号订单, %s", model.VendorChineseNames[order.VendorID], order.OrderSeq, utils.FilterMb4("客户电话:"+order.ConsigneeMobile+","+order.BuyerComment+"取货失败或配送遇到问题请联系18048531223禁止未配送直接完成定单"))
billParams.CargoType = dadaapi.CargoTypeFresh
billParams.CargoWeight = float64(jxutils.IntWeight2Float(limitOrderWeight(order.Weight)))
billParams.CargoNum = order.GoodsCount

View File

@@ -244,7 +244,7 @@ func (c *DeliveryHandler) CreateWaybill(order *model.GoodsOrder, maxDeliveryFee
// if storeDeatail.Tel2 != "" {
// storeTel = ",门店电话:" + storeDeatail.Tel2
// }
billParams.Note = utils.FilterMb4(order.BuyerComment + "取货失败或配送遇到问题请联系18048531223禁止未配送直接完成定单")
billParams.Note = utils.FilterMb4("客户电话:" + order.ConsigneeMobile + "," + order.BuyerComment + "取货失败或配送遇到问题请联系18048531223禁止未配送直接完成定单")
billParams.GoodsDetail = string(utils.MustMarshal(goods))
billParams.GoodsPickupInfo = fmt.Sprintf("%s第%d号单", model.VendorChineseNames[order.VendorID], order.OrderSeq)
billParams.PoiSeq = fmt.Sprintf("#%d", order.OrderSeq)

View File

@@ -8,7 +8,6 @@ import (
"git.rosy.net.cn/jx-callback/business/jxutils/tasksch"
"git.rosy.net.cn/baseapi/platformapi/autonavi"
"git.rosy.net.cn/baseapi/platformapi/ebaiapi"
"git.rosy.net.cn/baseapi/utils"
"git.rosy.net.cn/jx-callback/business/jxcallback/scheduler"
@@ -269,12 +268,12 @@ func (p *PurchaseHandler) Map2Order(orderData map[string]interface{}) (order *mo
deliveryGeo := userMap["coord_amap"].(map[string]interface{})
originalLng := utils.Interface2Float64WithDefault(deliveryGeo["longitude"], 0.0) // 饿百的订单在过一段时间后,经纬度信息会变成字符串"**"
originalLat := utils.Interface2Float64WithDefault(deliveryGeo["latitude"], 0.0)
lng, lat, err2 := api.AutonaviAPI.CoordinateConvert(originalLng, originalLat, autonavi.CoordSysBaidu)
if err2 == nil {
originalLng = lng
originalLat = lat
order.CoordinateType = model.CoordinateTypeMars
}
// lng, lat, err2 := api.AutonaviAPI.CoordinateConvert(originalLng, originalLat, autonavi.CoordSysBaidu)
// if err2 == nil {
// originalLng = lng
// originalLat = lat
// order.CoordinateType = model.CoordinateTypeMars
// }
order.ConsigneeLng = jxutils.StandardCoordinate2Int(originalLng)
order.ConsigneeLat = jxutils.StandardCoordinate2Int(originalLat)