|
|
@@ -1,12 +1,10 @@ |
|
|
|
package com.hz.pm.api.common.statemachine.builder.impl; |
|
|
|
|
|
|
|
import cn.hutool.core.collection.ListUtil; |
|
|
|
import cn.hutool.core.util.EnumUtil; |
|
|
|
import com.hz.pm.api.common.statemachine.action.TenderStateChangeAction; |
|
|
|
import com.hz.pm.api.common.statemachine.builder.BaseStateMachineBuilder; |
|
|
|
import com.hz.pm.api.common.statemachine.event.TenderStateChangeEvent; |
|
|
|
import com.hz.pm.api.common.statemachine.factory.TenderGuardFactory; |
|
|
|
import com.hz.pm.api.projectdeclared.model.entity.Purchase; |
|
|
|
import com.hz.pm.api.projectdeclared.model.enumerization.BidTypeEnum; |
|
|
|
import com.hz.pm.api.projectlib.model.enumeration.status.ITenderStatus; |
|
|
|
import com.hz.pm.api.projectlib.model.enumeration.status.TenderAdaptStatus; |
|
|
|
import com.hz.pm.api.projectlib.model.enumeration.status.TenderMainStatus; |
|
|
@@ -25,7 +23,8 @@ import org.springframework.statemachine.persist.StateMachinePersister; |
|
|
|
import org.springframework.statemachine.support.DefaultStateMachineContext; |
|
|
|
import org.springframework.stereotype.Component; |
|
|
|
|
|
|
|
import java.util.*; |
|
|
|
import java.util.HashSet; |
|
|
|
import java.util.List; |
|
|
|
|
|
|
|
/** |
|
|
|
* <p> |
|
|
@@ -87,10 +86,7 @@ public class TenderStateMachineBuilderImpl implements BaseStateMachineBuilder<Pu |
|
|
|
.source(TenderMainStatus.TO_BE_SUBMIT_PURCHASE_CONSTRUCTION_INFO) |
|
|
|
.target(TenderMainStatus.TO_BE_SUBMIT_FIRST_INSPECTED_INFO) |
|
|
|
.event(TenderStateChangeEvent.SUBMIT_PURCHASE_CONSTRUCTION_INFO) |
|
|
|
.guard(ctx -> { |
|
|
|
Purchase purchase = TenderStateChangeAction.getPurchaseInfo(ctx.getMessage()); |
|
|
|
return !BidTypeEnum.BUILD_APP.eq(purchase.getBidType()); |
|
|
|
}) |
|
|
|
.guard(new TenderGuardFactory.PurchaseContractRecordGuard()) |
|
|
|
.and() |
|
|
|
// 填写实施计划 |
|
|
|
.withExternal() |
|
|
|