From 980006faeea87548b671e1df214ef010a62aab21 Mon Sep 17 00:00:00 2001 From: WendyYang Date: Mon, 14 Oct 2024 17:40:04 +0800 Subject: [PATCH] =?UTF-8?q?modify:=201.=20=E7=B3=BB=E7=BB=9F=E6=9B=BF?= =?UTF-8?q?=E4=BB=A3=E6=83=85=E5=86=B5=E4=BF=AE=E6=94=B9=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../manage/ProjectReviewManage.java | 3 +- .../api/projectlib/helper/ProjectSaveHelper.java | 54 ++++++++++++++-------- .../pm/api/projectlib/manage/ProjectLibManage.java | 18 ++++++-- .../model/dto/GovSystemReplaceInfoDTO.java | 6 +++ .../dto/GovSystemReplaceInfoUpgradeContentDTO.java | 26 +++++++++++ .../hz/pm/api/projectlib/model/dto/ProjectDTO.java | 6 --- .../hz/pm/api/projectlib/model/entity/Project.java | 3 -- .../api/projectlib/model/req/ProjectListReq.java | 8 ++++ .../api/projectlib/model/vo/ProjectDetailVO.java | 6 --- .../pm/api/workbench/manage/WorkbenchManage.java | 48 ++++++++++++++++--- .../api/workbench/model/WorkbenchProcessNode.java | 7 ++- 11 files changed, 138 insertions(+), 47 deletions(-) create mode 100644 hz-pm-api/src/main/java/com/hz/pm/api/projectlib/model/dto/GovSystemReplaceInfoUpgradeContentDTO.java diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/manage/ProjectReviewManage.java b/hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/manage/ProjectReviewManage.java index 26227e6..50d755b 100644 --- a/hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/manage/ProjectReviewManage.java +++ b/hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/manage/ProjectReviewManage.java @@ -179,7 +179,7 @@ public class ProjectReviewManage { if (!projectQueryPermission(query, user, req.getDeclaredUnitId())) { return PageVo.empty(); } - Integer status = req.getStatus(); + Integer status = req.clearStatus(); if (status != null) { req.setStatus(null); if (ProjectStatus.PROJECT_REVIEW_PASSED.eq(status)) { @@ -272,6 +272,7 @@ public class ProjectReviewManage { " and npsc.event = {0}", ProjectStateChangeEvent.COMPLIANCE_REVIEW_PASS); } ProjectManageUtil.projectQuery(query, req); + ProjectManageUtil.projectBaseQuery(query); query.eq(Project::getNewest, Boolean.TRUE) .ne(Project::getStage, ProjectStatus.STOPPED.getCode()); Page page = projectService.page(req.page(), query); diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/projectlib/helper/ProjectSaveHelper.java b/hz-pm-api/src/main/java/com/hz/pm/api/projectlib/helper/ProjectSaveHelper.java index 3342d77..10852f7 100644 --- a/hz-pm-api/src/main/java/com/hz/pm/api/projectlib/helper/ProjectSaveHelper.java +++ b/hz-pm-api/src/main/java/com/hz/pm/api/projectlib/helper/ProjectSaveHelper.java @@ -3,13 +3,16 @@ package com.hz.pm.api.projectlib.helper; import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.collection.CollUtil; import cn.hutool.core.util.ArrayUtil; +import cn.hutool.json.JSONUtil; import com.baomidou.mybatisplus.core.conditions.Wrapper; +import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.hz.pm.api.common.enumeration.CommonEnum; import com.hz.pm.api.performance.model.dto.ProjectCoreBusinessDTO; import com.hz.pm.api.performance.model.entity.ProjectCoreBusinessIndicators; import com.hz.pm.api.performance.service.IProjectCoreBusinessIndicatorsService; import com.hz.pm.api.projectlib.entity.ProjectGovSystemReplaceInfos; +import com.hz.pm.api.projectlib.model.dto.GovSystemReplaceInfoUpgradeContentDTO; import com.hz.pm.api.projectlib.model.dto.GovSystemReplaceInfoDTO; import com.hz.pm.api.projectlib.model.dto.ProjectDTO; import com.hz.pm.api.projectlib.model.dto.ProjectPaymentPlanDTO; @@ -19,6 +22,7 @@ import com.hz.pm.api.projectlib.model.entity.ProjectApplication; import com.hz.pm.api.projectlib.service.IProjectAnnualPaymentPlanService; import com.hz.pm.api.projectlib.service.IProjectApplicationService; import com.hz.pm.api.projectlib.service.IProjectGovSystemReplaceInfosService; +import com.hz.pm.api.projectlib.service.IProjectService; import com.hz.pm.api.user.security.model.UserInfoDetails; import com.hz.pm.api.user.util.LoginUserUtil; import lombok.RequiredArgsConstructor; @@ -44,6 +48,7 @@ import java.util.stream.Collectors; @RequiredArgsConstructor public class ProjectSaveHelper { + private final IProjectService projectService; private final IProjectApplicationService projectApplicationService; private final IProjectGovSystemReplaceInfosService projectGovSystemReplaceInfosService; private final IProjectCoreBusinessIndicatorsService projectCoreBusinessIndicatorsService; @@ -142,27 +147,40 @@ public class ProjectSaveHelper { Wrapper delQuery = Wrappers.lambdaQuery(ProjectGovSystemReplaceInfos.class) .eq(ProjectGovSystemReplaceInfos::getProjectCode, projectCode); projectGovSystemReplaceInfosService.remove(delQuery); - if (CollUtil.isEmpty(systemReplaceInfos)) { - return; - } - List replaceInfos = new ArrayList<>(); - for (int i = 0; i < systemReplaceInfos.size(); i++) { - GovSystemReplaceInfoDTO curr = systemReplaceInfos.get(i); - for (int i1 = 0; i1 < curr.getSourceSystemNames().size(); i1++) { - ProjectGovSystemReplaceInfos replaceInfo = new ProjectGovSystemReplaceInfos(); - replaceInfo.setProjectId(projectId); - replaceInfo.setProjectCode(projectCode); - replaceInfo.setReplaceType(curr.getReplaceType()); - replaceInfo.setSourceSystem(curr.getSourceSystemNames().get(i1)); - replaceInfo.setTargetSystem(curr.getTargetSystemName()); - replaceInfo.setBatchNo(i + 1); - if (ArrayUtil.isNotEmpty(curr.getSourceSystemIds())) { - replaceInfo.setSourceSystemId(curr.getSourceSystemIds().get(i1)); + LambdaUpdateWrapper projectUpdate = Wrappers.lambdaUpdate(Project.class) + .eq(Project::getProjectCode, projectCode) + .eq(Project::getNewest, Boolean.TRUE); + if (CollUtil.isNotEmpty(systemReplaceInfos)) { + List replaceInfos = new ArrayList<>(); + List upgradeContents = new ArrayList<>(); + for (int i = 0; i < systemReplaceInfos.size(); i++) { + int batchNo = i + 1; + GovSystemReplaceInfoDTO curr = systemReplaceInfos.get(i); + for (int i1 = 0; i1 < curr.getSourceSystemNames().size(); i1++) { + ProjectGovSystemReplaceInfos replaceInfo = new ProjectGovSystemReplaceInfos(); + replaceInfo.setProjectId(projectId); + replaceInfo.setProjectCode(projectCode); + replaceInfo.setReplaceType(curr.getReplaceType()); + replaceInfo.setSourceSystem(curr.getSourceSystemNames().get(i1)); + replaceInfo.setTargetSystem(curr.getTargetSystemName()); + replaceInfo.setBatchNo(batchNo); + if (ArrayUtil.isNotEmpty(curr.getSourceSystemIds())) { + replaceInfo.setSourceSystemId(curr.getSourceSystemIds().get(i1)); + } + replaceInfos.add(replaceInfo); } - replaceInfos.add(replaceInfo); + GovSystemReplaceInfoUpgradeContentDTO upgradeContent = new GovSystemReplaceInfoUpgradeContentDTO(); + upgradeContent.setBatchNo(batchNo); + upgradeContent.setIterativeUpgradeContent(curr.getIterativeUpgradeContent()); + upgradeContent.setIsAddIterativeUpgradeContent(curr.getIsAddIterativeUpgradeContent()); + upgradeContents.add(upgradeContent); } + projectUpdate.set(Project::getIterativeUpgradeContent, JSONUtil.toJsonStr(upgradeContents)); + projectGovSystemReplaceInfosService.saveBatch(replaceInfos); + } else { + projectUpdate.set(Project::getIterativeUpgradeContent, null); } - projectGovSystemReplaceInfosService.saveBatch(replaceInfos); + projectService.update(projectUpdate); } } 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 7e1edfd..b5a6a86 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 @@ -4,8 +4,8 @@ import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.bean.copier.CopyOptions; import cn.hutool.core.collection.CollUtil; import cn.hutool.core.lang.Assert; -import cn.hutool.core.util.ArrayUtil; import cn.hutool.core.util.NumberUtil; +import cn.hutool.json.JSONUtil; import com.alibaba.fastjson.JSONObject; import com.baomidou.mybatisplus.core.conditions.Wrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; @@ -15,7 +15,6 @@ import com.github.xiaoymin.knife4j.core.util.StrUtil; import com.google.common.collect.Lists; import com.google.common.collect.Maps; import com.hz.pm.api.common.compare.CompareUtils; -import com.hz.pm.api.common.enumeration.CommonEnum; import com.hz.pm.api.common.enumeration.ProjectProcessType; import com.hz.pm.api.common.helper.UserInfoHelper; import com.hz.pm.api.common.model.constant.BizConst; @@ -36,7 +35,6 @@ import com.hz.pm.api.filemanage.service.INdProjectApplyBorrowService; import com.hz.pm.api.meeting.entity.domain.MeetingInnerProject; import com.hz.pm.api.meeting.entity.dto.ProjectReviewResultDTO; import com.hz.pm.api.meeting.service.IMeetingInnerProjectService; -import com.hz.pm.api.performance.model.dto.ProjectCoreBusinessDTO; import com.hz.pm.api.performance.model.entity.ProjectCoreBusinessIndicators; import com.hz.pm.api.performance.service.IProjectCoreBusinessIndicatorsService; import com.hz.pm.api.portrait.model.entity.ProjectTag; @@ -61,6 +59,7 @@ import com.hz.pm.api.projectlib.handle.ProcessProgressHelper; import com.hz.pm.api.projectlib.helper.ProjectManageUtil; import com.hz.pm.api.projectlib.helper.ProjectSaveHelper; import com.hz.pm.api.projectlib.model.constant.ProjectConstant; +import com.hz.pm.api.projectlib.model.dto.GovSystemReplaceInfoUpgradeContentDTO; import com.hz.pm.api.projectlib.model.dto.GovSystemReplaceInfoDTO; import com.hz.pm.api.projectlib.model.dto.ProjectDTO; import com.hz.pm.api.projectlib.model.dto.ProjectPaymentPlanDTO; @@ -675,7 +674,7 @@ public class ProjectLibManage { * @param projectId \ * @return \ */ - private List getGovSystemReplaceInfos(Long projectId) { + private List getGovSystemReplaceInfos(Long projectId, String upgradeContent) { Wrapper query = Wrappers.lambdaQuery(ProjectGovSystemReplaceInfos.class) .eq(ProjectGovSystemReplaceInfos::getProjectId, projectId) .orderByAsc(ProjectGovSystemReplaceInfos::getId) @@ -684,6 +683,11 @@ public class ProjectLibManage { if (govSystemReplaceInfos.isEmpty()) { return Collections.emptyList(); } + Map upgradeContentMap = new HashMap<>(); + if (StrUtil.isNotBlank(upgradeContent)) { + List upgradeContents = JSONUtil.toList(upgradeContent, GovSystemReplaceInfoUpgradeContentDTO.class); + upgradeContentMap.putAll(CollUtils.listToMap(upgradeContents, GovSystemReplaceInfoUpgradeContentDTO::getBatchNo)); + } Map> replaceInfoGroup = CollUtils.group(govSystemReplaceInfos, ProjectGovSystemReplaceInfos::getBatchNo); return replaceInfoGroup.entrySet().stream() .sorted(Comparator.comparingInt(Map.Entry::getKey)) @@ -695,6 +699,10 @@ public class ProjectLibManage { replaceInfo.setTargetSystemName(firstReplaceInfo.getTargetSystem()); List sourceSystemNames = CollUtils.fieldList(currBatchValues, ProjectGovSystemReplaceInfos::getSourceSystem); replaceInfo.setSourceSystemNames(sourceSystemNames); + Optional.ofNullable(upgradeContentMap.get(w.getKey())).ifPresent(uc -> { + replaceInfo.setIterativeUpgradeContent(uc.getIterativeUpgradeContent()); + replaceInfo.setIsAddIterativeUpgradeContent(uc.getIsAddIterativeUpgradeContent()); + }); return replaceInfo; }).collect(Collectors.toList()); } @@ -715,7 +723,7 @@ public class ProjectLibManage { Map> coreBizMap = CollUtils.group(coreBizs, ProjectCoreBusinessIndicators::getApplicationId); retProjectDetail.setProjectApplications(CollUtils.convert(applications, app -> ProjectManageUtil.to(app, coreBizMap))); } - retProjectDetail.setSystemReplaceInfos(getGovSystemReplaceInfos(project.getId())); + retProjectDetail.setSystemReplaceInfos(getGovSystemReplaceInfos(project.getId(), project.getIterativeUpgradeContent())); //审批信息 if (StrUtils.isNotBlank(project.getInstCode())) { ProcessDetailReq req = new ProcessDetailReq(); diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/projectlib/model/dto/GovSystemReplaceInfoDTO.java b/hz-pm-api/src/main/java/com/hz/pm/api/projectlib/model/dto/GovSystemReplaceInfoDTO.java index 5dee496..8958b89 100644 --- a/hz-pm-api/src/main/java/com/hz/pm/api/projectlib/model/dto/GovSystemReplaceInfoDTO.java +++ b/hz-pm-api/src/main/java/com/hz/pm/api/projectlib/model/dto/GovSystemReplaceInfoDTO.java @@ -39,6 +39,12 @@ public class GovSystemReplaceInfoDTO implements Serializable { @ApiModelProperty("替代前系统id") private List sourceSystemIds; + @ApiModelProperty("是否新增迭代升级内容") + private Boolean isAddIterativeUpgradeContent; + + @ApiModelProperty("迭代升级内容") + private String iterativeUpgradeContent; + @Override public boolean equals(Object o) { if (this == o) { diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/projectlib/model/dto/GovSystemReplaceInfoUpgradeContentDTO.java b/hz-pm-api/src/main/java/com/hz/pm/api/projectlib/model/dto/GovSystemReplaceInfoUpgradeContentDTO.java new file mode 100644 index 0000000..acebdb9 --- /dev/null +++ b/hz-pm-api/src/main/java/com/hz/pm/api/projectlib/model/dto/GovSystemReplaceInfoUpgradeContentDTO.java @@ -0,0 +1,26 @@ +package com.hz.pm.api.projectlib.model.dto; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + *

+ * GOvSystemReplaceInfoUpgradeContent + *

+ * + * @author WendyYang + * @since 14:03 2024/10/14 + */ +@Data +public class GovSystemReplaceInfoUpgradeContentDTO { + + @ApiModelProperty("保存时批次号") + private Integer batchNo; + + @ApiModelProperty("是否新增迭代升级内容") + private Boolean isAddIterativeUpgradeContent; + + @ApiModelProperty("迭代升级内容") + private String iterativeUpgradeContent; + +} diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/projectlib/model/dto/ProjectDTO.java b/hz-pm-api/src/main/java/com/hz/pm/api/projectlib/model/dto/ProjectDTO.java index 0b7fb15..31bdcd2 100644 --- a/hz-pm-api/src/main/java/com/hz/pm/api/projectlib/model/dto/ProjectDTO.java +++ b/hz-pm-api/src/main/java/com/hz/pm/api/projectlib/model/dto/ProjectDTO.java @@ -383,12 +383,6 @@ public class ProjectDTO implements Serializable { @ApiModelProperty("政务信息系统替代情况") private List systemReplaceInfos; - @ApiModelProperty("是否新增迭代升级内容") - private Boolean isAddIterativeUpgradeContent; - - @ApiModelProperty("迭代升级内容") - private String iterativeUpgradeContent; - @ApiModelProperty("信产项目ID") private Long mhProjectId; diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/projectlib/model/entity/Project.java b/hz-pm-api/src/main/java/com/hz/pm/api/projectlib/model/entity/Project.java index 3314a16..f49e276 100644 --- a/hz-pm-api/src/main/java/com/hz/pm/api/projectlib/model/entity/Project.java +++ b/hz-pm-api/src/main/java/com/hz/pm/api/projectlib/model/entity/Project.java @@ -503,9 +503,6 @@ public class Project implements Serializable { @ApiModelProperty("是否是重大项目") private Boolean isMajorProject; - @ApiModelProperty("是否新增迭代升级内容") - private Boolean isAddIterativeUpgradeContent; - @ApiModelProperty("迭代升级内容") private String iterativeUpgradeContent; diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/projectlib/model/req/ProjectListReq.java b/hz-pm-api/src/main/java/com/hz/pm/api/projectlib/model/req/ProjectListReq.java index c74c686..d7f4915 100644 --- a/hz-pm-api/src/main/java/com/hz/pm/api/projectlib/model/req/ProjectListReq.java +++ b/hz-pm-api/src/main/java/com/hz/pm/api/projectlib/model/req/ProjectListReq.java @@ -143,4 +143,12 @@ public class ProjectListReq extends PagePo { return NumberUtil.parseLong(tmpBuildOrgCode, null); } + public Integer clearStatus() { + Integer tmpStatus = this.getStatus(); + if (tmpStatus != null) { + this.setStatus(null); + } + return tmpStatus; + } + } diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/projectlib/model/vo/ProjectDetailVO.java b/hz-pm-api/src/main/java/com/hz/pm/api/projectlib/model/vo/ProjectDetailVO.java index fdcb26b..2d18c07 100644 --- a/hz-pm-api/src/main/java/com/hz/pm/api/projectlib/model/vo/ProjectDetailVO.java +++ b/hz-pm-api/src/main/java/com/hz/pm/api/projectlib/model/vo/ProjectDetailVO.java @@ -594,10 +594,4 @@ public class ProjectDetailVO { @ApiModelProperty("所属领域") private Integer unitStrip; - @ApiModelProperty("是否新增迭代升级内容") - private Boolean isAddIterativeUpgradeContent; - - @ApiModelProperty("迭代升级内容") - private String iterativeUpgradeContent; - } 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 1ad2ce2..f6e3202 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 @@ -552,6 +552,9 @@ public class WorkbenchManage { public PageVo pageProjectLib(WorkbenchProjectLibReq req) { LambdaQueryWrapper query = workbenchProjectLibQuery(req); + if (query == null) { + return PageVo.empty(); + } ProjectManageUtil.projectBaseQuery(query); projectQueryByProjectStatusChange(query, ProjectStateChangeEvent.PROJECT_APPLICATION_SUBMIT); switch (req.getProcessNode()) { @@ -572,12 +575,33 @@ public class WorkbenchManage { case FIRST_INSPECTED: projectQueryByProjectStatusChange(query, ProjectStateChangeEvent.SUBMIT_FIRST_INSPECTED_FILES); break; + case ORG_CONFIRM: case PROJECT_ADAPTION: projectQueryByProjectStatusChange(query, ProjectStateChangeEvent.SUBMIT_PURCHASE_ORG_CONFIRM); break; case FINAL_INSPECTED: projectQueryByProjectStatusChange(query, ProjectStateChangeEvent.FINAL_ACCEPTANCE_PASS); break; + case FINISHED: + projectQueryByProjectStatusChange(query, ProjectStateChangeEvent.SUBMIT_PURCHASE_CONTRACT_RECORD); + query.notExists("select 1 from nd_purchase np where np.project_id = nd_project.id and bid_type = {0}", + BidTypeEnum.BUILD_APP.getCode()); + break; + case TEST_VALID: + query.apply("(select count(1) from nd_purchase np where np.project_id = nd_project.id and bid_type = {0}) " + + "= (select count(distinct bid_id) from nd_purchase_status_change npsc where npsc.project_code = nd_project.project_code " + + "and event = {1})", BidTypeEnum.BUILD_APP.getCode(), TestValidStateChangeEvent.TEST_VALID_INFO_PASSED); + break; + case SELF_TEST: + query.apply("(select count(1) from nd_purchase np where np.project_id = nd_project.id and bid_type = {0}) " + + "= (select count(distinct bid_id) from nd_purchase_status_change npsc where npsc.project_code = nd_project.project_code " + + "and event = {1})", BidTypeEnum.BUILD_APP.getCode(), SelfTestStateChangeEvent.SELF_TEST_PASSED); + break; + case SUBMIT_START_FILE: + query.apply("(select count(1) from nd_purchase np where np.project_id = nd_project.id and bid_type = {0}) " + + "= (select count(distinct bid_id) from nd_purchase_status_change npsc where npsc.project_code = nd_project.project_code " + + "and event = {1})", BidTypeEnum.BUILD_APP.getCode(), AdaptStateChangeEvent.ADAPT_INFO_PASSED); + break; default: return PageVo.empty(); } @@ -606,9 +630,12 @@ public class WorkbenchManage { } public SystemReplaceInfoVO listSystemReplaceInfos(WorkbenchProjectLibReq req) { - LambdaQueryWrapper query = workbenchProjectLibQuery(req) - .select(Project::getProjectCode, Project::getProjectName, - Project::getBuildOrgCode, Project::getBuildOrgName); + LambdaQueryWrapper query = workbenchProjectLibQuery(req); + if (query == null) { + return null; + } + query.select(Project::getProjectCode, Project::getProjectName, + Project::getBuildOrgCode, Project::getBuildOrgName); projectQueryByProjectStatusChange(query, ProjectStateChangeEvent.PROJECT_APPLICATION_SUBMIT); switch (req.getProcessNode()) { case PROJECT_DECLARED: @@ -643,13 +670,15 @@ public class WorkbenchManage { private LambdaQueryWrapper workbenchProjectLibQuery(WorkbenchProjectLibReq req) { Assert.notNull(req.getProcessNode(), "节点不能为空"); - Long unitId = Optional.ofNullable(req.getUnitId()).orElseGet(LoginUserUtil::getMhUnitId); - List viewUnitIds = mhUnitCache.getViewChildIdsRecursion(unitId); - return Wrappers.lambdaQuery(Project.class) + Long unitId = req.getUnitId(); + UnitQueryState unitQueryState = mhUnitQueryAuthHelper.listCanViewUnitIds(unitId); + if (!unitQueryState.isState()) { + return null; + } + LambdaQueryWrapper query = Wrappers.lambdaQuery(Project.class) .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()) - .in(Project::getBuildOrgCode, CollUtils.convert(viewUnitIds, String::valueOf)) .ge(req.getReviewAmountMin() != null, Project::getReviewAmount, req.getReviewAmountMin()) .le(req.getReviewAmountMax() != null, Project::getReviewAmount, req.getReviewAmountMax()) .ge(req.getApproveAmountMin() != null, Project::getApprovalAmount, req.getApproveAmountMin()) @@ -657,6 +686,11 @@ public class WorkbenchManage { .eq(req.getUnitStrip() != null, Project::getUnitStrip, req.getUnitStrip()) .eq(Project::getNewest, Boolean.TRUE) .orderByDesc(Project::getUpdateOn); + List unitIds = unitQueryState.getUnitIds(); + if (CollUtil.isNotEmpty(unitIds)) { + query.in(Project::getBuildOrgCode, CollUtils.convert(unitIds, String::valueOf)); + } + return query; } private SystemReplaceInfoVO buildSystemReplaceInfos(List projects) { diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/workbench/model/WorkbenchProcessNode.java b/hz-pm-api/src/main/java/com/hz/pm/api/workbench/model/WorkbenchProcessNode.java index e4c6e7b..4cfd206 100644 --- a/hz-pm-api/src/main/java/com/hz/pm/api/workbench/model/WorkbenchProcessNode.java +++ b/hz-pm-api/src/main/java/com/hz/pm/api/workbench/model/WorkbenchProcessNode.java @@ -27,7 +27,12 @@ public enum WorkbenchProcessNode { PROJECT_PURCHASE("已采购", 5), PROJECT_ADAPTION("已适配改造", 6), FIRST_INSPECTED("已初验", 9), - FINAL_INSPECTED("已终验", 12); + FINAL_INSPECTED("已终验", 12), + FINISHED("已完成", 13), + SUBMIT_START_FILE("上传开工文件", 10), + TEST_VALID("监理核实验证", 14), + SELF_TEST("系统自测", 15), + ORG_CONFIRM("单位确认", 16); private final String name;