This commit is contained in:
parent
c7644bc07e
commit
da33692e03
1 changed files with 1 additions and 3 deletions
|
|
@ -52,7 +52,7 @@ public enum GatewayUpdateEksClientCodeValidationRule implements IValidationRule<
|
|||
ImdgPredicateBuilder predicateBuilder = accountImdg.predicateBuilder();
|
||||
List<MoneyAccountMsgRequest> accounts = validatedObject.getMoneyAccounts().stream()
|
||||
.filter(moneyAccountMsgRequest ->
|
||||
moneyAccountMsgRequest.getStatus().equals("ADD")
|
||||
moneyAccountMsgRequest.getStatus().equals("NEW")
|
||||
&& !CurrencyCode.RUB.equalsByKey(moneyAccountMsgRequest.getCurrCode()))
|
||||
.toList();
|
||||
List<Account> clrnAccounts = new ArrayList<>();
|
||||
|
|
@ -64,14 +64,12 @@ public enum GatewayUpdateEksClientCodeValidationRule implements IValidationRule<
|
|||
)
|
||||
);
|
||||
if (account == null) {
|
||||
//todo пропускать такие счета и не выдавать ошибку? just continue;
|
||||
return of(AccountError.AccountNotFound, request.getAccount());
|
||||
}
|
||||
TradingClearingRegistryList tkrListByAccount = tkrList.getSingleObjectByPredicate(
|
||||
predicateBuilder.equals("accountId", account.getId())
|
||||
);
|
||||
if (tkrListByAccount != null) {
|
||||
//todo пропускать такие счета и не выдавать ошибку? just continue;
|
||||
return of(AccountError.AccountForTradingClearingRegistryAlreadyUsed, account.getId());
|
||||
}
|
||||
clrnAccounts.add(account);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue