| | |
| | | } |
| | | |
| | | public List findOptions(ArdCameras ardCameras) { |
| | | List<ArdCameras> options = ardCamerasMapper.findOptions(ardCameras); |
| | | //List<ArdCameras> options = ardCamerasMapper.findOptions(ardCameras); |
| | | List<Long> subDeptIdList = sysDeptMapper.selectDeptIdBySub(SecurityUtils.getDeptId());//下属及本权限 |
| | | List<Long> ownDeptIdList= sysDeptMapper.selectRoleDeptIdByUsersId(SecurityUtils.getUserId());//自定义权限 |
| | | HashSet<Long> deptIdSet = new HashSet();//去重 |
| | | deptIdSet.addAll(subDeptIdList); |
| | | deptIdSet.addAll(ownDeptIdList); |
| | | List<Long> deptIdList = new ArrayList(); |
| | | deptIdList.addAll(deptIdSet);//符合条件的全部权限 |
| | | List<ArdCameras> options = ardCamerasMapper.findTowerCamerasBySubAndOwnDeptIds(deptIdList); |
| | | for (ArdCameras camera : |
| | | options) { |
| | | ArdChannel ardChannel = new ArdChannel(); |
| | |
| | | childMap.put("name", childDept.getDeptName()); |
| | | childMap.put("deptId", childDept.getDeptId()); |
| | | childMap.put("disabled", disabled); |
| | | Map<String, Object> map1 = fetchChildDepartments(childDept, disabled); |
| | | //Map<String, Object> map1 = fetchChildDepartments(childDept, disabled); |
| | | Map<String, Object> map1 = fetchChildDepartments(ownDeptIdList,childDept, disabled); |
| | | childMap.putAll(map1); |
| | | childList.add(childMap); |
| | | } |