From 746517aca9d0b7ae334c70b3041a9b1de795addb Mon Sep 17 00:00:00 2001
From: xuhy <3313886187@qq.com>
Date: 星期三, 22 四月 2026 11:08:37 +0800
Subject: [PATCH] Merge branch '1.0' of http://120.76.84.145:10101/gitblit/r/java/Robotaxi into 1.0
---
xp-robotaxi-order-boot/src/main/java/com/xiaopeng/order/controller/CustomerServiceController.java | 91 +++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 91 insertions(+), 0 deletions(-)
diff --git a/xp-robotaxi-order-boot/src/main/java/com/xiaopeng/order/controller/CustomerServiceController.java b/xp-robotaxi-order-boot/src/main/java/com/xiaopeng/order/controller/CustomerServiceController.java
index d4fac06..ebc8c51 100644
--- a/xp-robotaxi-order-boot/src/main/java/com/xiaopeng/order/controller/CustomerServiceController.java
+++ b/xp-robotaxi-order-boot/src/main/java/com/xiaopeng/order/controller/CustomerServiceController.java
@@ -9,7 +9,9 @@
import com.xiaopeng.api.feignClient.vehicleConvoy.XpVehicleClient;
import com.xiaopeng.api.model.order.XpOrder;
import com.xiaopeng.api.model.vehicleConvoy.XpVehicle;
+import com.xiaopeng.api.vo.automaticPilot.AppUserPosition;
import com.xiaopeng.api.vo.automaticPilot.VehiclePosition;
+import com.xiaopeng.api.vo.vehicleConvoy.VehicleDoorStatusVo;
import com.xiaopeng.common.core.domain.R;
import com.xiaopeng.common.core.utils.StringUtils;
import com.xiaopeng.order.dto.UserOrderListDto;
@@ -24,6 +26,7 @@
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
+import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;
@@ -162,6 +165,52 @@
/**
+ * 8. 查询乘客位置
+ * @param orderId
+ * @return
+ */
+ @GetMapping("/getAppUserLocation/{orderId}")
+ @ApiOperation(value = "查询乘客位置", notes = "客服系统对接")
+ @ApiImplicitParam(name = "orderId", value = "订单ID", required = true, dataType = "Long", paramType = "path")
+ public R<AppUserLocationVo> getAppUserLocation(@PathVariable Long orderId){
+ XpOrder xpOrder = xpOrderService.getById(orderId);
+ if(null == xpOrder){
+ return R.ok();
+ }
+ AppUserLocationVo vo = new AppUserLocationVo();
+ AppUserPosition userPosition = mongoTemplate.findOne(Query.query(Criteria.where("appUserId").is(xpOrder.getAppUserId())), AppUserPosition.class);
+ if(null != userPosition){
+ vo.setPassengerLng(userPosition.getPoint().getX());
+ vo.setPassengerLat(userPosition.getPoint().getY());
+ return R.ok(vo);
+ }
+ return R.ok();
+ }
+
+
+ /**
+ * 9. 根据 订单查询安全带及座椅传感器状态
+ * @param orderId
+ * @return
+ */
+ @GetMapping("/getVehicleSeatStatus/{orderId}")
+ @ApiOperation(value = "根据 订单查询安全带及座椅传感器状态", notes = "客服系统对接")
+ @ApiImplicitParam(name = "orderId", value = "订单ID", required = true, dataType = "Long", paramType = "path")
+ public R<VehicleSeatStatusVo> getVehicleSeatStatus(@PathVariable Long orderId){
+ XpOrder xpOrder = xpOrderService.getById(orderId);
+ if(null == xpOrder){
+ return R.ok();
+ }
+
+
+
+ return R.ok();
+ }
+
+
+
+
+ /**
* 10. 根据 VIN 查询剩余电量及预估续航
* @param vin
* @return
@@ -179,4 +228,46 @@
vo.setEstimatedRange(Double.valueOf(vehiclePositions.getMileageRange()));
return R.ok(vo);
}
+
+
+ /**
+ * 11. 根据 订单查询四门三盖状态
+ * @param orderId
+ * @return
+ */
+ @GetMapping("/getVehicleDoorStatus/{orderId}")
+ @ApiOperation(value = "根据 订单查询四门三盖状态", notes = "客服系统对接")
+ @ApiImplicitParam(name = "orderId", value = "订单ID", required = true, dataType = "Long", paramType = "path")
+ public R<VehicleDoorStatusVo> getVehicleDoorStatus(@PathVariable Long orderId){
+ VehicleDoorStatusVo data = xpVehicleClient.getVehicleDoorStatus(orderId).getData();
+ return R.ok(data);
+ }
+
+
+
+ /**
+ * 12. 根据 订单查询车辆位置及电子围栏信息
+ * @param orderId
+ * @return
+ */
+ @GetMapping("/getVehicleFenceInformation/{orderId}")
+ @ApiOperation(value = "根据 订单查询车辆位置及电子围栏信息", notes = "客服系统对接")
+ @ApiImplicitParam(name = "orderId", value = "订单ID", required = true, dataType = "Long", paramType = "path")
+ public R<VehicleFenceInformationVo> getVehicleFenceInformation(@PathVariable Long orderId){
+ XpOrder xpOrder = xpOrderService.getById(orderId);
+ if(null == xpOrder){
+ return R.ok();
+ }
+ XpVehicle xpVehicle = xpVehicleClient.queryById(xpOrder.getVehicleId()).getData();
+ VehiclePosition vehiclePositions = mongoTemplate.findOne(Query.query(Criteria.where("vin").is(xpVehicle.getVehicleVin())), VehiclePosition.class);
+ if(null == vehiclePositions){
+ return R.ok();
+ }
+ VehicleFenceInformationVo vo = new VehicleFenceInformationVo();
+ vo.setVehicleLng(vehiclePositions.getPoint().getX());
+ vo.setVehicleLat(vehiclePositions.getPoint().getY());
+ vo.setGeofenceBoundary(new ArrayList<>());
+ vo.setIsOutOfGeofence(false);
+ return R.ok(vo);
+ }
}
--
Gitblit v1.7.1