| | |
| | | @Log(title = "在线状态", businessType = BusinessType.CONTROL) |
| | | public @ResponseBody |
| | | AjaxResult getOnlineState(@RequestBody CameraCmd cmd) { |
| | | cmd.setOperator(SecurityUtils.getUserId()); |
| | | return toAjax(sdk.isOnLine(cmd)); |
| | | } |
| | | |
| | |
| | | @Log(title = "调用预置点", businessType = BusinessType.CONTROL) |
| | | public @ResponseBody |
| | | AjaxResult gotoPreset(@RequestBody CameraCmd cmd) { |
| | | cmd.setOperator(SecurityUtils.getUserId()); |
| | | return toAjax(sdk.gotoPreset(cmd)); |
| | | } |
| | | |
| | |
| | | @Log(title = "设置预置点", businessType = BusinessType.CONTROL) |
| | | public @ResponseBody |
| | | AjaxResult setPreset(@RequestBody CameraCmd cmd) { |
| | | cmd.setOperator(SecurityUtils.getUserId()); |
| | | return toAjax(sdk.setPreset(cmd)); |
| | | } |
| | | |
| | |
| | | @Log(title = "获取聚焦值", businessType = BusinessType.CONTROL) |
| | | public @ResponseBody |
| | | AjaxResult getFocusPos(@RequestBody CameraCmd cmd) { |
| | | cmd.setOperator(SecurityUtils.getUserId()); |
| | | Map<String, Object> Map = sdk.getFocusPos(cmd); |
| | | return AjaxResult.success("获取聚焦值", Map); |
| | | } |
| | |
| | | @Log(title = "设置聚焦值", businessType = BusinessType.CONTROL) |
| | | public @ResponseBody |
| | | AjaxResult setFocusPos(@RequestBody CameraCmd cmd) { |
| | | cmd.setOperator(SecurityUtils.getUserId()); |
| | | return toAjax(sdk.setFocusPos(cmd)); |
| | | } |
| | | |
| | |
| | | @Log(title = "获取PTZ", businessType = BusinessType.CONTROL) |
| | | public @ResponseBody |
| | | AjaxResult GetPTZ(@RequestBody CameraCmd cmd) { |
| | | cmd.setOperator(SecurityUtils.getUserId()); |
| | | Map<String, Object> ptzMap = sdk.getPtz(cmd); |
| | | return AjaxResult.success("获取ptz", ptzMap); |
| | | } |
| | |
| | | @ApiOperationSupport(includeParameters = {"cmd.cameraId", "cmd.channelNum"}) |
| | | public @ResponseBody |
| | | AjaxResult GetPTZScope(@RequestBody CameraCmd cmd) { |
| | | cmd.setOperator(SecurityUtils.getUserId()); |
| | | Map<String, Object> ptzMap = sdk.getPtzScope(cmd); |
| | | return AjaxResult.success("获取ptz范围", ptzMap); |
| | | } |
| | |
| | | @ApiOperationSupport(includeParameters = {"cmd.cameraId", "cmd.channelNum", "cmd.targetPosition"}) |
| | | public @ResponseBody |
| | | AjaxResult setTargetPosition(@RequestBody CameraCmd cmd) { |
| | | cmd.setOperator(SecurityUtils.getUserId()); |
| | | return toAjax(sdk.guideTargetPosition(cmd)); |
| | | } |
| | | |
| | |
| | | @ApiOperationSupport(includeParameters = {"cmd.cameraId", "cmd.channelNum"}) |
| | | public @ResponseBody |
| | | AjaxResult SetZeroPTZ(@RequestBody CameraCmd cmd) { |
| | | cmd.setOperator(SecurityUtils.getUserId()); |
| | | return toAjax(sdk.setZeroPtz(cmd)); |
| | | } |
| | | |
| | |
| | | @Log(title = "获取云台锁定信息", businessType = BusinessType.CONTROL) |
| | | public @ResponseBody |
| | | AjaxResult getPTZLockInfo(@RequestBody CameraCmd cmd) { |
| | | cmd.setOperator(SecurityUtils.getUserId()); |
| | | int byWorkMode = sdk.getPTZLockInfo(cmd); |
| | | if (byWorkMode == 0) { |
| | | return AjaxResult.success("云台锁定状态:解锁"); |
| | |
| | | @ApiOperationSupport(includeParameters = {"cmd.cameraId", "cmd.channelNum", "cmd.enable"}) |
| | | public @ResponseBody |
| | | AjaxResult defogcfg(@RequestBody CameraCmd cmd) { |
| | | cmd.setOperator(SecurityUtils.getUserId()); |
| | | return toAjax(sdk.controlDefogcfg(cmd)); |
| | | } |
| | | |
| | |
| | | @ApiOperationSupport(includeParameters = {"cmd.cameraId", "cmd.channelNum", "cmd.enable"}) |
| | | public @ResponseBody |
| | | AjaxResult infrarecfg(@RequestBody CameraCmd cmd) { |
| | | cmd.setOperator(SecurityUtils.getUserId()); |
| | | return toAjax(sdk.controlInfrarecfg(cmd)); |
| | | } |
| | | |
| | |
| | | @ApiOperationSupport(includeParameters = {"cmd.cameraId", "cmd.channelNum", "cmd.enable"}) |
| | | public @ResponseBody |
| | | AjaxResult enableFocusMode(@RequestBody CameraCmd cmd) { |
| | | cmd.setOperator(SecurityUtils.getUserId()); |
| | | return toAjax(sdk.controlFocusMode(cmd)); |
| | | } |
| | | |
| | |
| | | @PostMapping("/getFocusMode") |
| | | public @ResponseBody |
| | | AjaxResult getFocusMode(@RequestBody CameraCmd cmd) { |
| | | cmd.setOperator(SecurityUtils.getUserId()); |
| | | String focusMode = sdk.getFocusMode(cmd); |
| | | return AjaxResult.success(focusMode); |
| | | } |
| | |
| | | @ApiOperationSupport(includeParameters = {"cmd.cameraId", "cmd.channelNum", "cmd.enable"}) |
| | | public @ResponseBody |
| | | AjaxResult HeateRpwron(@RequestBody CameraCmd cmd) { |
| | | cmd.setOperator(SecurityUtils.getUserId()); |
| | | return toAjax(sdk.controlPTHeateRpwron(cmd)); |
| | | } |
| | | |
| | |
| | | @ApiOperationSupport(includeParameters = {"cmd.cameraId", "cmd.channelNum", "cmd.enable"}) |
| | | public @ResponseBody |
| | | AjaxResult CameraDeicing(@RequestBody CameraCmd cmd) { |
| | | cmd.setOperator(SecurityUtils.getUserId()); |
| | | return toAjax(sdk.controlCameraDeicing(cmd)); |
| | | } |
| | | |
| | | @PostMapping("/captureJPEGPicture") |
| | | public @ResponseBody |
| | | AjaxResult captureJPEGPicture(@RequestBody CameraCmd cmd) { |
| | | cmd.setOperator(SecurityUtils.getUserId()); |
| | | String base64Str = sdk.captureJPEGPicture(cmd); |
| | | return toAjaxString(base64Str, "相机抓图"); |
| | | } |
| | |
| | | @ApiOperationSupport(includeParameters = {"cmd.cameraId", "cmd.channelNum"}) |
| | | public @ResponseBody |
| | | AjaxResult picCutCate(@RequestBody CameraCmd cmd) { |
| | | cmd.setOperator(SecurityUtils.getUserId()); |
| | | String path = sdk.picCutCate(cmd); |
| | | return toAjaxString(path, "相机抓图"); |
| | | } |
| | |
| | | @ApiOperationSupport(includeParameters = {"cmd.cameraId", "cmd.channelNum", "cmd.enable"}) |
| | | public @ResponseBody |
| | | AjaxResult record(@RequestBody CameraCmd cmd) { |
| | | cmd.setOperator(SecurityUtils.getUserId()); |
| | | String path = sdk.record(cmd); |
| | | return toAjaxString(path, "手动录像"); |
| | | } |