| | |
| | | |
| | | //生成前往上车点的导航数据 |
| | | //查询车辆位置 |
| | | VehiclePosition vehiclePosition = mongoTemplate.findOne(new Query(Criteria.where("vin").is(dto.getXpVehicleVin())), VehiclePosition.class); |
| | | if (Objects.isNull(vehiclePosition)) { |
| | | throw new RuntimeException("车辆位置信息不存在"); |
| | | } |
| | | //TODO 本地环境默认写死 |
| | | // VehiclePosition vehiclePosition = mongoTemplate.findOne(new Query(Criteria.where("vin").is(dto.getXpVehicleVin())), VehiclePosition.class); |
| | | // if (Objects.isNull(vehiclePosition)) { |
| | | // throw new RuntimeException("车辆位置信息不存在"); |
| | | // } |
| | | |
| | | LonLatDto destination = new LonLatDto(); |
| | | LonLatDto origin = new LonLatDto(); |
| | | //查询司机当前位置到起点的线路 |
| | | origin.setLongitude(vehiclePosition.getPoint().getX()); |
| | | origin.setLatitude(vehiclePosition.getPoint().getY()); |
| | | // origin.setLongitude(vehiclePosition.getPoint().getX()); |
| | | // origin.setLatitude(vehiclePosition.getPoint().getY()); |
| | | origin.setLongitude(104.055499); |
| | | origin.setLatitude(30.586747); |
| | | destination.setLongitude(order.getStartLon()); |
| | | destination.setLatitude(order.getStartLat()); |
| | | |