SDF57 processing
This commit is contained in:
parent
b5de68ae1e
commit
53e10b7527
2 changed files with 8 additions and 6 deletions
|
|
@ -127,9 +127,9 @@ public class Sdf57Executor extends AbstractExecutor<SDf57> {
|
|||
Account accountCred = validator.getStored(ValidationStored.Sdf57AccountCred);
|
||||
|
||||
//адресат CREDIT / владелец DEBIT
|
||||
Optional<Statement> statementDeb = createStatementIfNeeded.apply(companyCred, accountCred, InOutDirection.in);
|
||||
Optional<Statement> statementDeb = createStatementIfNeeded.apply(companyDeb, accountDeb, InOutDirection.in);
|
||||
//адресат DEBIT / владелец CREDIT
|
||||
Optional<Statement> statementCred = createStatementIfNeeded.apply(companyDeb, accountDeb, InOutDirection.out);
|
||||
Optional<Statement> statementCred = createStatementIfNeeded.apply(companyCred, accountCred, InOutDirection.out);
|
||||
|
||||
Consumer<StmtCmpAcc> createRegistryIfNeeded = stmtCmpAcc -> {
|
||||
Statement stmt = stmtCmpAcc.statement();
|
||||
|
|
@ -213,9 +213,11 @@ public class Sdf57Executor extends AbstractExecutor<SDf57> {
|
|||
//rgs.setTradingClearingRegistry(); //todo !
|
||||
rgs.setRegistryStatus(RegistryStatus.PROC.getKey());
|
||||
rgs.setSecurityId(statement.getSecurityId());
|
||||
Security security = securityImdg.getSingleObjectByID(statement.getSecurityId());
|
||||
if (security != null) {
|
||||
rgs.setSecuritySymbol(security.getSecuritySymbol());
|
||||
if (statement.getSecurityId() != null) {
|
||||
Security security = securityImdg.getSingleObjectByID(statement.getSecurityId());
|
||||
if (security != null) {
|
||||
rgs.setSecuritySymbol(security.getSecuritySymbol());
|
||||
}
|
||||
}
|
||||
InOutDirection inOutDirection = IEnumKey.getEnumByKey(InOutDirection.class, statement.getInOutDirection());
|
||||
//считаю balance при создании нулевым и исхожу из этого
|
||||
|
|
|
|||
|
|
@ -257,7 +257,7 @@ public class ImdgHazelcast<T extends SpcexObjectBase> implements Imdg<T> {
|
|||
if (els.size() > 1) {
|
||||
throw new RuntimeException("More than one element found by predicate - " + els.size());
|
||||
}
|
||||
return els.iterator().next();
|
||||
return els.size() == 1 ? els.iterator().next() : null;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue