| | |
| | | } |
| | | 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, |
| | |
| | | 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 { |