Browse Source

增加立项批复建设方案

master
WendyYang 1 year ago
parent
commit
f57310e743
2 changed files with 12 additions and 9 deletions
  1. +9
    -9
      pmapi/src/main/java/com/ningdatech/pmapi/projectlib/manage/AnnualPlanLibManage.java
  2. +3
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/entity/Project.java

+ 9
- 9
pmapi/src/main/java/com/ningdatech/pmapi/projectlib/manage/AnnualPlanLibManage.java View File

@@ -31,7 +31,6 @@ import com.ningdatech.pmapi.projectlib.model.req.StartProjectDeclareReq;
import com.ningdatech.pmapi.projectlib.model.vo.AnnualPlanListItemVO;
import com.ningdatech.pmapi.projectlib.service.IProjectService;
import com.ningdatech.pmapi.user.security.auth.model.UserFullInfoDTO;
import com.ningdatech.pmapi.user.security.auth.model.UserInfoDetails;
import com.ningdatech.pmapi.user.util.LoginUserUtil;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
@@ -146,7 +145,7 @@ public class AnnualPlanLibManage {
.set(Project::getApprovalAmount, req.getApprovedAmount())
.set(Project::getApprovedFile, req.getApprovedFileId())
.set(Project::getBuildCycle, req.getBuildCycle())
.set(Project::getConstructionPlanFile, req.getBuildPlanFileId())
.set(Project::getApprovedConstructionPlanFile, req.getBuildPlanFileId())
.set(Project::getApprovalDate, req.getApprovedDate())
.set(Project::getStatus, project.getStatus())
.set(Project::getStage, project.getStage())
@@ -271,34 +270,35 @@ public class AnnualPlanLibManage {

/**
* build 项目的角色权限到req
*
* @param query
*/
public UserFullInfoDTO buildProjectLibPermission(LambdaQueryWrapper<Project> query){
public UserFullInfoDTO buildProjectLibPermission(LambdaQueryWrapper<Project> query) {
UserFullInfoDTO user = userInfoHelper.getUserFullInfo(LoginUserUtil.getUserId());
Optional<DataScopeDTO> currentUserDataScope = DataScopeUtil.getCurrentUserDataScope(user);
if(!currentUserDataScope.isPresent()){
if (!currentUserDataScope.isPresent()) {
log.warn("没有取到权限信息 当前查询 没有权限条件");
return user;
}
switch (currentUserDataScope.get().getRole()){
switch (currentUserDataScope.get().getRole()) {
case NORMAL_MEMBER:
//普通用户 只能看到自己单位去申报的
query.eq(Project::getBuildOrgCode ,user.getOrganizationCode());
query.eq(Project::getBuildOrgCode, user.getOrganizationCode());
break;
case COMPANY_MANAGER:
//单位管理员 看到自己单位去申报的 + 待预审的主管单位是自己单位的项目
query.eq(Project::getBuildOrgCode ,user.getOrganizationCode());
query.eq(Project::getBuildOrgCode, user.getOrganizationCode());
break;
case SUPER_ADMIN:
//超级管理员 看到丽水全市的 并且也要判断他 同时是不是单位管理员
break;
case REGION_MANAGER:
//区域管理员 看到自己区域的项目
query.eq(Project::getAreaCode,user.getRegionCode());
query.eq(Project::getAreaCode, user.getRegionCode());
break;
default:
//没有权限的话 就让它查不到
query.eq(Project::getId,"NULL");
query.eq(Project::getId, "NULL");
break;
}
return user;


+ 3
- 0
pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/entity/Project.java View File

@@ -255,6 +255,9 @@ public class Project implements Serializable {
@ApiModelProperty("建设方案文件")
private String constructionPlanFile;

@ApiModelProperty("立项批复建设方案文件")
private String approvedConstructionPlanFile;

@ApiModelProperty("立项批复文件")
private String approvedFile;



Loading…
Cancel
Save