| | |
| | | throw new RuntimeException(e); |
| | | } |
| | | if (geocode!=null){ |
| | | System.err.println("数据上传--经纬度转行政区划代码"); |
| | | jsonObject.put("Address", geocode.get("provinceCode"));//发起第行政区划代码 |
| | | }else{ |
| | | jsonObject.put("Address", 530602);//发起第行政区划代码 |
| | |
| | | throw new RuntimeException(e); |
| | | } |
| | | if (geocode!=null){ |
| | | System.err.println("数据上传--经纬度转行政区划代码"); |
| | | jsonObject.put("Address", geocode.get("provinceCode"));//发起第行政区划代码 |
| | | }else{ |
| | | jsonObject.put("Address", 530602);//发起第行政区划代码 |
| | |
| | | throw new RuntimeException(e); |
| | | } |
| | | if (geocode!=null){ |
| | | System.err.println("数据上传--经纬度转行政区划代码"); |
| | | jsonObject.put("OnArea", geocode.get("provinceCode"));//发起第行政区划代码 |
| | | }else{ |
| | | jsonObject.put("OnArea", 530602);//发起第行政区划代码 |
| | |
| | | Double Elevation = orderPositions != null && orderPositions.size() > 0 ? Double.valueOf(orderPositions.get(orderPositions.size() - 1).getAltitude()) : 0D; |
| | | Double Speed = 0D; |
| | | if(orderPositions != null && orderPositions.size() > 1){ |
| | | Map<String, String> distance = gdMapElectricFenceUtil.getDistance(orderPositions.get(orderPositions.size() - 1).getLon() + "," + orderPositions.get(orderPositions.size() - 1).getLat(), |
| | | orderPositions.get(orderPositions.size() - 0).getLon() + "," + orderPositions.get(orderPositions.size() - 0).getLat(), 0); |
| | | Map<String, String> distance = gdMapElectricFenceUtil.getDistance(orderPositions.get(orderPositions.size() - 2).getLon() + "," + orderPositions.get(orderPositions.size() - 2).getLat(), |
| | | orderPositions.get(orderPositions.size() - 1).getLon() + "," + orderPositions.get(orderPositions.size() - 1).getLat(), 0); |
| | | Speed = distance != null ? Double.valueOf(distance.get("distance")) / 1000 : 0D; |
| | | } |
| | | Integer state = 4; |
| | |
| | | throw new RuntimeException(e); |
| | | } |
| | | if (geocode!=null){ |
| | | System.err.println("数据上传--经纬度转行政区划代码"); |
| | | jsonObject.put("DriverRegionCode", geocode.get("provinceCode"));//发起第行政区划代码 |
| | | }else{ |
| | | jsonObject.put("DriverRegionCode", 530602);//发起第行政区划代码 |
| | |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | System.err.println("-----------------------------驾驶员定位信息------------------------:" + result); |
| | | } |
| | | |
| | | |
| | |
| | | Double Elevation = orderPositions != null && orderPositions.size() > 0 ? Double.valueOf(orderPositions.get(orderPositions.size() - 1).getAltitude()) : 0D; |
| | | Double Speed = 0D; |
| | | if(orderPositions != null && orderPositions.size() > 1){ |
| | | Map<String, String> distance = gdMapElectricFenceUtil.getDistance(orderPositions.get(orderPositions.size() - 1).getLon() + "," + orderPositions.get(orderPositions.size() - 1).getLat(), |
| | | orderPositions.get(orderPositions.size() - 0).getLon() + "," + orderPositions.get(orderPositions.size() - 0).getLat(), 0); |
| | | Map<String, String> distance = gdMapElectricFenceUtil.getDistance(orderPositions.get(orderPositions.size() - 2).getLon() + "," + orderPositions.get(orderPositions.size() - 2).getLat(), |
| | | orderPositions.get(orderPositions.size() - 1).getLon() + "," + orderPositions.get(orderPositions.size() - 1).getLat(), 0); |
| | | Speed = distance != null ? Double.valueOf(distance.get("distance")) / 1000 : 0D; |
| | | } |
| | | Integer state = 4; |
| | |
| | | throw new RuntimeException(e); |
| | | } |
| | | if (geocode!=null){ |
| | | System.err.println("数据上传--经纬度转行政区划代码"); |
| | | jsonObject.put("VehicleRegionCode", geocode.get("provinceCode"));//发起第行政区划代码 |
| | | }else{ |
| | | jsonObject.put("VehicleRegionCode", 530602);//发起第行政区划代码 |
| | |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | System.err.println("----------------------------车辆定位信息---------------------------:" + result); |
| | | } |
| | | |
| | | |