| | |
| | | public @ResponseBody
|
| | | AjaxResult gotoPreset(@RequestBody CameraCmd cmd) {
|
| | | cmd.setOperator(SecurityUtils.getUserId());
|
| | | return toAjax(cameraSdkService.gotoPreset(cmd));
|
| | | return cameraSdkService.gotoPreset(cmd);
|
| | | }
|
| | |
|
| | | @ApiOperation("设置预置点")
|
| | |
| | | public @ResponseBody
|
| | | AjaxResult setPreset(@RequestBody CameraCmd cmd) {
|
| | | cmd.setOperator(SecurityUtils.getUserId());
|
| | | return toAjax(cameraSdkService.setPreset(cmd));
|
| | | return cameraSdkService.setPreset(cmd);
|
| | | }
|
| | |
|
| | | @ApiOperation("获取聚焦值")
|
| | |
| | | public @ResponseBody
|
| | | AjaxResult getFocusPos(@RequestBody CameraCmd cmd) {
|
| | | cmd.setOperator(SecurityUtils.getUserId());
|
| | | int focus = cameraSdkService.getFocusPos(cmd);
|
| | | return AjaxResult.success("获取聚焦值", focus);
|
| | | return cameraSdkService.getFocusPos(cmd);
|
| | | }
|
| | |
|
| | | @ApiOperation("设置聚焦值")
|
| | |
| | | public @ResponseBody
|
| | | AjaxResult setFocusPos(@RequestBody CameraCmd cmd) {
|
| | | cmd.setOperator(SecurityUtils.getUserId());
|
| | | return toAjax(cameraSdkService.setFocusPos(cmd));
|
| | | return cameraSdkService.setFocusPos(cmd);
|
| | | }
|
| | |
|
| | | @ApiOperation("获取PTZ")
|
| | |
| | | public @ResponseBody
|
| | | AjaxResult getPTZ(@RequestBody CameraCmd cmd) {
|
| | | cmd.setOperator(SecurityUtils.getUserId());
|
| | | Map<String, Object> ptzMap = cameraSdkService.getPtz(cmd);
|
| | | return AjaxResult.success("获取ptz", ptzMap);
|
| | | return cameraSdkService.getPtz(cmd);
|
| | | }
|
| | |
|
| | | @ApiOperation("获取PTZ范围")
|
| | |
| | | public @ResponseBody
|
| | | AjaxResult getPTZScope(@RequestBody CameraCmd cmd) {
|
| | | cmd.setOperator(SecurityUtils.getUserId());
|
| | | Map<String, Object> ptzMap = cameraSdkService.getPtzScope(cmd);
|
| | | return AjaxResult.success("获取ptz范围", ptzMap);
|
| | | return cameraSdkService.getPtzScope(cmd);
|
| | | }
|
| | |
|
| | | @ApiOperation("设置PTZ")
|
| | |
| | | List<ArdCameraNoGuideZone> ardCameraNoGuideZones = ardCameraNoGuideZoneService.selectArdCameraNoGuideZoneList(ardCameraNoGuideZone);
|
| | | if (ardCameraNoGuideZones.size() > 0) {
|
| | | //获取到当前相机的坐标集合
|
| | | for(ArdCameraNoGuideZone zone:ardCameraNoGuideZones) {
|
| | | for (ArdCameraNoGuideZone zone : ardCameraNoGuideZones) {
|
| | | String[] parts = zone.getPoi().split(",");
|
| | | List<Point> pointList = new ArrayList<>();
|
| | | for (int i = 0; i < parts.length; i += 3) {
|
| | |
| | | Point targetPoint = new Point(lon, lat);
|
| | | //判断引导目标是否在坐标集合组成的多边形内
|
| | | boolean inPolygon = GisUtil.isInPolygon(targetPoint, pointList);
|
| | | if(inPolygon)
|
| | | {
|
| | | if (inPolygon) {
|
| | | return AjaxResult.error("引导坐标位于禁引可视域内");
|
| | | }
|
| | | }
|
| | | }
|
| | | return toAjax(cameraSdkService.guideTargetPosition(cmd));
|
| | | return cameraSdkService.guideTargetPosition(cmd);
|
| | | }
|
| | |
|
| | | @ApiOperation("指向目标井")
|
| | |
| | | public @ResponseBody
|
| | | AjaxResult setZeroPTZ(@RequestBody CameraCmd cmd) {
|
| | | cmd.setOperator(SecurityUtils.getUserId());
|
| | | return toAjax(cameraSdkService.setZeroPtz(cmd));
|
| | | return cameraSdkService.setZeroPtz(cmd);
|
| | | }
|
| | |
|
| | | @ApiOperation("设置锁定")
|
| | |
| | | public @ResponseBody
|
| | | AjaxResult setPTZLock(@RequestBody CameraCmd cmd) {
|
| | | cmd.setOperator(SecurityUtils.getUserId());
|
| | | return AjaxResult.success(cameraSdkService.controlLock(cmd));
|
| | | return cameraSdkService.controlLock(cmd);
|
| | | }
|
| | |
|
| | | @ApiOperation("设置解锁")
|
| | |
| | | public @ResponseBody
|
| | | AjaxResult setPTZUnLock(@RequestBody CameraCmd cmd) {
|
| | | cmd.setOperator(SecurityUtils.getUserId());
|
| | | return AjaxResult.success(cameraSdkService.controlUnLock(cmd));
|
| | | return cameraSdkService.controlUnLock(cmd);
|
| | | }
|
| | |
|
| | | @ApiOperation("获取云台锁定信息")
|
| | |
| | | public @ResponseBody
|
| | | AjaxResult getPTZLockInfo(@RequestBody CameraCmd cmd) {
|
| | | cmd.setOperator(SecurityUtils.getUserId());
|
| | | int byWorkMode = cameraSdkService.getPTZLockInfo(cmd);
|
| | | AjaxResult ajaxResult = cameraSdkService.getPTZLockInfo(cmd);
|
| | | Integer byWorkMode = (Integer) ajaxResult.get("msg");
|
| | | if (byWorkMode == 0) {
|
| | | return AjaxResult.success("云台锁定状态:解锁");
|
| | | } else if (byWorkMode == 1) {
|
| | |
| | | public @ResponseBody
|
| | | AjaxResult defogcfg(@RequestBody CameraCmd cmd) {
|
| | | cmd.setOperator(SecurityUtils.getUserId());
|
| | | return toAjax(cameraSdkService.controlDefogcfg(cmd));
|
| | | return cameraSdkService.controlDefogcfg(cmd);
|
| | | }
|
| | |
|
| | | @ApiOperation("红外开关")
|
| | |
| | | public @ResponseBody
|
| | | AjaxResult infrarecfg(@RequestBody CameraCmd cmd) {
|
| | | cmd.setOperator(SecurityUtils.getUserId());
|
| | | return toAjax(cameraSdkService.controlInfrarecfg(cmd));
|
| | | return cameraSdkService.controlInfrarecfg(cmd);
|
| | | }
|
| | |
|
| | | @ApiOperation(value = "手动/自动聚焦", notes = "true手动flase自动")
|
| | |
| | | public @ResponseBody
|
| | | AjaxResult enableFocusMode(@RequestBody CameraCmd cmd) {
|
| | | cmd.setOperator(SecurityUtils.getUserId());
|
| | | return toAjax(cameraSdkService.controlFocusMode(cmd));
|
| | | return cameraSdkService.controlFocusMode(cmd);
|
| | | }
|
| | |
|
| | | @ApiOperation(value = "获取聚焦模式", notes = "1手动2自动")
|
| | |
| | | public @ResponseBody
|
| | | AjaxResult getFocusMode(@RequestBody CameraCmd cmd) {
|
| | | cmd.setOperator(SecurityUtils.getUserId());
|
| | | String focusMode = cameraSdkService.getFocusMode(cmd);
|
| | | return AjaxResult.success(focusMode);
|
| | | return cameraSdkService.getFocusMode(cmd);
|
| | | }
|
| | |
|
| | | @ApiOperation("云台加热")
|
| | |
| | | public @ResponseBody
|
| | | AjaxResult heateRpwron(@RequestBody CameraCmd cmd) {
|
| | | cmd.setOperator(SecurityUtils.getUserId());
|
| | | return toAjax(cameraSdkService.controlPTHeateRpwron(cmd));
|
| | | return cameraSdkService.controlPTHeateRpwron(cmd);
|
| | | }
|
| | |
|
| | |
|
| | |
| | | public @ResponseBody
|
| | | AjaxResult cameraDeicing(@RequestBody CameraCmd cmd) {
|
| | | cmd.setOperator(SecurityUtils.getUserId());
|
| | | return toAjax(cameraSdkService.controlCameraDeicing(cmd));
|
| | | return cameraSdkService.controlCameraDeicing(cmd);
|
| | | }
|
| | |
|
| | | @ApiOperation("相机抓图")
|
| | |
| | | public @ResponseBody
|
| | | AjaxResult getGisInfo(@RequestBody CameraCmd cmd) {
|
| | | cmd.setOperator(SecurityUtils.getUserId());
|
| | | return AjaxResult.success(cameraSdkService.getGisInfo(cmd));
|
| | | return cameraSdkService.getGisInfo(cmd);
|
| | | }
|
| | |
|
| | | @ApiOperation("录像")
|