panlei
2019-11-13 e3767033a8f3743a55b45402ae21aebe5725c406
insertdata/insertDataToEs.go
@@ -76,7 +76,7 @@
type Target struct {
   TargetId       string  `json:"targetId"`
   TargetScore    float64 `json:"targetScore"`
   TargetLocation Points
   TargetLocation Points  `json:"targetLocation"`
}
type Points struct {
@@ -85,8 +85,8 @@
}
type Point struct {
   Lat float64 `json:"lat"`
   Lon float64 `json:"lon"`
   X float64 `json:"x"`
   Y float64 `json:"y"`
}
//  yolo行为的数据结构
@@ -249,9 +249,9 @@
            if err1 != nil {
               logger.Error("上传ES出错!---", err1)
            } else {
               logger.Info("插入es返回的信息:", resp1)
               logger.Info("插入es返回的信息(人脸):", resp1)
               // 发出录像信号
               ruleserver.AddLxMessage(&protomsg.VideotapeInfo{EsDataId: msg.Push.PushId, CameraId: msg.Cid, TaskId: msg.Tasklab.Taskid, VideoUrl: msg.Push.VideoUrl, ImgId: i.Id, SdkIds: []string{}, Type: 1})
               ruleserver.AddLxMessage(&protomsg.VideotapeInfo{EsDataId: face.Uuid, CameraId: msg.Cid, TaskId: msg.Tasklab.Taskid, VideoUrl: msg.Push.VideoUrl, ImgId: i.Id, SdkIds: []string{}, Type: 1})
            }
         }
      }
@@ -451,7 +451,7 @@
            if err2 != nil {
               logger.Error("往ES插入数据失败", err)
            } else {
               logger.Debug("插入es返回的数据信息是:", resp1)
               logger.Debug("插入es返回的数据信息是(yolo):", resp1)
               // 发出录像信号
               ruleserver.AddLxMessage(&protomsg.VideotapeInfo{EsDataId: msg.Push.PushId, CameraId: msg.Cid, TaskId: msg.Tasklab.Taskid, VideoUrl: msg.Push.VideoUrl, ImgId: i.Id, SdkIds: []string{}, Type: 2})
               logger.Warn("__________________________________________往ES插入yolo数据成功")