feat: 78448 企业标准--创建人新增数据等级为3级,创建人可编辑不可查看
This commit is contained in:
+12
-10
@@ -233,7 +233,7 @@ public class EnterpriseStandardAuthUserServiceImpl extends ServiceImpl<Enterpris
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
// 授权部门
|
// 授权部门
|
||||||
if (curAuthSet.size() > 0) {
|
if (!curAuthSet.isEmpty()) {
|
||||||
// 如果授权部门不等于0
|
// 如果授权部门不等于0
|
||||||
if (curAuthSet.stream().map(EnterpriseStandardAuthDept::getAuthDept).anyMatch(departIds::contains)) {
|
if (curAuthSet.stream().map(EnterpriseStandardAuthDept::getAuthDept).anyMatch(departIds::contains)) {
|
||||||
map.put(FieldCommon.DETAIL_FLAG, true);
|
map.put(FieldCommon.DETAIL_FLAG, true);
|
||||||
@@ -346,7 +346,7 @@ public class EnterpriseStandardAuthUserServiceImpl extends ServiceImpl<Enterpris
|
|||||||
// 等级分类
|
// 等级分类
|
||||||
String gradeClassification = es.getGradeClassification();
|
String gradeClassification = es.getGradeClassification();
|
||||||
// 授权部门
|
// 授权部门
|
||||||
if (curAuthSet.size() > 0) {
|
if (!curAuthSet.isEmpty()) {
|
||||||
// 如果授权部门不等于0
|
// 如果授权部门不等于0
|
||||||
if (curAuthSet.stream().map(EnterpriseStandardAuthDept::getAuthDept).anyMatch(departIds::contains)) {
|
if (curAuthSet.stream().map(EnterpriseStandardAuthDept::getAuthDept).anyMatch(departIds::contains)) {
|
||||||
map.put(FieldCommon.DETAIL_FLAG, true);
|
map.put(FieldCommon.DETAIL_FLAG, true);
|
||||||
@@ -575,16 +575,20 @@ public class EnterpriseStandardAuthUserServiceImpl extends ServiceImpl<Enterpris
|
|||||||
}
|
}
|
||||||
// 等级分类
|
// 等级分类
|
||||||
String gradeClassification = es.getGradeClassification();
|
String gradeClassification = es.getGradeClassification();
|
||||||
|
String userName = currentUser.getUsername();
|
||||||
|
String creatUser = es.getCreateBy();
|
||||||
|
// 创建人可以看
|
||||||
|
if (userName.equals(creatUser)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
// 全公司可以看
|
// 全公司可以看
|
||||||
if ("1".equals(gradeClassification)) {
|
if ("1".equals(gradeClassification)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
// 授权部门
|
// 授权部门
|
||||||
if (curAuthSet.size() > 0) {
|
if (!curAuthSet.isEmpty()) {
|
||||||
// 如果授权部门不等于0
|
// 如果授权部门不等于0
|
||||||
if (curAuthSet.stream().map(EnterpriseStandardAuthDept::getAuthDept).anyMatch(departIds::contains)) {
|
return curAuthSet.stream().map(EnterpriseStandardAuthDept::getAuthDept).anyMatch(departIds::contains);
|
||||||
return true;
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
// 企标等级分类级别可查看部门
|
// 企标等级分类级别可查看部门
|
||||||
if ("2".equals(gradeClassification)) {
|
if ("2".equals(gradeClassification)) {
|
||||||
@@ -599,10 +603,8 @@ public class EnterpriseStandardAuthUserServiceImpl extends ServiceImpl<Enterpris
|
|||||||
}
|
}
|
||||||
if ("4".equals(gradeClassification)) {
|
if ("4".equals(gradeClassification)) {
|
||||||
// 主起草部门有企标的查看权限
|
// 主起草部门有企标的查看权限
|
||||||
if (!departNames.isEmpty() && departNames.contains(mainDraftUnit)) {
|
// 全部设置为有权限
|
||||||
// 全部设置为有权限
|
return !departNames.isEmpty() && departNames.contains(mainDraftUnit);
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
Reference in New Issue
Block a user