解析海康AI回调
This commit is contained in:
parent
bda7f2b594
commit
f5d3847a11
@ -335,8 +335,23 @@ public class HikvisionCall {
|
||||
// }
|
||||
// frontierProtectionDevAlarmService.saveBatch(frontierProtectionDevAlarmList);
|
||||
|
||||
} else if (Objects.equals(ability, "event_vss")) {
|
||||
log.info("AI识别告警=======" + paramsJo);
|
||||
} else if (Objects.equals(ability, "")) {
|
||||
JSONArray eventsArray = paramsJo.getJSONArray("events");
|
||||
if (eventsArray.size()>0 ){
|
||||
JSONObject dataEvent = (JSONObject) eventsArray.get(0);
|
||||
JSONArray eventDetails = dataEvent.getJSONArray("eventDetails");
|
||||
JSONObject eventDetail = (JSONObject) eventDetails.get(0);
|
||||
ability = eventDetail.getString("ability");
|
||||
if (Objects.equals(ability, "event_vss")){
|
||||
log.info("AI识别告警=======" + paramsJo);
|
||||
String srcName = eventDetail.getString("srcName");//摄像机名称
|
||||
String eventType = eventDetail.getString("eventType");//422000003
|
||||
JSONObject data = eventDetail.getJSONObject("data");
|
||||
String imageUrl = data.getString("url"); //海康AI图片地址
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// JSONArray eventsJa = paramsJo.getJSONArray("events");
|
||||
// List<AiAnalyseHardWareAlarmRecord> aiAnalyseHardWareAlarmRecords = new ArrayList<>();
|
||||
// for (int i = 0; i < eventsJa.size(); i++) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user