feat: 78448 创建人可以查看数据
This commit is contained in:
+8
@@ -111,6 +111,7 @@ public class EnterpriseStandardAuthUserServiceImpl extends ServiceImpl<Enterpris
|
|||||||
records.forEach(kv -> kv.put(FieldCommon.DETAIL_FLAG, false));
|
records.forEach(kv -> kv.put(FieldCommon.DETAIL_FLAG, false));
|
||||||
SysUser currentUser = sysUserService.getById(UserUtils.getUserId());
|
SysUser currentUser = sysUserService.getById(UserUtils.getUserId());
|
||||||
String userId = currentUser.getId();
|
String userId = currentUser.getId();
|
||||||
|
String userName = currentUser.getUsername();
|
||||||
// 管理员有所有企标的权限
|
// 管理员有所有企标的权限
|
||||||
List<String> roleList = sysUserRoleService.getRole(currentUser.getUsername());
|
List<String> roleList = sysUserRoleService.getRole(currentUser.getUsername());
|
||||||
if (roleList != null && roleList.contains(FieldCommon.ROLE_ADMIN)) {
|
if (roleList != null && roleList.contains(FieldCommon.ROLE_ADMIN)) {
|
||||||
@@ -167,6 +168,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);
|
||||||
|
String creatUser = (String) map.get(FieldCommon.CREATE_BY);
|
||||||
LawsEnterpriseStandard es = esMap.get(standardId);
|
LawsEnterpriseStandard es = esMap.get(standardId);
|
||||||
String mainDraftUnit = es.getMainDraftingUnit();
|
String mainDraftUnit = es.getMainDraftingUnit();
|
||||||
Set<EnterpriseStandardAuthDept> curAuthSet = authDeptList.stream()
|
Set<EnterpriseStandardAuthDept> curAuthSet = authDeptList.stream()
|
||||||
@@ -182,6 +184,12 @@ public class EnterpriseStandardAuthUserServiceImpl extends ServiceImpl<Enterpris
|
|||||||
}
|
}
|
||||||
// 等级分类
|
// 等级分类
|
||||||
String gradeClassification = es.getGradeClassification();
|
String gradeClassification = es.getGradeClassification();
|
||||||
|
// 创建人可以看
|
||||||
|
if (userName.equals(creatUser)) {
|
||||||
|
map.put(FieldCommon.DETAIL_FLAG, true);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
// 全公司可以看
|
// 全公司可以看
|
||||||
if ("1".equals(gradeClassification)) {
|
if ("1".equals(gradeClassification)) {
|
||||||
map.put(FieldCommon.DETAIL_FLAG, true);
|
map.put(FieldCommon.DETAIL_FLAG, true);
|
||||||
|
|||||||
Reference in New Issue
Block a user