puzhibing
2026-04-08 57b2a831bb61ac6008a0e350f00efb7e8b723fd5
xp-robotaxi-map-boot/src/main/java/com/xiaopeng/map/controller/XpMapController.java
@@ -1,6 +1,8 @@
package com.xiaopeng.map.controller;
import com.alibaba.fastjson2.JSON;
import com.xiaopeng.api.dto.map.HistoryPointDto;
import com.xiaopeng.api.dto.map.OrderRouteAndFareDto;
import com.xiaopeng.api.dto.map.RouteAndFareDto;
import com.xiaopeng.api.dto.operation.LonLatDto;
@@ -91,7 +93,16 @@
                    }
                }
            }
            RouteVo routeVo = gdMapGeocodingUtil.getDistanceAndTime(dto.getOrigin(), dto.getDestination(), String.join("|", pointStrParam), fenceId,dto.getRoutePlanRule());
            List<Object> cacheList = redisService.getCacheList("VEHICLE_HISTORY_POINT_LIST:" + dto.getVin());
            List<HistoryPointDto> history = new ArrayList<>();
            if(cacheList!=null && !cacheList.isEmpty()){
                for (Object cache : cacheList) {
                    HistoryPointDto historyPointDto = JSON.parseObject(cache.toString(), HistoryPointDto.class);
                    history.add(historyPointDto);
                }
            }
            RouteVo routeVo = gdMapGeocodingUtil.getDistanceAndTime(dto.getOrigin(), dto.getDestination(), String.join("|", pointStrParam), fenceId,dto.getRoutePlanRule(), history);
            if(routeVo==null){
                return R.fail("没有找到路线");
            }
@@ -134,8 +145,15 @@
                }
            }
        }
        RouteVo routeVo = gdMapGeocodingUtil.getDistanceAndTime(dto.getOrigin(), dto.getDestination(), String.join("|", pointStrParam), fenceId,dto.getRoutePlanRule());
        List<Object> cacheList = redisService.getCacheList("VEHICLE_HISTORY_POINT_LIST:" + dto.getVin());
        List<HistoryPointDto> history = new ArrayList<>();
        if(cacheList!=null && !cacheList.isEmpty()){
            for (Object cache : cacheList) {
                HistoryPointDto historyPointDto = JSON.parseObject(cache.toString(), HistoryPointDto.class);
                history.add(historyPointDto);
            }
        }
        RouteVo routeVo = gdMapGeocodingUtil.getDistanceAndTime(dto.getOrigin(), dto.getDestination(), String.join("|", pointStrParam), fenceId,dto.getRoutePlanRule(), history);
        if(routeVo==null){
            return R.fail("没有找到路线");
        }