1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
| package controllers
|
| import (
| "basic.com/valib/bhomeclient.git"
| "basic.com/valib/logger.git"
| "vamicro/config"
| "vamicro/push-service/vo"
| )
|
| type PushSetController struct {
| }
|
| // @Summary 获取所有的推送字段配置
| // @Description 获取所有的推送字段配置
| // @Produce json
| // @Tags 事件推送
| // @Success 200 {string} json "{"code":200, success:true, msg:"", data:""}"
| // @Failure 500 {string} json "{"code":500, success:false, msg:"",data:""}"
| // @Router /data/api-v/eventPush/getPushSet [get]
| func (psc *PushSetController) GetPushSet(h *bhomeclient.WrapperHandler, c *bhomeclient.Request) *bhomeclient.Reply {
| //大类 摄像机信息、场景信息、分析服务器、数据、检测区域、目标、底库信息等等
| logger.Debug("config PushSet:", config.PushSet)
| if len(config.PushSet) > 0 {
| return &bhomeclient.Reply{Success: true, Data: config.PushSet}
| }
|
| set := make([]vo.PushSetMenu, 0)
| camInfoSet := vo.PushSetMenu{
| Id: "camInfo",
| Name: "摄像机信息",
| Alias: "camInfo",
| Checked: true,
| Children: []vo.PushSetMenu{
| {Checked: true, Id: "cameraId", Name: "摄像机ID", Alias: "cameraId"},
| {Checked: true, Id: "cameraName", Name: "摄像机名称", Alias: "cameraName"},
| {Checked: true, Id: "cameraAddr", Name: "摄像机地址", Alias: "cameraAddr"},
| },
| }
| sceneInfoSet := vo.PushSetMenu{
| Id: "alarmRules", //报警规则
| Name: "场景信息",
| Alias: "alarmRules",
| Checked: true,
| Children: []vo.PushSetMenu{
| {Checked: true, Id: "taskId", Name: "场景ID", Alias: "taskId"},
| {Checked: true, Id: "taskName", Name: "场景名称", Alias: "taskName"},
| {Checked: true, Id: "alarmRules.#.alarmLevel", Name: "事件等级", Alias: "alarmLevel"},
| {Checked: true, Id: "alarmRules.#.ruleText", Name: "场景描述", Alias: "groupText"},
| {Checked: true, Id: "alarmRules.#.linkInfo", Name: "联动信息", Alias: "linkInfo"},
| {Checked: true, Id: "alarmRules.#.groupId", Name: "报警规则组id", Alias: "groupId"},
| },
| }
| serverSet := vo.PushSetMenu{
| Id: "serverInfo",
| Name: "分析服务器",
| Alias: "serverInfo",
| Checked: true,
| Children: []vo.PushSetMenu{
| {Checked: true, Id: "analyServerId", Name: "设备ID", Alias: "analyServerId"},
| {Checked: true, Id: "analyServerIp", Name: "设备IP", Alias: "analyServerIp"},
| {Checked: true, Id: "analyServerName", Name: "设备名称", Alias: "analyServerName"},
| },
| }
| dataSet := vo.PushSetMenu{
| Id: "dataInfo",
| Name: "数据",
| Alias: "dataInfo",
| Checked: true,
| Children: []vo.PushSetMenu{
| {Checked: true, Id: "id", Name: "主键ID", Alias: "id"},
| {Checked: true, Id: "isDelete", Name: "是否删除", Alias: "isDelete"},
| {Checked: true, Id: "likeDate", Name: "比对时间", Alias: "likeDate"},
| {Checked: true, Id: "picDate", Name: "抓拍时间", Alias: "picDate"},
| {Checked: true, Id: "updateTime", Name: "更新时间", Alias: "updateTime"},
| {Checked: true, Id: "picMaxUrl", Name: "告警全景图地址", Alias: "picMaxUrl"},
| {Checked: true, Id: "picSrcUrl", Name: "原始全景图地址", Alias: "picSrcUrl"},
| {Checked: true, Id: "picId", Name: "图片ID", Alias: "picId"},
| {Checked: true, Id: "picWH.picH", Name: "图片高", Alias: "picH"},
| {Checked: true, Id: "picWH.picW", Name: "图片宽", Alias: "picW"},
| {Checked: true, Id: "sdkName", Name: "sdk类型", Alias: "sdkName"},
| {Checked: true, Id: "videoUrl", Name: "录像地址", Alias: "videoUrl"},
| {Checked: true, Id: "content", Name: "场景名称", Alias: "content"},
| {Checked: true, Id: "linkTag", Name: "联动任务标志", Alias: "linkTag"},
| {Checked: true, Id: "otherLabels", Name: "其他标签", Alias: "otherLebels"},
| {Checked: true, Id: "showLabels", Name: "算法标签", Alias: "showLabels"},
| {Checked: true, Id: "version", Name: "索引版本", Alias: "version"},
| {Checked: true, Id: "isAlarm", Name: "是否报警", Alias: "isAlarm"},
| },
| }
| detectAreaSet := vo.PushSetMenu{
| Id: "detectAreaInfo",
| Name: "检测区域",
| Alias: "detectAreaInfo",
| Checked: true,
| Children: []vo.PushSetMenu{
| {Checked: true, Id: "targetInfo.#.areaId", Name: "检测区域id", Alias: "areaId"},
| {Checked: true, Id: "targetInfo.#.areaName", Name: "检测区域名称", Alias: "areaName"},
| },
| }
| targetSet := vo.PushSetMenu{
| Id: "targetInfo",
| Name: "目标",
| Alias: "targetInfo",
| Checked: true,
| Children: []vo.PushSetMenu{
| {Checked: true, Id: "targetInfo.#.attribute", Name: "算法属性", Alias: "attribute"},
| {Checked: true, Id: "targetInfo.#.targetLocation", Name: "目标坐标", Alias: "targetLocation"},
| {Checked: true, Id: "targetInfo.#.targetScore", Name: "目标置信度", Alias: "targetScore"},
| {Checked: true, Id: "targetInfo.#.targetType", Name: "目标类别", Alias: "targetType"},
| },
| }
| dtSet := vo.PushSetMenu{
| Id: "tableInfo",
| Name: "底库信息",
| Alias: "tableInfo",
| Checked: true,
| Children: []vo.PushSetMenu{
| {Checked: true, Id: "baseInfo.#.tableId", Name: "底库ID", Alias: "tableId"},
| {Checked: true, Id: "baseInfo.#.tableName", Name: "底库名称", Alias: "tableName"},
| {Checked: true, Id: "baseInfo.#.bwType", Name: "黑白名单", Alias: "bwType"},
| {Checked: true, Id: "baseInfo.#.targetPicUrl", Name: "目标抓拍图片", Alias: "targetPicUrl"},
| {Checked: true, Id: "baseInfo.#.compareScore", Name: "相似度", Alias: "compareScore"},
| {Checked: true, Id: "baseInfo.#.content", Name: "内容", Alias: "content"},
| },
| }
| dbpInfo := vo.PushSetMenu{
| Id: "baseInfo",
| Name: "底库人员信息",
| Alias: "baseInfo",
| Checked: true,
| Children: []vo.PushSetMenu{
| {Checked: true, Id: "baseInfo.#.targetId", Name: "目标ID", Alias: "targetId"},
| {Checked: true, Id: "baseInfo.#.targetName", Name: "姓名", Alias: "targetName"},
| {Checked: true, Id: "baseInfo.#.sex", Name: "性别", Alias: "sex"},
| {Checked: true, Id: "baseInfo.#.idCard", Name: "身份证号", Alias: "idCard"},
| {Checked: true, Id: "baseInfo.#.phoneNum", Name: "手机号", Alias: "phoneNum"},
| {Checked: true, Id: "baseInfo.#.monitorLevel", Name: "人员等级", Alias: "monitorLevel"},
| },
| }
| set = append(set, camInfoSet, sceneInfoSet, serverSet, dataSet, detectAreaSet, targetSet, dtSet, dbpInfo)
|
| return &bhomeclient.Reply{Success: true, Data: set}
| }
|
|