From 3d9bfe5723bbfb3ce88aa6b4b863d8a2e04e59c3 Mon Sep 17 00:00:00 2001
From: panlei <2799247126@qq.com>
Date: 星期二, 26 十一月 2019 14:19:45 +0800
Subject: [PATCH] ---

---
 ruleserver/readyDataForRule.go |   33 ++-------------------------------
 1 files changed, 2 insertions(+), 31 deletions(-)

diff --git a/ruleserver/readyDataForRule.go b/ruleserver/readyDataForRule.go
index dbf5208..033a2b3 100644
--- a/ruleserver/readyDataForRule.go
+++ b/ruleserver/readyDataForRule.go
@@ -93,35 +93,6 @@
 	//logger.Info("鍒濇淇濈暀涓や綅鎴恠tr::::",value2)
 	return value2
 }
-// 鍙栧嚭鏌愪釜鏃堕棿瑙勫垯鐨勭鍑犲ぉ鐨勮鍒欐闆嗗悎
-func GetTimeById(id string, index int) []structure.TimeRange {
-	_, cameraTimeRule := cache.GetTimeRuleById(id)
-	var timeRangeList []structure.Day
-	err := json.Unmarshal([]byte(cameraTimeRule.TimeRule), &timeRangeList)
-	if err != nil {
-		logger.Error("鍙栨椂闂磋鍒欐椂鍙嶅簭鍒楀寲閿欒锛�")
-	}
-	for _, timerange := range timeRangeList {
-		if timerange.Day == index {
-			//logger.Println("鍙栧埌鐨勬椂闂磋鍒欙細", timerange.TimeRange)
-			return timerange.TimeRange
-		}
-	}
-	return nil
-}
-
-// 鏍规嵁浼犲叆鐨勫瓧绗︿覆寰楀埌鍏跺湪涓�鍛ㄥ唴鐨勭储寮� 鍛ㄤ竴鍒板懆鏃ュ垎鍒搴�1鍒�7
-func getIndexOfWeek(weekday string) int {
-	var weekdays = [7]string{"Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"}
-	for k, value := range weekdays {
-		if value == weekday {
-			return k + 1 // 鍥犱负鏁版嵁搴撲腑瀛樼殑鏄�1-7浠h〃鐨勫懆涓�鍒板懆鏃�
-		}
-	}
-	return 0
-}
-
-
 
 // 灏嗗瓧绗︿覆鏍煎紡鐨勫潗鏍囧簭鍒楀寲涓篜oint鏍煎紡
 func Json2points(areaPoints string) []structure.Point {
@@ -187,7 +158,7 @@
 				logger.Error("鏍规嵁id鏌ヨ搴曞簱淇℃伅鍑洪敊锛�", err, "--杩斿洖鍊奸暱搴︿负锛�", len(table))
 			}
 			logger.Debug("鐪嬬湅杩欎釜base鐨勫姣斿�兼槸澶氬皯锛�", Decimal(m[baseinfo.Id].CompareScore))
-			base := structure.BaseInfo{TableId: baseinfo.TableId, TableName: table[0].TableName, BwType: table[0].BwType, CompareScore: Decimal(m[baseinfo.Id].CompareScore), PersonId: baseinfo.Id, PersonName: baseinfo.PersonName, PersonPicUrl: baseinfo.PersonPicUrl, PhoneNum: baseinfo.PhoneNum, Sex: baseinfo.Sex, IdCard: baseinfo.IdCard, MonitorLevel: baseinfo.MonitorLevel, Content: baseinfo.Reserved}
+			base := structure.BaseInfo{TableId: baseinfo.TableId, TableName: table[0].TableName, BwType: table[0].BwType, CompareScore: Decimal(m[baseinfo.Id].CompareScore), TargetId: baseinfo.Id, TargetName: baseinfo.PersonName, TargetPicUrl: baseinfo.PersonPicUrl, MonitorLevel: baseinfo.MonitorLevel, Content: baseinfo.Reserved,DbLabel: baseinfo.PhoneNum+"/"+baseinfo.Sex+"/"+baseinfo.IdCard,}
 			//os.Exit(1)
 			arg.Liker = append(arg.Liker, &base)
 		}
@@ -275,7 +246,7 @@
 			// 杩欐瑕佸榻愯〃杈惧紡閲屾墍闇�瑕佺殑鎵�鏈夊弬鏁�
 			a.TargetNum++
 			uuid := uuid.NewV4().String()
-			arg1 := structure.Arg{obj.Id,uuid,obj.Score, PgsInterPercent(areaPoints, obj.Rects, widthScale, heigthScale), float64(obj.Rects.Width * obj.Rects.Height), a.AreaJson,obj.IsYolo, obj.Rects, obj.Feature, obj.ThftRes, []*structure.BaseInfo{},structure.ResultMsg{}}
+			arg1 := structure.Arg{obj.Id,uuid,obj.Score, PgsInterPercent(areaPoints, obj.Rects, widthScale, heigthScale), float64(obj.Rects.Width * obj.Rects.Height), a.AreaJson,obj.Type, obj.Rects, obj.Car,obj.Feature, obj.ThftRes, []*structure.BaseInfo{},"",structure.ResultMsg{}}
 			//logger.Println("鏀捐繘鍘荤殑arg锛�-------", arg1)
 			a.Args = append(a.Args, &arg1)
 			a.FilterData = append(a.FilterData, &arg1)

--
Gitblit v1.8.0