panlei
2019-11-07 59dcc2bba3b294b2679beb4f177b835552798ed5
insertdata/insertDataToEs.go
@@ -218,7 +218,7 @@
            race := getRaceString(face.ThftRes.Race)
            ageDescription := getDescription(face.ThftRes.Age)
            logger.Info(ageDescription)
            esDataId := uuid.NewV4().String()
            //esDataId := uuid.NewV4().String()
            linksId := ""
            if linkId != "" {
               linksId = linkId
@@ -230,7 +230,7 @@
            //logger.Info("人脸的id:",strconv.FormatUint(face.Id, 10))
            logger.Info("%%%%%%%%%%%%%%%%%%%%%目标信息:",*target)
            pervideo := PerVideoPicture{
               esDataId,
               msg.Push.PushId,
               msg.Cid,
               msg.Push.Cam.Addr,
               picTime,
@@ -249,7 +249,7 @@
               face.ThftRes.Beauty,
               base64.StdEncoding.EncodeToString(face.Feature),
               []string{resp["fileUrl"].(string)},
               "暂无集群",
               "",
               msg.Push.ServerId,
               msg.Push.ServerName,
               msg.Push.LocalIp,
@@ -275,7 +275,7 @@
            } else {
               logger.Info("插入es返回的信息:", resp1)
               // 发出录像信号
               ruleserver.AddLxMessage(&protomsg.VideotapeInfo{EsDataId: esDataId, CameraId: msg.Cid, TaskId: msg.Tasklab.Taskid, VideoUrl:msg.Push.VideoUrl,ImgId: i.Id, SdkIds: []string{}, Type: 1})
               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})
            }
         }
      }
@@ -445,13 +445,13 @@
         if resp["fileUrl"] != nil {
            url = append(url, resp["fileUrl"].(string))
            esDataId := uuid.NewV4().String()
            //esDataId := uuid.NewV4().String()
            linksId := ""
            if linkId != "" {
               linksId = linkId
            }
            peraction := Personaction{
               esDataId,
               msg.Push.PushId,
               msg.Cid,
               msg.Push.Cam.Name,
               msg.Push.Cam.Addr,
@@ -479,7 +479,6 @@
            if err != nil {
               logger.Info("json parse error ", err)
               return
            }
            resp1, err2 := EsReq("POST", personAction, requstbody)
            if err2 != nil {
@@ -487,8 +486,7 @@
            } else {
               logger.Debug("插入es返回的数据信息是:", resp1)
               // 发出录像信号
               logger.Info("给录像的视频地址:",msg.Push.VideoUrl)
               ruleserver.AddLxMessage(&protomsg.VideotapeInfo{EsDataId: esDataId, CameraId: msg.Cid, TaskId: msg.Tasklab.Taskid,VideoUrl:msg.Push.VideoUrl, ImgId: i.Id, SdkIds: []string{}, Type: 2})
               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数据成功")
               //os.Exit(1)
            }