etreschenkov 2024-07-02 11:26:14 +03:00
parent cb971d6b2b
commit 7ff46aae19

View file

@ -17,6 +17,7 @@ import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.util.StringUtils; import org.springframework.util.StringUtils;
import ru.clearing.classes.statics.data.account.Account; import ru.clearing.classes.statics.data.account.Account;
import ru.clearing.classes.statics.data.account.AccountSymbols;
import ru.clearing.classes.statics.data.account.ClearingAccount; import ru.clearing.classes.statics.data.account.ClearingAccount;
import ru.clearing.classes.statics.data.account.ClientCode; import ru.clearing.classes.statics.data.account.ClientCode;
import ru.clearing.classes.statics.data.account.DepoAccount; import ru.clearing.classes.statics.data.account.DepoAccount;
@ -77,6 +78,7 @@ public class TradingClearingRegistryService extends QueueConsumer implements Ini
private final Imdg<ClearingAccount> clearingAccountImdg; private final Imdg<ClearingAccount> clearingAccountImdg;
private final Imdg<InformationAccount> informationAccountImdg; private final Imdg<InformationAccount> informationAccountImdg;
private final Imdg<Account> accountImdg; private final Imdg<Account> accountImdg;
private final Imdg<AccountSymbols> accountSymbolsImdg;
private final Imdg<Company> companyImdg; private final Imdg<Company> companyImdg;
private final Imdg<CompanySymbols> companySymbolsImdg; private final Imdg<CompanySymbols> companySymbolsImdg;
private final Imdg<Relation> relationImdg; private final Imdg<Relation> relationImdg;
@ -120,6 +122,7 @@ public class TradingClearingRegistryService extends QueueConsumer implements Ini
this.informationAccountImdg = imdgProvider.getImdg(IMDGDistributedNames.Map_InformationAccount, InformationAccount.class); this.informationAccountImdg = imdgProvider.getImdg(IMDGDistributedNames.Map_InformationAccount, InformationAccount.class);
this.companyImdg = imdgProvider.getImdg(IMDGDistributedNames.Map_Company, Company.class); this.companyImdg = imdgProvider.getImdg(IMDGDistributedNames.Map_Company, Company.class);
this.accountImdg = imdgProvider.getImdg(IMDGDistributedNames.Map_Account, Account.class); this.accountImdg = imdgProvider.getImdg(IMDGDistributedNames.Map_Account, Account.class);
this.accountSymbolsImdg = imdgProvider.getImdg(IMDGDistributedNames.Map_AccountSymbols, AccountSymbols.class);
this.relationImdg = imdgProvider.getImdg(IMDGDistributedNames.Map_Relation, Relation.class); this.relationImdg = imdgProvider.getImdg(IMDGDistributedNames.Map_Relation, Relation.class);
this.clientCodeImdg = imdgProvider.getImdg(IMDGDistributedNames.Map_ClientCode, ClientCode.class); this.clientCodeImdg = imdgProvider.getImdg(IMDGDistributedNames.Map_ClientCode, ClientCode.class);
this.companySymbolsImdg = imdgProvider.getImdg(IMDGDistributedNames.Map_CompanySymbols, CompanySymbols.class); this.companySymbolsImdg = imdgProvider.getImdg(IMDGDistributedNames.Map_CompanySymbols, CompanySymbols.class);
@ -577,9 +580,11 @@ public class TradingClearingRegistryService extends QueueConsumer implements Ini
} }
tkr.setAccountTypeName(accountType); tkr.setAccountTypeName(accountType);
if (tradingClearingRegistry.getDepoAccountId() != null) { if (tradingClearingRegistry.getDepoAccountId() != null) {
Account depoAccount = accountImdg.getSingleObjectByID(tradingClearingRegistry.getDepoAccountId()); AccountSymbols depoAccountSymbol = accountSymbolsImdg.getFirstObjectByFieldValues(
if (depoAccount != null) { Map.of("accountId", tradingClearingRegistry.getDepoAccountId())
tkr.setDepoAccount(depoAccount.getAccount()); );
if (depoAccountSymbol != null) {
tkr.setDepoAccount(depoAccountSymbol.getAccountSymbolValue());
} }
} }
{ {