| | |
| | | |
| | | import com.alibaba.fastjson2.JSON; |
| | | import com.xiaopeng.api.dto.QueryOrderRouteDTO; |
| | | import com.xiaopeng.api.feignClient.map.XpStationClient; |
| | | import com.xiaopeng.api.feignClient.operation.XpPointClient; |
| | | import com.xiaopeng.api.feignClient.vehicleConvoy.XpVehicleClient; |
| | | import com.xiaopeng.api.model.operation.XpPoint; |
| | | import com.xiaopeng.api.model.operation.XpStation; |
| | | import com.xiaopeng.api.model.order.XpOrder; |
| | | import com.xiaopeng.api.model.vehicleConvoy.XpVehicle; |
| | | import com.xiaopeng.api.vo.automaticPilot.VehiclePosition; |
| | |
| | | private final XpVehicleClient xpVehicleClient; |
| | | @Resource |
| | | private RedisService redisService; |
| | | @Resource |
| | | private XpStationClient xpStationClient; |
| | | |
| | | |
| | | private R<XpOrder> getOrderTripEnd(String orderId) { |
| | |
| | | R<XpPoint> xpPointR = xpPointClient.queryById(xpOrder.getStartPointId()); |
| | | if (xpPointR.getCode() == R.SUCCESS) { |
| | | XpPoint startPoint = xpPointR.getData(); |
| | | xpOrderDetailVO.setStartParkingTimeLimit(startPoint.getParkingTimeLimit()); |
| | | Integer parkingTimeLimit = startPoint.getParkingTimeLimit(); |
| | | //如果点位位于场站内,则使用场站的限停时间 |
| | | if(null != startPoint.getStationId()){ |
| | | XpStation xpStation = xpStationClient.getXpStationById(startPoint.getStationId()).getData(); |
| | | parkingTimeLimit = xpStation.getParkingTimeLimit(); |
| | | } |
| | | xpOrderDetailVO.setStartParkingTimeLimit(parkingTimeLimit); |
| | | } |
| | | |
| | | R<XpPoint> xpPointR1 = xpPointClient.queryById(xpOrder.getEndPointId()); |
| | | if (xpPointR1.getCode() == R.SUCCESS) { |
| | | XpPoint endPoint = xpPointR1.getData(); |
| | | xpOrderDetailVO.setEndParkingTimeLimit(endPoint.getParkingTimeLimit()); |
| | | Integer parkingTimeLimit = endPoint.getParkingTimeLimit(); |
| | | //如果点位位于场站内,则使用场站的限停时间 |
| | | if(null != endPoint.getStationId()){ |
| | | XpStation xpStation = xpStationClient.getXpStationById(endPoint.getStationId()).getData(); |
| | | parkingTimeLimit = xpStation.getParkingTimeLimit(); |
| | | } |
| | | xpOrderDetailVO.setEndParkingTimeLimit(parkingTimeLimit); |
| | | } |
| | | if (xpOrder.getVehicleId() != null) { |
| | | R<XpVehicle> xpVehicleR = xpVehicleClient.queryById(xpOrder.getVehicleId()); |