Browse Source

modify:

1. 标项重新提交、走审核流程;
master
WendyYang 3 weeks ago
parent
commit
6e4ce36aa8
3 changed files with 42 additions and 12 deletions
  1. +3
    -0
      hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/model/vo/PurchaseVO.java
  2. +32
    -12
      hz-pm-api/src/main/java/com/hz/pm/api/projectlib/handle/stage/ProjectPurchaseHandle.java
  3. +7
    -0
      hz-pm-api/src/main/java/com/hz/pm/api/projectlib/manage/ProjectLibManage.java

+ 3
- 0
hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/model/vo/PurchaseVO.java View File

@@ -193,4 +193,7 @@ public class PurchaseVO {
@ApiModelProperty("信创测评时间")
private LocalDate xcfhxEvalFinishDate;

@ApiModelProperty("采购公告发布审核实例")
private String purchaseNoticeInstCode;

}

+ 32
- 12
hz-pm-api/src/main/java/com/hz/pm/api/projectlib/handle/stage/ProjectPurchaseHandle.java View File

@@ -9,15 +9,20 @@ import com.hz.pm.api.projectlib.handle.AbstractProcessHandle;
import com.hz.pm.api.projectlib.handle.HandleParamContext;
import com.hz.pm.api.projectlib.model.entity.Project;
import com.hz.pm.api.projectlib.model.entity.ProjectStatusChange;
import com.hz.pm.api.projectlib.service.IProjectStatusChangeService;
import com.hz.pm.api.projectlib.model.enumeration.InstTypeEnum;
import com.ningdatech.basic.util.CollUtils;
import com.wflow.workflow.bean.vo.ProcessDetailVO;
import com.wflow.workflow.bean.vo.ProcessInfoVO;
import com.wflow.workflow.bean.vo.ProcessProgressVo;
import com.wflow.workflow.enums.StepStatusEnum;
import com.wflow.workflow.service.ProcessInstanceService;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Component;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

import static com.hz.pm.api.projectlib.model.enumeration.status.ProjectStatus.ON_PURCHASING;
import static com.hz.pm.api.projectlib.model.enumeration.status.ProjectStatus.TO_BE_PURCHASED;

/**
@@ -30,9 +35,9 @@ import static com.hz.pm.api.projectlib.model.enumeration.status.ProjectStatus.TO
@RequiredArgsConstructor
public class ProjectPurchaseHandle extends AbstractProcessHandle {

private final IProjectStatusChangeService projectStatusChangeService;
private final IPurchaseService purchaseService;
private final IPurchaseInstService purchaseInstService;
private final ProcessInstanceService processInstanceService;

@Override
public int getOrder() {
@@ -56,22 +61,37 @@ public class ProjectPurchaseHandle extends AbstractProcessHandle {
Project project = ctx.getProject();
if (TO_BE_PURCHASED.eq(project.getStatus())) {
detail.setStepStatus(StepStatusEnum.NOT_START);
} else if (ON_PURCHASING.eq(project.getStatus())) {
detail.setStepStatus(StepStatusEnum.ON_GOING);
} else {
// 根据采购备案的时间获取
ProjectStatusChange change = ctx.getProjectStateChange(ProjectStateChangeEvent.SUBMIT_PURCHASE_CONTRACT_RECORD);
if (change == null) {
List<Purchase> purchases = purchaseService.listByProjectId(project.getId());
ctx.setPurchases(purchases);
if (purchases.isEmpty()) {
detail.setStepStatus(StepStatusEnum.NOT_START);
} else {
detail.setStepStatus(StepStatusEnum.COMPLETED);
detail.setFinishTime(change.getCreateOn());
List<Purchase> purchases = purchaseService.listByProjectId(project.getId());
ctx.setPurchases(purchases);
// 根据采购备案的时间获取
ProjectStatusChange change = ctx.getProjectStateChange(ProjectStateChangeEvent.SUBMIT_PURCHASE_CONTRACT_RECORD);
if (change != null) {
detail.setStepStatus(StepStatusEnum.COMPLETED);
detail.setFinishTime(change.getCreateOn());
} else {
detail.setStepStatus(StepStatusEnum.ON_GOING);
}
List<PurchaseInst> purchaseInstList = purchaseInstService.listByProjectId(project.getId());
ctx.setPurchaseInstList(purchaseInstList);
}
}
if (!StepStatusEnum.NOT_START.equals(detail.getStepStatus())) {
Map<Long, Purchase> purchaseMap = CollUtils.listToMap(ctx.getPurchases(), Purchase::getId);
Map<Long, PurchaseInst> instMap = purchaseInstService.listNewest(purchaseMap.keySet(), InstTypeEnum.PURCHASE_NOTICE.getCode());
List<ProcessInfoVO> processes = new ArrayList<>();
instMap.forEach((bidId, inst) -> {
ProcessProgressVo instDetail = processInstanceService.getProgressInstanceDetail(null, inst.getInstCode());
ProcessInfoVO tenderProgress = new ProcessInfoVO();
tenderProgress.setProcessName(purchaseMap.get(bidId).getBidName());
tenderProgress.setProcessProgressVo(instDetail);
processes.add(tenderProgress);
});
detail.setProcessInfoList(processes);
}
ctx.setPreStepStatus(detail.getStepStatus());
}



+ 7
- 0
hz-pm-api/src/main/java/com/hz/pm/api/projectlib/manage/ProjectLibManage.java View File

@@ -49,9 +49,11 @@ import com.hz.pm.api.projectdeclared.model.dto.DelayedApplyDTO;
import com.hz.pm.api.projectdeclared.model.entity.Operation;
import com.hz.pm.api.projectdeclared.model.entity.PreInsAcceptancePerson;
import com.hz.pm.api.projectdeclared.model.entity.Purchase;
import com.hz.pm.api.projectdeclared.model.entity.PurchaseInst;
import com.hz.pm.api.projectdeclared.model.vo.*;
import com.hz.pm.api.projectdeclared.service.IOperationService;
import com.hz.pm.api.projectdeclared.service.IPreInsAcceptancePersonService;
import com.hz.pm.api.projectdeclared.service.IPurchaseInstService;
import com.hz.pm.api.projectdeclared.service.IPurchaseService;
import com.hz.pm.api.projectdeclared.utils.ProjectCodeGenUtil;
import com.hz.pm.api.projectdeclared.utils.ProjectIdCodeCacheUtil;
@@ -65,6 +67,7 @@ import com.hz.pm.api.projectlib.model.dto.GovSystemReplaceInfoUpgradeContentDTO;
import com.hz.pm.api.projectlib.model.dto.ProjectDTO;
import com.hz.pm.api.projectlib.model.dto.ProjectPaymentPlanDTO;
import com.hz.pm.api.projectlib.model.entity.*;
import com.hz.pm.api.projectlib.model.enumeration.InstTypeEnum;
import com.hz.pm.api.projectlib.model.enumeration.ProjectRenewalApprovalStatusEnum;
import com.hz.pm.api.projectlib.model.enumeration.status.ProjectStatus;
import com.hz.pm.api.projectlib.model.enumeration.status.TenderMainStatus;
@@ -147,6 +150,7 @@ public class ProjectLibManage {
private final IMhProjectService mhProjectService;
private final IMeetingInnerProjectService meetingInnerProjectService;
private final AmountApprovalManage amountApprovalManage;
private final IPurchaseInstService purchaseInstService;

public PageVo<ProjectLibListItemVO> projectLibList(ProjectListReq req) {
LambdaQueryWrapper<Project> query = ProjectManageUtil.projectQuery(req);
@@ -762,6 +766,7 @@ public class ProjectLibManage {
purchase.setStatusName(TenderMainStatus.getDesc(w.getStatus()));
return purchase;
});
Map<Long, PurchaseInst> purchaseInstMap = purchaseInstService.listNewest(purchaseMap.keySet(), InstTypeEnum.PURCHASE_NOTICE.getCode());
//查询合同备案
List<ContractVO> contracts = constructionManage.detailContractByBidIds(purchaseMap.keySet());
Map<Long, ContractVO> contractMap = CollUtils.listToMap(contracts, ContractVO::getBidId);
@@ -777,6 +782,8 @@ public class ProjectLibManage {
List<ProjectGovSystemReplaceInfos> systemReplaceInfos = systemReplaceInfosService.listByBidIds(purchaseMap.keySet());
Map<Long, List<ProjectGovSystemReplaceInfos>> replaceInfosMap = CollUtils.group(systemReplaceInfos, ProjectGovSystemReplaceInfos::getBidId);
purchaseMap.forEach((k, v) -> {
// 赋值最新的采购公告流程实例编码
BizUtils.notNull(purchaseInstMap.get(v.getId()), w -> v.setPurchaseNoticeInstCode(w.getInstCode()));
PurchaseFullInfoVO purchaseFullInfo = new PurchaseFullInfoVO();
purchaseFullInfo.setPurchase(v);
purchaseFullInfo.setOperation(operationMap.get(k));


Loading…
Cancel
Save