puzhibing
2026-03-15 c6f298dc2f39673891eb90f219f610cdde20ef24
Merge remote-tracking branch 'origin/master'
21个文件已修改
256 ■■■■■ 已修改文件
xp-robotaxi-account-boot/src/main/java/com/xiaopeng/account/constant/I18nKeyConstant.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
xp-robotaxi-account-boot/src/main/java/com/xiaopeng/account/controller/XpOperationsUserController.java 34 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
xp-robotaxi-account-boot/src/main/java/com/xiaopeng/account/service/impl/XpAppUserCouponServiceImpl.java 31 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
xp-robotaxi-account-boot/src/main/resources/i18n/messages_en_US.properties 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
xp-robotaxi-account-boot/src/main/resources/i18n/messages_zh_CN.properties 1 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
xp-robotaxi-account-boot/src/main/resources/mapper/account/XpOperationsUserNotificationMapper.xml 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
xp-robotaxi-maintenance-boot/src/main/java/com/xiaopeng/maintenance/schedule/RoutineTaskNotificationScheduleTask.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
xp-robotaxi-maintenance-boot/src/main/resources/mapper/maintenance/XpTaskMapper.xml 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
xp-robotaxi-map-boot/src/main/java/com/xiaopeng/map/constant/I18nKeyConstant.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
xp-robotaxi-map-boot/src/main/java/com/xiaopeng/map/controller/XpPointManagementController.java 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
xp-robotaxi-map-boot/src/main/java/com/xiaopeng/map/mangodb/service/impl/XpGeoFencingPolygonServiceImpl.java 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
xp-robotaxi-map-boot/src/main/java/com/xiaopeng/map/service/serviceimpl/XpElectronicFenceServiceImpl.java 72 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
xp-robotaxi-map-boot/src/main/resources/i18n/messages.properties 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
xp-robotaxi-map-boot/src/main/resources/i18n/messages_en_US.properties 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
xp-robotaxi-map-boot/src/main/resources/i18n/messages_zh_CN.properties 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
xp-robotaxi-order-boot/src/main/java/com/xiaopeng/order/service/impl/XpOrderServiceImpl.java 4 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
xp-robotaxi-vehicle-convoy-boot/src/main/java/com/xiaopeng/vehicleConvoy/constant/I18nKeyConstant.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
xp-robotaxi-vehicle-convoy-boot/src/main/java/com/xiaopeng/vehicleConvoy/controller/IndexController.java 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
xp-robotaxi-vehicle-convoy-boot/src/main/java/com/xiaopeng/vehicleConvoy/controller/XpVehicleController.java 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
xp-robotaxi-vehicle-convoy-boot/src/main/resources/i18n/messages_en_US.properties 1 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
xp-robotaxi-vehicle-convoy-boot/src/main/resources/i18n/messages_zh_CN.properties 1 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
xp-robotaxi-account-boot/src/main/java/com/xiaopeng/account/constant/I18nKeyConstant.java
@@ -49,4 +49,7 @@
    //========== 权限组相关 ==========
    String SYS_GROUP_DELETE_FAIL = "sys.group.delete.fail";
    //========== 运维人员相关 ==========
    String OPERATIONS_USER_DELETE_FLEET_BOUND = "operations.user.delete.fleet.bound";
}
xp-robotaxi-account-boot/src/main/java/com/xiaopeng/account/controller/XpOperationsUserController.java
@@ -8,16 +8,19 @@
import com.xiaopeng.account.model.dto.XpOperationsUserDTO;
import com.xiaopeng.account.model.query.XpOperationsUserPageQuery;
import com.xiaopeng.account.model.query.XpOperationsUserQuery;
import com.xiaopeng.account.service.IXpOperationsRoleService;
import com.xiaopeng.account.service.IXpOperationsUserService;
import com.xiaopeng.api.dto.account.XpOperationsUserQueryDTO;
import com.xiaopeng.api.feignClient.vehicleConvoy.XpFleetClient;
import com.xiaopeng.api.model.account.XpOperationsUser;
import com.xiaopeng.api.model.vehicleConvoy.XpFleet;
import com.xiaopeng.api.vo.account.XpOperationsUserProfileVO;
import com.xiaopeng.api.vo.account.XpOperationsUserVO;
import com.xiaopeng.api.vo.account.XpOperationsUserWithRoleVO;
import com.xiaopeng.common.core.exception.ServiceException;
import com.xiaopeng.common.core.domain.R;
import com.xiaopeng.common.core.web.page.PageInfo;
import com.xiaopeng.common.security.service.TokenService;
import com.xiaopeng.account.constant.I18nKeyConstant;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.CollectionUtils;
@@ -47,11 +50,17 @@
    private final TokenService tokenService;
    private final XpFleetClient xpFleetClient;
    @Autowired
    public XpOperationsUserController(IXpOperationsUserService xpOperationsUserService, XpOperationsRoleMapper xpOperationsRoleMapper, TokenService tokenService) {
    public XpOperationsUserController(IXpOperationsUserService xpOperationsUserService,
                                      XpOperationsRoleMapper xpOperationsRoleMapper,
                                      TokenService tokenService,
                                      XpFleetClient xpFleetClient) {
        this.xpOperationsUserService = xpOperationsUserService;
        this.xpOperationsRoleMapper = xpOperationsRoleMapper;
        this.tokenService = tokenService;
        this.xpFleetClient = xpFleetClient;
    }
    /**
@@ -209,6 +218,27 @@
    @ApiOperation(value = "运维人员管理删除", tags = {"管理后台-运维执行"})
    @DeleteMapping("/api/v1/operationsUser/deleteById")
    public R<String> deleteById(@RequestParam Long id) {
        try {
            R<XpFleet> fleetResult = xpFleetClient.getFleetByOperationsUserId(id);
            if (fleetResult == null) {
                throw new ServiceException("请求失败,请稍后重试", I18nKeyConstant.REQUEST_FAILED);
            }
            XpFleet fleet = fleetResult.getData();
            if (fleet != null && fleet.getId() != null) {
                String fleetName = com.xiaopeng.common.core.utils.StringUtils.isBlank(fleet.getFleetName())
                        ? String.valueOf(fleet.getId())
                        : fleet.getFleetName();
                throw new ServiceException(
                        "删除失败,该人员已关联车队:" + fleetName,
                        I18nKeyConstant.OPERATIONS_USER_DELETE_FLEET_BOUND,
                        new Object[]{fleetName}
                );
            }
        } catch (ServiceException e) {
            throw e;
        } catch (Exception e) {
            throw new ServiceException("请求失败,请稍后重试", I18nKeyConstant.REQUEST_FAILED);
        }
        xpOperationsUserService.removeById(id);
        return R.ok();
    }
xp-robotaxi-account-boot/src/main/java/com/xiaopeng/account/service/impl/XpAppUserCouponServiceImpl.java
@@ -5,6 +5,7 @@
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.google.common.collect.Lists;
import com.xiaopeng.account.mapper.XpAppUserCouponMapper;
import com.xiaopeng.account.model.dto.ReceiveCouponDto;
import com.xiaopeng.account.model.dto.SendCouponDto;
@@ -167,21 +168,23 @@
                    xpAppUserCoupon.setTimeJson("[{\"time\": [\"00:00-23:59\"], \"type\": 3, \"typeStr\": 0}]");
                    baseMapper.insert(xpAppUserCoupon);
                } else {
                    Long uid = 20260227200715L;
                    XpAppUserCoupon xpAppUserCoupon = new XpAppUserCoupon();
                    xpAppUserCoupon.setFullMoney(xpCoupon.getConditionalAmount());
                    xpAppUserCoupon.setMoney(xpCoupon.getAmount());
                    xpAppUserCoupon.setCouponId(dto.getCouponId());
                    xpAppUserCoupon.setAppUserId(uid);
                    xpAppUserCoupon.setExpirationTime(LocalDateTime.now().plusDays(7));
                    xpAppUserCoupon.setStatus(1);
                    xpAppUserCoupon.setCouponType(xpCoupon.getCouponType());
                    xpAppUserCoupon.setPhone(phone);
                    List<Long> uids = Lists.newArrayList(20260227200715L, 202603151057L);
                    for (Long uid : uids) {
                        XpAppUserCoupon xpAppUserCoupon = new XpAppUserCoupon();
                        xpAppUserCoupon.setFullMoney(xpCoupon.getConditionalAmount());
                        xpAppUserCoupon.setMoney(xpCoupon.getAmount());
                        xpAppUserCoupon.setCouponId(dto.getCouponId());
                        xpAppUserCoupon.setAppUserId(uid);
                        xpAppUserCoupon.setExpirationTime(LocalDateTime.now().plusDays(7));
                        xpAppUserCoupon.setStatus(1);
                        xpAppUserCoupon.setCouponType(xpCoupon.getCouponType());
                        xpAppUserCoupon.setPhone(phone);
                    xpAppUserCoupon.setCouponName(xpCoupon.getCouponName());
                    xpAppUserCoupon.setOpenCityId("0");
                    xpAppUserCoupon.setTimeJson("[{\"time\": [\"00:00-23:59\"], \"type\": 3, \"typeStr\": 0}]");
                    baseMapper.insert(xpAppUserCoupon);
                        xpAppUserCoupon.setCouponName(xpCoupon.getCouponName());
                        xpAppUserCoupon.setOpenCityId("0");
                        xpAppUserCoupon.setTimeJson("[{\"time\": [\"00:00-23:59\"], \"type\": 3, \"typeStr\": 0}]");
                        baseMapper.insert(xpAppUserCoupon);
                    }
                }
            }
        }
xp-robotaxi-account-boot/src/main/resources/i18n/messages_en_US.properties
@@ -33,6 +33,7 @@
request.failed=Request failed. Please try again later!
sms.push.failed=SMS sending failed. Please try again later!
sys.group.delete.fail=Deletion failed. This permission group has been associated with a role
operations.user.delete.fleet.bound=Delete failed. This user is associated with fleet: {0}.
account.format.error=The following account format is incorrect: {0}
account.exist=The following account already exists:{0}
account.import.error=Importing operation and maintenance personnel data anomaly
account.import.error=Importing operation and maintenance personnel data anomaly
xp-robotaxi-account-boot/src/main/resources/i18n/messages_zh_CN.properties
@@ -33,6 +33,7 @@
request.failed=请求失败,请稍后重试!
sms.push.failed=短信发送失败,请稍后重试!
sys.group.delete.fail=删除失败,该权限组已关联角色
operations.user.delete.fleet.bound=删除失败,该人员已关联车队:{0}
account.format.error=以下帐号格式不正确:{0}
account.exist=以下帐号已存在:{0}
account.import.error=导入运维人员数据异常
xp-robotaxi-account-boot/src/main/resources/mapper/account/XpOperationsUserNotificationMapper.xml
@@ -4,7 +4,7 @@
    <!-- 通用查询结果列 -->
    <sql id="Base_Column_List">
        id, notification_type, notification_content, operations_user_id, data_id, read_status, is_deleted, create_time, update_time, create_by, update_by
        id, notification_type, notification_content, operations_user_id, data_id, read_status, is_deleted, create_time, update_time, create_by, update_by,notification_ext
    </sql>
    <!-- 分页查询用户通知列表 -->
xp-robotaxi-maintenance-boot/src/main/java/com/xiaopeng/maintenance/schedule/RoutineTaskNotificationScheduleTask.java
@@ -48,7 +48,7 @@
    /**
     * 推送标题
     */
    private static final String PUSH_TITLE = "常规任务提醒";
    private static final String PUSH_TITLE = "待完成日常任务提示";
    /**
     * 通知内容模板
xp-robotaxi-maintenance-boot/src/main/resources/mapper/maintenance/XpTaskMapper.xml
@@ -86,15 +86,15 @@
        <if test="query.sortType != null">
            <if test="query.sortType == 1">
                order by t1.create_time desc, t1.task_urgency_level
                order by t1.task_urgency_level, t1.create_time desc
                <if test="query.sortRule == 2">
                    desc
                    desc, t1.create_time desc
                </if>
            </if>
            <if test="query.sortType == 2">
                order by t1.create_time desc, t2.plate_number
                order by t2.plate_number, t1.create_time desc
                <if test="query.sortRule == 2">
                    desc
                    desc, t1.create_time desc
                </if>
            </if>
            <if test="query.sortType == 3">
xp-robotaxi-map-boot/src/main/java/com/xiaopeng/map/constant/I18nKeyConstant.java
@@ -100,4 +100,9 @@
    // 点位删除-存在关联巡游点位
    String POINT_DELETE_HAS_CRUISE_PLAN_POINT = "point.delete.has.cruise.plan.point";
    // 点位启用-不在围栏运营区内
    String POINT_ENABLE_NOT_IN_OPERATING_AREA = "point.enable.not.in.operating.area";
    // 点位启用-在禁行区内
    String POINT_ENABLE_IN_PROHIBITED_AREA = "point.enable.in.prohibited.area";
}
xp-robotaxi-map-boot/src/main/java/com/xiaopeng/map/controller/XpPointManagementController.java
@@ -202,10 +202,31 @@
    public R edit(@Validated @RequestBody PointUpdateDto pointAddDto) {
        XpPoint xpPoint = xpPointService.getById(pointAddDto.getId());
        BeanUtils.copyProperties(pointAddDto, xpPoint);
        if (xpGeoFencingPolygonService.isInFence(pointAddDto.getPointLon(), pointAddDto.getPointLat(), pointAddDto.getFenceId(), "prohibited_area")) {
            return R.ok("in_prohibited_area");
        if (xpPoint == null) {
            throw new ServiceException("系统异常", I18nKeyConstant.SYSTEM_EXCEPTION);
        }
        if (Integer.valueOf(2).equals(pointAddDto.getOperationStatus()) && Integer.valueOf(5).equals(pointAddDto.getVerificationStatus())) {
            Long electronicAreaId = xpPoint.getElectronicAreaId();
            if (electronicAreaId == null) {
                throw new ServiceException("当前点位不在围栏运营区域内,不能启用。", I18nKeyConstant.POINT_ENABLE_NOT_IN_OPERATING_AREA);
            }
            XpElectronicFenceArea electronicFenceArea = xpElectronicFenceAreaService.getById(electronicAreaId);
            if (electronicFenceArea == null || electronicFenceArea.getElectronicId() == null) {
                throw new ServiceException("运营区域不存在", I18nKeyConstant.POINT_ELECTRONIC_AREA_NOT_EXIST);
            }
            if (xpPoint.getPointLon() == null || xpPoint.getPointLat() == null) {
                throw new ServiceException("系统异常", I18nKeyConstant.SYSTEM_EXCEPTION);
            }
            String fenceId = String.valueOf(electronicFenceArea.getElectronicId());
            boolean inOperatingArea = xpGeoFencingPolygonService.isInFence(xpPoint.getPointLon(), xpPoint.getPointLat(), fenceId, "operating_area");
            if (!inOperatingArea) {
                throw new ServiceException("当前点位不在围栏运营区域内,不能启用。", I18nKeyConstant.POINT_ENABLE_NOT_IN_OPERATING_AREA);
            }
            boolean inProhibitedArea = xpGeoFencingPolygonService.isInFence(xpPoint.getPointLon(), xpPoint.getPointLat(), fenceId, "prohibited_area");
            if (inProhibitedArea) {
                throw new ServiceException("当前点位在禁行区内,不能启用。", I18nKeyConstant.POINT_ENABLE_IN_PROHIBITED_AREA);
            }
        }
        xpPointService.updateById(xpPoint);
        return R.ok();
    }
xp-robotaxi-map-boot/src/main/java/com/xiaopeng/map/mangodb/service/impl/XpGeoFencingPolygonServiceImpl.java
@@ -47,11 +47,6 @@
    public  List<String> findFencesContainingPoint(GeoPoint point, String collectionName, String geoFieldName) {
        MongoCollection<Document> collection = mongoTemplate.getCollection(collectionName);
        List<String> fenceIds = new ArrayList<>();
        FindIterable<Document> documents1 = collection.find();
        for (Document document : documents1) {
            System.out.println(document);
        }
        // 查询所有包含该点的围栏
        Bson filter = Filters.geoIntersects(geoFieldName, MongoGeoFenceUtil.toGeoJsonPoint(point.getLongitude(), point.getLatitude()));
        FindIterable<Document> documents = collection.find(filter);
@@ -95,15 +90,15 @@
     * @return 是否在围栏中
     */
    public boolean isInFence(double longitude, double latitude, String fenceId, String collectionName) {
        // 创建GeoPoint对象
        GeoPoint geoPoint = new GeoPoint(longitude, latitude);
        // 调用MongoGeoFenceUtil的方法查询包含该点的围栏
        List<String> fences = findFencesContainingPoint(geoPoint, collectionName, "points");
        // 检查查询结果中是否包含指定的fenceId
        return fences.contains(fenceId);
        if (fenceId == null || fenceId.trim().isEmpty()) {
            return false;
        }
        MongoCollection<Document> collection = mongoTemplate.getCollection(collectionName);
        Bson fenceIdFilter = Filters.or(Filters.eq("fenceId", fenceId), Filters.eq("parentId", fenceId));
        Bson geoFilter = Filters.geoIntersects("points", MongoGeoFenceUtil.toGeoJsonPoint(longitude, latitude));
        Bson filter = Filters.and(fenceIdFilter, geoFilter);
        return collection.find(filter).limit(1).first() != null;
    }
}
}
xp-robotaxi-map-boot/src/main/java/com/xiaopeng/map/service/serviceimpl/XpElectronicFenceServiceImpl.java
@@ -22,6 +22,7 @@
import com.xiaopeng.map.job.base.QuartzManager;
import com.xiaopeng.map.job.base.TimeJobType;
import com.xiaopeng.map.job.jobs.ElectronicEffectJob;
import com.xiaopeng.map.mangodb.service.XpGeoFencingPolygonService;
import com.xiaopeng.map.mapper.XpElectronicFenceAreaMapper;
import com.xiaopeng.map.mapper.XpElectronicFenceMapper;
import com.xiaopeng.map.mapper.XpPointMapper;
@@ -78,6 +79,9 @@
    @Autowired
    private XpPointService xpPointService;
    @Resource
    private XpGeoFencingPolygonService xpGeoFencingPolygonService;
    @Autowired
    private XpRegionMapper xpRegionMapper;
@@ -667,17 +671,71 @@
                }
            }
        }
        //如果区域状态从停用改为启用,需将区域内的点位全部启用
        if (status ==3 && dto.getStatus() == 2 && !xpPoints.isEmpty()){
            for (XpPoint xpPoint : xpPoints) {
                xpPoint.setOperationStatus(2);
                xpPointMapper.updateById(xpPoint);
        // 围栏从已停用(3)改为启用中(2)时:同步启用点位需校验点位在运营区内且不在禁行区内
        Integer newFenceStatus = xpElectronicFence.getStatus();
        if (status != null && status == 3 && newFenceStatus != null && newFenceStatus == 2) {
            XpElectronicFenceArea operationAreaToEnable = xpElectronicFenceAreaService.lambdaQuery()
                    .eq(XpElectronicFenceArea::getElectronicId, dto.getId())
                    .eq(XpElectronicFenceArea::getAreaType, 1)
                    .orderByDesc(XpElectronicFenceArea::getId)
                    .last("limit 1")
                    .one();
            if (operationAreaToEnable == null || operationAreaToEnable.getId() == null) {
                log.warn("围栏启用同步启用点位跳过:未查询到运营区 fenceId={}", dto.getId());
            } else {
                Long operationAreaIdToEnable = operationAreaToEnable.getId();
                LambdaQueryWrapper<XpPoint> pendingEnableQuery = new LambdaQueryWrapper<>();
                pendingEnableQuery.eq(XpPoint::getElectronicAreaId, operationAreaIdToEnable)
                        .eq(XpPoint::getPointType, 1)
                        .eq(XpPoint::getOperationStatus, 3);
                List<XpPoint> pendingEnablePoints = xpPointMapper.selectList(pendingEnableQuery);
                int pendingCount = pendingEnablePoints == null ? 0 : pendingEnablePoints.size();
                if (pendingCount == 0) {
                    log.info("围栏启用同步启用点位:无待启用点位 fenceId={}, operationAreaId={}", dto.getId(), operationAreaIdToEnable);
                } else {
                    String fenceId = String.valueOf(dto.getId());
                    List<Long> enableIds = new ArrayList<>();
                    for (XpPoint pointItem : pendingEnablePoints) {
                        if (pointItem == null || pointItem.getId() == null) {
                            continue;
                        }
                        Double lon = pointItem.getPointLon();
                        Double lat = pointItem.getPointLat();
                        if (lon == null || lat == null) {
                            continue;
                        }
                        try {
                            boolean inOperatingArea = xpGeoFencingPolygonService.isInFence(lon, lat, fenceId, "operating_area");
                            if (!inOperatingArea) {
                                continue;
                            }
                            boolean inProhibitedArea = xpGeoFencingPolygonService.isInFence(lon, lat, fenceId, "prohibited_area");
                            if (inProhibitedArea) {
                                continue;
                            }
                        } catch (Exception e) {
                            log.error("围栏启用同步启用点位校验失败 fenceId={}, pointId={}", dto.getId(), pointItem.getId(), e);
                            throw new ServiceException("系统异常", I18nKeyConstant.SYSTEM_EXCEPTION);
                        }
                        enableIds.add(pointItem.getId());
                    }
                    if (CollUtil.isNotEmpty(enableIds)) {
                        xpPointService.lambdaUpdate()
                                .in(XpPoint::getId, enableIds)
                                .eq(XpPoint::getOperationStatus, 3)
                                .set(XpPoint::getOperationStatus, 2)
                                .update();
                    }
                    log.info("围栏启用同步启用点位完成 fenceId={}, pendingCount={}, enableCount={}, skipCount={}",
                            dto.getId(), pendingCount, enableIds.size(), Math.max(0, pendingCount - enableIds.size()));
                }
            }
        }
        OperationStrategyIndex oldIndex = OperationStrategyIndex.parse(oldOperationStrategy);
        OperationStrategyIndex newIndex = OperationStrategyIndex.parse(newOperationStrategy);
        boolean needAutoDisableByUnion = !oldIndex.equalsNormalized(newIndex) && oldIndex.hasAnyShrinkComparedTo(newIndex);
        // boolean needAutoDisableByUnion = !oldIndex.equalsNormalized(newIndex) && oldIndex.hasAnyShrinkComparedTo(newIndex);
        boolean needAutoDisableByUnion = true;
        List<Long> addPointIds = normalizePointIds(dto.getAddPointIdList());
        List<Long> delPointIds = normalizePointIds(dto.getDelPointIdList());
@@ -729,7 +787,7 @@
        }
        // 围栏运营时间缩短校验:若缩短后点位时间段不在新范围内,则更新为已停用(operation_status=3)
        if (needAutoDisableByUnion && operationAreaId != null) {
        if (operationAreaId != null) {
            LambdaQueryWrapper<XpPoint> pointQuery = new LambdaQueryWrapper<>();
            pointQuery.eq(XpPoint::getElectronicAreaId, operationAreaId)
                    .eq(XpPoint::getPointType, 1)
xp-robotaxi-map-boot/src/main/resources/i18n/messages.properties
@@ -40,3 +40,5 @@
point.number.lock.fail=点位编号生成繁忙,请稍后重试
point.number.parse.fail=点位编号生成失败(历史编号格式异常)
point.delete.has.cruise.plan.point=操作失败,该点位有关联的巡游计划点位
point.enable.not.in.operating.area=当前点位不在围栏运营区域内,不能启用。
point.enable.in.prohibited.area=当前点位在禁行区内,不能启用。
xp-robotaxi-map-boot/src/main/resources/i18n/messages_en_US.properties
@@ -33,3 +33,5 @@
point.number.lock.fail=Point number generation is busy, please try again later
point.number.parse.fail=Point number generation failed (invalid historical number format)
point.delete.has.cruise.plan.point=Operation failed. This point is associated with cruise plan points.
point.enable.not.in.operating.area=This point is not within the fence operating area and cannot be enabled.
point.enable.in.prohibited.area=This point is in a prohibited area and cannot be enabled.
xp-robotaxi-map-boot/src/main/resources/i18n/messages_zh_CN.properties
@@ -33,3 +33,5 @@
point.number.lock.fail=点位编号生成繁忙,请稍后重试
point.number.parse.fail=点位编号生成失败(历史编号格式异常)
point.delete.has.cruise.plan.point=操作失败,该点位有关联的巡游计划点位
point.enable.not.in.operating.area=当前点位不在围栏运营区域内,不能启用。
point.enable.in.prohibited.area=当前点位在禁行区内,不能启用。
xp-robotaxi-order-boot/src/main/java/com/xiaopeng/order/service/impl/XpOrderServiceImpl.java
@@ -713,7 +713,7 @@
     */
    private void closeOrder(XpOrder order) {
        // 更新订单状态为已完成(10)
        this.lambdaUpdate().set(XpOrder::getStatus, 10)
        this.lambdaUpdate().set(XpOrder::getStatus, 8)
                .eq(XpOrder::getId, order.getId()).update();
@@ -730,6 +730,8 @@
        sendMessageDTO.setMessage(message);
        sendMessageDTO.setAppUserId(String.valueOf(order.getAppUserId()));
        xpPushMessageClient.sendStatus(sendMessageDTO);
        //结束行程
        endTrip(order.getId(), order.getAppUserId().toString());
        log.info("运营人员取消订单成功,推送乘客消息完成");
        log.info("订单关闭成功,订单ID: {}, 操作人: {}", order.getId(), SecurityUtils.getUsername());
    }
xp-robotaxi-vehicle-convoy-boot/src/main/java/com/xiaopeng/vehicleConvoy/constant/I18nKeyConstant.java
@@ -63,4 +63,7 @@
    String VEHICLE_IMPORT_VIN_EXISTS = "vehicle.import.vin.exists";
    String VEHICLE_IMPORT_PLATE_EXISTS = "vehicle.import.plate.exists";
    // ========== 车辆删除相关 ==========
    String VEHICLE_DELETE_HAS_BOUND_FLEET = "vehicle.delete.has.bound.fleet";
}
xp-robotaxi-vehicle-convoy-boot/src/main/java/com/xiaopeng/vehicleConvoy/controller/IndexController.java
@@ -4,9 +4,11 @@
import com.xiaopeng.vehicleConvoy.model.query.IndexDataQuery;
import com.xiaopeng.vehicleConvoy.model.vo.IndexDataVO;
import com.xiaopeng.vehicleConvoy.service.IndexDataService;
import com.xiaopeng.vehicleConvoy.task.VehicleDocumentExpiryTask;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;
@@ -25,6 +27,8 @@
    @Resource
    private IndexDataService indexDataService;
    @Autowired
    private VehicleDocumentExpiryTask vehicleDocumentExpiryTask;
    @ApiOperation(value = "首页数据统计", tags = {"管理后台-首页"})
    @PostMapping("/base/v1/indexData")
@@ -34,4 +38,11 @@
        }
        return R.ok(indexDataService.getIndexData(query));
    }
    @ApiOperation(value = "车辆资质过期检查", tags = {"定时任务"})
    @PostMapping("/base/v1/vehicle/execute")
    public R<?> vehicleExecute() {
        vehicleDocumentExpiryTask.checkAndStockExpiredVehicles();
        return R.ok();
    }
}
xp-robotaxi-vehicle-convoy-boot/src/main/java/com/xiaopeng/vehicleConvoy/controller/XpVehicleController.java
@@ -17,6 +17,7 @@
import com.xiaopeng.api.model.account.XpOperationsUser;
import com.xiaopeng.api.model.maintenance.XpTask;
import com.xiaopeng.api.model.maintenance.XpTaskRule;
import com.xiaopeng.api.model.vehicleConvoy.XpFleet;
import com.xiaopeng.api.model.maintenance.XpVehicleRepair;
import com.xiaopeng.api.model.vehicleConvoy.XpFleetVehicle;
import com.xiaopeng.api.model.vehicleConvoy.XpVehicle;
@@ -96,6 +97,7 @@
    private final IXpVehicleService xpVehicleService;
    private final IXpFleetVehicleService vehicleService;
    private final IXpFleetService xpFleetService;
    private final IXpVehicleAnnualRecordService xpVehicleAnnualRecordService;
    private final XpVehiclePreparationClient xpVehiclePreparationClient;
    private final XpChargingRecordClient xpChargingRecordClient;
@@ -619,6 +621,23 @@
    @ApiOperation(value = "删除在库车辆",tags = {"管理后台-车辆管理-在库车辆管理"})
    @DeleteMapping("/api/v1/vehicle/delete/{id}")
    public R<?> delete(@ApiParam(name = "id", value = "车辆ID") @PathVariable Long id) {
        XpFleetVehicle binding = vehicleService.lambdaQuery()
                .eq(XpFleetVehicle::getVehicleId, id)
                .last("limit 1")
                .one();
        if (binding != null && binding.getFleetId() != null) {
            String fleetName = String.valueOf(binding.getFleetId());
            try {
                XpFleet fleet = xpFleetService.getById(binding.getFleetId());
                if (fleet != null && StringUtils.isNotBlank(fleet.getFleetName())) {
                    fleetName = fleet.getFleetName();
                }
            } catch (Exception e) {
                // ignore, fallback to fleetId
            }
            throw new ServiceException("当前车辆已关联车队:" + fleetName, I18nKeyConstant.VEHICLE_DELETE_HAS_BOUND_FLEET,
                    new Object[]{fleetName});
        }
        xpVehicleService.removeById(id);
        return R.ok();
    }
xp-robotaxi-vehicle-convoy-boot/src/main/resources/i18n/messages_en_US.properties
@@ -46,3 +46,4 @@
vehicle.import.vin.exists=Row {0}: VIN already exists: {1}
vehicle.import.plate.exists=Row {0}: plate number already exists: {1}
vehicle.distance.too.long=Too far away, unable to open
vehicle.delete.has.bound.fleet=This vehicle is associated with fleet: {0}.
xp-robotaxi-vehicle-convoy-boot/src/main/resources/i18n/messages_zh_CN.properties
@@ -47,3 +47,4 @@
vehicle.import.vin.exists=第{0}行车辆VIN码已存在:{1}
vehicle.import.plate.exists=第{0}行车牌号已存在:{1}
vehicle.distance.too.long=距离过远,无法打开
vehicle.delete.has.bound.fleet=当前车辆已关联车队:{0}