This commit is contained in:
parent
478a1d92db
commit
ec71cf9b61
1 changed files with 3 additions and 4 deletions
|
|
@ -200,11 +200,11 @@ public class TradingClearingRegistryValidationConfig {
|
|||
Imdg<Account> accountImdg = context.obtainMap(IMDGDistributedNames.Map_Account, Account.class);
|
||||
Account account = accountImdg.getSingleObjectByID(validatedObject.getMoneyAccountId());
|
||||
if (account == null) { // never
|
||||
return of(AccountError.AccountNotFound, depoAccountId);
|
||||
return of(AccountError.AccountNotFound, validatedObject.getMoneyAccountId());
|
||||
}
|
||||
TradingClearingRegistry updateObject = tcrMap.getSingleObjectByID(validatedObject.getId());
|
||||
if (!Objects.equals(account.getCompanyId(), updateObject.getCompanyId())) {
|
||||
return of(AccountError.AccountNotFound, depoAccountId); // или UserVerifyDenial
|
||||
return of(AccountError.AccountNotFound, validatedObject.getMoneyAccountId()); // или UserVerifyDenial
|
||||
}
|
||||
|
||||
// Проверка использования счёта в других ТКР
|
||||
|
|
@ -216,8 +216,7 @@ public class TradingClearingRegistryValidationConfig {
|
|||
if (existTCR.isEmpty()) {
|
||||
return empty();
|
||||
} else {
|
||||
if (account == null && validatedObject.getDepoAccountId() != null) account = accountImdg.getSingleObjectByID(validatedObject.getDepoAccountId());
|
||||
return of(AccountError.AccountForTradingClearingRegistryAlreadyUsed, account.getAccount());
|
||||
return of(AccountError.AccountForTradingClearingRegistryAlreadyUsed, validatedObject.getDepoAccountId());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue