---
panlei
2019-08-03 e79a505bddeecd0df74a468d520bfb1a39fdc526
ruleserver/readyDataForRule.go
@@ -71,6 +71,10 @@
         taskGroup = task
      }
   }
   logger.Debug("当前数据帧要匹配的规则组:-------------------------")
   for _,ruleGroup := range taskGroup.GroupRules{
      logger.Info(ruleGroup.GroupText)
   }
   return taskGroup
}
@@ -175,7 +179,7 @@
      for _, baseinfo := range baseinfos {
         // 根据tableId查询底库信息给liker赋值
         //logger.Info("---------看看每个底库人员的信息:",baseinfo.Id,baseinfo.PersonName)
         var tableIds []string
         tableIds := []string{}
         tableIds = append(tableIds, baseinfo.TableId) // 虽然是传入数组返回数组的接口,但我按单个的使用了
         table, err := esutil.Dbtablefosbyid(tableIds, "dbtables", serverIp, serverPort)
         if err != nil || len(table) == 0 {
@@ -267,12 +271,13 @@
      if threshold <= obj.Score && size <= float64(obj.Rects.Width*obj.Rects.Height) && intersectionper <= PgsInterPercent(areaPoints, obj.Rects, widthScale, heigthScale) {
         // 这步要备齐表达式里所需要的所有参数
         a.targetNum++
         arg1 := Arg{obj.Score, PgsInterPercent(areaPoints, obj.Rects, widthScale, heigthScale), float64(obj.Rects.Width * obj.Rects.Height), obj.IsYolo, obj.Rects, obj.Feature, obj.ThftRes, []*BaseInfo{}}
         arg1 := Arg{obj.Id,obj.Score, PgsInterPercent(areaPoints, obj.Rects, widthScale, heigthScale), float64(obj.Rects.Width * obj.Rects.Height), obj.IsYolo, obj.Rects, obj.Feature, obj.ThftRes, []*BaseInfo{}}
         //logger.Println("放进去的arg:-------", arg1)
         a.args = append(a.args, &arg1)
         a.filterData = append(a.filterData, &arg1)
      }
   }
   logger.Info("区域是:",areaPoints,"区域内目标数量为:",a.targetNum,"---",len(a.filterData))
   a.time = time.Unix(time.Now().Unix(), 0).String()[11:16]
   a.keepRight = arg.KeepRight
   a.isStatic = arg.IsStatic