account-service http://jira.mfd.msk:8088/browse/CLS-509 http://jira.mfd.msk:8088/browse/CLS-542 имя счетов уникальное между всеми типами (поправил для создания по sdf01-sdf08)
This commit is contained in:
parent
561ddd3b2d
commit
45008556ab
3 changed files with 3 additions and 3 deletions
|
|
@ -33,7 +33,7 @@ class SameAccountValidationRule<R> implements IValidationRule<ImdgValidationCont
|
||||||
ImdgPredicateBuilder pb = accountImdg.predicateBuilder();
|
ImdgPredicateBuilder pb = accountImdg.predicateBuilder();
|
||||||
ImdgPredicate query = pb.and(
|
ImdgPredicate query = pb.and(
|
||||||
pb.equals("account", accountGetter.apply(req)), // req.getAccount()
|
pb.equals("account", accountGetter.apply(req)), // req.getAccount()
|
||||||
pb.equals("accountType", accountType),
|
// pb.equals("accountType", accountType), имена всех счетов уникальны, вне зависимости от типа
|
||||||
pb.in("status", ServiceStatus.Active.getKey(), ServiceStatus.Reopened.getKey(), ServiceStatus.Appl.getKey())
|
pb.in("status", ServiceStatus.Active.getKey(), ServiceStatus.Reopened.getKey(), ServiceStatus.Appl.getKey())
|
||||||
);
|
);
|
||||||
Account existAccount = accountImdg.getFirstObjectByPredicate(query);
|
Account existAccount = accountImdg.getFirstObjectByPredicate(query);
|
||||||
|
|
|
||||||
|
|
@ -259,7 +259,7 @@ public class ClearingAccountService extends QueueConsumer implements Initializin
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (accountImdg.getFirstObjectBySQL("accountType = '%s' and account = '%s'".formatted(AccountType.Clrn.getKey(), accountReq.getAccount())) != null) {
|
if (accountImdg.getFirstObjectBySQL("account = '%s'".formatted(accountReq.getAccount())) != null) {
|
||||||
log.debug("Account {} already exists", accountReq.getAccount());
|
log.debug("Account {} already exists", accountReq.getAccount());
|
||||||
{
|
{
|
||||||
AccountSdfToStatementRequestPart responsePart = new AccountSdfToStatementRequestPart();
|
AccountSdfToStatementRequestPart responsePart = new AccountSdfToStatementRequestPart();
|
||||||
|
|
|
||||||
|
|
@ -168,7 +168,7 @@ public class DepoAccountService extends QueueConsumer implements InitializingBea
|
||||||
continue accountsLoop;
|
continue accountsLoop;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (accountImdg.getFirstObjectBySQL("accountType = '%s' and account = '%s'".formatted(AccountType.Depo.getKey(), accountReq.getAccount())) != null) {
|
if (accountImdg.getFirstObjectBySQL("account = '%s'".formatted(accountReq.getAccount())) != null) {
|
||||||
log.debug("Account {} already exists", accountReq.getAccount());
|
log.debug("Account {} already exists", accountReq.getAccount());
|
||||||
{
|
{
|
||||||
AccountSdfToStatementRequestPart responsePart = new AccountSdfToStatementRequestPart();
|
AccountSdfToStatementRequestPart responsePart = new AccountSdfToStatementRequestPart();
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue