12-11-权限修改,排除SuperAdmin
This commit is contained in:
@ -74,17 +74,19 @@ public class XzdProjectManagerApprovalServiceImpl extends ServiceImpl<XzdProject
|
|||||||
@Override
|
@Override
|
||||||
public TableDataInfo<XzdProjectManagerApprovalVo> queryPageList(XzdProjectManagerApprovalBo bo, PageQuery pageQuery) {
|
public TableDataInfo<XzdProjectManagerApprovalVo> queryPageList(XzdProjectManagerApprovalBo bo, PageQuery pageQuery) {
|
||||||
// 获取当前用户部门
|
// 获取当前用户部门
|
||||||
Long deptId = LoginHelper.getDeptId();
|
if (!LoginHelper.isSuperAdmin()) {
|
||||||
SysDeptVo deptVo = iSysDeptService.selectDeptById(deptId);
|
Long deptId = LoginHelper.getDeptId();
|
||||||
if (LoginHelper.isSuperAdmin()) {
|
SysDeptVo deptVo = iSysDeptService.selectDeptById(deptId);
|
||||||
bo.setSsgs(deptVo.getDeptId());
|
if (LoginHelper.isSuperAdmin()) {
|
||||||
}else {
|
|
||||||
String ancestors = deptVo.getAncestors();
|
|
||||||
List<Long> ids = StringUtils.splitTo(ancestors, Convert::toLong);
|
|
||||||
if (ids.size() == 2) {
|
|
||||||
bo.setSsgs(deptVo.getDeptId());
|
bo.setSsgs(deptVo.getDeptId());
|
||||||
}else {
|
} else {
|
||||||
bo.setSsgs(iSysDeptService.selectDeptById(ids.get(2)).getDeptId());
|
String ancestors = deptVo.getAncestors();
|
||||||
|
List<Long> ids = StringUtils.splitTo(ancestors, Convert::toLong);
|
||||||
|
if (ids.size() == 2) {
|
||||||
|
bo.setSsgs(deptVo.getDeptId());
|
||||||
|
} else {
|
||||||
|
bo.setSsgs(iSysDeptService.selectDeptById(ids.get(2)).getDeptId());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
LambdaQueryWrapper<XzdProjectManagerApproval> lqw = buildQueryWrapper(bo);
|
LambdaQueryWrapper<XzdProjectManagerApproval> lqw = buildQueryWrapper(bo);
|
||||||
|
|||||||
@ -115,17 +115,19 @@ public class XzdProjectServiceImpl extends ServiceImpl<XzdProjectMapper, XzdProj
|
|||||||
bo.setPageSize(10);
|
bo.setPageSize(10);
|
||||||
}
|
}
|
||||||
// 获取当前用户部门
|
// 获取当前用户部门
|
||||||
Long deptId = LoginHelper.getDeptId();
|
if (!LoginHelper.isSuperAdmin()) {
|
||||||
SysDeptVo deptVo = iSysDeptService.selectDeptById(deptId);
|
Long deptId = LoginHelper.getDeptId();
|
||||||
if (LoginHelper.isSuperAdmin()) {
|
SysDeptVo deptVo = iSysDeptService.selectDeptById(deptId);
|
||||||
bo.setSsgs(deptVo.getDeptId());
|
if (LoginHelper.isSuperAdmin()) {
|
||||||
} else {
|
|
||||||
String ancestors = deptVo.getAncestors();
|
|
||||||
List<Long> ids = StringUtils.splitTo(ancestors, Convert::toLong);
|
|
||||||
if (ids.size() == 2) {
|
|
||||||
bo.setSsgs(deptVo.getDeptId());
|
bo.setSsgs(deptVo.getDeptId());
|
||||||
} else {
|
} else {
|
||||||
bo.setSsgs(iSysDeptService.selectDeptById(ids.get(2)).getDeptId());
|
String ancestors = deptVo.getAncestors();
|
||||||
|
List<Long> ids = StringUtils.splitTo(ancestors, Convert::toLong);
|
||||||
|
if (ids.size() == 2) {
|
||||||
|
bo.setSsgs(deptVo.getDeptId());
|
||||||
|
} else {
|
||||||
|
bo.setSsgs(iSysDeptService.selectDeptById(ids.get(2)).getDeptId());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -136,17 +136,19 @@ public class XzdSupplierInfoServiceImpl extends ServiceImpl<XzdSupplierInfoMappe
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 获取当前用户部门
|
// 获取当前用户部门
|
||||||
Long deptId = LoginHelper.getDeptId();
|
if (!LoginHelper.isSuperAdmin()) {
|
||||||
SysDeptVo deptVo = iSysDeptService.selectDeptById(deptId);
|
Long deptId = LoginHelper.getDeptId();
|
||||||
if (LoginHelper.isSuperAdmin()) {
|
SysDeptVo deptVo = iSysDeptService.selectDeptById(deptId);
|
||||||
bo.setSsgs(deptVo.getDeptId());
|
if (LoginHelper.isSuperAdmin()) {
|
||||||
}else {
|
|
||||||
String ancestors = deptVo.getAncestors();
|
|
||||||
List<Long> ids = StringUtils.splitTo(ancestors, Convert::toLong);
|
|
||||||
if (ids.size() == 2) {
|
|
||||||
bo.setSsgs(deptVo.getDeptId());
|
bo.setSsgs(deptVo.getDeptId());
|
||||||
}else {
|
} else {
|
||||||
bo.setSsgs(iSysDeptService.selectDeptById(ids.get(2)).getDeptId());
|
String ancestors = deptVo.getAncestors();
|
||||||
|
List<Long> ids = StringUtils.splitTo(ancestors, Convert::toLong);
|
||||||
|
if (ids.size() == 2) {
|
||||||
|
bo.setSsgs(deptVo.getDeptId());
|
||||||
|
} else {
|
||||||
|
bo.setSsgs(iSysDeptService.selectDeptById(ids.get(2)).getDeptId());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user