财务确认单增加所属组织过滤
This commit is contained in:
parent
05914e452a
commit
e8e869efd3
|
@ -61,8 +61,13 @@ public class InContractFinaceConfirmeListPlugin extends AbstractListPlugin imple
|
|||
@Override
|
||||
public void filterContainerBeforeF7Select(BeforeFilterF7SelectEvent args) {
|
||||
super.filterContainerBeforeF7Select(args);
|
||||
long userId = Long.parseLong(RequestContext.get().getUserId());
|
||||
boolean superUser = PermissionServiceHelper.isSuperUser(userId); //判断是否为全功能用户
|
||||
boolean adminUser = PermissionServiceHelper.isAdminUser(userId); //判断是否管理员用户
|
||||
if(!superUser && !adminUser){
|
||||
//获取当前人员有权限的组织
|
||||
HasPermOrgResult userHasPermOrgs = PermissionServiceHelper.getUserHasPermOrgs(Long.parseLong(RequestContext.get().getUserId()));
|
||||
//HasPermOrgResult userHasPermOrgs = PermissionServiceHelper.getUserHasPermOrgs(userId);
|
||||
HasPermOrgResult userHasPermOrgs = PermissionServiceHelper.getUserHasPermOrgs(userId,true);
|
||||
//有权的组织
|
||||
List<Long> hasPermOrgs = userHasPermOrgs.getHasPermOrgs();
|
||||
String fieldName = args.getFieldName();
|
||||
|
@ -70,6 +75,7 @@ public class InContractFinaceConfirmeListPlugin extends AbstractListPlugin imple
|
|||
args.getQfilters().add(new QFilter("id", QCP.in, hasPermOrgs));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
|
|
|
@ -72,6 +72,10 @@ public class OutContractFinaceConfirmeListPlugin extends AbstractListPlugin impl
|
|||
@Override
|
||||
public void filterContainerBeforeF7Select(BeforeFilterF7SelectEvent args) {
|
||||
super.filterContainerBeforeF7Select(args);
|
||||
long userId = Long.parseLong(RequestContext.get().getUserId());
|
||||
boolean superUser = PermissionServiceHelper.isSuperUser(userId); //判断是否为全功能用户
|
||||
boolean adminUser = PermissionServiceHelper.isAdminUser(userId); //判断是否管理员用户
|
||||
if(!superUser && !adminUser) {
|
||||
//获取当前人员有权限的组织
|
||||
HasPermOrgResult userHasPermOrgs = PermissionServiceHelper.getUserHasPermOrgs(Long.parseLong(RequestContext.get().getUserId()));
|
||||
//有权的组织
|
||||
|
@ -81,6 +85,7 @@ public class OutContractFinaceConfirmeListPlugin extends AbstractListPlugin impl
|
|||
args.getQfilters().add(new QFilter("id", QCP.in, hasPermOrgs));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in New Issue