Ver código fonte

优化 区管角色

tags/24080901
PoffyZhang 1 ano atrás
pai
commit
a1353bf9df
2 arquivos alterados com 12 adições e 2 exclusões
  1. +6
    -1
      pmapi/src/main/java/com/ningdatech/pmapi/portrait/manage/TagManage.java
  2. +6
    -1
      pmapi/src/main/java/com/ningdatech/pmapi/safety/manage/SafetyRiskManage.java

+ 6
- 1
pmapi/src/main/java/com/ningdatech/pmapi/portrait/manage/TagManage.java Ver arquivo

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


+ 6
- 1
pmapi/src/main/java/com/ningdatech/pmapi/safety/manage/SafetyRiskManage.java Ver arquivo

@@ -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() + " 项目");


Carregando…
Cancelar
Salvar