fix: hasEsAuth方法没有0级权限BUG

This commit is contained in:
2024-01-11 11:44:00 +08:00
parent 403ec83e7e
commit d6b3ff6989
@@ -342,6 +342,11 @@ public class EnterpriseStandardAuthUserServiceImpl extends ServiceImpl<Enterpris
} }
// 等级分类 // 等级分类
String gradeClassification = es.getGradeClassification(); String gradeClassification = es.getGradeClassification();
// 全公司可以看
if ("1".equals(gradeClassification)) {
map.put(FieldCommon.DETAIL_FLAG, true);
continue;
}
// 授权部门 // 授权部门
if (!curAuthSet.isEmpty()) { if (!curAuthSet.isEmpty()) {
// 如果授权部门不等于0 // 如果授权部门不等于0
@@ -349,7 +354,7 @@ public class EnterpriseStandardAuthUserServiceImpl extends ServiceImpl<Enterpris
map.put(FieldCommon.DETAIL_FLAG, true); map.put(FieldCommon.DETAIL_FLAG, true);
continue; continue;
} }
} else { }
// 企标等级分类级别可查看部门 // 企标等级分类级别可查看部门
if ("2".equals(gradeClassification)) { if ("2".equals(gradeClassification)) {
if (levelOneDeptIds.stream().anyMatch(departIds::contains)) { if (levelOneDeptIds.stream().anyMatch(departIds::contains)) {
@@ -371,11 +376,12 @@ public class EnterpriseStandardAuthUserServiceImpl extends ServiceImpl<Enterpris
continue; continue;
} }
} }
}
map.put(FieldCommon.DETAIL_FLAG, false); map.put(FieldCommon.DETAIL_FLAG, false);
} }
// 遍历map // 遍历map
for (Map<String, Object> map : records) { for (
Map<String, Object> map : records) {
if (!(boolean) map.get(FieldCommon.DETAIL_FLAG)) { if (!(boolean) map.get(FieldCommon.DETAIL_FLAG)) {
return false; return false;
} }