| | |
| | | if(!order_id.contains("TEST")){ |
| | | xpPushMessageClient.pushOrderRoute(dto);//存储历史轨迹 |
| | | // 给连环派单的用户推送 |
| | | Long nextOrderId = redisService.getCacheObject(CacheConstants.nextOrder(order_id)); |
| | | if (null != nextOrderId){ |
| | | dto.setOrderId(nextOrderId); |
| | | String json = redisService.getCacheObject(CacheConstants.nextOrder(order_id)); |
| | | if (StringUtils.isNotEmpty(json)){ |
| | | JSONObject jsonObject = JSON.parseObject(json); |
| | | dto.setOrderId(jsonObject.getLong("orderId")); |
| | | dto.setEndLongitude(jsonObject.getDouble("endLongitude")); |
| | | dto.setEndLatitude(jsonObject.getDouble("endLatitude")); |
| | | xpPushMessageClient.pushOrderRoute(dto); |
| | | } |
| | | xpOrderClient.saveVehicleLocation(orderTrajectory); |
| | |
| | | xpOrderClient.updateOrderStatus(Long.parseLong(orderId), OrderStatusEnum.SEE_OFF_GUESTS.getCode(), true); |
| | | redisService.setCacheObject("ORDER_STATUS:" + orderId, OrderStatusEnum.SEE_OFF_GUESTS.getCode(), 24L, TimeUnit.HOURS); |
| | | // 判断当前订单的车辆是否有连环派单,然后判断是都还满足连环派单的条件,不满足则需要重新派单 |
| | | Long nextOrderId = redisService.getCacheObject(CacheConstants.nextOrder(orderId)); |
| | | if(null != nextOrderId){ |
| | | String json = redisService.getCacheObject(CacheConstants.nextOrder(orderId)); |
| | | if (StringUtils.isNotEmpty(json)){ |
| | | JSONObject jsonObject = JSON.parseObject(json); |
| | | Long nextOrderId = jsonObject.getLong("orderId"); |
| | | XpOrder nextOrder = xpOrderClient.queryOrderById(nextOrderId).getData(); |
| | | if(null != nextOrder && nextOrder.getStatus() == OrderStatusEnum.PICK_UP.getCode()){ |
| | | redisService.setCacheObject(CacheConstants.nextOrder(orderId),null); |