qixiaoning
2025-07-08 84d2ef9760af0a4a4aa933937294400b3caa291d
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
package vo
 
//用于接收多个摄像机的id,以逗号隔开
type MultiCamera struct {
    CameraIds             []string                             `json:"cameraIds"`
}
 
type GroupAlarmLevelVo struct {
    GroupId                string                                 `json:"group_id" binding:"required"`
    AlarmLevel             int                                    `json:"alarm_level"`
}
 
type CFInfo struct {
    Id                  string                                 `json:"id"`
    Name                string                                 `json:"name"`
    RunType             int                                    `json:"run_type"`
    ResolutionWidth      int                                   `json:"resolution_width"`//分辨率宽
    ResolutionHeight     int                                   `json:"resolution_height"`//分辨率高
}
 
type CameraSInfo struct {
    CFInfo
    RunServerName         string                                 `json:"runServerName"`
}
 
type CameraAndRules struct {
    CameraInfo            CameraSInfo  `json:"cameraInfo"`
    AllGroupRules         []GroupRuleVo `json:"rules"`
}
 
type GroupRuleVo struct {
    CameraIds             []string                             `json:"cameraIds"` //左侧选中的摄像机,可以是多个
    CameraNames         string                                 `json:"camera_names"`
    Id                    string                              `json:"id" example:"组规则的id"`
 
    GroupText              string                              `json:"group_text" binding:"required"`
    AlarmLevel             int                                 `json:"alarm_level"`
    Rules                  []CameraRuleBaseVo                     `json:"rules" binding:"required"`
    SetType                string                              `json:"set_type"`
 
    TemplateId             string                              `json:"template_id"`
    TimeRuleId             string                              `json:"time_rule_id"`  //时间段
    TimeName             string                                 `json:"time_name"`
    SceneName             string                                `json:"scene_name" binding:"required"` //场景名称,从模板来,修改即自定义
    Desc                 string                                 `json:"desc"` //场景描述
    Enable                 bool                                 `json:"enable"`
    VoiceId             string                                 `json:"voiceId"` //事件声音
}
 
type CameraRuleBaseVo struct {
    Id                     string                                 `json:"id"`                 //小规则的id
    CameraId             string                                 `json:"camera_id"`          //摄像机id
    SdkId                string                                 `json:"sdk_id"`             //算法id
    Icon                 string                                 `json:"icon"`                //阿里图标
    IconBlob            string                                 `json:"icon_blob"`          //图片base64编码
    IconBlob2            string                                 `json:"icon_blob2"`          //第二套图片base64编码
    PolygonId            string                                 `json:"polygon_id"`         //多边形id
    SdkSet                 []TemplateArg                         `json:"sdk_set"`            //算法配置
    RuleWithPre          string                                 `json:"rule_with_pre"`      //与上一条记录的逻辑运算规则(&&,||)
    IsSaveAnyhow         bool                                 `json:"is_save_anyhow"`     //触发是,是否保留数据
    GroupId              string                                 `json:"group_id"`           //分组id
    Sort                 int                                    `json:"sort"`               //排序
}
 
type TemplateArg struct {
    SdkArgAlias      string                                     `json:"sdk_arg_alias"` //算法参数别名
    Operator         string                                     `json:"operator"`           //计算方式=,>,>=等等
    OperatorType     string                                     `json:"operator_type"` //计算的值类型
    SdkArgValue      string                                     `json:"sdk_arg_value"` //算法参数值设置
    Sort             int                                        `json:"sort"`                   //排序
}