puzhibing
2026-03-13 b1df51257f91e3e3c9a48ee138d167b90816e285
修改bug
4个文件已修改
67 ■■■■■ 已修改文件
xp-robotaxi-api/src/main/java/com/xiaopeng/api/factory/operation/XpCruisePlanClientFallbackFactory.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
xp-robotaxi-api/src/main/java/com/xiaopeng/api/feignClient/operation/XpCruisePlanClient.java 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
xp-robotaxi-operation-boot/src/main/java/com/xiaopeng/operation/controller/XpCruisePlanController.java 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
xp-robotaxi-order-boot/src/main/java/com/xiaopeng/order/service/impl/XpOrderServiceImpl.java 32 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
xp-robotaxi-api/src/main/java/com/xiaopeng/api/factory/operation/XpCruisePlanClientFallbackFactory.java
@@ -6,6 +6,7 @@
import com.xiaopeng.api.dto.order.HistoryStartPointsDto;
import com.xiaopeng.api.feignClient.operation.XpCruisePlanClient;
import com.xiaopeng.api.feignClient.operation.XpPointClient;
import com.xiaopeng.api.model.operation.XpCruisePlanPoint;
import com.xiaopeng.api.model.operation.XpCruisePlanVehicle;
import com.xiaopeng.api.model.operation.XpElectronicFenceArea;
import com.xiaopeng.api.model.operation.XpPoint;
@@ -55,6 +56,12 @@
            }
            @Override
            public R<List<XpCruisePlanPoint>> getCruisePlanPointList(Long vehicleId) {
                log.error("XpCruisePlanClientFallbackFactory getCruisePlanPointList error:{}", cause.getMessage());
                return R.fail("获取巡游计划点位列表失败:" + cause.getMessage());
            }
            @Override
            public R<Boolean> existsCruisePlanPointByPointIds(List<Long> pointIds) {
                log.error("XpCruisePlanClientFallbackFactory existsCruisePlanPointByPointIds error:{}", cause.getMessage());
                return R.fail("查询巡游计划点位关联关系失败");
xp-robotaxi-api/src/main/java/com/xiaopeng/api/feignClient/operation/XpCruisePlanClient.java
@@ -60,6 +60,16 @@
    R<XpCruisePlanVehicle> getCruisePlan(@RequestParam Long vehicleId);
    /**
     * 获取巡游计划点位列表
     * @param vehicleId
     * @return
     */
    @PostMapping("/inner/cruise/getCruisePlanPointList")
    R<List<XpCruisePlanPoint>> getCruisePlanPointList(@RequestParam Long vehicleId);
    /**
     * 判断点位ID列表是否存在关联的巡游计划点位
     *
     * @param pointIds 点位ID列表
xp-robotaxi-operation-boot/src/main/java/com/xiaopeng/operation/controller/XpCruisePlanController.java
@@ -165,6 +165,24 @@
        return R.ok(plan);
    }
    /**
     * 获取巡游计划点位列表
     * @param vehicleId
     * @return
     */
    @PostMapping("/inner/cruise/getCruisePlanPointList")
    public R<List<XpCruisePlanPoint>> getCruisePlanPointList(@RequestParam Long vehicleId) {
        // 先找计划
        XpCruisePlanVehicle plan = xpCruisePlanVehicleService.getOne(new LambdaQueryWrapper<XpCruisePlanVehicle>().eq(XpCruisePlanVehicle::getVehicleId, vehicleId));
        // 找对应的多个点位
        List<XpCruisePlanPoint> planPointList = xpCruisePlanPointService.list(new LambdaQueryWrapper<XpCruisePlanPoint>().eq(XpCruisePlanPoint::getCruisePlanId, plan.getCruisePlanId()).orderByAsc(XpCruisePlanPoint::getSortOrder));
        return R.ok(planPointList);
    }
    /**
     * 获取巡游订单数据
     * @return
xp-robotaxi-order-boot/src/main/java/com/xiaopeng/order/service/impl/XpOrderServiceImpl.java
@@ -2013,16 +2013,28 @@
        xpCruiseOrder.setStartLat(vehiclePosition.getPoint().getY());
        // 完成的直接走终点   终止的走起点
        if (temp == 0) {
            xpCruiseOrder.setEndPointId(xpCruiseOrders.getStartPointId());
            xpCruiseOrder.setEndPointName(xpCruiseOrders.getStartPointName());
            xpCruiseOrder.setEndLon(xpCruiseOrders.getStartLon());
            xpCruiseOrder.setEndLat(xpCruiseOrders.getStartLat());
        } else {
            xpCruiseOrder.setEndPointId(xpCruiseOrders.getEndPointId());
            xpCruiseOrder.setEndPointName(xpCruiseOrders.getEndPointName());
            xpCruiseOrder.setEndLon(xpCruiseOrders.getEndLon());
            xpCruiseOrder.setEndLat(xpCruiseOrders.getEndLat());
        if(null != xpCruiseOrders){
            if (temp == 0) {
                xpCruiseOrder.setEndPointId(xpCruiseOrders.getStartPointId());
                xpCruiseOrder.setEndPointName(xpCruiseOrders.getStartPointName());
                xpCruiseOrder.setEndLon(xpCruiseOrders.getStartLon());
                xpCruiseOrder.setEndLat(xpCruiseOrders.getStartLat());
            } else {
                xpCruiseOrder.setEndPointId(xpCruiseOrders.getEndPointId());
                xpCruiseOrder.setEndPointName(xpCruiseOrders.getEndPointName());
                xpCruiseOrder.setEndLon(xpCruiseOrders.getEndLon());
                xpCruiseOrder.setEndLat(xpCruiseOrders.getEndLat());
            }
        }else{
            // 先找计划
            List<XpCruisePlanPoint> planPointList = xpCruisePlanClient.getCruisePlanPointList(vehicle.getId()).getData();
            XpCruisePlanPoint xpCruisePlanPoint = planPointList.get(0);
            Long endPointId = xpCruisePlanPoint.getPointId();
            XpPoint endPoint = xpPointClient.queryById(endPointId).getData();
            xpCruiseOrder.setEndPointId(endPointId);
            xpCruiseOrder.setEndPointName(endPoint.getPointName());
            xpCruiseOrder.setEndLon(endPoint.getPointLon());
            xpCruiseOrder.setEndLat(endPoint.getPointLat());
        }