fix: hasEsAuth方法没有0级权限BUG
This commit is contained in:
+28
-22
@@ -342,6 +342,11 @@ public class EnterpriseStandardAuthUserServiceImpl extends ServiceImpl<Enterpris
|
||||
}
|
||||
// 等级分类
|
||||
String gradeClassification = es.getGradeClassification();
|
||||
// 全公司可以看
|
||||
if ("1".equals(gradeClassification)) {
|
||||
map.put(FieldCommon.DETAIL_FLAG, true);
|
||||
continue;
|
||||
}
|
||||
// 授权部门
|
||||
if (!curAuthSet.isEmpty()) {
|
||||
// 如果授权部门不等于0
|
||||
@@ -349,33 +354,34 @@ public class EnterpriseStandardAuthUserServiceImpl extends ServiceImpl<Enterpris
|
||||
map.put(FieldCommon.DETAIL_FLAG, true);
|
||||
continue;
|
||||
}
|
||||
} else {
|
||||
// 企标等级分类级别可查看部门
|
||||
if ("2".equals(gradeClassification)) {
|
||||
if (levelOneDeptIds.stream().anyMatch(departIds::contains)) {
|
||||
map.put(FieldCommon.DETAIL_FLAG, true);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if ("3".equals(gradeClassification)) {
|
||||
if (levelTwoDeptIds.stream().anyMatch(departIds::contains)) {
|
||||
map.put(FieldCommon.DETAIL_FLAG, true);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if ("4".equals(gradeClassification)) {
|
||||
// 主起草部门有企标的查看权限
|
||||
if (!departNames.isEmpty() && departNames.contains(mainDraftUnit)) {
|
||||
// 全部设置为有权限
|
||||
map.put(FieldCommon.DETAIL_FLAG, true);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
// 企标等级分类级别可查看部门
|
||||
if ("2".equals(gradeClassification)) {
|
||||
if (levelOneDeptIds.stream().anyMatch(departIds::contains)) {
|
||||
map.put(FieldCommon.DETAIL_FLAG, true);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if ("3".equals(gradeClassification)) {
|
||||
if (levelTwoDeptIds.stream().anyMatch(departIds::contains)) {
|
||||
map.put(FieldCommon.DETAIL_FLAG, true);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if ("4".equals(gradeClassification)) {
|
||||
// 主起草部门有企标的查看权限
|
||||
if (!departNames.isEmpty() && departNames.contains(mainDraftUnit)) {
|
||||
// 全部设置为有权限
|
||||
map.put(FieldCommon.DETAIL_FLAG, true);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
map.put(FieldCommon.DETAIL_FLAG, false);
|
||||
}
|
||||
// 遍历map
|
||||
for (Map<String, Object> map : records) {
|
||||
for (
|
||||
Map<String, Object> map : records) {
|
||||
if (!(boolean) map.get(FieldCommon.DETAIL_FLAG)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user