diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/portrait/manage/TagManage.java b/pmapi/src/main/java/com/ningdatech/pmapi/portrait/manage/TagManage.java index 75a7998..26f97a8 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/portrait/manage/TagManage.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/portrait/manage/TagManage.java @@ -8,6 +8,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.ningdatech.basic.function.VUtils; import com.ningdatech.basic.model.PageVo; import com.ningdatech.basic.util.CollUtils; +import com.ningdatech.pmapi.common.constant.RegionConst; import com.ningdatech.pmapi.portrait.model.dto.TagDTO; import com.ningdatech.pmapi.portrait.model.dto.TagToProjectDTO; import com.ningdatech.pmapi.portrait.model.entity.ProjectTag; @@ -81,7 +82,11 @@ public class TagManage { }else if(user.getRegionAdmin()){ //如果是区域管理员 log.info(user.getUsername() + " 是区管,可以看本区域" + user.getRegionCode() + "标签"); - query.eq(Tag::getAreaCode,user.getRegionCode()); + if(!RegionConst.RC_LS.equals(user.getRegionCode())){ + //非市本级的区管 只可以看自己区域的 + query.eq(Tag::getAreaCode,user.getRegionCode()); + } + //市本级 能看所有区域 }else{ //其它角色全都看不见 query.eq(Tag::getId,0L); diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/safety/manage/SafetyRiskManage.java b/pmapi/src/main/java/com/ningdatech/pmapi/safety/manage/SafetyRiskManage.java index 90c9b8c..e1f9b6f 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/safety/manage/SafetyRiskManage.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/safety/manage/SafetyRiskManage.java @@ -11,6 +11,7 @@ import com.ningdatech.basic.function.VUtils; import com.ningdatech.basic.model.PageVo; import com.ningdatech.basic.util.CollUtils; import com.ningdatech.pmapi.common.constant.BizConst; +import com.ningdatech.pmapi.common.constant.RegionConst; import com.ningdatech.pmapi.projectlib.enumeration.ProjectStatusEnum; import com.ningdatech.pmapi.projectlib.model.entity.Project; import com.ningdatech.pmapi.projectlib.model.req.ProjectListReq; @@ -91,7 +92,11 @@ public class SafetyRiskManage { }else if(user.getRegionAdmin()){ //如果是区域管理员 log.info(user.getUsername() + " 是区管,可以看本区域" + user.getRegionCode() + "项目"); - query.eq(Project::getAreaCode,user.getRegionCode()); + if(!RegionConst.RC_LS.equals(user.getRegionCode())){ + //不是丽水市本级的话 就只看 自己区域的 + query.eq(Project::getAreaCode,user.getRegionCode()); + } + //如果是市本级 就能看所有的 }else if(user.getIsOrgAdmin()){ //单位管理员 log.info(user.getUsername() + " 是单位管理员,可以看单位 " + user.getEmpPosUnitName() + " 项目");