fix: 列表权限和接口权限不统一问题
This commit is contained in:
+15
-1
@@ -70,6 +70,7 @@ public class EnterpriseStandardAuthUserServiceImpl extends ServiceImpl<Enterpris
|
||||
|
||||
@Override
|
||||
public void detailFlagSet(List<Map<String, Object>> records) {
|
||||
records.forEach(kv -> kv.put(FieldCommon.DETAIL_FLAG, false));
|
||||
SysUser currentUser = sysUserService.getById(UserUtils.getUserId());
|
||||
String userId = currentUser.getId();
|
||||
String deptId = currentUser.getDepartIds();
|
||||
@@ -119,6 +120,13 @@ public class EnterpriseStandardAuthUserServiceImpl extends ServiceImpl<Enterpris
|
||||
continue;
|
||||
}
|
||||
}
|
||||
// 企标等级分类级别可查看部门
|
||||
if (gradeClassification.equals("4")) {
|
||||
if (deptId.equals(es.getMainDraftingUnit())) {
|
||||
map.put(FieldCommon.DETAIL_FLAG, true);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
// 授权部门和临时权限
|
||||
if (authStandardIds.contains(standardId)) {
|
||||
map.put(FieldCommon.DETAIL_FLAG, true);
|
||||
@@ -153,13 +161,19 @@ public class EnterpriseStandardAuthUserServiceImpl extends ServiceImpl<Enterpris
|
||||
String gradeClassification = es.getGradeClassification();
|
||||
if (gradeClassification.equals("1")) {
|
||||
return true;
|
||||
} else {
|
||||
} else if (gradeClassification.equals("2") || gradeClassification.equals("3")) {
|
||||
// 企标级别授权的部门
|
||||
List<LawsEnterpriseStandardLevel> standardLevelList = standardLevelService.list();
|
||||
List<String> levelDeptIds = standardLevelList.stream().map(LawsEnterpriseStandardLevel::getDeptId).collect(Collectors.toList());
|
||||
if (levelDeptIds.contains(deptId)) {
|
||||
return true;
|
||||
}
|
||||
} else {
|
||||
// 主起草部门
|
||||
String mainDraftDeptId = es.getMainDraftingUnit();
|
||||
if (deptId.equals(mainDraftDeptId)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
// 查询临时授权人员
|
||||
|
||||
Reference in New Issue
Block a user