| | |
| | | import com.xiaopeng.api.feignClient.vehicleConvoy.XpVehicleClient; |
| | | import com.xiaopeng.api.model.order.XpCruiseOrder; |
| | | import com.xiaopeng.api.model.vehicleConvoy.XpVehicle; |
| | | import com.xiaopeng.api.vo.OrderType; |
| | | import com.xiaopeng.api.vo.automaticPilot.VehiclePosition; |
| | | import com.xiaopeng.common.core.domain.R; |
| | | import com.xiaopeng.common.core.web.page.PageInfo; |
| | |
| | | R<XpCruiseOrder> newCruiseOrder = xpCruisePlanClient.getNewCruiseOrder(new NewCruiseOrderDto(xpVehicle.getId(),xpVehicle.getVehicleVin(),xpVehicle.getFleetId())); |
| | | if(newCruiseOrder.getData()!=null){ |
| | | // 下发命令 |
| | | orderMissionClient.pushOrder(new PushOrderDto(xpVehicle.getVehicleVin(),newCruiseOrder.getData().getId(),null)); |
| | | PushOrderDto pushOrderDto = new PushOrderDto(); |
| | | pushOrderDto.setVin(xpVehicle.getVehicleVin()); |
| | | pushOrderDto.setOrderId(newCruiseOrder.getData().getId()); |
| | | pushOrderDto.setStartLatitude(newCruiseOrder.getData().getStartLat()); |
| | | pushOrderDto.setStartLongitude(newCruiseOrder.getData().getStartLon()); |
| | | pushOrderDto.setEndLatitude(newCruiseOrder.getData().getEndLat()); |
| | | pushOrderDto.setEndLongitude(newCruiseOrder.getData().getEndLon()); |
| | | pushOrderDto.setOrderType(OrderType.CRUISE_ORDER); |
| | | pushOrderDto.setStage(2); |
| | | orderMissionClient.pushOrder(pushOrderDto); |
| | | } |
| | | |
| | | |
| | |
| | | if(returnCruisePoint!=null){ |
| | | xpCruiseOrderClient.addCruiseOrder(returnCruisePoint.getData()); |
| | | // 下发命令 |
| | | orderMissionClient.pushOrder(new PushOrderDto( xpCruiseOrder.getVehicleVin(),xpCruiseOrder.getId(),null)); |
| | | PushOrderDto pushOrderDto = new PushOrderDto(); |
| | | pushOrderDto.setVin(returnCruisePoint.getData().getVehicleVin()); |
| | | pushOrderDto.setOrderId(returnCruisePoint.getData().getId()); |
| | | pushOrderDto.setStartLatitude(returnCruisePoint.getData().getStartLat()); |
| | | pushOrderDto.setStartLongitude(returnCruisePoint.getData().getStartLon()); |
| | | pushOrderDto.setEndLatitude(returnCruisePoint.getData().getEndLat()); |
| | | pushOrderDto.setEndLongitude(returnCruisePoint.getData().getEndLon()); |
| | | pushOrderDto.setOrderType(OrderType.CRUISE_ORDER); |
| | | pushOrderDto.setStage(2); |
| | | orderMissionClient.pushOrder(pushOrderDto); |
| | | } |
| | | |
| | | } |