瀏覽代碼

测试部署

tags/24080901
PoffyZhang 1 年之前
父節點
當前提交
c222383d38
共有 2 個檔案被更改,包括 16 行新增22 行删除
  1. +5
    -8
      pmapi/src/main/java/com/ningdatech/pmapi/gov/manage/GovProjectCollectionManage.java
  2. +11
    -14
      pmapi/src/main/java/com/ningdatech/pmapi/sys/manage/NoticeManage.java

+ 5
- 8
pmapi/src/main/java/com/ningdatech/pmapi/gov/manage/GovProjectCollectionManage.java 查看文件

@@ -220,15 +220,12 @@ public class GovProjectCollectionManage {
*/
private void permissions(LambdaQueryWrapper<GovBizProjectBaseinfo> wrapper) {
UserInfoDetails user = LoginUserUtil.loginUserDetail();
List<Role> userRoleList = user.getUserRoleList();
for(Role role : userRoleList){
//超管和区域管理员
if(RoleEnum.SUPER_ADMIN.name().equals(role.getCode()) ||
RoleEnum.REGION_MANAGER.name().equals(role.getCode())){
log.info("超管和区管 可以看所有");
return;
}
//超管和区域管理员
if(user.getSuperAdmin() || user.getRegionAdmin()){
log.info("超管和区管 可以看所有");
return;
}

wrapper.eq(GovBizProjectBaseinfo::getBaseBuildDeprtDing,user.getEmpPosUnitCode());
}



+ 11
- 14
pmapi/src/main/java/com/ningdatech/pmapi/sys/manage/NoticeManage.java 查看文件

@@ -302,20 +302,17 @@ public class NoticeManage {
notice.setPermissionsValue(user.getEmpPosUnitCode());
return;
}
for(Role role : userRoleList){
if(RoleEnum.SUPER_ADMIN.eq(role.getCode())){
notice.setPermissions(NoticePermissionsEnum.SUPER.getCode());
return;
}else if(RoleEnum.REGION_MANAGER.eq(role.getCode())){
notice.setPermissions(NoticePermissionsEnum.REGION.getCode());
notice.setPermissionsValue(user.getRegionCode());
return;
}else if(RoleEnum.COMPANY_MANAGER.eq(role.getCode())){
notice.setPermissions(NoticePermissionsEnum.ORG.getCode());
notice.setPermissionsValue(user.getEmpPosUnitCode());
return;
}

if(user.getSuperAdmin()){
notice.setPermissions(NoticePermissionsEnum.SUPER.getCode());
return;
}else if(user.getRegionAdmin()){
notice.setPermissions(NoticePermissionsEnum.REGION.getCode());
notice.setPermissionsValue(user.getRegionCode());
return;
}else if(user.getIsOrgAdmin()){
notice.setPermissions(NoticePermissionsEnum.ORG.getCode());
notice.setPermissionsValue(user.getEmpPosUnitCode());
return;
}
notice.setPermissions(NoticePermissionsEnum.ORG.getCode());
notice.setPermissionsValue(user.getEmpPosUnitCode());


Loading…
取消
儲存