| | |
| | | import com.xiaopeng.api.model.order.*; |
| | | import com.xiaopeng.api.model.vehicleConvoy.XpFleet; |
| | | import com.xiaopeng.api.model.vehicleConvoy.XpVehicle; |
| | | import com.xiaopeng.api.service.BootCommonService; |
| | | import com.xiaopeng.api.vo.OrderType; |
| | | import com.xiaopeng.api.vo.account.UserCouponVo; |
| | | import com.xiaopeng.api.vo.automaticPilot.VehiclePosition; |
| | |
| | | private final XpMapClient xpMapClient; |
| | | @Resource |
| | | private XpRoutePlanClient xpRoutePlanClient; |
| | | @Resource |
| | | private BootCommonService bootCommonService; |
| | | |
| | | |
| | | @Autowired |
| | |
| | | redisService.setCacheObject("ORDER_STATUS:" + order.getId(), 8, 24L, TimeUnit.HOURS); |
| | | |
| | | // 根据订单所属开通城市id 查询定价 |
| | | R<XpPricing> pricingByCityId = xpPricingClient.getPricingByCid(order.getCityId()); |
| | | XpPricing pricing = pricingByCityId.getData(); |
| | | XpPricing pricing = bootCommonService.getXpPricing(order.getCityId(),order.getVehicleId()); |
| | | if (pricing == null) { |
| | | throw new ServiceException("当前城市未配置定价规则", I18nKeyConstant.ORDER_PRICING_NOT_EXISTS); |
| | | } |
| | | |
| | | |
| | | |
| | | // 费用 |
| | | // 查询订单轨迹 |
| | | List<OrderTrajectory> trajectories = mongoTemplate.find( |
| | |
| | | * |
| | | * @param order |
| | | */ |
| | | |
| | | @Override |
| | | public void addCruiseMission(Long vehicleId, XpOrder order) { |
| | | XpVehicle vehicle = xpVehicleClient.queryById(vehicleId).getData(); |
| | | log.info("添加巡游订单 {}", vehicle.getPlateNumber()); |
| | |
| | | @Override |
| | | public R<String> feeDescription(Long orderId, String uid) { |
| | | XpOrder order = this.getById(orderId); |
| | | R<XpPricing> pricingByCityId = xpPricingClient.getPricingByCid(order.getCityId()); |
| | | XpPricing pricing = pricingByCityId.getData(); |
| | | if (pricing == null) { |
| | | XpPricing xpPricing = bootCommonService.getXpPricing(order.getCityId(), order.getVehicleId()); |
| | | if (xpPricing == null) { |
| | | throw new ServiceException("当前城市未配置定价规则", I18nKeyConstant.ORDER_PRICING_NOT_EXISTS); |
| | | } else { |
| | | return R.ok(pricing.getPriceRule()); |
| | | return R.ok(xpPricing.getPriceRule()); |
| | | } |
| | | } |
| | | |