From 80854d6d5bb31fbb6ef3f460402d12849a8b7122 Mon Sep 17 00:00:00 2001 From: richboo111 Date: Thu, 11 Jan 2024 16:59:04 +0800 Subject: [PATCH 1/5] 1 --- business/partner/delivery/uupt/waybill.go | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/business/partner/delivery/uupt/waybill.go b/business/partner/delivery/uupt/waybill.go index ed194c67f..543575426 100644 --- a/business/partner/delivery/uupt/waybill.go +++ b/business/partner/delivery/uupt/waybill.go @@ -327,9 +327,23 @@ func getOrderPrice(order *model.GoodsOrder) (orderPrice *uuptapi.GetOrderPriceRe } else { tempWeight = int(order.Weight / 1000) } + + //地址特殊判断 + cityName := store.CityName + districtName := store.DistrictName + address := "" + if !strings.Contains(store.Address, cityName) { //城市 + address += cityName + } + if !strings.Contains(store.Address, districtName) { //行政区 + address += districtName + } + address += store.Address + globals.SugarLogger.Debugf("uupt test address=%s", address) + param := map[string]interface{}{ "origin_id": order.VendorOrderID, - "from_address": store.Address, + "from_address": address, "from_usernote": "京西菜市(" + store.Store.Name + ")", "to_address": order.ConsigneeAddress, "city_name": store.CityName, From 744a0f51b8235f03af07c19c042a03cc8860d91b Mon Sep 17 00:00:00 2001 From: richboo111 Date: Thu, 11 Jan 2024 17:10:31 +0800 Subject: [PATCH 2/5] 1 --- business/partner/delivery/uupt/waybill.go | 1 + 1 file changed, 1 insertion(+) diff --git a/business/partner/delivery/uupt/waybill.go b/business/partner/delivery/uupt/waybill.go index 543575426..252f9e0f8 100644 --- a/business/partner/delivery/uupt/waybill.go +++ b/business/partner/delivery/uupt/waybill.go @@ -339,6 +339,7 @@ func getOrderPrice(order *model.GoodsOrder) (orderPrice *uuptapi.GetOrderPriceRe address += districtName } address += store.Address + globals.SugarLogger.Debugf("uupt test CityName=%s, DistrictName=%s", cityName, districtName) globals.SugarLogger.Debugf("uupt test address=%s", address) param := map[string]interface{}{ From da3f4ed3adc9de9fdee3610e775ad72ea4bf98ce Mon Sep 17 00:00:00 2001 From: richboo111 Date: Thu, 11 Jan 2024 17:17:40 +0800 Subject: [PATCH 3/5] 1 --- business/partner/delivery/uupt/waybill.go | 1 + 1 file changed, 1 insertion(+) diff --git a/business/partner/delivery/uupt/waybill.go b/business/partner/delivery/uupt/waybill.go index 252f9e0f8..8aed1e110 100644 --- a/business/partner/delivery/uupt/waybill.go +++ b/business/partner/delivery/uupt/waybill.go @@ -355,6 +355,7 @@ func getOrderPrice(order *model.GoodsOrder) (orderPrice *uuptapi.GetOrderPriceRe "to_lng": toLng, "goods_weight": tempWeight, } + globals.SugarLogger.Debugf("uupt test param=%s", utils.Format4Output(param, false)) if orderPrice, err = api.UuAPI.GetOrderPrice(param); err != nil { return nil, err From 4f335be36376a35b2b55871d9e919ee1d70b23ad Mon Sep 17 00:00:00 2001 From: richboo111 Date: Thu, 11 Jan 2024 17:25:13 +0800 Subject: [PATCH 4/5] 1 --- business/partner/delivery/uupt/waybill.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/business/partner/delivery/uupt/waybill.go b/business/partner/delivery/uupt/waybill.go index 8aed1e110..60838c6bf 100644 --- a/business/partner/delivery/uupt/waybill.go +++ b/business/partner/delivery/uupt/waybill.go @@ -313,8 +313,8 @@ func getOrderPrice(order *model.GoodsOrder) (orderPrice *uuptapi.GetOrderPriceRe // toLat = coords[1].Lat // toLng = coords[1].Lng //} - fromLat = jxutils.IntCoordinate2Standard(store.Lng) - fromLng = jxutils.IntCoordinate2Standard(store.Lat) + fromLat = jxutils.IntCoordinate2Standard(store.Lat) + fromLng = jxutils.IntCoordinate2Standard(store.Lng) toLat = jxutils.IntCoordinate2Standard(order.ConsigneeLat) toLng = jxutils.IntCoordinate2Standard(order.ConsigneeLng) From d48e46be58185bf657e60d4555524a1e6b4162ca Mon Sep 17 00:00:00 2001 From: richboo111 Date: Thu, 11 Jan 2024 17:27:26 +0800 Subject: [PATCH 5/5] 1 --- business/partner/delivery/uupt/waybill.go | 3 --- 1 file changed, 3 deletions(-) diff --git a/business/partner/delivery/uupt/waybill.go b/business/partner/delivery/uupt/waybill.go index 60838c6bf..ba5cb80e0 100644 --- a/business/partner/delivery/uupt/waybill.go +++ b/business/partner/delivery/uupt/waybill.go @@ -339,8 +339,6 @@ func getOrderPrice(order *model.GoodsOrder) (orderPrice *uuptapi.GetOrderPriceRe address += districtName } address += store.Address - globals.SugarLogger.Debugf("uupt test CityName=%s, DistrictName=%s", cityName, districtName) - globals.SugarLogger.Debugf("uupt test address=%s", address) param := map[string]interface{}{ "origin_id": order.VendorOrderID, @@ -355,7 +353,6 @@ func getOrderPrice(order *model.GoodsOrder) (orderPrice *uuptapi.GetOrderPriceRe "to_lng": toLng, "goods_weight": tempWeight, } - globals.SugarLogger.Debugf("uupt test param=%s", utils.Format4Output(param, false)) if orderPrice, err = api.UuAPI.GetOrderPrice(param); err != nil { return nil, err