From 9d4762cee4c0762dde9ee8712c3460c6f986f876 Mon Sep 17 00:00:00 2001 From: zhangzengfei <zhangzengfei@smartai.com> Date: 星期六, 19 十月 2024 14:27:35 +0800 Subject: [PATCH] 修复V2 --- model/model.go | 105 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 105 insertions(+), 0 deletions(-) diff --git a/model/model.go b/model/model.go index 037246b..7016d1c 100644 --- a/model/model.go +++ b/model/model.go @@ -19,12 +19,117 @@ DataSource: "smart-ai", } +type BaseCompareInfo struct { + BwType string `json:"bwType"` + TableId string `json:"tableId"` + TableName string `json:"tableName"` + CompareScore float32 `json:"compareScore"` + OriginScore float32 `json:"originScore"` + TargetId string `json:"targetId"` + TargetPicUrl string `json:"targetPicUrl"` + MonitorLevel string `json:"monitorLevel"` + Content string `json:"content"` + DbLabel string `json:"labels"` +} + +type AlarmRule struct { + RuleId string `json:"ruleId"` + RuleText string `json:"ruleText"` + AlarmLevel string `json:"alarmLevel"` +} + +type Point struct { + X int32 `json:"x"` + Y int32 `json:"y"` +} + +type Points struct { + TopLeft Point `json:"topLeft"` + BottomRight Point `json:"bottomRight"` +} + +type TargetInfo struct { + TargetId string `json:"targetId"` + TargetScore float64 `json:"targetScore"` + FrontFaceScore float64 `json:"frontFaceScore"` + ImgQuality float64 `json:"imgQuality"` + FaceQuality float64 `json:"faceQuality"` + TargetType string `json:"targetType"` + Feature string `json:"-"` + PicSmUrl string `json:"picSmUrl"` + TargetLocation Points `json:"targetLocation"` + Attribute string `json:"attribute"` +} + +type PicWidHei struct { + PicW int `json:"picW"` + PicH int `json:"picH"` +} + type pushDataInfoV2 struct { CameraId string `json:"cameraId"` CameraFloor string `json:"cameraFloor"` //鎽勫儚鏈烘ゼ灞� + Direction string `json:"direction"` // 鎽勫儚鏈鸿繍琛屾柟鍚� up or down PicDate string `json:"picDate"` PicId string `json:"picId"` DataSource string `json:"dataSource"` PicMaxImages [][]byte `json:"picMaxImages"` PicSmImages [][]byte `json:"picSmImages"` } + +type TaskResultInfoV2 struct { + Id string `json:"id"` + AnalyServerId string `json:"analyServerId"` + AnalyServerName string `json:"analyServerName"` + AnalyServerIp string `json:"analyServerIp"` + ClusterId string `json:"clusterId"` + CameraId string `json:"cameraId"` + CameraAddr string `json:"cameraAddr"` // 鎽勫儚鏈哄湴鍧� + CameraName string `json:"cameraName"` // 鎽勫儚鏈哄悕绉� + CommunityId string `json:"communityId"` + CommunityName string `json:"communityName"` + CameraLocation CameraLocation `json:"cameraLocation"` + DocumentNumber string `json:"documentNumber"` // 妗f缂栧彿 + OrgId string `json:"orgId"` //鏈烘瀯鍚嶇О + OrgName string `json:"orgName"` //鏈烘瀯鍚嶇О + PicDate string `json:"picDate"` + PicId string `json:"picId"` + PicMaxUrl string `json:"picMaxUrl"` + PicWH PicWidHei `json:"picWH"` + TaskId string `json:"taskId"` + TaskName string `json:"taskName"` + SdkName string `json:"sdkName"` + Content string `json:"content"` + ShowLabels string `json:"showLabels"` + OtherLabels string `json:"otherLabels"` + VideoUrl string `json:"videoUrl"` + IsAlarm bool `json:"isAlarm"` + IsAckAlarm bool `json:"isAckAlarm"` + IsDelete bool `json:"isDelete"` + IsKeyPerson bool `json:"isKeyPerson"` + KeyPersonType []string `json:"keyPersonType"` + AlarmRules []AlarmRule `json:"alarmRules"` + BaseInfo *BaseCompareInfo `json:"baseInfo"` + TargetInfo TargetInfo `json:"targetInfo"` + DataSource string `json:"dataSource"` // 鏁版嵁鏉ユ簮:鎽勫儚鏈�, 鏁版嵁鏍� +} + +type CameraLocation struct { + Building string `json:"building"` + Unit string `json:"unit"` + Pos string `json:"pos"` + Floor string `json:"floor"` + Direction string `json:"direction"` +} + +func (cl *CameraLocation) Join() string { + return cl.Building + cl.Unit + cl.Pos + cl.Floor +} + +// es瑙嗛鍒嗘瀽鐨勬暟鎹粨鏋� +type ESInfoV2 struct { + TaskResultInfoV2 + Version string `json:"version"` + UpdateTime string `json:"updateTime"` + LikeDate string `json:"likeDate"` +} -- Gitblit v1.8.0