| | |
| | | PicDate string `json:"picDate"` |
| | | Content string `json:"content"` |
| | | IsAlarm bool `json:"isAlarm"` |
| | | PicMaxUrl string `json:"picMaxUrl"` |
| | | PicSmUrl []string `json:"picSmUrl"` |
| | | PicMaxUrl []string `json:"picMaxUrl"` |
| | | TargetInfo []TargetInfo `json:"targetInfo"` |
| | | TaskId string `json:"taskId"` |
| | | TaskName string `json:"taskName"` |
| | |
| | | |
| | | type TargetInfo struct { |
| | | TargetId string `json:"targetId"` |
| | | TargetType string `json:"targetType"` |
| | | TargetScore float64 `json:"targetScore"` |
| | | Feature string `json:"feature"` |
| | | PicSmUrl string `json:"picSmUrl"` |
| | |
| | | } |
| | | |
| | | type DbPersonVo struct { |
| | | TableId string `json:"tableId"` |
| | | TableName string `json:"tableName"` |
| | | BwType string `json:"bwType"` |
| | | CompareScore float64 `json:"compareScore"` |
| | | MonitorLevel string `json:"monitorLevel"` |
| | | TargetId string `json:"targetId"` |
| | | TargetName string `json:"targetName"` |
| | | TargetPicUrl string `json:"targetPicUrl"` |
| | | MonitorLevel string `json:"monitorLevel"` |
| | | Labels string `json:"labels"` |
| | | TableId string `json:"tableId"` |
| | | TableName string `json:"tableName"` |
| | | Content string `json:"content"` |
| | | Enable int32 `json:"enable"` |
| | | } |
| | | |
| | |
| | | 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) |
| | | } |
| | |
| | | MonitorLevel: p.MonitorLevel, |
| | | TargetName: p.PersonName, |
| | | TargetPicUrl: p.PersonPicUrl, |
| | | Labels: p.Sex+" / "+p.IdCard+" / "+p.IdCard, |
| | | Labels: p.PhoneNum+"/"+p.Sex+"/"+p.IdCard, |
| | | TableId: p.TableId, |
| | | Content: p.Reserved, |
| | | Enable: p.Enable, |
| | | } |
| | | dbTableInfos, _ := dtApi.DbtablesById([]string{ p.TableId }) |
| | |
| | | for _,p :=range vp.BaseInfo { |
| | | bi = append(bi, DbPersonVo{ |
| | | TargetId: p.TargetId, |
| | | CompareScore: float64(p.CompareScore), |
| | | MonitorLevel: parseMonitorLevel(p.MonitorLevel), |
| | | CompareScore: util.ParseScore64(p.CompareScore), |
| | | MonitorLevel: p.MonitorLevel, |
| | | TargetName: p.TargetName, |
| | | TargetPicUrl: p.TargetPicUrl, |
| | | Labels: p.Labels, |
| | |
| | | } |
| | | 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, |
| | |
| | | } |
| | | tInfo := TargetInfo{ |
| | | TargetId: vti.TargetId, |
| | | TargetType: vti.TargetType, |
| | | TargetScore: vti.TargetScore, |
| | | Feature: vti.Feature, |
| | | PicSmUrl: vti.PicSmUrl, |
| | |
| | | Id: vp.Id, |
| | | CompareScore: captureM[vp.Id].CompareScore, |
| | | CameraId: vp.CameraId, |
| | | CameraName: vp.CameraName, |
| | | CameraAddr: vp.CameraAddr, |
| | | PicDate: vp.PicDate, |
| | | PicMaxUrl: vp.PicMaxUrl, |
| | |
| | | } else { |
| | | arg.TableIds = []string{} |
| | | } |
| | | alarmLevelTypes := strings.Replace(strings.Trim(fmt.Sprint(getAlarmLevel(searchBody.AlarmLevel)), "[]"), " ", "\",\"", -1) |
| | | arg.Source = true // 标识来源是web |
| | | arg.AlarmLevel = searchBody.AlarmLevel |
| | | arg.AlarmLevel = alarmLevelTypes |
| | | arg.Tasks = searchBody.Tasks |
| | | arg.TreeNodes = searchBody.TreeNodes |
| | | arg.Tabs = searchBody.Tabs |
| | |
| | | } |
| | | localConf, err := cache.GetServerInfo() |
| | | if err ==nil && localConf.AlarmIp != "" && localConf.ServerId != "" { |
| | | alarmLevelTypes := strings.Replace(strings.Trim(fmt.Sprint(getAlarmLevel(searchBody.AlarmLevel)), "[]"), " ", "\",\"", -1) |
| | | arg.Source = true // 标识来源是web |
| | | arg.AlarmLevel = searchBody.AlarmLevel |
| | | arg.AlarmLevel = alarmLevelTypes |
| | | arg.Tasks = searchBody.Tasks |
| | | arg.TreeNodes = searchBody.TreeNodes |
| | | arg.Tabs = searchBody.Tabs |
| | |
| | | arg.InputValue = searchBody.InputValue |
| | | arg.Collection = searchBody.Collection |
| | | arg.AnalyServerId = localConf.ServerId |
| | | alarmLevelTypes := strings.Replace(strings.Trim(fmt.Sprint(getAlarmLevel(searchBody.AlarmLevel)), "[]"), " ", "\",\"", -1) |
| | | |
| | | captureIds := esApi.GetAllLocalVideopersonsId(arg, config.EsInfo.EsIndex.AiOcean.IndexName, localConf.AlarmIp, strconv.Itoa(int(localConf.AlarmPort)), alarmLevelTypes) |
| | | logger.Debug("searchPhoto first Result.len:",len(*co.CompareData),"twice len(captureIds):",len(captureIds)) |
| | | if captureIds !=nil { |