---
panlei
2019-12-17 b2a7c4aec7f2441fc545ada6cbd7d2a771331043
algorithm/personTrack/personTrack.go
@@ -106,14 +106,17 @@
   }
   result := getCompareMsg(b)
   if esId == result["esId"].(string) || result["esId"].(string) == ""{ // 说明没比到相似的人,是新人
      logger.Info("没比到人")
      logger.Info("没比到人,可以入库",am.CameraId)
      arg.Uuid = esId
   } else if result["esId"].(string) != esId && result["isHave"].(bool){ // 比到了相似的人且在此摄像机下已经出现过,最后不能插入数据库
      logger.Info("比对出来的dataId:",result["esId"].(string))
      arg.Uuid = ""
   } else if result["esId"].(string) != esId && !result["isHave"].(bool) { // 比到了相似的人但在此摄像机下未出现过,要插入数据库
      base := structure.BaseInfo{TargetId:result["esId"].(string)}
      arg.Liker = append(arg.Liker, &base)
   } else {
      if result["isHave"].(bool){ // 比到了相似的人且在此摄像机下已经出现过,最后不能插入数据库
         logger.Info("不许入库的数据",am.CameraId)
         arg.Uuid = ""
      } else { // 比到了相似的人但在此摄像机下未出现过,要插入数据库
         logger.Info("准备入库的数据",am.CameraId)
         base := structure.BaseInfo{TargetId:result["esId"].(string)}
         arg.Liker = append(arg.Liker, &base)
      }
   }
}