| | |
| | | * @Date: 2023年01月17日 12:04 |
| | | * @Version: 1.0 |
| | | **/ |
| | | @Api(tags = "海康SDK接口") |
| | | @Controller |
| | | @RequestMapping("/hik") |
| | | @Anonymous |
| | |
| | | private String preview() { |
| | | return "preview"; |
| | | } |
| | | |
| | | @RequestMapping("/index") |
| | | private String index() { |
| | | return "test"; |
| | |
| | | public @ResponseBody |
| | | AjaxResult getFocusPos(@RequestBody CameraCmd cmd) { |
| | | cmd.setOperator(SecurityUtils.getUserId()); |
| | | Map<String, Object> Map = sdk.getFocusPos(cmd); |
| | | return AjaxResult.success("获取聚焦值", Map); |
| | | int focus = sdk.getFocusPos(cmd); |
| | | return AjaxResult.success("获取聚焦值", focus); |
| | | } |
| | | |
| | | @ApiOperation("设置聚焦值") |
| | |
| | | return toAjax(sdk.setZeroPtz(cmd)); |
| | | } |
| | | |
| | | @ApiOperation("设置锁定") |
| | | @PostMapping("/setPTZLock") |
| | | @ApiOperationSupport(includeParameters = {"cmd.cameraId", "cmd.expired"}) |
| | | @Log(title = "设置锁定", businessType = BusinessType.CONTROL) |
| | | public @ResponseBody |
| | | AjaxResult setPTZLock(@RequestBody CameraCmd cmd) { |
| | | cmd.setOperator(SecurityUtils.getUserId()); |
| | | return AjaxResult.success(sdk.controlLock(cmd)); |
| | | } |
| | | |
| | | @ApiOperation("设置解锁") |
| | | @PostMapping("/setPTZUnLock") |
| | | @ApiOperationSupport(includeParameters = {"cmd.cameraId"}) |
| | | @Log(title = "设置解锁", businessType = BusinessType.CONTROL) |
| | | public @ResponseBody |
| | | AjaxResult setPTZUnLock(@RequestBody CameraCmd cmd) { |
| | | cmd.setOperator(SecurityUtils.getUserId()); |
| | | return AjaxResult.success(sdk.controlUnLock(cmd)); |
| | | } |
| | | |
| | | @ApiOperation("获取云台锁定信息") |
| | | @PostMapping("/getPTZLockInfo") |