From 914cf7bf26c100b5af62c55b00c58884fee4cbd0 Mon Sep 17 00:00:00 2001 From: liuxiaolong <736321739@qq.com> Date: 星期五, 26 七月 2019 20:50:45 +0800 Subject: [PATCH] add face-viturl-web-camid --- controllers/fileController.go | 41 ++++++++++++++++++++++++++++++++++++++++- 1 files changed, 40 insertions(+), 1 deletions(-) diff --git a/controllers/fileController.go b/controllers/fileController.go index 1ae98e3..5e0214e 100644 --- a/controllers/fileController.go +++ b/controllers/fileController.go @@ -153,16 +153,18 @@ type CompareResult struct { Id string `json:"id"` + CompareScore float32 `json:"compareScore"` CameraId string `json:"cameraId"` CameraAddr string `json:"cameraAddr"` PicDate string `json:"picDate"` Content string `json:"content"` IsAlarm int `json:"isAlarm"` PicMaxUrl string `json:"picMaxUrl"` - PicSmUrl []string `json:"picSmUrl"` + PicSmUrl string `json:"picSmUrl"` Sex string `json:"sex"` AgeDescription string `json:"ageDescription"` Race string `json:"race"` + TaskId string `json:"taskId"` TaskName string `json:"taskName"` BaseInfo []DbPersonVo `json:"baseInfo"` VideoUrl string `json:"videoUrl"` @@ -318,6 +320,43 @@ var capturePersons []protomsg.Videopersons if len(captureIds) >0 { logger.Debug("capturePersons:", capturePersons) + videopersons, _ := esApi.Videopersonsinfosbyid(captureIds, config.EsInfo.EsIndex.VideoPersons.IndexName, config.EsInfo.Masterip, config.EsInfo.Httpport) + logger.Debug("videoPersons.len:",len(videopersons)) + for _,vp :=range videopersons { + isAlarmInt, _ := strconv.Atoi(vp.IsAlarm) + var bi []DbPersonVo + for _,p :=range vp.BaseInfo { + bi = append(bi, DbPersonVo{ + PersonId: p.PersonId, + IdCard: p.IdCard, + CompareScore: util.ParseScore(p.CompareScore), + MonitorLevel: p.MonitorLevel, + PersonName: p.PersonName, + PersonPicUrl: p.PersonPicUrl, + PhoneNum: p.PhoneNum, + Sex: p.Sex, + TableId: p.TableId, + }) + } + vpE := CompareResult{ + Id: vp.Id, + CompareScore: util.ParseScore(captureM[vp.Id].CompareScore), + CameraId: vp.CameraId, + CameraAddr: vp.CameraAddr, + PicDate: vp.PicDate, + PicMaxUrl: vp.PicMaxUrl, + PicSmUrl: vp.PicSmUrl, + IsAlarm: isAlarmInt, + Sex: vp.Sex, + AgeDescription: vp.AgeDescription, + Race: vp.Race, + TaskName: vp.TaskName, + TaskId: vp.TaskId, + VideoUrl: vp.VideoUrl, + BaseInfo: bi, + } + resultList = append(resultList,vpE) + } } logger.Debug("resultList:",resultList) -- Gitblit v1.8.0