| | |
| | | TransactionDetails transactionDetails = transactionDetailsService.selectOne(new EntityWrapper<TransactionDetails>().eq("orderType", 1).eq("orderId", orderId)); |
| | | JSONObject jsonObject = new JSONObject(); |
| | | jsonObject.put("OrderId", orderPrivateCar.getOrderNum());//订单号 |
| | | jsonObject.put("OnArea", 530602);//上车位置行政区划代码 |
| | | if (orderPrivateCar.getBoardingLon()!=null && orderPrivateCar.getBoardingLat()!=null){ |
| | | Map<String, String> geocode = null; |
| | | try { |
| | | geocode = gdMapGeocodingUtil.geocode(orderPrivateCar.getBoardingLon() + "", orderPrivateCar.getBoardingLat() + ""); |
| | | } catch (Exception e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | if (geocode!=null){ |
| | | System.err.println("数据上传--经纬度转行政区划代码"); |
| | | jsonObject.put("OnArea", geocode.get("provinceCode"));//发起第行政区划代码 |
| | | }else{ |
| | | jsonObject.put("OnArea", 530602);//发起第行政区划代码 |
| | | } |
| | | }else{ |
| | | jsonObject.put("OnArea", 530602);//发起第行政区划代码 |
| | | } |
| | | // jsonObject.put("OnArea", 530602);//上车位置行政区划代码 |
| | | jsonObject.put("DriverName", driver.getName());//机动车驾驶员 |
| | | jsonObject.put("LicenseId", driver.getDriveCard());//机动车驾驶证号 |
| | | jsonObject.put("FareType", query.get("id").toString());//运价类型编码(由网约车公司定义,与运价信息接口保持一街) |