This commit is contained in:
parent
a44c6072a3
commit
ae9bff9b16
1 changed files with 4 additions and 3 deletions
|
|
@ -62,7 +62,7 @@ public class AccountFacade implements IClearingFacade {
|
|||
String currencyCode = moneyAccountMsgRequest.getCurrCode() == null ? CurrencyCode.RUB.getKey() : moneyAccountMsgRequest.getCurrCode();
|
||||
Instant now = Instant.now();
|
||||
|
||||
String accountValue = defineAccountValForInfo(currencyCode);
|
||||
String accountValue = defineAccountValForInfo(currencyCode, moneyAccountMsgRequest.getEks_account());
|
||||
Account account = new Account();
|
||||
account.setCompanyId(company.getId());
|
||||
account.setAccount(accountValue);
|
||||
|
|
@ -78,7 +78,7 @@ public class AccountFacade implements IClearingFacade {
|
|||
return new Pair<>(specificAccId, currencyCode);
|
||||
}
|
||||
|
||||
private String defineAccountValForInfo(String currencyCode) {
|
||||
private String defineAccountValForInfo(String currencyCode, String eksAccount) {
|
||||
ImdgPredicateBuilder predicateBuilder = currencyImdg.predicateBuilder();
|
||||
Currency currency = currencyImdg.getFirstObjectByPredicate(
|
||||
predicateBuilder.equals("currencyCode", currencyCode)
|
||||
|
|
@ -88,7 +88,8 @@ public class AccountFacade implements IClearingFacade {
|
|||
ImdgPredicateBuilder pb = accountImdg.predicateBuilder();
|
||||
ImdgPredicate andPredicate = pb.and(
|
||||
pb.equals("accountType", AccountType.Anlt.getKey()),
|
||||
pb.equals("currency", currencyCode)
|
||||
pb.equals("currency", currencyCode),
|
||||
pb.equals("account", eksAccount)
|
||||
);
|
||||
Collection<Account> accountsAnlt = accountImdg.getCollectionObjectsByPredicate(andPredicate);
|
||||
if (accountsAnlt.isEmpty()) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue