| | |
| | | CarWarnInfoResp carWarnInfoResp = new CarWarnInfoResp(); |
| | | carWarnInfoResp.setVehicleNumber(vehicleNumber); |
| | | GnssDataVo gnssDataVo = upExgMsgRealLocationClient.getVehicleSpeed(vehicleNumber).getData(); |
| | | carWarnInfoResp.setSpeed(new BigDecimal(gnssDataVo.getVec1())); |
| | | Map<String, String> geocode = null; |
| | | try { |
| | | String longitude = new BigDecimal(gnssDataVo.getLon()).divide(new BigDecimal(1000000)).toString(); |
| | | String latitude = new BigDecimal(gnssDataVo.getLat()).divide(new BigDecimal(1000000)).toString(); |
| | | geocode = GDMapGeocodingUtil.geocode(longitude, latitude); |
| | | } catch (Exception e) { |
| | | throw new RuntimeException(e); |
| | | if(null != gnssDataVo){ |
| | | carWarnInfoResp.setSpeed(new BigDecimal(gnssDataVo.getVec1())); |
| | | Map<String, String> geocode = null; |
| | | try { |
| | | String longitude = new BigDecimal(gnssDataVo.getLon()).divide(new BigDecimal(1000000)).toString(); |
| | | String latitude = new BigDecimal(gnssDataVo.getLat()).divide(new BigDecimal(1000000)).toString(); |
| | | geocode = GDMapGeocodingUtil.geocode(longitude, latitude); |
| | | } catch (Exception e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | String address = geocode.get("address"); |
| | | carWarnInfoResp.setNowAddress(address); |
| | | } |
| | | String address = geocode.get("address"); |
| | | carWarnInfoResp.setNowAddress(address); |
| | | List<WarnResp> warnList = new ArrayList<>(); |
| | | for (Warn warn : list) { |
| | | WarnResp warnResp = new WarnResp(); |