пофиксил конфликты типов в PaymentsWereCreatedListGuard.java; PaymentsWereNotCreatedListGuard.java

This commit is contained in:
etreschenkov 2025-07-04 15:32:45 +03:00
parent 33785cfac0
commit 6b55112a79
7 changed files with 18 additions and 27 deletions

View file

@ -36,8 +36,8 @@ import ru.spcex.clearing.session.state.action.ReviseStage1Action;
import ru.spcex.clearing.session.state.action.SaveRegistriesAndContinueAction;
import ru.spcex.clearing.session.state.action.Sdf56Action;
import ru.spcex.clearing.session.state.action.SdfReceivedAction;
import ru.spcex.clearing.session.state.guard.PaymentsWereCreatedGuard;
import ru.spcex.clearing.session.state.guard.PaymentsWereNotCreatedGuard;
import ru.spcex.clearing.session.state.guard.PaymentsWereCreatedListGuard;
import ru.spcex.clearing.session.state.guard.PaymentsWereNotCreatedListGuard;
import ru.spcex.clearing.session.state.guard.SdfGuard;
import ru.spcex.clearing.session.state.guard.SdfGuardExtractorAfterAgainRevise;
import ru.spcex.clearing.session.state.guard.SdfGuardUtil;
@ -224,14 +224,14 @@ public class PrimaryAuctionB0SessionStateMachineConfig
.withExternal()
.source(TaskType.FormingPaymentInstruction)
.target(TaskType.AgainRevise)
.guard(PaymentsWereNotCreatedGuard.instance)
.guard(new PaymentsWereNotCreatedListGuard(FormingPaymentInstructionSecuritiesAction.key))
.action(againRevise)
.and()
//если создались paymentInstruction, переходим в режим ожидания
.withExternal()
.source(TaskType.FormingPaymentInstruction)
.target(TaskType.PSEUDO_waitSdfAfterPaymentInstructions)
.guard(PaymentsWereCreatedGuard.instance);
.guard(new PaymentsWereCreatedListGuard(FormingPaymentInstructionSecuritiesAction.key));
}
private void sourcePseudoWaitSdfAfterPaymentInstructions(StateMachineTransitionConfigurer<TaskType, SsnEvent> transitions) throws Exception {

View file

@ -35,8 +35,8 @@ import ru.spcex.clearing.session.state.action.ReviseStage1Action;
import ru.spcex.clearing.session.state.action.SaveRegistriesAndContinueAction;
import ru.spcex.clearing.session.state.action.Sdf56Action;
import ru.spcex.clearing.session.state.action.SdfReceivedAction;
import ru.spcex.clearing.session.state.guard.PaymentsWereCreatedGuard;
import ru.spcex.clearing.session.state.guard.PaymentsWereNotCreatedGuard;
import ru.spcex.clearing.session.state.guard.PaymentsWereCreatedListGuard;
import ru.spcex.clearing.session.state.guard.PaymentsWereNotCreatedListGuard;
import ru.spcex.clearing.session.state.guard.SdfGuardUtil;
import ru.spcex.clearing.session.state.guard.SdfSetGuard;
import ru.spcex.clearing.session.state.guard.StashedRegistriesPresentGuard;
@ -210,14 +210,14 @@ public class PrimaryAuctionBnSessionStateMachineConfig
.withExternal()
.source(TaskType.FormingPaymentInstruction)
.target(TaskType.FinishingSession)
.guard(PaymentsWereNotCreatedGuard.instance)
.guard(new PaymentsWereNotCreatedListGuard(FormingPaymentInstructionSecuritiesAction.key))
.action(finishingSessionAction)
.and()
//если создались paymentInstruction, переходим в режим ожидания
.withExternal()
.source(TaskType.FormingPaymentInstruction)
.target(TaskType.PSEUDO_waitSdfAfterPaymentInstructions)
.guard(PaymentsWereCreatedGuard.instance);
.guard(new PaymentsWereCreatedListGuard(FormingPaymentInstructionSecuritiesAction.key));
}
private void sourcePseudoWaitSdfAfterPaymentInstructions(StateMachineTransitionConfigurer<TaskType, SsnEvent> transitions) throws Exception {

View file

@ -36,8 +36,8 @@ import ru.spcex.clearing.session.state.action.ReviseStage1Action;
import ru.spcex.clearing.session.state.action.SaveRegistriesAndContinueAction;
import ru.spcex.clearing.session.state.action.Sdf56Action;
import ru.spcex.clearing.session.state.action.SdfReceivedAction;
import ru.spcex.clearing.session.state.guard.PaymentsWereCreatedGuard;
import ru.spcex.clearing.session.state.guard.PaymentsWereNotCreatedGuard;
import ru.spcex.clearing.session.state.guard.PaymentsWereCreatedListGuard;
import ru.spcex.clearing.session.state.guard.PaymentsWereNotCreatedListGuard;
import ru.spcex.clearing.session.state.guard.SdfGuard;
import ru.spcex.clearing.session.state.guard.SdfGuardExtractorAfterAgainRevise;
import ru.spcex.clearing.session.state.guard.SdfGuardUtil;
@ -224,14 +224,14 @@ public class PrimaryAuctionT0SessionStateMachineConfig
.withExternal()
.source(TaskType.FormingPaymentInstruction)
.target(TaskType.AgainRevise)
.guard(PaymentsWereNotCreatedGuard.instance)
.guard(new PaymentsWereNotCreatedListGuard(FormingPaymentInstructionSecuritiesAction.key))
.action(againRevise)
.and()
//если создались paymentInstruction, переходим в режим ожидания
.withExternal()
.source(TaskType.FormingPaymentInstruction)
.target(TaskType.PSEUDO_waitSdfAfterPaymentInstructions)
.guard(PaymentsWereCreatedGuard.instance);
.guard(new PaymentsWereCreatedListGuard(FormingPaymentInstructionSecuritiesAction.key));
}
private void sourcePseudoWaitSdfAfterPaymentInstructions(StateMachineTransitionConfigurer<TaskType, SsnEvent> transitions) throws Exception {

View file

@ -55,6 +55,7 @@ public class FormingPaymentInstructionReturnMkrAction extends AbstractSessionAct
private final Imdg<PaymentInstruction> paymentInstructionImdg;
private final Imdg<Account> accountImdg;
private final RegistryManager rgsMng;
public static final DataEnum key = DataEnum.paymentInstructionReturnMkr;
@Autowired
public FormingPaymentInstructionReturnMkrAction(ImdgProvider imdgProvider,
@ -181,7 +182,7 @@ public class FormingPaymentInstructionReturnMkrAction extends AbstractSessionAct
setUpdatedStoreInImdg(dmtClnr.get(), now);
}
}
ctx.getExtendedState().getVariables().put(DataEnum.paymentInstructionReturnMkr, pmtCreated);
ctx.getExtendedState().getVariables().put(key, pmtCreated);
}
private void setUpdatedStoreInImdg(Registry rgs, Instant now) {

View file

@ -62,6 +62,7 @@ public class FormingPaymentInstructionSecuritiesAction extends AbstractSessionAc
private final Imdg<Account> accountImdg;
private final RegistryManager rgsMng;
private final Sdf03And12Sender sdf03And12Sender;
public static final DataEnum key = DataEnum.paymentInstructionSecurity;
@Autowired
public FormingPaymentInstructionSecuritiesAction(ImdgProvider imdgProvider,
@ -271,7 +272,7 @@ public class FormingPaymentInstructionSecuritiesAction extends AbstractSessionAc
log.debug("PaymentInstruction size {}", paymentInstructionAll.size());
sdf03And12Sender.sendSdfs(paymentInstructionAll, sessionId);
ctx.getExtendedState().getVariables().put(DataEnum.paymentInstructionSecurity, paymentInstructionAll);
ctx.getExtendedState().getVariables().put(key, paymentInstructionAll);
}
private Collection<Registry> selectSecurityRegistries(Long sessionId) {

View file

@ -10,12 +10,7 @@ import ru.spcex.clearing.session.state.SsnEvent;
public class PaymentsWereCreatedListGuard implements Guard<TaskType, SsnEvent> {
public static final PaymentsWereCreatedListGuard instance = new PaymentsWereCreatedListGuard();
private DataEnum key = DataEnum.paymentsWereCreatedDepositReturn;
private PaymentsWereCreatedListGuard() {
}
private final DataEnum key;
public PaymentsWereCreatedListGuard(final DataEnum key) {
this.key = key;

View file

@ -9,13 +9,7 @@ import ru.spcex.clearing.session.state.DataEnum;
import ru.spcex.clearing.session.state.SsnEvent;
public class PaymentsWereNotCreatedListGuard implements Guard<TaskType, SsnEvent> {
public static final PaymentsWereNotCreatedListGuard instance = new PaymentsWereNotCreatedListGuard();
private DataEnum key = DataEnum.paymentsWereCreatedDepositReturn;
private PaymentsWereNotCreatedListGuard() {
}
private final DataEnum key;
public PaymentsWereNotCreatedListGuard(final DataEnum key) {
this.key = key;