فهرست منبع

修复ai上传对没有识别内容的处理

kindring 2 سال پیش
والد
کامیت
fb46d15851
1فایلهای تغییر یافته به همراه5 افزوده شده و 0 حذف شده
  1. 5 0
      src/main/java/com/genersoft/iot/vmp/vmanager/gb28181/aiLib/AiControl.java

+ 5 - 0
src/main/java/com/genersoft/iot/vmp/vmanager/gb28181/aiLib/AiControl.java

@@ -150,6 +150,11 @@ public class AiControl {
         String deviceId = bodyAiAlarm.getDev_id();
         String channelId = bodyAiAlarm.getChannelId();
         String arithmetic = bodyAiAlarm.getType();
+//        判断是否存在失败到的数据
+        if (bodyAiAlarm.getReco_info().contains("failed")){
+            logger.error("ai upload not reco_info");
+            return WVPResult.fail(ErrorCode.ERROR400.getCode(),ErrorCode.ERROR400.getMsg());
+        }
         JSONArray results_recoInfos = JSON.parseObject(bodyAiAlarm.getReco_info()).getJSONArray("results");
 
 //        List<AiAlarm> items = results_recoInfos;