From 19a240f4b729d2b343a7422d6deb00541b6646a2 Mon Sep 17 00:00:00 2001
From: panlei <2799247126@qq.com>
Date: 星期一, 15 七月 2019 16:50:17 +0800
Subject: [PATCH] 构建一个baseInfo

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

diff --git a/ruleserver/readyDataForRule.go b/ruleserver/readyDataForRule.go
index 8b530f5..6a3718e 100644
--- a/ruleserver/readyDataForRule.go
+++ b/ruleserver/readyDataForRule.go
@@ -6,7 +6,6 @@
 	"basic.com/pubsub/protomsg.git"
 	"basic.com/pubsub/sdkcompare.git"
 	"encoding/json"
-	"fmt"
 	"ruleprocess/cache"
 	"ruleprocess/logger"
 	"strconv"
@@ -17,6 +16,20 @@
 	bigCache.Init()
 }
 
+type BaseInfo struct {
+	TableId string `json:"tableId"`
+	TableName string `json:"tableName"`
+	BwType string `json:"bwType"`
+	CompareScore float64 `json:"compareScore"`
+	PersonId string 	`json:"personId"`
+	PersonName string	`json:"personName"`
+	PersonPicUrl string `json:"personPicUrl"`
+	PhoneNum string `json:"phoneNum"`
+	Sex string `json:"sex"`
+	IdCard string `json:"idCard"`
+	MonitorLevel string `json:"monitorLevel"`
+	Content string `json:"content"`
+}
 // 浠ユ憚鍍忔満id鏌ュ嚭璺熷叾鐩稿叧鐨勬墍鏈変换鍔′笅鐨勬墍鏈夎鍒欑粍
 func GetRuleGroup(cameraId string) []*protomsg.TaskGroupArgs {
 	all := cache.GetCameraTaskRulesByCameraId(cameraId)
@@ -191,7 +204,7 @@
 		if threshold <= obj.Score && size <= float64(obj.Rects.Width*obj.Rects.Height) && intersectionper <= PgsInterPercent(areaPoints, obj.Rects, widthScale, heigthScale) {
 			// 杩欐瑕佸榻愯〃杈惧紡閲屾墍闇�瑕佺殑鎵�鏈夊弬鏁�
 			a.targetNum++
-			arg1 := Arg{obj.Score, PgsInterPercent(areaPoints, obj.Rects, widthScale, heigthScale), float64(obj.Rects.Width * obj.Rects.Height), obj.IsYolo, obj.Rects, obj.Feature, obj.ThftRes, []*protomsg.Baseinfo{}}
+			arg1 := Arg{obj.Score, PgsInterPercent(areaPoints, obj.Rects, widthScale, heigthScale), float64(obj.Rects.Width * obj.Rects.Height), obj.IsYolo, obj.Rects, obj.Feature, obj.ThftRes, []*BaseInfo{}}
 			//logger.Println("鏀捐繘鍘荤殑arg锛�-------", arg1)
 			a.args = append(a.args, &arg1)
 			a.filterData = append(a.filterData, &arg1)

--
Gitblit v1.8.0