From de152aa6374d910999aa021ead84b5184076c71d Mon Sep 17 00:00:00 2001 From: WendyYang Date: Fri, 23 Aug 2024 16:13:09 +0800 Subject: [PATCH] =?UTF-8?q?modify:=201.=20=E4=BF=AE=E6=94=B9=E9=A1=B9?= =?UTF-8?q?=E7=9B=AE=E5=88=97=E8=A1=A8=E6=9F=A5=E8=AF=A2=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/hz/pm/api/projectlib/helper/ProjectManageUtil.java | 7 +++++++ .../java/com/hz/pm/api/projectlib/manage/ProjectLibManage.java | 5 ++--- .../main/java/com/hz/pm/api/workbench/manage/WorkbenchManage.java | 6 ++---- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/projectlib/helper/ProjectManageUtil.java b/hz-pm-api/src/main/java/com/hz/pm/api/projectlib/helper/ProjectManageUtil.java index b01b2bf..9a2ee34 100644 --- a/hz-pm-api/src/main/java/com/hz/pm/api/projectlib/helper/ProjectManageUtil.java +++ b/hz-pm-api/src/main/java/com/hz/pm/api/projectlib/helper/ProjectManageUtil.java @@ -94,6 +94,13 @@ public class ProjectManageUtil { } } + public static void projectBaseQuery(LambdaQueryWrapper query) { + query.select(Project::getId, Project::getStage, Project::getStatus, Project::getProjectCode, + Project::getBuildOrgCode, Project::getBuildOrgName, Project::getApprovalAmount, + Project::getCreateOn, Project::getProjectName, Project::getProjectYear, + Project::getDeclareAmount, Project::getReviewAmount); + } + /** * 通用项目查询 * diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/projectlib/manage/ProjectLibManage.java b/hz-pm-api/src/main/java/com/hz/pm/api/projectlib/manage/ProjectLibManage.java index 292a578..124d018 100644 --- a/hz-pm-api/src/main/java/com/hz/pm/api/projectlib/manage/ProjectLibManage.java +++ b/hz-pm-api/src/main/java/com/hz/pm/api/projectlib/manage/ProjectLibManage.java @@ -205,7 +205,6 @@ public class ProjectLibManage { if (CollUtil.isEmpty(page.getRecords())) { return PageVo.empty(); } - UserFullInfoDTO finalUser = user; Set projectCodes = new HashSet<>(); List projectIds = new ArrayList<>(); for (Project project : page.getRecords()) { @@ -234,8 +233,8 @@ public class ProjectLibManage { item.setProcessStatus(w.getProcessStatus()); item.setInstCode(w.getInstCode()); item.setIsHigherSuperOrg(w.getIsHigherSuperOrg()); - if (finalUser.getIsOrgAdmin() && StringUtils.isNotBlank(w.getSuperOrgCode()) - && w.getSuperOrgCode().equals(finalUser.getMhUnitIdStr())) { + if (user.getIsOrgAdmin() && StringUtils.isNotBlank(w.getSuperOrgCode()) + && w.getSuperOrgCode().equals(user.getMhUnitIdStr())) { item.setCanPreDeclared(Boolean.TRUE); } item.setApprovedAmount(w.getApprovalAmount()); diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/workbench/manage/WorkbenchManage.java b/hz-pm-api/src/main/java/com/hz/pm/api/workbench/manage/WorkbenchManage.java index 8dc6e22..4827aff 100644 --- a/hz-pm-api/src/main/java/com/hz/pm/api/workbench/manage/WorkbenchManage.java +++ b/hz-pm-api/src/main/java/com/hz/pm/api/workbench/manage/WorkbenchManage.java @@ -21,6 +21,7 @@ import com.hz.pm.api.projectdeclared.service.IPurchaseService; import com.hz.pm.api.projectdeclared.utils.ProjectIdCodeCacheUtil; import com.hz.pm.api.projectlib.entity.ProjectGovSystemReplaceInfos; import com.hz.pm.api.projectlib.entity.PurchaseStatusChange; +import com.hz.pm.api.projectlib.helper.ProjectManageUtil; import com.hz.pm.api.projectlib.manage.ProjectLibManage; import com.hz.pm.api.projectlib.model.entity.Project; import com.hz.pm.api.projectlib.model.entity.ProjectStatusChange; @@ -518,10 +519,6 @@ public class WorkbenchManage { Long unitId = Optional.ofNullable(req.getUnitId()).orElseGet(LoginUserUtil::getMhUnitId); List viewUnitIds = mhUnitCache.getViewChildIdsRecursion(unitId); LambdaQueryWrapper query = Wrappers.lambdaQuery(Project.class) - .select(Project::getId, Project::getStage, Project::getStatus, Project::getProjectCode, - Project::getBuildOrgCode, Project::getBuildOrgName, Project::getApprovalAmount, - Project::getCreateOn, Project::getProjectName, Project::getProjectYear, - Project::getDeclareAmount, Project::getReviewAmount) .eq(req.getProjectYear() != null, Project::getProjectYear, req.getProjectYear()) .like(StrUtil.isNotBlank(req.getBuildOrg()), Project::getBuildOrgName, req.getBuildOrg()) .like(StrUtil.isNotBlank(req.getProjectName()), Project::getProjectName, req.getProjectName()) @@ -536,6 +533,7 @@ public class WorkbenchManage { .ne(Project::getStage, ProjectStatus.STOPPED.getCode()) .eq(Project::getNewest, Boolean.TRUE) .orderByDesc(Project::getUpdateOn); + ProjectManageUtil.projectBaseQuery(query); projectQueryByProjectStatusChange(query, ProjectStateChangeEvent.PROJECT_APPLICATION_SUBMIT); switch (req.getProcessNode()) { case PROJECT_DECLARED: