| | |
| | | sdk.loginAll(); |
| | | } |
| | | |
| | | @RequestMapping("/preview") |
| | | private String preview() { |
| | | return "preview"; |
| | | } |
| | | @RequestMapping("/index") |
| | | private String index() { |
| | | return "test"; |
| | | } |
| | | @RequestMapping("/media") |
| | | private String media() { |
| | | return "mediaMTX"; |
| | | } |
| | | |
| | | @GetMapping("/list") |
| | | public @ResponseBody |
| | | AjaxResult list(ArdCameras ardCamera) { |
| | |
| | | return AjaxResult.success("相机列表:", list); |
| | | } |
| | | |
| | | @ApiOperation("视频分辨率") |
| | | @PostMapping("/videoResolution") |
| | | @ApiOperationSupport(includeParameters = {"cmd.cameraId", "cmd.channelNum"}) |
| | | @Log(title = "视频分辨率", businessType = BusinessType.CONTROL) |
| | | @ApiOperation("获取码流压缩参数") |
| | | @PostMapping("/getVideoCompressionCfg") |
| | | @ApiOperationSupport(includeParameters = {"cmd.cameraId", "cmd.chanNo"}) |
| | | @Log(title = "获取码流压缩参数", businessType = BusinessType.CONTROL) |
| | | public @ResponseBody |
| | | AjaxResult getVideoResolution(@RequestBody CameraCmd cmd) { |
| | | String videoResolution = sdk.getVideoResolution(cmd); |
| | | return toAjaxString(videoResolution, "视频分辨率:"); |
| | | AjaxResult getVideoCompressionCfg(@RequestBody CameraCmd cmd) { |
| | | return AjaxResult.success(sdk.getVideoCompressionCfg(cmd)); |
| | | } |
| | | |
| | | @ApiOperation("在线状态") |
| | |
| | | public @ResponseBody |
| | | AjaxResult getOnlineState(@RequestBody CameraCmd cmd) { |
| | | cmd.setOperator(SecurityUtils.getUserId()); |
| | | return toAjax(sdk.isOnLine(cmd)); |
| | | boolean onLine = sdk.isOnLine(cmd); |
| | | return AjaxResult.success(onLine); |
| | | } |
| | | |
| | | @ApiOperation(value = "云台控制", notes = "Code:1-左上 2-上 3-右上 4-左 5-巡航 6-右 7-左下 8-下 9-右下 10-焦距变大 11-焦距变小\n" + |
| | | "12-焦点前调 13-焦点后调 14-光圈扩大 15-光圈缩小 16-雨刷开启") |
| | | @PostMapping("/PTZControlWithSpeed") |
| | | @ApiOperationSupport(includeParameters = {"cmd.cameraId", "cmd.channelNum", "cmd.speed", "cmd.enable", "cmd.code"}) |
| | | @ApiOperationSupport(includeParameters = {"cmd.cameraId", "cmd.chanNo", "cmd.speed", "cmd.enable", "cmd.code"}) |
| | | @Log(title = "云台控制", businessType = BusinessType.CONTROL) |
| | | public @ResponseBody |
| | | AjaxResult PTZControlWithSpeed(@RequestBody CameraCmd cmd) { |
| | |
| | | return toAjax(sdk.pTZControlWithSpeed(cmd)); |
| | | } |
| | | |
| | | |
| | | @ApiOperation("调用预置点") |
| | | @PostMapping("/gotoPreset") |
| | | @ApiOperationSupport(includeParameters = {"cmd.cameraId", "cmd.channelNum", "cmd.presetIndex"}) |
| | | @ApiOperationSupport(includeParameters = {"cmd.cameraId", "cmd.chanNo", "cmd.presetIndex"}) |
| | | @Log(title = "调用预置点", businessType = BusinessType.CONTROL) |
| | | public @ResponseBody |
| | | AjaxResult gotoPreset(@RequestBody CameraCmd cmd) { |
| | |
| | | |
| | | @ApiOperation("设置预置点") |
| | | @PostMapping("/setPreset") |
| | | @ApiOperationSupport(includeParameters = {"cmd.cameraId", "cmd.channelNum", "cmd.presetIndex"}) |
| | | @ApiOperationSupport(includeParameters = {"cmd.cameraId", "cmd.chanNo", "cmd.presetIndex"}) |
| | | @Log(title = "设置预置点", businessType = BusinessType.CONTROL) |
| | | public @ResponseBody |
| | | AjaxResult setPreset(@RequestBody CameraCmd cmd) { |
| | |
| | | |
| | | @ApiOperation("获取聚焦值") |
| | | @PostMapping("/getFocusPos") |
| | | @ApiOperationSupport(includeParameters = {"cmd.cameraId", "cmd.channelNum"}) |
| | | @ApiOperationSupport(includeParameters = {"cmd.cameraId", "cmd.chanNo"}) |
| | | @Log(title = "获取聚焦值", businessType = BusinessType.CONTROL) |
| | | public @ResponseBody |
| | | AjaxResult getFocusPos(@RequestBody CameraCmd cmd) { |
| | |
| | | |
| | | @ApiOperation("设置聚焦值") |
| | | @PostMapping("/setFocusPos") |
| | | @ApiOperationSupport(includeParameters = {"cmd.cameraId", "cmd.channelNum", "cmd.dwFocusPos"}) |
| | | @ApiOperationSupport(includeParameters = {"cmd.cameraId", "cmd.chanNo", "cmd.dwFocusPos"}) |
| | | @Log(title = "设置聚焦值", businessType = BusinessType.CONTROL) |
| | | public @ResponseBody |
| | | AjaxResult setFocusPos(@RequestBody CameraCmd cmd) { |
| | |
| | | |
| | | @ApiOperation("获取PTZ") |
| | | @PostMapping("/getPTZ") |
| | | @ApiOperationSupport(includeParameters = {"cmd.cameraId", "cmd.channelNum"}) |
| | | @ApiOperationSupport(includeParameters = {"cmd.cameraId", "cmd.chanNo"}) |
| | | @Log(title = "获取PTZ", businessType = BusinessType.CONTROL) |
| | | public @ResponseBody |
| | | AjaxResult GetPTZ(@RequestBody CameraCmd cmd) { |
| | | AjaxResult getPTZ(@RequestBody CameraCmd cmd) { |
| | | cmd.setOperator(SecurityUtils.getUserId()); |
| | | Map<String, Object> ptzMap = sdk.getPtz(cmd); |
| | | return AjaxResult.success("获取ptz", ptzMap); |
| | |
| | | @ApiOperation("获取PTZ范围") |
| | | @PostMapping("/getPTZScope") |
| | | @Log(title = "获取PTZ范围", businessType = BusinessType.CONTROL) |
| | | @ApiOperationSupport(includeParameters = {"cmd.cameraId", "cmd.channelNum"}) |
| | | @ApiOperationSupport(includeParameters = {"cmd.cameraId", "cmd.chanNo"}) |
| | | public @ResponseBody |
| | | AjaxResult GetPTZScope(@RequestBody CameraCmd cmd) { |
| | | AjaxResult getPTZScope(@RequestBody CameraCmd cmd) { |
| | | cmd.setOperator(SecurityUtils.getUserId()); |
| | | Map<String, Object> ptzMap = sdk.getPtzScope(cmd); |
| | | return AjaxResult.success("获取ptz范围", ptzMap); |
| | |
| | | @ApiOperation("设置PTZ") |
| | | @PostMapping("/setPTZ") |
| | | @Log(title = "设置PTZ", businessType = BusinessType.CONTROL) |
| | | @ApiOperationSupport(includeParameters = {"cmd.cameraId", "cmd.channelNum", "cmd.ptzMap"}) |
| | | @ApiOperationSupport(includeParameters = {"cmd.cameraId", "cmd.chanNo", "cmd.ptzMap"}) |
| | | public @ResponseBody |
| | | AjaxResult SetPTZ(@RequestBody CameraCmd cmd) { |
| | | AjaxResult setPTZ(@RequestBody CameraCmd cmd) { |
| | | cmd.setOperator(SecurityUtils.getUserId()); |
| | | return toAjax(sdk.setPtz(cmd)); |
| | | } |
| | |
| | | @ApiOperation("指向目标") |
| | | @PostMapping("/setTargetPosition") |
| | | @Log(title = "指向目标", businessType = BusinessType.CONTROL) |
| | | @ApiOperationSupport(includeParameters = {"cmd.cameraId", "cmd.channelNum", "cmd.targetPosition"}) |
| | | @ApiOperationSupport(includeParameters = {"cmd.cameraId", "cmd.chanNo", "cmd.targetPosition"}) |
| | | public @ResponseBody |
| | | AjaxResult setTargetPosition(@RequestBody CameraCmd cmd) { |
| | | cmd.setOperator(SecurityUtils.getUserId()); |
| | |
| | | @ApiOperation("设置零方位角") |
| | | @PostMapping("/setZeroPTZ") |
| | | @Log(title = "设置零方位角", businessType = BusinessType.CONTROL) |
| | | @ApiOperationSupport(includeParameters = {"cmd.cameraId", "cmd.channelNum"}) |
| | | @ApiOperationSupport(includeParameters = {"cmd.cameraId", "cmd.cmd.chanNo"}) |
| | | public @ResponseBody |
| | | AjaxResult SetZeroPTZ(@RequestBody CameraCmd cmd) { |
| | | AjaxResult setZeroPTZ(@RequestBody CameraCmd cmd) { |
| | | cmd.setOperator(SecurityUtils.getUserId()); |
| | | return toAjax(sdk.setZeroPtz(cmd)); |
| | | } |
| | |
| | | |
| | | @ApiOperation("获取云台锁定信息") |
| | | @PostMapping("/getPTZLockInfo") |
| | | @ApiOperationSupport(includeParameters = {"cmd.cameraId", "cmd.channelNum"}) |
| | | @ApiOperationSupport(includeParameters = {"cmd.cameraId", "cmd.chanNo"}) |
| | | @Log(title = "获取云台锁定信息", businessType = BusinessType.CONTROL) |
| | | public @ResponseBody |
| | | AjaxResult getPTZLockInfo(@RequestBody CameraCmd cmd) { |
| | |
| | | @ApiOperation("透雾开关") |
| | | @PostMapping("/defogcfg") |
| | | @Log(title = "透雾开关", businessType = BusinessType.CONTROL) |
| | | @ApiOperationSupport(includeParameters = {"cmd.cameraId", "cmd.channelNum", "cmd.enable"}) |
| | | @ApiOperationSupport(includeParameters = {"cmd.cameraId", "cmd.chanNo", "cmd.enable"}) |
| | | public @ResponseBody |
| | | AjaxResult defogcfg(@RequestBody CameraCmd cmd) { |
| | | cmd.setOperator(SecurityUtils.getUserId()); |
| | |
| | | @ApiOperation("红外开关") |
| | | @PostMapping("/infrarecfg") |
| | | @Log(title = "红外开关", businessType = BusinessType.CONTROL) |
| | | @ApiOperationSupport(includeParameters = {"cmd.cameraId", "cmd.channelNum", "cmd.enable"}) |
| | | @ApiOperationSupport(includeParameters = {"cmd.cameraId", "cmd.chanNo", "cmd.enable"}) |
| | | public @ResponseBody |
| | | AjaxResult infrarecfg(@RequestBody CameraCmd cmd) { |
| | | cmd.setOperator(SecurityUtils.getUserId()); |
| | |
| | | @ApiOperation(value = "手动/自动聚焦", notes = "true手动flase自动") |
| | | @PostMapping("/focusMode") |
| | | @Log(title = "手动/自动聚焦", businessType = BusinessType.CONTROL) |
| | | @ApiOperationSupport(includeParameters = {"cmd.cameraId", "cmd.channelNum", "cmd.enable"}) |
| | | @ApiOperationSupport(includeParameters = {"cmd.cameraId", "cmd.chanNo", "cmd.enable"}) |
| | | public @ResponseBody |
| | | AjaxResult enableFocusMode(@RequestBody CameraCmd cmd) { |
| | | cmd.setOperator(SecurityUtils.getUserId()); |
| | |
| | | @ApiOperation("云台加热") |
| | | @PostMapping("/heateRpwron") |
| | | @Log(title = "云台加热", businessType = BusinessType.CONTROL) |
| | | @ApiOperationSupport(includeParameters = {"cmd.cameraId", "cmd.channelNum", "cmd.enable"}) |
| | | @ApiOperationSupport(includeParameters = {"cmd.cameraId", "cmd.chanNo", "cmd.enable"}) |
| | | public @ResponseBody |
| | | AjaxResult HeateRpwron(@RequestBody CameraCmd cmd) { |
| | | AjaxResult heateRpwron(@RequestBody CameraCmd cmd) { |
| | | cmd.setOperator(SecurityUtils.getUserId()); |
| | | return toAjax(sdk.controlPTHeateRpwron(cmd)); |
| | | } |
| | |
| | | @ApiOperation("镜头加热") |
| | | @PostMapping("/cameraDeicing") |
| | | @Log(title = "镜头加热", businessType = BusinessType.CONTROL) |
| | | @ApiOperationSupport(includeParameters = {"cmd.cameraId", "cmd.channelNum", "cmd.enable"}) |
| | | @ApiOperationSupport(includeParameters = {"cmd.cameraId", "cmd.chanNo", "cmd.enable"}) |
| | | public @ResponseBody |
| | | AjaxResult CameraDeicing(@RequestBody CameraCmd cmd) { |
| | | AjaxResult cameraDeicing(@RequestBody CameraCmd cmd) { |
| | | cmd.setOperator(SecurityUtils.getUserId()); |
| | | return toAjax(sdk.controlCameraDeicing(cmd)); |
| | | } |
| | |
| | | @ApiOperation("相机抓图") |
| | | @PostMapping("/picCutCate") |
| | | @Log(title = "相机抓图", businessType = BusinessType.CONTROL) |
| | | @ApiOperationSupport(includeParameters = {"cmd.cameraId", "cmd.channelNum"}) |
| | | @ApiOperationSupport(includeParameters = {"cmd.cameraId", "cmd.chanNo"}) |
| | | public @ResponseBody |
| | | AjaxResult picCutCate(@RequestBody CameraCmd cmd) { |
| | | cmd.setOperator(SecurityUtils.getUserId()); |
| | |
| | | @ApiOperation("手动录像") |
| | | @PostMapping("/record") |
| | | @Log(title = "手动录像", businessType = BusinessType.CONTROL) |
| | | @ApiOperationSupport(includeParameters = {"cmd.cameraId", "cmd.channelNum", "cmd.enable"}) |
| | | @ApiOperationSupport(includeParameters = {"cmd.cameraId", "cmd.chanNo", "cmd.enable"}) |
| | | public @ResponseBody |
| | | AjaxResult record(@RequestBody CameraCmd cmd) { |
| | | cmd.setOperator(SecurityUtils.getUserId()); |
| | | String path = sdk.record(cmd); |
| | | return toAjaxString(path, "手动录像"); |
| | | } |
| | | |
| | | @ApiOperation("获取相机架设参数") |
| | | @PostMapping("/getCameraSetupCFG") |
| | | @Log(title = "获取相机架设参数", businessType = BusinessType.CONTROL) |
| | | @ApiOperationSupport(includeParameters = {"cmd.cameraId", "cmd.chanNo", "cmd.enable"}) |
| | | public @ResponseBody |
| | | AjaxResult getCameraSetupCFG(@RequestBody CameraCmd cmd) { |
| | | cmd.setOperator(SecurityUtils.getUserId()); |
| | | return AjaxResult.success(sdk.getGisInfo(cmd)); |
| | | } |
| | | } |