diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/manage/AnnualPlanLibManage.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/manage/AnnualPlanLibManage.java index 211a85c..9026916 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/manage/AnnualPlanLibManage.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/manage/AnnualPlanLibManage.java @@ -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 query){ + public UserFullInfoDTO buildProjectLibPermission(LambdaQueryWrapper query) { UserFullInfoDTO user = userInfoHelper.getUserFullInfo(LoginUserUtil.getUserId()); Optional 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; diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/entity/Project.java b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/entity/Project.java index f84dce7..2b3831b 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/entity/Project.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/entity/Project.java @@ -255,6 +255,9 @@ public class Project implements Serializable { @ApiModelProperty("建设方案文件") private String constructionPlanFile; + @ApiModelProperty("立项批复建设方案文件") + private String approvedConstructionPlanFile; + @ApiModelProperty("立项批复文件") private String approvedFile;