新增角色“集团管理标准查询角色”,可以企标全查看

This commit is contained in:
Xia Zekun
2024-04-09 17:07:15 +08:00
committed by fengchenchen
parent f58f45c6e0
commit 7d68cae2a6
2 changed files with 15 additions and 1 deletions
@@ -82,6 +82,9 @@ public class EnterpriseStandardAuthUserServiceImpl extends ServiceImpl<Enterpris
@Value("#{'${adminRoleCode}'.split(',')}")
private List<String> adminRoleCodeList;
@Value("#{'${enterpriseDetailRoleCode}'.split(',')}")
private List<String> enterpriseDetailRoleCodeList;
@Resource
private ILawsEnterpriseStandardService esService;
@@ -155,7 +158,11 @@ public class EnterpriseStandardAuthUserServiceImpl extends ServiceImpl<Enterpris
records.forEach(kv -> kv.put(FieldCommon.DETAIL_FLAG, true));
return;
}
// 能够查看所有企标详情的权限
if (roleList != null && roleList.stream().anyMatch(enterpriseDetailRoleCodeList::contains)) {
records.forEach(kv -> kv.put(FieldCommon.DETAIL_FLAG, true));
return;
}
List<DepartIdModel> departIdModels = sysUserDepartService.queryDepartIdsOfUser(userId);
List<String> departIds = departIdModels.stream().map(DepartIdModel::getKey).collect(Collectors.toList());
List<String> departNames = departIdModels.stream().map(DepartIdModel::getTitle).collect(Collectors.toList());
@@ -585,6 +592,10 @@ public class EnterpriseStandardAuthUserServiceImpl extends ServiceImpl<Enterpris
if (roleList != null && roleList.stream().anyMatch(adminRoleCodeList::contains)) {
return true;
}
// 能够查看所有企标详情的权限
if (roleList != null && roleList.stream().anyMatch(enterpriseDetailRoleCodeList::contains)) {
return true;
}
List<DepartIdModel> departIdModels = sysUserDepartService.queryDepartIdsOfUser(userId);
List<String> departIds = departIdModels.stream().map(DepartIdModel::getKey).collect(Collectors.toList());
@@ -457,6 +457,9 @@ draftDepartName: 起草部门
# 管理员权限roleCode,多填用英文逗号拼接
adminRoleCode: admin,BZGLY
# 企标详情全查看roleCode
enterpriseDetailRoleCode: JTGLBZCXJS
# 文件下载加解密
download:
enable: false