From e48fa53ee149c1019bea582be96ef8778ec813e0 Mon Sep 17 00:00:00 2001 From: liuxiaolong <736321739@qq.com> Date: 星期三, 20 十一月 2019 17:32:53 +0800 Subject: [PATCH] fix score --- controllers/fileController.go | 9 +++++---- 1 files changed, 5 insertions(+), 4 deletions(-) diff --git a/controllers/fileController.go b/controllers/fileController.go index ece1355..e31f95c 100644 --- a/controllers/fileController.go +++ b/controllers/fileController.go @@ -253,13 +253,13 @@ if v.Tableid == service.CaptureTable { captureM[v.Id] = ScoreIndex{ Index: idx, - CompareScore: float64(v.CompareScore), + CompareScore: util.ParseScore64(float64(v.CompareScore)), } captureIds = append(captureIds,v.Id) } else { dbPersonM[v.Id] = ScoreIndex{ Index: idx, - CompareScore: float64(v.CompareScore), + CompareScore: util.ParseScore64(float64(v.CompareScore)), } personIds = append(personIds,v.Id) } @@ -311,7 +311,7 @@ for _,p :=range vp.BaseInfo { bi = append(bi, DbPersonVo{ TargetId: p.TargetId, - CompareScore: float64(p.CompareScore), + CompareScore: util.ParseScore64(p.CompareScore), MonitorLevel: parseMonitorLevel(p.MonitorLevel), TargetName: p.TargetName, TargetPicUrl: p.TargetPicUrl, @@ -336,7 +336,7 @@ } var ti = make([]TargetInfo,0) if vp.TargetInfo !=nil { - for _,vti :=range ti { + for _,vti :=range vp.TargetInfo { tl := protomsg.Location{ X: vti.TargetLocation.TopLeft.X, Y: vti.TargetLocation.TopLeft.Y, @@ -362,6 +362,7 @@ Id: vp.Id, CompareScore: captureM[vp.Id].CompareScore, CameraId: vp.CameraId, + CameraName: vp.CameraName, CameraAddr: vp.CameraAddr, PicDate: vp.PicDate, PicMaxUrl: vp.PicMaxUrl, -- Gitblit v1.8.0