无关风月
2026-02-24 fbe3cd7c2b355df7848a7caac3436a83519ab1e9
Merge remote-tracking branch 'origin/master'
14个文件已修改
159 ■■■■■ 已修改文件
xp-robotaxi-automatic-pilot-boot/src/main/java/com/xiaopeng/automaticPilot/controller/OrderMissionController.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
xp-robotaxi-automatic-pilot-boot/src/main/java/com/xiaopeng/automaticPilot/service/KafkaConsumerService.java 66 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
xp-robotaxi-itinerary-boot/src/main/java/com/xiaopeng/itinerary/config/MyLocaleResolver.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
xp-robotaxi-itinerary-boot/src/main/java/com/xiaopeng/itinerary/service/impl/XpPricingServiceImpl.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
xp-robotaxi-itinerary-boot/src/main/resources/i18n/messages.properties 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
xp-robotaxi-itinerary-boot/src/main/resources/i18n/messages_en_US.properties 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
xp-robotaxi-itinerary-boot/src/main/resources/i18n/messages_zh_CN.properties 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
xp-robotaxi-maintenance-boot/src/main/java/com/xiaopeng/maintenance/controller/XpVehicleOperationsController.java 4 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
xp-robotaxi-operation-boot/src/main/java/com/xiaopeng/operation/controller/XpPricingController.java 36 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
xp-robotaxi-operation-boot/src/main/resources/i18n/messages.properties 1 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
xp-robotaxi-operation-boot/src/main/resources/i18n/messages_en_US.properties 1 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
xp-robotaxi-operation-boot/src/main/resources/i18n/messages_zh_CN.properties 1 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
xp-robotaxi-order-boot/src/main/java/com/xiaopeng/order/model/vo/XpOrderDetailVO.java 30 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
xp-robotaxi-order-boot/src/main/java/com/xiaopeng/order/service/impl/XpOrderServiceImpl.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
xp-robotaxi-automatic-pilot-boot/src/main/java/com/xiaopeng/automaticPilot/controller/OrderMissionController.java
@@ -54,7 +54,7 @@
        long sequence = snowFlake.nextId();
        MqttPublishDto mqttPublishDto = xpuUtil.cloudCreateOrder(task, dto.getVin(),sequence);
        if (mqttPublishDto.getCode()== 200) {
            // 修改车子为微单状态
            // 修改车子为接单状态
            xpVehicleClient.updateVehicleStatus(new UpdateVehicleStateDto(dto.getVin(),1));
            return R.ok(true);
xp-robotaxi-automatic-pilot-boot/src/main/java/com/xiaopeng/automaticPilot/service/KafkaConsumerService.java
@@ -91,7 +91,6 @@
    private UserVehicleClient userVehicleClient;
    /**
     * 消费消息 - XPU上报Robotaxi云端的消息topic(高优先级)
     *
@@ -115,7 +114,7 @@
     * @param msgContent
     * @param message
     */
    public void handleXPUMessage(MsgContent msgContent, String message){
    public void handleXPUMessage(MsgContent msgContent, String message) {
        RtMsgHeader header = msgContent.getHeader();
        MessageType type = header.getType();
        //处理请求消息
@@ -186,15 +185,15 @@
        }
        //消息应答
        if(MessageType.MESSAGE_TYPE_RESPONSE == type){
        if (MessageType.MESSAGE_TYPE_RESPONSE == type) {
            com.xiaopeng.api.vo.automaticPilot.proto.up.ResponseMessage resposne = msgContent.getContent_detail().getObject("resposne", com.xiaopeng.api.vo.automaticPilot.proto.up.ResponseMessage.class);
            com.xiaopeng.api.vo.automaticPilot.proto.up.StatusCode code = resposne.getCode();
            Long requestSeq = resposne.getRequest_seq();
            if(code == com.xiaopeng.api.vo.automaticPilot.proto.up.StatusCode.OK){
            if (code == com.xiaopeng.api.vo.automaticPilot.proto.up.StatusCode.OK) {
                Object sequence = redisTemplate.opsForValue().get(requestSeq);
                if(sequence!=null){
                if (sequence != null) {
                    String[] split = sequence.toString().split("_");
                    if(split[0].equals("pushOrder")){
                    if (split[0].equals("pushOrder")) {
                        PopOrderDto dto = new PopOrderDto();
                        dto.setOrderId(Long.valueOf(split[1]));
                        dto.setXpVehicleVin(split[2]);
@@ -204,9 +203,6 @@
            }
        }
    }
    /**
@@ -314,22 +310,31 @@
                userVehicleClient.cancelTaxiPassenger(cancelTaxiPassengerVo);
            }
            // 取消订单
            R<?> r = xpOrderClient.cancelOrder(String.valueOf(xpOrder.getId()));
            if (r.getCode() == R.SUCCESS){
                log.info("取消订单成功");
                // TODO 重新派单
                ReassignOrderDTO reassignOrderDTO = new ReassignOrderDTO();
                reassignOrderDTO.setUid(xpOrder.getAppUserId().toString());
                reassignOrderDTO.setOrderNo(xpOrder.getOrderNumber());
                reassignOrderDTO.setCount(10);
                RealtimePose pose = systemRuntimeStatus.getPose();
                Wgs naviPose = pose.getNavi_pose();
                Double latitude = naviPose.getLatitude();
                Double longitude = naviPose.getLongitude();
                reassignOrderDTO.setLongitude(longitude);
                reassignOrderDTO.setLatitude(latitude);
                reassignOrderClient.reassignOrder(reassignOrderDTO);
            }
//            R<?> r = xpOrderClient.cancelOrder(String.valueOf(xpOrder.getId()));
//            if (r.getCode() == R.SUCCESS){
            log.info("取消订单成功");
            // TODO 重新派单
            ReassignOrderDTO reassignOrderDTO = new ReassignOrderDTO();
            reassignOrderDTO.setUid(xpOrder.getAppUserId().toString());
            reassignOrderDTO.setOrderNo(xpOrder.getOrderNumber());
            reassignOrderDTO.setCount(10);
            RealtimePose pose = systemRuntimeStatus.getPose();
            Wgs naviPose = pose.getNavi_pose();
            Double latitude = naviPose.getLatitude();
            Double longitude = naviPose.getLongitude();
            reassignOrderDTO.setLongitude(longitude);
            reassignOrderDTO.setLatitude(latitude);
            reassignOrderClient.reassignOrder(reassignOrderDTO);
//            }
        }
    }
@@ -556,9 +561,9 @@
        snowFlake.withStartTimestamp(1420041600000L);
        long sequence = snowFlake.nextId();
        // 处理数据
        redisTemplate.opsForValue().set(sequence,"pushOrder_"+orderId+"_"+vin,30, TimeUnit.MINUTES);
        redisTemplate.opsForValue().set(sequence, "pushOrder_" + orderId + "_" + vin, 30, TimeUnit.MINUTES);
        //开发发送请求到XPU
        xpuUtil.cloudOrderOperation(orderOperation, vin,sequence);
        xpuUtil.cloudOrderOperation(orderOperation, vin, sequence);
    }
@@ -662,12 +667,13 @@
     * @param orderId
     * @param status
     */
    public void buildPushOrderStatus(String orderId, OrderStatusEnum status, Long sequence){
        if(orderId.contains("XU")){
    public void buildPushOrderStatus(String orderId, OrderStatusEnum status, Long sequence) {
        if (orderId.contains("XU")) {
            //巡游单
            //响应消息
            // TODO 1.处理结束当前巡游订单  2.创建新的巡游订单 返航  3.调用xpu车机接口  (判断是返航还是正常  返航需要存储之前的订单id)
            responseMessage(sequence, "");
        }else{
        } else {
            //普通单
            R<XpOrder> xpOrderR = xpOrderClient.queryOrderById(Long.parseLong(orderId));
            XpOrder xpOrder = xpOrderR.getData();
xp-robotaxi-itinerary-boot/src/main/java/com/xiaopeng/itinerary/config/MyLocaleResolver.java
@@ -24,6 +24,9 @@
        if (StringUtils.isEmpty(language)) {
            locale = Locale.getDefault();
        }
        if(language==null){
            language="1";
        }
        //如果请求不为空 
        //If the request is not empty.
        if (language.equals("1")) {
xp-robotaxi-itinerary-boot/src/main/java/com/xiaopeng/itinerary/service/impl/XpPricingServiceImpl.java
@@ -426,7 +426,7 @@
        XpPoint xpPoint = xpPointService.getById(dto.getStartPointId());
        // 终点
        XpPoint endXpPoint = xpPointService.getById(dto.getStartPointId());
        XpPoint endXpPoint = xpPointService.getById(dto.getEndPointId());
        // 判断点位是否在运营区域内
        LocalTime now = LocalTime.now();
xp-robotaxi-itinerary-boot/src/main/resources/i18n/messages.properties
@@ -1,2 +1,4 @@
# 中文
path.not.found=?????
to.work= ??????????,??????
welcome.message=欢迎来到我们的应用程序!
xp-robotaxi-itinerary-boot/src/main/resources/i18n/messages_en_US.properties
@@ -1,2 +1,4 @@
# English (US)
path.not.found=Path does not exist
to.work=\ The current pick-up and drop-off points are too close to each other. It is recommended to walk there
welcome.message=Welcome to our application!
xp-robotaxi-itinerary-boot/src/main/resources/i18n/messages_zh_CN.properties
@@ -1,2 +1,4 @@
# 中文
path.not.found=?????
to.work=\ ??????????,??????
welcome.message=欢迎来到我们的应用程序!
xp-robotaxi-maintenance-boot/src/main/java/com/xiaopeng/maintenance/controller/XpVehicleOperationsController.java
@@ -37,9 +37,9 @@
    private XpVehicleClient xpVehicleClient;
    /**
     * 车辆详情-车辆调度-发车
     * 车辆详情-车辆调度-发车 收车
     */
    @ApiOperation(value = "车辆运维-车辆调度-发车", tags = {"运维APP-车辆管理"})
    @ApiOperation(value = "车辆运维-车辆调度-发车/收车", tags = {"运维APP-车辆管理"})
    @PostMapping("/api/v1/vehicle/vehicleDispatchDeparture")
    public R<String> vehicleDispatchDeparture(@RequestBody VehicleDispatchDepartureDTO dto) {
        // 查询车辆
xp-robotaxi-operation-boot/src/main/java/com/xiaopeng/operation/controller/XpPricingController.java
@@ -1,10 +1,14 @@
package com.xiaopeng.operation.controller;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.xiaopeng.api.dto.account.UserResourcesDto;
import com.xiaopeng.api.dto.map.RouteAndFareDto;
import com.xiaopeng.api.dto.operation.LonLatDto;
import com.xiaopeng.api.feignClient.account.UserResourcesClient;
import com.xiaopeng.api.model.operation.XpPricing;
import com.xiaopeng.api.model.operation.XpWhitelist;
import com.xiaopeng.api.vo.operation.RouteAndFareVo;
import com.xiaopeng.common.core.domain.R;
import com.xiaopeng.common.core.exception.ServiceException;
@@ -17,6 +21,7 @@
import com.xiaopeng.operation.dto.XpOrderDto;
import com.xiaopeng.operation.query.PricingPageListQuery;
import com.xiaopeng.operation.service.IXpGeoQueryEntityService;
import com.xiaopeng.operation.service.IXpWhitelistService;
import com.xiaopeng.operation.service.XpPricingService;
import com.xiaopeng.operation.vo.PricingPageListVO;
import com.xiaopeng.operation.vo.SaveOrderVo;
@@ -47,11 +52,15 @@
    private final XpPricingService xpPricingService;
    private final IXpGeoQueryEntityService xpGeoQueryEntityService;
    private final UserResourcesClient userResourcesClient;
    private final IXpWhitelistService xpWhitelistService;
    public XpPricingController(XpPricingService xpPricingService, IXpGeoQueryEntityService xpGeoQueryEntityService) {
    public XpPricingController(XpPricingService xpPricingService, IXpGeoQueryEntityService xpGeoQueryEntityService, UserResourcesClient userResourcesClient, IXpWhitelistService xpWhitelistService) {
        this.xpPricingService = xpPricingService;
        this.xpGeoQueryEntityService = xpGeoQueryEntityService;
        this.userResourcesClient = userResourcesClient;
        this.xpWhitelistService = xpWhitelistService;
    }
@@ -102,6 +111,31 @@
    /**
     * 获取用户是否在白名单中
     */
    @PostMapping("/base/v1/mini-program/pricing/isInWhiteList")
    @ApiOperation(value = "获取用户是否在白名单中", tags = {"小程序-获取用户是否在白名单中"}, response = Boolean.class)
    @XpClientCheck(checkToken = false, checkOtpToken = true)
    public R<Boolean> isInWhiteList(HttpServletRequest request) {
        String uid = request.getHeader("XP-Uid");
        UserResourcesDto baseUserByUid = userResourcesClient.getBaseUserByUid(uid);
        if (baseUserByUid!=null) {
            try {
                Object data = baseUserByUid.getData();
                String phone = JSONObject.parseObject(data.toString()).getString("mobile");
                long count = xpWhitelistService.count(new LambdaQueryWrapper<XpWhitelist>().eq(XpWhitelist::getAccount, phone).eq(XpWhitelist::getStatus, 1));
                return R.ok(count>0);
            }catch (Exception e){
                log.error("获取用户信息失败: {}", e.getMessage());
                return R.ok(false);
            }
        }
        return R.ok(false);
    }
    /**
     * 保存信息
     * @param
     * @return
xp-robotaxi-operation-boot/src/main/resources/i18n/messages.properties
@@ -18,3 +18,4 @@
pricing.json.invalid=价格配置JSON格式不正确
pricing.rule.empty=价格规则不能为空
no.current.point=?????????
path.not.found=?????
xp-robotaxi-operation-boot/src/main/resources/i18n/messages_en_US.properties
@@ -18,3 +18,4 @@
pricing.json.invalid=Invalid JSON format for pricing configuration
pricing.rule.empty=Price rule cannot be empty
no.current.point=The current location is not open for service
path.not.found=Path does not exist
xp-robotaxi-operation-boot/src/main/resources/i18n/messages_zh_CN.properties
@@ -18,3 +18,4 @@
pricing.json.invalid=价格配置JSON格式不正确
pricing.rule.empty=价格规则不能为空
no.current.point=?????????
path.not.found=?????
xp-robotaxi-order-boot/src/main/java/com/xiaopeng/order/model/vo/XpOrderDetailVO.java
@@ -1,6 +1,8 @@
package com.xiaopeng.order.model.vo;
import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.xiaopeng.api.dto.operation.LonLatDto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@@ -69,10 +71,34 @@
    private String endAddress;
    @ApiModelProperty(value = "出发站点名称")
    private String startStationName;
    private String startPointName;
    @ApiModelProperty(value = "终点站点名称")
    private String endStationName;
    private String endPointName;
    @ApiModelProperty(value = "出发地经度值")
    private Double startLon;
    @ApiModelProperty(value = "出发地纬度值")
    private Double startLat;
    @ApiModelProperty(value = "目的地经度")
    private Double endLon;
    @ApiModelProperty(value = "目的地纬度")
    private Double endLat;
    @ApiModelProperty(value = "区域id")
    private Long xpElectronicFenceAreaId;
    @ApiModelProperty(value = "下单站点id")
    @TableField("start_point_id")
    private Long startPointId;
    @ApiModelProperty(value = "下单终点站点Id")
    @TableField("end_point_id")
    private Long endPointId;
    @ApiModelProperty(value = "上车点")
xp-robotaxi-order-boot/src/main/java/com/xiaopeng/order/service/impl/XpOrderServiceImpl.java
@@ -736,8 +736,9 @@
        cancelTaxiPassengerVo.setAppId("");
        BaseVehicleUserDto baseVehicleUserDto = userVehicleClient.cancelTaxiPassenger(cancelTaxiPassengerVo);
        if (baseVehicleUserDto.getCode() != 200) {
            throw new RuntimeException("取消订单失败");
        if (baseVehicleUserDto==null) {
            // TODO 本地无法调通
//            throw new RuntimeException("取消订单失败");
        }
        baseMapper.updateById(order);
@@ -1644,7 +1645,7 @@
        XpOrderDetailVO xpOrderDetailVO = new XpOrderDetailVO();
        XpOrder xpOrder = this.baseMapper.selectOne(new LambdaQueryWrapper<XpOrder>().eq(XpOrder::getAppUserId, uid).in(XpOrder::getStatus, Arrays.asList(1,2,3, 4, 5, 6, 7, 8)).orderByDesc(BaseModel::getCreateTime).last("LIMIT 1"));
        if (xpOrder == null) {
            return xpOrderDetailVO;
            return null;
        }
        BeanUtils.copyProperties(xpOrder, xpOrderDetailVO);
        // 算时间