Browse Source

modify:

1. 适配改造中项目状态变化修改;
tags/24082201
WendyYang 4 months ago
parent
commit
df7c0dfdf1
2 changed files with 4 additions and 3 deletions
  1. +2
    -1
      hz-pm-api/src/main/java/com/hz/pm/api/common/statemachine/builder/impl/ProjectStateMachineBuilderImpl.java
  2. +2
    -2
      hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/manage/PurchaseManage.java

+ 2
- 1
hz-pm-api/src/main/java/com/hz/pm/api/common/statemachine/builder/impl/ProjectStateMachineBuilderImpl.java View File

@@ -3,6 +3,7 @@ package com.hz.pm.api.common.statemachine.builder.impl;
import com.hz.pm.api.common.statemachine.builder.BaseStateMachineBuilder;
import com.hz.pm.api.common.statemachine.event.ProjectStateChangeEvent;
import com.hz.pm.api.common.statemachine.factory.ProjectGuardFactory;
import com.hz.pm.api.common.statemachine.factory.ProjectGuardFactory.ProjectPurchaseToFirstAcceptGuard;
import com.hz.pm.api.projectlib.model.entity.Project;
import com.hz.pm.api.projectlib.model.enumeration.status.ProjectStatus;
import lombok.RequiredArgsConstructor;
@@ -154,7 +155,7 @@ public class ProjectStateMachineBuilderImpl implements BaseStateMachineBuilder<P
.source(ProjectStatus.ON_PURCHASING)
.target(ProjectStatus.TO_BE_FIRST_INSPECTED)
.event(ProjectStateChangeEvent.SUBMIT_PURCHASE_CONTRACT_RECORD)
.guard(new ProjectGuardFactory.ProjectPurchaseToFirstAcceptGuard())
.guard(new ProjectPurchaseToFirstAcceptGuard())
.and()
// 填写试试计划 -> 待初验
.withExternal()


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

@@ -451,10 +451,10 @@ public class PurchaseManage {
contractService.saveOrUpdate(contract);
// 判断是否所有标项都完成了采购合同备案
Wrapper<Purchase> select = Wrappers.lambdaQuery(Purchase.class)
.select(Purchase::getId, Purchase::getAgency)
.select(Purchase::getId, Purchase::getSupplier)
.eq(Purchase::getProjectId, projectId);
List<Purchase> purchases = purchaseService.list(select);
if (CollUtil.allMatch(purchases, w -> StrUtil.isNotBlank(w.getAgency()))) {
if (CollUtil.allMatch(purchases, w -> StrUtil.isNotBlank(w.getSupplier()))) {
projectStateMachineUtil.pass(project);
}
// 修改项目合同金额


Loading…
Cancel
Save