| | |
| | | dto.setRouteType(1); |
| | | R<RouteVo> routeVoR = xpMapClient.getOrderDistanceAndDuration(dto); |
| | | if (200 != routeVoR.getCode()) { |
| | | // throw new RuntimeException("获取订单线路和运费失败"); |
| | | throw new RuntimeException("获取订单线路和运费失败"); |
| | | } |
| | | RouteVo routeVo = routeVoR.getData(); |
| | | //缓存数据,用于后续推给乘客导航线路 |
| | |
| | | } |
| | | |
| | | // 计算距离 小于的站点 |
| | | double v = FastDistanceCalculator.distanceFast(dto.getLatitude(), dto.getLongitude(), xpPoint.getPointLat(), xpPoint.getPointLon()); |
| | | double v = FastDistanceCalculator.distanceFastKm(dto.getLatitude(), dto.getLongitude(), xpPoint.getPointLat(), xpPoint.getPointLon()); |
| | | if (v < orderDistance) { |
| | | NearestNextVo nearestNextVo = new NearestNextVo(); |
| | | nearestNextVo.setId(xpPoint.getId()); |