| | |
| | | |
| | | String url = "https://restapi.amap.com/v4/geofence/meta?key=" + key + "&gid=" + gid; |
| | | String s = restTemplate.patchForObject(url, formEntity, String.class); |
| | | System.out.println(s); |
| | | |
| | | // gdInterfaceService.saveData("https://restapi.amap.com/v4/geofence/meta", "更新电子围栏"); |
| | | } |
| | |
| | | } |
| | | } |
| | | } |
| | | System.out.println("检测:" + forObject); |
| | | |
| | | // gdInterfaceService.saveData("https://restapi.amap.com/v4/geofence/status", "电子围栏监控"); |
| | | return ids; |
| | |
| | | */ |
| | | public boolean deleteElectricFenc(String gid){ |
| | | restTemplate.delete("https://restapi.amap.com/v4/geofence/meta?key={1}&gid={2}", key, gid); |
| | | System.out.println("删除:" ); |
| | | |
| | | // gdInterfaceService.saveData("https://restapi.amap.com/v4/geofence/meta", "删除电子围栏"); |
| | | |
| | |
| | | public Map<String, String> getDistance(String origins, String destination, Integer type){ |
| | | String url = "https://restapi.amap.com/v3/distance?key=" + key + "&origins=" + origins + "&destination=" + destination + |
| | | "&type=" + type; |
| | | System.out.println(url); |
| | | String forObject = restTemplate.getForObject(url, String.class); |
| | | JSONObject jsonObject = JSON.parseObject(forObject); |
| | | String status = jsonObject.getString("status"); |