From b2a7c4aec7f2441fc545ada6cbd7d2a771331043 Mon Sep 17 00:00:00 2001
From: panlei <2799247126@qq.com>
Date: 星期二, 17 十二月 2019 12:45:18 +0800
Subject: [PATCH] ---

---
 algorithm/personTrack/personTrack.go |   22 +++++++++++++++-------
 1 files changed, 15 insertions(+), 7 deletions(-)

diff --git a/algorithm/personTrack/personTrack.go b/algorithm/personTrack/personTrack.go
index 6c3cb86..1ad3bfe 100644
--- a/algorithm/personTrack/personTrack.go
+++ b/algorithm/personTrack/personTrack.go
@@ -106,18 +106,26 @@
 	}
 	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["compare"].(bool){ // 姣斿埌浜嗙浉浼肩殑浜轰笖鍦ㄦ鎽勫儚鏈轰笅宸茬粡鍑虹幇杩囷紝鏈�鍚庝笉鑳芥彃鍏ユ暟鎹簱
-		logger.Info("姣斿鍑烘潵鐨刣ataId:",result["esId"].(string))
-		arg.Uuid = ""
-	} else if result["esId"].(string) != esId && !result["compare"].(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)
+		}
 	}
 }
 
 func track (rule *protomsg.Rule,am *structure.AreaMap) structure.LittleRuleResult{
+	defer func() {
+		if err := recover();err != nil {
+			logger.Error("杩借釜鍒ゆ柇澶辫触",err)
+		}
+	}()
 	var threshold float32 = 60 // 榛樿闃堝�间负70
 	if th,err := strconv.ParseFloat(rule.SdkArgValue,32); err == nil {
 		threshold = float32(th)

--
Gitblit v1.8.0