qixiaoning
2025-07-25 94f3085afd10d76fa6e0640b5eed1d615b11ecea
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
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
package controllers
 
import (
    "basic.com/pubsub/protomsg.git"
    "basic.com/valib/bhomeclient.git"
    "basic.com/valib/logger.git"
    "encoding/json"
    "github.com/satori/go.uuid"
    "image"
    "os"
    "path"
    "strconv"
    "strings"
    "vamicro/extend/util"
    "vamicro/scene-service/models"
    "vamicro/scene-service/service"
    "vamicro/scene-service/vo"
)
 
type CameraPolygonController struct {
}
 
// @Summary 根据cameraId查询摄像机多边形
// @Description  根据cameraId查询摄像机多边形
// @Accept json
// @Produce json
// @Tags 摄像机多边形
// @Param  cameraId query string true "摄像机id"
// @Success 200 {string} json "{"code":200, success:true, msg:"", data:""}"
// @Failure 500 {string} json "{"code":500, success:false, msg:"", data:""}"
// @Router /data/api-v/polygon/findByCameraId [get]
func (cpc CameraPolygonController) FindByCameraId(h *bhomeclient.WrapperHandler, c *bhomeclient.Request) *bhomeclient.Reply {
    cameraId := c.Query("cameraId")
    if cameraId == "" {
        return &bhomeclient.Reply{Success: false, Msg: "参数有误"}
    }
    sv := service.NewCameraPolygonService(h.Bk)
    voInfo := sv.FindByCameraId(cameraId)
    return &bhomeclient.Reply{Success: true, Data: voInfo}
}
 
type CPN struct {
    models.CameraPolygon
    CameraName string `json:"camera_name"`
}
 
// @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/polygon/findAll [get]
func (cpc CameraPolygonController) FindAll(h *bhomeclient.WrapperHandler, c *bhomeclient.Request) *bhomeclient.Reply {
    m := make(map[string]string)
 
    idNameM := service.GetAllCamIdNameMap()
 
    var model models.CameraPolygon
    polygons := model.FindAll()
 
    var result []CPN
    var arr []CPN //全部区域
    for _, p := range polygons {
        if nn, exist := idNameM[p.CameraId]; exist {
            me := models.CameraPolygon{
                Id:            p.CameraId,
                CameraId:      p.CameraId,
                Name:          models.CAMERAPOLYGON_AREA_ALL,
                Polygon:       "",
                DirectionLine: "",
                Type:          models.TYPE_POLYGON,
                DefenceState:  1,
            }
 
            cpn := CPN{}
            cpn.CameraPolygon = me
            cpn.CameraName = nn
            if _, ok := m[p.CameraId]; !ok {
                arr = append(arr, cpn)
            }
 
            m[p.CameraId] = p.CameraId
        }
 
        cpR := CPN{}
        cpR.CameraPolygon = p
        if rName, ex := idNameM[p.CameraId]; ex {
            cpR.CameraName = rName
        }
        result = append(result, cpR)
    }
 
    for k, _ := range idNameM {
        if _, ok := m[k]; !ok {
            m[k] = k
 
            me := models.CameraPolygon{
                Id:            k,
                CameraId:      k,
                Name:          models.CAMERAPOLYGON_AREA_ALL,
                Polygon:       "",
                DirectionLine: "",
                Type:          models.TYPE_POLYGON,
                DefenceState:  1,
            }
 
            cpn := CPN{}
            cpn.CameraPolygon = me
            if nn, exist := idNameM[k]; exist {
                cpn.CameraName = nn
            }
            arr = append(arr, cpn)
        }
    }
 
    result = append(result, arr...) //每一个摄像机都有一个默认的全部区域
 
    return &bhomeclient.Reply{Success: true, Data: result}
}
 
// @Summary 添加或更新摄像机多边形
// @Description  添加或更新摄像机多边形
// @Accept json
// @Produce json
// @Tags 摄像机多边形
// @Param  cameraPolygon body vo.CameraPolygonVo true "摄像机区域结构体,必填"
// @Success 200 {string} json "{"code":200, success:true, msg:"", data:""}"
// @Failure 500 {string} json "{"code":500, success:false, msg:"", data:""}"
// @Router /data/api-v/polygon/save [post]
func (cpc CameraPolygonController) Save(h *bhomeclient.WrapperHandler, c *bhomeclient.Request) *bhomeclient.Reply {
    var cPolygon vo.CameraPolygonVo
 
    if err := c.BindJSON(&cPolygon); err != nil {
        return &bhomeclient.Reply{Success: false, Msg: "参数有误"}
    }
    if cPolygon.CameraId == "" {
        return &bhomeclient.Reply{Success: false, Msg: "摄像机id不能为空"}
    }
 
    sv := service.NewCameraPolygonService(h.Bk)
    delS, delF := sv.Save(cPolygon)
    var msg = ""
    if len(delS) > 0 {
        msg += "删除成功:" + strings.Join(delS, ",")
    }
    if len(delF) > 0 {
        if msg != "" {
            msg += ";删除失败:" + strings.Join(delF, ",")
        } else {
            msg += "删除失败:" + strings.Join(delF, ",")
        }
    }
    if msg == "" {
        msg = "保存成功"
    }
    logger.Debug("polygon=>Save.msg:", msg)
    return &bhomeclient.Reply{Success: true, Data: msg}
}
 
// @Summary 根据多边形id更新布撤防状态
// @Description  根据多边形id更新布撤防状态
// @Produce json
// @Tags 摄像机多边形
// @Param  polygonId query string true "多边形id"
// @Param  defence_state query int true "布撤防状态(0:撤销,1:布防)"
// @Success 200 {string} json "{"code":200, success:true, msg:"", data:""}"
// @Failure 500 {string} json "{"code":500, success:false, msg:"", data:""}"
// @Router /data/api-v/polygon/updateDefenceStateByPolygonId [get]
func (cpc CameraPolygonController) UpdateDefenceStateByPolygonId(h *bhomeclient.WrapperHandler, c *bhomeclient.Request) *bhomeclient.Reply {
    polygonId := c.Query("polygonId")                           //多边形id
    defenceState, err := strconv.Atoi(c.Query("defence_state")) //布撤防状态
    logger.Debug("polygonId:", polygonId)
    logger.Debug("defence_state:", defenceState)
    if err != nil || polygonId == "" || (defenceState != 0 && defenceState != 1) {
        return &bhomeclient.Reply{Success: false, Msg: "参数有误"}
    }
    var model models.CameraPolygon
    if model.UpdateDefenceStateByPolygonId(polygonId, defenceState) {
        cpc.addDbChangeMsg(h.Bk, protomsg.TableChanged_T_CameraPolygon, "", protomsg.DbAction_Update, "")
        return &bhomeclient.Reply{Success: true, Msg: "更新成功"}
    } else {
        return &bhomeclient.Reply{Success: false, Msg: "更新失败"}
    }
}
 
// @Summary 根据摄像机id更新布撤防状态
// @Description  根据摄像机id更新布撤防状态
// @Produce json
// @Tags 摄像机多边形
// @Param  cameraId query string true "摄像机id"
// @Param  defence_state query int true "布撤防状态(0:撤销,1:布防)"
// @Success 200 {string} json "{"code":200, success:true, msg:"", data:""}"
// @Failure 500 {string} json "{"code":500, success:false, msg:"", data:""}"
// @Router /data/api-v/polygon/updateDefenceStateByCameraId [get]
func (cpc CameraPolygonController) UpdateDefenceStateByCameraId(h *bhomeclient.WrapperHandler, c *bhomeclient.Request) *bhomeclient.Reply {
    cameraId := c.Query("cameraId")                             //多边形id
    defenceState, err := strconv.Atoi(c.Query("defence_state")) //布撤防状态
    if err != nil || cameraId == "" || (defenceState != 0 && defenceState != 1) {
        return &bhomeclient.Reply{Success: false, Msg: "参数有误"}
    }
    var model models.CameraPolygon
    if model.UpdateDefenceStateByCameraId(cameraId, defenceState) {
        cpc.addDbChangeMsg(h.Bk, protomsg.TableChanged_T_CameraPolygon, "", protomsg.DbAction_Update, "")
        return &bhomeclient.Reply{Success: true, Msg: "更新成功"}
    } else {
        return &bhomeclient.Reply{Success: false, Msg: "更新失败"}
    }
}
 
// @Summary 根据摄像机分组id获取分组下的所有区域
// @Description 根据摄像机分组id获取分组下的所有区域
// @Accept json
// @Produce json
// @Tags 摄像机多边形
// @Param  cameraPolygon body vo.CameraPolygonVo true "摄像机区域结构体,必填"
// @Success 200 {string} json "{"code":200, success:true, msg:"", data:""}"
// @Failure 500 {string} json "{"code":500, success:false, msg:"", data:""}"
// @Router /data/api-v/polygon/findByCamGroup [get]
func (cpc CameraPolygonController) FindByCamGroup(h *bhomeclient.WrapperHandler, c *bhomeclient.Request) *bhomeclient.Reply {
    groupId := c.Query("groupId")
    var cg models.CameraGroup
    rows, err := cg.SelectById(groupId)
    if err != nil && rows == 0 {
        return &bhomeclient.Reply{Msg: "此分组已删除"}
    }
    cameraIds := strings.Split(cg.CameraIds, ",")
    result := make([]vo.CameraPolygonVo, 0)
    var sv service.CameraPolygonService
    for _, cid := range cameraIds {
        result = append(result, sv.FindByCameraId(cid))
    }
 
    return &bhomeclient.Reply{Success: true, Data: result}
}
 
func (cpc CameraPolygonController) addDbChangeMsg(bk bhomeclient.Broker, tChanged protomsg.TableChanged, id string, action protomsg.DbAction, info string) {
    dbMsg := protomsg.DbChangeMessage{
        Table:  tChanged,
        Id:     id,
        Action: action,
        Info:   info,
    }
    pb, _ := json.Marshal(dbMsg)
    bk.Publish(service.ProcName, pb)
}
 
// @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/polygon/relation/findAll [get]
func (cpc CameraPolygonController) FindAllRelation(h *bhomeclient.WrapperHandler, c *bhomeclient.Request) *bhomeclient.Reply {
    var cpr models.CameraPolygonRelation
    arr := cpr.FindAll()
    if arr == nil {
        arr = make([]models.CameraPolygonRelation, 0)
    }
    return &bhomeclient.Reply{Success: true, Data: arr}
}
 
// @Summary 获取两个摄像机的区域关联关系
// @Description  获取两个摄像机的区域关联关系
// @Produce json
// @Tags 摄像机多边形
// @Param  cameraIds body vo.MultiCamera true "两个摄像机id"
// @Success 200 {string} json "{"code":200, success:true, msg:"", data:""}"
// @Failure 500 {string} json "{"code":500, success:false, msg:"", data:""}"
// @Router /data/api-v/polygon/relations [post]
func (cpc CameraPolygonController) Relations(h *bhomeclient.WrapperHandler, c *bhomeclient.Request) *bhomeclient.Reply {
    var reqBody vo.MultiCamera
    err := c.BindJSON(&reqBody)
    if err != nil || len(reqBody.CameraIds) != 2 {
        return &bhomeclient.Reply{Msg: "参数有误,必须是两个摄像机id"}
    }
    var cpr models.CameraPolygonRelation
    arr, _ := cpr.FindRelations(reqBody.CameraIds[0], reqBody.CameraIds[1])
 
    var list = make([]vo.SaveRelationVo, 0)
    if arr != nil && len(arr) > 0 {
        for _, r := range arr {
            s := vo.SaveRelationVo{
                Id:              r.Id,
                SourceCameraId:  r.SourceCameraId,
                SourcePolygonId: r.SourcePolygonId,
                TargetCameraId:  r.TargetCameraId,
                TargetPolygonId: r.TargetPolygonId,
            }
 
            var sPgnTmp models.CameraPolygon
            p1, f1 := sPgnTmp.SelectById(r.SourcePolygonId)
            if f1 && p1.Polygon != "" {
                location := make([]vo.Point, 0)
                if err := json.Unmarshal([]byte(p1.Polygon), &location); err == nil {
                    s.SourcePolygon = vo.PolygonS{
                        Id:           p1.Id,
                        Name:         p1.Name,
                        Location:     location,
                        DefenceState: p1.DefenceState,
                    }
                }
            }
 
            var tPgnTmp models.CameraPolygon
            p2, f2 := tPgnTmp.SelectById(r.TargetPolygonId)
            if f2 && p2.Polygon != "" {
                location := make([]vo.Point, 0)
                if err := json.Unmarshal([]byte(p2.Polygon), &location); err == nil {
                    s.TargetPolygon = vo.PolygonS{
                        Id:           p2.Id,
                        Name:         p2.Name,
                        Location:     location,
                        DefenceState: p2.DefenceState,
                    }
                }
            }
 
            list = append(list, s)
        }
    }
    return &bhomeclient.Reply{Success: true, Data: list}
}
 
func (cpc CameraPolygonController) FindRelationByGroup(h *bhomeclient.WrapperHandler, c *bhomeclient.Request) *bhomeclient.Reply {
    groupId := c.Query("groupId")
    if groupId == "" {
        return &bhomeclient.Reply{Msg: "参数有误"}
    }
    var list = make([]vo.SaveRelationVo, 0)
 
    var cpr models.CameraPolygonRelation
    arr, err := cpr.FindByGroupId(groupId)
    if err == nil && arr != nil {
        for _, r := range arr {
            s := vo.SaveRelationVo{
                Id:              r.Id,
                SourceCameraId:  r.SourceCameraId,
                SourcePolygonId: r.SourcePolygonId,
                TargetCameraId:  r.TargetCameraId,
                TargetPolygonId: r.TargetPolygonId,
            }
 
            var sPgnTmp models.CameraPolygon
            p1, f1 := sPgnTmp.SelectById(r.SourcePolygonId)
            if f1 && p1.Polygon != "" {
                location := make([]vo.Point, 0)
                if err := json.Unmarshal([]byte(p1.Polygon), &location); err == nil {
                    s.SourcePolygon = vo.PolygonS{
                        Id:           p1.Id,
                        Name:         p1.Name,
                        Location:     location,
                        DefenceState: p1.DefenceState,
                    }
                }
            }
 
            var tPgnTmp models.CameraPolygon
            p2, f2 := tPgnTmp.SelectById(r.TargetPolygonId)
            if f2 && p2.Polygon != "" {
                location := make([]vo.Point, 0)
                if err := json.Unmarshal([]byte(p2.Polygon), &location); err == nil {
                    s.TargetPolygon = vo.PolygonS{
                        Id:           p2.Id,
                        Name:         p2.Name,
                        Location:     location,
                        DefenceState: p2.DefenceState,
                    }
                }
            }
 
            list = append(list, s)
        }
    }
    return &bhomeclient.Reply{Success: true, Data: list}
}
 
// @Summary 获取两个摄像机区域的关联关系
// @Description  获取两个摄像机区域的关联关系
// @Produce json
// @Tags 摄像机多边形
// @Param  reqBody body vo.SaveRelationVo true "两个摄像机id"
// @Success 200 {string} json "{"code":200, success:true, msg:"", data:""}"
// @Failure 500 {string} json "{"code":500, success:false, msg:"", data:""}"
// @Router /data/api-v/polygon/relation/save [post]
func (cpc CameraPolygonController) SaveRelation(h *bhomeclient.WrapperHandler, c *bhomeclient.Request) *bhomeclient.Reply {
    var reqBody vo.SaveRelationVo
    err := c.BindJSON(&reqBody)
    if err != nil {
        return &bhomeclient.Reply{Msg: "参数有误,参数值不能为空"}
    }
    if reqBody.SourceCameraId == reqBody.TargetCameraId {
        return &bhomeclient.Reply{Msg: "区域关联的摄像机id不能相同"}
    }
    logger.Debug("saveRelationVo reqBody:", reqBody)
    var cpr models.CameraPolygonRelation
    d, exist := cpr.Exist(reqBody.SourceCameraId, reqBody.SourcePolygonId, reqBody.TargetCameraId, reqBody.TargetPolygonId)
 
    if exist {
        return &bhomeclient.Reply{Msg: "相同关联配置不能重复"}
    }
    if reqBody.Id != "" {
        var tmp = models.CameraPolygonRelation{
            Id:              reqBody.Id,
            GroupId:         reqBody.GroupId,
            SourceCameraId:  reqBody.SourceCameraId,
            SourcePolygonId: reqBody.SourcePolygonId,
            TargetCameraId:  reqBody.TargetCameraId,
            TargetPolygonId: reqBody.TargetPolygonId,
        }
        if b, err := tmp.Update(); b {
            return &bhomeclient.Reply{Success: true, Data: tmp}
        } else {
            return &bhomeclient.Reply{Msg: err.Error()}
        }
    } else {
        logger.Debug("saveRelationVo d:", d, "exist:", exist)
        if !exist {
            var tmp = models.CameraPolygonRelation{
                Id:              uuid.NewV4().String(),
                GroupId:         reqBody.GroupId,
                SourceCameraId:  reqBody.SourceCameraId,
                SourcePolygonId: reqBody.SourcePolygonId,
                TargetCameraId:  reqBody.TargetCameraId,
                TargetPolygonId: reqBody.TargetPolygonId,
            }
            if b, err := tmp.Insert(); b {
                cpc.addDbChangeMsg(h.Bk, protomsg.TableChanged_T_CameraPolygonRelation, tmp.Id, protomsg.DbAction_Insert, "")
                return &bhomeclient.Reply{Success: true, Data: tmp}
            } else {
                return &bhomeclient.Reply{Msg: err.Error()}
            }
        } else {
            return &bhomeclient.Reply{Success: true, Data: d}
        }
    }
}
 
// @Summary 删除两个摄像机区域的关联关系
// @Description  删除两个摄像机区域的关联关系
// @Produce json
// @Tags 摄像机多边形
// @Param  id query string true "关联id"
// @Success 200 {string} json "{"code":200, success:true, msg:"", data:""}"
// @Failure 500 {string} json "{"code":500, success:false, msg:"", data:""}"
// @Router /data/api-v/polygon/relation/del [delete]
func (cpc CameraPolygonController) DelRelation(h *bhomeclient.WrapperHandler, c *bhomeclient.Request) *bhomeclient.Reply {
    id := c.Query("id")
    if id == "" {
        return &bhomeclient.Reply{Msg: "参数有误,id不能为空"}
    }
    var cpr models.CameraPolygonRelation
    if cpr.Delete(id) {
        cpc.addDbChangeMsg(h.Bk, protomsg.TableChanged_T_CameraPolygonRelation, id, protomsg.DbAction_Delete, "")
        return &bhomeclient.Reply{Success: true, Msg: "删除成功"}
    } else {
        return &bhomeclient.Reply{Msg: "删除失败"}
    }
}
 
const panoramaPath = "/opt/vasystem/files/panorama.jpg"
 
// @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/panorama/show [get]
func (cpc CameraPolygonController) ShowPanorama(h *bhomeclient.WrapperHandler, c *bhomeclient.Request) *bhomeclient.Reply {
    result := make(map[string]interface{})
    if util.Exists(panoramaPath) {
        result["panoramaPath"] = "/files/panorama.jpg"
        if reader, err := os.Open(panoramaPath); err == nil {
            defer reader.Close()
            im, _, err := image.DecodeConfig(reader)
            if err == nil {
                result["width"] = im.Width
                result["height"] = im.Height
            }
        }
    } else {
        result["panoramaPath"] = ""
        result["width"] = 0
        result["height"] = 0
    }
    return &bhomeclient.Reply{Success: true, Data: result}
}
 
// @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/panorama/upload [post]
func (cpc CameraPolygonController) UploadPanorama(h *bhomeclient.WrapperHandler, c *bhomeclient.Request) *bhomeclient.Reply {
    file := c.File
 
    if file.Name == "" || file.Bytes == nil || len(file.Bytes) == 0 {
        logger.Debug("upload panorama file is nil")
        return &bhomeclient.Reply{Msg: "参数有误"}
    }
    ext := path.Ext(file.Name)
    if ext != ".jpg" {
        logger.Debug("file.Name:", file.Name)
        return &bhomeclient.Reply{Msg: "请上传.jpg格式的全景图"}
    }
 
    if util.Exists(panoramaPath) {
        os.Remove(panoramaPath)
    }
    f, err := os.Create(panoramaPath)
    if err != nil {
        return &bhomeclient.Reply{Msg: err.Error()}
    }
    defer f.Close()
    n, err := f.Write(file.Bytes)
    logger.Debug("write panorama file n:", n)
    if err != nil {
        return &bhomeclient.Reply{Msg: err.Error()}
    }
 
    return &bhomeclient.Reply{Success: true, Data: map[string]string{
        "panoramaPath": "/files/panorama.jpg",
    }}
}
 
// @Summary 获取同步场景数据
// @Description  获取同步场景数据
// @Produce json
// @Tags 获取同步场景数据
// @Param  reqBody body controllers.CameraGroupVo true ""
// @Success 200 {string} json "{"code":200, success:true, msg:"", data:""}"
// @Failure 500 {string} json "{"code":500, success:false, msg:"", data:""}"
// @Router /data/api-v/camera/group/getSyncSceneData [post]
func (cgc *CameraPolygonController) GetSyncSceneData(h *bhomeclient.WrapperHandler, c *bhomeclient.Request) *bhomeclient.Reply {
    sv := service.NewCameraPolygonService(h.Bk)
    data := sv.GetSyncSceneData()
    return &bhomeclient.Reply{Success: true, Msg: "获取成功", Data: data}
}