This commit is contained in:
parent
6a4a7ec4e7
commit
e0eebea890
3 changed files with 27 additions and 21 deletions
|
|
@ -544,19 +544,23 @@ public class TradingClearingRegistryService extends QueueConsumer implements Ini
|
|||
accountType = "Клиентский обособленный";
|
||||
}
|
||||
tkr.setAccountTypeName(accountType);
|
||||
if (tradingClearingRegistry.getDepoAccountId() != null) {
|
||||
DepoAccount depoAccount = depoAccountImdg.getSingleObjectByID(tradingClearingRegistry.getDepoAccountId());
|
||||
Account account = null;
|
||||
if (depoAccount != null) {
|
||||
account = accountImdg.getSingleObjectByID(depoAccount.getAccountId());
|
||||
tkr.setDepoAccount(account.getAccount());
|
||||
}
|
||||
}
|
||||
{
|
||||
if (tradingClearingRegistry.getMoneyAccountId() != null) {
|
||||
Account moneyAccount = accountImdg.getSingleObjectByID(tradingClearingRegistry.getMoneyAccountId());
|
||||
MoneyAccountMsg moneyAccountMsg = new MoneyAccountMsg();
|
||||
moneyAccountMsg.setAccount(moneyAccount.getAccount());
|
||||
moneyAccountMsg.setCurrCode(StringUtils.hasText(moneyAccount.getCurrency()) ? moneyAccount.getCurrency() : "RUB");
|
||||
tkr.getMoneyAccounts().add(moneyAccountMsg);
|
||||
}
|
||||
}
|
||||
{
|
||||
Collection<TradingClearingRegistryList> tradingClearingRegistries = tradingClearingRegistryListImdg.getCollectionObjectsByFieldValues(
|
||||
Map.of(
|
||||
|
|
|
|||
|
|
@ -17,9 +17,11 @@ public class TkrAdapter {
|
|||
tkrResponse.setEnabled(infoAccount.getEnabled());
|
||||
tkrResponse.setTkrCode(infoAccount.getTkrCode());
|
||||
tkrResponse.setDepoAccount(infoAccount.getDepoAccount());
|
||||
if (infoAccount.getMoneyAccounts() != null) {
|
||||
List<MoneyAccountMsg> moneyAccountMsgs = infoAccount.getMoneyAccounts().stream()
|
||||
.map(this::toMoneyAccountMsg).toList();
|
||||
tkrResponse.setMoneyAccounts(moneyAccountMsgs);
|
||||
}
|
||||
return tkrResponse;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -5,21 +5,21 @@ import java.util.List;
|
|||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
public class Tkr {
|
||||
@JsonProperty
|
||||
@JsonProperty("company_id")
|
||||
private String companyId;
|
||||
@JsonProperty
|
||||
@JsonProperty("trading_code")
|
||||
private Long tradingCode;
|
||||
@JsonProperty
|
||||
@JsonProperty("client_code")
|
||||
private String clientCode;
|
||||
@JsonProperty
|
||||
@JsonProperty("tkr_code")
|
||||
private String tkrCode;
|
||||
@JsonProperty
|
||||
@JsonProperty("tkr_type")
|
||||
private String tkrType;
|
||||
@JsonProperty
|
||||
@JsonProperty("account_type_name")
|
||||
private String accountTypeName;
|
||||
@JsonProperty
|
||||
@JsonProperty("depo_account")
|
||||
private String depoAccount;
|
||||
@JsonProperty
|
||||
@JsonProperty("money_account")
|
||||
private List<MoneyAccountMsg> moneyAccounts = new ArrayList<>();
|
||||
|
||||
public String getCompanyId() {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue