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:
AKurakin 2023-09-18 12:46:04 +03:00
parent 561ddd3b2d
commit 45008556ab
3 changed files with 3 additions and 3 deletions

View file

@ -33,7 +33,7 @@ class SameAccountValidationRule<R> implements IValidationRule<ImdgValidationCont
ImdgPredicateBuilder pb = accountImdg.predicateBuilder();
ImdgPredicate query = pb.and(
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())
);
Account existAccount = accountImdg.getFirstObjectByPredicate(query);

View file

@ -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());
{
AccountSdfToStatementRequestPart responsePart = new AccountSdfToStatementRequestPart();

View file

@ -168,7 +168,7 @@ public class DepoAccountService extends QueueConsumer implements InitializingBea
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());
{
AccountSdfToStatementRequestPart responsePart = new AccountSdfToStatementRequestPart();