Procházet zdrojové kódy

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

kindring před 2 roky
rodič
revize
fb46d15851

+ 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;