From 57b2a831bb61ac6008a0e350f00efb7e8b723fd5 Mon Sep 17 00:00:00 2001
From: puzhibing <393733352@qq.com>
Date: 星期三, 08 四月 2026 20:51:17 +0800
Subject: [PATCH] 修改获取轨迹的参数

---
 xp-robotaxi-map-boot/src/main/java/com/xiaopeng/map/utils/GDMapGeocodingUtil.java |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/xp-robotaxi-map-boot/src/main/java/com/xiaopeng/map/utils/GDMapGeocodingUtil.java b/xp-robotaxi-map-boot/src/main/java/com/xiaopeng/map/utils/GDMapGeocodingUtil.java
index 41c4da5..5d2e8d8 100644
--- a/xp-robotaxi-map-boot/src/main/java/com/xiaopeng/map/utils/GDMapGeocodingUtil.java
+++ b/xp-robotaxi-map-boot/src/main/java/com/xiaopeng/map/utils/GDMapGeocodingUtil.java
@@ -3,6 +3,7 @@
 import com.alibaba.fastjson2.JSON;
 import com.alibaba.fastjson2.JSONArray;
 import com.alibaba.fastjson2.JSONObject;
+import com.xiaopeng.api.dto.map.HistoryPointDto;
 import com.xiaopeng.api.dto.operation.LonLatDto;
 import com.xiaopeng.api.vo.operation.RouteVo;
 import com.xiaopeng.common.core.utils.HttpUtils;
@@ -47,7 +48,7 @@
      * @return
      * @throws Exception
      */
-    public RouteVo getDistanceAndTime(LonLatDto start, LonLatDto end,String avoidRoads,String fenceId,Integer routePlanRule)  {
+    public RouteVo getDistanceAndTime(LonLatDto start, LonLatDto end,String avoidRoads,String fenceId,Integer routePlanRule, List<HistoryPointDto> history)  {
         RouteVo routeVo = new RouteVo();
 
         String url = "https://tsapi.amap.com/v1/route/price?key=" + key + "&extensions=all&start=" + start.getLongitude() + "," + start.getLatitude();
@@ -62,6 +63,9 @@
         if(routePlanRule!=null){
             params.put("strategy", routePlanRule);
         }
+        if(null != history && !history.isEmpty()){
+            params.put("history", history);
+        }
         log.info("高德地图接口:{}", url);
         log.info("高德地图参数:{}", params);
         String post = HttpUtils.post(url, JSON.toJSONString(params));

--
Gitblit v1.7.1