| | |
| | | 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"` |
| | |
| | | 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(dbPersonM[p.PersonId].CompareScore), |
| | | MonitorLevel: p.MonitorLevel, |
| | | PersonName: p.PersonName, |
| | | PersonPicUrl: p.PersonPicUrl, |
| | | PhoneNum: p.PhoneNum, |
| | | Sex: p.Sex, |
| | | TableId: p.TableId, |
| | | }) |
| | | } |
| | | vpE := CompareResult{ |
| | | Id: vp.Id, |
| | | 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) |
| | |
| | | } |
| | | |
| | | func ParseScore(compareScore float32) float32 { |
| | | f, _ := strconv.ParseFloat(fmt.Sprintf("%.2f", compareScore*100), 32) |
| | | f, _ := strconv.ParseFloat(fmt.Sprintf("%.2f", compareScore), 32) |
| | | return float32(f) |
| | | } |