---
panlei
2019-11-19 5a25fb6bbd594374f9cdc9587b8f2ec5ea5df238
insertdata/insertDataToEs.go
@@ -97,7 +97,7 @@
type Target struct {
   TargetId       string  `json:"targetId"`
   TargetScore    float64 `json:"targetScore"`
   FaceFeature    string  `json:"faceFeature"`
   FaceFeature    string  `json:"feature"`
   PicSmUrl       string  `json:"picSmUrl"`
   TargetLocation Points  `json:"targetLocation"`
}
@@ -219,6 +219,14 @@
                  target.TargetLocation = Points{TopLeft: Point{face.Location.X, face.Location.Y}, BottomRight: Point{face.Location.X + face.Location.Width, face.Location.Y + face.Location.Height}}
                  var targetInfos []Target
                  targetInfos = append(targetInfos, *target)
                  sdkname := ""
                  switch key {
                  case "face":
                     sdkname = "人脸"
                  case "plate":
                     sdkname = "车牌识别"
                  }
                  pervideo := PerVideoPicture{
                     face.Uuid,
                     msg.Cid,
@@ -228,7 +236,7 @@
                     imgMaxUrl,
                     msg.Tasklab.Taskid,
                     msg.Tasklab.Taskname,
                     "人脸",
                     sdkname,
                     time.Now().Format("2006-01-02 15:04:05"),
                     alarmRules,
                     time.Now().Format("2006-01-02 15:04:05"), // 只检测,没有比对时间
@@ -763,15 +771,15 @@
      }
      race := getRaceString(obj.ThftRes.Race)
      ageDescription := getDescription(obj.ThftRes.Age)
      lable = sex + "//" + ageDescription + "//" + race + "//"
      lableAttach = strconv.Itoa(int(obj.ThftRes.Age)) + "岁" + "//" + "微笑值:" + strconv.Itoa(int(obj.ThftRes.Smile)) + "//" + "颜值:" + strconv.Itoa(int(obj.ThftRes.Beauty))
      lable = sex + "/" + ageDescription + "/" + race + "/"
      lableAttach = strconv.Itoa(int(obj.ThftRes.Age)) + "岁" + "/" + "微笑值:" + strconv.Itoa(int(obj.ThftRes.Smile)) + "/" + "颜值:" + strconv.Itoa(int(obj.ThftRes.Beauty))
   case "plate":
      // 车牌运动方向,0 unknown, 1 left, 2 right, 3 up, 4 down
      lable = obj.Car.License + "//" + cache.GetDic("nColor"+strconv.Itoa(int(obj.Car.NColor))) + "车牌" + "//" +
         cache.GetDic("nCarColor"+strconv.Itoa(int(obj.Car.NCarColor))) + "车辆" + "//" + cache.GetDic("nCarLogo"+strconv.Itoa(int(obj.Car.NCarLogo))) + "//" + cache.GetDic("nCarLogo"+strconv.Itoa(int(obj.Car.NCarType)))
      lableAttach = cache.GetDic("nDirection"+strconv.Itoa(int(obj.Car.NDirection))) + "//" + "车牌置信度:" + strconv.Itoa(int(obj.Car.NConfidence)) + "//" +
         "车牌亮度:" + strconv.Itoa(int(obj.Car.NBright)) + "//" + "车的亮度:" + strconv.Itoa(int(obj.Car.NCarBright)) + "//" + "识别时间:" + strconv.Itoa(int(obj.Car.NTime))
      lable = obj.Car.License + "/" + cache.GetDic("nColor"+strconv.Itoa(int(obj.Car.NColor))) + "车牌" + "/" +
         cache.GetDic("nCarColor"+strconv.Itoa(int(obj.Car.NCarColor))) + "车辆" + "/" + cache.GetDic("nCarLogo"+strconv.Itoa(int(obj.Car.NCarLogo))) + "/" + cache.GetDic("nCarLogo"+strconv.Itoa(int(obj.Car.NCarType)))
      lableAttach = cache.GetDic("nDirection"+strconv.Itoa(int(obj.Car.NDirection))) + "/" + "车牌置信度:" + strconv.Itoa(int(obj.Car.NConfidence)) + "/" +
         "车牌亮度:" + strconv.Itoa(int(obj.Car.NBright)) + "/" + "车的亮度:" + strconv.Itoa(int(obj.Car.NCarBright)) + "/" + "识别时间:" + strconv.Itoa(int(obj.Car.NTime))
   }
   return lable, lableAttach
}