| | |
| | | package com.ruoyi.utils.sdk.hiksdk.controller;
|
| | |
|
| | | import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
| | | import com.ruoyi.alarmpoints.well.service.IArdAlarmpointsWellService;
|
| | | import com.ruoyi.common.annotation.Log;
|
| | | import com.ruoyi.common.core.controller.BaseController;
|
| | | import com.ruoyi.common.enums.BusinessType;
|
| | |
| | | private HikvisionSDK sdk;
|
| | | @Resource
|
| | | private IArdCamerasService ardCamerasService;
|
| | | @Resource
|
| | | private IArdAlarmpointsWellService ardAlarmpointsWellService;
|
| | |
|
| | |
|
| | | @RequestMapping("/preview")
|
| | |
| | | cmd.setOperator(SecurityUtils.getUserId());
|
| | | return AjaxResult.success(sdk.getGisInfo(cmd));
|
| | | }
|
| | |
|
| | | @PostMapping("/getCameraVideoLable")
|
| | | public @ResponseBody
|
| | | AjaxResult getCameraVideoLable(@RequestBody CameraCmd cmd) {
|
| | | cmd.setOperator(SecurityUtils.getUserId());
|
| | | Map<String, Object> map = sdk.getGisInfo(cmd);
|
| | | Map<String, Object> data = (Map<String, Object>) map.get("data");
|
| | | Double p = (Double) data.get("p");
|
| | | Double t = (Double) data.get("t");
|
| | | Double z = (Double) data.get("z");
|
| | | Double fHorFieldAngle = (Double) data.get("fHorFieldAngle");// 水平视场角
|
| | | Double fVerFieldAngle = (Double) data.get("fVerFieldAngle");// 垂直视场角
|
| | | if(z <= 5.0){
|
| | | return AjaxResult.error("变焦小于5");
|
| | | }
|
| | | if(t > 359.0){
|
| | | return AjaxResult.error("俯仰角过小");
|
| | | }
|
| | | List<Map<String,Object>> result = ardAlarmpointsWellService.getCameraVideoLable(SecurityUtils.getDeptId(),cmd.getCameraId(),p,t,fHorFieldAngle,fVerFieldAngle);
|
| | | return AjaxResult.success(result);
|
| | | }
|
| | | }
|