| | |
| | | import com.xiaopeng.order.model.query.XpOrderExcelQuery; |
| | | import com.xiaopeng.order.model.query.XpOrderPageQuery; |
| | | import com.xiaopeng.order.model.vo.*; |
| | | import com.xiaopeng.order.service.IXpOrderCancelService; |
| | | import com.xiaopeng.order.service.IXpOrderEvaluateService; |
| | | import com.xiaopeng.order.service.IXpOrderReassignService; |
| | | import com.xiaopeng.order.service.IXpOrderService; |
| | | import com.xiaopeng.order.service.*; |
| | | import com.xiaopeng.order.utils.GDMapGeocodingUtil; |
| | | import com.xiaopeng.order.utils.TaxiPricingDemoService; |
| | | import com.xiaopeng.order.utils.RegionCodeFilterUtil; |
| | |
| | | private final XpCruisePlanClient xpCruisePlanClient; |
| | | private final XpPricingUtil xpPricingUtil; |
| | | private final GDMapGeocodingUtil gdMapGeocodingUtil; |
| | | private final IXpTestOrderService xpTestOrderService; |
| | | |
| | | |
| | | @Autowired |
| | |
| | | log.info("已将原车辆状态设为空闲,车辆ID: {}", oldVehicleId); |
| | | |
| | | // 6.1.4 为原车辆创建返程巡游订单 |
| | | -------------- |
| | | createReturnCruiseOrder(oldVehicle.getId(), order); |
| | | } else { |
| | | log.warn("查询原车辆信息失败,车辆ID: {}", oldVehicleId); |
| | |
| | | xpVehicleClient.updateVehicleById(vehicle1); |
| | | //找到车辆的收车点位 更新终点点位 |
| | | R<XpCruiseOrder> returnCruisePoint = xpCruisePlanClient.findReturnCruisePoint(xpCruiseOrder); |
| | | xpCruiseOrder = returnCruisePoint.getData(); |
| | | xpCruiseOrder.setOrderType(2); |
| | | xpCruiseOrder.setOrderReverse(1); |
| | | if(200 != returnCruisePoint.getCode()){ |
| | | xpCruiseOrder = returnCruisePoint.getData(); |
| | | xpCruiseOrder.setOrderType(2); |
| | | xpCruiseOrder.setOrderReverse(1); |
| | | } |
| | | } |
| | | } |
| | | xpCruiseOrderMapper.insert(xpCruiseOrder); |
| | |
| | | xpVehicleClient.updateVehicleById(vehicle1); |
| | | //找到车辆的收车点位 更新终点点位 |
| | | R<XpCruiseOrder> returnCruisePoint = xpCruisePlanClient.findReturnCruisePoint(xpCruiseOrder); |
| | | xpCruiseOrder = returnCruisePoint.getData(); |
| | | xpCruiseOrder.setOrderType(2); |
| | | xpCruiseOrder.setOrderReverse(1); |
| | | if(200 != returnCruisePoint.getCode()){ |
| | | xpCruiseOrder = returnCruisePoint.getData(); |
| | | xpCruiseOrder.setOrderType(2); |
| | | xpCruiseOrder.setOrderReverse(1); |
| | | } |
| | | } |
| | | } |
| | | |
| | |
| | | sendRoute(addTaxiPassengerVo.getUid(), orderId, "ORDER_NAVIGATION_START_DATA", dto.getXpVehicleVin()); |
| | | } |
| | | } |
| | | //测试订单 |
| | | if (OrderType.TEST_ORDER.equals(orderType)) { |
| | | XpTestOrder xpTestOrder = xpTestOrderService.getById(orderId); |
| | | //订单为待接单状态 |
| | | if (xpTestOrder.getStatus() < 4) { |
| | | xpTestOrder.setAcceptanceTime(LocalDateTime.now()); |
| | | R<XpVehicle> byVehicleVin = xpVehicleClient.findByVehicleVin(dto.getXpVehicleVin()); |
| | | XpVehicle vehicle = null; |
| | | if (byVehicleVin.getCode() == 200) { |
| | | vehicle = byVehicleVin.getData(); |
| | | xpTestOrder.setVehicleId(vehicle.getId()); |
| | | xpTestOrder.setFleetId(vehicle.getFleetId()); |
| | | } |
| | | xpTestOrder.setStatus(2); |
| | | |
| | | // 修改车辆信息 |
| | | XpVehicle vehicle1 = new XpVehicle(); |
| | | vehicle1.setId(vehicle.getId()); |
| | | vehicle1.setState(1); |
| | | xpVehicleClient.updateVehicleById(vehicle1); |
| | | |
| | | xpTestOrder.setVehicleId(null); |
| | | xpTestOrderService.updateById(xpTestOrder); |
| | | redisService.setCacheObject("ORDER_STATUS:" + xpTestOrder.getId(), 2, 24L, TimeUnit.HOURS); |
| | | } |
| | | } |
| | | } |
| | | |
| | | |