feat: 企标查看权限 主起草部门下的用户都可以看
This commit is contained in:
+12
-1
@@ -137,6 +137,7 @@ public class EnterpriseStandardAuthUserServiceImpl extends ServiceImpl<Enterpris
|
|||||||
for (Map<String, Object> map : records) {
|
for (Map<String, Object> map : records) {
|
||||||
String standardId = (String) map.get(FieldCommon.ID);
|
String standardId = (String) map.get(FieldCommon.ID);
|
||||||
LawsEnterpriseStandard es = esMap.get(standardId);
|
LawsEnterpriseStandard es = esMap.get(standardId);
|
||||||
|
String mainDraftingUnit = es.getMainDraftingUnit();
|
||||||
// 授权部门和临时权限
|
// 授权部门和临时权限
|
||||||
if (authStandardIds.contains(standardId)) {
|
if (authStandardIds.contains(standardId)) {
|
||||||
map.put(FieldCommon.DETAIL_FLAG, true);
|
map.put(FieldCommon.DETAIL_FLAG, true);
|
||||||
@@ -150,12 +151,17 @@ public class EnterpriseStandardAuthUserServiceImpl extends ServiceImpl<Enterpris
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
// 企标等级分类级别可查看部门
|
// 企标等级分类级别可查看部门
|
||||||
if (gradeClassification.equals("2") || gradeClassification.equals("3") || gradeClassification.equals("4")) {
|
if (gradeClassification.equals("2") || gradeClassification.equals("3")) {
|
||||||
if (levelDeptIds.stream().anyMatch(departIds::contains)) {
|
if (levelDeptIds.stream().anyMatch(departIds::contains)) {
|
||||||
map.put(FieldCommon.DETAIL_FLAG, true);
|
map.put(FieldCommon.DETAIL_FLAG, true);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// 主起草部门可以看
|
||||||
|
if (gradeClassification.equals("4") && departIds.contains(mainDraftingUnit)) {
|
||||||
|
map.put(FieldCommon.DETAIL_FLAG, true);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
map.put(FieldCommon.DETAIL_FLAG, false);
|
map.put(FieldCommon.DETAIL_FLAG, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -370,6 +376,11 @@ public class EnterpriseStandardAuthUserServiceImpl extends ServiceImpl<Enterpris
|
|||||||
if (levelDeptIds.stream().anyMatch(departIds::contains)) {
|
if (levelDeptIds.stream().anyMatch(departIds::contains)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
}else if (gradeClassification.equals("4")) {
|
||||||
|
String mainDraftingUnit = es.getMainDraftingUnit();
|
||||||
|
if (departIds.contains(mainDraftingUnit)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 查询临时授权人员
|
// 查询临时授权人员
|
||||||
|
|||||||
Reference in New Issue
Block a user