fix unit session
This commit is contained in:
parent
df7ad80c24
commit
beb0758ff3
1 changed files with 17 additions and 5 deletions
|
|
@ -40,8 +40,8 @@ public class RequirementAndObligationCreationCompoundAction extends RequirementA
|
||||||
Long sessionId = ctx.getExtendedState().get(DataEnum.sessionId, Long.class);
|
Long sessionId = ctx.getExtendedState().get(DataEnum.sessionId, Long.class);
|
||||||
List<ExecutionCommon> tmpList = new ArrayList<>(Arrays.asList(new ExecutionCommon[2]));
|
List<ExecutionCommon> tmpList = new ArrayList<>(Arrays.asList(new ExecutionCommon[2]));
|
||||||
List<ExecutionCommon> executionFond = ctx.getExtendedState().get(DataEnum.dealsPreparedFond, List.class);
|
List<ExecutionCommon> executionFond = ctx.getExtendedState().get(DataEnum.dealsPreparedFond, List.class);
|
||||||
List<ExecutionCommon> executionCurrency = ctx.getExtendedState().get(DataEnum.dealsPreparedDeposit, List.class);
|
List<ExecutionCommon> executionCurrency = ctx.getExtendedState().get(DataEnum.dealsPreparedCurrency, List.class);
|
||||||
List<ExecutionCommon> executionDeposit = 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);
|
Map<Long, Registry> newRgss = storageMap(executionFond, executionCurrency, executionDeposit);
|
||||||
Stream.of(executionFond, executionCurrency, executionDeposit).forEach(c -> c.sort(tradeTimeComparator.thenComparing(execIdComparator).thenComparing(execMarketComparator)));
|
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;
|
if (pair == null) continue;
|
||||||
log.info("Pair is not null with execType: {}", pair.getFirst().type());
|
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.ExecutionFond)) {
|
||||||
if (pair.getFirst().type().equals(ExecutionType.ExecutionDeposit)) ied[0] += 2;
|
log.info("Match ExecutionFond; index before: {}", ief[0]);
|
||||||
if (pair.getFirst().type().equals(ExecutionType.ExecutionCurrency)) iec[0] += 2;
|
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));
|
pair.map(f -> tmpList.set(0, f), s -> tmpList.set(1, s));
|
||||||
createRegisters(tmpList, sessionId, newRgss);
|
createRegisters(tmpList, sessionId, newRgss);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue