puzhibing
2026-02-27 e4e49b4458120047ed882d8c03ea6bcbb1e94b67
添加测试代码
30个文件已添加
8个文件已修改
2058 ■■■■■ 已修改文件
xp-robotaxi-api/pom.xml 32 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
xp-robotaxi-api/src/main/java/com/xiaopeng/api/feignClient/order/XpOrderClient.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
xp-robotaxi-api/src/main/proto/rt_cdu_event.proto 4 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
xp-robotaxi-api/src/main/proto/rt_cloud_event.proto 37 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
xp-robotaxi-api/src/main/proto/rt_common.proto 91 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
xp-robotaxi-api/src/main/proto/rt_event_common.proto 43 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
xp-robotaxi-api/src/main/proto/rt_event_type.proto 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
xp-robotaxi-api/src/main/proto/rt_interaction_common.proto 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
xp-robotaxi-api/src/main/proto/rt_msg_content.proto 107 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
xp-robotaxi-api/src/main/proto/rt_navigation.proto 52 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
xp-robotaxi-api/src/main/proto/rt_order.proto 100 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
xp-robotaxi-api/src/main/proto/rt_system.proto 101 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
xp-robotaxi-api/src/main/proto/rt_system_snapshot.proto 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
xp-robotaxi-api/src/main/proto/rt_task.proto 105 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
xp-robotaxi-api/src/main/proto/rt_trip.proto 70 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
xp-robotaxi-api/src/main/proto/rt_xpu_cdu_interaction.proto 85 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
xp-robotaxi-api/src/main/proto/rt_xpu_cloud_interaction.proto 41 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
xp-robotaxi-automatic-pilot-boot/pom.xml 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
xp-robotaxi-automatic-pilot-boot/src/test/resources/jsondemo/cloud/navi_deviation_event.json 29 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
xp-robotaxi-automatic-pilot-boot/src/test/resources/jsondemo/cloud/navigation_info_update_event.json 44 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
xp-robotaxi-automatic-pilot-boot/src/test/resources/jsondemo/cloud/navigation_requset.json 32 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
xp-robotaxi-automatic-pilot-boot/src/test/resources/jsondemo/cloud/order_status_info_event.json 164 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
xp-robotaxi-automatic-pilot-boot/src/test/resources/jsondemo/cloud/rt_task_list.json 57 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
xp-robotaxi-automatic-pilot-boot/src/test/resources/jsondemo/cloud/rt_task_list_response.json 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
xp-robotaxi-automatic-pilot-boot/src/test/resources/jsondemo/cloud/system_state_snapshot_event.json 215 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
xp-robotaxi-automatic-pilot-boot/src/test/resources/jsondemo/cloud/system_status_update_event.json 32 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
xp-robotaxi-automatic-pilot-boot/src/test/resources/jsondemo/cloud/task_control.json 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
xp-robotaxi-automatic-pilot-boot/src/test/resources/jsondemo/cloud/task_control_state.json 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
xp-robotaxi-automatic-pilot-boot/src/test/resources/jsondemo/common/order_operation.json 38 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
xp-robotaxi-automatic-pilot-boot/src/test/resources/jsondemo/common/order_operation_state.json 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
xp-robotaxi-automatic-pilot-boot/src/test/resources/jsondemo/common/response.json 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
xp-robotaxi-automatic-pilot-boot/src/test/resources/jsondemo/common/restore_navigation_data.json 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
xp-robotaxi-automatic-pilot-boot/src/test/resources/jsondemo/common/system_runtime_status.json 154 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
xp-robotaxi-itinerary-boot/src/main/java/com/xiaopeng/itinerary/service/impl/XpPricingServiceImpl.java 226 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
xp-robotaxi-maintenance-boot/src/main/java/com/xiaopeng/maintenance/controller/XpSchedulingDetailController.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
xp-robotaxi-maintenance-boot/src/main/java/com/xiaopeng/maintenance/controller/XpVehicleOperationsController.java 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
xp-robotaxi-order-boot/src/main/java/com/xiaopeng/order/service/impl/XpOrderDetailServiceImpl.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
xp-robotaxi-vehicle-convoy-boot/src/main/java/com/xiaopeng/vehicleConvoy/service/IXpFleetVehicleService.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
xp-robotaxi-api/pom.xml
@@ -41,6 +41,38 @@
            <artifactId>unified-verification</artifactId>
            <version>1.5.2-v2</version>
        </dependency>
        <dependency>
            <groupId>com.google.protobuf</groupId>
            <artifactId>protobuf-java</artifactId>
            <version>3.19.4</version>
        </dependency>
    </dependencies>
    <build>
        <extensions>
            <extension>
                <groupId>kr.motd.maven</groupId>
                <artifactId>os-maven-plugin</artifactId>
                <version>1.6.2</version>
            </extension>
        </extensions>
        <plugins>
            <plugin>
                <groupId>org.xolstice.maven.plugins</groupId>
                <artifactId>protobuf-maven-plugin</artifactId>
                <version>0.6.1</version>
                <configuration>
                    <protocArtifact>com.google.protobuf:protoc:3.19.4:exe:${os.detected.classifier}</protocArtifact>
                </configuration>
                <executions>
                    <execution>
                        <goals>
                            <goal>compile</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>
xp-robotaxi-api/src/main/java/com/xiaopeng/api/feignClient/order/XpOrderClient.java
@@ -110,4 +110,7 @@
    R<String> updateOrderStatus(@RequestParam Long orderId,
                                       @RequestParam Integer status);
}
xp-robotaxi-api/src/main/proto/rt_cdu_event.proto
New file
@@ -0,0 +1,4 @@
syntax = "proto3";
package acm.proto.intelliservices.rt;option java_package = "com.xiaopeng.api.vo.automaticPilot.protobuf";
option java_multiple_files = true;
xp-robotaxi-api/src/main/proto/rt_cloud_event.proto
New file
@@ -0,0 +1,37 @@
syntax = "proto3";
package acm.proto.intelliservices.rt;
option java_package = "com.xiaopeng.api.vo.automaticPilot.protobuf";
option java_multiple_files = true;
import "rt_navigation.proto";
import "rt_common.proto";
import "rt_system.proto";
import "rt_system_snapshot.proto";
import "rt_event_type.proto";
import "rt_order.proto";
message SystemStateSnapshotEvent {
  RtEventType event_type = 1;
  SystemStateSnapshot system_state_snapshot = 2;
  int64 timestamp = 3;                                // 时间戳(毫秒)
}
message SystemStatusUpdateEvent {
  RtEventType event_type = 1;
  SystemStatus system_status = 2;
  Waypoint point = 3; //事件发生的点位
  int64 timestamp = 4;             // 时间戳(毫秒)
}
// 导航信息
message NavigationDeviationEvent {
  RtEventType event_type = 1;
  NavigationDeviationMessage navigation_deviation_message = 2;
  int64 timestamp = 3;             // 时间戳(毫秒)
}
message OrderAcceptanceStatusEvent {
  RtEventType event_type = 1;
  OrderAcceptanceStatus order_acceptance_status = 2;
  int64 timestamp = 3;             // 时间戳(毫秒)
}
xp-robotaxi-api/src/main/proto/rt_common.proto
New file
@@ -0,0 +1,91 @@
syntax = "proto3";
package acm.proto.intelliservices.rt;
option java_package = "com.xiaopeng.api.vo.automaticPilot.protobuf";
option java_multiple_files = true;
// 车辆驾驶模式枚举
enum DrivingMode {
  DRIVING_MODE_UNSPECIFIED = 0;      // 未指定
  AUTONOMOUS = 1;                    // L4自动驾驶模式
  REMOTE_DRIVING = 2;                // 云代驾远程控车模式
  MANUAL_DRIVING = 3;                // 手动驾驶模式
}
// 动作类型枚举
enum ActionType {
  ACTION_UNSPECIFIED = 0;
  PICK_UP = 1;          // 上车/接客
  DROP_OFF = 2;         // 下车/送客
  DRIVE_THROUGH = 3;    //巡游终点不停车
}
// 导航点类型
enum PointType {
  POINT_TYPE_UNSPECIFIED = 0;
  START_POINT = 1;      // 起点
  WAY_POINT = 2;        // 途经点
  END_POINT = 3;        // 终点(导航终点)
  PICK_UP_POINT  = 4;   // 上车点(导航终点)
  CRUISE_END_POINT = 5; // 巡游终点
}
enum GearLevel {
  GEAR_Invalid = 0;
  GEAR_D = 1;
  GEAR_N = 2;
  GEAR_R = 3;
  GEAR_P = 4;
}
// 途经点信息
message Waypoint {
  string waypoint_id = 1;            // 途经点ID
  PointType point_type = 2;
  ActionType action_type = 3;    // 在该点执行的动作
  GeoPoint point = 4;                // 经纬度
  uint32 sequence = 5;                // 顺序序号(在路线中的位置)
}
message Wgs{
  double longitude = 1;  //经度
  double latitude = 2;   //纬度
  double course = 3;     //航向,单位:度,北零顺时针。范围:[0-360)。0 => 北, 90 => 东, 180 => 南, 270 => 西
  double pos_acc = 4;    //位置精度
  float alt = 5;         //  海拔 单位米
}
// 位置信息
message GeoPoint {
  double longitude = 1;               // 经度
  double latitude = 2;                // 纬度
}
message  RealtimePose{
  int64 timestamp = 1;           // 时间戳(毫秒)
  Wgs navi_pose = 2;            //高德导航pose,WGS加偏之后的GCJ-02
  // adas_pse                    //自驾pose, double heading= 3; /车头方向角需要北向顺时针夹角度数
}
////////////////////////////////////////////////////////////////////////////////////////////////
// Order Related
////////////////////////////////////////////////////////////////////////////////////////////////
enum OrderPhase {
  IDLE = 0;                          // 订单的任务未开始执行
  ROUTE_TO_PICKUP = 1;               // 驶往上车点的行程
  ROUTE_TO_DESTINATION = 2;          // 驶往下车点的行程
  ROUTE_TO_CRUISE = 3;               // 巡游阶段路线
}
// 订单类型枚举
enum OrderType {
  ORDER_TYPE_UNSPECIFIED = 0;             // 未指定
  ORDER_TYPE_ROBOTAXI = 1;                // Robotaxi订单
  ORDER_TYPE_REMOTE_DRIVING = 2;          // 云代驾订单
  ORDER_TYPE_CRUISE = 3;                   // 巡游任务
}
////////////////////////////////////////////////////////////////////////////////////////////////
// Event Related
////////////////////////////////////////////////////////////////////////////////////////////////
xp-robotaxi-api/src/main/proto/rt_event_common.proto
New file
@@ -0,0 +1,43 @@
syntax = "proto3";
package acm.proto.intelliservices.rt;
option java_package = "com.xiaopeng.api.vo.automaticPilot.protobuf";
option java_multiple_files = true;
import "rt_task.proto";
import "rt_common.proto";
import "rt_trip.proto";
import "rt_order.proto";
import "rt_navigation.proto";
import "rt_event_type.proto";
message RtTripInfoEvent {
  RtEventType event_type = 1;
  RtTripInfo trip_info = 2;
  Waypoint point = 3;                                      //事件发生的点位
  TaskRunningStateEvent task_running_state_event = 4;
  PointArrivalInfo latest_arrival_info = 5;                //若当次event_type是到点状态触发,则此字段有值
  int64 timestamp = 6;
}
message TaskRunningStateEvent {
  RtEventType event_type = 1;
  TaskRunningState task_running_state = 2;
  Waypoint point = 3;                      //事件发生的点位
  int64 timestamp = 4;                     // 时间戳(毫秒)
}
// 更新订单状态信息消息
message OrderStatusInfoEvent {
  RtEventType event_type = 1;
  OrderStatusInfo order_status_info = 2;
  Waypoint point = 3;                      //事件发生的点位
  RtTripInfoEvent trip_info_event = 4;
  int64 timestamp = 5;                     // 状态更新时间戳(毫秒)
}
message NavigationInfoUpdateEvent {
  RtEventType event_type = 1;
  NavigationInfo navigation_info = 2;
  Waypoint point = 3; //事件发生的点位
  int64 timestamp = 4;             // 时间戳(毫秒)
}
xp-robotaxi-api/src/main/proto/rt_event_type.proto
New file
@@ -0,0 +1,22 @@
syntax = "proto3";
package acm.proto.intelliservices.rt;
option java_package = "com.xiaopeng.api.vo.automaticPilot.protobuf";
option java_multiple_files = true;
enum RtEventType{
  kEventUnspecified = 0;
  kEventTripProgress = 1;
  kEventTripPointArrival = 2;
  kEventPulloverStatus = 3;
  kEventDrivingModeUpdate = 4;
  kEventSystemStatusUpdate = 5;
  kEventOrderStateUpdate = 6;
  kEventPickupConfirmation = 7;
  kEventDropoffInfo = 8;
  kEventNavigationDeviation = 9;
  kEventNavigationUpdate = 10;
  kEventTaskQueueUpdate = 11;
  kEventSystemInitSync = 12;
  kEventMqttReconnectSync = 13;
  kEventOrderAcceptanceStatusUpdate = 14;
}
xp-robotaxi-api/src/main/proto/rt_interaction_common.proto
New file
@@ -0,0 +1,27 @@
syntax = "proto3";
package acm.proto.intelliservices.rt;
option java_package = "com.xiaopeng.api.vo.automaticPilot.protobuf";
option java_multiple_files = true;
import "rt_common.proto";
import "rt_order.proto";
message RestoreNavigationData {
  string request_id = 1;      // 请求ID
  string route_id = 2;        // 导航路线ID
  string content = 3;         // 导航数据内容
  int64 timestamp = 4;        // 时间戳 (毫秒)
}
// 订单操作信息消息
message OrderOperation {
  string order_id = 1;                      // 订单ID
  string task_id = 2;                       // 任务ID
  OrderOperationType operation_type = 3;    // 订单操作类型
  OrderType order_type = 4;                 // 订单类型,新发订单才需要
  // 途径点列表,仅当operation_type为CLOUD_UPDATE_WAYPOINTS时有效
  repeated Waypoint waypoints = 5;          //每次需要全量更新
  // 目标点,仅当operation_type为CLOUD_CHANGE_DESTINATION时有效
  Waypoint target_point = 6;
  //int64 timestamp = 7;                      // 毫秒级时间戳
}
xp-robotaxi-api/src/main/proto/rt_msg_content.proto
New file
@@ -0,0 +1,107 @@
syntax = "proto3";
package acm.proto.intelliservices.rt;
option java_package = "com.xiaopeng.api.vo.automaticPilot.protobuf";
option java_multiple_files = true;
import "rt_xpu_cdu_interaction.proto";
import "rt_xpu_cloud_interaction.proto";
import "rt_interaction_common.proto";
import "rt_event_common.proto";
import "rt_cloud_event.proto";
import "rt_order.proto";
import "rt_navigation.proto";
import "rt_trip.proto";
import "rt_system.proto";
import "rt_task.proto";
enum StatusCode {
  HTTP_STATUS_CODE_UNSPECIFIED = 0;
  OK = 200;                            // 成功
  BAD_REQUEST = 400;                   //请求参数错误
  FORBIDDEN = 403;
  NOT_FOUND = 404;
  REQUEST_TIMEOUT = 408;              //请求超时
  INTERNAL_SERVER_ERROR = 500;        // 失败
}
// 消息类型枚举
enum MessageType {
  MESSAGE_TYPE_UNKNOWN = 0;
  MESSAGE_TYPE_RESPONSE = 1;  // 应答
  MESSAGE_TYPE_REQUEST = 2;   // 请求
}
// 定义source枚举
enum SourceType {
  SOURCE_UNKNOWN = 0;
  CLOUD = 1;
  CDU = 2;
  XPU = 3;
}
// 心跳消息
message Heartbeat {
  string vin = 1;              // 设备ID
  int64 timestamp = 2;         // 时间戳
  string status = 3;           // 状态
}
// 心跳响应
message HeartbeatAck {
  string vin = 1;              // 设备ID
  StatusCode code = 2;         // 响应状态码
  int64 timestamp = 3;         // 时间戳
}
// 消息头
message MsgHeader {
  int64 timestamp = 1;          // 发送时间戳,单位ms
  uint32 cmd = 2;               // 消息头
  uint64 sequence = 3;
  MessageType type = 4;         // 请求或应答
  string msg_id = 5;            // 消息唯一ID(UUID)
  SourceType source = 6;        // 消息来源:cloud、cdu、xpu
}
message ResponseMessage {
  uint64 request_seq = 1;            // 对应请求seq
  StatusCode code = 2;               // 响应码
  int64 timestamp = 3;               // 时间戳(毫秒)
}
message MsgContent {
  MsgHeader header = 1;
  oneof content_detail {    // 业务负载
    ////// common /////////
    ResponseMessage response = 2;
    OrderOperation order_operation = 3;
    OrderOperationState order_operation_state = 4;
    RestoreNavigationData restore_navigation_data = 5;
    SystemRuntimeStatus system_runtime_status = 6;
    ////// cloud ////////
    RtTaskList rt_task_list = 201;
    RtTaskListResponse rt_task_list_response = 202;
    TaskControl task_control = 203;
    TaskControlState task_control_state = 204;
    NavigationRequest navigation_requset = 205;
    SystemStateSnapshotEvent system_state_snapshot_event = 206;
    OrderStatusInfoEvent order_status_info_event = 207;
    NavigationInfoUpdateEvent navigation_info_update_event = 208;
    SystemStatusUpdateEvent system_status_update_event = 209;
    NavigationDeviationEvent navi_deviation_event = 210;
    //////// cdu /////////
    CduSystemStatus cdu_system_status = 400;
    OrderStatusSummary order_status_summary = 401;
    PullOverInfo pullover_info = 402;
    PointArrivalInfoList point_arrival_info_list = 403;
    PickupConfirmation pickup_confirmation = 404;
    DropoffInfo dropoff_info = 405;
    NavigationDeviationMessage navi_deviation_msg = 406;
    PullOverRequest pullover_request = 407;
    EmergencyStopMessage emergency_stop_msg = 408;
    RealtimeNaviPose realtime_navi_pose = 409;
    OrderAcceptanceStatus order_acceptance_status = 410;
  }
}
xp-robotaxi-api/src/main/proto/rt_navigation.proto
New file
@@ -0,0 +1,52 @@
syntax = "proto3";
package acm.proto.intelliservices.rt;
option java_package = "com.xiaopeng.api.vo.automaticPilot.protobuf";
option java_multiple_files = true;
import "rt_common.proto";
// import "v2_navi.proto";
// import "SDNavigation.proto";
// 导航类型枚举
enum NavigationType {
  NAVIGATION_TYPE_UNSPECIFIED = 0;      // 未指定
  NAVIGATION_TYPE_DEVIATION = 1;        // 偏航(车辆偏离原路线)
  NAVIGATION_TYPE_TO_PICKUP = 2;        // 接驾行程(前往上车点)
  NAVIGATION_TYPE_TO_DESTINATION = 3;   // 送驾行程(前往目的地)
  NAVIGATION_TYPE_CRUISE = 4;           // 巡游
}
message NaviProgressInfo {
  uint64 navigation_id = 1;          // 导航ID
  double route_remain_dist = 2;      // 剩余导航距离,单位米
  double route_remain_time = 3;      // 剩余导航时间
  // acm.proto.topic.navigation.NaviPosition position = 4;         // 当前导航位置
  string route_id = 5;               // 导航路线ID
}
// 导航信息
message NavigationInfo {
  string order_id = 1;               // 订单ID
  string task_id = 2;                // 任务ID
  OrderPhase order_phase = 3;        // 订单阶段
  uint64 navigation_id = 4;          // 导航ID
  // acm.proto.navi.NaviStatus navigation_status = 5;  // 导航状态
  NaviProgressInfo navi_progress_info = 6; //navi_progress_info中的route_id与外层的route_id相等且navigation_status为NAVI_STATUS_START此字段值有效
  int64 timestamp = 7;               // 时间戳(毫秒)
  string route_id = 8;               // 导航路线ID
}
message NavigationDeviationMessage {
  string order_id = 1;                 // 订单ID
  string task_id = 2;                  // 任务ID
  uint64 navigation_id = 3;            // 偏航前的导航ID
  uint64 navi_recalc_request_seq = 4;  // 导航重算请求序号,可取值毫秒级时间戳
  Wgs point = 5;                       // 发生偏航的坐标点,GCJ-02
  int64 timestamp = 6;                 // 时间戳(毫秒)
  string route_id = 7;                 // 偏航前的高德导航路线ID
}
message RealtimeNaviPose{
  int64 timestamp = 1;           // 时间戳(毫秒)
  Wgs navi_pose = 2;             //高德导航pose,WGS加偏之后的GCJ-02
}
xp-robotaxi-api/src/main/proto/rt_order.proto
New file
@@ -0,0 +1,100 @@
syntax = "proto3";
package acm.proto.intelliservices.rt;
option java_package = "com.xiaopeng.api.vo.automaticPilot.protobuf";
option java_multiple_files = true;
import "rt_common.proto";
import "rt_trip.proto";
// 订单操作类型枚举
enum OrderOperationType {
  ORDER_OPERATION_UNSPECIFIED = 0;          // 未指定
  CLOUD_CREATE_ORDER = 1;                   // 云端新增订单,XPU与座舱交互指令
  CLOUD_CANCEL_ORDER = 2;                   // 云端取消订单
  VEHICLE_CANCEL_ORDER = 3;                 // 车端取消订单
  CLOUD_PAUSE_ORDER = 4;                    // 云端暂停订单
  VEHICLE_PAUSE_ORDER = 5;                  // 车端暂停订单
  CLOUD_UPDATE_WAYPOINTS = 6;               // 云端更新途经点
  CLOUD_CHANGE_DESTINATION = 7;             // 云端更改终点
}
// 接单状态枚举
enum OrderAcceptanceState {
  ORDER_ACCEPTANCE_STATE_UNSPECIFIED = 0; // 未知/保留字段
  ORDER_ACCEPTANCE_STATE_START = 1;       // 开始接单 (上线/听单)
  ORDER_ACCEPTANCE_STATE_STOP = 2;        // 停止接单 (下线/收车)
}
// 订单状态枚举
enum OrderStatus {
  ORDER_STATUS_UNSPECIFIED = 0;           // 未指定
  ORDER_RECEIVED = 1;                     // 收到订单
  ORDER_STARTED = 2;                      // 开始执行订单
  ORDER_EN_ROUTE_TO_PICKUP = 3;           // 前往上车点
  ORDER_ARRIVED_AT_PICKUP = 4;            // 到达上车点
  ORDER_WAITING_FOR_PICKUP = 5;           // 等待乘客上车
  ORDER_PASSENGER_ONBOARD = 6;            // 乘客已上车
  ORDER_EN_ROUTE_TO_DESTINATION = 7;      // 前往目的地
  ORDER_ARRIVED_AT_DESTINATION = 8;       // 到达目的地
  ORDER_WAITING_FOR_DROPOFF = 9;          // 等待乘客下车
  ORDER_DROPOFF_COMPLETED = 10;           // 下车完成
  ORDER_COMPLETED = 11;                   // 已完成
  ORDER_CANCELLED = 12;                   // 已取消
  ORDER_ARRIVED_AT_CRUISE_DESTINATION = 13; // 到达巡游终点
  ORDER_PAUSED = 14; // 订单暂停
}
// 订单状态变化来源
enum OrderStateChangeSource {
  ORDER_STATE_CHANGE_SOURCE_UNSPECIFIED = 0; // 未指定
  ORDER_STATE_CHANGE_SOURCE_CLOUD = 1;       // 云端系统
  ORDER_STATE_CHANGE_SOURCE_VEHICLE = 2;     // 车端
}
// 操作状态
enum OrderOperationStatus {
  OPERATION_STATUS_UNSPECIFIED = 0;
  PROCESSING = 1;         // 处理中
  SUCCESS = 2;            // 成功
  FAILED = 3;             // 失败
}
// 更新订单状态信息消息
message UpdateOrderStatus {
  string order_id = 1;         // 订单ID
  string task_id = 2;          // 任务ID
  OrderPhase order_phase = 3;  // 订单阶段
  int64 timestamp = 4;         // 毫秒级时间戳
}
message OrderOperationState {
  string order_id = 1;                       // 订单ID
  OrderOperationType operation_type = 2;     // 订单操作类型
  OrderOperationStatus status = 3;           // 操作状态
}
// 订单状态信息
message OrderStatusInfo {
  string order_id = 1;                       // 订单ID
  string task_id = 2;                        // 关联任务ID
  OrderStatus status = 3;                    // 订单当前状态
  OrderPhase order_phase = 4;                // 订单阶段
  OrderStateChangeSource change_source = 5;  // 状态变化来源
  string operator_id = 6;                    // 车端操作填写车端登录用户ID
  RtTripInfo rt_trip_info = 7;
  int64 timestamp = 8;                       // 状态更新时间戳(毫秒)
}
// 更新订单状态信息消息
message OrderStatusSummary {
  string order_id = 1;         // 订单ID
  string task_id = 2;          // 任务ID
  OrderStatus status = 3;      // 订单当前状态
  OrderPhase order_phase = 4;  // 订单阶段
}
// 接单状态消息
message OrderAcceptanceStatus {
  OrderAcceptanceState state = 1;         // 接单状态
  int64 timestamp = 2;                    // 状态变更时间戳
}
xp-robotaxi-api/src/main/proto/rt_system.proto
New file
@@ -0,0 +1,101 @@
syntax = "proto3";
package acm.proto.intelliservices.rt;
option java_package = "com.xiaopeng.api.vo.automaticPilot.protobuf";
option java_multiple_files = true;
import "rt_common.proto";
import "rt_order.proto";
import "rt_trip.proto";
import "rt_navigation.proto";
// 系统初始化阶段枚举
enum SystemPhase {
  SYSTEM_STATUS_UNSPECIFIED = 0;     // 未指定状态
  SYSTEM_INITIALIZING = 1;           // 系统初始化中
  SYSTEM_SELF_CHECKING = 2;          // 系统自检中
  SYSTEM_NORMAL = 3;                 // 系统处于normal态
  SYSTEM_ABNORMAL = 4;               // 系统处于abnormal态
}
// L4功能能力枚举
enum L4CapabilityType {
  NO_L4_CAPABILITY = 0;                 // 无功能
  RT = 1;                               // RT功能
  VPD = 2;                              // VPD功能
}
// 设备能力信息(用于状态上报)
message L4CapabilityInfo {
  string vin = 1;                                 // 车辆ID
  int64 user_id = 2;                              // 用户ID
  repeated L4CapabilityType l4_capabilities = 3;  // L4功能能力
  string mqtt_account= 4;
  int64 timestamp = 5;                            // 更新时间
}
// 服务可用性(Normal状态使用)
enum ServiceAvailability {
  SERVICE_AVAILABILITY_UNSPECIFIED = 0;
  ROBOTAXI_AVAILABLE = 1;     // Robotaxi可用
  VPD_AVAILABLE = 2;          // VPD可用
}
// 异常原因(Abnormal状态使用)
enum AbnormalReason {
  ABNORMAL_REASON_UNSPECIFIED = 0;
  REMOTE_CONTROL_MODE = 1;    // 远程控车模式
  MRM = 2;                    // MRM(Minimal Risk Maneuver,最小风险机动)
  E_STOP = 3;                 // E-Stop(Emergency Stop,紧急停止)
  FAULT = 4;                  // 故障
}
message CduSystemStatus {
  SystemPhase phase = 1;
  OrderAcceptanceStatus order_acceptance_status = 2;  //接单状态
}
message SystemStatus {
  SystemPhase phase = 1;               // 系统阶段
  AbnormalReason abnormal_reason = 2;  // Abnormal状态时的原因
  repeated ServiceAvailability available_services = 3;
  bool is_emergency = 4;               // 是否紧急状态
}
message SystemRuntimeStatus {
  int64 timestamp = 1;                            // 时间戳(毫秒)
  int64 uid = 2;                                  // 当前登录用户ID
  VehicleStatus vehicle_status = 3;               //车辆状态
  SystemStatus system_status = 4;
  DrivingMode driving_mode = 5;                   // 驾驶模式
  OrderStatusInfo running_order_status_info = 6;  //正在运行订单信息,当running_order和rt_trip_info中id不相同时以running_order为准
  RtTripInfo rt_trip_info = 7;                    // rt行程信息
  RealtimePose pose = 8;                          //实时位姿
  NavigationInfo navigation_info = 9;             //实时导航信息
}
// 车辆静态信息(固定或很少变化)
message VehicleStaticInfo {
  string xpu_id = 1;              // XPU设备ID
  int64 timestamp = 2;            // 时间戳(毫秒)
}
// 车辆动态状态(实时变化)
message VehicleDynamicStatus {
  GearLevel gear_level = 1;       // 档位
  float steering_angle = 2;       // 方向盘转向角(度)
  float speed = 3;                // 仪表显示车速(m/s)
  int64 timestamp = 4;            // 时间戳(毫秒)
  uint32 bms_soc_disp = 5;        //剩余电量百分比,I_LDCU_BMS_SOC_Disp
  float dst_bat_disp = 6;         //综合续航,单位km,I_LDCU_dstBatDisp
  //float throttle = 7;           // 油门开度(0-100%)
  //float brake = 8;              // 刹车压力(0-100%)
  //bool parking_brake = 9;       // 手刹状态
  //float battery_level = 10;      // 电池电量(0-100%)
}
// 车辆状态
message VehicleStatus {
  VehicleStaticInfo static_info = 1;    // 静态信息
  VehicleDynamicStatus dynamic_status = 2;  // 动态状态
}
xp-robotaxi-api/src/main/proto/rt_system_snapshot.proto
New file
@@ -0,0 +1,15 @@
syntax = "proto3";
package acm.proto.intelliservices.rt;
option java_package = "com.xiaopeng.api.vo.automaticPilot.protobuf";
option java_multiple_files = true;
import "rt_event_common.proto";
import "rt_common.proto";
// 状态快照事件(MQTT重连后全量同步)
message SystemStateSnapshot {
  OrderStatusInfoEvent order_status_events = 1;       // 正在运行订单状态事件
  NavigationInfoUpdateEvent navigation_event = 2;     // 导航信息更新事件
  RealtimePose realtime_pose = 3;                     // 产生Snapshot的实时位姿
  int64 timestamp = 4;                                // 快照生成时间戳(毫秒)
}
xp-robotaxi-api/src/main/proto/rt_task.proto
New file
@@ -0,0 +1,105 @@
syntax = "proto3";
package acm.proto.intelliservices.rt;
option java_package = "com.xiaopeng.api.vo.automaticPilot.protobuf";
option java_multiple_files = true;
import "rt_common.proto";
import "rt_navigation.proto";
// 任务操作类型枚举
enum TaskControlType {
  TASK_OPERATION_UNSPECIFIED = 0;      // 未指定
  CLOUD_PAUSE_TASK = 1;                // 云端暂停任务
  CLOUD_RESUME_TASK = 2;               // 云端恢复任务
  CLOUD_CANCEL_TASK = 3;               // 云端取消任务
  VEHICLE_PAUSE_TASK = 4;              // 车端暂停任务
  VEHICLE_RESUME_TASK = 5;             // 车端恢复任务
  VEHICLE_TERMINATE_TASK = 6;          // 车端取消/结束任务
}
enum TaskRunningStatus {
  TASK_RUNNING_STATUS_UNSPECIFIED = 0;  // 未指定
  TASK_IDLE = 1;                         // 空闲(任务已创建,未开始)
  TASK_INITIALIZING = 2;                 // 初始化中(准备运行环境)
  TASK_RUNNING = 3;                      // 运行中(正常执行)
  TASK_PAUSED = 4;                       // 已暂停
  TASK_STOPPING = 5;                     // 停止中
  TASK_COMPLETED = 6;                    // 已完成
  TASK_FAILED = 7;                       // 执行失败
  TASK_CANCELLED = 8;                    // 已取消
}
// 状态变化来源枚举
enum TaskStateChangeSource {
  TASK_STATE_CHANGE_SOURCE_UNSPECIFIED = 0;  // 未指定
  TASK_STATE_CHANGE_SOURCE_CLOUD = 1;        // 云端指令
  TASK_STATE_CHANGE_SOURCE_VEHICLE_USER = 2; // 车端用户操作
}
// 任务处理结果状态
enum TaskResultStatus {
  TASK_RESULT_STATUS_UNSPECIFIED = 0;     // 未指定
  ACCEPTED = 1;                            // 已接受
  NO_CAPABILITY = 2;                       // 无执行任务能力
  PRECONDITION_NOT_MET = 3;                // 执行条件不满足
  DUPLICATE = 4;                           // 重复任务
  INVALID = 5;                             // 无效任务
}
// 操作执行状态
enum TaskControlStatus {
  TASK_CONTROL_STATUS_UNKNOWN = 0;      // 未知
  TASK_CONTROL_STATUS_EXECUTING = 1;    // 执行中
  TASK_CONTROL_STATUS_SUCCESS = 2;      // 执行成功
  TASK_CONTROL_STATUS_FAILED = 3;       // 执行失败
  TASK_CONTROL_STATUS_REJECTED = 4;     // 拒绝执行,任务已经结束
}
// 前置/后置动作类型
enum TaskActionType {
  kActionUnknown = 0;                  // 无效值
  kWaitPrevTaskFinish = 1;             // 等待前一个任务完成
  kTriggerNextTaskOnFinish = 2;        // 完成后触发下一个任务
  kTerminateTask = 3;                  // 终止任务
  kTerminateForNewTask = 4;            // 终止并替换为新任务
  kPauseTask = 5;                      // 暂停任务
  kPauseForNewTask = 6;                // 暂停并替换为新任务
}
// 任务动作
message TaskAction {
  string order_id = 1;
  string task_id = 2; // 任务id
  TaskActionType action_type = 3; // 任务动作类型
}
// 任务运行状态信息
message TaskRunningState {
  string order_id = 1;                     // 订单ID
  string task_id = 2;                      // 任务ID
  TaskRunningStatus status = 3;            // 任务运行状态
  TaskStateChangeSource change_source = 4; // 状态变化来源
  NaviProgressInfo navi_progress_info = 5; //导航运行进度
  int64 timestamp = 6;                     // 状态更新时间戳(毫秒)
}
message RtTaskResult {
  string order_id = 1;
  string task_id = 2;                 // 任务ID
  TaskResultStatus status = 3;        // 任务状态
}
message RtTask {
  string task_id = 1;                              // 任务唯一标识
  string order_id = 2;                             //关联的订单id
  repeated OrderPhase order_phase = 3;             // TASK对应的行程阶段,若一个订单被拆分成多个TASK,车端使用order_id关联,使用seq排序
  repeated Waypoint points = 4;                    // ROBOTAXI任务必须要有一个可以作为导航终点的点
  OrderType task_type = 5;                         // 任务类型
  repeated TaskAction pre_actions = 6;             //
  repeated TaskAction post_actions = 7;            //
  uint32 sequence = 8;                             // 任务在订单中的顺序(从1开始)
}
message RtTaskList {
  repeated RtTask tasks = 1;
}
xp-robotaxi-api/src/main/proto/rt_trip.proto
New file
@@ -0,0 +1,70 @@
syntax = "proto3";
package acm.proto.intelliservices.rt;
option java_package = "com.xiaopeng.api.vo.automaticPilot.protobuf";
option java_multiple_files = true;
import "rt_common.proto";
import "rt_task.proto";
// 行程完成状态枚举
enum TripCompletionStatus {
  TRIP_COMPLETION_STATUS_UNSPECIFIED = 0;  // 未指定
  COMPLETED_SUCCESSFULLY = 1;              // 成功完成
  CANCELLED_BY_PASSENGER = 2;              // 乘客取消
  CANCELLED_BY_DRIVER = 3;                 // 司机取消
  CANCELLED_BY_SYSTEM = 4;                 // 系统取消
  TERMINATED_ABNORMALLY = 5;               // 异常终止
}
// 到点状态枚举
enum ArrivalStatus {
  ARRIVAL_STATUS_UNSPECIFIED = 0;    // 未指定
  NOT_ARRIVED = 1;    // 未到达
  ARRIVED = 2;        // 到达
}
// 行程状态枚举
enum TripStatus {
  TRIP_STATUS_UNSPECIFIED = 0;     // 未指定
  TRIP_INITIALIZING = 1;           // 启动行程,对应任务被调度到,开始初始化运行环境
  TRIP_RUNNING = 2;                // 开始行程
  TRIP_PAUSED = 3;                 // 暂停中
  TRIP_COMPLETED = 4;              // 行程完成
}
//转换过程:INITIALIZING → RUNNING → PAUSED ⇄ RUNNING → COMPLETED
// 行程摘要
message TripSummary {
  double distance_km = 1;                 // 行驶距离(公里)
  int32 duration_sec = 2;                 // 行驶时长(秒)
}
message PointArrivalInfo {
  string point_id = 1;              // 点位ID
  PointType point_type = 2;         // 点位类型
  ActionType action_type = 3;       // 动作类型
  ArrivalStatus arrival_status = 4; // 到点状态
  int64 timestamp = 5;              // 到点时间戳(毫秒)
}
//每次更新全量,PointArrivalInfo中时间戳值最大的为最新的到点状态
message PointArrivalInfoList {
  string order_id = 1;              // 订单ID
  string task_id = 2;               // 任务ID
  OrderPhase order_phase = 3;       // 订单阶段
  repeated PointArrivalInfo arrival_infos = 4; // 到点状态列表
}
// 行程信息消息
message RtTripInfo {
  string order_id = 1;                             // 订单ID
  string task_id = 2;                              // 任务ID
  TripStatus trip_status = 3;                      // 行程状态
  OrderPhase order_phase = 4;                      // 订单阶段
  TripCompletionStatus trip_completion_status = 5; // 行程完成状态
  TripSummary summary = 6;                         // 行程摘要,仅当trip_status为TRIP_COMPLETED时有效
  Waypoint point = 7;                              //trip_status为TRIP_STARTED、TRIP_COMPLETED时赋值
  TaskRunningState current_task = 8;               // 当前正在运行的任务状态
}
xp-robotaxi-api/src/main/proto/rt_xpu_cdu_interaction.proto
New file
@@ -0,0 +1,85 @@
syntax = "proto3";
package acm.proto.intelliservices.rt;
option java_package = "com.xiaopeng.api.vo.automaticPilot.protobuf";
option java_multiple_files = true;
import "rt_common.proto";
import "rt_order.proto";
import "rt_event_type.proto";
// 靠边停车状态枚举
enum PullOverStatus {
  NOT_PULLING_OVER = 0;              // 未在靠边停车态
  PULLING_OVER = 1;                  // 靠边停车中
  PULL_OVER_COMPLETED = 2;           // 靠边停车完成
  PULL_OVER_FAILED = 3;              // 靠边停车失败
}
// 靠边停车操作枚举
enum PullOverAction {
  PULL_OVER_ACTION_UNKNOWN = 0;     // 未知
  PULL_OVER_ACTION_START = 1;       // 开始靠边停车
}
// 紧急停车原因枚举
enum EmergencyStopReason {
  EMERGENCY_STOP_REASON_UNKNOWN = 0;    // 未知
  EMERGENCY_STOP_REASON_MANUAL = 1;     // 人工触发
}
// 上车状态枚举
enum PickupStatus {
  PICKUP_STATUS_UNSPECIFIED = 0;
  PICKUP_IN_PROGRESS = 1;
  PICKUP_COMPLETED = 2;
  PICKUP_FAILED = 3;
}
// 下车状态枚举
enum DropoffStatus {
  DROPOFF_STATUS_UNSPECIFIED = 0;    // 未执行下车动作
  DROPOFF_COMPLETED = 1;             // 下车完成
}
// 座舱发起靠边停车 (座舱 -> XPU)
message PullOverRequest {
  string order_id = 1;          // 订单ID
  string task_id = 2;           // 任务ID
  PullOverAction action = 3;    // 靠边停车操作
  int64 timestamp = 4;          // 时间戳(毫秒)
}
// 座舱发起紧急停车 (座舱 -> XPU)
message EmergencyStopMessage {
  string order_id = 1;                  // 订单ID
  string task_id = 2;                   // 任务ID
  int64 timestamp = 3;                  // 时间戳(毫秒)
  EmergencyStopReason reason = 4;       // 紧急停车原因
}
// 用户确认上车状态信息消息
message PickupConfirmation {
  string order_id = 1;               // 订单ID
  string task_id = 2;                // 任务ID
  PickupStatus pickup_status = 3;    // 上车状态
  GeoPoint point = 4;                // 上车位置
  int64 timestamp = 5;               // 时间戳
}
// 用户下车状态信息消息
message DropoffInfo {
  string order_id = 1;               // 订单ID
  string task_id = 2;                // 任务ID
  DropoffStatus dropoff_status = 3;  // 下车状态
  int64 timestamp = 4;               // 时间戳
  GeoPoint point = 5;                // 下车位置
}
// 靠边停车状态信息消息 (XPU -> 座舱)
message PullOverInfo {
  string order_id = 1;                  // 订单ID
  string task_id = 2;                   // 任务ID
  OrderPhase order_phase = 3;           // 订单阶段
  PullOverStatus pull_over_status = 4;  // 靠边停车状态
  int64 timestamp = 5;                  // 时间戳(毫秒)
}
xp-robotaxi-api/src/main/proto/rt_xpu_cloud_interaction.proto
New file
@@ -0,0 +1,41 @@
syntax = "proto3";
package acm.proto.intelliservices.rt;
option java_package = "com.xiaopeng.api.vo.automaticPilot.protobuf";
option java_multiple_files = true;
import "rt_common.proto";
import "rt_task.proto";
import "rt_navigation.proto";
import "rt_order.proto";
// RT任务列表应答
message RtTaskListResponse {
  RtTaskResult results = 1;            // 每个任务的详细结果
}
message TaskControl {
  string order_id = 1;                      // 订单ID
  string task_id = 2;                       // 任务ID
  TaskControlType task_control_type = 3;    // 任务操作类型
  int64 timestamp = 4;                     // 状态更新时间戳(毫秒)
}
message TaskControlState {
  string order_id = 1;                      // 订单ID
  string task_id = 2;                       // 任务ID
  TaskControlType task_control_type = 3;    // 任务操作类型
  TaskControlStatus status = 4;             // 操作状态
}
// 请求导航消息
message NavigationRequest {
  string request_id = 1;                      // 请求唯一ID
  string order_id = 2;                        // 订单ID
  string task_id = 3;                         // 任务ID
  OrderPhase order_phase = 4;                 // 当前订单阶段
  NavigationType navigation_type = 5;      // 请求原因
  RealtimePose current_pose = 6;              // 当前位姿
  GeoPoint target_point = 7;                  // 目标点(经纬度)
  int64 timestamp = 8;                        // 请求时间戳(毫秒)
}
xp-robotaxi-automatic-pilot-boot/pom.xml
@@ -128,6 +128,12 @@
            <artifactId>snakeyaml</artifactId>
            <version>1.33</version>
        </dependency>
        <dependency>
            <groupId>com.google.protobuf</groupId>
            <artifactId>protobuf-java-util</artifactId>
            <version>3.19.4</version>
        </dependency>
    </dependencies>
    <build>
xp-robotaxi-automatic-pilot-boot/src/test/resources/jsondemo/cloud/navi_deviation_event.json
New file
@@ -0,0 +1,29 @@
{
  "header": {
    "timestamp": 1772000476240,
    "cmd": 16010,
    "sequence": 1,
    "type": 2,
    "msg_id": "MSG-UUID-1234-5678",
    "source": 3
  },
  "navi_deviation_event": {
    "event_type": 1,
    "navigation_deviation_message": {
      "order_id": "1881347710714060802",
      "task_id": "task-001",
      "navigation_id": 123456,
      "navi_recalc_request_seq": 1772000476240,
      "point": {
        "longitude": 0,
        "latitude": 0,
        "course": 0,
        "pos_acc": 0,
        "alt": 0
      },
      "timestamp": 1772000476240,
      "route_id": "route-001"
    },
    "timestamp": 1772000476240
  }
}
xp-robotaxi-automatic-pilot-boot/src/test/resources/jsondemo/cloud/navigation_info_update_event.json
New file
@@ -0,0 +1,44 @@
{
  "header": {
    "timestamp": 1772000476240,
    "cmd": 16012,
    "sequence": 1,
    "type": 2,
    "msg_id": "MSG-UUID-1234-5678",
    "source": 3
  },
  "navigation_info_update_event": {
    "event_type": 1,
    "navigation_info": {
      "order_id": "1881347710714060802",
      "task_id": "task-001",
      "order_phase": 1,
      "navigation_id": 123456,
      "navigation_status": 1,
      "navi_progress_info": {
        "navigation_id": 123456,
        "route_remain_dist": 500.5,
        "route_remain_time": 60,
        "position": {
          "longitude": 0,
          "latitude": 0,
          "heading": 0
        },
        "route_id": "route-001"
      },
      "timestamp": 1772000476240,
      "route_id": "route-001"
    },
    "point": {
      "waypoint_id": "wp-001",
      "point_type": 1,
      "action_type": 1,
      "point": {
        "longitude": 0,
        "latitude": 0
      },
      "sequence": 1
    },
    "timestamp": 1772000476240
  }
}
xp-robotaxi-automatic-pilot-boot/src/test/resources/jsondemo/cloud/navigation_requset.json
New file
@@ -0,0 +1,32 @@
{
  "header": {
    "timestamp": 1772000476240,
    "cmd": 14002,
    "sequence": 1,
    "type": 2,
    "msg_id": "MSG-UUID-1234-5678",
    "source": 3
  },
  "navigation_requset": {
    "request_id": "req-001",
    "order_id": "1881347710714060802",
    "task_id": "task-001",
    "order_phase": 1,
    "navigation_type": 2,
    "current_pose": {
      "timestamp": 1772000476240,
      "navi_pose": {
        "longitude": 113.3245,
        "latitude": 23.1235,
        "course": 90,
        "pos_acc": 0.5,
        "alt": 10
      }
    },
    "target_point": {
      "longitude": 113.3288,
      "latitude": 23.1288
    },
    "timestamp": 1772000476240
  }
}
xp-robotaxi-automatic-pilot-boot/src/test/resources/jsondemo/cloud/order_status_info_event.json
New file
@@ -0,0 +1,164 @@
{
  "header": {
    "timestamp": 1772000476240,
    "cmd": 16006,
    "sequence": 1,
    "type": 2,
    "msg_id": "MSG-UUID-1234-5678",
    "source": 3
  },
  "order_status_info_event": {
    "event_type": 1,
    "order_status_info": {
      "order_id": "1881347710714060802",
      "task_id": "task-001",
      "status": 1,
      "order_phase": 1,
      "change_source": 1,
      "operator_id": "user-001",
      "rt_trip_info": {
        "order_id": "1881347710714060802",
        "task_id": "task-001",
        "trip_status": 2,
        "order_phase": 1,
        "trip_completion_status": 0,
        "summary": {
          "distance_km": 0,
          "duration_sec": 0
        },
        "point": {
          "waypoint_id": "wp-001",
          "point_type": 1,
          "action_type": 1,
          "point": {
            "longitude": 0,
            "latitude": 0
          },
          "sequence": 1
        },
        "current_task": {
          "order_id": "1881347710714060802",
          "task_id": "task-001",
          "status": 3,
          "change_source": 1,
          "navi_progress_info": {
            "navigation_id": 123456,
            "route_remain_dist": 500.5,
            "route_remain_time": 60,
            "position": {
              "longitude": 0,
              "latitude": 0,
              "heading": 0
            },
            "route_id": "route-001"
          },
          "timestamp": 1772000476240
        }
      },
      "timestamp": 1772000476240
    },
    "point": {
      "waypoint_id": "wp-001",
      "point_type": 1,
      "action_type": 1,
      "point": {
        "longitude": 0,
        "latitude": 0
      },
      "sequence": 1
    },
    "trip_info_event": {
        "event_type": 1,
        "trip_info": {
            "order_id": "1881347710714060802",
            "task_id": "task-001",
            "trip_status": 2,
            "order_phase": 1,
            "trip_completion_status": 0,
            "summary": {
                "distance_km": 0,
                "duration_sec": 0
            },
            "point": {
                "waypoint_id": "wp-001",
                "point_type": 1,
                "action_type": 1,
                "point": {
                    "longitude": 0,
                    "latitude": 0
                },
                "sequence": 1
            },
            "current_task": {
                "order_id": "1881347710714060802",
                "task_id": "task-001",
                "status": 3,
                "change_source": 1,
                "navi_progress_info": {
                    "navigation_id": 123456,
                    "route_remain_dist": 500.5,
                    "route_remain_time": 60,
                    "position": {
                        "longitude": 0,
                        "latitude": 0,
                        "heading": 0
                    },
                    "route_id": "route-001"
                },
                "timestamp": 1772000476240
            }
        },
        "point": {
            "waypoint_id": "wp-001",
            "point_type": 1,
            "action_type": 1,
            "point": {
                "longitude": 0,
                "latitude": 0
            },
            "sequence": 1
        },
        "task_running_state_event": {
            "event_type": 1,
            "task_running_state": {
                "order_id": "1881347710714060802",
                "task_id": "task-001",
                "status": 3,
                "change_source": 1,
                "navi_progress_info": {
                    "navigation_id": 123456,
                    "route_remain_dist": 500.5,
                    "route_remain_time": 60,
                    "position": {
                        "longitude": 0,
                        "latitude": 0,
                        "heading": 0
                    },
                    "route_id": "route-001"
                },
                "timestamp": 1772000476240
            },
            "point": {
                "waypoint_id": "wp-001",
                "point_type": 1,
                "action_type": 1,
                "point": {
                    "longitude": 0,
                    "latitude": 0
                },
                "sequence": 1
            },
            "timestamp": 1772000476240
        },
        "latest_arrival_info": {
            "point_id": "point-id-001",
            "point_type": 3,
            "action_type": 2,
            "arrival_status": 2,
            "timestamp": 1772000476240
        },
        "timestamp": 1772000476240
    },
    "timestamp": 1772000476240
  }
}
xp-robotaxi-automatic-pilot-boot/src/test/resources/jsondemo/cloud/rt_task_list.json
New file
@@ -0,0 +1,57 @@
{
  "header": {
    "timestamp": 1772000476240,
    "cmd": 10005,
    "sequence": 1,
    "type": 2,
    "msg_id": "MSG-UUID-1234-5678",
    "source": 1
  },
  "rt_task_list": {
    "tasks": [
      {
        "task_id": "task-002",
        "order_id": "order-002",
        "order_phase": [1, 2],
        "points": [
          {
            "waypoint_id": "wp-001",
            "point_type": 1,
            "action_type": 0,
            "point": {
              "longitude": 113.3245,
              "latitude": 23.1235
            },
            "sequence": 1
          },
          {
            "waypoint_id": "wp-002",
            "point_type": 3,
            "action_type": 2,
            "point": {
              "longitude": 113.3288,
              "latitude": 23.1288
            },
            "sequence": 2
          }
        ],
        "task_type": 1,
        "pre_actions": [
            {
                "order_id": "order-001",
                "task_id": "task-001",
                "action_type": 0
            }
        ],
        "post_actions": [
            {
                "order_id": "",
                "task_id": "",
                "action_type": 0
            }
        ],
        "sequence": 1
      }
    ]
  }
}
xp-robotaxi-automatic-pilot-boot/src/test/resources/jsondemo/cloud/rt_task_list_response.json
New file
@@ -0,0 +1,19 @@
{
  "header": {
    "timestamp": 1772000476240,
    "cmd": 10002,
    "sequence": 1,
    "type": 2,
    "msg_id": "MSG-UUID-1234-5678",
    "source": 1
  },
  "rt_task_list_response": {
    "results": [
      {
        "order_id": "1881347710714060802",
        "task_id": "task-002",
        "status": 1
      }
    ]
  }
}
xp-robotaxi-automatic-pilot-boot/src/test/resources/jsondemo/cloud/system_state_snapshot_event.json
New file
@@ -0,0 +1,215 @@
{
  "header": {
    "timestamp": 1772000476240,
    "cmd": 16014,
    "sequence": 1,
    "type": 2,
    "msg_id": "MSG-UUID-1234-5678",
    "source": 3
  },
  "system_state_snapshot_event": {
    "event_type": 1,
    "system_state_snapshot": {
      "order_status_events": {
        "event_type": 1,
        "order_status_info": {
          "order_id": "1881347710714060802",
          "task_id": "task-001",
          "status": 2,
          "order_phase": 1,
          "change_source": 1,
          "operator_id": "user-001",
          "rt_trip_info": {
            "order_id": "1881347710714060802",
            "task_id": "task-001",
            "trip_status": 2,
            "order_phase": 1,
            "trip_completion_status": 0,
            "summary": {
              "distance_km": 0,
              "duration_sec": 0
            },
            "point": {
              "waypoint_id": "wp-001",
              "point_type": 1,
              "action_type": 1,
              "point": {
                "longitude": 0,
                "latitude": 0
              },
              "sequence": 1
            },
            "current_task": {
              "order_id": "1881347710714060802",
              "task_id": "task-001",
              "status": 3,
              "change_source": 1,
              "navi_progress_info": {
                "navigation_id": 123456,
                "route_remain_dist": 500.5,
                "route_remain_time": 60,
                "position": {
                  "longitude": 0,
                  "latitude": 0,
                  "heading": 0
                },
                "route_id": "route-001"
              },
              "timestamp": 1772000476240
            }
          },
          "timestamp": 1772000476240
        },
        "point": {
          "waypoint_id": "wp-001",
          "point_type": 1,
          "action_type": 1,
          "point": {
            "longitude": 0,
            "latitude": 0
          },
          "sequence": 1
        },
        "trip_info_event": {
          "event_type": 1,
          "trip_info": {
            "order_id": "1881347710714060802",
            "task_id": "task-001",
            "trip_status": 2,
            "order_phase": 1,
            "trip_completion_status": 0,
            "summary": {
              "distance_km": 0,
              "duration_sec": 0
            },
            "point": {
              "waypoint_id": "wp-001",
              "point_type": 1,
              "action_type": 1,
              "point": {
                "longitude": 0,
                "latitude": 0
              },
              "sequence": 1
            },
            "current_task": {
              "order_id": "1881347710714060802",
              "task_id": "task-001",
              "status": 3,
              "change_source": 1,
              "navi_progress_info": {
                "navigation_id": 123456,
                "route_remain_dist": 500.5,
                "route_remain_time": 60,
                "position": {
                  "longitude": 0,
                  "latitude": 0,
                  "heading": 0
                },
                "route_id": "route-001"
              },
              "timestamp": 1772000476240
            }
          },
          "point": {
            "waypoint_id": "wp-001",
            "point_type": 1,
            "action_type": 1,
            "point": {
              "longitude": 0,
              "latitude": 0
            },
            "sequence": 1
          },
          "task_running_state_event": {
            "event_type": 1,
            "task_running_state": {
              "order_id": "1881347710714060802",
              "task_id": "task-001",
              "status": 3,
              "change_source": 1,
              "navi_progress_info": {
                "navigation_id": 123456,
                "route_remain_dist": 500.5,
                "route_remain_time": 60,
                "position": {
                  "longitude": 0,
                  "latitude": 0,
                  "heading": 0
                },
                "route_id": "route-001"
              },
              "timestamp": 1772000476240
            },
            "point": {
              "waypoint_id": "wp-001",
              "point_type": 1,
              "action_type": 1,
              "point": {
                "longitude": 0,
                "latitude": 0
              },
              "sequence": 1
            },
            "timestamp": 1772000476240
          },
          "latest_arrival_info": {
            "point_id": "point-id-001",
            "point_type": 3,
            "action_type": 2,
            "arrival_status": 2,
            "timestamp": 1772000476240
          },
          "timestamp": 1772000476240
        },
        "timestamp": 1772000476240
      },
      "navigation_event": {
        "event_type": 1,
        "navigation_info": {
          "order_id": "1881347710714060802",
          "task_id": "task-001",
          "order_phase": 1,
          "navigation_id": 123456,
          "navigation_status": 1,
          "navi_progress_info": {
            "navigation_id": 123456,
            "route_remain_dist": 500.5,
            "route_remain_time": 60,
            "position": {
              "longitude": 0,
              "latitude": 0,
              "heading": 0
            },
            "route_id": "route-001"
          },
          "timestamp": 1772000476240,
          "route_id": "route-001"
        },
        "point": {
          "waypoint_id": "wp-001",
          "point_type": 1,
          "action_type": 1,
          "point": {
            "longitude": 0,
            "latitude": 0
          },
          "sequence": 1
        },
        "timestamp": 1772000476240
      },
      "realtime_pose": {
        "timestamp": 1772000476240,
        "navi_pose": {
          "longitude": 113.3245,
          "latitude": 23.1235,
          "course": 90,
          "pos_acc": 0.5,
          "alt": 10
        }
      },
      "timestamp": 1772000476240
    },
    "timestamp": 1772000476240
  }
}
xp-robotaxi-automatic-pilot-boot/src/test/resources/jsondemo/cloud/system_status_update_event.json
New file
@@ -0,0 +1,32 @@
{
  "header": {
    "timestamp": 1772000476240,
    "cmd": 16004,
    "sequence": 1,
    "type": 2,
    "msg_id": "MSG-UUID-1234-5678",
    "source": 3
  },
  "system_status_update_event": {
    "event_type": 1,
    "system_status": {
      "phase": 3,
      "abnormal_reason": 0,
      "available_services": [
        1
      ],
      "is_emergency": false
    },
    "point": {
      "waypoint_id": "wp-001",
      "point_type": 1,
      "action_type": 1,
      "point": {
        "longitude": 0,
        "latitude": 0
      },
      "sequence": 1
    },
    "timestamp": 1772000476240
  }
}
xp-robotaxi-automatic-pilot-boot/src/test/resources/jsondemo/cloud/task_control.json
New file
@@ -0,0 +1,16 @@
{
  "header": {
    "timestamp": 1772000476240,
    "cmd": 10002,
    "sequence": 1,
    "type": 2,
    "msg_id": "MSG-UUID-1234-5678",
    "source": 1
  },
  "task_control": {
    "order_id": "1881347710714060802",
    "task_id": "task-001",
    "control_type": 1,
    "timestamp": 1772000476240
  }
}
xp-robotaxi-automatic-pilot-boot/src/test/resources/jsondemo/cloud/task_control_state.json
New file
@@ -0,0 +1,16 @@
{
  "header": {
    "timestamp": 1772000476240,
    "cmd": 16005,
    "sequence": 1,
    "type": 2,
    "msg_id": "MSG-UUID-1234-5678",
    "source": 1
  },
  "task_control_state": {
    "order_id": "1881347710714060802",
    "task_id": "task-001",
    "control_type": 1,
    "status": 2
  }
}
xp-robotaxi-automatic-pilot-boot/src/test/resources/jsondemo/common/order_operation.json
New file
@@ -0,0 +1,38 @@
{
  "header": {
    "timestamp": 1772000476240,
    "cmd": 10001,
    "sequence": 1,
    "type": 2,
    "msg_id": "MSG-UUID-1234-5678",
    "source": 1
  },
  "order_operation": {
    "order_id": "1881347710714060802",
    "task_id": "task-001",
    "operation_type": 1,
    "order_type": 1,
    "waypoints": [
      {
        "waypoint_id": "wp-001",
        "point_type": 1,
        "action_type": 0,
        "point": {
          "longitude": 0,
          "latitude": 0
        },
        "sequence": 0
      }
    ],
    "target_point": {
      "waypoint_id": "wp-002",
      "point_type": 3,
      "action_type": 0,
      "point": {
        "longitude": 0,
        "latitude": 0
      },
      "sequence": 0
    }
  }
}
xp-robotaxi-automatic-pilot-boot/src/test/resources/jsondemo/common/order_operation_state.json
New file
@@ -0,0 +1,15 @@
{
  "header": {
    "timestamp": 1772000476240,
    "cmd": 16006,
    "sequence": 1,
    "type": 2,
    "msg_id": "MSG-UUID-1234-5678",
    "source": 1
  },
  "order_operation_state": {
    "order_id": "1881347710714060802",
    "operation_type": 1,
    "status": 1
  }
}
xp-robotaxi-automatic-pilot-boot/src/test/resources/jsondemo/common/response.json
New file
@@ -0,0 +1,15 @@
{
  "header": {
    "timestamp": 1772000476240,
    "cmd": 10005,
    "sequence": 0,
    "type": 0,
    "msg_id": "MSG-UUID-1234-5678",
    "source": 0
  },
  "response": {
    "request_seq": 0,
    "code": 200,
    "timestamp": 1772000476240
  }
}
xp-robotaxi-automatic-pilot-boot/src/test/resources/jsondemo/common/restore_navigation_data.json
New file
@@ -0,0 +1,16 @@
{
  "header": {
    "timestamp": 1772000476240,
    "cmd": 10006,
    "sequence": 1,
    "type": 2,
    "msg_id": "MSG-UUID-1234-5678",
    "source": 1
  },
  "restore_navigation_data": {
    "request_id": "req-001",
    "route_id": "route-001",
    "content": "navigation_data_content_string",
    "timestamp": 1772000476240
  }
}
xp-robotaxi-automatic-pilot-boot/src/test/resources/jsondemo/common/system_runtime_status.json
New file
@@ -0,0 +1,154 @@
{
  "header": {
    "timestamp": 1772000476240,
    "cmd": 14001,
    "sequence": 1,
    "type": 2,
    "msg_id": "MSG-UUID-1234-5678",
    "source": 3
  },
  "system_runtime_status": {
    "timestamp": 1772000476240,
    "uid": 12345678,
    "vehicle_status": {
      "static_info": {
        "xpu_id": "xpu-001",
        "timestamp": 1772000476240
      },
      "dynamic_status": {
        "gear_level": 1,
        "steering_angle": 0.5,
        "speed": 10.5,
        "timestamp": 1772000476240,
        "bms_soc_disp": 80,
        "dst_bat_disp": 400.5
      }
    },
    "system_status": {
      "phase": 3,
      "abnormal_reason": 0,
      "available_services": [
        1
      ],
      "is_emergency": false
    },
    "driving_mode": 1,
    "running_order_status_info": {
      "order_id": "1881347710714060802",
      "task_id": "task-001",
      "status": 2,
      "order_phase": 1,
      "change_source": 1,
      "operator_id": "user-001",
      "rt_trip_info": {
        "order_id": "1881347710714060802",
        "task_id": "task-001",
        "trip_status": 2,
        "order_phase": 1,
        "trip_completion_status": 0,
        "summary": {
          "distance_km": 0,
          "duration_sec": 0
        },
        "point": {
          "waypoint_id": "wp-001",
          "point_type": 1,
          "action_type": 1,
          "point": {
            "longitude": 0,
            "latitude": 0
          },
          "sequence": 1
        },
        "current_task": {
          "order_id": "1881347710714060802",
          "task_id": "task-001",
          "status": 3,
          "change_source": 1,
          "navi_progress_info": {
            "navigation_id": 123456,
            "route_remain_dist": 500.5,
            "route_remain_time": 60,
            "position": {
              "longitude": 0,
              "latitude": 0,
              "heading": 0
            },
            "route_id": "route-001"
          },
          "timestamp": 1772000476240
        }
      },
      "timestamp": 1772000476240
    },
    "rt_trip_info": {
      "order_id": "1881347710714060802",
      "task_id": "task-001",
      "trip_status": 2,
      "order_phase": 1,
      "trip_completion_status": 0,
      "summary": {
        "distance_km": 0,
        "duration_sec": 0
      },
      "point": {
        "waypoint_id": "wp-001",
        "point_type": 1,
        "action_type": 1,
        "point": {
          "longitude": 0,
          "latitude": 0
        },
        "sequence": 1
      },
      "current_task": {
        "order_id": "1881347710714060802",
        "task_id": "task-001",
        "status": 3,
        "change_source": 1,
        "navi_progress_info": {
          "navigation_id": 123456,
          "route_remain_dist": 500.5,
          "route_remain_time": 60,
          "position": {
            "longitude": 0,
            "latitude": 0,
            "heading": 0
          },
          "route_id": "route-001"
        },
        "timestamp": 1772000476240
      }
    },
    "pose": {
      "timestamp": 1772000476240,
      "navi_pose": {
        "longitude": 113.3245,
        "latitude": 23.1235,
        "course": 90,
        "pos_acc": 0.5,
        "alt": 10
      }
    },
    "navigation_info": {
      "order_id": "1881347710714060802",
      "task_id": "task-001",
      "order_phase": 1,
      "navigation_id": 123456,
      "navigation_status": 1,
      "navi_progress_info": {
        "navigation_id": 123456,
        "route_remain_dist": 500.5,
        "route_remain_time": 60,
        "position": {
          "longitude": 0,
          "latitude": 0,
          "heading": 0
        },
        "route_id": "route-001"
      },
      "timestamp": 1772000476240,
      "route_id": "route-001"
    }
  }
}
xp-robotaxi-itinerary-boot/src/main/java/com/xiaopeng/itinerary/service/impl/XpPricingServiceImpl.java
@@ -9,13 +9,16 @@
import com.xiaopeng.api.dto.account.GetUserCouponDto;
import com.xiaopeng.api.dto.map.RouteAndFareDto;
import com.xiaopeng.api.dto.operation.LonLatDto;
import com.xiaopeng.api.dto.pushMessage.SendMessageDTO;
import com.xiaopeng.api.feignClient.account.XpAppUserClient;
import com.xiaopeng.api.feignClient.account.XpAppUserCouponClient;
import com.xiaopeng.api.feignClient.map.XpMapClient;
import com.xiaopeng.api.feignClient.order.XpOrderClient;
import com.xiaopeng.api.feignClient.pushMessage.XpPushMessageClient;
import com.xiaopeng.api.model.account.XpAppUser;
import com.xiaopeng.api.model.operation.*;
import com.xiaopeng.api.model.order.XpOrder;
import com.xiaopeng.api.model.order.XpOrderDetail;
import com.xiaopeng.api.vo.account.UserCouponVo;
import com.xiaopeng.api.vo.operation.FareVo;
import com.xiaopeng.api.vo.operation.RouteAndFareVo;
@@ -39,6 +42,7 @@
import javax.annotation.PreDestroy;
import javax.annotation.Resource;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.time.LocalTime;
import java.util.*;
@@ -88,7 +92,6 @@
    @Resource
    private XpElectronicFenceAreaMapper xpElectronicFenceAreaMapper;
    @Resource
    private XpWhitelistMapper xpWhitelistMapper;
@@ -106,6 +109,9 @@
    @Autowired
    private XpPointService xpPointService;
    @Resource
    private XpPushMessageClient xpPushMessageClient;
    // 自定义线程池用于并行执行任务
@@ -547,6 +553,8 @@
        // 静默处理 不推单
        if (isSilent) {
            // todo 用于测试流程,正式联调需要删除此代码
            testOrder(orderId);
            return orderId;
        }
@@ -606,7 +614,6 @@
        xpGeoQueryEntity.setStatus(0);
        geoQueryEntityService.save(xpGeoQueryEntity);
        return orderId;
//
@@ -666,4 +673,219 @@
    }
    /**
     * 测试阶段用于自动完成小程序的整个流程数据状态流转
     * @param orderId
     */
    private void testOrder(Long orderId){
        ThreadPoolExecutor poolExecutor = new ThreadPoolExecutor(1, 1, 0L, TimeUnit.MILLISECONDS, new LinkedBlockingQueue<>(10000));
        poolExecutor.execute(()->{
            XpOrder xpOrder = xpOrderClient.queryOrderById(orderId).getData();
            Long appUserId = xpOrder.getAppUserId();
            xpOrder.setStatus(2);
            xpOrder.setVehicleId(1L);
            xpOrder.setFleetId(2L);
            xpOrderClient.updateOrder(xpOrder);
            //等待5秒钟
            try {
                Thread.sleep(5000);
            } catch (InterruptedException e) {
                throw new RuntimeException(e);
            }
            //修改状态为接驾中
            xpOrder.setStatus(3);
            xpOrder.setAppUserId(null);
            xpOrderClient.updateOrder(xpOrder);
            //发送订单状态
            SendMessageDTO dto = new SendMessageDTO();
            dto.setAppUserId(appUserId.toString());
            dto.setMessage("{\"type\":\"ORDER_STATUS\",\"content\":\"{\\\"orderId\\\":\\\"" + orderId + "\\\",\\\"status\\\":3}\",\"timestamp\":\"176569945845456\"}");
            xpPushMessageClient.sendStatus(dto);
            //推送车辆位置
            dto.setMessage("{\"type\":\"VEHICLE_LOCATION\",\"content\":\"{\\\"orderId\\\":\\\"" + orderId + "\\\",\\\"lon\\\":113.385848,\\\"lat\\\":23.156841}\",\"timestamp\":\"176569945845456\"}");
            xpPushMessageClient.sendVehicleLocation(dto);
            //发送车辆到达起点的轨迹
            RouteAndFareDto routeAndFareDto = new RouteAndFareDto();
            LonLatDto destination = new LonLatDto();
            destination.setLongitude(xpOrder.getStartLon());
            destination.setLatitude(xpOrder.getStartLat());
            routeAndFareDto.setDestination(destination);
            LonLatDto origin = new LonLatDto();
            origin.setLongitude(113.385848);
            origin.setLatitude(23.156841);
            routeAndFareDto.setOrigin(origin);
            routeAndFareDto.setOpenCityId(2L);
            RouteVo routeVo = xpMapClient.getDistanceAndDuration(routeAndFareDto).getData();
            com.alibaba.fastjson2.JSONObject jsonObject = new com.alibaba.fastjson2.JSONObject();
            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("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", collect);
            content.put("route", route.toJSONString());
            jsonObject.put("content", content.toJSONString());
            SendMessageDTO messageDTO = new SendMessageDTO();
            messageDTO.setAppUserId(appUserId.toString());
            messageDTO.setMessage(jsonObject.toJSONString());
            xpPushMessageClient.sendRoute(messageDTO);
            //等待10秒钟
            try {
                Thread.sleep(10000);
            } catch (InterruptedException e) {
                throw new RuntimeException(e);
            }
            //司机到达起点
            xpOrder.setStatus(4);
            xpOrderClient.updateOrder(xpOrder);
            dto.setMessage("{\"type\":\"ORDER_STATUS\",\"content\":\"{\\\"orderId\\\":\\\"" + orderId + "\\\",\\\"status\\\":4}\",\"timestamp\":\"176569945845456\"}");
            xpPushMessageClient.sendStatus(dto);
            //推送车辆位置到起点
            dto.setMessage("{\"type\":\"VEHICLE_LOCATION\",\"content\":\"{\\\"orderId\\\":\\\"" + orderId + "\\\",\\\"lon\\\":" + xpOrder.getStartLon() + ",\\\"lat\\\":" + xpOrder.getStartLat() + "}\",\"timestamp\":\"176569945845456\"}");
            xpPushMessageClient.sendVehicleLocation(dto);
            //等待5秒钟
            try {
                Thread.sleep(5000);
            } catch (InterruptedException e) {
                throw new RuntimeException(e);
            }
            //乘客上车
            xpOrder.setStatus(5);
            xpOrder.setBoardingTime(LocalDateTime.now());
            xpOrder.setBoardingLat(xpOrder.getStartLat());
            xpOrder.setBoardingLon(xpOrder.getStartLon());
            xpOrder.setBoardingAddress(xpOrder.getStartAddress());
            xpOrderClient.updateOrder(xpOrder);
            dto.setMessage("{\"type\":\"ORDER_STATUS\",\"content\":\"{\\\"orderId\\\":\\\"" + orderId + "\\\",\\\"status\\\":5}\",\"timestamp\":\"176569945845456\"}");
            xpPushMessageClient.sendStatus(dto);
            //等待5秒钟
            try {
                Thread.sleep(5000);
            } catch (InterruptedException e) {
                throw new RuntimeException(e);
            }
            //开始服务中
            xpOrder.setStatus(6);
            xpOrder.setTripBegin(LocalDateTime.now());
            xpOrderClient.updateOrder(xpOrder);
            dto.setMessage("{\"type\":\"ORDER_STATUS\",\"content\":\"{\\\"orderId\\\":\\\"" + orderId + "\\\",\\\"status\\\":6}\",\"timestamp\":\"176569945845456\"}");
            xpPushMessageClient.sendStatus(dto);
            //推送起点到终点的行驶轨迹
            routeAndFareDto = new RouteAndFareDto();
            routeAndFareDto.setDestination(new LonLatDto(xpOrder.getEndLon(), xpOrder.getEndLat()));
            routeAndFareDto.setOrigin(new LonLatDto(xpOrder.getStartLon(), xpOrder.getStartLat()));
            routeAndFareDto.setOpenCityId(2L);
            routeVo = xpMapClient.getDistanceAndDuration(routeAndFareDto).getData();
            jsonObject = new com.alibaba.fastjson2.JSONObject();
            jsonObject.put("type", "ORDER_ROUTE");
            jsonObject.put("timestamp", System.currentTimeMillis());
            content = new com.alibaba.fastjson2.JSONObject();
            content.put("orderId", orderId);
            content.put("routeType", 2);
            route = new com.alibaba.fastjson2.JSONObject();
            route.put("distance", routeVo.getDistance());
            route.put("duration", routeVo.getDuration());
            route.put("routeID", routeVo.getRouteID());
            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", collect);
            content.put("route", route.toJSONString());
            jsonObject.put("content", content.toJSONString());
            messageDTO = new SendMessageDTO();
            messageDTO.setAppUserId(appUserId.toString());
            messageDTO.setMessage(jsonObject.toJSONString());
            xpPushMessageClient.sendRoute(messageDTO);
            //等到10秒钟
            try {
                Thread.sleep(10000);
            } catch (InterruptedException e) {
                throw new RuntimeException(e);
            }
            //乘客待下车
            xpOrder.setStatus(7);
            xpOrder.setTripEnd(LocalDateTime.now());
            xpOrder.setGetoffLat(xpOrder.getEndLat());
            xpOrder.setGetoffLon(xpOrder.getEndLon());
            xpOrder.setGetoffAddress(xpOrder.getEndAddress());
            xpOrder.setGetoffTime(LocalDateTime.now());
            xpOrder.setOrderMoney(new BigDecimal(50));
            xpOrder.setStartMileage(5D);
            xpOrder.setStartMoney(new BigDecimal(10));
            xpOrder.setMileageKilometers(10D);
            xpOrder.setMileageMoney(new BigDecimal(25));
            xpOrder.setDuration(20D);
            xpOrder.setDurationMoney(new BigDecimal(5));
            xpOrder.setWait(0D);
            xpOrder.setWaitMoney(new BigDecimal(0));
            xpOrder.setLongDistance(10D);
            xpOrder.setLongDistanceType(1);
            xpOrder.setLongDistancemoney(new BigDecimal(10));
            xpOrderClient.updateOrder(xpOrder);
            //添加费用明细
//            XpOrderDetail detail = new XpOrderDetail();
//            detail.setDetailType(1);
//            detail.setOrderId(orderId);
//            detail.setType(1);
//            detail.setTime("");
//            detail.setDuration(20D);
//            detail.setMileage(new BigDecimal(10));
//            detail.setMoney();
//            detail.setIsDeleted(false);
//            detail.setCreateTime(LocalDateTime.now());
//            detail.setUpdateTime(LocalDateTime.now());
//            xpOrder
            //推送车辆位置到起点
            dto.setMessage("{\"type\":\"VEHICLE_LOCATION\",\"content\":\"{\\\"orderId\\\":\\\"" + orderId + "\\\",\\\"lon\\\":" + xpOrder.getEndLon() + ",\\\"lat\\\":" + xpOrder.getEndLat() + "}\",\"timestamp\":\"176569945845456\"}");
            xpPushMessageClient.sendVehicleLocation(dto);
            dto.setMessage("{\"type\":\"ORDER_STATUS\",\"content\":\"{\\\"orderId\\\":\\\"" + orderId + "\\\",\\\"status\\\":7}\",\"timestamp\":\"176569945845456\"}");
            xpPushMessageClient.sendStatus(dto);
            //等到5秒钟
            try {
                Thread.sleep(5000);
            } catch (InterruptedException e) {
                throw new RuntimeException(e);
            }
            //乘客待支付
            xpOrder.setStatus(8);
            xpOrderClient.updateOrder(xpOrder);
            dto.setMessage("{\"type\":\"ORDER_STATUS\",\"content\":\"{\\\"orderId\\\":\\\"" + orderId + "\\\",\\\"status\\\":8}\",\"timestamp\":\"176569945845456\"}");
            xpPushMessageClient.sendStatus(dto);
            //等到5秒钟
            try {
                Thread.sleep(5000);
            } catch (InterruptedException e) {
                throw new RuntimeException(e);
            }
            //乘客支付成功
            xpOrder.setStatus(9);
            xpOrderClient.updateOrder(xpOrder);
            dto.setMessage("{\"type\":\"ORDER_STATUS\",\"content\":\"{\\\"orderId\\\":\\\"" + orderId + "\\\",\\\"status\\\":9}\",\"timestamp\":\"176569945845456\"}");
            xpPushMessageClient.sendStatus(dto);
        });
    }
}
xp-robotaxi-maintenance-boot/src/main/java/com/xiaopeng/maintenance/controller/XpSchedulingDetailController.java
@@ -45,9 +45,9 @@
    public R<PageInfo<SchedulingDetailDto>> pageList(@RequestBody SchedulingDetailVo query){
    }
//    public R<PageInfo<SchedulingDetailDto>> pageList(@RequestBody SchedulingDetailVo query){
//
//    }
}
xp-robotaxi-maintenance-boot/src/main/java/com/xiaopeng/maintenance/controller/XpVehicleOperationsController.java
@@ -1,7 +1,6 @@
package com.xiaopeng.maintenance.controller;
import cn.hutool.core.util.IdUtil;
import com.sun.xml.internal.bind.v2.TODO;
import com.xiaopeng.api.dto.automaticPilot.PushOrderDto;
import com.xiaopeng.api.feignClient.automaticPilot.OrderMissionClient;
import com.xiaopeng.api.feignClient.order.XpCruiseOrderClient;
@@ -11,27 +10,24 @@
import com.xiaopeng.api.vo.automaticPilot.VehiclePosition;
import com.xiaopeng.common.core.domain.R;
import com.xiaopeng.common.core.web.page.PageInfo;
import com.xiaopeng.common.redis.service.RedisService;
import com.xiaopeng.maintenance.dto.VehicleDispatchAcceptDTO;
import com.xiaopeng.maintenance.dto.VehicleDispatchDepartureDTO;
import com.xiaopeng.maintenance.model.query.OperationRecordsQuery;
import com.xiaopeng.maintenance.service.IXpVehiclePreparationService;
import com.xiaopeng.maintenance.model.vo.OperationRecordsVO;
import com.xiaopeng.maintenance.service.IXpVehiclePreparationService;
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.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;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
import javax.annotation.Resource;
/**
 * <p>
@@ -46,15 +42,15 @@
@Api(tags = "车辆运维")
public class XpVehicleOperationsController {
    @Autowired
    @Resource
    private IXpVehiclePreparationService xpVehiclePreparationService;
    @Autowired
    @Resource
    private XpVehicleClient xpVehicleClient;
    @Autowired
    @Resource
    private XpCruiseOrderClient xpCruiseOrderClient;
    @Autowired
    @Resource
    private MongoTemplate mongoTemplate;
    @Autowired
    @Resource
    private OrderMissionClient orderMissionClient;
    /**
xp-robotaxi-order-boot/src/main/java/com/xiaopeng/order/service/impl/XpOrderDetailServiceImpl.java
@@ -1,11 +1,8 @@
package com.xiaopeng.order.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.xiaopeng.api.model.order.XpOrderCancel;
import com.xiaopeng.api.model.order.XpOrderDetail;
import com.xiaopeng.order.mapper.XpOrderCancelMapper;
import com.xiaopeng.order.mapper.XpOrderDetailMapper;
import com.xiaopeng.order.service.IXpOrderCancelService;
import com.xiaopeng.order.service.IXpOrderDetailService;
import org.springframework.stereotype.Service;
xp-robotaxi-vehicle-convoy-boot/src/main/java/com/xiaopeng/vehicleConvoy/service/IXpFleetVehicleService.java
@@ -3,6 +3,8 @@
import com.xiaopeng.api.model.vehicleConvoy.XpFleetVehicle;
import com.baomidou.mybatisplus.extension.service.IService;
import java.util.List;
/**
 * <p>
 * 车队车辆中间表 服务类