From 7850c0b26dc32f1ccad56b705bb3bbfc0dcc883a Mon Sep 17 00:00:00 2001 From: panlei <2799247126@qq.com> Date: 星期二, 19 十一月 2019 10:19:19 +0800 Subject: [PATCH] --- --- insertdata/insertDataToEs.go | 24 ++++++++++++++++-------- 1 files changed, 16 insertions(+), 8 deletions(-) diff --git a/insertdata/insertDataToEs.go b/insertdata/insertDataToEs.go index 089ae0c..4064acd 100644 --- a/insertdata/insertDataToEs.go +++ b/insertdata/insertDataToEs.go @@ -49,8 +49,8 @@ Content string `json:"content"` AlarmRules []AlarmRule `json:"alarmRules"` LikeDate string `json:"likeDate"` - ShowLabels string `json:"showLables"` - OtherLabels string `json:"otherLables"` + ShowLabels string `json:"showLabels"` + OtherLabels string `json:"otherLabels"` VideoUrl string `json:"videoUrl"` AnalyServerId string `json:"analyServerId"` AnalyServerName string `json:"analyServerName"` @@ -79,8 +79,8 @@ Content string `json:"content"` AlarmRules []AlarmRule `json:"alarmRules"` LikeDate string `json:"likeDate"` - ShowLabels string `json:"showLables"` - OtherLabels string `json:"otherLables"` + ShowLabels string `json:"showLabels"` + OtherLabels string `json:"otherLabels"` VideoUrl string `json:"videoUrl"` AnalyServerId string `json:"analyServerId"` AnalyServerName string `json:"analyServerName"` @@ -97,7 +97,7 @@ type Target struct { TargetId string `json:"targetId"` TargetScore float64 `json:"targetScore"` - FaceFeature string `json:"faceFeature"` + FaceFeature string `json:"feature"` PicSmUrl string `json:"picSmUrl"` TargetLocation Points `json:"targetLocation"` } @@ -219,6 +219,14 @@ target.TargetLocation = Points{TopLeft: Point{face.Location.X, face.Location.Y}, BottomRight: Point{face.Location.X + face.Location.Width, face.Location.Y + face.Location.Height}} var targetInfos []Target targetInfos = append(targetInfos, *target) + + sdkname := "" + switch key { + case "face": + sdkname = "浜鸿劯" + case "plate": + sdkname = "杞︾墝璇嗗埆" + } pervideo := PerVideoPicture{ face.Uuid, msg.Cid, @@ -228,8 +236,8 @@ imgMaxUrl, msg.Tasklab.Taskid, msg.Tasklab.Taskname, - "浜鸿劯", - time.Now().Format("2006-01-02 15:04:05"), + sdkname, + "", alarmRules, time.Now().Format("2006-01-02 15:04:05"), // 鍙娴嬶紝娌℃湁姣斿鏃堕棿 lable, @@ -258,7 +266,7 @@ if err1 != nil { logger.Error("涓婁紶ES鍑洪敊锛�---", err1) } else { - logger.Info("鎻掑叆es杩斿洖鐨勪俊鎭�(浜鸿劯)锛�", resp1) + logger.Info("鎻掑叆es杩斿洖鐨勪俊鎭細", sdkname,"---",resp1) // 鍙戝嚭褰曞儚淇″彿 ruleserver.AddLxMessage(&protomsg.VideotapeInfo{EsDataId: face.Uuid, CameraId: msg.Cid, TaskId: msg.Tasklab.Taskid, VideoUrl: msg.Push.VideoUrl, ImgId: i.Id, SdkIds: []string{"-1"}, Type: 1}) } -- Gitblit v1.8.0