| | |
| | | import com.xiaopeng.api.vo.OrderType; |
| | | import com.xiaopeng.api.vo.account.UserCouponVo; |
| | | import com.xiaopeng.api.vo.automaticPilot.VehiclePosition; |
| | | import com.xiaopeng.api.vo.automaticPilot.proto.down.cloudOrderOperation.OrderOperationType; |
| | | import com.xiaopeng.api.vo.automaticPilot.protobuf.OrderOperationType; |
| | | import com.xiaopeng.api.vo.operation.RouteVo; |
| | | import com.xiaopeng.api.vo.order.*; |
| | | import com.xiaopeng.api.vo.vehicleConvoy.AddTaxiPassengerVo; |
| | |
| | | vo.setStatus(order.getStatus()); |
| | | |
| | | // 用户信息 |
| | | if (Objects.nonNull(order.getAppUserId()) && userInfoMap.containsKey(order.getAppUserId().toString())) { |
| | | if (Objects.nonNull(order.getAppUserId()) && userInfoMap !=null && userInfoMap.containsKey(order.getAppUserId().toString())) { |
| | | UcUserInfo userInfo = userInfoMap.get(order.getAppUserId().toString()); |
| | | vo.setNickName(userInfo.getNickName()); |
| | | vo.setPhoneNumber(userInfo.getMobile()); |
| | |
| | | PushOrderDto pushOrderDto = new PushOrderDto(); |
| | | pushOrderDto.setOrderId(order.getId().toString()); |
| | | pushOrderDto.setVin(xpVehicleR.getData().getVehicleVin()); |
| | | pushOrderDto.setOperation_type(OrderOperationType.CLOUD_CANCEL_ORDER); |
| | | pushOrderDto.setOperation_type(com.xiaopeng.api.vo.automaticPilot.protobuf.OrderOperationType.CLOUD_CANCEL_ORDER); |
| | | orderMissionClient.cancelOrder(pushOrderDto); |
| | | } |
| | | } else { |
| | |
| | | PushOrderDto cancelDto = new PushOrderDto(); |
| | | cancelDto.setOrderId(order.getId().toString()); |
| | | cancelDto.setVin(oldVehicle.getVehicleVin()); |
| | | cancelDto.setOperation_type(OrderOperationType.CLOUD_CANCEL_ORDER); |
| | | cancelDto.setOperation_type(com.xiaopeng.api.vo.automaticPilot.protobuf.OrderOperationType.CLOUD_CANCEL_ORDER); |
| | | orderMissionClient.cancelOrder(cancelDto); |
| | | log.info("已取消原车辆订单指令,订单ID: {}, VIN: {}", orderId, oldVehicle.getVehicleVin()); |
| | | |
| | |
| | | PushOrderDto pushOrderDto = new PushOrderDto(); |
| | | pushOrderDto.setOrderId(order.getId().toString()); |
| | | pushOrderDto.setVin(xpVehicle.getVehicleVin()); |
| | | pushOrderDto.setOperation_type(OrderOperationType.VEHICLE_CANCEL_ORDER); |
| | | pushOrderDto.setOperation_type(com.xiaopeng.api.vo.automaticPilot.protobuf.OrderOperationType.VEHICLE_CANCEL_ORDER); |
| | | orderMissionClient.cancelOrder(pushOrderDto); |
| | | } |
| | | |
| | |
| | | return; |
| | | } |
| | | |
| | | // 判断是否有计划 |
| | | R<XpCruisePlanVehicle> xpCruisePlanR = xpCruisePlanClient.getCruisePlan(vehicle.getId()); |
| | | if (xpCruisePlanR == null || xpCruisePlanR.getData() == null) { |
| | | return; |
| | | } |
| | | |
| | | if(vehicle.getState()!=0 || vehicle.getOperatingStatus()!=1){ |
| | | return; |
| | | } |
| | |
| | | return false; |
| | | } |
| | | return true; |
| | | } |
| | | |
| | | @Override |
| | | public Integer getOrderNum(String timeStr) { |
| | | this.baseMapper.selectCount(new LambdaQueryWrapper<XpOrder>()); |
| | | |
| | | return 0; |
| | | } |
| | | |
| | | |