isc的ai预警bug修复

This commit is contained in:
guoshengxiong 2025-10-14 15:51:40 +08:00
parent 200c25c5b4
commit f7373aa125

View File

@ -401,7 +401,7 @@ public class HikvisionCall {
JSONArray eventDetails = dataEvent.getJSONArray("eventDetails");
JSONObject eventDetail = eventDetails.getJSONObject(0);
ability = eventDetail.getString("ability");
if (Objects.equals(ability, EVENT_VSS)) {
if (Objects.equals(ability, EVENT_VSS) || Objects.equals(ability, EVENT_AIMMS)) {
log.info("AI识别告警=======" + paramsJo);
addAiAnalyseHardWareRecord(eventDetail, dataEvent.getString("happenTime"));
} else if (Objects.equals(ability, EVENT_IAS)) {
@ -487,19 +487,6 @@ public class HikvisionCall {
}
} else if (Objects.equals(ability1, EVENT_IAS)) {
addFrontierProtectionNoNetData(jsonObject);
} else if (Objects.equals(ability1, "")) {
JSONArray eventsArray = jsonObject.getJSONArray("events");
if (eventsArray.size() > 0) {
JSONObject dataEvent = eventsArray.getJSONObject(0);
JSONArray eventDetails = dataEvent.getJSONArray("eventDetails");
JSONObject eventDetail = eventDetails.getJSONObject(0);
String ability = eventDetail.getString("ability");
JSONObject paramsJo = jsonObject.getJSONObject("params");
if (Objects.equals(ability, EVENT_AIMMS)) {
log.info("AI识别告警=======" + paramsJo);
addAiAnalyseHardWareRecord(eventDetail, dataEvent.getString("happenTime"));
}
}
}
return Result.ok();