puzhibing
2026-03-01 11f229dd82d7a7ba2d9f36147677347a3b9eef99
修改bug
4个文件已修改
53 ■■■■■ 已修改文件
xp-robotaxi-automatic-pilot-boot/src/main/java/com/xiaopeng/automaticPilot/controller/OrderMissionController.java 44 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
xp-robotaxi-automatic-pilot-boot/src/main/java/com/xiaopeng/automaticPilot/service/KafkaConsumerService.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
xp-robotaxi-itinerary-boot/src/main/java/com/xiaopeng/itinerary/service/impl/XpPricingServiceImpl.java 4 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
xp-robotaxi-push-message-boot/src/main/java/com/xiaopeng/pushMessage/controller/PushOrderRouteController.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
xp-robotaxi-automatic-pilot-boot/src/main/java/com/xiaopeng/automaticPilot/controller/OrderMissionController.java
@@ -47,6 +47,7 @@
import java.util.concurrent.LinkedBlockingQueue;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;
import java.util.stream.Collectors;
@Slf4j
@RestController
@@ -197,6 +198,17 @@
            log.error("推送消息失败:{}", stringR.getMsg());
        }
        xpOrderClient.updateOrderStatus(orderId, OrderStatusEnum.PICK_UP.getCode());
//        PushOrderRouteDTO dto3 = new PushOrderRouteDTO();
//        dto3.setOrderId(orderId);
//        dto3.setRouteType(1);
//        dto3.setLongitude(startLon);
//        dto3.setLatitude(startLat);
//        dto3.setDuration(10);
//        dto3.setDistance(2);
//        dto3.setDirection(60);
//        xpPushMessageClient.pushOrderRoute(dto3);
        return r;
    }
@@ -315,6 +327,36 @@
            log.error("推送消息失败:{}", stringR.getMsg());
        }
        xpOrderClient.updateOrderStatus(orderId, status);
        if(5 == status){
            //主动推一次全程轨迹
            Object cacheObject = redisService.getCacheObject("ORDER_NAVIGATION_END_DATA:" + xpOrder.getAppUserId());
            RouteVo routeVo = JSON.parseObject(cacheObject.toString(), RouteVo.class);
            com.alibaba.fastjson2.JSONObject jsonObject = new com.alibaba.fastjson2.JSONObject();
            jsonObject.put("type", "ORDER_ROUTE");
            jsonObject.put("timestamp", System.currentTimeMillis());
            com.alibaba.fastjson2.JSONObject content1 = new com.alibaba.fastjson2.JSONObject();
            content1.put("orderId", orderId.toString());
            content1.put("routeType", 1);
            com.alibaba.fastjson2.JSONObject route = new com.alibaba.fastjson2.JSONObject();
            route.put("distance", routeVo.getDistance());
            route.put("duration", routeVo.getDuration());
            route.put("routeID", routeVo.getRouteID());
            List<com.alibaba.fastjson2.JSONObject> collect = routeVo.getPolyline().stream().map(item -> {
                com.alibaba.fastjson2.JSONObject point = new com.alibaba.fastjson2.JSONObject();
                point.put("latitude", item.getLatitude());
                point.put("longitude", item.getLongitude());
                return point;
            }).collect(Collectors.toList());
            route.put("polyline", JSON.toJSONString(collect));
            content1.put("route", route.toJSONString());
            jsonObject.put("content", content1.toJSONString());
            SendMessageDTO messageDTO = new SendMessageDTO();
            messageDTO.setAppUserId(xpOrder.getAppUserId().toString());
            messageDTO.setMessage(jsonObject.toJSONString());
            xpPushMessageClient.sendRoute(messageDTO);
        }
        return R.ok();
    }
@@ -380,7 +422,7 @@
                //5秒钟循环一次
                try {
                    Thread.sleep(2000);
                    Thread.sleep(500);
                } catch (InterruptedException e) {
                    throw new RuntimeException(e);
                }
xp-robotaxi-automatic-pilot-boot/src/main/java/com/xiaopeng/automaticPilot/service/KafkaConsumerService.java
@@ -51,7 +51,8 @@
import com.xiaopeng.common.core.utils.uuid.UUID;
import com.xiaopeng.common.redis.service.RedisService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.data.geo.Point;import org.springframework.data.mongodb.core.MongoTemplate;
import org.springframework.data.geo.Point;
import org.springframework.data.mongodb.core.MongoTemplate;
import org.springframework.data.mongodb.core.geo.GeoJsonPoint;
import org.springframework.data.mongodb.core.query.Criteria;
import org.springframework.data.mongodb.core.query.Query;
xp-robotaxi-itinerary-boot/src/main/java/com/xiaopeng/itinerary/service/impl/XpPricingServiceImpl.java
@@ -731,7 +731,7 @@
            jsonObject.put("type", "ORDER_ROUTE");
            jsonObject.put("timestamp", System.currentTimeMillis());
            com.alibaba.fastjson2.JSONObject content = new com.alibaba.fastjson2.JSONObject();
            content.put("orderId", orderId);
            content.put("orderId", orderId.toString());
            content.put("routeType", 1);
            com.alibaba.fastjson2.JSONObject route = new com.alibaba.fastjson2.JSONObject();
            route.put("distance", routeVo.getDistance());
@@ -799,7 +799,7 @@
            jsonObject.put("type", "ORDER_ROUTE");
            jsonObject.put("timestamp", System.currentTimeMillis());
            com.alibaba.fastjson2.JSONObject content = new com.alibaba.fastjson2.JSONObject();
            content.put("orderId", orderId);
            content.put("orderId", orderId.toString());
            content.put("routeType", 2);
            com.alibaba.fastjson2.JSONObject route = new com.alibaba.fastjson2.JSONObject();
            route.put("distance", routeVo.getDistance());
xp-robotaxi-push-message-boot/src/main/java/com/xiaopeng/pushMessage/controller/PushOrderRouteController.java
@@ -93,7 +93,7 @@
            route.put("polyline",JSONObject.toJSONString(polyline));
            Map<String, Object> content = new HashMap<>();
            content.put("orderId",dto.getOrderId());
            content.put("orderId",dto.getOrderId().toString());
            content.put("routeType",routeType);
            content.put("direction",dto.getDirection());
            content.put("route",JSONObject.toJSONString(route));