“mitao”
2026-03-13 4ef071c5ca167153282f756172e8ab3dc92e46a4
bugfix
7个文件已修改
62 ■■■■■ 已修改文件
xp-robotaxi-api/src/main/java/com/xiaopeng/api/factory/operation/XpCruisePlanClientFallbackFactory.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
xp-robotaxi-api/src/main/java/com/xiaopeng/api/feignClient/operation/XpCruisePlanClient.java 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
xp-robotaxi-map-boot/src/main/java/com/xiaopeng/map/controller/XpPointManagementController.java 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
xp-robotaxi-operation-boot/src/main/java/com/xiaopeng/operation/controller/XpCruisePlanController.java 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
xp-robotaxi-order-boot/src/main/resources/i18n/messages.properties 4 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
xp-robotaxi-order-boot/src/main/resources/i18n/messages_en_US.properties 4 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
xp-robotaxi-order-boot/src/main/resources/i18n/messages_zh_CN.properties 4 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
xp-robotaxi-api/src/main/java/com/xiaopeng/api/factory/operation/XpCruisePlanClientFallbackFactory.java
@@ -54,6 +54,11 @@
                return null;
            }
            @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
@@ -59,6 +59,15 @@
    @PostMapping("/inner/cruise/getCruisePlan")
    R<XpCruisePlanVehicle> getCruisePlan(@RequestParam Long vehicleId);
    /**
     * 判断点位ID列表是否存在关联的巡游计划点位
     *
     * @param pointIds 点位ID列表
     * @return 是否存在关联
     */
    @PostMapping("/inner/cruise/existsCruisePlanPointByPointIds")
    R<Boolean> existsCruisePlanPointByPointIds(@RequestBody List<Long> pointIds);
}
xp-robotaxi-map-boot/src/main/java/com/xiaopeng/map/controller/XpPointManagementController.java
@@ -4,10 +4,10 @@
import com.xiaopeng.api.dto.operation.PointAddDto;
import com.xiaopeng.api.dto.operation.PointUpdateDto;
import com.xiaopeng.api.dto.operation.XpPointEnableDisableDto;
import com.xiaopeng.api.model.operation.XpCruisePlanPoint;
import com.xiaopeng.api.model.operation.XpElectronicFence;
import com.xiaopeng.api.model.operation.XpElectronicFenceArea;
import com.xiaopeng.api.model.operation.XpPoint;
import com.xiaopeng.api.feignClient.operation.XpCruisePlanClient;
import com.xiaopeng.api.query.operation.PointListQuery;
import com.xiaopeng.api.query.operation.PointPageListListQuery;
import com.xiaopeng.map.constant.I18nKeyConstant;
@@ -18,14 +18,12 @@
import com.xiaopeng.common.core.web.page.PageInfo;
import com.xiaopeng.api.dto.map.XpPointExportExcelQuery;
import com.xiaopeng.map.exportExcel.XpPointExportExcel;
import com.xiaopeng.map.mapper.XpCruisePlanPointMapper;
import com.xiaopeng.map.mangodb.service.XpGeoFencingPolygonService;
import com.xiaopeng.map.service.XpElectronicFenceAreaService;
import com.xiaopeng.map.service.XpElectronicFenceService;
import com.xiaopeng.map.service.XpPointService;
import cn.afterturn.easypoi.excel.ExcelExportUtil;
import cn.afterturn.easypoi.excel.entity.ExportParams;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
@@ -72,7 +70,7 @@
    @Resource
    private XpGeoFencingPolygonService xpGeoFencingPolygonService;
    @Resource
    private XpCruisePlanPointMapper xpCruisePlanPointMapper;
    private XpCruisePlanClient xpCruisePlanClient;
    @ApiOperation(value = "获取所有运营中的区域", response = XpElectronicFenceArea.class)
@@ -183,10 +181,11 @@
        if (pointIds.isEmpty()) {
            return R.ok();
        }
        Long relatedCount = xpCruisePlanPointMapper.selectCount(
                new LambdaQueryWrapper<XpCruisePlanPoint>().in(XpCruisePlanPoint::getPointId, pointIds)
        );
        if (relatedCount != null && relatedCount > 0) {
        R<Boolean> existsResult = xpCruisePlanClient.existsCruisePlanPointByPointIds(pointIds);
        if (existsResult == null || existsResult.getData() == null) {
            throw new ServiceException("系统异常", I18nKeyConstant.SYSTEM_EXCEPTION);
        }
        if (Boolean.TRUE.equals(existsResult.getData())) {
            throw new ServiceException("操作失败,该点位有关联的巡游点位", I18nKeyConstant.POINT_DELETE_HAS_CRUISE_PLAN_POINT);
        }
        xpPointService.removeBatchByIds(pointIds);
xp-robotaxi-operation-boot/src/main/java/com/xiaopeng/operation/controller/XpCruisePlanController.java
@@ -41,6 +41,7 @@
import io.swagger.annotations.ApiParam;
import java.util.List;
import java.util.Objects;
import java.util.stream.Collectors;
/**
@@ -227,5 +228,23 @@
        xpCruiseOrder.setEndLat(xpPoint.getPointLat());
        return R.ok(xpCruiseOrder);
    }
}
    /**
     * 判断点位ID列表是否存在关联的巡游计划点位(内部接口)
     */
    @PostMapping("/inner/cruise/existsCruisePlanPointByPointIds")
    public R<Boolean> existsCruisePlanPointByPointIds(@RequestBody List<Long> pointIds) {
        List<Long> distinctPointIds = pointIds == null
                ? java.util.Collections.emptyList()
                : pointIds.stream().filter(Objects::nonNull).distinct().collect(Collectors.toList());
        if (distinctPointIds.isEmpty()) {
            return R.ok(Boolean.FALSE);
        }
        XpCruisePlanPoint exists = xpCruisePlanPointService.getOne(
                new LambdaQueryWrapper<XpCruisePlanPoint>()
                        .in(XpCruisePlanPoint::getPointId, distinctPointIds)
                        .last("limit 1")
        );
        return R.ok(exists != null);
    }
}
xp-robotaxi-order-boot/src/main/resources/i18n/messages.properties
@@ -1,6 +1,6 @@
# 中文
order.cancel.failed=当前订单状态不允许取消,只有待接单、待出发、接驾中状态的订单可以取消
order.close.failed=当前订单状态不允许关闭,只有待付款、待评价状态的订单可以关闭
order.cancel.failed=当前订单状态不允许取消
order.close.failed=当前订单状态不允许关闭
order.not.exists=订单不存在
order.reassign.failed=当前订单状态不允许改派,只有待接单、待出发、接驾中状态的订单可以改派
order.reassign.vehicle.failed=新车辆与原车辆相同,无需改派
xp-robotaxi-order-boot/src/main/resources/i18n/messages_en_US.properties
@@ -1,6 +1,6 @@
# English (US)
order.cancel.failed=The current order status cannot be cancelled. Only orders in the status of "pending order acceptance", "pending Departure", or "Pick-up in progress" can be cancelled
order.close.failed=The current order status cannot be closed. Only orders in the status of pending payment or evaluation can be closed
order.cancel.failed=The current order status cannot be cancelled.
order.close.failed=The current order status cannot be closed.
order.not.exists=The order does not exist.
order.reassign.failed=The current order status does not allow for rescheduled orders. Only orders in the status of pending acceptance, pending departure, or pending acceptance can be rescheduled
order.reassign.vehicle.failed=The new vehicle is the same as the original one and does not need to be reassigned
xp-robotaxi-order-boot/src/main/resources/i18n/messages_zh_CN.properties
@@ -1,6 +1,6 @@
# 中文
order.cancel.failed=当前订单状态不允许取消,只有待接单、待出发、接驾中状态的订单可以取消
order.close.failed=当前订单状态不允许关闭,只有待付款、待评价状态的订单可以关闭
order.cancel.failed=当前订单状态不允许取消
order.close.failed=当前订单状态不允许关闭
order.not.exists=订单不存在
order.reassign.failed=当前订单状态不允许改派,只有待接单、待出发、接驾中状态的订单可以改派
order.reassign.vehicle.failed=新车辆与原车辆相同,无需改派