From 71614c0be199d5621835c8bfe9f450ee5b8f0e8c Mon Sep 17 00:00:00 2001 From: WendyYang Date: Mon, 14 Oct 2024 11:12:10 +0800 Subject: [PATCH 1/4] =?UTF-8?q?modify:=201.=20=E5=A2=9E=E5=8A=A0=E6=98=AF?= =?UTF-8?q?=E5=90=A6=E5=A7=93=E6=96=B0=E5=A2=9E=E8=BF=AD=E4=BB=A3=E5=8D=87?= =?UTF-8?q?=E7=BA=A7=E5=86=85=E5=AE=B9=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ProjectGovSystemReplaceInfoController.java | 7 ++++ .../manage/ProjectGovSystemReplaceInfoManage.java | 40 +++++++++++++++++++--- .../hz/pm/api/projectlib/model/dto/ProjectDTO.java | 6 ++++ .../hz/pm/api/projectlib/model/entity/Project.java | 6 ++++ .../api/projectlib/model/vo/ProjectDetailVO.java | 6 ++++ 5 files changed, 61 insertions(+), 4 deletions(-) diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/projectlib/controller/ProjectGovSystemReplaceInfoController.java b/hz-pm-api/src/main/java/com/hz/pm/api/projectlib/controller/ProjectGovSystemReplaceInfoController.java index 896608a..1f0fd36 100644 --- a/hz-pm-api/src/main/java/com/hz/pm/api/projectlib/controller/ProjectGovSystemReplaceInfoController.java +++ b/hz-pm-api/src/main/java/com/hz/pm/api/projectlib/controller/ProjectGovSystemReplaceInfoController.java @@ -9,6 +9,8 @@ import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RestController; +import javax.servlet.http.HttpServletResponse; + /** *

* ProjectGovSystemReplaceInfoController @@ -30,4 +32,9 @@ public class ProjectGovSystemReplaceInfoController { return systemReplaceInfoManage.systemReplaceInfos(targetSystem); } + @GetMapping("/down") + public void downTmp(HttpServletResponse response) { + systemReplaceInfoManage.downTmp(response); + } + } diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/projectlib/manage/ProjectGovSystemReplaceInfoManage.java b/hz-pm-api/src/main/java/com/hz/pm/api/projectlib/manage/ProjectGovSystemReplaceInfoManage.java index d5208e4..e37a972 100644 --- a/hz-pm-api/src/main/java/com/hz/pm/api/projectlib/manage/ProjectGovSystemReplaceInfoManage.java +++ b/hz-pm-api/src/main/java/com/hz/pm/api/projectlib/manage/ProjectGovSystemReplaceInfoManage.java @@ -2,11 +2,14 @@ package com.hz.pm.api.projectlib.manage; import cn.hutool.core.util.NumberUtil; import cn.hutool.core.util.StrUtil; +import cn.hutool.poi.excel.ExcelUtil; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.toolkit.Wrappers; +import com.hz.pm.api.common.exception.ReturnException; import com.hz.pm.api.projectlib.entity.ProjectGovSystemReplaceInfos; import com.hz.pm.api.projectlib.model.dto.GovSystemReplaceInfoDTO; import com.hz.pm.api.projectlib.model.entity.Project; +import com.hz.pm.api.projectlib.model.enumeration.GovSystemReplaceTypeEnum; import com.hz.pm.api.projectlib.model.vo.SystemReplaceInfoVO; import com.hz.pm.api.projectlib.model.vo.UnitProjectGovSystemReplaceVO; import com.hz.pm.api.projectlib.model.vo.UnitProjectGovSystemReplaceVO.ProjectGovSystemReplaceVO; @@ -18,10 +21,9 @@ import com.ningdatech.basic.util.CollUtils; import lombok.RequiredArgsConstructor; import org.springframework.stereotype.Component; -import java.util.ArrayList; -import java.util.Comparator; -import java.util.List; -import java.util.Map; +import javax.servlet.ServletOutputStream; +import javax.servlet.http.HttpServletResponse; +import java.util.*; import java.util.concurrent.atomic.AtomicInteger; import java.util.stream.Collectors; @@ -112,4 +114,34 @@ public class ProjectGovSystemReplaceInfoManage { return retDetail; } + public void downTmp(HttpServletResponse response) { + List replaceInfos = systemReplaceInfosService.list(); + replaceInfos.removeIf(w -> StrUtil.isNotBlank(w.getSourceSystemId())); + if (replaceInfos.isEmpty()) { + throw ReturnException.wrap("暂无数据可供导出"); + } + for (ProjectGovSystemReplaceInfos replaceInfo : replaceInfos) { + if (StrUtil.isNotBlank(replaceInfo.getReplaceType())) { + String replaceType = replaceInfo.getReplaceType(); + String[] split = replaceType.split(","); + String replaceTypeStr = Arrays.stream(split) + .filter(NumberUtil::isNumber) + .map(w -> GovSystemReplaceTypeEnum.getVal(Integer.parseInt(w))) + .collect(Collectors.joining(",")); + replaceInfo.setReplaceType(replaceTypeStr); + } else { + replaceInfo.setReplaceType(StrUtil.EMPTY); + } + } + try (ServletOutputStream sos = response.getOutputStream()) { + response.setContentType("application/vnd.ms-excel"); + ExcelUtil.getWriter() + .write(replaceInfos) + .flush(sos) + .close(); + } catch (Exception e) { + throw ReturnException.wrap("导出失败"); + } + } + } 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 31bdcd2..0b7fb15 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,6 +383,12 @@ 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 e46a41d..3314a16 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,4 +503,10 @@ 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/vo/ProjectDetailVO.java b/hz-pm-api/src/main/java/com/hz/pm/api/projectlib/model/vo/ProjectDetailVO.java index 2d18c07..fdcb26b 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,4 +594,10 @@ public class ProjectDetailVO { @ApiModelProperty("所属领域") private Integer unitStrip; + @ApiModelProperty("是否新增迭代升级内容") + private Boolean isAddIterativeUpgradeContent; + + @ApiModelProperty("迭代升级内容") + private String iterativeUpgradeContent; + } From 980006faeea87548b671e1df214ef010a62aab21 Mon Sep 17 00:00:00 2001 From: WendyYang Date: Mon, 14 Oct 2024 17:40:04 +0800 Subject: [PATCH 2/4] =?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; From c010d5dea7cc370d29bb4fb568a1acc840c1939a Mon Sep 17 00:00:00 2001 From: WendyYang Date: Mon, 14 Oct 2024 18:17:39 +0800 Subject: [PATCH 3/4] =?UTF-8?q?modify:=201.=20=E5=88=86=E6=94=AF=E8=8A=82?= =?UTF-8?q?=E7=82=B9=E4=BF=AE=E6=94=B9=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/hz/pm/api/workbench/manage/WorkbenchManage.java | 7 +++++++ 1 file changed, 7 insertions(+) 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 f6e3202..9d72d38 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 @@ -355,6 +355,13 @@ public class WorkbenchManage { List projects = projectService.list(query); Map> projectStatusChangeMap = new HashMap<>(); for (WorkbenchProcessNode node : WorkbenchProcessNode.ALL) { + if (Arrays.asList(WorkbenchProcessNode.FINISHED, + WorkbenchProcessNode.SUBMIT_START_FILE, + WorkbenchProcessNode.ORG_CONFIRM, + WorkbenchProcessNode.SELF_TEST, + WorkbenchProcessNode.TEST_VALID).contains(node)) { + continue; + } if (!projects.isEmpty()) { ProjectProcessStatVO currStat = ProjectProcessStatVO.builder() .stageName(node.getName()) From 23541bd27e50513897c3ec6756ed9f5286055020 Mon Sep 17 00:00:00 2001 From: WendyYang Date: Tue, 15 Oct 2024 16:12:29 +0800 Subject: [PATCH 4/4] =?UTF-8?q?modify:=201.=20=E5=A4=84=E7=90=86=E6=80=BB?= =?UTF-8?q?=E8=A7=88=E8=B7=B3=E8=BD=AC=E9=A1=B9=E7=9B=AE=E5=88=97=E8=A1=A8?= =?UTF-8?q?=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../listener/UserTaskCreateOrFinishListener.java | 17 +++++- .../pm/api/workbench/manage/WorkbenchManage.java | 69 ++++++++++++++-------- 2 files changed, 61 insertions(+), 25 deletions(-) diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/scheduler/listener/UserTaskCreateOrFinishListener.java b/hz-pm-api/src/main/java/com/hz/pm/api/scheduler/listener/UserTaskCreateOrFinishListener.java index e54f5ba..63d657f 100644 --- a/hz-pm-api/src/main/java/com/hz/pm/api/scheduler/listener/UserTaskCreateOrFinishListener.java +++ b/hz-pm-api/src/main/java/com/hz/pm/api/scheduler/listener/UserTaskCreateOrFinishListener.java @@ -74,12 +74,25 @@ public class UserTaskCreateOrFinishListener { @EventListener(classes = NodeCreateEvent.class) public void onEvent(NodeCreateEvent event) { - SCHEDULER.schedule(() -> handleEvent(event), instantDelay10s()); + SCHEDULER.schedule(() -> { + try { + handleEvent(event); + } catch (Exception e) { + log.error("任务节点创建监听异常:{}", event, e); + } + }, instantDelay10s()); } @EventListener(classes = NodeCompleteEvent.class) public void onEvent(NodeCompleteEvent event) { - SCHEDULER.schedule(() -> handleEvent(event), instantDelay10s()); + SCHEDULER.schedule(() -> { + try { + handleEvent(event); + + } catch (Exception e) { + log.error("任务节点完成监听异常:{}", event, e); + } + }, instantDelay10s()); } public void handleEvent(NodeCreateEvent event) { 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 9d72d38..c7da6da 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 @@ -15,7 +15,10 @@ import com.google.common.collect.Sets; import com.hz.pm.api.common.helper.UserInfoHelper; import com.hz.pm.api.common.model.constant.BizConst; import com.hz.pm.api.common.model.constant.ExistsSqlConst; -import com.hz.pm.api.common.statemachine.event.*; +import com.hz.pm.api.common.statemachine.event.AbstractStateChangeEvent; +import com.hz.pm.api.common.statemachine.event.ProjectStateChangeEvent; +import com.hz.pm.api.common.statemachine.event.TenderStateChangeEvent; +import com.hz.pm.api.common.statemachine.event.XcfhxStateChangeEvent; import com.hz.pm.api.common.util.DecimalUtil; import com.hz.pm.api.projectdeclared.model.entity.Contract; import com.hz.pm.api.projectdeclared.model.entity.Purchase; @@ -86,6 +89,10 @@ import java.util.function.BiFunction; import java.util.function.Predicate; import java.util.stream.Collectors; +import static com.hz.pm.api.common.statemachine.event.AdaptStateChangeEvent.ADAPT_INFO_PASSED; +import static com.hz.pm.api.common.statemachine.event.SelfTestStateChangeEvent.SELF_TEST_PASSED; +import static com.hz.pm.api.common.statemachine.event.TenderStateChangeEvent.SUBMIT_PURCHASE_ORG_CONFIRM; +import static com.hz.pm.api.common.statemachine.event.TestValidStateChangeEvent.TEST_VALID_INFO_PASSED; import static com.hz.pm.api.projectlib.helper.ProjectManageUtil.projectQueryByProjectStatusChange; import static com.hz.pm.api.workbench.model.vo.ProjectProcessStatVO.TenderAdaptFinishStatVO; @@ -443,13 +450,13 @@ public class WorkbenchManage { .select(PurchaseStatusChange::getEvent, PurchaseStatusChange::getProjectId) .in(PurchaseStatusChange::getProjectId, projectIds) .in(PurchaseStatusChange::getEvent, - AdaptStateChangeEvent.ADAPT_INFO_PASSED, - SelfTestStateChangeEvent.SELF_TEST_PASSED, - TestValidStateChangeEvent.TEST_VALID_INFO_PASSED, + ADAPT_INFO_PASSED, + SELF_TEST_PASSED, + TEST_VALID_INFO_PASSED, TenderStateChangeEvent.SUBMIT_FIRST_INSPECTED_FILES, XcfhxStateChangeEvent.XCFHX_APPLY_PASSED, TenderStateChangeEvent.FINALLY_INSPECTED_PASSED, - TenderStateChangeEvent.SUBMIT_PURCHASE_ORG_CONFIRM, + SUBMIT_PURCHASE_ORG_CONFIRM, TenderStateChangeEvent.SUBMIT_PURCHASE_CONSTRUCTION_INFO); List purchaseChanges = purchaseStatusChangeService.list(pQuery); Map> purchaseEventMapTmp = purchaseChanges.stream() @@ -461,7 +468,7 @@ public class WorkbenchManage { } break; case PROJECT_ADAPTION: { - List projectIds = computeProjectIds.apply(TenderStateChangeEvent.SUBMIT_PURCHASE_ORG_CONFIRM, node); + List projectIds = computeProjectIds.apply(SUBMIT_PURCHASE_ORG_CONFIRM, node); currStat.setProjectCount(projectIds.size()); Pair replaceSystemCount = countReplaceSystemByProjectIds(projectIds); currStat.setSourceCount(replaceSystemCount.getKey()); @@ -475,7 +482,7 @@ public class WorkbenchManage { .map(Map.Entry::getKey) .collect(Collectors.toList()); if (!tmpProjectIds.isEmpty()) { - currStat.setAdaptFinishStat(tenderAdaptStatistics(tmpProjectIds)); + currStat.setAdaptFinishStat(tenderAdaptStatistics(tmpProjectIds, projectPurchaseCountMap)); } } long finishPurchaseByWithoutApp = CollUtil.count(projectPurchaseCountMap.entrySet(), w -> { @@ -521,26 +528,42 @@ public class WorkbenchManage { return retData; } - private TenderAdaptFinishStatVO tenderAdaptStatistics(List projectIds) { + private TenderAdaptFinishStatVO tenderAdaptStatistics(List projectIds, Map> projectPurchaseCountMap) { Wrapper purchaseQuery = Wrappers.lambdaQuery(PurchaseStatusChange.class) - .select(PurchaseStatusChange::getEvent, PurchaseStatusChange::getBidId) + .select(PurchaseStatusChange::getEvent, PurchaseStatusChange::getBidId, PurchaseStatusChange::getProjectId) .in(PurchaseStatusChange::getProjectId, projectIds) - .in(PurchaseStatusChange::getEvent, AdaptStateChangeEvent.SUBMIT_ADAPT_INFO, - SelfTestStateChangeEvent.SUBMIT_SELF_TEST_INFO, - TestValidStateChangeEvent.SUBMIT_TEST_VALID_INFO, - TenderStateChangeEvent.SUBMIT_PURCHASE_ORG_CONFIRM); + .in(PurchaseStatusChange::getEvent, ADAPT_INFO_PASSED, + SELF_TEST_PASSED, + TEST_VALID_INFO_PASSED, + SUBMIT_PURCHASE_ORG_CONFIRM); List statusChanges = purchaseStatusChangeService.list(purchaseQuery); - Map eventMap = statusChanges.stream() - .collect(Collectors.groupingBy(PurchaseStatusChange::getEvent, - Collectors.collectingAndThen(Collectors.mapping(PurchaseStatusChange::getBidId, Collectors.toSet()), Set::size))); + + Map> projectPurchaseStatusChangeMap = CollUtils.group(statusChanges, PurchaseStatusChange::getProjectId); + TenderAdaptFinishStatVO stat = new TenderAdaptFinishStatVO(); - stat.setFinishTestValidCount(eventMap.getOrDefault(TestValidStateChangeEvent.SUBMIT_TEST_VALID_INFO.name(), 0)); - stat.setFinishAdaptionInfo(eventMap.getOrDefault(AdaptStateChangeEvent.SUBMIT_ADAPT_INFO.name(), 0)); - stat.setFinishOrgConfirmCount(eventMap.getOrDefault(TenderStateChangeEvent.SUBMIT_PURCHASE_ORG_CONFIRM.name(), 0)); - stat.setFinishSelfTestCount(eventMap.getOrDefault(SelfTestStateChangeEvent.SUBMIT_SELF_TEST_INFO.name(), 0)); + stat.setFinishTestValidCount(countAdaptBranchStatus(TEST_VALID_INFO_PASSED, projectIds, projectPurchaseCountMap, projectPurchaseStatusChangeMap)); + stat.setFinishAdaptionInfo(countAdaptBranchStatus(ADAPT_INFO_PASSED, projectIds, projectPurchaseCountMap, projectPurchaseStatusChangeMap)); + stat.setFinishOrgConfirmCount(countAdaptBranchStatus(SUBMIT_PURCHASE_ORG_CONFIRM, projectIds, projectPurchaseCountMap, projectPurchaseStatusChangeMap)); + stat.setFinishSelfTestCount(countAdaptBranchStatus(SELF_TEST_PASSED, projectIds, projectPurchaseCountMap, projectPurchaseStatusChangeMap)); return stat; } + private static int countAdaptBranchStatus(T event, + List projectIds, + Map> projectPurchaseCountMap, + Map> projectPurchaseChangeMap) { + return (int) projectIds.stream().filter(w -> { + int bidCount = CollUtil.count(projectPurchaseCountMap.getOrDefault(w, Collections.emptyList()), + w1 -> BidTypeEnum.BUILD_APP.eq(w1.getBidType())); + List purchaseStatusChanges = projectPurchaseChangeMap.getOrDefault(w, Collections.emptyList()); + int finishedBidCount = purchaseStatusChanges.stream() + .filter(w1 -> w1.getProjectId().equals(w) && event.eq(w1.getEvent())) + .map(PurchaseStatusChange::getBidId) + .collect(Collectors.toSet()).size(); + return finishedBidCount != 0 && finishedBidCount == bidCount; + }).count(); + } + private static int stoppedProjectCount(Map> projectStatusChangeMap, List projectCodes) { return CollUtil.count(projectStatusChangeMap.entrySet(), w -> projectCodes.contains(w.getKey()) @@ -597,17 +620,17 @@ public class WorkbenchManage { 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); + "and event = {1})", BidTypeEnum.BUILD_APP.getCode(), 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); + "and event = {1})", BidTypeEnum.BUILD_APP.getCode(), 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); + "and event = {1})", BidTypeEnum.BUILD_APP.getCode(), ADAPT_INFO_PASSED); break; default: return PageVo.empty();