ialbert 2026-02-18 11:18:46 +03:00
parent 478a1d92db
commit ec71cf9b61

View file

@ -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());
}
}
}