|
@@ -72,6 +72,12 @@ public class AlarmEventServiceImpl implements AlarmEventService {
|
|
|
@Value("${sooka.dahuaservice.detail}")
|
|
|
private String detailUrl;
|
|
|
|
|
|
+ @Value("${sooka.supermap.datasetUrl}")
|
|
|
+ private String datasetUrl;
|
|
|
+
|
|
|
+ @Value("${sooka.supermap.datasetNames}")
|
|
|
+ private String datasetNames;
|
|
|
+
|
|
|
static final String ERROR_MSG_CHANNEL = "无法匹配相关设备!通道编号为:{}";
|
|
|
|
|
|
static final String ERROR_MSG_DEPT = "无法匹配相关部门!摄像头编号为:{}";
|
|
@@ -205,7 +211,7 @@ public class AlarmEventServiceImpl implements AlarmEventService {
|
|
|
headers.setContentType(MediaType.APPLICATION_JSON);
|
|
|
JSONObject requestBody = JSONObject.parseObject("{" +
|
|
|
"\"getFeatureMode\": \"SPATIAL\"," +
|
|
|
- "\"datasetNames\": [\"chengchuanzhen:城川镇_1\"]," +
|
|
|
+ "\"datasetNames\": [" + datasetNames + "]," +
|
|
|
"\"geometry\": {" +
|
|
|
"\"id\": 0," +
|
|
|
"\"style\": null," +
|
|
@@ -220,7 +226,7 @@ public class AlarmEventServiceImpl implements AlarmEventService {
|
|
|
HttpEntity<JSONObject> entity = new HttpEntity<>(requestBody, headers);
|
|
|
|
|
|
RestTemplate restTemplate = new RestTemplate();
|
|
|
- JSONObject result = restTemplate.postForEntity("http://192.168.1.14:8090/iserver/services/data-chengchunzhen/rest/data/featureResults.json?returnContent=true", entity, JSONObject.class).getBody();
|
|
|
+ JSONObject result = restTemplate.postForEntity(datasetUrl, entity, JSONObject.class).getBody();
|
|
|
// {"features":[],"featureUriList":[],"datasetInfos":[],"totalCount":0,"featureCount":0}
|
|
|
if (result.getLong("totalCount") == 0 && result.getLong("featureCount") == 0) {
|
|
|
centereventTEventcatalogue.setEventStatus("误报");
|