| | |
| | | QueryFilter queryFilter = new QueryFilter(); |
| | | // 普通管理员,只能查询所属部门及子部门的数据 |
| | | User user = UserContext.getUser(); |
| | | if (!user.isSuperAdmin()) { |
| | | /* if (!user.isSuperAdmin()) { |
| | | queryFilter.addParam("deptIds", this.getWithDescendantIds(user.getDeptId())); |
| | | } |
| | | }*/ |
| | | // 查询公司下部门列表 |
| | | queryFilter.addParam("isCompany", Constant.Bool.NO); |
| | | queryFilter.addParam("companyId", companyId); |
| | |
| | | if (dept.isCompany()) { |
| | | dept.setCompanyId(dept.getId()); |
| | | } |
| | | |
| | | dept.setTenantId(1L); |
| | | super.insert(dept); |
| | | |
| | | // 更新数据范围表 |
| | |
| | | } |
| | | return result; |
| | | } |
| | | |
| | | public List<SysDept> getDeptList3() { |
| | | return baseDao.getDeptList3(); |
| | | } |
| | | } |