mirror of https://gitee.com/stylefeng/roses
【8.0】【sys】更新通用机构树的数据范围筛选
parent
3ee655a874
commit
f2ace559d4
|
@ -19,6 +19,7 @@ import cn.stylefeng.roses.kernel.rule.exception.base.ServiceException;
|
|||
import cn.stylefeng.roses.kernel.rule.tree.factory.DefaultTreeBuildFactory;
|
||||
import cn.stylefeng.roses.kernel.sys.api.callback.RemoveOrgCallbackApi;
|
||||
import cn.stylefeng.roses.kernel.sys.api.constants.SysConstants;
|
||||
import cn.stylefeng.roses.kernel.sys.api.context.DataScopeContext;
|
||||
import cn.stylefeng.roses.kernel.sys.api.enums.org.DetectModeEnum;
|
||||
import cn.stylefeng.roses.kernel.sys.api.enums.org.OrgTypeEnum;
|
||||
import cn.stylefeng.roses.kernel.sys.api.exception.enums.OrgExceptionEnum;
|
||||
|
@ -592,6 +593,12 @@ public class HrOrganizationServiceImpl extends ServiceImpl<HrOrganizationMapper,
|
|||
queryWrapper.eq(HrOrganization::getOrgType, OrgTypeEnum.COMPANY.getCode());
|
||||
}
|
||||
|
||||
// 更新数据范围的筛选条件
|
||||
Set<Long> dataScope = DataScopeContext.me().currentUserOrgScopeList();
|
||||
if (ObjectUtil.isNotEmpty(dataScope)) {
|
||||
queryWrapper.in(HrOrganization::getOrgId, dataScope);
|
||||
}
|
||||
|
||||
return queryWrapper;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue