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
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
| package controllers
|
| import (
| "vamicro/config"
| "vamicro/push-service/vo"
|
| "basic.com/valib/bhomeclient.git"
| "basic.com/valib/logger.git"
| )
|
| 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: "camera_id", Name: "摄像机ID", Alias: "camera_id"},
| {Checked: true, Id: "camera_name", Name: "摄像机名称", Alias: "camera_name"},
| {Checked: true, Id: "camera_addr", Name: "摄像机地址", Alias: "camera_addr"},
| {Checked: true, Id: "camera_rtsp", Name: "RTSP地址", Alias: "camera_rtsp"},
| },
| }
| // 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"},
| // },
| // }
| taskInfoSet := vo.PushSetMenu{
| Id: "aiTasks", //ai任务
| Name: "任务信息",
| Alias: "aiTasks",
| Checked: true,
| Children: []vo.PushSetMenu{
| {Checked: true, Id: "task_id", Name: "任务id", Alias: "task_id"},
| {Checked: true, Id: "task_name", Name: "任务名称", Alias: "task_name"},
| {Checked: true, Id: "event_level", Name: "事件等级", Alias: "event_level"},
| {Checked: true, Id: "working_time", Name: "时间段", Alias: "working_time"},
| {Checked: true, Id: "rules", Name: "任务描述", Alias: "rules"},
| {Checked: true, Id: "task_description", Name: "备注", Alias: "task_description"},
| },
| }
| serverSet := vo.PushSetMenu{
| Id: "serverInfo",
| Name: "分析服务器",
| Alias: "serverInfo",
| Checked: true,
| Children: []vo.PushSetMenu{
| {Checked: true, Id: "analy_server_id", Name: "设备ID", Alias: "analy_server_id"},
| {Checked: true, Id: "analy_server_ip", Name: "设备IP", Alias: "analy_server_ip"},
| {Checked: true, Id: "analy_server_name", Name: "设备名称", Alias: "analy_server_name"},
| },
| }
| dataSet := vo.PushSetMenu{
| Id: "dataInfo",
| Name: "数据",
| Alias: "dataInfo",
| Checked: true,
| Children: []vo.PushSetMenu{
| {Checked: true, Id: "id", Name: "主键ID", Alias: "id"},
| {Checked: true, Id: "detect_time", Name: "创建时间", Alias: "detect_time"},
| {Checked: true, Id: "zh_desc_class", Name: "中文描述", Alias: "zh_desc_class"},
| {Checked: true, Id: "image_path", Name: "图像地址", Alias: "image_path"},
| {Checked: true, Id: "video_path", Name: "录像地址", Alias: "video_path"},
| {Checked: true, Id: "event_level_name", Name: "事件等级", Alias: "event_level_name"},
| {Checked: true, Id: "suggestion", Name: "处理建议", Alias: "suggestion"},
| {Checked: true, Id: "risk_description", Name: "隐患描述", Alias: "risk_description"},
| {Checked: true, Id: "is_warning", Name: "是否预警", Alias: "is_warning"},
| },
| }
| detectAreaSet := vo.PushSetMenu{
| Id: "areaInfo",
| Name: "检测区域",
| Alias: "areaInfo",
| Checked: true,
| Children: []vo.PushSetMenu{
| {Checked: true, Id: "area_id", Name: "检测区域id", Alias: "area_id"},
| {Checked: true, Id: "area_name", Name: "检测区域名称", Alias: "area_name"},
| {Checked: true, Id: "proportion", Name: "检测区域占比", Alias: "proportion"},
| },
| }
| KnowLedgeSet := vo.PushSetMenu{
| Id: "knowLedgeInfo",
| Name: "知识库",
| Alias: "knowLedgeInfo",
| Checked: true,
| Children: []vo.PushSetMenu{
| {Checked: true, Id: "knowledge_id", Name: "ID", Alias: "knowledge_id"},
| {Checked: true, Id: "knowledge_name", Name: "知识库名称", Alias: "knowledge_name"},
| {Checked: true, Id: "knowledge_doc", Name: "知识库文档", Alias: "knowledge_doc"},
| },
| }
| targetSet := vo.PushSetMenu{
| Id: "targetInfo",
| Name: "目标",
| Alias: "targetInfo",
| Checked: true,
| Children: []vo.PushSetMenu{
| {Checked: true, Id: "attribute", Name: "属性", Alias: "attribute"},
| {Checked: true, Id: "target_location", Name: "目标坐标", Alias: "target_location"},
| {Checked: true, Id: "target_score", Name: "目标置信度", Alias: "target_score"},
| {Checked: true, Id: "target_type", Name: "目标类别", Alias: "target_type"},
| },
| }
| // 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)
| set = append(set, camInfoSet, taskInfoSet, serverSet, dataSet, detectAreaSet, KnowLedgeSet, targetSet)
|
| return &bhomeclient.Reply{Success: true, Data: set}
| }
|
|