ограничение на создание счетов по sdf01/sdf08

This commit is contained in:
ialbert 2023-07-13 14:08:35 +03:00
parent d5b083dcfe
commit 7612126b9e
2 changed files with 23 additions and 0 deletions

View file

@ -232,6 +232,18 @@ public class ClearingAccountService extends QueueConsumer implements Initializin
}
}
if (accountImdg.getFirstObjectBySQL("accountType = '%s' and account = '%s'".formatted(AccountType.Clrn.getKey(), accountReq.getAccount())) != null) {
log.debug("Account {} already exists", accountReq.getAccount());
{
AccountSdfToStatementRequestPart responsePart = new AccountSdfToStatementRequestPart();
responsePart.setSdfId(accountReq.getSdfId());
responsePart.setErrorCode(null);
responsePart.setErrorText(null);
accountToStatement.add(responsePart);
continue accountsLoop;
}
}
Long clearingAccountId = -1L;
Long accountId = -1L;
ClearingAccount clearingAccount = null;

View file

@ -168,6 +168,17 @@ public class DepoAccountService extends QueueConsumer implements InitializingBea
continue accountsLoop;
}
}
if (accountImdg.getFirstObjectBySQL("accountType = '%s' and account = '%s'".formatted(AccountType.Depo.getKey(), accountReq.getAccount())) != null) {
log.debug("Account {} already exists", accountReq.getAccount());
{
AccountSdfToStatementRequestPart responsePart = new AccountSdfToStatementRequestPart();
responsePart.setSdfId(accountReq.getSdfId());
responsePart.setErrorCode(null);
responsePart.setErrorText(null);
accountToStatement.add(responsePart);
continue accountsLoop;
}
}
Long depoAccountId = -1L;
Long accountId = -1L;