From f57310e7431617914fda530515788595acea89b2 Mon Sep 17 00:00:00 2001 From: WendyYang Date: Sat, 8 Apr 2023 11:28:53 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E7=AB=8B=E9=A1=B9=E6=89=B9?= =?UTF-8?q?=E5=A4=8D=E5=BB=BA=E8=AE=BE=E6=96=B9=E6=A1=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pmapi/projectlib/manage/AnnualPlanLibManage.java | 18 +++++++++--------- .../pmapi/projectlib/model/entity/Project.java | 3 +++ 2 files changed, 12 insertions(+), 9 deletions(-) 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;