Bläddra i källkod

测试部署

tags/24080901
PoffyZhang 1 år sedan
förälder
incheckning
c222383d38
2 ändrade filer med 16 tillägg och 22 borttagningar
  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 Visa fil

@@ -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 Visa fil

@@ -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());


Laddar…
Avbryt
Spara