| | |
| | | import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
| | | import com.ruoyi.alarmpoints.well.domain.ArdAlarmpointsWell;
|
| | | import com.ruoyi.common.constant.CameraConstants;
|
| | | import com.ruoyi.common.utils.SecurityUtils;
|
| | | import com.ruoyi.device.camera.domain.ArdCameras;
|
| | | import com.ruoyi.device.camera.domain.CameraCmd;
|
| | | import com.ruoyi.device.camera.domain.DeptAndCamerasDto;
|
| | | import com.ruoyi.device.camera.service.IArdCamerasService;
|
| | | import com.ruoyi.device.camera.service.ICameraSdkService;
|
| | | import com.ruoyi.common.utils.poi.ExcelUtil;
|
| | |
| | | @ApiOperation("选择相机数据")
|
| | | public List options(ArdCameras ardCameras) {
|
| | | List<ArdCameras> list = ardCamerasService.findOptions(ardCameras);
|
| | | System.out.println("list:"+list.size());
|
| | | //System.out.println("list:"+list.size());
|
| | | List options = new ArrayList();
|
| | | for (ArdCameras item : list) {
|
| | | Map option = new HashMap();
|
| | |
| | | Map deptAndCamera = ardCamerasService.getChildDeptAndCamera(true);
|
| | | return AjaxResult.success(deptAndCamera);
|
| | | }
|
| | |
|
| | | @GetMapping("/getDeptAndCameraByRole")
|
| | | @ApiOperation("获取部门和相机按角色")
|
| | | public AjaxResult getDeptAndCameraByRole() {
|
| | | List<DeptAndCamerasDto> deptAndCamera = ardCamerasService.getChildDeptAndCamera();
|
| | | return AjaxResult.success(deptAndCamera);
|
| | | }
|
| | | @GetMapping("/getDeptAndCameraWithCheckBox")
|
| | | @ApiOperation("获取部门和相机(开启复选框)")
|
| | | public AjaxResult getDeptAndCameraWithCheckBox() {
|
| | |
| | | TreeMap nearCamerasBycoordinate = ardCamerasService.getNearCamerasBycoordinate(cmd);
|
| | | return AjaxResult.success(nearCamerasBycoordinate);
|
| | | }
|
| | |
|
| | | @GetMapping("/getCamerasByDeptId")
|
| | | @ApiOperation("获取权限及下属权限下的相机")
|
| | | public AjaxResult getCamerasByDeptId() {
|
| | | Long deptId = SecurityUtils.getDeptId();
|
| | | String userId = SecurityUtils.getUserId();
|
| | | List<Map<String,Object>> camerasList = ardCamerasService.getCamerasByDeptId(deptId,userId);
|
| | | return AjaxResult.success(camerasList);
|
| | | }
|
| | |
|
| | | @PostMapping("/getCameraOperationByCameraId")
|
| | | @ApiOperation("查看相机可否操控")
|
| | | public AjaxResult getCameraOperationByCameraId(@RequestBody Map<String,String> map) {
|
| | | String userId = SecurityUtils.getUserId();
|
| | | Boolean flag = ardCamerasService.getCameraOperationByCameraId(map.get("id"),userId);
|
| | | return AjaxResult.success(flag);
|
| | | }
|
| | |
|
| | | @PostMapping("/getChannelByCameraId")
|
| | | @ApiOperation("获取相机通道")
|
| | | public AjaxResult getChannelByCameraId(@RequestBody Map<String,String> map) {
|
| | | Map<String,Object> result = ardCamerasService.getChannelByCameraId(map.get("id"));
|
| | | return AjaxResult.success(result);
|
| | | }
|
| | | }
|