fix unit session

This commit is contained in:
etreschenkov 2025-07-09 16:45:56 +03:00
parent df7ad80c24
commit beb0758ff3

View file

@ -40,8 +40,8 @@ public class RequirementAndObligationCreationCompoundAction extends RequirementA
Long sessionId = ctx.getExtendedState().get(DataEnum.sessionId, Long.class);
List<ExecutionCommon> tmpList = new ArrayList<>(Arrays.asList(new ExecutionCommon[2]));
List<ExecutionCommon> executionFond = ctx.getExtendedState().get(DataEnum.dealsPreparedFond, List.class);
List<ExecutionCommon> executionCurrency = ctx.getExtendedState().get(DataEnum.dealsPreparedDeposit, List.class);
List<ExecutionCommon> executionDeposit = ctx.getExtendedState().get(DataEnum.dealsPreparedCurrency, List.class);
List<ExecutionCommon> executionCurrency = ctx.getExtendedState().get(DataEnum.dealsPreparedCurrency, List.class);
List<ExecutionCommon> executionDeposit = ctx.getExtendedState().get(DataEnum.dealsPreparedDeposit, List.class);
Map<Long, Registry> newRgss = storageMap(executionFond, executionCurrency, executionDeposit);
Stream.of(executionFond, executionCurrency, executionDeposit).forEach(c -> c.sort(tradeTimeComparator.thenComparing(execIdComparator).thenComparing(execMarketComparator)));
@ -59,9 +59,21 @@ public class RequirementAndObligationCreationCompoundAction extends RequirementA
);
if (pair == null) continue;
log.info("Pair is not null with execType: {}", pair.getFirst().type());
if (pair.getFirst().type().equals(ExecutionType.ExecutionFond)) ief[0] += 2;
if (pair.getFirst().type().equals(ExecutionType.ExecutionDeposit)) ied[0] += 2;
if (pair.getFirst().type().equals(ExecutionType.ExecutionCurrency)) iec[0] += 2;
if (pair.getFirst().type().equals(ExecutionType.ExecutionFond)) {
log.info("Match ExecutionFond; index before: {}", ief[0]);
ief[0] += 2;
log.info("index after: {}", ief[0]);
}
if (pair.getFirst().type().equals(ExecutionType.ExecutionDeposit)) {
log.info("Match ExecutionDeposit; index before: {}", ied[0]);
ied[0] += 2;
log.info("index after: {}", ied[0]);
}
if (pair.getFirst().type().equals(ExecutionType.ExecutionCurrency)) {
log.info("Match ExecutionCurrency; index before: {}", iec[0]);
iec[0] += 2;
log.info("index after: {}", iec[0]);
}
pair.map(f -> tmpList.set(0, f), s -> tmpList.set(1, s));
createRegisters(tmpList, sessionId, newRgss);
}