Browse Source

modify:

1. 适配改造增加状态 单位已确认;
tags/24082201^0
WendyYang 4 months ago
parent
commit
220349b0df
2 changed files with 19 additions and 1 deletions
  1. +18
    -1
      hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/manage/PurchaseManage.java
  2. +1
    -0
      hz-pm-api/src/main/java/com/hz/pm/api/projectlib/model/enumeration/status/TenderMainStatus.java

+ 18
- 1
hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/manage/PurchaseManage.java View File

@@ -39,6 +39,7 @@ import com.hz.pm.api.projectdeclared.model.req.*;
import com.hz.pm.api.projectdeclared.model.req.SubmitPurchaseNoticeReq.PurchaseNoticeTenderDTO;
import com.hz.pm.api.projectdeclared.model.vo.*;
import com.hz.pm.api.projectdeclared.service.*;
import com.hz.pm.api.projectlib.entity.PurchaseStatusChange;
import com.hz.pm.api.projectlib.helper.ProjectManageUtil;
import com.hz.pm.api.projectlib.model.entity.Project;
import com.hz.pm.api.projectlib.model.entity.ProjectInst;
@@ -49,6 +50,7 @@ import com.hz.pm.api.projectlib.model.vo.ProjectLibListItemVO;
import com.hz.pm.api.projectlib.model.vo.TenderListInfoVO;
import com.hz.pm.api.projectlib.service.IProjectInstService;
import com.hz.pm.api.projectlib.service.IProjectService;
import com.hz.pm.api.projectlib.service.IPurchaseStatusChangeService;
import com.hz.pm.api.sys.manage.ProcessModelManage;
import com.hz.pm.api.user.helper.MhUnitCache;
import com.hz.pm.api.user.security.model.UserFullInfoDTO;
@@ -120,6 +122,7 @@ public class PurchaseManage {
private final EnvironmentUtil environmentUtil;
private final IXinchuangService xinchuangService;
private final MhXchxFileHelper mhXchxFileHelper;
private final IPurchaseStatusChangeService purchaseStatusChangeService;

/**
* 待采购的-项目列表
@@ -577,10 +580,24 @@ public class PurchaseManage {
List<Project> projects = projectService.list(projectQuery);
Map<Long, Project> projectMap = CollUtils.listToMap(projects, Project::getId);
Map<Long, Contract> contractMap = contractService.listByProjectIds(projectIds);
List<Long> finishOrgConfirmBidIds = new ArrayList<>();
if (req.getStatus() == null) {
List<Long> bidIds = CollUtils.fieldList(records, Purchase::getId);
Wrapper<PurchaseStatusChange> pscQuery = Wrappers.lambdaQuery(PurchaseStatusChange.class)
.select(PurchaseStatusChange::getBidId)
.eq(PurchaseStatusChange::getEvent, TenderStateChangeEvent.SUBMIT_PURCHASE_ORG_CONFIRM)
.in(PurchaseStatusChange::getBidId, bidIds);
List<PurchaseStatusChange> changes = purchaseStatusChangeService.list(pscQuery);
changes.forEach(c -> finishOrgConfirmBidIds.add(c.getBidId()));
}
List<PurchaseAdaptionListVO> data = records.stream().map(w -> {
PurchaseAdaptionListVO adaption = new PurchaseAdaptionListVO();
adaption.setBidId(w.getId());
adaption.setStatus(w.getStatus());
if (finishOrgConfirmBidIds.contains(w.getId())) {
adaption.setStatus(TenderMainStatus.ORG_CONFIRM_PASSED.getCode());
} else {
adaption.setStatus(w.getStatus());
}
adaption.setBizName(w.getBidName());
adaption.setProjectId(w.getProjectId());
Project project = projectMap.get(w.getProjectId());


+ 1
- 0
hz-pm-api/src/main/java/com/hz/pm/api/projectlib/model/enumeration/status/TenderMainStatus.java View File

@@ -28,6 +28,7 @@ public enum TenderMainStatus implements ITenderStatus {
TO_BE_SUBMIT_OPERATION_PLAN(ProjectStatus.ON_ADAPTING, 103, "待填写实施计划"),
// 衔接状态
WAIT_ORG_CONFIRM(ProjectStatus.ON_ADAPTING, 104, "待单位确认"),
ORG_CONFIRM_PASSED(ProjectStatus.ON_ADAPTING, 105, "单位已确认"),
TO_BE_SUBMIT_FIRST_INSPECTED_INFO(ProjectStatus.TO_BE_FIRST_INSPECTED, 201, "待上传初验材料"),
TO_BE_SUBMIT_FINALLY_INSPECTED_APPLY(ProjectStatus.ON_PILOT_RUNNING, 401, "待终验申报"),
ON_FINALLY_INSPECTED_APPLY(ProjectStatus.ON_FINALLY_INSPECTED, 501, "终验申报中"),


Loading…
Cancel
Save