| | |
| | | var device models.Device |
| | | |
| | | if err := device.FindById(deviceId); err != nil { |
| | | logger.Debug("Can't find device in database, device:%s, %s", deviceId, err.Error()) |
| | | logger.Warn("Can't find device in database, device:%s, %s", deviceId, err.Error()) |
| | | return pd |
| | | } |
| | | |
| | |
| | | pd.PicMaxImages = append(pd.PicMaxImages, imageBytes) |
| | | |
| | | tr := vo.TaskResultInfo{ |
| | | Id: uuid.NewV4().String(), |
| | | CameraId: deviceId, |
| | | OrgName: "", |
| | | CameraAddr: device.Addr + device.Pos, |
| | | CameraName: device.Name, |
| | | PicMaxUrl: []string{""}, |
| | | PicDate: time.Now().Format("2006-01-02 15:04:05"), |
| | | LikeDate: time.Now().Format("2006-01-02 15:04:05"), |
| | | TaskId: "", |
| | | AnalyServerId: deviceId, |
| | | AnalyServerName: "", |
| | | AnalyServerIp: "", |
| | | DataSource: "camera", |
| | | TargetInfo: []vo.TargetInfo{{TargetId: faceId}}, |
| | | Id: uuid.NewV4().String(), |
| | | CameraId: deviceId, |
| | | CameraAddr: device.Addr + device.Pos, |
| | | CameraName: device.Name, |
| | | PicMaxUrl: []string{""}, |
| | | PicDate: time.Now().Format("2006-01-02 15:04:05"), |
| | | LikeDate: time.Now().Format("2006-01-02 15:04:05"), |
| | | AnalyServerId: deviceId, |
| | | DataSource: "camera", |
| | | TargetInfo: []vo.TargetInfo{{TargetId: faceId}}, |
| | | } |
| | | |
| | | pd.SourceData = vo.ESInfo{ |