Compare commits

..

No commits in common. "moving_registry-service" and "10_01_2024_hotfix" have entirely different histories.

593 changed files with 8416 additions and 40433 deletions

View file

@ -5,7 +5,7 @@
<parent>
<artifactId>clearing-parent</artifactId>
<groupId>ru.spcex.clearing</groupId>
<version>SPCEX-3.11.0.0</version>
<version>SPCEX-1.0.0.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>
@ -48,12 +48,6 @@
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
</dependency>
<!-- special logging -->
<dependency>
<groupId>net.logstash.logback</groupId>
<artifactId>logstash-logback-encoder</artifactId>
<version>7.0.1</version>
</dependency>
<!-- TEST -->
<dependency>
<groupId>ru.spcex.clearing</groupId>

View file

@ -1,10 +1,5 @@
package ru.spcex.clearing.account.config.validation;
import java.util.Collection;
import java.util.Map;
import java.util.Objects;
import java.util.function.Consumer;
import java.util.function.Function;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import ru.clearing.classes.statics.data.account.Account;
@ -27,12 +22,17 @@ import ru.spcex.platform.imdg.api.Imdg;
import ru.spcex.platform.imdg.api.predicate.ImdgPredicate;
import ru.spcex.platform.imdg.api.predicate.ImdgPredicateBuilder;
import ru.spcex.platform.imdg.validation.ImdgValidationContext;
import ru.spcex.platform.imdg.validation.rule.CurrencyCodeValidationRule;
import ru.spcex.platform.utils.enumeration.EnumMessage;
import ru.spcex.platform.utils.enumeration.IEnumKey;
import ru.spcex.platform.utils.validation.IValidator;
import ru.spcex.platform.utils.validation.ValidatorImpl;
import java.util.Collection;
import java.util.Map;
import java.util.Objects;
import java.util.function.Consumer;
import java.util.function.Function;
@Configuration
public class AccountValidationConfig {
@ -48,8 +48,6 @@ public class AccountValidationConfig {
addImdg.accept(IMDGDistributedNames.Map_Account);
addImdg.accept(IMDGDistributedNames.Map_ServiceStatusDictionary);
addImdg.accept(IMDGDistributedNames.Map_AccountTypeDictionary);
addImdg.accept(IMDGDistributedNames.Map_CurrencyCodeDictionary);
addImdg.accept(IMDGDistributedNames.Map_Currency);
return new ValidatorImpl<>(context,
IdPresentRule.instance("companyId",
CorrespondentAccountNewRequest::getCompanyId,
@ -108,16 +106,6 @@ public class AccountValidationConfig {
return DictionaryPresentRule.DICTIONARY_NOT_FOUND_DECORATOR_2.decorator(causeEmpty, errorCode, fieldName, fieldValue);
}
),
DictionaryPresentRule.instance("currency",
CorrespondentAccountNewRequest::getCurrency,
IMDGDistributedNames.Map_CurrencyCodeDictionary,
ServiceStatusDictionary.class,
null,
AccountError.DictionaryNotFound,
false
),
CurrencyCodeValidationRule.get(AccountError.CurrencyNotFound),
new SameAccountValidationRule<>(AccountType.Corr, CorrespondentAccountNewRequest::getAccount)
);
};

View file

@ -17,15 +17,11 @@ import ru.spcex.clearing.validation.common.rules.IdPresentRule;
import ru.spcex.platform.classes.base.SpcexObjectBase;
import ru.spcex.platform.imdg.api.Imdg;
import ru.spcex.platform.imdg.validation.ImdgValidationContext;
import ru.spcex.platform.utils.enumeration.EnumMessage;
import ru.spcex.platform.utils.validation.IValidationRule;
import ru.spcex.platform.utils.validation.IValidator;
import ru.spcex.platform.utils.validation.ValidatorImpl;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import java.util.function.Consumer;
import java.util.function.Function;
@ -71,9 +67,7 @@ public class ClientCodeValidationConfig {
acc -> Objects.equals(context.getValidatedObject().getCompanyId(), acc.getCompanyId())
? null : AccountError.AccountNotFound
),
new ExistAllCurrencyAccountId<>("currencyAccountList",
ClientCodeNewRequest::getCurrencyAccountList
),
DictionaryPresentRule.instance("stauts",
ClientCodeNewRequest::getStatus,
@ -86,41 +80,6 @@ public class ClientCodeValidationConfig {
};
}
public static class ExistAllCurrencyAccountId<R> implements IValidationRule<ImdgValidationContext<R>> {
String fieldName;
Function<R, List<Long>> idGetter;
public ExistAllCurrencyAccountId(String fieldName, Function<R, List<Long>> idGetter) {
this.fieldName = fieldName;
this.idGetter = idGetter;
}
@Override
public Optional<EnumMessage> validate(ImdgValidationContext<R> context) {
R validatedObject = context.getValidatedObject();
List<Long> ids = idGetter.apply(validatedObject);
if (ids == null || ids.isEmpty()) {
return empty(); // необязательное поле
}
Imdg<Account> imdg = context.obtainMap(IMDGDistributedNames.Map_Account, Account.class);
for (Long id:ids) {
if (id == null) { // null значения в массиве не ожидаются
return of(AccountError.RequiredFieldEmpty, fieldName);
}
Account byIdObject = imdg.getSingleObjectByID(id);
if (byIdObject == null)
return of(AccountError.AccountNotFound, id, fieldName);
}
return empty();
}
@Override
public String ruleName() {
return getClass().getSimpleName() + "{" + fieldName + "}";
}
}
@Bean("clientCodeUpdateRequestValidator")
public Function<ClientCodeUpdateRequest, IValidator> clientCodeUpdateRequestValidator(Map<String, Imdg<? extends SpcexObjectBase>> imdgForValidation) {
return clientCodeUpdateRequest -> {
@ -169,9 +128,6 @@ public class ClientCodeValidationConfig {
acc -> Objects.equals(context.getValidatedObject().getCompanyId(), acc.getCompanyId())
? null : AccountError.AccountNotFound
),
new ExistAllCurrencyAccountId<>("currencyAccountList",
ClientCodeUpdateRequest::getCurrencyAccountList
),
DictionaryPresentRule.instance("stauts",
ClientCodeUpdateRequest::getStatus,

View file

@ -38,7 +38,6 @@ public class InformationAccountValidationConfig {
addImdg.accept(IMDGDistributedNames.Map_InformationAccount);
addImdg.accept(IMDGDistributedNames.Map_ServiceStatusDictionary);
addImdg.accept(IMDGDistributedNames.Map_AccountTypeDictionary);
addImdg.accept(IMDGDistributedNames.Map_CurrencyCodeDictionary);
addImdg.accept(IMDGDistributedNames.Map_Account);
return new ValidatorImpl<>(context,
IdPresentRule.instance("companyId",
@ -60,10 +59,6 @@ public class InformationAccountValidationConfig {
DictionaryPresentRule.instance("accountType", InformationAccountNewRequest::getAccountType,
IMDGDistributedNames.Map_AccountTypeDictionary, AccountTypeDictionary.class,
AccountError.RequiredFieldEmpty, AccountError.DictionaryNotFound, false),
DictionaryPresentRule.instance("currency", InformationAccountNewRequest::getCurrency,
IMDGDistributedNames.Map_CurrencyCodeDictionary, ServiceStatusDictionary.class,
null, AccountError.DictionaryNotFound,false
),
new SameAccountValidationRule<>(AccountType.Info, InformationAccountNewRequest::getAccount)
);
};

View file

@ -1,221 +0,0 @@
package ru.spcex.clearing.account.config.validation;
import java.util.Collection;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import java.util.function.Consumer;
import java.util.function.Function;
import java.util.stream.Collectors;
import org.apache.commons.lang3.StringUtils;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import ru.clearing.classes.statics.data.account.Account;
import ru.clearing.classes.statics.data.registry.TradingClearingRegistry;
import ru.clearing.classes.statics.data.registry.TradingClearingRegistryList;
import ru.clearing.platform.dictionary.ServiceStatusDictionary;
import ru.spcex.clearing.account.errors.AccountError;
import ru.spcex.clearing.imdg.IMDGDistributedNames;
import ru.spcex.clearing.platform.messaging.domain.cud.registry.TradingClearingRegistryListNewRequest;
import ru.spcex.clearing.platform.messaging.domain.cud.registry.TradingClearingRegistryListUpdateRequest;
import ru.spcex.clearing.validation.common.rules.DictionaryPresentRule;
import ru.spcex.clearing.validation.common.rules.IdPresentRule;
import ru.spcex.platform.classes.base.SpcexObjectBase;
import ru.spcex.platform.enumeration.AccountType;
import ru.spcex.platform.enumeration.CurrencyCode;
import ru.spcex.platform.enumeration.ServiceStatus;
import ru.spcex.platform.enumeration.WorkflowStatus;
import ru.spcex.platform.imdg.api.Imdg;
import ru.spcex.platform.imdg.api.predicate.ImdgPredicate;
import ru.spcex.platform.imdg.api.predicate.ImdgPredicateBuilder;
import ru.spcex.platform.imdg.validation.ImdgValidationContext;
import ru.spcex.platform.utils.enumeration.EnumMessage;
import ru.spcex.platform.utils.enumeration.IEnumKey;
import ru.spcex.platform.utils.validation.IValidationRule;
import ru.spcex.platform.utils.validation.IValidator;
import ru.spcex.platform.utils.validation.ValidatorImpl;
@Configuration
public class TradingClearingRegistryListValidationConfig {
@Bean("tradingClearingRegistryListNewRequestValidator")
public Function<TradingClearingRegistryListNewRequest, IValidator> tradingClearingRegistryListNewRequestValidator(Map<String, Imdg<? extends SpcexObjectBase>> imdgForValidation) {
return tradingClearingRegistryListUpdateRequest -> {
ImdgValidationContext<TradingClearingRegistryListNewRequest> context = new ImdgValidationContext<>();
context.setValidatedObject(tradingClearingRegistryListUpdateRequest);
Consumer<String> addImdg = (s) -> context.addImdg(s, imdgForValidation.get(s));
addImdg.accept(IMDGDistributedNames.Map_TradingClearingRegistryList);
addImdg.accept(IMDGDistributedNames.Map_Account);
addImdg.accept(IMDGDistributedNames.Map_TradingClearingRegistry);
addImdg.accept(IMDGDistributedNames.Map_ServiceStatusDictionary);
return new ValidatorImpl<>(context,
IdPresentRule.instance("tradingClearingRegistryId",
TradingClearingRegistryListNewRequest::getTradingClearingRegistryId,
IMDGDistributedNames.Map_TradingClearingRegistry,
TradingClearingRegistry.class,
AccountError.RequiredFieldEmpty,
AccountError.TradingClearingRegistryNotFound,
false),
new ExistAllAccountId<>("accountId",
TradingClearingRegistryListNewRequest::getAccountId,
false,
null),
DictionaryPresentRule.instance("stauts",
TradingClearingRegistryListNewRequest::getStatus,
IMDGDistributedNames.Map_ServiceStatusDictionary,
ServiceStatusDictionary.class,
AccountError.RequiredFieldEmpty,
AccountError.DictionaryNotFound,
false),
NotAlreadyPresent.instance
);
};
}
@Bean("tradingClearingRegistryListUpdateRequestValidator")
public Function<TradingClearingRegistryListUpdateRequest, IValidator> tradingClearingRegistryListUpdateRequestValidator(Map<String, Imdg<? extends SpcexObjectBase>> imdgForValidation) {
return tradingClearingRegistryListUpdateRequest -> {
ImdgValidationContext<TradingClearingRegistryListUpdateRequest> context = new ImdgValidationContext<>();
context.setValidatedObject(tradingClearingRegistryListUpdateRequest);
Consumer<String> addImdg = (s) -> context.addImdg(s, imdgForValidation.get(s));
addImdg.accept(IMDGDistributedNames.Map_TradingClearingRegistryList);
addImdg.accept(IMDGDistributedNames.Map_Account);
addImdg.accept(IMDGDistributedNames.Map_TradingClearingRegistry);
addImdg.accept(IMDGDistributedNames.Map_ServiceStatusDictionary);
return new ValidatorImpl<ImdgValidationContext<TradingClearingRegistryListUpdateRequest>>(context,
IdPresentRule.instance2("id",
TradingClearingRegistryListUpdateRequest::getId,
IMDGDistributedNames.Map_TradingClearingRegistryList,
TradingClearingRegistryList.class,
AccountError.RequiredFieldEmpty,
AccountError.RecordNotFound,
true,
(tcrList)-> {
Long accountId = tcrList.getAccountId();
if (accountId==null)
return null;
if (!IEnumKey.contains(context.getValidatedObject().getStatus(),
ServiceStatus.Active, ServiceStatus.Reopened))
return null;
Imdg<TradingClearingRegistryList> tradingClearingRegistryListImdg = context.obtainMap(IMDGDistributedNames.Map_TradingClearingRegistryList, TradingClearingRegistryList.class);
ImdgPredicateBuilder pb = tradingClearingRegistryListImdg.predicateBuilder();
ImdgPredicate query = pb.and(pb.equals("status", WorkflowStatus.Active.getKey()),
pb.equals("accountId", accountId));
query = pb.and(query, pb.not(pb.equals("id", tcrList.getId())));
Collection<TradingClearingRegistryList> inOtherLists = tradingClearingRegistryListImdg.getCollectionObjectsByPredicate(query);
if (!inOtherLists.isEmpty()) {
Collection<Long> duplicateAccounts = inOtherLists.stream()
.map(TradingClearingRegistryList::getAccountId)
.filter(accountId::equals)
.collect(Collectors.toSet());
return new EnumMessage(AccountError.AccountForTradingClearingRegistryAlreadyUsed, duplicateAccounts, "accountId"); // (5023) «Счет %s уже используется»
}
return null;
}),
DictionaryPresentRule.instance("status",
TradingClearingRegistryListUpdateRequest::getStatus,
IMDGDistributedNames.Map_ServiceStatusDictionary,
ServiceStatusDictionary.class,
AccountError.RequiredFieldEmpty,
AccountError.DictionaryNotFound,
true)
);
};
}
public static class NotAlreadyPresent implements IValidationRule<ImdgValidationContext<TradingClearingRegistryListNewRequest>> {
private static final NotAlreadyPresent instance = new NotAlreadyPresent();
@Override
public Optional<EnumMessage> validate(ImdgValidationContext<TradingClearingRegistryListNewRequest> ctx) {
TradingClearingRegistryListNewRequest tcrListReq = ctx.getValidatedObject();
Long accountId = tcrListReq.getAccountId();
Imdg<TradingClearingRegistryList> tcrListImdg = ctx.obtainMap(IMDGDistributedNames.Map_TradingClearingRegistryList, TradingClearingRegistryList.class);
ImdgPredicateBuilder pb = tcrListImdg.predicateBuilder();
Collection<TradingClearingRegistryList> tcrLists = tcrListImdg.getCollectionObjectsByPredicate(
pb.and(
pb.equals("tradingClearingRegistryId", tcrListReq.getTradingClearingRegistryId()),
pb.equals("status", WorkflowStatus.Active.getKey())
)
);
if (tcrLists.stream().anyMatch(tcrList -> Objects.equals(accountId, tcrList.getAccountId()))) {
return of(AccountError.AccountForTradingClearingRegistryAlreadyUsed, accountId);
}
return empty();
}
@Override
public String ruleName() {
return "TradingClearingRegistryList.AlreadyPresent";
}
}
public static class ExistAllAccountId<R> implements IValidationRule<ImdgValidationContext<R>> {
String fieldName;
Function<R, Long> accountIdGetter;
boolean required;
Function<R, Long> idGetter;
public ExistAllAccountId(String fieldName, Function<R, Long> accountIdGetter, boolean required, Function<R, Long> idGetter) {
this.fieldName = fieldName;
this.accountIdGetter = accountIdGetter;
this.required = required;
this.idGetter = idGetter;
}
@Override
public Optional<EnumMessage> validate(ImdgValidationContext<R> context) {
R validatedObject = context.getValidatedObject();
Long accountId = accountIdGetter.apply(validatedObject);
if (accountId == null) {
if (required)
return of(AccountError.RequiredFieldEmpty, fieldName); // обязательное поле
else
return Optional.empty();
}
Imdg<Account> accountImdg = context.obtainMap(IMDGDistributedNames.Map_Account, Account.class);
// Проверить существование счетов
{
Account byIdObject = accountImdg.getSingleObjectByID(accountId);
if (byIdObject == null)
return of(AccountError.AccountNotFound, accountId, fieldName);
if (!IEnumKey.contains(byIdObject.getAccountType(), AccountType.Clrn, AccountType.Info)) {
return of(AccountError.AccountIsNotACurrency, accountId,
fieldName, "expected: CLRN/INFO but is " + byIdObject.getAccountType()); // Счет %S не
}
if (CurrencyCode.isRub(byIdObject.getCurrency()) || StringUtils.isEmpty(byIdObject.getCurrency())) {
return of(AccountError.AccountIsNotACurrency, accountId, fieldName); // Счет %S не валютный
}
}
// Проверка отсутствия других TradingClearingRegistryList с этими счетами
Imdg<TradingClearingRegistryList> tradingClearingRegistryListImdg = context.obtainMap(IMDGDistributedNames.Map_TradingClearingRegistryList, TradingClearingRegistryList.class);
ImdgPredicateBuilder pb = tradingClearingRegistryListImdg.predicateBuilder();
ImdgPredicate query = pb.and(pb.equals("status", WorkflowStatus.Active.getKey()),
pb.equals("accountId", accountId));
if (idGetter != null) {
Long id = idGetter.apply(validatedObject);
if (id == null) // never
return of(AccountError.RequiredFieldEmpty, "id");
query = pb.and(query, pb.not(pb.equals("id", id)));
}
Collection<TradingClearingRegistryList> inOtherLists = tradingClearingRegistryListImdg.getCollectionObjectsByPredicate(query);
if (!inOtherLists.isEmpty()) {
Collection<Long> duplicateAccounts = inOtherLists.stream()
.map(TradingClearingRegistryList::getAccountId)
.filter(accountId::equals)
.collect(Collectors.toSet());
return of(AccountError.AccountForTradingClearingRegistryAlreadyUsed, duplicateAccounts, fieldName); // (5023) «Счет %s уже используется»
}
return empty();
}
@Override
public String ruleName() {
return getClass().getSimpleName() + "{" + fieldName + "}";
}
}
}

View file

@ -31,7 +31,6 @@ import ru.spcex.platform.utils.validation.ValidatorImpl;
import java.util.Collection;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import java.util.function.Consumer;
import java.util.function.Function;
@ -141,6 +140,11 @@ public class TradingClearingRegistryValidationConfig {
if (validatedObject.getMoneyAccountId() == null) {
return of(AccountError.RequiredFieldEmpty, "MoneyAccountId");
}
//Map<String, Comparable<?>> query = new HashMap<>();
// query.put("moneyAccountId", validatedObject.getMoneyAccountId());
// if (validatedObject.getDepoAccountId() != null) {
// query.put("depoAccountId", validatedObject.getDepoAccountId());
// }
ImdgPredicateBuilder pb = tcrMap.predicateBuilder();
ImdgPredicate query = pb.equals("moneyAccountId", validatedObject.getMoneyAccountId());
if (validatedObject.getDepoAccountId() != null) {
@ -156,49 +160,8 @@ public class TradingClearingRegistryValidationConfig {
Account account = accountImdg.getSingleObjectByID(validatedObject.getMoneyAccountId());
if (account == null && validatedObject.getDepoAccountId() != null) account = accountImdg.getSingleObjectByID(validatedObject.getDepoAccountId());
return of(AccountError.AccountForTradingClearingRegistryAlreadyUsed, account.getAccount());
}
}
}
static class updateTCRDepoCheck implements IValidationRule<ImdgValidationContext<TradingClearingRegistryUpdateRequest>> {
@Override
public Optional<EnumMessage> validate(ImdgValidationContext<TradingClearingRegistryUpdateRequest> context) {
TradingClearingRegistryUpdateRequest validatedObject = context.getValidatedObject();
Long depoAccountId = validatedObject.getDepoAccountId();
if (depoAccountId == null) // необязательное поле
return empty();
// Проверка типа счёта ДЕПО, что существует
Imdg<DepoAccount> depoAccountImdg = context.obtainMap(IMDGDistributedNames.Map_DepoAccount, DepoAccount.class);
DepoAccount depoAccount = depoAccountImdg.getFirstObjectByFieldValues(
Map.of("accountId", depoAccountId)
);
if (depoAccount == null)
return of(AccountError.AccountNotFound, depoAccountId);
// Проверка компании ТКР и счёта
Imdg<TradingClearingRegistry> tcrMap = context.obtainMap(IMDGDistributedNames.Map_TradingClearingRegistry, TradingClearingRegistry.class);
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);
}
TradingClearingRegistry updateObject = tcrMap.getSingleObjectByID(validatedObject.getId());
if (!Objects.equals(account.getCompanyId(), updateObject.getCompanyId())) {
return of(AccountError.AccountNotFound, depoAccountId); // или UserVerifyDenial
}
// Проверка использования счёта в других ТКР
ImdgPredicateBuilder pb = tcrMap.predicateBuilder();
ImdgPredicate query = pb.and(pb.equals("depoAccountId", validatedObject.getDepoAccountId()),
pb.not(pb.equals("id", validatedObject.getId()))
);
Collection<TradingClearingRegistry> existTCR = tcrMap.getCollectionObjectsByPredicate(query);
if (existTCR.isEmpty()) {
return empty();
} else {
if (account == null && validatedObject.getDepoAccountId() != null) account = accountImdg.getSingleObjectByID(validatedObject.getDepoAccountId());
return of(AccountError.AccountForTradingClearingRegistryAlreadyUsed, account.getAccount());
// String tcrIds = existTCR.stream().map(tcr -> String.valueOf(tcr.getId())).collect(Collectors.joining(";"));
// return of(AccountError.AccountForTradingClearingRegistryAlreadyUsed, tcrIds);
}
}
}
@ -214,8 +177,6 @@ public class TradingClearingRegistryValidationConfig {
Consumer<String> addImdg = (s) -> context.addImdg(s, imdgForValidation.get(s));
addImdg.accept(IMDGDistributedNames.Map_ServiceStatusDictionary);
addImdg.accept(IMDGDistributedNames.Map_TradingClearingRegistry);
addImdg.accept(IMDGDistributedNames.Map_Account);
addImdg.accept(IMDGDistributedNames.Map_DepoAccount);
return new ValidatorImpl<>(context,
IdPresentRule.instance("id",
TradingClearingRegistryUpdateRequest::getId,
@ -229,9 +190,7 @@ public class TradingClearingRegistryValidationConfig {
ServiceStatusDictionary.class,
AccountError.RequiredFieldEmpty,
AccountError.DictionaryNotFound,
false),
new updateTCRDepoCheck()
false)
);
};
}

View file

@ -1,28 +1,14 @@
package ru.spcex.clearing.account.config.validation;
import java.util.HashMap;
import java.util.Map;
import java.util.function.BiConsumer;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import ru.clearing.classes.statics.data.account.Account;
import ru.clearing.classes.statics.data.account.AccountSymbols;
import ru.clearing.classes.statics.data.account.BankAccount;
import ru.clearing.classes.statics.data.account.ClearingAccount;
import ru.clearing.classes.statics.data.account.ClientCode;
import ru.clearing.classes.statics.data.account.DepoAccount;
import ru.clearing.classes.statics.data.account.InformationAccount;
import ru.clearing.classes.statics.data.account.*;
import ru.clearing.classes.statics.data.company.ClearingMemberCategory;
import ru.clearing.classes.statics.data.company.Company;
import ru.clearing.classes.statics.data.company.CompanySymbols;
import ru.clearing.classes.statics.data.misc.Currency;
import ru.clearing.classes.statics.data.registry.TradingClearingRegistry;
import ru.clearing.classes.statics.data.registry.TradingClearingRegistryList;
import ru.clearing.platform.dictionary.AccountTypeDictionary;
import ru.clearing.platform.dictionary.ClearingAccountTypeDictionary;
import ru.clearing.platform.dictionary.CurrencyCodeDictionary;
import ru.clearing.platform.dictionary.ServiceStatusDictionary;
import ru.clearing.platform.dictionary.*;
import ru.spcex.clearing.imdg.IMDGDistributedNames;
import ru.spcex.clearing.validation.common.ValidationHelper;
import ru.spcex.platform.classes.base.SpcexObjectBase;
@ -30,6 +16,10 @@ import ru.spcex.platform.imdg.api.Imdg;
import ru.spcex.platform.imdg.api.ImdgProvider;
import ru.spcex.platform.utils.enumeration.IMessageResolver;
import java.util.HashMap;
import java.util.Map;
import java.util.function.BiConsumer;
@Configuration
public class ValidationConfig {
@ -52,8 +42,6 @@ public class ValidationConfig {
addImdg.accept(IMDGDistributedNames.Map_ServiceStatusDictionary, ServiceStatusDictionary.class);
addImdg.accept(IMDGDistributedNames.Map_TradingClearingRegistry, TradingClearingRegistry.class);
addImdg.accept(IMDGDistributedNames.Map_AccountSymbols, AccountSymbols.class);
addImdg.accept(IMDGDistributedNames.Map_TradingClearingRegistryList, TradingClearingRegistryList.class);
addImdg.accept(IMDGDistributedNames.Map_Currency, Currency.class);
//for ClientCodeValidationConfig
addImdg.accept(IMDGDistributedNames.Map_ClientCode, ClientCode.class);

View file

@ -23,10 +23,7 @@ public enum AccountError implements IErrorEnumId {
AccountForTradingClearingRegistryAlreadyUsed(5023L),
AccountFieldNotSet(5024L),
AccountDepoTypeRequired(5025L),
AccountIsNotACurrency(5026L), // Счет %S не валютный
CompanyHasNotClearingMemberCategory(5027L),
TradingClearingRegistryNotFound(3022L),
CurrencyNotFound(1016L),
;
private final Long id;

View file

@ -1,9 +1,5 @@
package ru.spcex.clearing.account.service;
import java.time.Instant;
import java.util.Collection;
import java.util.Map;
import java.util.function.Function;
import org.apache.kafka.clients.consumer.Consumer;
import org.apache.kafka.clients.producer.Producer;
import org.slf4j.Logger;
@ -18,7 +14,6 @@ import ru.clearing.classes.statics.data.account.DepoAccount;
import ru.clearing.classes.statics.data.account.InformationAccount;
import ru.clearing.classes.statics.data.company.ClearingMemberCategory;
import ru.clearing.classes.statics.data.company.relation.Relation;
import ru.clearing.classes.statics.data.misc.Currency;
import ru.spcex.clearing.account.errors.AccountError;
import ru.spcex.clearing.imdg.IMDGDistributedNames;
import ru.spcex.clearing.platform.messaging.domain.BaseRequest;
@ -33,20 +28,22 @@ import ru.spcex.clearing.platform.messaging.service.Status;
import ru.spcex.clearing.platform.messaging.service.sender.KafkaSender;
import ru.spcex.clearing.util.security.UserRoleVerification;
import ru.spcex.clearing.validation.common.ValidationHelper;
import ru.spcex.platform.enumeration.AccountType;
import ru.spcex.platform.enumeration.CurrencyCode;
import ru.spcex.platform.enumeration.DepoAccountType;
import ru.spcex.platform.enumeration.Sender;
import ru.spcex.platform.enumeration.ServiceStatus;
import ru.spcex.platform.enumeration.WorkflowStatus;
import ru.spcex.platform.enumeration.*;
import ru.spcex.platform.imdg.api.Imdg;
import ru.spcex.platform.imdg.api.ImdgProvider;
import ru.spcex.platform.imdg.api.ImdgTransaction;
import ru.spcex.platform.imdg.validation.Stored;
import ru.spcex.platform.imdg.api.predicate.ImdgPredicate;
import ru.spcex.platform.imdg.api.predicate.ImdgPredicateBuilder;
import ru.spcex.platform.utils.enumeration.EnumMessage;
import ru.spcex.platform.utils.enumeration.IEnumKey;
import ru.spcex.platform.utils.enumeration.IMessageResolver;
import ru.spcex.platform.utils.validation.IValidator;
import java.time.Instant;
import java.util.Collection;
import java.util.Map;
import java.util.function.Function;
@Service
public class AccountService extends QueueConsumer implements InitializingBean {
private final Logger log = LoggerFactory.getLogger(getClass());
@ -54,7 +51,6 @@ public class AccountService extends QueueConsumer implements InitializingBean {
private final Imdg<Account> accountMap;
private final Imdg<ClearingMemberCategory> clearingMemberCategoryMap;
private final Imdg<Relation> relationMap;
private final Imdg<Currency> currencyMap;
private final KafkaSender kafkaSender;
private final IMessageResolver messageResolver;
private final UserRoleVerification userRoleVerification;
@ -76,25 +72,22 @@ public class AccountService extends QueueConsumer implements InitializingBean {
AccountHelper accountHelper,
InformationAccountService informationAccountService,
@Qualifier("correspondentAccountNewRequestValidator")
Function<CorrespondentAccountNewRequest, IValidator> accountNewRequestValidator,
Function<CorrespondentAccountNewRequest, IValidator> accountNewRequestValidator,
@Qualifier("correspondentAccountUpdateRequestValidator")
Function<CorrespondentAccountUpdateRequest, IValidator> accountUpdateRequestValidator,
Function<CorrespondentAccountUpdateRequest, IValidator> accountUpdateRequestValidator,
@Qualifier("correspondentAccountBlockRequestValidator")
Function<CommonIdRequest, IValidator> accountBlockRequestValidator) {
Function<CommonIdRequest, IValidator> accountBlockRequestValidator) {
super(kafkaQueue, kafkaProducer);
this.accountHelper = accountHelper;
this.imdgProvider = imdgProvider;
this.accountMap = imdgProvider.getImdg(
IMDGDistributedNames.Map_Account, Account.class
IMDGDistributedNames.Map_Account, Account.class
);
this.clearingMemberCategoryMap = imdgProvider.getImdg(
IMDGDistributedNames.Map_ClearingMemberCategory, ClearingMemberCategory.class
IMDGDistributedNames.Map_ClearingMemberCategory, ClearingMemberCategory.class
);
this.relationMap = imdgProvider.getImdg(
IMDGDistributedNames.Map_Relation, Relation.class
);
this.currencyMap = imdgProvider.getImdg(
IMDGDistributedNames.Map_Currency, Currency.class
IMDGDistributedNames.Map_Relation, Relation.class
);
this.kafkaSender = kafkaSender;
this.messageResolver = messageResolver;
@ -110,18 +103,18 @@ public class AccountService extends QueueConsumer implements InitializingBean {
public void afterPropertiesSet() {
imdgProvider.waitAvailable();
callback(CorrespondentAccountNewRequest.class)
.setFunction(this::accountCorrespondentNew)
.forDestination(Consts.DESTINATION_CORRESPONDENT_ACCOUNT_NEW, callbacks::put);
.setFunction(this::accountCorrespondentNew)
.forDestination(Consts.DESTINATION_CORRESPONDENT_ACCOUNT_NEW, callbacks::put);
callback(CorrespondentAccountUpdateRequest.class)
.setFunction(this::correspondentAccountUpdate)
.forDestination(Consts.DESTINATION_CORRESPONDENT_ACCOUNT_UPDATE, callbacks::put);
.setFunction(this::correspondentAccountUpdate)
.forDestination(Consts.DESTINATION_CORRESPONDENT_ACCOUNT_UPDATE, callbacks::put);
callback(CommonIdRequest.class)
.setFunction(this::correspondentAccountBlock)
.forDestination(Consts.DESTINATION_CORRESPONDENT_ACCOUNT_BLOCK, callbacks::put);
.setFunction(this::correspondentAccountBlock)
.forDestination(Consts.DESTINATION_CORRESPONDENT_ACCOUNT_BLOCK, callbacks::put);
callback(AccountTerminationRequest.class)
.setFunction(this::accountTerminationForCompany)
.forDestination(Consts.ACCOUNT_TERMINATION, callbacks::put);
.setFunction(this::accountTerminationForCompany)
.forDestination(Consts.ACCOUNT_TERMINATION, callbacks::put);
init();
}
@ -132,27 +125,22 @@ public class AccountService extends QueueConsumer implements InitializingBean {
RequestInfoUpdate requestInfoUpdate = userRoleVerification.validateRoleAndGetResult(userRequest);
if (requestInfoUpdate != null) return requestInfoUpdate;
IValidator validator = accountNewRequestValidator.apply(userRequest.getRequestPayload());
requestInfoUpdate = validationHelper.validateTillFirstError(userRequest, (r) -> validator);
requestInfoUpdate = validationHelper.validateTillFirstError(userRequest, accountNewRequestValidator);
if (requestInfoUpdate != null) return requestInfoUpdate;
CorrespondentAccountNewRequest req = userRequest.getRequestPayload();
Currency currency = validator.getStored(Stored.currency);
String currencyCode = req.getCurrency() == null ? CurrencyCode.RUB.getKey() : req.getCurrency();
Long currencyCodeId = CurrencyCode.RUB.getKey().equals(currencyCode) ? 810 : currency.getId();
Instant now = Instant.now();
Account account = new Account();
account.setCompanyId(req.getCompanyId());
account.setAccount(req.getAccount());
if (AccountType.Info.equalsByKey(req.getAccountType())) {
Long infoSequenceId = informationAccountService.accountNextId(currencyCode, currencyCodeId);
String accountValue = informationAccountService.generateInfoAccount(currencyCodeId, infoSequenceId);
Long infoSequenceId = informationAccountService.accountNextId();
String accountValue = informationAccountService.generateInfoAccount(infoSequenceId);
log.trace("New info-account SequenceId={} account={}", infoSequenceId, accountValue);
account.setAccount(accountValue);
}
account.setAccountType(req.getAccountType());
account.setCurrency(currencyCode);
if (req.getStatus() == null) {
account.setStatus(WorkflowStatus.Active.getKey());
log.trace("Status not set in request. Use default: {}", account.getStatus());
@ -209,12 +197,11 @@ public class AccountService extends QueueConsumer implements InitializingBean {
InformationAccount infoAcc = new InformationAccount();
infoAcc.setAccountId(account.getId());
Account firstAccountAntl = accountMap.getFirstObjectByFieldValues(Map.of(
"companyId", Sender.One.getId(),
"accountType", AccountType.Anlt.getKey(),
"currency", account.getCurrency()
"companyId", Sender.One.getId(),
"accountType", AccountType.Anlt.getKey()
));
if (firstAccountAntl == null) {
log.warn("Can not find 1 ANTL {} account for fill information ClearingAccountId.", account.getCurrency());
log.warn("Can not find 1 ANTL account for fill information ClearingAccountId.");
} else {
infoAcc.setClearingAccountId(firstAccountAntl.getId());
}
@ -330,7 +317,7 @@ public class AccountService extends QueueConsumer implements InitializingBean {
Long reqId = kafkaSender.sendRequestToQueue(Consts.ACCOUNT_TERMINATION_STEP2, req);
log.info("On termination request id={} send to next step {} new request id={}",
userRequest.getId(), Consts.ACCOUNT_TERMINATION_STEP2, reqId);
userRequest.getId(), Consts.ACCOUNT_TERMINATION_STEP2, reqId);
log.debug("successfully processed, account termination");
return null;
@ -339,9 +326,9 @@ public class AccountService extends QueueConsumer implements InitializingBean {
private RequestInfoUpdate makeError(Long reqId, AccountError accountError, Object... args) {
String errMsg = messageResolver.resolve(new EnumMessage(accountError, args));
return new RequestInfoUpdate()
.setId(reqId)
.setStatus(Status.Error)
.setMessage(errMsg);
.setId(reqId)
.setStatus(Status.Error)
.setMessage(errMsg);
}
}

View file

@ -109,7 +109,6 @@ public class BankAccountService extends QueueConsumer implements InitializingBea
account.setStatus(req.getStatus());
}
account.setCompanyId(req.getCompanyId());
account.setCurrency(req.getCurrency());
account.setCreated(now);
account.setUpdated(now);
requestInfoUpdate = accountService.fillAccountFromRelation(account, userRequest.getId(), false);
@ -137,7 +136,6 @@ public class BankAccountService extends QueueConsumer implements InitializingBea
bankAccount.setAccount(req.getAccount());
bankAccount.setCompanyId(req.getCompanyId());
bankAccount.setAccountId(accountId);
bankAccount.setSwiftCode(req.getSwiftCode());
bankAccountId = bankAccountMap.insert(bankAccount);
txOk = true;
@ -175,11 +173,9 @@ public class BankAccountService extends QueueConsumer implements InitializingBea
bankAccount.setTaxpayerIdentificationNumber(req.getTaxpayerIdentificationNumber());
bankAccount.setTaxRegistrationReasonCode(req.getTaxRegistrationReasonCode());
bankAccount.setAccount(req.getAccount());
bankAccount.setSwiftCode(req.getSwiftCode());
Account account = accountMap.getSingleObjectByID(bankAccount.getAccountId());
account.setAccount(req.account);
account.setCurrency(req.getCurrency());
account.setUpdated(Instant.now());
ImdgTransaction imdgTransaction = imdgProvider.newTransaction();

View file

@ -1,13 +1,5 @@
package ru.spcex.clearing.account.service;
import java.time.Instant;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import java.util.function.Function;
import org.apache.commons.lang3.tuple.MutableTriple;
import org.apache.commons.lang3.tuple.Triple;
import org.apache.kafka.clients.consumer.Consumer;
@ -18,17 +10,14 @@ import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;
import org.springframework.util.StringUtils;
import ru.clearing.classes.statics.data.account.Account;
import ru.clearing.classes.statics.data.account.ClearingAccount;
import ru.clearing.classes.statics.data.company.ClearingMemberCategory;
import ru.clearing.classes.statics.data.company.Company;
import ru.clearing.classes.statics.data.company.relation.Relation;
import ru.clearing.classes.statics.data.misc.Currency;
import ru.clearing.classes.statics.data.misc.Notification;
import ru.clearing.classes.statics.data.registry.TradingClearingRegistry;
import ru.clearing.classes.statics.data.sdf.SDf52;
import ru.clearing.platform.dictionary.ClearingAccountTypeDictionary;
import ru.clearing.platform.dictionary.ClearingCategoryDictionary;
import ru.spcex.clearing.account.errors.AccountError;
import ru.spcex.clearing.imdg.IMDGDistributedNames;
@ -49,15 +38,7 @@ import ru.spcex.clearing.platform.messaging.service.RequestInfoUpdate;
import ru.spcex.clearing.platform.messaging.service.sender.KafkaSender;
import ru.spcex.clearing.util.services.RequestHelper;
import ru.spcex.clearing.validation.common.ValidationHelper;
import ru.spcex.platform.enumeration.AccountStatus;
import ru.spcex.platform.enumeration.AccountType;
import ru.spcex.platform.enumeration.ClearingAccountType;
import ru.spcex.platform.enumeration.NotificationStatus;
import ru.spcex.platform.enumeration.ObjectType;
import ru.spcex.platform.enumeration.Priority;
import ru.spcex.platform.enumeration.SdfTable;
import ru.spcex.platform.enumeration.ServiceStatus;
import ru.spcex.platform.enumeration.WorkflowStatus;
import ru.spcex.platform.enumeration.*;
import ru.spcex.platform.imdg.api.Imdg;
import ru.spcex.platform.imdg.api.ImdgProvider;
import ru.spcex.platform.imdg.api.ImdgTransaction;
@ -65,12 +46,15 @@ import ru.spcex.platform.imdg.api.predicate.ImdgPredicate;
import ru.spcex.platform.imdg.api.predicate.ImdgPredicateBuilder;
import ru.spcex.platform.utils.collection.Pair;
import ru.spcex.platform.utils.enumeration.EnumMessage;
import ru.spcex.platform.utils.enumeration.IEnumKey;
import ru.spcex.platform.utils.enumeration.IErrorEnumId;
import ru.spcex.platform.utils.enumeration.IMessageResolver;
import ru.spcex.platform.utils.text.TextUtil;
import ru.spcex.platform.utils.validation.IValidator;
import java.time.Instant;
import java.util.*;
import java.util.concurrent.ConcurrentHashMap;
import java.util.function.Function;
@Service
public class ClearingAccountService extends QueueConsumer implements InitializingBean {
@ -86,7 +70,6 @@ public class ClearingAccountService extends QueueConsumer implements Initializin
private final Function<ClearingAccountUpdateRequest, IValidator> clearingAccountUpdateRequestValidator;
private final Imdg<Account> accountImdg;
private final Imdg<Currency> currImdg;
private final Imdg<ClearingAccount> clearingAccountImdg;
private final Imdg<Company> companyImdg;
private final Imdg<Relation> relationImdg;
@ -94,7 +77,6 @@ public class ClearingAccountService extends QueueConsumer implements Initializin
private final Imdg<ClearingCategoryDictionary> clearingCategoryImdg;
private final Imdg<TradingClearingRegistry> tradingClearingRegistryImdg;
private final Imdg<Notification> notificationImdg;
private final Imdg<ClearingAccountTypeDictionary> clearingAccountTypeDictionaryImdg;
@Autowired
public ClearingAccountService(Consumer<String, Object> kafkaQueue,
@ -122,7 +104,6 @@ public class ClearingAccountService extends QueueConsumer implements Initializin
this.clearingAccountUpdateRequestValidator = clearingAccountUpdateRequestValidator;
this.accountImdg = imdgProvider.getImdg(IMDGDistributedNames.Map_Account, Account.class);
this.currImdg = imdgProvider.getImdg(IMDGDistributedNames.Map_Currency, Currency.class);
this.clearingAccountImdg = imdgProvider.getImdg(IMDGDistributedNames.Map_ClearingAccount, ClearingAccount.class);
this.companyImdg = imdgProvider.getImdg(IMDGDistributedNames.Map_Company, Company.class);
this.relationImdg = imdgProvider.getImdg(IMDGDistributedNames.Map_Relation, Relation.class);
@ -130,7 +111,6 @@ public class ClearingAccountService extends QueueConsumer implements Initializin
this.clearingCategoryImdg = imdgProvider.getImdg(IMDGDistributedNames.Map_ClearingCategoryDictionary, ClearingCategoryDictionary.class);
this.tradingClearingRegistryImdg = imdgProvider.getImdg(IMDGDistributedNames.Map_TradingClearingRegistry, TradingClearingRegistry.class);
this.notificationImdg = imdgProvider.getImdg(IMDGDistributedNames.Map_Notification, Notification.class);
this.clearingAccountTypeDictionaryImdg = imdgProvider.getImdg(IMDGDistributedNames.Map_ClearingAccountTypeDictionary, ClearingAccountTypeDictionary.class);
}
@Override
@ -155,7 +135,7 @@ public class ClearingAccountService extends QueueConsumer implements Initializin
init();
}
public synchronized RequestInfoUpdate clearingAccountNew(BaseRequest<ClearingAccountNewRequest> userRequest) {
public RequestInfoUpdate clearingAccountNew(BaseRequest<ClearingAccountNewRequest> userRequest) {
RequestInfoUpdate requestInfoUpdate = validationHelper.validateTillFirstError(
userRequest, clearingAccountNewRequestValidator
);
@ -207,14 +187,10 @@ public class ClearingAccountService extends QueueConsumer implements Initializin
imdgTransaction.rollbackTransaction();
}
}
if (txOk && account != null) {
sendNotificationAccountNewRequest(account);
}
return null;
}
public synchronized RequestInfoUpdate clearingAccountUpdate(BaseRequest<ClearingAccountUpdateRequest> userRequest) {
public RequestInfoUpdate clearingAccountUpdate(BaseRequest<ClearingAccountUpdateRequest> userRequest) {
RequestInfoUpdate requestInfoUpdate = validationHelper.validateTillFirstError(
userRequest, clearingAccountUpdateRequestValidator
);
@ -261,12 +237,11 @@ public class ClearingAccountService extends QueueConsumer implements Initializin
}
public synchronized RequestInfoUpdate accountNewSdf01(BaseRequest<AccountSdf01Request> userRequest) {
public RequestInfoUpdate accountNewSdf01(BaseRequest<AccountSdf01Request> userRequest) {
log.debug("AccountSdf01Request received, id={}", userRequest.getId());
AccountSdf01Request req = userRequest.getRequestPayload();
List<AccountSdfToStatementRequestPart> accountToStatement = new ArrayList<>();
List<Account> accountsToNotification = new ArrayList<>();
ImdgTransaction imdgTransaction = imdgProvider.newTransaction();
boolean txOk = false;
@ -279,30 +254,10 @@ public class ClearingAccountService extends QueueConsumer implements Initializin
for (AccountSdfRequestPart accountReq : req.getAccounts()) {
Instant now = Instant.now();
Account account = new Account();
try {
Long currencyId = Long.valueOf(accountReq.getAccount().substring(5, 8));
Currency currency = currImdg.getSingleObjectByID(currencyId);
account.setCurrency(currency.getCurrencyCode());
} catch (Throwable e) {
AccountSdfToStatementRequestPart responsePart = new AccountSdfToStatementRequestPart();
responsePart.setSdfId(accountReq.getSdfId());
responsePart.setErrorCode(AccountError.DictionaryNotFound.getId()); // see accountService.fillAccountFromRelation
responsePart.setErrorText("couldn't extract currency from '%s' account".formatted(accountReq.getAccount()));
accountToStatement.add(responsePart);
log.info("sdf.id={} companyId={} accountType={} couldn't find currency for account {}",
accountReq.getSdfId(),
accountReq.getCompanyId(),
accountReq.getAccountType(),
accountReq.getAccount());
continue accountsLoop;
}
account.setAccount(accountReq.getAccount());
account.setAccountType(AccountType.Clrn.getKey());
account.setStatus(ServiceStatus.Active.getKey());
account.setCompanyId(accountReq.getCompanyId());
if (TextUtil.isEmpty(account.getCurrency())) {
log.warn("Sdf52: Wrong accountValue=\"{}\" - can not parse for get currency", accountReq.getAccount());
}
account.setCreated(now);
account.setUpdated(now);
RequestInfoUpdate requestInfoUpdate = accountService.fillAccountFromRelation(account, userRequest.getId(), true);
@ -334,7 +289,6 @@ public class ClearingAccountService extends QueueConsumer implements Initializin
Long accountId = -1L;
ClearingAccount clearingAccount = null;
accountId = accountImdg.insert(account);
accountsToNotification.add(account);
clearingAccount = new ClearingAccount();
clearingAccount.setCompanyId(accountReq.getCompanyId());
@ -363,107 +317,11 @@ public class ClearingAccountService extends QueueConsumer implements Initializin
sendStatementRequestBack(req.getGroupingSdf01Id(), req.getGroupingSdf02Id(), accountToStatement);
if (txOk) {
for (Account account : accountsToNotification)
sendNotificationAccountNewRequest(account);
}
log.debug("successfully processed, grouping id={}, processed number={}", req.getGroupingSdf01Id(), accountToStatement.size());
return null;
}
/**
* Логика похожа на SDF01
*
* @param accountValue account
* @param companyId
* @param userRequestId для лога
* @return
*/
private synchronized Account createSdf52Account(String accountValue, String acctType, Long companyId, Long userRequestId) {
{ // Валидация
boolean existClearingAccountTypeDictionary;
if (!StringUtils.hasText(acctType)) {
existClearingAccountTypeDictionary = false;
} else {
ClearingAccountTypeDictionary catd = clearingAccountTypeDictionaryImdg.getFirstObjectByFieldValues(
Map.of("code", acctType));
existClearingAccountTypeDictionary = catd != null;
}
if (!existClearingAccountTypeDictionary) {
String errMsg = messageResolver.resolve(new EnumMessage(AccountError.DictionaryNotFound, acctType, clearingAccountTypeDictionaryImdg.getMapName()));
log.warn(errMsg);
return null;
}
ClearingMemberCategory companyAnyCMC = clearingMemberCategoryImdg.getFirstObjectByFieldValues(Map.of(
"companyId", companyId
));
if (companyAnyCMC == null) {
String errMsg = messageResolver.resolve(new EnumMessage(AccountError.CompanyHasNotClearingMemberCategory, companyId));
log.warn(errMsg);
}
}
Instant now = Instant.now();
Account account = new Account();
account.setAccount(accountValue);
account.setAccountType(AccountType.Clrn.getKey());
account.setStatus(ServiceStatus.Active.getKey());
if (accountValue.length() >= 7) {
try {
Long currencyId = Long.valueOf(accountValue.substring(5, 8));
Currency currency = currImdg.getSingleObjectByID(currencyId);
account.setCurrency(currency.getCurrencyCode());
} catch (Throwable e) {
log.trace("When obtain currency from accountValue: {}", e.toString());
}
}
if (TextUtil.isEmpty(account.getCurrency())) {
log.warn("Sdf52: Wrong accountValue=\"{}\" - can not parse for get currency", accountValue);
}
account.setCompanyId(companyId);
account.setCreated(now);
account.setUpdated(now);
RequestInfoUpdate requestInfoUpdate = accountService.fillAccountFromRelation(account, userRequestId, true);
if (requestInfoUpdate != null) {
log.warn("Error fill new account from relation. {}", /*account.getId(),*/ requestInfoUpdate.getMessage());
return null;
}
Account existAccount = accountImdg.getFirstObjectBySQL("account = '%s' and accountType='%s'"
.formatted(accountValue, AccountType.Clrn.getKey()));
if (existAccount != null) {
log.debug("Sdf52: Account {} already exists", accountValue);
if (companyId.equals(existAccount.getCompanyId())) {
return existAccount;
} else {
log.debug("Sdf52: Account {} already exists for other companyId={}, do not apply for companyId={}",
accountValue, existAccount.getCompanyId(), companyId);
return null;
}
}
Long clearingAccountId = -1L;
Long accountId = -1L;
ClearingAccount clearingAccount = null;
accountId = accountImdg.insert(account);
clearingAccount = new ClearingAccount();
clearingAccount.setCompanyId(companyId);
clearingAccount.setAccountId(accountId);
ClearingAccountType caType = IEnumKey.getEnumByKey(ClearingAccountType.class, acctType);
if (caType == null) {
log.warn("Wrong ClearingAccountType=\"{}\" for account \"{}\"", acctType, accountValue);
}
clearingAccount.setClearingAccountType(acctType);
clearingAccountId = clearingAccountImdg.insert(clearingAccount);
log.debug("New account {}, clearingAccount {} was created.", accountId, clearingAccountId);
return account;
}
public RequestInfoUpdate accountUpdateSdf52(BaseRequest<StatementRequest> systemRequest) {
log.debug("accountUpdateSdf52 StatementRequest received, id={}", systemRequest.getId());
@ -507,14 +365,8 @@ public class ClearingAccountService extends QueueConsumer implements Initializin
Account account = sDf52.getAccount() == null ? null : accountImdg.getFirstObjectByFieldValues(accountQuery);
if (account == null) {
if (SDFProcessService.SDF52_STATUS_3Open.equals(sDf52.getStatus())) {
log.trace("By generationId={} s_df52[{}].status={}, account not found (query: {}). Try create new account.",
log.debug("By generationId={} s_df52[{}].status={}, but account not found (query: {}). COntinuse with result OK for status 3",
groupId, sDf52.getId(), sDf52.getStatus(), accountQuery);
account = createSdf52Account(sDf52.getAccount(),sDf52.getAcc_type(), company.getId(), systemRequest.getId());
if (account == null) {
log.info("Can not create account: \"{}\", companyId={}. Ignore SDF52.id={}",
sDf52.getAccount(), company.getId(), sDf52.getId());
continue;
}
} else {
String msg = messageResolver.resolve(new EnumMessage(AccountError.AccountNotFound, sDf52.getAccount()));
log.warn("By generationId={} s_df52[{}] (query: {}) error: {}", groupId, sDf52.getId(), accountQuery, msg);
@ -524,9 +376,7 @@ public class ClearingAccountService extends QueueConsumer implements Initializin
}
}
toProcessSDF53.add(new MutableTriple<>(sDf52, account, SDFProcessService.SDF_STATUS_OK));
if (account != null) {
toUpdate.add(new Pair<>(sDf52, account));
}
toUpdate.add(new Pair<>(sDf52, account));
}
}
log.debug("Selected to update {} account's", toUpdate.size());
@ -542,7 +392,6 @@ public class ClearingAccountService extends QueueConsumer implements Initializin
}
if (newStatus.equalsByKey(account.getStatus())) {
// одинаковых обычно не бывает.
log.trace("In sDF_52[{}] for account [{}] status {} not changed.", sdf.getId(), account.getId(), newStatus);
continue;
}
if (AccountStatus.BLOCKED == newStatus || AccountStatus.CLOSE == newStatus) { // статус 0/2
@ -586,9 +435,9 @@ public class ClearingAccountService extends QueueConsumer implements Initializin
}
}
protected synchronized RequestInfoUpdate accountUpdateSdf52_part2(BaseRequest<StatementRequest> systemRequest1,
SDf52 sdf, Account account,
BaseRequest<NotificationFeedbackRequest> secondSystemRequest2) {
protected RequestInfoUpdate accountUpdateSdf52_part2(BaseRequest<StatementRequest> systemRequest1,
SDf52 sdf, Account account,
BaseRequest<NotificationFeedbackRequest> secondSystemRequest2) {
// 5. from notification:
StatementRequest req = systemRequest1.getRequestPayload();
Long groupId = req.getGroupId();
@ -657,7 +506,6 @@ public class ClearingAccountService extends QueueConsumer implements Initializin
request.setGroupId(groupingSdf01Id);
request.setChildGenerationId(groupSdf02Id);
request.setAccountCreationResults(results);
request.setFromAccount(true);
request.setContinueSdf(true);
request.setTable(SdfTable.SDF_01); // по нему запрос получили
log.debug("Send message to kafka \"{}\": {}", destination, LogFormatter.toStringWrapper(request));
@ -683,24 +531,6 @@ public class ClearingAccountService extends QueueConsumer implements Initializin
}
/**
* Формирование уведомления о добавлении счёта
*/
public Long sendNotificationAccountNewRequest(Account account) {
String message = String.format("Добавлен новый счет %s", account.getAccount());
final String destination = Consts.NOTIFICATION_NEW;
NotificationNewRequest request = new NotificationNewRequest();
//request.setObjectId(account.getId());
request.setObjectType(ObjectType.rgst.getKey());
request.setPriority(Priority.HIGH.getKey());
request.setComment(message);
log.debug("Send message to kafka \"{}\": {}", destination, LogFormatter.toStringWrapper(request));
Long rKey = kafkaSender.sendRequestToQueue(destination, request);
log.trace("About account.id={} send notification request id={}", account.getId(), rKey);
return rKey;
}
// --------- notification apply system -----------
public static class SDF52WaitingData {
public BaseRequest<StatementRequest> systemRequest;

View file

@ -1,13 +1,5 @@
package ru.spcex.clearing.account.service;
import java.time.Instant;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.Future;
import java.util.function.Function;
import org.apache.kafka.clients.consumer.Consumer;
import org.apache.kafka.clients.producer.Producer;
import org.apache.kafka.clients.producer.ProducerRecord;
@ -17,12 +9,8 @@ import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.stereotype.Service;
import org.springframework.util.StringUtils;
import ru.clearing.classes.statics.data.account.Account;
import ru.clearing.classes.statics.data.account.ClientCode;
import ru.clearing.classes.statics.data.company.CompanySymbols;
import ru.clearing.classes.statics.data.registry.TradingClearingRegistry;
import ru.spcex.clearing.account.errors.AccountError;
import ru.spcex.clearing.imdg.IMDGDistributedNames;
@ -31,12 +19,7 @@ import ru.spcex.clearing.platform.messaging.domain.BaseRequest;
import ru.spcex.clearing.platform.messaging.domain.Consts;
import ru.spcex.clearing.platform.messaging.domain.cud.account.ClientCodeNewRequest;
import ru.spcex.clearing.platform.messaging.domain.cud.account.ClientCodeUpdateRequest;
import ru.spcex.clearing.platform.messaging.domain.cud.account.TkrAccount;
import ru.spcex.clearing.platform.messaging.domain.cud.account.TkrAccountsGatewayRequest;
import ru.spcex.clearing.platform.messaging.domain.cud.common.CommonDeleteRequest;
import ru.spcex.clearing.platform.messaging.domain.cud.gateway.MoneyAccountMsgRequest;
import ru.spcex.clearing.platform.messaging.domain.cud.registry.TradingClearingRegistryListNewRequest;
import ru.spcex.clearing.platform.messaging.domain.cud.registry.TradingClearingRegistryListUpdateRequest;
import ru.spcex.clearing.platform.messaging.domain.cud.registry.TradingClearingRegistryNewRequest;
import ru.spcex.clearing.platform.messaging.domain.cud.registry.TradingClearingRegistryUpdateRequest;
import ru.spcex.clearing.platform.messaging.serialization.LogFormatter;
@ -46,9 +29,6 @@ import ru.spcex.clearing.platform.messaging.service.Status;
import ru.spcex.clearing.util.security.UserRoleVerification;
import ru.spcex.clearing.util.services.RequestHelper;
import ru.spcex.clearing.validation.common.ValidationHelper;
import ru.spcex.platform.enumeration.AccountType;
import ru.spcex.platform.enumeration.CompanySymbol;
import ru.spcex.platform.enumeration.CurrencyCode;
import ru.spcex.platform.enumeration.TradingClearingRegistryType;
import ru.spcex.platform.enumeration.WorkflowStatus;
import ru.spcex.platform.imdg.api.Imdg;
@ -59,6 +39,13 @@ import ru.spcex.platform.utils.enumeration.IMessageResolver;
import ru.spcex.platform.utils.log.ExceptionUtils;
import ru.spcex.platform.utils.validation.IValidator;
import java.time.Instant;
import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.Future;
import java.util.function.Function;
@Service
public class ClientCodeService extends QueueConsumer implements InitializingBean {
private final Logger log = LoggerFactory.getLogger(getClass());
@ -67,8 +54,8 @@ public class ClientCodeService extends QueueConsumer implements InitializingBean
private final ImdgProvider imdgProvider;
private final Imdg<ClientCode> clientCodeMap;
private final Imdg<TradingClearingRegistry> tradingClearingRegistryMap;
private final Imdg<CompanySymbols> companySymbolsImdg;
private final Imdg<Account> accountImdg;
private final Function<ClientCodeNewRequest, IValidator> clientCodeNewRequestValidator;
private final Function<ClientCodeUpdateRequest, IValidator> clientCodeUpdateRequestValidator;
private final Function<CommonDeleteRequest, IValidator> clientCodeDeleteRequestValidator;
@ -78,8 +65,6 @@ public class ClientCodeService extends QueueConsumer implements InitializingBean
private final RequestHelper requestHelper;
protected TradingClearingRegistryService tradingClearingRegistryService;
protected ConfigurableApplicationContext context;
//protected TradingClearingRegistryListService tradingClearingRegistryListService;
@Autowired
public ClientCodeService(Consumer<String, Object> kafkaQueue,
@ -89,7 +74,6 @@ public class ClientCodeService extends QueueConsumer implements InitializingBean
IMessageResolver messageResolver,
RequestHelper requestHelper,
TradingClearingRegistryService tradingClearingRegistryService,
ConfigurableApplicationContext context, //TradingClearingRegistryListService tradingClearingRegistryListService,
UserRoleVerification userRoleVerification,
@Qualifier("clientCodeNewRequestValidator") Function<ClientCodeNewRequest, IValidator> clientCodeNewRequestValidator,
@Qualifier("clientCodeUpdateRequestValidator") Function<ClientCodeUpdateRequest, IValidator> clientCodeUpdateRequestValidator,
@ -100,8 +84,6 @@ public class ClientCodeService extends QueueConsumer implements InitializingBean
this.idGenerator = imdgProvider.getImdgIdGenerator();
this.clientCodeMap = imdgProvider.getImdg(IMDGDistributedNames.Map_ClientCode, ClientCode.class);
this.tradingClearingRegistryMap = imdgProvider.getImdg(IMDGDistributedNames.Map_TradingClearingRegistry, TradingClearingRegistry.class);
this.companySymbolsImdg = imdgProvider.getImdg(IMDGDistributedNames.Map_CompanySymbols, CompanySymbols.class);
this.accountImdg = imdgProvider.getImdg(IMDGDistributedNames.Map_Account, Account.class);
this.clientCodeNewRequestValidator = clientCodeNewRequestValidator;
this.clientCodeUpdateRequestValidator = clientCodeUpdateRequestValidator;
this.clientCodeDeleteRequestValidator = clientCodeDeleteRequestValidator;
@ -110,7 +92,6 @@ public class ClientCodeService extends QueueConsumer implements InitializingBean
this.messageResolver = messageResolver;
this.userRoleVerification = userRoleVerification;
this.tradingClearingRegistryService = tradingClearingRegistryService;
this.context = context; // TradingClearingRegistryListService
}
@Override
@ -118,21 +99,18 @@ public class ClientCodeService extends QueueConsumer implements InitializingBean
imdgProvider.waitAvailable();
callback(ClientCodeNewRequest.class)
.setFunction(this::clientCodeNew)
.forDestination(Consts.DESTINATION_CLIENT_CODE_NEW, callbacks::put);
callback(TkrAccountsGatewayRequest.class)
.setFunction(this::clientCodeNewFromGateway)
.forDestination(Consts.DESTINATION_CLIENT_CODE_NEW_FROM_GATEWAY, callbacks::put);
.setFunction(this::clientCodeNew)
.forDestination(Consts.DESTINATION_CLIENT_CODE_NEW, callbacks::put);
callback(ClientCodeNewRequest.class)
.setFunction(this::clientCodeNewFromApiUmCompany)
.forDestination(Consts.DESTINATION_CLIENT_CODE_NEW_UM_COMPANY, callbacks::put);
.setFunction(this::clientCodeNewFromApiUmCompany)
.forDestination(Consts.DESTINATION_CLIENT_CODE_NEW_UM_COMPANY, callbacks::put);
callback(ClientCodeUpdateRequest.class)
.setFunction(this::clientCodeUpdate)
.forDestination(Consts.DESTINATION_CLIENT_CODE_UPDATE, callbacks::put);
.setFunction(this::clientCodeUpdate)
.forDestination(Consts.DESTINATION_CLIENT_CODE_UPDATE, callbacks::put);
callback(CommonDeleteRequest.class)
.setFunction(this::clientCodeDelete)
.forDestination(Consts.DESTINATION_CLIENT_CODE_DELETE, callbacks::put);
.setFunction(this::clientCodeDelete)
.forDestination(Consts.DESTINATION_CLIENT_CODE_DELETE, callbacks::put);
init();
}
@ -141,11 +119,10 @@ public class ClientCodeService extends QueueConsumer implements InitializingBean
* Проверки
* 3.5.1 если не была найдена запись в tradingClearingRegistry по companyId, moneyAccountId, depoAccountId и tradingClearingRegistryType=B (п 3.5.1)
* 3.5.2 если не заполнены поля moneyAccountId ИЛИ moneyAccountId и depoAccountId
*
* @param userRequest
* @param moneyAccountId req.getMoneyAccountId()
* @param depoAccountId req.getDepoAccountId()
* @param companyId req.getCompanyId()
* @param moneyAccountId req.getMoneyAccountId()
* @param depoAccountId req.getDepoAccountId()
* @param companyId req.getCompanyId()
* @return
*/
RequestInfoUpdate crossValidate(BaseRequest<?> userRequest, Long moneyAccountId, Long depoAccountId, Long companyId) {
@ -155,8 +132,8 @@ public class ClientCodeService extends QueueConsumer implements InitializingBean
error = new EnumMessage(AccountError.RequiredFieldEmpty, "companyId");
} else {
TradingClearingRegistry tcr = tradingClearingRegistryMap.getFirstObjectByFieldValues(Map.of("companyId", companyId));
if (tcr == null) {
error = new EnumMessage(AccountError.TradingClearingRegistryNotFound, companyId);
if (tcr==null) {
error=new EnumMessage(AccountError.TradingClearingRegistryNotFound, companyId);
}
}
if (error != null) {
@ -167,59 +144,6 @@ public class ClientCodeService extends QueueConsumer implements InitializingBean
}
protected RequestInfoUpdate clientCodeNew(BaseRequest<ClientCodeNewRequest> userRequest) {
return clientCodeNew0(userRequest, false);
}
protected RequestInfoUpdate clientCodeNewFromGateway(BaseRequest<TkrAccountsGatewayRequest> tkrRequest) {
TkrAccountsGatewayRequest tkr = tkrRequest.getRequestPayload();
for (TkrAccount tkrAccount : tkr.getAccounts()) {
ClientCodeNewRequest clientCodeNewRequest = new ClientCodeNewRequest();
clientCodeNewRequest.setCode(tkrAccount.getClientCode());
if (tkrAccount.getCompanyId() != null) {
CompanySymbols companySymbols = companySymbolsImdg.getFirstObjectByFieldValues(
Map.of(
"companySymbol", CompanySymbol.UUID.getKey(),
"companySymbolValue", tkrAccount.getCompanyId()
)
);
if (companySymbols != null) {
clientCodeNewRequest.setCompanyId(companySymbols.getCompanyId());
}
}
if (StringUtils.hasText(tkrAccount.getDepoAccount())) {
Account account = accountImdg.getFirstObjectByFieldValues(
Map.of(
"account", tkrAccount.getDepoAccount(),
"accountType", AccountType.Depo.getKey()
)
);
if (account != null) {
clientCodeNewRequest.setDepoAccountId(account.getId());
}
}
for (MoneyAccountMsgRequest moneyAccountMsg : tkrAccount.getMoneyAccounts()) {
if (moneyAccountMsg.getCurrCode().equals(CurrencyCode.RUB.getKey())) {
Account account = accountImdg.getFirstObjectByFieldValues(
Map.of(
"account", moneyAccountMsg.getAccount()
)
);
if (account != null) {
clientCodeNewRequest.setMoneyAccountId(account.getId());
}
}
}
BaseRequest<ClientCodeNewRequest> request = new BaseRequest<>();
request.setRequestPayload(clientCodeNewRequest);
RequestInfoUpdate requestInfoUpdate = clientCodeNew0(request, false);
if (requestInfoUpdate != null) {
log.debug("processing result is: {}", requestInfoUpdate.getMessage());
}
}
return null;
}
protected RequestInfoUpdate clientCodeNew0(BaseRequest<ClientCodeNewRequest> userRequest, boolean fromTCRList) {
log.debug("ClientCodeNewRequest received {}", userRequest.getId());
RequestInfoUpdate requestInfoUpdate = userRoleVerification.validateRoleAndGetResult(userRequest);
@ -237,67 +161,25 @@ public class ClientCodeService extends QueueConsumer implements InitializingBean
if (doCreateTCR) {
try {
requestInfoUpdate = createAndWaitTCR(userRequest.getId(), null,
req.getCompanyId(), req.getMoneyAccountId(), req.getDepoAccountId());
req.getCompanyId(), req.getMoneyAccountId(), req.getDepoAccountId());
if (requestInfoUpdate != null) return requestInfoUpdate;
} catch (Exception e) {
log.error("Can not wait creation of TCR. request id={};CompanyId={}, MoneyAccountId={}, DepoAccountId={}; {}",
userRequest.getId(), req.getCompanyId(), req.getMoneyAccountId(), req.getDepoAccountId(),
e.toString());
userRequest.getId(), req.getCompanyId(), req.getMoneyAccountId(), req.getDepoAccountId(),
e.toString());
return makeErrorResponse(userRequest, AccountError.GeneralError, "Can not create TCR: " + e.getMessage());
}
}
if (req.getCurrencyAccountList() == null || req.getCurrencyAccountList().isEmpty()) {
ClientCode newClientCode = buildClientCode(req);
clientCodeMap.insert(newClientCode);
log.debug("successfully processed, new clientCode id {}", newClientCode.getId());
} else {//fixme transaction!
if (!fromTCRList) {
if (req.getMoneyAccountId() != null /*&& currencyAccountId != null*/) {
// Для каждого счета из списка (currencyAccountList) должна быть создана отдельная запись объекте clientCode с данным счетом для данного клиента
TradingClearingRegistry tcr = selectTradingClearingRegistry(req.getCompanyId(), req.getMoneyAccountId(), req.getDepoAccountId());
TradingClearingRegistryListNewRequest tcrListNewR = new TradingClearingRegistryListNewRequest();
tcrListNewR.setTradingClearingRegistryId(tcr == null ? null : tcr.getId());
tcrListNewR.setCurrencyAccountList(req.getCurrencyAccountList());
tcrListNewR.setStatus(req.getStatus());
TradingClearingRegistryListService tradingClearingRegistryListService = context.getBean(TradingClearingRegistryListService.class);
try {
BaseRequest<TradingClearingRegistryListNewRequest> request2 = new BaseRequest<>();
request2.setId(idGenerator.nextId());
request2.setActionType(ActionType.NEW);
request2.setRequestPayload(tcrListNewR);
requestInfoUpdate = tradingClearingRegistryListService.tradingClearingRegistryListNew0(request2, true);
if (requestInfoUpdate != null) return requestInfoUpdate;
} catch (Exception e) {
log.error("Can not wait creation of tradingClearingRegistryList. request id={}; {}",
userRequest.getId(),
ExceptionUtils.getStackTrace(e));
return makeErrorResponse(userRequest, AccountError.GeneralError, "Can not create TCR: " + e.getMessage());
}
}
}
List<Long> newClientCodeIds = new ArrayList<>();
for (Long currencyAccountId : req.getCurrencyAccountList()) {
ClientCode newClientCode = buildClientCode(req);
newClientCode.setCurrencyAccountId(currencyAccountId);
clientCodeMap.insert(newClientCode);
newClientCodeIds.add(newClientCode.getId());
log.trace("ClientCode.id={} for currencyAccountId={} created", newClientCode.getId(), currencyAccountId);
}
log.debug("successfully processed, new clientCode id {}", newClientCodeIds);
}
ClientCode newClientCode = buildClientCode(req);
clientCodeMap.insert(newClientCode);
log.debug("successfully processed, new clientCode id {}", newClientCode.getId());
return null;
}
protected RequestInfoUpdate clientCodeNewFromApiUmCompany(BaseRequest<ClientCodeNewRequest> userRequest) {
return clientCodeNewFromApiUmCompany0(userRequest, false);
}
protected RequestInfoUpdate clientCodeNewFromApiUmCompany0(BaseRequest<ClientCodeNewRequest> userRequest, boolean fromTCRList) {
protected RequestInfoUpdate clientCodeNewFromApiUmCompany(BaseRequest<ClientCodeNewRequest> userRequest) {
log.debug("ClientCodeNewRequest (UM_COMPANY) received {}", userRequest.getId());
RequestInfoUpdate requestInfoUpdate = userRoleVerification.validateRoleAndGetResult(userRequest);
@ -316,57 +198,19 @@ public class ClientCodeService extends QueueConsumer implements InitializingBean
if (doCreateTCR) {
try {
requestInfoUpdate = createAndWaitTCR(userRequest.getId(), null,
req.getCompanyId(), req.getMoneyAccountId(), req.getDepoAccountId());
req.getCompanyId(), req.getMoneyAccountId(), req.getDepoAccountId());
if (requestInfoUpdate != null) return requestInfoUpdate;
} catch (Exception e) {
log.error("Can not wait creation of TCR. request id={};CompanyId={}, MoneyAccountId={}, DepoAccountId={}; {}",
userRequest.getId(), req.getCompanyId(), req.getMoneyAccountId(), req.getDepoAccountId(),
e.toString());
userRequest.getId(), req.getCompanyId(), req.getMoneyAccountId(), req.getDepoAccountId(),
e.toString());
return makeErrorResponse(userRequest, AccountError.GeneralError, "Can not create TCR at this moment" + e.getMessage());
}
}
if (req.getCurrencyAccountList() == null || req.getCurrencyAccountList().isEmpty()) {
ClientCode newClientCode = buildClientCode(req);
clientCodeMap.insert(newClientCode);
log.debug("successfully processed, new clientCode id {}", newClientCode.getId());
} else {//fixme transaction!
if (!fromTCRList) {
if (req.getMoneyAccountId() != null /*&& currencyAccountId != null*/) {
// Для каждого счета из списка (currencyAccountList) должна быть создана отдельная запись объекте clientCode с данным счетом для данного клиента
TradingClearingRegistry tcr = selectTradingClearingRegistry(req.getCompanyId(), req.getMoneyAccountId(), req.getDepoAccountId());
TradingClearingRegistryListUpdateRequest tcrListUpdateR = new TradingClearingRegistryListUpdateRequest();
tcrListUpdateR.setTradingClearingRegistryId(tcr == null ? null : tcr.getId());
tcrListUpdateR.setCurrencyAccountList(req.getCurrencyAccountList());
TradingClearingRegistryListService tradingClearingRegistryListService = context.getBean(TradingClearingRegistryListService.class);
try {
BaseRequest<TradingClearingRegistryListUpdateRequest> request2 = new BaseRequest<>();
request2.setId(idGenerator.nextId());
request2.setActionType(ActionType.NEW);
request2.setRequestPayload(tcrListUpdateR);
requestInfoUpdate = tradingClearingRegistryListService.tradingClearingRegistryListUpdate0(request2, true);
if (requestInfoUpdate != null) return requestInfoUpdate;
} catch (Exception e) {
log.error("Can not wait creation of tradingClearingRegistryList. request id={}; {}",
userRequest.getId(),
ExceptionUtils.getStackTrace(e));
return makeErrorResponse(userRequest, AccountError.GeneralError, "Can not create TCR: " + e.getMessage());
}
}
}
List<Long> newClientCodeIds = new ArrayList<>();
for (Long currencyAccountId : req.getCurrencyAccountList()) {
ClientCode newClientCode = buildClientCode(req);
newClientCode.setCurrencyAccountId(currencyAccountId);
clientCodeMap.insert(newClientCode);
newClientCodeIds.add(newClientCode.getId());
log.trace("ClientCode.id={} for currencyAccountId={} created", newClientCode.getId(), currencyAccountId);
}
log.debug("successfully processed, new clientCode id {}", newClientCodeIds);
}
ClientCode newClientCode = buildClientCode(req);
clientCodeMap.insert(newClientCode);
log.debug("successfully processed, new clientCode id {}", newClientCode.getId());
return null;
}
@ -395,18 +239,17 @@ public class ClientCodeService extends QueueConsumer implements InitializingBean
if (doCreateTCR) {
try {
requestInfoUpdate = createAndWaitTCR(userRequest.getId(), clientCode.getId(),
req.getCompanyId(), req.getMoneyAccountId(), req.getDepoAccountId());
req.getCompanyId(), req.getMoneyAccountId(), req.getDepoAccountId());
if (requestInfoUpdate != null) return requestInfoUpdate;
} catch (Exception e) {
log.error("Can not wait creation of TCR. request id={};CompanyId={}, MoneyAccountId={}, DepoAccountId={}; {}",
userRequest.getId(), req.getCompanyId(), req.getMoneyAccountId(), req.getDepoAccountId(),
e.toString());
userRequest.getId(), req.getCompanyId(), req.getMoneyAccountId(), req.getDepoAccountId(),
e.toString());
return makeErrorResponse(userRequest, AccountError.GeneralError, "Can not create TCR: " + e.getMessage());
}
}
updateClientCode(clientCode, req);
//fixme спросить, у нас при апдейте передаётся clientCode.id которого надо изменять. А тут список currencyAccountList приходит - в нём что будет - только 1 счёт для него и его же менять?
clientCodeMap.update(clientCode);
log.debug("successfully processed update, id {}", clientCode.getId());
@ -440,7 +283,7 @@ public class ClientCodeService extends QueueConsumer implements InitializingBean
return null;
}
protected TradingClearingRegistry selectTradingClearingRegistry(Long companyId, Long moneyAccountId, Long depoAccountId) {
TradingClearingRegistry selectTradingClearingRegistry(Long companyId, Long moneyAccountId, Long depoAccountId) {
Map<String, Comparable<?>> query = new HashMap<>();
query.put("companyId", companyId);
query.put("moneyAccountId", moneyAccountId);
@ -467,10 +310,10 @@ public class ClientCodeService extends QueueConsumer implements InitializingBean
}
protected RequestInfoUpdate createAndWaitTCR(Long reqId, Long clientCode,
Long companyId, Long moneyAccountId, Long depoAccountId) {
Long companyId, Long moneyAccountId, Long depoAccountId) {
log.debug("For request {}, clientCode={} need create TCR: companyId={}, moneyAccountId={}, depoAccountId={}",
reqId, clientCode == null ? "new" : clientCode,
companyId, moneyAccountId, depoAccountId);
reqId, clientCode == null ? "new" : clientCode,
companyId, moneyAccountId, depoAccountId);
BaseRequest<TradingClearingRegistryNewRequest> request = new BaseRequest<>();
request.setId(idGenerator.nextId());
request.setActionType(ActionType.NEW);
@ -557,7 +400,7 @@ public class ClientCodeService extends QueueConsumer implements InitializingBean
TradingClearingRegistry tradingClearingRegistry = selectTradingClearingRegistry(req.getCompanyId(), req.getMoneyAccountId(), req.getDepoAccountId());
if (tradingClearingRegistry == null) {
log.warn("TCR not found: CompanyId {}, MoneyAccountId {}, DepoAccountId {}",
req.getCompanyId(), req.getMoneyAccountId(), req.getDepoAccountId());
req.getCompanyId(), req.getMoneyAccountId(), req.getDepoAccountId());
} else {
clientCode.setTradingClearingRegistryId(tradingClearingRegistry.getId());
}
@ -580,7 +423,7 @@ public class ClientCodeService extends QueueConsumer implements InitializingBean
TradingClearingRegistry tradingClearingRegistry = selectTradingClearingRegistry(req.getCompanyId(), req.getMoneyAccountId(), req.getDepoAccountId());
if (tradingClearingRegistry == null) {
log.warn("TCR not found: CompanyId {}, MoneyAccountId {}, DepoAccountId {}",
req.getCompanyId(), req.getMoneyAccountId(), req.getDepoAccountId());
req.getCompanyId(), req.getMoneyAccountId(), req.getDepoAccountId());
} else {
clientCode.setTradingClearingRegistryId(tradingClearingRegistry.getId());
}

View file

@ -1,9 +1,5 @@
package ru.spcex.clearing.account.service;
import java.time.Instant;
import java.util.ArrayList;
import java.util.List;
import java.util.function.Function;
import org.apache.kafka.clients.consumer.Consumer;
import org.apache.kafka.clients.producer.Producer;
import org.slf4j.Logger;
@ -22,24 +18,22 @@ import ru.spcex.clearing.platform.messaging.domain.cud.account.sdf01.AccountSdf0
import ru.spcex.clearing.platform.messaging.domain.cud.account.sdf01.AccountSdfRequestPart;
import ru.spcex.clearing.platform.messaging.domain.cud.balance.AccountSdfToStatementRequestPart;
import ru.spcex.clearing.platform.messaging.domain.cud.balance.StatementRequest;
import ru.spcex.clearing.platform.messaging.domain.cud.utilities.NotificationNewRequest;
import ru.spcex.clearing.platform.messaging.serialization.LogFormatter;
import ru.spcex.clearing.platform.messaging.service.QueueConsumer;
import ru.spcex.clearing.platform.messaging.service.RequestInfoUpdate;
import ru.spcex.clearing.platform.messaging.service.sender.KafkaSender;
import ru.spcex.clearing.validation.common.ValidationHelper;
import ru.spcex.platform.enumeration.AccountType;
import ru.spcex.platform.enumeration.DepoAccountType;
import ru.spcex.platform.enumeration.ObjectType;
import ru.spcex.platform.enumeration.Priority;
import ru.spcex.platform.enumeration.SdfTable;
import ru.spcex.platform.enumeration.ServiceStatus;
import ru.spcex.platform.enumeration.WorkflowStatus;
import ru.spcex.platform.enumeration.*;
import ru.spcex.platform.imdg.api.Imdg;
import ru.spcex.platform.imdg.api.ImdgProvider;
import ru.spcex.platform.imdg.api.ImdgTransaction;
import ru.spcex.platform.utils.validation.IValidator;
import java.time.Instant;
import java.util.ArrayList;
import java.util.List;
import java.util.function.Function;
@Service
public class DepoAccountService extends QueueConsumer implements InitializingBean {
private final Logger log = LoggerFactory.getLogger(getClass());
@ -135,9 +129,6 @@ public class DepoAccountService extends QueueConsumer implements InitializingBea
imdgTransaction.rollbackTransaction();
}
}
if (txOk && depoAccount != null) {
sendNotificationAccountNewRequest(account);
}
return null;
}
@ -146,7 +137,6 @@ public class DepoAccountService extends QueueConsumer implements InitializingBea
AccountSdf01Request req = userRequest.getRequestPayload();
List<AccountSdfToStatementRequestPart> accountToStatement = new ArrayList<>();
List<Account> accountsToNotification = new ArrayList<>();
ImdgTransaction imdgTransaction = imdgProvider.newTransaction();
boolean txOk = false;
@ -194,8 +184,7 @@ public class DepoAccountService extends QueueConsumer implements InitializingBea
Long depoAccountId = -1L;
Long accountId = -1L;
accountId = accountImdg.insert(account);
accountsToNotification.add(account);
accountId = accountImdg.insert(account);
DepoAccount depoAccount = new DepoAccount();
depoAccount.setCompanyId(accountReq.getCompanyId());
@ -230,11 +219,6 @@ public class DepoAccountService extends QueueConsumer implements InitializingBea
}
sendStatementRequestBack(req.getGroupingSdf01Id(), req.getGroupingSdf02Id(), accountToStatement);
if (txOk) {
for (Account account : accountsToNotification)
sendNotificationAccountNewRequest(account);
}
log.debug("successfully processed, grouping id={}, processed number={}", req.getGroupingSdf01Id(), accountToStatement.size());
return null;
@ -244,28 +228,10 @@ public class DepoAccountService extends QueueConsumer implements InitializingBea
StatementRequest request = new StatementRequest();
request.setGroupId(groupingSdf01Id);
request.setChildGenerationId(groupingSdf02Id);
request.setContinueSdf(true);
request.setContinueSdf(true); //fixme????
request.setAccountCreationResults(results);
request.setFromAccount(true);
request.setTable(SdfTable.SDF_08); // по нему запрос получили
log.debug("Send message to kafka \"{}\": {}", Consts.STATEMENT_PROCESS, LogFormatter.toStringWrapper(request));
kafkaSender.sendRequestToQueue(Consts.STATEMENT_PROCESS, request);
}
/**
* Формирование уведомления о добавлении счёта
*/
public Long sendNotificationAccountNewRequest(Account account) {
String message = String.format("Добавлен новый счет %s", account.getAccount());
final String destination = Consts.NOTIFICATION_NEW;
NotificationNewRequest request = new NotificationNewRequest();
//request.setObjectId(account.getId());
request.setObjectType(ObjectType.rgst.getKey());
request.setPriority(Priority.HIGH.getKey());
request.setComment(message);
log.debug("Send message to kafka \"{}\": {}", destination, LogFormatter.toStringWrapper(request));
Long rKey = kafkaSender.sendRequestToQueue(destination, request);
log.trace("About account.id={} send notification request id={}", account.getId(), rKey);
return rKey;
}
}

View file

@ -16,6 +16,7 @@ import ru.spcex.clearing.imdg.IMDGDistributedNames;
import ru.spcex.clearing.platform.messaging.domain.BaseRequest;
import ru.spcex.clearing.platform.messaging.domain.Consts;
import ru.spcex.clearing.platform.messaging.domain.cud.account.InformationAccountNewRequest;
import ru.spcex.clearing.platform.messaging.domain.cud.registry.TradingClearingRegistryNewRequest;
import ru.spcex.clearing.platform.messaging.domain.cud.reports.NotificationRequest;
import ru.spcex.clearing.platform.messaging.serialization.LogFormatter;
import ru.spcex.clearing.platform.messaging.service.QueueConsumer;
@ -25,7 +26,6 @@ import ru.spcex.clearing.util.security.UserRoleVerification;
import ru.spcex.clearing.util.services.RequestHelper;
import ru.spcex.clearing.validation.common.ValidationHelper;
import ru.spcex.platform.enumeration.AccountType;
import ru.spcex.platform.enumeration.CurrencyCode;
import ru.spcex.platform.enumeration.ServiceStatus;
import ru.spcex.platform.enumeration.WorkflowStatus;
import ru.spcex.platform.imdg.api.Imdg;
@ -40,7 +40,6 @@ import ru.spcex.platform.utils.validation.IValidator;
import java.time.Instant;
import java.util.Collection;
import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.atomic.AtomicLong;
import java.util.function.Function;
@ -64,7 +63,7 @@ public class InformationAccountService extends QueueConsumer implements Initiali
* Кэш-счётчик сквозных номеров счетов.
* См. accountNextId()
*/
protected Map<String, AtomicLong> infoCounterByCurrency = new HashMap<>();
protected AtomicLong infoCounter;
@Autowired
public InformationAccountService(Consumer<String, Object> kafkaQueue,
@ -77,7 +76,7 @@ public class InformationAccountService extends QueueConsumer implements Initiali
AccountHelper accountHelper,
RequestHelper requestHelper,
@Qualifier("informationAccountNewRequestValidator")
Function<InformationAccountNewRequest, IValidator> infoAccountNewRequestValidator) {
Function<InformationAccountNewRequest, IValidator> infoAccountNewRequestValidator) {
super(kafkaQueue, kafkaResponseQueue);
this.kafkaSender = kafkaSender;
this.messageResolver = messageResolver;
@ -88,21 +87,21 @@ public class InformationAccountService extends QueueConsumer implements Initiali
this.requestHelper = requestHelper;
this.infoAccountNewRequestValidator = infoAccountNewRequestValidator;
this.informationAccountImdg = imdgProvider.getImdg(
IMDGDistributedNames.Map_InformationAccount, InformationAccount.class
IMDGDistributedNames.Map_InformationAccount, InformationAccount.class
);
this.accountImdg = imdgProvider.getImdg(
IMDGDistributedNames.Map_Account, Account.class
IMDGDistributedNames.Map_Account, Account.class
);
}
@Override
public void afterPropertiesSet() throws Exception {
callback(InformationAccountNewRequest.class)
.setFunction(this::informationAccountNew)
.forDestination(Consts.DESTINATION_INFORMATION_ACCOUNT_NEW, callbacks::put);
.setFunction(this::informationAccountNew)
.forDestination(Consts.DESTINATION_INFORMATION_ACCOUNT_NEW, callbacks::put);
callback(InformationAccountNewRequest.class)
.setFunction(this::informationAccountSystemNew)
.forDestination(Consts.INFORMATION_ACCOUNT_SYSTEM_NEW, callbacks::put);
.setFunction(this::informationAccountSystemNew)
.forDestination(Consts.INFORMATION_ACCOUNT_SYSTEM_NEW, callbacks::put);
init();
}
@ -116,17 +115,15 @@ public class InformationAccountService extends QueueConsumer implements Initiali
if (requestInfoUpdate != null) return requestInfoUpdate;
InformationAccountNewRequest req = userRequest.getRequestPayload();
String currency = req.getCurrency() == null ? CurrencyCode.RUB.getKey() : req.getCurrency(); //userRequest.getRequestPayload().getCurrency();
Long newId = informationAccountImdg.nextIDSequenceFor();
Long infoSequenceId = accountNextId(currency, 810L);
String accountValue = generateInfoAccount(810L, infoSequenceId);
Long infoSequenceId = accountNextId();
String accountValue = generateInfoAccount(infoSequenceId);
log.trace("New info-account id={}, sequenceId={}, account={}", newId, infoSequenceId, accountValue);
ImdgPredicateBuilder accountPredicateBuilder = accountImdg.predicateBuilder();
ImdgPredicate companyIdPredicate = accountPredicateBuilder.equals("companyId", 1L);
ImdgPredicate accountTypePredicate = accountPredicateBuilder.and(accountPredicateBuilder.equals("accountType", AccountType.Anlt.getKey()),
accountPredicateBuilder.equals("currency", currency));
ImdgPredicate accountTypePredicate = accountPredicateBuilder.equals("accountType", AccountType.Anlt.getKey());
ImdgPredicate andPredicate = accountPredicateBuilder.and(companyIdPredicate, accountTypePredicate);
Collection<Account> accountsAnlt = accountImdg.getCollectionObjectsByPredicate(andPredicate);
if (accountsAnlt.isEmpty()) {
@ -176,12 +173,12 @@ public class InformationAccountService extends QueueConsumer implements Initiali
if (txOk) {
imdgTransaction.commitTransaction();
log.debug("successfully processed, new information account id {}, new account id {}",
informationAccountId,
accountId);
informationAccountId,
accountId);
} else {
log.debug("failed insert, new information account id {}, new account id {} (if id = -1 then insert is failed)",
informationAccountId,
accountId);
informationAccountId,
accountId);
imdgTransaction.rollbackTransaction();
}
}
@ -201,8 +198,8 @@ public class InformationAccountService extends QueueConsumer implements Initiali
ImdgPredicateBuilder pb = accountImdg.predicateBuilder();
{ // Проверка существования счёта
Collection<Account> accountsAnlt = accountImdg.getCollectionObjectsByFieldValues(Map.of(
"companyId", forCompanyId,
"accountType", AccountType.Info.getKey()
"companyId", forCompanyId,
"accountType", AccountType.Info.getKey()
));
if (!accountsAnlt.isEmpty()) {
String trueMessage = messageResolver.resolve(new EnumMessage(AccountError.InfoAccountAlreadyExist, forCompanyId));
@ -212,20 +209,16 @@ public class InformationAccountService extends QueueConsumer implements Initiali
}
String currency = userRequest.getRequestPayload().getCurrency();
if (currency == null)
currency = CurrencyCode.RUB.getKey();
Long newId = informationAccountImdg.nextIDSequenceFor();
Long infoSequenceId = accountNextId(currency, 810L); // требуется последовательность n+1
String accountValue = generateInfoAccount(810L, infoSequenceId);
Long infoSequenceId = accountNextId(); // требуется последовательность n+1
String accountValue = generateInfoAccount(infoSequenceId);
log.trace("New info-account id={}, sequenceId={}, account={}", newId, infoSequenceId, accountValue);
Long anltAccountId = null;
{
ImdgPredicate andPredicate = pb.and(
pb.equals("companyId", 1L),
pb.equals("accountType", AccountType.Anlt.getKey()),
pb.equals("currency", currency)
pb.equals("companyId", 1L),
pb.equals("accountType", AccountType.Anlt.getKey())
);
Collection<Account> accountsAnlt = accountImdg.getCollectionObjectsByPredicate(andPredicate);
if (accountsAnlt.isEmpty()) {
@ -274,12 +267,12 @@ public class InformationAccountService extends QueueConsumer implements Initiali
if (txOk) {
imdgTransaction.commitTransaction();
log.debug("successfully processed, new information account id {}, new account id {}",
informationAccountId,
accountId);
informationAccountId,
accountId);
} else {
log.debug("failed insert, new information account id {}, new account id {} (if id = -1 then insert is failed)",
informationAccountId,
accountId);
informationAccountId,
accountId);
imdgTransaction.rollbackTransaction();
}
}
@ -301,44 +294,26 @@ public class InformationAccountService extends QueueConsumer implements Initiali
kafkaSender.sendRequestToQueue(Consts.CREATE_NOTIFICATION_NCMP, request);
}
public String generateInfoAccount(Long currencyCodeId, Long id) {
return "%d%d%08d%d".formatted(39911, currencyCodeId, id, 7000);
public String generateInfoAccount(Long id) {
return "%d%d%08d%d".formatted(39911, 810, id, 7000);
}
public synchronized Long accountNextId(String currency) {
return accountNextId(currency, 810L);
}
/**
* Сквозной номер инфо-счетов
*
* @param
* @return infoCounter++
*/
public synchronized Long accountNextId(String currency, Long currencyCodeId) {
if (currency == null)
currency = CurrencyCode.RUB.getKey(); // default
AtomicLong infoCounter = infoCounterByCurrency.get(currency);
public synchronized Long accountNextId() {
if (infoCounter == null) synchronized (this) {
if (infoCounter == null) {
log.debug("Init account-information counter.");
ImdgPredicateBuilder predicateBuilder = accountImdg.predicateBuilder();
ImdgPredicate currencyPredicate = predicateBuilder.equals("currency", currency);
if (CurrencyCode.RUB.equalsByKey(currency)) {
currencyPredicate = predicateBuilder.or(
currencyPredicate,
predicateBuilder.isNull("currency")
);
}
Collection<Account> allInfoAcc = accountImdg.getCollectionObjectsByPredicate(predicateBuilder.and(
predicateBuilder.equals("accountType", AccountType.Info.getKey()),
currencyPredicate
));
Collection<Account> allInfoAcc = accountImdg.getCollectionObjectsByFieldValues(Map.of("accountType", AccountType.Info.getKey()));
if (allInfoAcc.isEmpty()) {
infoCounter = new AtomicLong(1);
log.debug("No account information on map. n={}", infoCounter.get());
} else {
Pattern accPattern = Pattern.compile("39911%d([0-9]{8})7000".formatted(currencyCodeId));
Pattern accPattern = Pattern.compile("39911810([0-9]{8})7000");
int maxN = 1;
int parsedCount = 0;
String lastAccount = null; // for debug
@ -362,11 +337,10 @@ public class InformationAccountService extends QueueConsumer implements Initiali
}
infoCounter = new AtomicLong(maxN);
log.debug("Parsed {} information accounts ({} pattern match) in map. n={}",
allInfoAcc.size(), parsedCount, infoCounter.get());
allInfoAcc.size(), parsedCount, infoCounter.get());
if (parsedCount == 0 && lastAccount != null)
log.debug("Last unparseable account: {}", lastAccount);
}
infoCounterByCurrency.put(currency, infoCounter);
}
}
return infoCounter.incrementAndGet();

View file

@ -1,29 +1,33 @@
package ru.spcex.clearing.account.service;
import java.time.Instant;
import java.util.Collection;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import org.apache.commons.lang3.tuple.Triple;
import org.apache.kafka.clients.producer.Producer;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;
import ru.clearing.classes.statics.data.account.Account;
import ru.clearing.classes.statics.data.misc.Notification;
import ru.clearing.classes.statics.data.sdf.SDf52;
import ru.clearing.classes.statics.data.sdf.SDf53;
import ru.spcex.clearing.imdg.IMDGDistributedNames;
import ru.spcex.clearing.platform.messaging.domain.BaseRequest;
import ru.spcex.clearing.platform.messaging.domain.Consts;
import ru.spcex.clearing.platform.messaging.domain.cud.balance.ExportToFileRequest;
import ru.spcex.clearing.platform.messaging.domain.cud.balance.StatementRequest;
import ru.spcex.clearing.platform.messaging.domain.cud.utilities.NotificationFeedbackRequest;
import ru.spcex.clearing.platform.messaging.service.sender.KafkaSender;
import ru.spcex.platform.enumeration.AccountStatus;
import ru.spcex.platform.enumeration.NotificationStatus;
import ru.spcex.platform.enumeration.ObjectType;
import ru.spcex.platform.imdg.api.Imdg;
import ru.spcex.platform.imdg.api.ImdgId;
import ru.spcex.platform.imdg.api.ImdgProvider;
import ru.spcex.platform.imdg.api.ImdgTransaction;
import ru.spcex.platform.utils.collection.Pair;
import java.time.Instant;
import java.util.*;
import java.util.concurrent.CopyOnWriteArrayList;
@Service
public class SDFProcessService {
@ -112,7 +116,6 @@ public class SDFProcessService {
newSdf.setDeal(sdf52.getDeal());
newSdf.setDate(sdf52.getDate());
newSdf.setStatus(sdf52.getStatus());
newSdf.setAccType(sdf52.getAcc_type());
newSdf.setResult(result);
newSdf.setGenerationTime(now);
newSdf.setGenerationId(sdf52.getGenerationId());

View file

@ -1,317 +0,0 @@
package ru.spcex.clearing.account.service;
import java.time.Instant;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
import java.util.function.Function;
import org.apache.kafka.clients.consumer.Consumer;
import org.apache.kafka.clients.producer.Producer;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;
import ru.clearing.classes.statics.data.account.Account;
import ru.clearing.classes.statics.data.account.ClearingAccount;
import ru.clearing.classes.statics.data.account.DepoAccount;
import ru.clearing.classes.statics.data.account.InformationAccount;
import ru.clearing.classes.statics.data.company.Company;
import ru.clearing.classes.statics.data.company.relation.Relation;
import ru.clearing.classes.statics.data.registry.TradingClearingRegistry;
import ru.clearing.classes.statics.data.registry.TradingClearingRegistryList;
import ru.spcex.clearing.account.errors.AccountError;
import ru.spcex.clearing.imdg.IMDGDistributedNames;
import ru.spcex.clearing.platform.messaging.domain.BaseRequest;
import ru.spcex.clearing.platform.messaging.domain.Consts;
import ru.spcex.clearing.platform.messaging.domain.cud.account.ClientCodeNewRequest;
import ru.spcex.clearing.platform.messaging.domain.cud.clearing.CreateRegistryRequest;
import ru.spcex.clearing.platform.messaging.domain.cud.registry.TradingClearingRegistryListNewRequest;
import ru.spcex.clearing.platform.messaging.domain.cud.registry.TradingClearingRegistryListUpdateRequest;
import ru.spcex.clearing.platform.messaging.serialization.LogFormatter;
import ru.spcex.clearing.platform.messaging.service.QueueConsumer;
import ru.spcex.clearing.platform.messaging.service.RequestInfoUpdate;
import ru.spcex.clearing.platform.messaging.service.sender.KafkaSender;
import ru.spcex.clearing.util.security.UserRoleVerification;
import ru.spcex.clearing.util.services.RequestHelper;
import ru.spcex.clearing.validation.common.ValidationHelper;
import ru.spcex.platform.enumeration.ServiceStatus;
import ru.spcex.platform.imdg.api.Imdg;
import ru.spcex.platform.imdg.api.ImdgProvider;
import ru.spcex.platform.utils.enumeration.IMessageResolver;
import ru.spcex.platform.utils.log.ExceptionUtils;
import ru.spcex.platform.utils.validation.IValidator;
@Service
public class TradingClearingRegistryListService extends QueueConsumer implements InitializingBean {
private final Logger log = LoggerFactory.getLogger(getClass());
private final ValidationHelper validationHelper;
private final UserRoleVerification userRoleVerification;
protected ClientCodeService clientCodeService;
private final ImdgProvider imdgProvider;
private final Imdg<TradingClearingRegistryList> tradingClearingRegistryListImdg;
private final Imdg<TradingClearingRegistry> tradingClearingRegistryImdg;
private final Imdg<DepoAccount> depoAccountImdg;
private final Imdg<ClearingAccount> clearingAccountImdg;
private final Imdg<InformationAccount> informationAccountImdg;
private final Imdg<Account> accountImdg;
private final Imdg<Company> companyImdg;
private final Imdg<Relation> relationImdg;
private final Function<TradingClearingRegistryListUpdateRequest, IValidator> tradingClearingRegistryListUpdateRequestValidator;
private final RequestHelper requestHelper;
private final Function<TradingClearingRegistryListNewRequest, IValidator> tradingClearingRegistryListNewRequestValidator;
// private final Function<CommonIdRequest, IValidator> tradingClearingRegistryListBlockRequestValidator;
private final IMessageResolver messageResolver;
private final Producer<String, Object> kafkaProducer;
private final KafkaSender kafkaSender;
public TradingClearingRegistryListService(Consumer<String, Object> kafkaQueue,
Producer<String, Object> kafkaProducer,
KafkaSender kafkaSender,
ImdgProvider imdgProvider,
ClientCodeService clientCodeService,
ValidationHelper validationHelper,
UserRoleVerification userRoleVerification,
IMessageResolver messageResolver,
RequestHelper requestHelper,
@Qualifier("tradingClearingRegistryListNewRequestValidator")
Function<TradingClearingRegistryListNewRequest, IValidator> tradingClearingRegistryListNewRequestValidator,
@Qualifier("tradingClearingRegistryListUpdateRequestValidator")
Function<TradingClearingRegistryListUpdateRequest, IValidator> tradingClearingRegistryListUpdateRequestValidator
) {
super(kafkaQueue, kafkaProducer);
this.kafkaProducer = kafkaProducer;
this.kafkaSender = kafkaSender;
this.validationHelper = validationHelper;
this.userRoleVerification = userRoleVerification;
this.requestHelper = requestHelper;
this.imdgProvider = imdgProvider;
this.tradingClearingRegistryListImdg = imdgProvider.getImdg(IMDGDistributedNames.Map_TradingClearingRegistryList, TradingClearingRegistryList.class);
this.tradingClearingRegistryImdg = imdgProvider.getImdg(IMDGDistributedNames.Map_TradingClearingRegistry, TradingClearingRegistry.class);
this.depoAccountImdg = imdgProvider.getImdg(IMDGDistributedNames.Map_DepoAccount, DepoAccount.class);
this.clearingAccountImdg = imdgProvider.getImdg(IMDGDistributedNames.Map_ClearingAccount, ClearingAccount.class);
this.informationAccountImdg = imdgProvider.getImdg(IMDGDistributedNames.Map_InformationAccount, InformationAccount.class);
this.companyImdg = imdgProvider.getImdg(IMDGDistributedNames.Map_Company, Company.class);
this.accountImdg = imdgProvider.getImdg(IMDGDistributedNames.Map_Account, Account.class);
this.relationImdg = imdgProvider.getImdg(IMDGDistributedNames.Map_Relation, Relation.class);
this.tradingClearingRegistryListNewRequestValidator = tradingClearingRegistryListNewRequestValidator;
this.tradingClearingRegistryListUpdateRequestValidator = tradingClearingRegistryListUpdateRequestValidator;
// this.tradingClearingRegistryListBlockRequestValidator = tradingClearingRegistryListBlockRequestValidator;
this.messageResolver = messageResolver;
this.clientCodeService = clientCodeService;
}
@Override
public void afterPropertiesSet() throws Exception {
imdgProvider.waitAvailable();
callback(TradingClearingRegistryListNewRequest.class)
.setFunction(this::tradingClearingRegistryListNew)
.forDestination(Consts.DESTINATION_TRADING_CLEARING_REGISTRIES_LIST_NEW, callbacks::put);
callback(TradingClearingRegistryListUpdateRequest.class)
.setFunction(this::tradingClearingRegistryListUpdate)
.forDestination(Consts.DESTINATION_TRADING_CLEARING_REGISTRIES_LIST_UPDATE, callbacks::put);
init();
}
public RequestInfoUpdate tradingClearingRegistryListNew(BaseRequest<TradingClearingRegistryListNewRequest> userRequest) {
return tradingClearingRegistryListNew1(userRequest, false);
}
@Deprecated
protected RequestInfoUpdate tradingClearingRegistryListNew0(BaseRequest<TradingClearingRegistryListNewRequest> userRequest, boolean innerCall) {
// fixme объединить с путом а то лист может быть пустой. и чистить...
log.debug("TradingClearingRegistryListNewRequest received");
RequestInfoUpdate requestInfoUpdate = userRoleVerification.validateRoleAndGetResult(userRequest);
if (requestInfoUpdate != null) {
return requestInfoUpdate;
}
requestInfoUpdate = validationHelper.validateTillFirstError(userRequest, tradingClearingRegistryListNewRequestValidator);
TradingClearingRegistry tcr = tradingClearingRegistryImdg.getSingleObjectByID(userRequest
.getRequestPayload()
.getTradingClearingRegistryId());
if (requestInfoUpdate != null) {
return requestInfoUpdate;
}
TradingClearingRegistryListNewRequest req = userRequest.getRequestPayload();
Account account = accountImdg.getSingleObjectByID(req.getAccountId());
Instant now = Instant.now();
List<Long> newIds=new ArrayList<>();
for (Long currAccId: req.getCurrencyAccountList()) {
Long id = tradingClearingRegistryListImdg.nextIDSequenceFor();
TradingClearingRegistryList tradingClearingRegistryList = new TradingClearingRegistryList();
tradingClearingRegistryList.setId(id);
tradingClearingRegistryList.setCreated(now);
tradingClearingRegistryList.setUpdated(now);
tradingClearingRegistryList.setTradingClearingRegistryId(req.getTradingClearingRegistryId());
tradingClearingRegistryList.setAccountId(currAccId);
tradingClearingRegistryList.setCurrency(account.getCurrency());
if (req.getStatus() == null) {
tradingClearingRegistryList.setStatus(ServiceStatus.Active.getKey());
log.trace("TCRList status in request not set. Use default: {}", tradingClearingRegistryList.getStatus());
} else {
tradingClearingRegistryList.setStatus(req.getStatus());
}
tradingClearingRegistryListImdg.insert(tradingClearingRegistryList);
newIds.add(id);
}
log.info("New TCRList.id={} has created.", newIds);
if (!innerCall) {
// Для каждого счета из списка (currencyAccountList) должна быть создана отдельная запись объекте clientCode с данным счетом для данного клиента, т.е. у одного клиента может быть несколько валютных счетов.
try {
ClientCodeNewRequest cCodeReq = new ClientCodeNewRequest();
cCodeReq.setTradingClearingRegistryId(req.getTradingClearingRegistryId());
cCodeReq.setDepoAccountId(tcr.getDepoAccountId());
cCodeReq.setMoneyAccountId(tcr.getMoneyAccountId());
cCodeReq.setCompanyId(tcr.getCompanyId());
cCodeReq.setCurrencyAccountList(req.getCurrencyAccountList());
cCodeReq.setStatus(req.getStatus());
//todo cCodeReq.setCode();
BaseRequest<ClientCodeNewRequest> request2 = new BaseRequest<>();
request2.setRequestPayload(cCodeReq);
requestInfoUpdate = clientCodeService.clientCodeNew0(request2, true);
if (requestInfoUpdate != null) return requestInfoUpdate;
} catch (Exception e) {
log.error("Can not wait creation of tradingClearingRegistryList. request id={}; {}",
userRequest.getId(),
ExceptionUtils.getStackTrace(e));
return requestHelper.makeErrorResponse(userRequest, AccountError.GeneralError, "Can not create TCR: " + e.getMessage());
}
}
sendNotificationToClearingSvc(newIds, tcr);
log.debug("successfully processed, id {}", newIds);
return null;
}
protected RequestInfoUpdate tradingClearingRegistryListNew1(BaseRequest<TradingClearingRegistryListNewRequest> userRequest, boolean innerCall) {
log.debug("TradingClearingRegistryListNewRequest received");
RequestInfoUpdate requestInfoUpdate = userRoleVerification.validateRoleAndGetResult(userRequest);
if (requestInfoUpdate != null) {
return requestInfoUpdate;
}
requestInfoUpdate = validationHelper.validateTillFirstError(userRequest, tradingClearingRegistryListNewRequestValidator);
if (requestInfoUpdate != null) {
return requestInfoUpdate;
}
TradingClearingRegistryListNewRequest req = userRequest.getRequestPayload();
TradingClearingRegistry tcr = tradingClearingRegistryImdg.getSingleObjectByID(req.getTradingClearingRegistryId());
Account account = accountImdg.getSingleObjectByID(req.getAccountId());
Instant now = Instant.now();
Long id = tradingClearingRegistryListImdg.nextIDSequenceFor();
TradingClearingRegistryList tradingClearingRegistryList = new TradingClearingRegistryList();
tradingClearingRegistryList.setId(id);
tradingClearingRegistryList.setCreated(now);
tradingClearingRegistryList.setUpdated(now);
tradingClearingRegistryList.setTradingClearingRegistryId(req.getTradingClearingRegistryId());
tradingClearingRegistryList.setAccountId(req.getAccountId());
tradingClearingRegistryList.setCurrency(account.getCurrency());
if (req.getStatus() == null) {
tradingClearingRegistryList.setStatus(ServiceStatus.Active.getKey());
log.trace("TCRList status in request not set. Use default: {}", tradingClearingRegistryList.getStatus());
} else {
tradingClearingRegistryList.setStatus(req.getStatus());
}
tradingClearingRegistryListImdg.insert(tradingClearingRegistryList);
log.info("New TCRList.id={} has created.", id);
if (!innerCall) {
// Для каждого счета из списка (currencyAccountList) должна быть создана отдельная запись объекте clientCode с данным счетом для данного клиента, т.е. у одного клиента может быть несколько валютных счетов.
// try {
// TradingClearingRegistry tcr = tradingClearingRegistryImdg.getSingleObjectByID(req.getTradingClearingRegistryId());
// ClientCodeNewRequest cCodeReq = new ClientCodeNewRequest();
// cCodeReq.setTradingClearingRegistryId(req.getTradingClearingRegistryId());
// cCodeReq.setDepoAccountId(tcr.getDepoAccountId());
// cCodeReq.setMoneyAccountId(tcr.getMoneyAccountId());
// cCodeReq.setCompanyId(tcr.getCompanyId());
// cCodeReq.setCurrencyAccountList(Arrays.asList(req.getAccountId())); // todo rewrite API
// cCodeReq.setStatus(tradingClearingRegistryList.getStatus());
// //todo cCodeReq.setCode();
// BaseRequest<ClientCodeNewRequest> request2 = new BaseRequest<>();
// request2.setRequestPayload(cCodeReq);
// requestInfoUpdate = clientCodeService.clientCodeNew0(request2, true);
// if (requestInfoUpdate != null) return requestInfoUpdate;
// } catch (Exception e) {
// log.error("Can not wait creation of tradingClearingRegistryList. request id={}; {}",
// userRequest.getId(),
// ExceptionUtils.getStackTrace(e));
// return requestHelper.makeErrorResponse(userRequest, AccountError.GeneralError, "Can not create TCR: " + e.getMessage());
// }
}
sendNotificationToClearingSvc(id, tcr);
log.debug("successfully processed, id {}", id);
return null;
}
public RequestInfoUpdate tradingClearingRegistryListUpdate(BaseRequest<TradingClearingRegistryListUpdateRequest> userRequest) {
return tradingClearingRegistryListUpdate0(userRequest, false);
}
public RequestInfoUpdate tradingClearingRegistryListUpdate0(BaseRequest<TradingClearingRegistryListUpdateRequest> userRequest, boolean innerCall) {
log.debug("TradingClearingRegistryListUpdateRequest received");
RequestInfoUpdate requestInfoUpdate = userRoleVerification.validateRoleAndGetResult(userRequest);
if (requestInfoUpdate != null) return requestInfoUpdate;
requestInfoUpdate = validationHelper.validateTillFirstError(userRequest, tradingClearingRegistryListUpdateRequestValidator);
if (requestInfoUpdate != null) return requestInfoUpdate;
TradingClearingRegistryListUpdateRequest req = userRequest.getRequestPayload();
TradingClearingRegistryList tradingClearingRegistryList = tradingClearingRegistryListImdg.getSingleObjectByID(req.getId());
if (req.getStatus() != null && !Objects.equals(req.getStatus(), tradingClearingRegistryList.getStatus())) {
Instant now = Instant.now();
tradingClearingRegistryList.setUpdated(now);
tradingClearingRegistryList.setStatus(req.getStatus());
tradingClearingRegistryListImdg.update(tradingClearingRegistryList);
log.debug("Update TCRList.id={}.", tradingClearingRegistryList.getId());
} else {
log.debug("Nothing to update TCRList.id={}.", tradingClearingRegistryList.getId());
}
//todo нужно ли слать уведомления sendNotificationToClearingSvc?
log.debug("successfully processed, id {}", tradingClearingRegistryList.getId());
return null;
}
@Deprecated
protected void sendNotificationToClearingSvc(List<Long> tradingClearingRegistries, TradingClearingRegistry tcr) {
for (Long tradingClearingRegistryId:tradingClearingRegistries)
sendNotificationToClearingSvc(tradingClearingRegistryId, tcr);
}
/**
* clearing-service сообщение на открытие клиринговых регистров;
*/
protected void sendNotificationToClearingSvc(Long tradingClearingRegistryId, TradingClearingRegistry tcr) {
CreateRegistryRequest request = new CreateRegistryRequest();
request.setTcrListId(tradingClearingRegistryId);
request.setCompanyId(tcr.getCompanyId());
request.setTradingClearingRegistryId(tcr.getId());
log.debug("Send message to kafka \"{}\": {}", Consts.REGISTRY_NEW, LogFormatter.toStringWrapper(request));
kafkaSender.sendRequestToQueue(Consts.REGISTRY_NEW, request);
}
}

View file

@ -1,13 +1,5 @@
package ru.spcex.clearing.account.service;
import java.time.Instant;
import java.util.Arrays;
import java.util.Collection;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import java.util.function.Function;
import org.apache.kafka.clients.consumer.Consumer;
import org.apache.kafka.clients.producer.Producer;
import org.slf4j.Logger;
@ -15,33 +7,23 @@ import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;
import org.springframework.util.StringUtils;
import ru.clearing.classes.statics.data.account.Account;
import ru.clearing.classes.statics.data.account.ClearingAccount;
import ru.clearing.classes.statics.data.account.ClientCode;
import ru.clearing.classes.statics.data.account.DepoAccount;
import ru.clearing.classes.statics.data.account.InformationAccount;
import ru.clearing.classes.statics.data.company.Company;
import ru.clearing.classes.statics.data.company.CompanySymbols;
import ru.clearing.classes.statics.data.company.relation.Relation;
import ru.clearing.classes.statics.data.registry.TradingClearingRegistry;
import ru.clearing.classes.statics.data.registry.TradingClearingRegistryList;
import ru.spcex.clearing.account.errors.AccountError;
import ru.spcex.clearing.imdg.IMDGDistributedNames;
import ru.spcex.clearing.platform.messaging.domain.BaseRequest;
import ru.spcex.clearing.platform.messaging.domain.Consts;
import ru.spcex.clearing.platform.messaging.domain.cud.account.ClientCodeNewRequest;
import ru.spcex.clearing.platform.messaging.domain.cud.account.TkrAccount;
import ru.spcex.clearing.platform.messaging.domain.cud.account.TkrAccountsGatewayRequest;
import ru.spcex.clearing.platform.messaging.domain.cud.clearing.CreateRegistryRequest;
import ru.spcex.clearing.platform.messaging.domain.cud.common.CommonIdRequest;
import ru.spcex.clearing.platform.messaging.domain.cud.gateway.MoneyAccountMsgResponse;
import ru.spcex.clearing.platform.messaging.domain.cud.gateway.SendTkrRequest;
import ru.spcex.clearing.platform.messaging.domain.cud.gateway.Tkr;
import ru.spcex.clearing.platform.messaging.domain.cud.registry.TradingClearingRegistryNewRequest;
import ru.spcex.clearing.platform.messaging.domain.cud.registry.TradingClearingRegistryUpdateRequest;
import ru.spcex.clearing.platform.messaging.domain.cud.reports.NotificationRequest;
import ru.spcex.clearing.platform.messaging.domain.cud.schedule.LauncherCommandRequest;
import ru.spcex.clearing.platform.messaging.serialization.LogFormatter;
import ru.spcex.clearing.platform.messaging.service.QueueConsumer;
import ru.spcex.clearing.platform.messaging.service.RequestInfoUpdate;
@ -49,10 +31,7 @@ import ru.spcex.clearing.platform.messaging.service.sender.KafkaSender;
import ru.spcex.clearing.util.security.UserRoleVerification;
import ru.spcex.clearing.util.services.RequestHelper;
import ru.spcex.clearing.validation.common.ValidationHelper;
import ru.spcex.platform.enumeration.CompanySymbol;
import ru.spcex.platform.enumeration.ServiceStatus;
import ru.spcex.platform.enumeration.Status;
import static ru.spcex.platform.enumeration.Task.makeFiles_MTCR;
import ru.spcex.platform.enumeration.TradingClearingRegistryPurpose;
import ru.spcex.platform.enumeration.TradingClearingRegistryType;
import ru.spcex.platform.imdg.api.Imdg;
@ -61,6 +40,10 @@ import ru.spcex.platform.imdg.api.predicate.ImdgPredicateBuilder;
import ru.spcex.platform.utils.enumeration.IMessageResolver;
import ru.spcex.platform.utils.validation.IValidator;
import java.time.Instant;
import java.util.*;
import java.util.function.Function;
@Service
public class TradingClearingRegistryService extends QueueConsumer implements InitializingBean {
private final Logger log = LoggerFactory.getLogger(getClass());
@ -70,15 +53,12 @@ public class TradingClearingRegistryService extends QueueConsumer implements Ini
private final ImdgProvider imdgProvider;
private final Imdg<TradingClearingRegistry> tradingClearingRegistryImdg;
private final Imdg<TradingClearingRegistryList> tradingClearingRegistryListImdg;
private final Imdg<DepoAccount> depoAccountImdg;
private final Imdg<ClearingAccount> clearingAccountImdg;
private final Imdg<InformationAccount> informationAccountImdg;
private final Imdg<Account> accountImdg;
private final Imdg<Company> companyImdg;
private final Imdg<CompanySymbols> companySymbolsImdg;
private final Imdg<Relation> relationImdg;
private final Imdg<ClientCode> clientCodeImdg;
private final Function<TradingClearingRegistryUpdateRequest, IValidator> tradingClearingRegistryUpdateRequestValidator;
private final RequestHelper requestHelper;
@ -99,11 +79,11 @@ public class TradingClearingRegistryService extends QueueConsumer implements Ini
IMessageResolver messageResolver,
RequestHelper requestHelper,
@Qualifier("tradingClearingRegistryNewRequest")
Function<TradingClearingRegistryNewRequest, IValidator> tradingClearingRegistryNewRequestValidator,
Function<TradingClearingRegistryNewRequest, IValidator> tradingClearingRegistryNewRequestValidator,
@Qualifier("tradingClearingRegistryUpdateRequest")
Function<TradingClearingRegistryUpdateRequest, IValidator> tradingClearingRegistryUpdateRequestValidator,
Function<TradingClearingRegistryUpdateRequest, IValidator> tradingClearingRegistryUpdateRequestValidator,
@Qualifier("tradingClearingRegistryBlockRequest")
Function<CommonIdRequest, IValidator> tradingClearingRegistryBlockRequestValidator) {
Function<CommonIdRequest, IValidator> tradingClearingRegistryBlockRequestValidator) {
super(kafkaQueue, kafkaProducer);
this.kafkaProducer = kafkaProducer;
this.kafkaSender = kafkaSender;
@ -112,15 +92,12 @@ public class TradingClearingRegistryService extends QueueConsumer implements Ini
this.requestHelper = requestHelper;
this.imdgProvider = imdgProvider;
this.tradingClearingRegistryImdg = imdgProvider.getImdg(IMDGDistributedNames.Map_TradingClearingRegistry, TradingClearingRegistry.class);
this.tradingClearingRegistryListImdg = imdgProvider.getImdg(IMDGDistributedNames.Map_TradingClearingRegistryList, TradingClearingRegistryList.class);
this.depoAccountImdg = imdgProvider.getImdg(IMDGDistributedNames.Map_DepoAccount, DepoAccount.class);
this.clearingAccountImdg = imdgProvider.getImdg(IMDGDistributedNames.Map_ClearingAccount, ClearingAccount.class);
this.informationAccountImdg = imdgProvider.getImdg(IMDGDistributedNames.Map_InformationAccount, InformationAccount.class);
this.companyImdg = imdgProvider.getImdg(IMDGDistributedNames.Map_Company, Company.class);
this.accountImdg = imdgProvider.getImdg(IMDGDistributedNames.Map_Account, Account.class);
this.relationImdg = imdgProvider.getImdg(IMDGDistributedNames.Map_Relation, Relation.class);
this.clientCodeImdg = imdgProvider.getImdg(IMDGDistributedNames.Map_ClientCode, ClientCode.class);
this.companySymbolsImdg = imdgProvider.getImdg(IMDGDistributedNames.Map_CompanySymbols, CompanySymbols.class);
this.tradingClearingRegistryNewRequestValidator = tradingClearingRegistryNewRequestValidator;
this.tradingClearingRegistryAutoNewRequestValidator = tradingClearingRegistryNewRequestValidator; // без relation.
this.tradingClearingRegistryUpdateRequestValidator = tradingClearingRegistryUpdateRequestValidator;
@ -132,23 +109,17 @@ public class TradingClearingRegistryService extends QueueConsumer implements Ini
public void afterPropertiesSet() throws Exception {
imdgProvider.waitAvailable();
callback(TradingClearingRegistryNewRequest.class) // todo deprecated - unused.
.setFunction(this::tradingClearingRegistryAutoNew)
.forDestination(Consts.DESTINATION_TRADING_CLEARING_REGISTRY_AUTO_NEW, callbacks::put);
.setFunction(this::tradingClearingRegistryAutoNew)
.forDestination(Consts.DESTINATION_TRADING_CLEARING_REGISTRY_AUTO_NEW, callbacks::put);
callback(TradingClearingRegistryNewRequest.class)
.setFunction(this::tradingClearingRegistryNew)
.forDestination(Consts.DESTINATION_TRADING_CLEARING_REGISTRY_NEW, callbacks::put);
.setFunction(this::tradingClearingRegistryNew)
.forDestination(Consts.DESTINATION_TRADING_CLEARING_REGISTRY_NEW, callbacks::put);
callback(TradingClearingRegistryUpdateRequest.class)
.setFunction(this::tradingClearingRegistryUpdate)
.forDestination(Consts.DESTINATION_TRADING_CLEARING_REGISTRY_UPDATE, callbacks::put);
.setFunction(this::tradingClearingRegistryUpdate)
.forDestination(Consts.DESTINATION_TRADING_CLEARING_REGISTRY_UPDATE, callbacks::put);
callback(CommonIdRequest.class)
.setFunction(this::tradingClearingRegistryBlock)
.forDestination(Consts.DESTINATION_TRADING_CLEARING_REGISTRY_BLOCK, callbacks::put);
callback(TkrAccountsGatewayRequest.class)
.setFunction(this::tradingClearingRegistryCheck)
.forDestination(Consts.DESTINATION_TRADING_CLEARING_REGISTRY_CHECK, callbacks::put);
callback(LauncherCommandRequest.class)
.setConsumer(this::sendAllTkrToGateway)
.forDestination(makeFiles_MTCR.topic(), callbacks::put);
.setFunction(this::tradingClearingRegistryBlock)
.forDestination(Consts.DESTINATION_TRADING_CLEARING_REGISTRY_BLOCK, callbacks::put);
init();
}
@ -188,10 +159,10 @@ public class TradingClearingRegistryService extends QueueConsumer implements Ini
TradingClearingRegistry registryByCompany = tradingClearingRegistryImdg.getFirstObjectByFieldValues(Map.of("companyId", req.getCompanyId()));
if (registryByCompany == null) {
log.trace("Not found registry with companyId={}",
req.getCompanyId());
req.getCompanyId());
return requestHelper.makeErrorResponse(userRequest,
AccountError.TradingClearingRegistryNotFound,
req.getCompanyId());
AccountError.TradingClearingRegistryNotFound,
req.getCompanyId());
}
}
@ -236,12 +207,6 @@ public class TradingClearingRegistryService extends QueueConsumer implements Ini
targetExistTradingClearingRegistry.setUpdated(Instant.now());
tradingClearingRegistryImdg.update(targetExistTradingClearingRegistry);
log.debug("successfully processed, id {}. Updated exist TradingClearingRegistry.id={}", id, targetExistTradingClearingRegistry.getId());
Optional<Tkr> tkr = createRequestToGateway(tradingClearingRegistry);
if (tkr.isPresent()) {
SendTkrRequest sendTkrRequest = new SendTkrRequest();
sendTkrRequest.getTkrs().add(tkr.get());
kafkaSender.sendRequestToQueue(Consts.ACCOUNTS_TO_GATEWAY, sendTkrRequest);
}
return null;
}
}
@ -280,8 +245,9 @@ public class TradingClearingRegistryService extends QueueConsumer implements Ini
}
tradingClearingRegistry.setTradingClearingRegistryType(tradingRegistryType);
TradingClearingRegistryPurpose registryPurpose = TradingClearingRegistryPurpose.C;
//http://jira.mfd.msk:8088/browse/CLS-631#comment-60200
TradingClearingRegistryPurpose registryPurpose;
if (req.getDepoAccountId() != null) registryPurpose = TradingClearingRegistryPurpose.C;
else registryPurpose = TradingClearingRegistryPurpose.M;
tradingClearingRegistry.setTradingClearingRegistryPurpose(registryPurpose.getKey());
Company company = companyImdg.getSingleObjectByID(req.getCompanyId());
@ -324,8 +290,8 @@ public class TradingClearingRegistryService extends QueueConsumer implements Ini
TradingClearingRegistry registryByCompany = tradingClearingRegistryImdg.getFirstObjectByFieldValues(Map.of("companyId", req.getCompanyId()));
if (registryByCompany == null) {
return requestHelper.makeErrorResponse(userRequest,
AccountError.TradingClearingRegistryNotFound,
"companyId=" + req.getCompanyId());
AccountError.TradingClearingRegistryNotFound,
"companyId=" + req.getCompanyId());
}
}
@ -358,8 +324,9 @@ public class TradingClearingRegistryService extends QueueConsumer implements Ini
}
tradingClearingRegistry.setTradingClearingRegistryType(tradingRegistryType);
//http://jira.mfd.msk:8088/browse/CLS-631#comment-60200
TradingClearingRegistryPurpose registryPurpose = TradingClearingRegistryPurpose.C;
TradingClearingRegistryPurpose registryPurpose;
if (req.getDepoAccountId() != null) registryPurpose = TradingClearingRegistryPurpose.C;
else registryPurpose = TradingClearingRegistryPurpose.M;
tradingClearingRegistry.setTradingClearingRegistryPurpose(registryPurpose.getKey());
Company company = companyImdg.getSingleObjectByID(req.getCompanyId());
@ -374,12 +341,6 @@ public class TradingClearingRegistryService extends QueueConsumer implements Ini
tradingClearingRegistryImdg.insert(tradingClearingRegistry);
log.info("New TCR.id={} was created.", tradingClearingRegistry.getId());
Optional<Tkr> tkr = createRequestToGateway(tradingClearingRegistry);
if (tkr.isPresent()) {
SendTkrRequest sendTkrRequest = new SendTkrRequest();
sendTkrRequest.getTkrs().add(tkr.get());
kafkaSender.sendRequestToQueue(Consts.ACCOUNTS_TO_GATEWAY, sendTkrRequest);
}
sendNotificationToReportSvc(tradingClearingRegistry);
sendNotificationToClearingSvc(tradingClearingRegistry);
@ -391,11 +352,11 @@ public class TradingClearingRegistryService extends QueueConsumer implements Ini
protected Long companySequenceNextId(Long companyId, TradingClearingRegistryPurpose registryPurpose, String tradingRegistryType) {
ImdgPredicateBuilder pb = tradingClearingRegistryImdg.predicateBuilder();
Collection<TradingClearingRegistry> existTCR = tradingClearingRegistryImdg.getCollectionObjectsByPredicate(
pb.and(
pb.equals("companyId", companyId),
pb.equals("tradingClearingRegistryPurpose", registryPurpose.getKey()),
pb.equals("tradingClearingRegistryType", tradingRegistryType)
)
pb.and(
pb.equals("companyId", companyId),
pb.equals("tradingClearingRegistryPurpose", registryPurpose.getKey()),
pb.equals("tradingClearingRegistryType", tradingRegistryType)
)
);
if (existTCR.isEmpty()) {
log.trace("For company id={} not found exist TCR.", companyId);
@ -433,15 +394,14 @@ public class TradingClearingRegistryService extends QueueConsumer implements Ini
if (code.length() > 4)
code = code.substring(code.length() - 4);
code = "%4s".formatted(code).replace(' ', '0');
// code += registryPurpose.getKey(); // C / M / ...
code += "C";//пока ставим всегда С, возможно придется откатить
code += registryPurpose.getKey(); // C / M / ...
String trType = tradingRegistryType + "T"; // 2 символа
code += trType;
String sId = "%5s".formatted(id).replace(' ', '0');
if (sId.length() > 5)
sId = sId.substring(sId.length() - 5);
code += sId;
return code; // 12 символов
return code; // 12 имволов
}
public RequestInfoUpdate tradingClearingRegistryUpdate(BaseRequest<TradingClearingRegistryUpdateRequest> userRequest) {
@ -459,26 +419,18 @@ public class TradingClearingRegistryService extends QueueConsumer implements Ini
if (req.getMoneyAccountId() != null && !req.getMoneyAccountId().equals(tradingClearingRegistry.getMoneyAccountId())) {
return requestHelper.makeErrorResponse(userRequest, AccountError.WrongFieldValue, "MoneyAccountId", req.getMoneyAccountId());
}
if (tradingClearingRegistry.getDepoAccountId() != null && // но можно с null заменить
req.getDepoAccountId() != null && !req.getDepoAccountId().equals(tradingClearingRegistry.getDepoAccountId())) {
if (req.getDepoAccountId() != null && !req.getDepoAccountId().equals(tradingClearingRegistry.getDepoAccountId())) {
return requestHelper.makeErrorResponse(userRequest, AccountError.WrongFieldValue, "DepoAccountId", req.getDepoAccountId());
}
// tradingClearingRegistry.setMoneyAccountId(req.getMoneyAccountId());
// tradingClearingRegistry.setDepoAccountId(req.getDepoAccountId());
if (req.getStatus() != null && !Objects.equals(req.getStatus(), tradingClearingRegistry.getStatus())
|| req.getDepoAccountId() != null && !req.getDepoAccountId().equals(tradingClearingRegistry.getDepoAccountId())
) {
if (req.getStatus() != null && !Objects.equals(req.getStatus(), tradingClearingRegistry.getStatus())) {
Instant now = Instant.now();
tradingClearingRegistry.setUpdated(now);
tradingClearingRegistry.setStatus(req.getStatus());
tradingClearingRegistry.setDepoAccountId(req.getDepoAccountId());
tradingClearingRegistryImdg.update(tradingClearingRegistry);
Optional<Tkr> tkr = createRequestToGateway(tradingClearingRegistry);
if (tkr.isPresent()) {
SendTkrRequest sendTkrRequest = new SendTkrRequest();
sendTkrRequest.getTkrs().add(tkr.get());
kafkaSender.sendRequestToQueue(Consts.ACCOUNTS_TO_GATEWAY, sendTkrRequest);
}
log.debug("Update TCR.id={}.", tradingClearingRegistry.getId());
} else {
log.debug("Nothing to update TCR.id={}.", tradingClearingRegistry.getId());
@ -508,109 +460,6 @@ public class TradingClearingRegistryService extends QueueConsumer implements Ini
return null;
}
public RequestInfoUpdate tradingClearingRegistryCheck(BaseRequest<TkrAccountsGatewayRequest> gatewayRequest) {
TkrAccountsGatewayRequest req = gatewayRequest.getRequestPayload();
log.debug("TradingClearingRegistryCheckRequest received with requestId : {}", req.getRequestId());
for (TkrAccount accountForCheck : req.getAccounts()) {
log.debug("Checking TKR with code: {}", accountForCheck.getTkrCode());
TradingClearingRegistry tradingClearingRegistry = tradingClearingRegistryImdg.getSingleObjectByFieldValues(
Map.of("code", accountForCheck.getTkrCode())
);
Optional<Tkr> tkr = createRequestToGateway(tradingClearingRegistry);
if (tkr.isPresent()) {
SendTkrRequest sendTkrRequest = new SendTkrRequest();
sendTkrRequest.getTkrs().add(tkr.get());
kafkaSender.sendRequestToQueue(Consts.ACCOUNTS_TO_GATEWAY, sendTkrRequest);
}
}
return null;
}
public RequestInfoUpdate sendAllTkrToGateway(BaseRequest<?> gatewayRequest) {
Collection<TradingClearingRegistry> tkrs = tradingClearingRegistryImdg.getAllValues();
SendTkrRequest sendTkrRequest = new SendTkrRequest();
for (TradingClearingRegistry tkr : tkrs) {
log.debug("Create TKR request with id: {}", tkr.getId());
Optional<Tkr> tkrRequest = createRequestToGateway(tkr);
tkrRequest.ifPresent(value -> sendTkrRequest.getTkrs().add(value));
}
kafkaSender.sendRequestToQueue(Consts.ACCOUNTS_TO_GATEWAY, sendTkrRequest);
return null;
}
private Optional<Tkr> createRequestToGateway(TradingClearingRegistry tradingClearingRegistry) {
if (tradingClearingRegistry != null) {
Tkr tkr = new Tkr();
log.debug("Found TKR with id: {} and code: {}", tradingClearingRegistry.getId(), tradingClearingRegistry.getCode());
Company company = companyImdg.getSingleObjectByID(tradingClearingRegistry.getCompanyId());
CompanySymbols companySymbols = companySymbolsImdg.getSingleObjectByFieldValues(
Map.of(
"companySymbol", CompanySymbol.UUID.getKey(),
"companyId", company.getId()
)
);
if (companySymbols == null){
log.warn("CompanySymbols is null, searched by company.id: {}, skip this tkr", company.getId());
return Optional.empty();
}
ClientCode clientCode = clientCodeImdg.getFirstObjectByFieldValues(
Map.of("tradingClearingRegistryId", tradingClearingRegistry.getId())
);
tkr.setCompanyId(companySymbols.getCompanySymbolValue());
tkr.setTradingCode(Long.valueOf(company.getTradingCode()));
tkr.setTkrCode(tradingClearingRegistry.getCode());
tkr.setTkrType(tradingClearingRegistry.getTradingClearingRegistryPurpose());
tkr.setActive(Status.Active.equalsByKey(tradingClearingRegistry.getStatus()));
String accountType;
if (clientCode == null) {
if (TradingClearingRegistryType.Client_B.equalsByKey(
tradingClearingRegistry.getTradingClearingRegistryType())) {
accountType = "Клиентский общий";
} else {
accountType = "Общий";
}
} else {
tkr.setClientCode(clientCode.getCode());
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());
MoneyAccountMsgResponse moneyAccountMsg = new MoneyAccountMsgResponse();
moneyAccountMsg.setAccount(moneyAccount.getAccount());
moneyAccountMsg.setCurrCode(StringUtils.hasText(moneyAccount.getCurrency()) ? moneyAccount.getCurrency() : "RUB");
moneyAccountMsg.setActive(Status.Active.equalsByKey(moneyAccount.getStatus()));
tkr.getMoneyAccounts().add(moneyAccountMsg);
}
}
{
Collection<TradingClearingRegistryList> tradingClearingRegistries = tradingClearingRegistryListImdg.getCollectionObjectsByFieldValues(
Map.of(
"tradingClearingRegistryId", tradingClearingRegistry.getId()
)
);
for (TradingClearingRegistryList tkrList : tradingClearingRegistries) {
Account additionalAcc = accountImdg.getSingleObjectByID(tkrList.getAccountId());
MoneyAccountMsgResponse moneyAccountMsg = new MoneyAccountMsgResponse();
moneyAccountMsg.setAccount(additionalAcc.getAccount());
moneyAccountMsg.setCurrCode(StringUtils.hasText(additionalAcc.getCurrency()) ? additionalAcc.getCurrency() : "RUB");
moneyAccountMsg.setActive(Status.Active.equalsByKey(additionalAcc.getStatus()));
tkr.getMoneyAccounts().add(moneyAccountMsg);
}
}
return Optional.of(tkr);
}
return Optional.empty();
}
/**
* company-service сообщение об успешном добавлении ТКР клиента с параметром tradingClearingRegistry.code

View file

@ -1,56 +1,38 @@
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<property name="LOG_PATH" value="./log" />
<property name="FILE_NAME" value="account-service" />
<property name="CONSOLE_LOG_PATTERN" value="%date{HH:mm:ss.SSS} [%thread] %-5level %class{0}:%line - %message%n" />
<property name="FILE_LOG_PATTERN" value="%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %class{0}:%msg%n" />
<appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<!-- |%X{ru.nbch.scoring.web.logging.mdc_key}-->
<Pattern>${CONSOLE_LOG_PATTERN}</Pattern>
<Pattern>%date{HH:mm:ss.SSS} [%thread] %-5level %class{0}:%line - %message%n</Pattern>
<charset>utf-8</charset>
</encoder>
</appender>
<!-- first FILE TEXT appender -->
<appender name="TEXT_FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${LOG_PATH}/${FILE_NAME}-text.log</file>
<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>./logs/account-service.log</file>
<encoder>
<!-- |%X{ru.nbch.scoring.web.logging.mdc_key}-->
<Pattern>${FILE_LOG_PATTERN}</Pattern>
<Pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %class{0}:%msg%n</Pattern>
<charset>utf8</charset>
</encoder>
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<fileNamePattern>${LOG_PATH}/${FILE_NAME}-text.%d{yyyy-MM-dd}.%i.gz
<rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
<fileNamePattern>
./logs/account-service.%i.log
</fileNamePattern>
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
<maxFileSize>100MB</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
<maxHistory>10</maxHistory>
</rollingPolicy>
</appender>
<!-- second FILE JSON appender -->
<appender name="JSON_FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${LOG_PATH}/${FILE_NAME}-json.log</file>
<encoder class="net.logstash.logback.encoder.LogstashEncoder" />
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<fileNamePattern>${LOG_PATH}/${FILE_NAME}-json.%d{yyyy-MM-dd}.%i.gz
</fileNamePattern>
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
<maxFileSize>100MB</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
<maxHistory>10</maxHistory>
<minIndex>1</minIndex>
<maxIndex>10</maxIndex>
</rollingPolicy>
<triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
<maxFileSize>500MB</maxFileSize>
</triggeringPolicy>
</appender>
<root level="info">
<!-- <appender-ref ref="CONSOLE"/> -->
<appender-ref ref="TEXT_FILE"/>
<appender-ref ref="JSON_FILE" />
<root level="warn">
<appender-ref ref="CONSOLE"/>
<appender-ref ref="FILE"/>
</root>
<logger name="ru.spcex" level="debug" additivity="false">
<appender-ref ref="TEXT_FILE"/>
<appender-ref ref="JSON_FILE" />
<!-- <appender-ref ref="CONSOLE"/> -->
<appender-ref ref="FILE"/>
<appender-ref ref="CONSOLE"/>
</logger>
</configuration>

View file

@ -79,7 +79,6 @@ public class BankAccountServiceTest {
private static final String correspondentAccountName = "BIK OF TINKOFF";
private static final String taxpayerIdentificationNumber = "848484848484";
private static final String taxRegistrationReasonCode = "886886";
private static final String swiftCode = "SWIFT_code";
protected final Long addresseeIdNew = 2L;
protected final String deal = "111111111";
private final String acc = "0123456789";
@ -315,7 +314,6 @@ public class BankAccountServiceTest {
predictableUpdateBankAccount.setTaxpayerIdentificationNumber("65468461321");
predictableUpdateBankAccount.setTaxRegistrationReasonCode("532137");
predictableUpdateBankAccount.setAccount(acc);
predictableUpdateBankAccount.setSwiftCode("SWIFT_2");
predictableUpdateBankAccount.setId(ID);
BankAccountUpdateRequest bankAccountUpdateRequest = new BankAccountUpdateRequest();
@ -329,7 +327,6 @@ public class BankAccountServiceTest {
bankAccountUpdateRequest.setTaxpayerIdentificationNumber(predictableUpdateBankAccount.getTaxpayerIdentificationNumber());
bankAccountUpdateRequest.setTaxRegistrationReasonCode(predictableUpdateBankAccount.getTaxRegistrationReasonCode());
bankAccountUpdateRequest.setAccount(predictableUpdateBankAccount.getAccount());
bankAccountUpdateRequest.setSwiftCode(predictableUpdateBankAccount.getSwiftCode());
String jsonString = getJsonStringForUpdate(bankAccountUpdateRequest, ID);
@ -395,7 +392,6 @@ public class BankAccountServiceTest {
account.setAccountType(AccountType.Bank.getKey());
account.setStatus(Status.Active.getKey());
account.setProcessingSign(Allowed.ALLOWED.getKey());
account.setCurrency(currency);
return account;
}
@ -419,8 +415,6 @@ public class BankAccountServiceTest {
bankAccount.setDestination(destination);
bankAccount.setTaxpayerIdentificationNumber(taxpayerIdentificationNumber);
bankAccount.setTaxRegistrationReasonCode(taxRegistrationReasonCode);
bankAccount.setCurrency(currency);
bankAccount.setSwiftCode(swiftCode);
return bankAccount;
}
@ -436,8 +430,6 @@ public class BankAccountServiceTest {
bankAccountNewRequest.setTaxRegistrationReasonCode(bankAccount.getTaxRegistrationReasonCode());
bankAccountNewRequest.setAccount(bankAccount.getAccount());
bankAccountNewRequest.setCompanyId(bankAccount.getCompanyId());
bankAccountNewRequest.setCurrency(bankAccount.getCurrency());
bankAccountNewRequest.setSwiftCode(bankAccount.getSwiftCode());
return bankAccountNewRequest;
}

View file

@ -19,11 +19,9 @@ import ru.clearing.classes.statics.data.account.DepoAccount;
import ru.clearing.classes.statics.data.company.Company;
import ru.clearing.classes.statics.data.profile.CompanyInfo;
import ru.clearing.classes.statics.data.registry.TradingClearingRegistry;
import ru.clearing.classes.statics.data.registry.TradingClearingRegistryList;
import ru.clearing.platform.dictionary.*;
import ru.spcex.clearing.account.config.BeanConfiguration;
import ru.spcex.clearing.account.config.validation.ClientCodeValidationConfig;
import ru.spcex.clearing.account.config.validation.TradingClearingRegistryListValidationConfig;
import ru.spcex.clearing.account.config.validation.TradingClearingRegistryValidationConfig;
import ru.spcex.clearing.account.config.validation.ValidationConfig;
import ru.spcex.clearing.imdg.IMDGDistributedNames;
@ -37,8 +35,6 @@ import ru.spcex.clearing.test.TestObjectCreator;
import ru.spcex.clearing.test.TestUtils;
import ru.spcex.clearing.test.config.ImdgTestConfig;
import ru.spcex.clearing.test.config.KafkaTestConfig;
import ru.spcex.platform.enumeration.AccountType;
import ru.spcex.platform.enumeration.ServiceStatus;
import ru.spcex.platform.enumeration.TradingClearingRegistryType;
import ru.spcex.platform.enumeration.WorkflowStatus;
import ru.spcex.platform.imdg.api.Imdg;
@ -46,8 +42,6 @@ import ru.spcex.platform.imdg.iml.hazelcast.service.HazelcastService;
import javax.annotation.PostConstruct;
import java.util.Arrays;
import static org.junit.jupiter.api.Assertions.*;
import static ru.spcex.clearing.test.TestUtils.waitingSendAndCheckRecord;
@ -59,9 +53,6 @@ import static ru.spcex.clearing.test.TestUtils.waitingSendAndCheckRecord;
TradingClearingRegistryService.class,
TradingClearingRegistryValidationConfig.class,
TradingClearingRegistryListService.class,
TradingClearingRegistryListValidationConfig.class,
ValidationConfig.class,
BeanConfiguration.class,
@ -88,7 +79,6 @@ class ClientCodeServiceTest {
protected Producer<String, Object> mockProducer;
private Imdg<ClientCode> clientCodeImdg;
private Imdg<TradingClearingRegistryList> tradingClearingRegistryListImdg;
// ****************************-*******************
@ -97,11 +87,9 @@ class ClientCodeServiceTest {
private void init() {
hazelcastServiceTest.waitAvailable();
clientCodeImdg = hazelcastServiceTest.getImdg(IMDGDistributedNames.Map_ClientCode, ClientCode.class);
tradingClearingRegistryListImdg = hazelcastServiceTest.getImdg(IMDGDistributedNames.Map_TradingClearingRegistryList, TradingClearingRegistryList.class);
// Словари для теста, применяются в ValidationConfig
putToDictionary(IMDGDistributedNames.Map_WorkflowStatusDictionary, new WorkflowStatusDictionary(), "ACTV");
putToDictionary(IMDGDistributedNames.Map_ServiceStatusDictionary, new ServiceStatusDictionary(), ServiceStatus.Active.getKey());
putToDictionary(IMDGDistributedNames.Map_CompanySymbolDictionary, new CompanySymbolDictionary(), "CLRC");
putToDictionary(IMDGDistributedNames.Map_CorporationSoleTypeDictionary, new CorporationSoleTypeDictionary(), "GDIR");
putToDictionary(IMDGDistributedNames.Map_CountryCodeDictionary, new CountryCodeDictionary(), "RUS");
@ -161,14 +149,6 @@ class ClientCodeServiceTest {
depoAcc.setAccountId(depoAccount.getId());
depoAccounts.insert(depoAcc);
Account c2Account = new Account();
c2Account.setId(133L);
c2Account.setAccount("AAAX-44654-CURR");
c2Account.setStatus("ACTV");
c2Account.setCompanyId(COMPANY_ID); // для валидации принадлежности счёта
c2Account.setAccountType(AccountType.Curr.getKey());
accounts.insert(c2Account);
new TestObjectCreator(hazelcastServiceTest).createUserAdmin(1000L);
}
@ -227,7 +207,7 @@ class ClientCodeServiceTest {
TestUtils.addRecordToKafka((MockConsumer) clientCodeService.getConsumer(), Consts.DESTINATION_CLIENT_CODE_NEW, PARTITION, 0, jsonString);
//ASSERT
waitingSendAndCheckRecord(ID, mockProducer);
waitingSendAndCheckRecord(ID, mockProducer);
ClientCode resultNew = clientCodeImdg.getFirstObjectBySQL(String.format("code = '%s'", ccCode));
predictableClientCode.setId(resultNew.getId());
CLIENT_CODE_MATCHER.assertMatch(resultNew, predictableClientCode);
@ -312,52 +292,6 @@ class ClientCodeServiceTest {
assertNotNull(resultNew.getCreated());
}
/**
* {@link ClientCodeService#clientCodeUpdate(BaseRequest)}<br>
* Тест проверяет создание {@link ClientCode} в IMDG при передаче из Apache Kafka (очередь 4).<br>
* Входной запрос {@link ru.spcex.clearing.platform.messaging.domain.cud.account.ClientCodeNewRequest}:<br>
* С дополнительным заполнением TradingClearingRegistryList id's. С одним.
**/
@Test
void clientCodeNew4() {
//ARRANGE
final String ccCode = "Lucky";
ClientCodeNewRequest clientCodeNewRequest = new ClientCodeNewRequest();
clientCodeNewRequest.setCompanyId(COMPANY_ID);
clientCodeNewRequest.setCode(ccCode);
clientCodeNewRequest.setTradingClearingRegistryId(TCR_ID);
clientCodeNewRequest.setMoneyAccountId(131L);
clientCodeNewRequest.setDepoAccountId(132L);
clientCodeNewRequest.setCurrencyAccountList(Arrays.asList(133L));
clientCodeNewRequest.setStatus("ACTV");
ClientCode predictableClientCode = new ClientCode();
predictableClientCode.setCode(ccCode);
predictableClientCode.setStatus("ACTV");
predictableClientCode.setCompanyId(COMPANY_ID);
predictableClientCode.setMoneyAccountId(131L);
predictableClientCode.setDepoAccountId(132L);
predictableClientCode.setCurrencyAccountId(133L);
predictableClientCode.setTradingClearingRegistryId(TCR_ID);
//ACT
String jsonString = TestUtils.getJsonStringForNew(clientCodeNewRequest, ID);
TestUtils.addRecordToKafka((MockConsumer) clientCodeService.getConsumer(), Consts.DESTINATION_CLIENT_CODE_NEW, PARTITION, 0, jsonString);
//ASSERT
waitingSendAndCheckRecord(ID, mockProducer);
ClientCode resultNew = clientCodeImdg.getFirstObjectBySQL(String.format("code = '%s'", ccCode));
predictableClientCode.setId(resultNew.getId());
CLIENT_CODE_MATCHER.assertMatch(resultNew, predictableClientCode);
assertNotNull(resultNew.getCreated());
TradingClearingRegistryList newTCRList = tradingClearingRegistryListImdg.getFirstObjectBySQL("accountId=" + predictableClientCode.getCurrencyAccountId());
assertNotNull(newTCRList);
assertEquals(TCR_ID, newTCRList.getTradingClearingRegistryId());
}
/**
* {@link ClientCodeService#clientCodeUpdate(BaseRequest)}<br>
* Тест проверяет обновление сущности {@link ClientCode} в IMDG при передаче из Apache Kafka.<br>

View file

@ -124,7 +124,6 @@ class InformationAccountServiceTest {
Account accountAnlt = new Account();
accountAnlt.setAccountType(AccountType.Anlt.getKey());
accountAnlt.setCompanyId(1L);
accountAnlt.setCurrency("RUB");
anltAccountId = accountImdg.insert(accountAnlt);
new TestObjectCreator(hazelcastServiceTest).createUserAdmin(1000L);
@ -135,7 +134,6 @@ class InformationAccountServiceTest {
InformationAccountNewRequest InformationAccountNewRequest = new InformationAccountNewRequest();
InformationAccountNewRequest.setCompanyId(companyId);
InformationAccountNewRequest.setAccount(account);
InformationAccountNewRequest.setCurrency(null);
String jsonString = getJsonStringForNew(InformationAccountNewRequest, 0L);
@ -180,13 +178,11 @@ class InformationAccountServiceTest {
Account account = new Account();
account.setId(120L);
account.setAccountType(AccountType.Info.getKey());
account.setCurrency(CurrencyCode.RUB.getKey());
account.setCompanyId(10L);
account.setAccount("39911810000000127000");
accountImdg.insert(account);
InformationAccount accountInfo = new InformationAccount();
accountInfo.setId(121L);
account.setCurrency(CurrencyCode.RUB.getKey());
accountInfo.setAccountId(account.getId());
accountInfo.setCompanyId(account.getCompanyId());
accountInfoImdg.insert(accountInfo);
@ -194,17 +190,9 @@ class InformationAccountServiceTest {
UserRoleVerification userRoleVerification = Mockito.mock(UserRoleVerification.class);
InformationAccountService infoAccSvc=new InformationAccountService(null,null,null,
null, userRoleVerification, hazelcastServiceTest, null, null, null, null);
Long n = infoAccSvc.accountNextId(null);
Long n = infoAccSvc.accountNextId();
Assertions.assertEquals(13L, n);
n = infoAccSvc.accountNextId(null);
n = infoAccSvc.accountNextId();
Assertions.assertEquals(14L, n);
// Другие валюты
n = infoAccSvc.accountNextId(CurrencyCode.RUB.getKey());
Assertions.assertEquals(15L, n);
n = infoAccSvc.accountNextId("CNY");
Assertions.assertEquals(2L, n);
n = infoAccSvc.accountNextId("CNY");
Assertions.assertEquals(3L, n);
}
}

View file

@ -1,284 +0,0 @@
package ru.spcex.clearing.account.service;
import org.apache.kafka.clients.consumer.MockConsumer;
import org.apache.kafka.clients.producer.Producer;
import org.apache.kafka.clients.producer.ProducerRecord;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.mockito.ArgumentCaptor;
import org.mockito.Captor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit.jupiter.SpringExtension;
import ru.clearing.classes.statics.data.account.Account;
import ru.clearing.classes.statics.data.account.ClearingAccount;
import ru.clearing.classes.statics.data.account.ClientCode;
import ru.clearing.classes.statics.data.account.DepoAccount;
import ru.clearing.classes.statics.data.company.Company;
import ru.clearing.classes.statics.data.profile.CompanyInfo;
import ru.clearing.classes.statics.data.registry.TradingClearingRegistry;
import ru.clearing.classes.statics.data.registry.TradingClearingRegistryList;
import ru.clearing.platform.dictionary.*;
import ru.spcex.clearing.account.config.BeanConfiguration;
import ru.spcex.clearing.account.config.validation.ClientCodeValidationConfig;
import ru.spcex.clearing.account.config.validation.TradingClearingRegistryListValidationConfig;
import ru.spcex.clearing.account.config.validation.TradingClearingRegistryValidationConfig;
import ru.spcex.clearing.account.config.validation.ValidationConfig;
import ru.spcex.clearing.imdg.IMDGDistributedNames;
import ru.spcex.clearing.platform.messaging.domain.BaseRequest;
import ru.spcex.clearing.platform.messaging.domain.Consts;
import ru.spcex.clearing.platform.messaging.domain.cud.account.ClientCodeNewRequest;
import ru.spcex.clearing.platform.messaging.domain.cud.account.ClientCodeUpdateRequest;
import ru.spcex.clearing.platform.messaging.domain.cud.common.CommonDeleteRequest;
import ru.spcex.clearing.platform.messaging.domain.cud.registry.TradingClearingRegistryListNewRequest;
import ru.spcex.clearing.platform.messaging.domain.cud.registry.TradingClearingRegistryListUpdateRequest;
import ru.spcex.clearing.test.MatcherFactory;
import ru.spcex.clearing.test.TestObjectCreator;
import ru.spcex.clearing.test.TestUtils;
import ru.spcex.clearing.test.config.ImdgTestConfig;
import ru.spcex.clearing.test.config.KafkaTestConfig;
import ru.spcex.platform.enumeration.AccountType;
import ru.spcex.platform.enumeration.ServiceStatus;
import ru.spcex.platform.enumeration.TradingClearingRegistryType;
import ru.spcex.platform.enumeration.WorkflowStatus;
import ru.spcex.platform.imdg.api.Imdg;
import ru.spcex.platform.imdg.iml.hazelcast.service.HazelcastService;
import javax.annotation.PostConstruct;
import java.util.Arrays;
import static org.junit.jupiter.api.Assertions.*;
import static ru.spcex.clearing.test.TestUtils.waitingSendAndCheckRecord;
@ExtendWith(SpringExtension.class)
@ContextConfiguration(classes = {
TradingClearingRegistryListService.class,
TradingClearingRegistryListValidationConfig.class,
ClientCodeService.class,
ClientCodeValidationConfig.class,
TradingClearingRegistryService.class,
TradingClearingRegistryValidationConfig.class,
ValidationConfig.class,
BeanConfiguration.class,
KafkaTestConfig.class,
ImdgTestConfig.class})
class TradingClearingRegistryListServiceTest {
private static final int PARTITION = 0;
private static final Long ID = 4L;
public static final MatcherFactory.Matcher<ClientCode> CLIENT_CODE_MATCHER = MatcherFactory.usingIgnoringFieldsComparator("created", "updated");
public static final MatcherFactory.Matcher<TradingClearingRegistryList> TRADING_CLEARING_REGISTRY_LIST_MATCHER = MatcherFactory.usingIgnoringFieldsComparator("created", "updated");
private static final Long TCR_ID = 41L;
private static final Long COMPANY_ID = 42L;
@Autowired
TradingClearingRegistryListService tradingClearingRegistryListService;
@Autowired
@Qualifier("hazelcastServiceTest")
private HazelcastService hazelcastServiceTest;
@Captor
private ArgumentCaptor<ProducerRecord> producerRecord;
@Autowired
@Qualifier("mockProducer")
protected Producer<String, Object> mockProducer;
private Imdg<ClientCode> clientCodeImdg;
private Imdg<TradingClearingRegistryList> tradingClearingRegistryListImdg;
// ****************************-*******************
@PostConstruct
private void init() {
hazelcastServiceTest.waitAvailable();
clientCodeImdg = hazelcastServiceTest.getImdg(IMDGDistributedNames.Map_ClientCode, ClientCode.class);
tradingClearingRegistryListImdg = hazelcastServiceTest.getImdg(IMDGDistributedNames.Map_TradingClearingRegistryList, TradingClearingRegistryList.class);
// Словари для теста, применяются в ValidationConfig
putToDictionary(IMDGDistributedNames.Map_WorkflowStatusDictionary, new WorkflowStatusDictionary(), "ACTV");
putToDictionary(IMDGDistributedNames.Map_ServiceStatusDictionary, new ServiceStatusDictionary(), ServiceStatus.Active.getKey());
putToDictionary(IMDGDistributedNames.Map_CompanySymbolDictionary, new CompanySymbolDictionary(), "CLRC");
putToDictionary(IMDGDistributedNames.Map_CorporationSoleTypeDictionary, new CorporationSoleTypeDictionary(), "GDIR");
putToDictionary(IMDGDistributedNames.Map_CountryCodeDictionary, new CountryCodeDictionary(), "RUS");
putToDictionary(IMDGDistributedNames.Map_AllowedDictionary, new AllowedDictionary(), "ALWD");
putToDictionary(IMDGDistributedNames.Map_LegalKindDictionary, new LegalKindDictionary(), "JURD");
putToDictionary(IMDGDistributedNames.Map_OrganizationTypeDictionary, new OrganizationTypeDictionary(), "NCRD");
Imdg<Company> companyImdg = hazelcastServiceTest.getImdg(IMDGDistributedNames.Map_Company, Company.class);
Company company1 = new Company();
company1.setId(COMPANY_ID);
company1.setWorkflowStatus(WorkflowStatus.Active.getKey());
company1.setFullName("Company prime");
company1.setShortName("Seizwell");
company1.setProfile(new CompanyInfo());
company1.getProfile().setCompanyId(COMPANY_ID);
company1.getProfile().setCountryCode("TLDI");
company1.getProfile().setDescription("Big profit from TLD Company Prime.");
company1.getProfile().setLegalKind("TLDI");
company1.getProfile().setResidence("TLDI");
companyImdg.insert(company1);
Imdg<TradingClearingRegistry> tcrImdg = hazelcastServiceTest.getImdg(IMDGDistributedNames.Map_TradingClearingRegistry, TradingClearingRegistry.class);
TradingClearingRegistry registry1 = new TradingClearingRegistry();
registry1.setId(TCR_ID);
registry1.setCompanyId(COMPANY_ID);
registry1.setCode("code-120-101");
registry1.setMoneyAccountId(131L);
registry1.setDepoAccountId(132L);
registry1.setTradingClearingRegistryType(TradingClearingRegistryType.Client_B.getKey());
registry1.setStatus(WorkflowStatus.Active.getKey());
tcrImdg.insert(registry1);
Imdg<Account> accounts = hazelcastServiceTest.getImdg(IMDGDistributedNames.Map_Account, Account.class);
Imdg<ClearingAccount> clsAccounts = hazelcastServiceTest.getImdg(IMDGDistributedNames.Map_ClearingAccount, ClearingAccount.class);
Account moneyAccount = new Account();
moneyAccount.setId(131L);
moneyAccount.setAccount("AAAA-4444");
moneyAccount.setStatus("ACTV");
moneyAccount.setCompanyId(COMPANY_ID); // для валидации принадлежности счёта
accounts.insert(moneyAccount);
ClearingAccount clsAcc = new ClearingAccount();
clsAcc.setId(moneyAccount.getId());
clsAcc.setCompanyId(COMPANY_ID);
clsAcc.setAccountId(moneyAccount.getId());
clsAccounts.insert(clsAcc);
Imdg<DepoAccount> depoAccounts = hazelcastServiceTest.getImdg(IMDGDistributedNames.Map_DepoAccount, DepoAccount.class);
Account depoAccount = new Account();
depoAccount.setId(132L);
depoAccount.setAccount("AAAB-44654");
depoAccount.setStatus("ACTV");
depoAccount.setCompanyId(COMPANY_ID); // для валидации принадлежности счёта
accounts.insert(depoAccount);
DepoAccount depoAcc = new DepoAccount();
depoAcc.setId(depoAccount.getId());
depoAcc.setCompanyId(COMPANY_ID);
depoAcc.setAccountId(depoAccount.getId());
depoAccounts.insert(depoAcc);
Account c2Account = new Account();
c2Account.setId(133L);
c2Account.setAccount("AAAX-44654-CURR");
c2Account.setStatus("ACTV");
c2Account.setCompanyId(COMPANY_ID); // для валидации принадлежности счёта
c2Account.setAccountType(AccountType.Info.getKey());
c2Account.setCurrency("USD");
accounts.insert(c2Account);
Account c3Account = new Account();
c3Account.setId(134L);
c3Account.setAccount("AAAX-12654-CURR");
c3Account.setStatus("ACTV");
c3Account.setCompanyId(COMPANY_ID); // для валидации принадлежности счёта
c3Account.setAccountType(AccountType.Info.getKey());
c3Account.setCurrency("USD");
accounts.insert(c3Account);
new TestObjectCreator(hazelcastServiceTest).createUserAdmin(1000L);
}
private <D extends AbstractDictionary> void putToDictionary(String mapName, D object, String code) {
Imdg<D> dMap = (Imdg) hazelcastServiceTest.getImdg(mapName, object.getClass());
object.setId(2L);
object.setCode(code);
object.setName("name of " + code);
dMap.insert(object);
}
/**
* {@link TradingClearingRegistryListService#tradingClearingRegistryListNew(BaseRequest)}<br>
* Тест проверяет создание {@link TradingClearingRegistryList} в IMDG при передаче из Apache Kafka (очередь 1).<br>
* Входной запрос {@link TradingClearingRegistryListNewRequest}:<br>
**/
@Test
void tradingClearingRegistryListNew() {
//ARRANGE
final String ccCode = null;
TradingClearingRegistryListNewRequest tcrlNewRequest = new TradingClearingRegistryListNewRequest();
tcrlNewRequest.setTradingClearingRegistryId(TCR_ID);
tcrlNewRequest.setAccountId(134L);
tcrlNewRequest.setStatus("ACTV");
ClientCode predictableClientCode = new ClientCode();
predictableClientCode.setCode(ccCode);
predictableClientCode.setStatus("ACTV");
predictableClientCode.setCompanyId(COMPANY_ID);
TradingClearingRegistryList predictableTradingClearingRegistryList = new TradingClearingRegistryList();
predictableTradingClearingRegistryList.setAccountId(134L);
predictableTradingClearingRegistryList.setStatus("ACTV");
predictableTradingClearingRegistryList.setCurrency("USD");
//ACT
String jsonString = TestUtils.getJsonStringForNew(tcrlNewRequest, ID);
TestUtils.addRecordToKafka((MockConsumer) tradingClearingRegistryListService.getConsumer(), Consts.DESTINATION_TRADING_CLEARING_REGISTRIES_LIST_NEW, PARTITION, 0, jsonString);
//ASSERT
waitingSendAndCheckRecord(ID, mockProducer);
ClientCode resultCCNew = clientCodeImdg.getFirstObjectBySQL(String.format("code = '%s'", ccCode));
predictableClientCode.setId(resultCCNew.getId());
CLIENT_CODE_MATCHER.assertMatch(resultCCNew, predictableClientCode);
assertNotNull(resultCCNew.getCreated());
TradingClearingRegistryList resultTCRLNew = tradingClearingRegistryListImdg.getFirstObjectBySQL(String.format("code = '%s'", ccCode));
predictableClientCode.setId(resultTCRLNew.getId());
TRADING_CLEARING_REGISTRY_LIST_MATCHER.assertMatch(resultTCRLNew, predictableTradingClearingRegistryList);
assertNotNull(resultTCRLNew.getCreated());
// CLEAN UP
tradingClearingRegistryListImdg.delete(resultTCRLNew);
}
/**
* {@link TradingClearingRegistryListService#tradingClearingRegistryListUpdate(BaseRequest)}<br>
* Тест проверяет обновление сущности {@link TradingClearingRegistryList} в IMDG при передаче из Apache Kafka.<br>
* Входной запрос {@link TradingClearingRegistryListUpdateRequest}:<br>
**/
@Test
void tradingClearingRegistryListUpdate() {
//ARRANGE
TradingClearingRegistryList existsTradingClearingRegistryList = new TradingClearingRegistryList();
existsTradingClearingRegistryList.setId(ID);
existsTradingClearingRegistryList.setTradingClearingRegistryId(TCR_ID);
existsTradingClearingRegistryList.setCurrency("BTC");
existsTradingClearingRegistryList.setAccountId(133L);
tradingClearingRegistryListImdg.insert(existsTradingClearingRegistryList);
TradingClearingRegistryListUpdateRequest tradingClearingRegistryListUpdateRequest = new TradingClearingRegistryListUpdateRequest();
tradingClearingRegistryListUpdateRequest.setId(ID);
tradingClearingRegistryListUpdateRequest.setTradingClearingRegistryId(TCR_ID);
tradingClearingRegistryListUpdateRequest.setStatus("ACTV");
tradingClearingRegistryListUpdateRequest.setCurrencyAccountList(Arrays.asList(134L));
TradingClearingRegistryList predictableTradingClearingRegistryList = new TradingClearingRegistryList();
predictableTradingClearingRegistryList.setId(ID);
predictableTradingClearingRegistryList.setTradingClearingRegistryId(TCR_ID);
predictableTradingClearingRegistryList.setCurrency("BTC");
predictableTradingClearingRegistryList.setAccountId(133L);
predictableTradingClearingRegistryList.setStatus("ACTV");
//ACT
String jsonString = TestUtils.getJsonStringForUpdate(tradingClearingRegistryListUpdateRequest, ID);
TestUtils.addRecordToKafka((MockConsumer) tradingClearingRegistryListService.getConsumer(), Consts.DESTINATION_TRADING_CLEARING_REGISTRIES_LIST_UPDATE, PARTITION, 0, jsonString);
//ASSERT
waitingSendAndCheckRecord(ID, mockProducer);
TradingClearingRegistryList resultUpdating = tradingClearingRegistryListImdg.getSingleObjectByID(ID);
TRADING_CLEARING_REGISTRY_LIST_MATCHER.assertMatch(resultUpdating, predictableTradingClearingRegistryList);
assertNotNull(resultUpdating.getUpdated());
// CLEAN UP
tradingClearingRegistryListImdg.delete(resultUpdating);
}
}

View file

@ -11,7 +11,7 @@
<parent>
<artifactId>clearing-parent</artifactId>
<groupId>ru.spcex.clearing</groupId>
<version>SPCEX-3.11.0.0</version>
<version>SPCEX-1.0.0.0</version>
</parent>
@ -61,17 +61,6 @@
<groupId>ru.spcex.platform</groupId>
<artifactId>platform-enum</artifactId>
</dependency>
<!-- special logging -->
<dependency>
<groupId>net.logstash.logback</groupId>
<artifactId>logstash-logback-encoder</artifactId>
<version>7.0.1</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
</dependency>
<!-- TEST -->
<dependency>
<groupId>org.springframework</groupId>
@ -219,19 +208,6 @@
</fileMapper>
</fileMappers>
</transformationSet>
<transformationSet>
<dir>src/main/resources/meta</dir>
<includes>
<include>market.xml</include>
</includes>
<stylesheet>src/main/resources/meta/xsl/data.xsl</stylesheet>
<fileMappers>
<fileMapper
implementation="org.codehaus.plexus.components.io.filemappers.FileExtensionMapper">
<targetExtension>market.sql</targetExtension>
</fileMapper>
</fileMappers>
</transformationSet>
</transformationSets>
</configuration>
</execution>

View file

@ -40,7 +40,6 @@ public class HistoryConfig {
hst.add(excludeLiabilitiesRegister());
hst.add(liabilitiesRegister());
hst.add(executionRegister());
hst.add(session());
return hst;
}
@ -175,17 +174,4 @@ public class HistoryConfig {
));
return sbscr;
}
private HistorySubscription session() {
HistorySubscription sbscr = new HistorySubscription();
sbscr.setDestination("session");
sbscr.setSearchProxyMapName(IMDGDistributedNames.Map_SearchSession);
sbscr.setFullHistoryMapName(IMDGDistributedNames.Map_Session);
sbscr.setConditions(List.of(
new ClearingDateFromCondition(pb),
new ClearingDateToCondition(pb)
));
return sbscr;
}
}

View file

@ -12,7 +12,6 @@ import ru.clearing.classes.statics.data.company.CompanyRoleSet;
import ru.spcex.clearing.backendapi.controller.queue.AbstractQueueController;
import ru.spcex.clearing.backendapi.controller.request.cud.common.CommonDeleteAction;
import ru.spcex.clearing.backendapi.controller.request.cud.company.CompanyRoleSetNewAction;
import ru.spcex.clearing.backendapi.controller.request.cud.company.CompanyRoleSetUpdateAction;
import ru.spcex.clearing.backendapi.controller.response.BasicSpcexResponse;
import ru.spcex.clearing.backendapi.controller.response.cud.CudResponse;
import ru.spcex.clearing.backendapi.controller.response.entity.CommonGetAllResponse;
@ -31,35 +30,35 @@ public class CompanyRoleSetController extends AbstractQueueController {
private final IStateLoader stateLoader;
@Autowired
public CompanyRoleSetController(IOperator operator, IStateLoader stateLoader) {
public CompanyRoleSetController(IOperator operator,
IStateLoader stateLoader) {
super(operator);
this.stateLoader = stateLoader;
}
@ApiOperation(value = "new company-role-set.")
@ApiResponses(value = {@ApiResponse(code = 200, message = "OK", response = CudResponse.class), @ApiResponse(code = 400, message = "Ошибка валидации", response = BasicSpcexResponse.class)})
@RequestMapping(method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE)
@ApiOperation(value = "get all CompanyRoleSet's.")
@ApiResponses(value = {@ApiResponse(code = 200, message = "OK", response = CommonGetAllResponse.class)})
@RequestMapping(method = RequestMethod.GET)
@ResponseBody
public CudResponse add(
@ApiParam(value = "Параметры команды в JSON формате.", required = true)
public CommonGetAllResponse getAll() {
Collection<Map<String, Object>> all = stateLoader.getAllMetaTransform(IMDGDistributedNames.Map_CompanyRoleSet,
CompanyRoleSet.class);
CommonGetAllResponse response = new CommonGetAllResponse();
response.fromEntity(all);
return response;
}
@ApiOperation(value = "create CompanyRoleSet.")
@ApiResponses(value = {@ApiResponse(code = 200, message = "OK", response = CudResponse.class), @ApiResponse(code = 400, message = "Ошибка валидации", response = BasicSpcexResponse.class)})
@RequestMapping(method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_VALUE)
@ResponseBody
public CudResponse create(
@ApiParam(value = "Значения полей нового объекта.", required = true)
@RequestBody CompanyRoleSetNewAction companyRoleSetNewAction) throws ExecutionException, InterruptedException {
return processRequest(Consts.DESTINATION_COMPANY_ROLE_SETS_NEW, companyRoleSetNewAction);
return processRequest(Consts.DESTINATION_COMPANY_ROLE_SET_NEW, companyRoleSetNewAction);
}
@ApiOperation(value = "update company-role-set.")
@ApiResponses(value = {@ApiResponse(code = 200, message = "OK", response = CudResponse.class), @ApiResponse(code = 400, message = "Ошибка валидации", response = BasicSpcexResponse.class)})
@RequestMapping(value = "/{id}", method = RequestMethod.PUT, consumes = MediaType.APPLICATION_JSON_VALUE)
@ResponseBody
public CudResponse update(
@ApiParam(value = "Идентификатор изменяемого объекта.", required = true, example = "1234")
@PathVariable("id") Long id,
@ApiParam(value = "Новые значения полей объекта.", required = true)
@RequestBody CompanyRoleSetUpdateAction companyRoleSetUpdateAction) throws ExecutionException, InterruptedException {
companyRoleSetUpdateAction.setId(id);
return processRequest(Consts.DESTINATION_COMPANY_ROLE_SETS_UPDATE, companyRoleSetUpdateAction);
}
@ApiOperation(value = "delete company-role-set.")
@ApiOperation(value = "delete CompanyRoleSet.")
@ApiResponses(value = {@ApiResponse(code = 200, message = "OK", response = CudResponse.class)})
@RequestMapping(value = "/{id}", method = RequestMethod.DELETE)
@ResponseBody
@ -67,17 +66,7 @@ public class CompanyRoleSetController extends AbstractQueueController {
@PathVariable("id") Long id) throws ExecutionException, InterruptedException {
CommonDeleteAction deleteAction = new CommonDeleteAction();
deleteAction.setId(id);
return processRequest(Consts.DESTINATION_COMPANY_ROLE_SETS_DELETE, deleteAction);
return processRequest(Consts.DESTINATION_COMPANY_ROLE_SET_DELETE, deleteAction);
}
@ApiOperation(value = "get all company-role-sets.")
@ApiResponses(value = {@ApiResponse(code = 200, message = "OK", response = CommonGetAllResponse.class)})
@RequestMapping(method = RequestMethod.GET)
@ResponseBody
public CommonGetAllResponse getAll() {
Collection<Map<String, Object>> all = stateLoader.getAllMetaTransform(IMDGDistributedNames.Map_CompanyRoleSet, CompanyRoleSet.class);
CommonGetAllResponse response = new CommonGetAllResponse();
response.fromEntity(all);
return response;
}
}

View file

@ -1,83 +0,0 @@
package ru.spcex.clearing.backendapi.controller.queue.company;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import io.swagger.annotations.ApiResponse;
import io.swagger.annotations.ApiResponses;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
import ru.clearing.classes.statics.data.company.SettlementHouseProperties;
import ru.spcex.clearing.backendapi.controller.queue.AbstractQueueController;
import ru.spcex.clearing.backendapi.controller.request.cud.common.CommonDeleteAction;
import ru.spcex.clearing.backendapi.controller.request.cud.company.SettlementHousePropertiesNewAction;
import ru.spcex.clearing.backendapi.controller.request.cud.company.SettlementHousePropertiesUpdateAction;
import ru.spcex.clearing.backendapi.controller.response.BasicSpcexResponse;
import ru.spcex.clearing.backendapi.controller.response.cud.CudResponse;
import ru.spcex.clearing.backendapi.controller.response.entity.CommonGetAllResponse;
import ru.spcex.clearing.backendapi.service.IOperator;
import ru.spcex.clearing.backendapi.service.IStateLoader;
import ru.spcex.clearing.imdg.IMDGDistributedNames;
import ru.spcex.clearing.platform.messaging.domain.Consts;
import java.util.Collection;
import java.util.Map;
import java.util.concurrent.ExecutionException;
@Controller
@RequestMapping("/settlement-house-properties")
public class SettlementHousePropertiesController extends AbstractQueueController {
private final IStateLoader stateLoader;
@Autowired
public SettlementHousePropertiesController(IOperator operator, IStateLoader stateLoader) {
super(operator);
this.stateLoader = stateLoader;
}
@ApiOperation(value = "new settlement-house-property.")
@ApiResponses(value = {@ApiResponse(code = 200, message = "OK", response = CudResponse.class), @ApiResponse(code = 400, message = "Ошибка валидации", response = BasicSpcexResponse.class)})
@RequestMapping(method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE)
@ResponseBody
public CudResponse add(
@ApiParam(value = "Параметры команды в JSON формате.", required = true)
@RequestBody SettlementHousePropertiesNewAction settlementHousePropertiesNewAction) throws ExecutionException, InterruptedException {
return processRequest(Consts.DESTINATION_SETTLEMENT_HOUSE_PROPERTY_NEW, settlementHousePropertiesNewAction);
}
@ApiOperation(value = "update settlement-house-property.")
@ApiResponses(value = {@ApiResponse(code = 200, message = "OK", response = CudResponse.class), @ApiResponse(code = 400, message = "Ошибка валидации", response = BasicSpcexResponse.class)})
@RequestMapping(value = "/{id}", method = RequestMethod.PUT, consumes = MediaType.APPLICATION_JSON_VALUE)
@ResponseBody
public CudResponse update(
@ApiParam(value = "Идентификатор изменяемого объекта.", required = true, example = "1234")
@PathVariable("id") Long id,
@ApiParam(value = "Новые значения полей объекта.", required = true)
@RequestBody SettlementHousePropertiesUpdateAction settlementHousePropertyUpdateAction) throws ExecutionException, InterruptedException {
settlementHousePropertyUpdateAction.setId(id);
return processRequest(Consts.DESTINATION_SETTLEMENT_HOUSE_PROPERTY_UPDATE, settlementHousePropertyUpdateAction);
}
@ApiOperation(value = "delete settlement-house-property.")
@ApiResponses(value = {@ApiResponse(code = 200, message = "OK", response = CudResponse.class)})
@RequestMapping(value = "/{id}", method = RequestMethod.DELETE)
@ResponseBody
public CudResponse delete(@ApiParam(value = "Идентификатор удаляемого объекта", required = true, example = "1234")
@PathVariable("id") Long id) throws ExecutionException, InterruptedException {
CommonDeleteAction deleteAction = new CommonDeleteAction();
deleteAction.setId(id);
return processRequest(Consts.DESTINATION_SETTLEMENT_HOUSE_PROPERTY_DELETE, deleteAction);
}
@ApiOperation(value = "get all SettlementHouseProperties.")
@ApiResponses(value = {@ApiResponse(code = 200, message = "OK", response = CommonGetAllResponse.class)})
@RequestMapping(method = RequestMethod.GET)
@ResponseBody
public CommonGetAllResponse getAll() {
Collection<Map<String, Object>> all = stateLoader.getAllMetaTransform(IMDGDistributedNames.Map_SettlementHouseProperties, SettlementHouseProperties.class);
CommonGetAllResponse response = new CommonGetAllResponse();
response.fromEntity(all);
return response;
}
}

View file

@ -1,56 +0,0 @@
package ru.spcex.clearing.backendapi.controller.queue.execution;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiResponse;
import io.swagger.annotations.ApiResponses;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import ru.clearing.classes.statics.data.execution.ExecutionCurrency;
import ru.spcex.clearing.backendapi.controller.queue.AbstractQueueController;
import ru.spcex.clearing.backendapi.controller.response.entity.CommonGetAllResponse;
import ru.spcex.clearing.backendapi.service.IOperator;
import ru.spcex.clearing.backendapi.service.IStateLoader;
import ru.spcex.clearing.imdg.IMDGDistributedNames;
import ru.spcex.platform.imdg.api.ImdgProvider;
import ru.spcex.platform.imdg.api.predicate.ImdgPredicate;
import ru.spcex.platform.imdg.api.predicate.ImdgPredicateBuilder;
import java.time.LocalDate;
import java.util.Collection;
import java.util.Map;
@Controller
@RequestMapping("/execution-currency")
public class ExecutionCurrencyController extends AbstractQueueController {
private final IStateLoader stateLoader;
private final ImdgPredicateBuilder imdgPredicateBuilder;
@Autowired
public ExecutionCurrencyController(IOperator operator,
IStateLoader stateLoader,
ImdgProvider imdgProvider) {
super(operator);
this.stateLoader = stateLoader;
this.imdgPredicateBuilder = imdgProvider
.getImdg(IMDGDistributedNames.Map_ExecutionCurrency, ExecutionCurrency.class)
.predicateBuilder();
}
@ApiOperation(value = "get all ExecutionCurrency.")
@ApiResponses(value = {@ApiResponse(code = 200, message = "OK", response = CommonGetAllResponse.class)})
@RequestMapping(method = RequestMethod.GET)
@ResponseBody
public CommonGetAllResponse getAll() {
ImdgPredicate imdgPredicate = imdgPredicateBuilder.greatEqual("settlementDate", LocalDate.now());
Collection<Map<String, Object>> all = stateLoader.getAllMetaTransform(
IMDGDistributedNames.Map_ExecutionCurrency,
ExecutionCurrency.class,
imdgPredicate);
CommonGetAllResponse response = new CommonGetAllResponse();
response.fromEntity(all);
return response;
}
}

View file

@ -1,43 +0,0 @@
package ru.spcex.clearing.backendapi.controller.queue.misc;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiResponse;
import io.swagger.annotations.ApiResponses;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import ru.clearing.classes.statics.data.misc.SCrossRate;
import ru.spcex.clearing.backendapi.controller.queue.AbstractQueueController;
import ru.spcex.clearing.backendapi.controller.response.entity.CommonGetAllResponse;
import ru.spcex.clearing.backendapi.service.IOperator;
import ru.spcex.clearing.backendapi.service.IStateLoader;
import ru.spcex.clearing.imdg.IMDGDistributedNames;
import java.util.Collection;
import java.util.Map;
@Controller
@RequestMapping("/cross-rate")
public class SCrossRateController extends AbstractQueueController {
private final IStateLoader stateLoader;
@Autowired
public SCrossRateController(IOperator operator, IStateLoader stateLoader) {
super(operator);
this.stateLoader = stateLoader;
}
@ApiOperation(value = "get all cross-rate's.")
@ApiResponses(value = {@ApiResponse(code = 200, message = "OK", response = CommonGetAllResponse.class)})
@RequestMapping(method = RequestMethod.GET)
@ResponseBody
public CommonGetAllResponse getAll() {
Collection<Map<String, Object>> all = stateLoader.getAllMetaTransform(
IMDGDistributedNames.Map_SCrossRate, SCrossRate.class);
CommonGetAllResponse response = new CommonGetAllResponse();
response.fromEntity(all);
return response;
}
}

View file

@ -1,41 +0,0 @@
package ru.spcex.clearing.backendapi.controller.queue.register;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiResponse;
import io.swagger.annotations.ApiResponses;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
import ru.clearing.classes.statics.data.register.GatewayResult;
import ru.spcex.clearing.backendapi.controller.queue.AbstractQueueController;
import ru.spcex.clearing.backendapi.controller.response.entity.CommonGetAllResponse;
import ru.spcex.clearing.backendapi.service.IOperator;
import ru.spcex.clearing.backendapi.service.IStateLoader;
import ru.spcex.clearing.imdg.IMDGDistributedNames;
import java.util.Collection;
import java.util.Map;
@Controller
@RequestMapping("/gateway-result")
public class GatewayResultController extends AbstractQueueController {
private final IStateLoader stateLoader;
@Autowired
public GatewayResultController(IOperator operator, IStateLoader stateLoader) {
super(operator);
this.stateLoader = stateLoader;
}
@ApiOperation(value = "get all pair-sdf.")
@ApiResponses(value = {@ApiResponse(code = 200, message = "OK", response = CommonGetAllResponse.class)})
@RequestMapping(method = RequestMethod.GET)
@ResponseBody
public CommonGetAllResponse getAll() {
Collection<Map<String, Object>> all = stateLoader.getAllMetaTransform(IMDGDistributedNames.Map_GatewayResult, GatewayResult.class);
CommonGetAllResponse response = new CommonGetAllResponse();
response.fromEntity(all);
return response;
}
}

View file

@ -1,41 +0,0 @@
package ru.spcex.clearing.backendapi.controller.queue.register;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiResponse;
import io.swagger.annotations.ApiResponses;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
import ru.clearing.classes.statics.data.register.PairSdf;
import ru.spcex.clearing.backendapi.controller.queue.AbstractQueueController;
import ru.spcex.clearing.backendapi.controller.response.entity.CommonGetAllResponse;
import ru.spcex.clearing.backendapi.service.IOperator;
import ru.spcex.clearing.backendapi.service.IStateLoader;
import ru.spcex.clearing.imdg.IMDGDistributedNames;
import java.util.Collection;
import java.util.Map;
@Controller
@RequestMapping("/pair-sdf")
public class PairSdfController extends AbstractQueueController {
private final IStateLoader stateLoader;
@Autowired
public PairSdfController(IOperator operator, IStateLoader stateLoader) {
super(operator);
this.stateLoader = stateLoader;
}
@ApiOperation(value = "get all pair-sdf.")
@ApiResponses(value = {@ApiResponse(code = 200, message = "OK", response = CommonGetAllResponse.class)})
@RequestMapping(method = RequestMethod.GET)
@ResponseBody
public CommonGetAllResponse getAll() {
Collection<Map<String, Object>> all = stateLoader.getAllMetaTransform(IMDGDistributedNames.Map_PairSdf, PairSdf.class);
CommonGetAllResponse response = new CommonGetAllResponse();
response.fromEntity(all);
return response;
}
}

View file

@ -1,74 +0,0 @@
package ru.spcex.clearing.backendapi.controller.queue.registry;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import io.swagger.annotations.ApiResponse;
import io.swagger.annotations.ApiResponses;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
import ru.clearing.classes.statics.data.registry.TradingClearingRegistryList;
import ru.spcex.clearing.backendapi.controller.queue.AbstractQueueController;
import ru.spcex.clearing.backendapi.controller.request.cud.registry.TradingClearingRegistryListNewAction;
import ru.spcex.clearing.backendapi.controller.request.cud.registry.TradingClearingRegistryListUpdateAction;
import ru.spcex.clearing.backendapi.controller.response.BasicSpcexResponse;
import ru.spcex.clearing.backendapi.controller.response.cud.CudResponse;
import ru.spcex.clearing.backendapi.controller.response.entity.CommonGetAllResponse;
import ru.spcex.clearing.backendapi.service.IOperator;
import ru.spcex.clearing.backendapi.service.IStateLoader;
import ru.spcex.clearing.imdg.IMDGDistributedNames;
import ru.spcex.clearing.platform.messaging.domain.Consts;
import java.util.Collection;
import java.util.Map;
import java.util.concurrent.ExecutionException;
// todo unittest for TradingClearingRegistryListController
@Controller
@RequestMapping("/trading-clearing-registries-list")
public class TradingClearingRegistryListController extends AbstractQueueController {
private final IStateLoader stateLoader;
@Autowired
public TradingClearingRegistryListController(IOperator operator, IStateLoader stateLoader) {
super(operator);
this.stateLoader = stateLoader;
}
@ApiOperation(value = "get all TradingClearingRegistryList's")
@ApiResponses(value = {@ApiResponse(code = 200, message = "OK", response = CommonGetAllResponse.class)})
@RequestMapping(method = RequestMethod.GET)
@ResponseBody
public CommonGetAllResponse getAll() {
Collection<Map<String, Object>> all = stateLoader.getAllMetaTransform(
IMDGDistributedNames.Map_TradingClearingRegistryList,
TradingClearingRegistryList.class);
CommonGetAllResponse response = new CommonGetAllResponse();
response.fromEntity(all);
return response;
}
@ApiOperation(value = "Добавление списка счетов ТКР")
@ApiResponses(value = {@ApiResponse(code = 200, message = "OK", response = CudResponse.class), @ApiResponse(code = 400, message = "Ошибка валидации", response = BasicSpcexResponse.class)})
@RequestMapping(method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE)
@ResponseBody
public CudResponse add(
@ApiParam(value = "Параметры команды в JSON формате.", required = true)
@RequestBody TradingClearingRegistryListNewAction tradingClearingRegistryListNewAction) throws ExecutionException, InterruptedException {
return processRequest(Consts.DESTINATION_TRADING_CLEARING_REGISTRIES_LIST_NEW, tradingClearingRegistryListNewAction);
}
@ApiOperation(value = "Изменение списка счетов ТКР")
@ApiResponses(value = {@ApiResponse(code = 200, message = "OK", response = CudResponse.class), @ApiResponse(code = 400, message = "Ошибка валидации", response = BasicSpcexResponse.class)})
@RequestMapping(value = "/{id}", method = RequestMethod.PUT, consumes = MediaType.APPLICATION_JSON_VALUE)
@ResponseBody
public CudResponse update(
@ApiParam(value = "Идентификатор изменяемого объекта.", required = true, example = "1234")
@PathVariable("id") Long id,
@ApiParam(value = "Новые значения полей объекта.", required = true)
@RequestBody TradingClearingRegistryListUpdateAction tradingClearingRegistryListUpdateAction) throws ExecutionException, InterruptedException {
tradingClearingRegistryListUpdateAction.setId(id);
return processRequest(Consts.DESTINATION_TRADING_CLEARING_REGISTRIES_LIST_UPDATE, tradingClearingRegistryListUpdateAction);
}
}

View file

@ -104,7 +104,7 @@ public class LauncherController extends AbstractQueueController {
if (taskEnum == null) {
throw new NotFound404Exception("task dictionary element with code '" + launcherNew.getTask() + "'");
}
if (!IEnumKey.contains(taskEnum.getCode(), Task.startOfClearing, Task.dbfExport_OUTV, Task.getAllBalance, Task.createRegistry_GBRR)) {
if (!IEnumKey.contains(taskEnum.getCode(), Task.startOfClearing, Task.dbfExport_OUTV)) {
log.warn(String.format("Task %s not support request with body", taskEnum.getCode()));
} // else В мете эти модели с дополнительными параметрами (OUTV).
Authentication authentication = SecurityContextHolder.getContext().getAuthentication();

View file

@ -1,84 +0,0 @@
package ru.spcex.clearing.backendapi.controller.queue.securities;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import io.swagger.annotations.ApiResponse;
import io.swagger.annotations.ApiResponses;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
import ru.clearing.classes.statics.data.security.CurrencyPairSecurity;
import ru.spcex.clearing.backendapi.controller.queue.AbstractQueueController;
import ru.spcex.clearing.backendapi.controller.request.cud.common.CommonDeleteAction;
import ru.spcex.clearing.backendapi.controller.request.cud.securities.CurrencyPairSecurityNewAction;
import ru.spcex.clearing.backendapi.controller.request.cud.securities.CurrencyPairSecurityUpdateAction;
import ru.spcex.clearing.backendapi.controller.response.BasicSpcexResponse;
import ru.spcex.clearing.backendapi.controller.response.cud.CudResponse;
import ru.spcex.clearing.backendapi.controller.response.entity.CommonGetAllResponse;
import ru.spcex.clearing.backendapi.service.IOperator;
import ru.spcex.clearing.backendapi.service.IStateLoader;
import ru.spcex.clearing.imdg.IMDGDistributedNames;
import ru.spcex.clearing.platform.messaging.domain.Consts;
import java.util.Collection;
import java.util.Map;
import java.util.concurrent.ExecutionException;
@Controller
@RequestMapping("/securities/currency-pair-securities")
public class CurrencyPairSecurityController extends AbstractQueueController {
private final IStateLoader stateLoader;
@Autowired
public CurrencyPairSecurityController(IOperator operator, IStateLoader stateLoader) {
super(operator);
this.stateLoader = stateLoader;
}
@ApiOperation(value = "create currencyPairSecurity.")
@ApiResponses(value = {@ApiResponse(code = 200, message = "OK", response = CudResponse.class), @ApiResponse(code = 400, message = "Ошибка валидации", response = BasicSpcexResponse.class)})
@RequestMapping(method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE)
@ResponseBody
public CudResponse add(
@ApiParam(value = "Параметры команды в JSON формате.", required = true)
@RequestBody CurrencyPairSecurityNewAction currencyPairSecurityNewAction) throws ExecutionException, InterruptedException {
return processRequest(Consts.DESTINATION_CURRENCY_PAIR_SECURITIES_NEW, currencyPairSecurityNewAction);
}
@ApiOperation(value = "update currencyPairSecurity.")
@ApiResponses(value = {@ApiResponse(code = 200, message = "OK", response = CudResponse.class), @ApiResponse(code = 400, message = "Ошибка валидации", response = BasicSpcexResponse.class)})
@RequestMapping(value = "/{id}", method = RequestMethod.PUT, consumes = MediaType.APPLICATION_JSON_VALUE)
@ResponseBody
public CudResponse update(
@ApiParam(value = "Идентификатор изменяемого объекта.", required = true, example = "1234")
@PathVariable("id") Long id,
@ApiParam(value = "Новые значения полей объекта.", required = true)
@RequestBody CurrencyPairSecurityUpdateAction currencyPairSecurityUpdateAction) throws ExecutionException, InterruptedException {
currencyPairSecurityUpdateAction.setId(id);
return processRequest(Consts.DESTINATION_CURRENCY_PAIR_SECURITIES_UPDATE, currencyPairSecurityUpdateAction);
}
@ApiOperation(value = "delete currency pair securities.")
@ApiResponses(value = {@ApiResponse(code = 200, message = "OK", response = CudResponse.class), @ApiResponse(code = 400, message = "Ошибка валидации", response = BasicSpcexResponse.class)})
@RequestMapping(value = "/{id}", method = RequestMethod.DELETE)
@ResponseBody
public CudResponse delete(@ApiParam(value = "Идентификатор удаляемого объекта", required = true, example = "1234")
@PathVariable("id") Long id) throws ExecutionException, InterruptedException {
CommonDeleteAction deleteAction = new CommonDeleteAction();
deleteAction.setId(id);
return processRequest(Consts.DESTINATION_CURRENCY_PAIR_SECURITIES_DELETE, deleteAction);
}
@ApiOperation(value = "get all equity securities.")
@ApiResponses(value = {@ApiResponse(code = 200, message = "OK", response = CommonGetAllResponse.class)})
@RequestMapping(method = RequestMethod.GET)
@ResponseBody
public CommonGetAllResponse getAll() {
Collection<Map<String, Object>> all = stateLoader.getAllMetaTransform(IMDGDistributedNames.Map_CurrencyPairSecurity,
CurrencyPairSecurity.class);
CommonGetAllResponse response = new CommonGetAllResponse();
response.fromEntity(all);
return response;
}
}

View file

@ -48,9 +48,6 @@ public class SecurityController {
all.addAll(stateLoader.getAllMetaTransformSpecificClass(
IMDGDistributedNames.Map_EquitySecurity, EquitySecurity.class
));
all.addAll(stateLoader.getAllMetaTransformSpecificClass(
IMDGDistributedNames.Map_CurrencyPairSecurity, EquitySecurity.class
));
CommonGetAllResponse response = new CommonGetAllResponse();
response.fromEntity(all);
return response;

View file

@ -17,9 +17,6 @@ public class AccountInformationNewAction implements IAction<InformationAccountNe
@ApiModelProperty(value = "Наименование статуса", example = "ACTV")
@JsonProperty
private String status;
@ApiModelProperty(value = "Код валюты", example = "RUB")
@JsonProperty
public String currency;
@ApiModelProperty(value = "Наименование типа счета", example = "INFO")
@JsonProperty
private String accountType;
@ -29,7 +26,6 @@ public class AccountInformationNewAction implements IAction<InformationAccountNe
var req = new InformationAccountNewRequest();
req.setCompanyId(this.companyId);
req.setAccount(this.account);
req.setCurrency(this.currency);
req.setStatus(this.status);
req.setAccountType(this.accountType);
return req;

View file

@ -29,9 +29,6 @@ public class AccountNewAction implements IAction<AccountNewRequest> {
@ApiModelProperty(value = "Наименование типа счета", example = "CLRN")
@JsonProperty
private String accountType;
@ApiModelProperty(value = "Код валюты", example = "RUB")
@JsonProperty
private String currency;
@Override
public AccountNewRequest toRequest() {
@ -40,7 +37,6 @@ public class AccountNewAction implements IAction<AccountNewRequest> {
req.setAccount(this.account);
req.setStatus(this.status);
req.setAccountType(this.accountType);
req.setCurrency(this.currency);
return req;
}
@ -81,12 +77,4 @@ public class AccountNewAction implements IAction<AccountNewRequest> {
public void setAccountType(String accountType) {
this.accountType = accountType;
}
public String getCurrency() {
return currency;
}
public void setCurrency(String currency) {
this.currency = currency;
}
}

View file

@ -47,9 +47,6 @@ public class BankAccountNewAction implements IAction<BankAccountNewRequest> {
@ApiModelProperty(value = "Компания", example = "1234")
@JsonProperty
private Long companyId;
@ApiModelProperty(value = "SWIFT", example = "ABCDE")
@JsonProperty
private String swiftCode;
@Override
public BankAccountNewRequest toRequest() {
@ -64,7 +61,6 @@ public class BankAccountNewAction implements IAction<BankAccountNewRequest> {
req.setTaxRegistrationReasonCode(this.taxRegistrationReasonCode);
req.setAccount(this.account);
req.setCompanyId(this.companyId);
req.setSwiftCode(swiftCode);
return req;
}
@ -153,12 +149,4 @@ public class BankAccountNewAction implements IAction<BankAccountNewRequest> {
public void setCompanyId(Long companyId) {
this.companyId = companyId;
}
public String getSwiftCode() {
return swiftCode;
}
public void setSwiftCode(String swiftCode) {
this.swiftCode = swiftCode;
}
}

View file

@ -38,9 +38,6 @@ public class BankAccountUpdateAction implements IAction<BankAccountUpdateRequest
@ApiModelProperty(value = "Код причины постановки (КПП)", example = "01")
@JsonProperty
private String taxRegistrationReasonCode;
@ApiModelProperty(value = "SWIFT", example = "ABCDE")
@JsonProperty
private String swiftCode;
@ApiModelProperty(value = "Номер счета", example = "11111222223333344444")
private String account;
@ -58,7 +55,6 @@ public class BankAccountUpdateAction implements IAction<BankAccountUpdateRequest
req.setTaxpayerIdentificationNumber(this.taxpayerIdentificationNumber);
req.setTaxRegistrationReasonCode(this.taxRegistrationReasonCode);
req.setAccount(this.account);
req.setSwiftCode(swiftCode);
return req;
}
@ -147,12 +143,4 @@ public class BankAccountUpdateAction implements IAction<BankAccountUpdateRequest
public void setAccount(String account) {
this.account = account;
}
public String getSwiftCode() {
return swiftCode;
}
public void setSwiftCode(String swiftCode) {
this.swiftCode = swiftCode;
}
}

View file

@ -31,9 +31,6 @@ public class ClientCodeNewAction implements IAction<ClientCodeNewRequest> {
@ApiModelProperty(value = "Номер депозитарного счета", example = "1234")
@JsonProperty
private Long depoAccountId;
@ApiModelProperty(value = "Список валютных счетов", example = "[1234,5678]")
@JsonProperty
private List<Long> currencyAccountList;
@ApiModelProperty(value = "Наименование статуса", example = "ACTV")
@JsonProperty
private String status;
@ -46,7 +43,6 @@ public class ClientCodeNewAction implements IAction<ClientCodeNewRequest> {
req.setTradingClearingRegistryId(this.tradingClearingRegistryId);
req.setMoneyAccountId(this.moneyAccountId);
req.setDepoAccountId(this.depoAccountId);
req.setCurrencyAccountList(this.currencyAccountList);
req.setStatus(this.status);
return req;
}
@ -97,14 +93,6 @@ public class ClientCodeNewAction implements IAction<ClientCodeNewRequest> {
this.depoAccountId = depoAccountId;
}
public List<Long> getCurrencyAccountList() {
return currencyAccountList;
}
public void setCurrencyAccountList(List<Long> currencyAccountList) {
this.currencyAccountList = currencyAccountList;
}
public String getStatus() {
return status;
}

View file

@ -32,9 +32,6 @@ public class ClientCodeUpdateAction implements IAction<ClientCodeUpdateRequest>
@ApiModelProperty(value = "Номер депозитарного счета", example = "1234")
@JsonProperty
private Long depoAccountId;
@ApiModelProperty(value = "Список валютных счетов", example = "[1234,5678]")
@JsonProperty
private List<Long> currencyAccountList;
@ApiModelProperty(value = "Наименование статуса", example = "ACTV")
@JsonProperty
private String status;
@ -49,7 +46,6 @@ public class ClientCodeUpdateAction implements IAction<ClientCodeUpdateRequest>
req.setTradingClearingRegistryId(this.tradingClearingRegistryId);
req.setMoneyAccountId(this.moneyAccountId);
req.setDepoAccountId(this.depoAccountId);
req.setCurrencyAccountList(this.currencyAccountList);
req.setStatus(this.status);
return req;
}
@ -108,14 +104,6 @@ public class ClientCodeUpdateAction implements IAction<ClientCodeUpdateRequest>
this.depoAccountId = depoAccountId;
}
public List<Long> getCurrencyAccountList() {
return currencyAccountList;
}
public void setCurrencyAccountList(List<Long> currencyAccountList) {
this.currencyAccountList = currencyAccountList;
}
public String getStatus() {
return status;
}

View file

@ -1,71 +0,0 @@
package ru.spcex.clearing.backendapi.controller.request.cud.company;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModelProperty;
import ru.spcex.clearing.backendapi.domain.actions.IAction;
import ru.spcex.clearing.platform.messaging.domain.ActionType;
import ru.spcex.clearing.platform.messaging.domain.cud.company.CompanyRoleSetUpdateRequest;
public class CompanyRoleSetUpdateAction implements IAction<CompanyRoleSetUpdateRequest> {
@ApiModelProperty(hidden = true)
@JsonProperty
public Long id;
@ApiModelProperty(value = "Наименование компании", example = "1234")
@JsonProperty
Long companyId;
@ApiModelProperty(value = "Код роли компании", example = "ABCD")
@JsonProperty
String companyRole;
@ApiModelProperty(value = "Код статуса", example = "ACTV")
@JsonProperty
String workflowStatus;
@Override
public CompanyRoleSetUpdateRequest toRequest() {
var request = new CompanyRoleSetUpdateRequest();
request.setId(this.id);
request.setCompanyId(this.companyId);
request.setCompanyRole(this.companyRole);
request.setWorkflowStatus(this.workflowStatus);
return request;
}
@ApiModelProperty(hidden = true)
@Override
public ActionType getActionType() {
return ActionType.UPDATE;
}
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public Long getCompanyId() {
return companyId;
}
public void setCompanyId(Long companyId) {
this.companyId = companyId;
}
public String getCompanyRole() {
return companyRole;
}
public void setCompanyRole(String companyRole) {
this.companyRole = companyRole;
}
public String getWorkflowStatus() {
return workflowStatus;
}
public void setWorkflowStatus(String workflowStatus) {
this.workflowStatus = workflowStatus;
}
}

View file

@ -1,46 +0,0 @@
package ru.spcex.clearing.backendapi.controller.request.cud.company;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModelProperty;
import ru.spcex.clearing.backendapi.domain.actions.IAction;
import ru.spcex.clearing.platform.messaging.domain.ActionType;
import ru.spcex.clearing.platform.messaging.domain.cud.company.SettlementHousePropertyNewRequest;
public class SettlementHousePropertiesNewAction implements IAction<SettlementHousePropertyNewRequest> {
@ApiModelProperty(value = "Наименование компании", example = "1234")
@JsonProperty
Long companyId;
@ApiModelProperty(value = "Код валюты", example = "RUB")
@JsonProperty
String currencyCode;
@Override
public SettlementHousePropertyNewRequest toRequest() {
SettlementHousePropertyNewRequest request = new SettlementHousePropertyNewRequest();
request.setCompanyId(this.companyId);
request.setCurrencyCode(this.currencyCode);
return request;
}
@ApiModelProperty(hidden = true)
@Override
public ActionType getActionType() {
return ActionType.NEW;
}
public Long getCompanyId() {
return companyId;
}
public void setCompanyId(Long companyId) {
this.companyId = companyId;
}
public String getCurrencyCode() {
return currencyCode;
}
public void setCurrencyCode(String currencyCode) {
this.currencyCode = currencyCode;
}
}

View file

@ -1,60 +0,0 @@
package ru.spcex.clearing.backendapi.controller.request.cud.company;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModelProperty;
import ru.spcex.clearing.backendapi.domain.actions.IAction;
import ru.spcex.clearing.platform.messaging.domain.ActionType;
import ru.spcex.clearing.platform.messaging.domain.cud.company.SettlementHousePropertyUpdateRequest;
public class SettlementHousePropertiesUpdateAction implements IAction<SettlementHousePropertyUpdateRequest> {
@ApiModelProperty(hidden = true)
@JsonProperty
private Long id;
@ApiModelProperty(value = "Наименование компании", example = "1234")
@JsonProperty
Long companyId;
@ApiModelProperty(value = "Код валюты", example = "RUB")
@JsonProperty
String currencyCode;
@Override
public SettlementHousePropertyUpdateRequest toRequest() {
SettlementHousePropertyUpdateRequest request = new SettlementHousePropertyUpdateRequest();
request.setId(this.id);
request.setCompanyId(this.companyId);
request.setCurrencyCode(this.currencyCode);
return request;
}
@ApiModelProperty(hidden = true)
@Override
public ActionType getActionType() {
return ActionType.UPDATE;
}
@ApiModelProperty(hidden = true)
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public Long getCompanyId() {
return companyId;
}
public void setCompanyId(Long companyId) {
this.companyId = companyId;
}
public String getCurrencyCode() {
return currencyCode;
}
public void setCurrencyCode(String currencyCode) {
this.currencyCode = currencyCode;
}
}

View file

@ -1,52 +0,0 @@
package ru.spcex.clearing.backendapi.controller.request.cud.registry;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModelProperty;
import ru.spcex.clearing.backendapi.domain.actions.IAction;
import ru.spcex.clearing.platform.messaging.domain.ActionType;
import ru.spcex.clearing.platform.messaging.domain.cud.registry.TradingClearingRegistryListNewRequest;
import java.util.List;
public class TradingClearingRegistryListNewAction implements IAction<TradingClearingRegistryListNewRequest> {
@ApiModelProperty(value = "Торгово-клиринговый регистр", example = "1200")
@JsonProperty
private Long tradingClearingRegistryId;
@ApiModelProperty(value = "Идентификатор валютного счёта", example = "123")
@JsonProperty
private Long accountId;
// @ApiModelProperty(value = "Наименование статуса", example = "ACTV", required = false)
// @JsonProperty
// private String status;
@Override
public TradingClearingRegistryListNewRequest toRequest() {
var req = new TradingClearingRegistryListNewRequest();
req.setTradingClearingRegistryId(this.tradingClearingRegistryId);
req.setAccountId(this.accountId);
// req.setStatus(this.status);
return req;
}
@ApiModelProperty(hidden = true)
@Override
public ActionType getActionType() {
return ActionType.NEW;
}
public Long getTradingClearingRegistryId() {
return tradingClearingRegistryId;
}
public void setTradingClearingRegistryId(Long tradingClearingRegistryId) {
this.tradingClearingRegistryId = tradingClearingRegistryId;
}
public Long getAccountId() {
return accountId;
}
public void setAccountId(Long accountId) {
this.accountId = accountId;
}
}

View file

@ -1,50 +0,0 @@
package ru.spcex.clearing.backendapi.controller.request.cud.registry;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModelProperty;
import ru.spcex.clearing.backendapi.domain.actions.IAction;
import ru.spcex.clearing.platform.messaging.domain.ActionType;
import ru.spcex.clearing.platform.messaging.domain.cud.registry.TradingClearingRegistryListUpdateRequest;
import java.util.List;
public class TradingClearingRegistryListUpdateAction implements IAction<TradingClearingRegistryListUpdateRequest> {
@ApiModelProperty(hidden = true)
@JsonProperty
public Long id;
@ApiModelProperty(value = "Наименование статуса", example = "ACTV")
@JsonProperty
private String status;
@Override
public TradingClearingRegistryListUpdateRequest toRequest() {
var req = new TradingClearingRegistryListUpdateRequest();
req.setId(this.id);
req.setStatus(this.status);
return req;
}
@ApiModelProperty(hidden = true)
@Override
public ActionType getActionType() {
return ActionType.UPDATE;
}
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getStatus() {
return status;
}
public void setStatus(String status) {
this.status = status;
}
}

View file

@ -1,23 +1,15 @@
package ru.spcex.clearing.backendapi.controller.request.cud.schedule;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import io.swagger.annotations.ApiModelProperty;
import ru.spcex.clearing.backendapi.domain.actions.IAction;
import ru.spcex.clearing.backendapi.errors.BackEndError;
import ru.spcex.clearing.platform.messaging.domain.ActionType;
import ru.spcex.clearing.platform.messaging.domain.cud.schedule.LauncherCommandRequest;
import ru.spcex.clearing.platform.messaging.domain.json.deserialize.LocalDateDeserializer;
import ru.spcex.clearing.platform.messaging.domain.json.deserialize.LocalTimeDeserializer;
import ru.spcex.clearing.platform.messaging.domain.json.serialize.LocalTimeSerializer;
import ru.spcex.platform.utils.enumeration.EnumMessage;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalTime;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
@ -71,24 +63,6 @@ public class LauncherNew implements IAction<Object> {
@ApiModelProperty(value = "Наименование счета получателя", example = "1000")
@JsonProperty
private Long debitLeg_accountId;
@ApiModelProperty(value = "SWIFT", example = "ABCDE")
@JsonProperty
private String swiftCode;
@ApiModelProperty(value = "Время", dataType = "java.lang.String", example = "16:30:00")
@JsonSerialize(using = LocalTimeSerializer.class)
@JsonDeserialize(using = LocalTimeDeserializer.class)
@JsonProperty
public LocalTime fromTime;
@ApiModelProperty(value = "Дата с", example = "2024-01-02")
@JsonDeserialize(using = LocalDateDeserializer.class)
@JsonProperty
public LocalDate fromDate;
@ApiModelProperty(value = "Дата по", example = "2024-03-02")
@JsonDeserialize(using = LocalDateDeserializer.class)
@JsonProperty
public LocalDate toDate;
@Override
public Object toRequest() {
@ -109,10 +83,6 @@ public class LauncherNew implements IAction<Object> {
taskRunnerCommandRequest.setCreditLeg_accountId(creditLeg_accountId);
taskRunnerCommandRequest.setAddresseeId(addresseeId);
taskRunnerCommandRequest.setDebitLeg_accountId(debitLeg_accountId);
taskRunnerCommandRequest.setFromTime(fromTime);
taskRunnerCommandRequest.setSwiftCode(swiftCode);
taskRunnerCommandRequest.setFromDate(fromDate);
taskRunnerCommandRequest.setToDate(toDate);
return taskRunnerCommandRequest;
}
@ -250,14 +220,6 @@ public class LauncherNew implements IAction<Object> {
this.debitLeg_accountId = debitLeg_accountId;
}
public String getSwiftCode() {
return swiftCode;
}
public void setSwiftCode(String swiftCode) {
this.swiftCode = swiftCode;
}
public BigDecimal getFullBalance() {
return fullBalance;
}
@ -265,28 +227,4 @@ public class LauncherNew implements IAction<Object> {
public void setFullBalance(BigDecimal fullBalance) {
this.fullBalance = fullBalance;
}
public LocalTime getFromTime() {
return fromTime;
}
public void setFromTime(LocalTime fromTime) {
this.fromTime = fromTime;
}
public LocalDate getFromDate() {
return fromDate;
}
public void setFromDate(LocalDate fromDate) {
this.fromDate = fromDate;
}
public LocalDate getToDate() {
return toDate;
}
public void setToDate(LocalDate toDate) {
this.toDate = toDate;
}
}

View file

@ -1,143 +0,0 @@
package ru.spcex.clearing.backendapi.controller.request.cud.securities;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModelProperty;
import ru.spcex.clearing.backendapi.domain.actions.IAction;
import ru.spcex.clearing.platform.messaging.domain.ActionType;
import ru.spcex.clearing.platform.messaging.domain.cud.security.CurrencyPairSecurityNewRequest;
import ru.spcex.platform.classes.base.interfaces.WithSecuritySymbol;
import java.math.BigDecimal;
public class CurrencyPairSecurityNewAction implements IAction<CurrencyPairSecurityNewRequest>, WithSecuritySymbol {
@ApiModelProperty(value = "Наименование типа инструмента", example = "CDE")
@JsonProperty
public String instrumentType;
@ApiModelProperty(value = "Код инструмента", example = "CDE")
@JsonProperty
public String securitySymbol;
@ApiModelProperty(value = "Краткое наименование инструмента", example = "NAME")
@JsonProperty
public String shortName;
@ApiModelProperty(value = "Полное наименование инструмента", example = "NAME of NAME")
@JsonProperty
public String fullName;
@ApiModelProperty(value = "Валютная пара", example = "1234")
@JsonProperty
public Long currencyPairId;
// @ApiModelProperty(value = "Размер лота", example = "12.33")
// @JsonProperty
// public BigDecimal lotSize;
// @ApiModelProperty(value = "Шаг цены", example = "12.33")
// @JsonProperty
// public BigDecimal minStep;
@ApiModelProperty(value = "Количество валюты лота", example = "12.33")
@JsonProperty
public BigDecimal baseUnitSize;
@ApiModelProperty(value = "Наименование статуса", example = "CDE")
@JsonProperty
public String settlementType;
@ApiModelProperty(value = "Наименование статуса", example = "CDE")
@JsonProperty
public String workflowStatus;
@ApiModelProperty(value = "Наименование клиринговой организации", example = "NAME")
@JsonProperty
public String clearingOrganization;
@Override
public CurrencyPairSecurityNewRequest toRequest() {
var req = new CurrencyPairSecurityNewRequest();
req.setInstrumentType(this.getInstrumentType());
req.setSecuritySymbol(this.getSecuritySymbol());
req.setShortName(this.getShortName());
req.setFullName(this.getFullName());
req.setCurrencyPairId(this.getCurrencyPairId());
// req.setLotSize(this.getLotSize());
// req.setMinStep(this.getMinStep());
req.setBaseUnitSize(this.getBaseUnitSize());
req.setSettlementType(this.getSettlementType());
req.setWorkflowStatus(this.getWorkflowStatus());
req.setClearingOrganization(this.getClearingOrganization());
return req;
}
@ApiModelProperty(hidden = true)
@Override
public ActionType getActionType() {
return ActionType.NEW;
}
public String getInstrumentType() {
return instrumentType;
}
public void setInstrumentType(String instrumentType) {
this.instrumentType = instrumentType;
}
@Override
public String getSecuritySymbol() {
return securitySymbol;
}
public void setSecuritySymbol(String securitySymbol) {
this.securitySymbol = securitySymbol;
}
public String getShortName() {
return shortName;
}
public void setShortName(String shortName) {
this.shortName = shortName;
}
public String getFullName() {
return fullName;
}
public void setFullName(String fullName) {
this.fullName = fullName;
}
public Long getCurrencyPairId() {
return currencyPairId;
}
public void setCurrencyPairId(Long currencyPairId) {
this.currencyPairId = currencyPairId;
}
public BigDecimal getBaseUnitSize() {
return baseUnitSize;
}
public void setBaseUnitSize(BigDecimal baseUnitSize) {
this.baseUnitSize = baseUnitSize;
}
public String getSettlementType() {
return settlementType;
}
public void setSettlementType(String settlementType) {
this.settlementType = settlementType;
}
public String getWorkflowStatus() {
return workflowStatus;
}
public void setWorkflowStatus(String workflowStatus) {
this.workflowStatus = workflowStatus;
}
public String getClearingOrganization() {
return clearingOrganization;
}
public void setClearingOrganization(String clearingOrganization) {
this.clearingOrganization = clearingOrganization;
}
}

View file

@ -1,156 +0,0 @@
package ru.spcex.clearing.backendapi.controller.request.cud.securities;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModelProperty;
import ru.spcex.clearing.backendapi.domain.actions.IAction;
import ru.spcex.clearing.platform.messaging.domain.ActionType;
import ru.spcex.clearing.platform.messaging.domain.cud.security.CurrencyPairSecurityUpdateRequest;
import ru.spcex.platform.classes.base.interfaces.WithId;
import java.math.BigDecimal;
public class CurrencyPairSecurityUpdateAction implements IAction<CurrencyPairSecurityUpdateRequest>, WithId {
@ApiModelProperty(hidden = true)
@JsonProperty
public Long id;
@ApiModelProperty(value = "Наименование типа инструмента", example = "CDE")
@JsonProperty
public String instrumentType;
@ApiModelProperty(value = "Код инструмента", example = "CDE")
@JsonProperty
public String securitySymbol;
@ApiModelProperty(value = "Краткое наименование инструмента", example = "NAME")
@JsonProperty
public String shortName;
@ApiModelProperty(value = "Полное наименование инструмента", example = "NAME of NAME")
@JsonProperty
public String fullName;
@ApiModelProperty(value = "Валютная пара", example = "1234")
@JsonProperty
public Long currencyPairId;
// @ApiModelProperty(value = "Размер лота", example = "12.33")
// @JsonProperty
// public BigDecimal lotSize;
// @ApiModelProperty(value = "Шаг цены", example = "12.33")
// @JsonProperty
// public BigDecimal minStep;
@ApiModelProperty(value = "Количество валюты лота", example = "12.33")
@JsonProperty
public BigDecimal baseUnitSize;
@ApiModelProperty(value = "Наименование статуса", example = "CDE")
@JsonProperty
public String settlementType;
@ApiModelProperty(value = "Наименование статуса", example = "CDE")
@JsonProperty
public String workflowStatus;
@ApiModelProperty(value = "Наименование клиринговой организации", example = "NAME")
@JsonProperty
public String clearingOrganization;
@Override
public CurrencyPairSecurityUpdateRequest toRequest() {
var req = new CurrencyPairSecurityUpdateRequest();
req.setId(this.getId());
req.setInstrumentType(this.getInstrumentType());
req.setSecuritySymbol(this.getSecuritySymbol());
req.setShortName(this.getShortName());
req.setFullName(this.getFullName());
req.setCurrencyPairId(this.getCurrencyPairId());
// req.setLotSize(this.getLotSize());
// req.setMinStep(this.getMinStep());
req.setBaseUnitSize(this.getBaseUnitSize());
req.setSettlementType(this.getSettlementType());
req.setWorkflowStatus(this.getWorkflowStatus());
req.setClearingOrganization(this.getClearingOrganization());
return req;
}
@ApiModelProperty(hidden = true)
@Override
public ActionType getActionType() {
return ActionType.UPDATE;
}
@Override
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getInstrumentType() {
return instrumentType;
}
public void setInstrumentType(String instrumentType) {
this.instrumentType = instrumentType;
}
public String getSecuritySymbol() {
return securitySymbol;
}
public void setSecuritySymbol(String securitySymbol) {
this.securitySymbol = securitySymbol;
}
public String getShortName() {
return shortName;
}
public void setShortName(String shortName) {
this.shortName = shortName;
}
public String getFullName() {
return fullName;
}
public void setFullName(String fullName) {
this.fullName = fullName;
}
public Long getCurrencyPairId() {
return currencyPairId;
}
public void setCurrencyPairId(Long currencyPairId) {
this.currencyPairId = currencyPairId;
}
public BigDecimal getBaseUnitSize() {
return baseUnitSize;
}
public void setBaseUnitSize(BigDecimal baseUnitSize) {
this.baseUnitSize = baseUnitSize;
}
public String getSettlementType() {
return settlementType;
}
public void setSettlementType(String settlementType) {
this.settlementType = settlementType;
}
public String getWorkflowStatus() {
return workflowStatus;
}
public void setWorkflowStatus(String workflowStatus) {
this.workflowStatus = workflowStatus;
}
public String getClearingOrganization() {
return clearingOrganization;
}
public void setClearingOrganization(String clearingOrganization) {
this.clearingOrganization = clearingOrganization;
}
}

View file

@ -1,60 +0,0 @@
package ru.spcex.clearing.backendapi.controller.test;
import io.swagger.annotations.ApiModelProperty;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonRawValue;
import com.fasterxml.jackson.databind.JsonNode;
import ru.spcex.clearing.backendapi.domain.actions.IAction;
import ru.spcex.clearing.platform.messaging.domain.ActionType;
import ru.spcex.clearing.platform.messaging.domain.cud.registry.TradingClearingRegistryNewRequest;
public class AnyKafkaMessageAction implements IAction<TradingClearingRegistryNewRequest> {
@ApiModelProperty(value = "полное имя класса payload для BaseRequest", example = "ru.spcex.clearing.platform.messaging.domain.cud.schedule.LauncherCommandRequest")
@JsonProperty
private String fullClassName;
@JsonProperty
private String topicName;
@JsonRawValue
public String json;
@JsonProperty("json")
private void unpackRawJson(JsonNode json) {
this.json = json.toString();
}
@Override
public TradingClearingRegistryNewRequest toRequest() {
var req = new TradingClearingRegistryNewRequest();
return req;
}
@ApiModelProperty(hidden = true)
@Override
public ActionType getActionType() {
return ActionType.SYSTEM;
}
public String getFullClassName() {
return fullClassName;
}
public void setFullClassName(String fullClassName) {
this.fullClassName = fullClassName;
}
public String getTopicName() {
return topicName;
}
public void setTopicName(String topicName) {
this.topicName = topicName;
}
public String getJson() {
return json;
}
public void setJson(String json) {
this.json = json;
}
}

View file

@ -1,67 +0,0 @@
package ru.spcex.clearing.backendapi.controller.test;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import io.swagger.annotations.ApiResponse;
import io.swagger.annotations.ApiResponses;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.JavaType;
import com.fasterxml.jackson.databind.ObjectMapper;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Profile;
import org.springframework.http.MediaType;
import org.springframework.stereotype.Controller;
import org.springframework.util.ClassUtils;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import ru.spcex.clearing.backendapi.errors.BackEndError;
import ru.spcex.clearing.platform.messaging.service.sender.KafkaSender;
import ru.spcex.platform.utils.enumeration.EnumMessage;
import ru.spcex.platform.utils.error.ValidationException;
import ru.spcex.platform.utils.text.TextUtil;
@Profile("dev")
@Controller
@RequestMapping("/anonymous/kafka-api")
public class KafkaApiController {
private final Logger log = LoggerFactory.getLogger(getClass());
private final KafkaSender kafkaSender;
private static final ObjectMapper json = new ObjectMapper();
@Autowired
public KafkaApiController(KafkaSender kafkaSender) {
this.kafkaSender = kafkaSender;
}
@ApiOperation(value = "Test backend-api availability.")
@ApiResponses(value = {@ApiResponse(code = 200, message = "OK", response = String.class)})
@RequestMapping(method = RequestMethod.POST, path = "/any/message", produces = MediaType.TEXT_PLAIN_VALUE)
@ResponseBody
public String processGet(@ApiParam(value = "Параметры команды в JSON формате.", required = true)
@RequestBody AnyKafkaMessageAction bankAccountNewAction) throws ClassNotFoundException, ValidationException, JsonProcessingException {
log.info("Call test method for backend-api controller");
validate(bankAccountNewAction);
Class<?> parameterType = ClassUtils.forName(bankAccountNewAction.getFullClassName(), ClassUtils.getDefaultClassLoader());
JavaType requestType = json.getTypeFactory().constructSimpleType(parameterType, null);
Object obj = json.readValue(bankAccountNewAction.getJson(), requestType);
Long idOfBaseRequestMessage = kafkaSender.sendRequestToQueue(bankAccountNewAction.getTopicName(), obj);
return "success: baseRequest.id = " + idOfBaseRequestMessage;
}
private void validate(AnyKafkaMessageAction bankAccountNewAction) throws ValidationException {
if (TextUtil.isEmpty(bankAccountNewAction.getTopicName())) {
throw new ValidationException(new EnumMessage(BackEndError.ValidationError, "topicName"));
}
if (TextUtil.isEmpty(bankAccountNewAction.getFullClassName())) {
throw new ValidationException(new EnumMessage(BackEndError.ValidationError, "fullClassName"));
}
if (TextUtil.isEmpty(bankAccountNewAction.getJson())) {
throw new ValidationException(new EnumMessage(BackEndError.ValidationError, "json"));
}
}
}

View file

@ -1,22 +0,0 @@
package ru.spcex.clearing.backendapi.controller.test;
import io.swagger.annotations.ApiModelProperty;
import java.util.List;
import com.fasterxml.jackson.annotation.JsonProperty;
public class RevalMapAction {
@ApiModelProperty(
value = "мапы для перезагрузки",
example = "Map_Registry"
)
@JsonProperty
private List<String> maps;
public List<String> getMaps() {
return maps;
}
public void setMaps(List<String> maps) {
this.maps = maps;
}
}

View file

@ -1,69 +0,0 @@
package ru.spcex.clearing.backendapi.controller.test;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import io.swagger.annotations.ApiResponse;
import io.swagger.annotations.ApiResponses;
import java.util.List;
import java.util.concurrent.atomic.AtomicLong;
import com.hazelcast.core.IMap;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Profile;
import org.springframework.http.MediaType;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import ru.spcex.platform.imdg.api.ImdgProvider;
import ru.spcex.platform.imdg.iml.hazelcast.service.HazelcastService;
import ru.spcex.platform.utils.error.ValidationException;
@Profile("dev")
@Controller
@RequestMapping("/anonymous/reval")
public class RevalMapController implements InitializingBean {
private final Logger log = LoggerFactory.getLogger(getClass());
private final ImdgProvider imdgProvider;
private IMap<Long, String> revalMap;
@Autowired
public RevalMapController(ImdgProvider imdgProvider) {
this.imdgProvider = imdgProvider;
}
@Override
public void afterPropertiesSet() throws Exception {
imdgProvider.waitAvailable();
this.revalMap = ((HazelcastService) imdgProvider).getHazelcast().getMap("REVAL");
}
private final AtomicLong l = new AtomicLong(
1L
);
@ApiOperation(value = "Test backend-api availability.")
@ApiResponses(value = {@ApiResponse(code = 200, message = "OK", response = String.class)})
@RequestMapping(method = RequestMethod.POST, path = "/", produces = MediaType.TEXT_PLAIN_VALUE)
@ResponseBody
public String processPost(
@ApiParam(value = "Параметры команды в JSON формате.", required = true)
@RequestBody
RevalMapAction revalCommand) throws ClassNotFoundException, ValidationException {
log.info("Call test method for backend-api reval maps");
List<String> maps = revalCommand.getMaps();
if (maps.isEmpty()) {
throw new IllegalArgumentException("must be at least one map");
}
for (String map : maps) {
revalMap.put(
l.getAndIncrement(),
map
);
}
return "success";
}
}

View file

@ -1,56 +1,39 @@
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<property name="LOG_PATH" value="./log" />
<property name="FILE_NAME" value="backend-api" />
<property name="CONSOLE_LOG_PATTERN" value="%date{HH:mm:ss.SSS} [%thread] %-5level %class{0}:%line - %message%n" />
<property name="FILE_LOG_PATTERN" value="%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %class{0}:%msg%n" />
<appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
<appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<!-- |%X{ru.nbch.scoring.web.logging.mdc_key}-->
<Pattern>%date{HH:mm:ss.SSS} [%thread] %-5level %class{0}:%line - %message%n</Pattern>
<charset>utf-8</charset>
</encoder>
</appender>
<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>./logs/backend-api.log</file>
<encoder>
<!-- |%X{ru.nbch.scoring.web.logging.mdc_key}-->
<Pattern>${CONSOLE_LOG_PATTERN}</Pattern>
<charset>utf-8</charset>
</encoder>
</appender>
<!-- first FILE TEXT appender -->
<appender name="TEXT_FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${LOG_PATH}/${FILE_NAME}-text.log</file>
<encoder>
<!-- |%X{ru.nbch.scoring.web.logging.mdc_key}-->
<Pattern>${FILE_LOG_PATTERN}</Pattern>
<!-- |%X{ru.nbch.scoring.web.logging.mdc_key}-->
<Pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %class{0}:%msg%n</Pattern>
<charset>utf8</charset>
</encoder>
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<fileNamePattern>${LOG_PATH}/${FILE_NAME}-text.%d{yyyy-MM-dd}.%i.gz
<rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
<fileNamePattern>
./logs/backend-api.%i.log
</fileNamePattern>
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
<maxFileSize>100MB</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
<maxHistory>10</maxHistory>
</rollingPolicy>
</appender>
<!-- second FILE JSON appender -->
<appender name="JSON_FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${LOG_PATH}/${FILE_NAME}-json.log</file>
<encoder class="net.logstash.logback.encoder.LogstashEncoder" />
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<fileNamePattern>${LOG_PATH}/${FILE_NAME}-json.%d{yyyy-MM-dd}.%i.gz
</fileNamePattern>
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
<maxFileSize>100MB</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
<maxHistory>10</maxHistory>
<minIndex>1</minIndex>
<maxIndex>10</maxIndex>
</rollingPolicy>
<triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
<maxFileSize>500MB</maxFileSize>
</triggeringPolicy>
</appender>
<root level="info">
<!-- <appender-ref ref="CONSOLE"/> -->
<appender-ref ref="TEXT_FILE"/>
<appender-ref ref="JSON_FILE" />
</root>
<root level="warn">
<appender-ref ref="CONSOLE"/>
<appender-ref ref="FILE"/>
</root>
<logger name="ru.spcex" level="debug" additivity="false">
<appender-ref ref="TEXT_FILE"/>
<appender-ref ref="JSON_FILE" />
<!-- <appender-ref ref="CONSOLE"/> -->
<appender-ref ref="FILE"/>
<appender-ref ref="CONSOLE"/>
</logger>
<!--<logger name="org.springframework" level="info" />-->
</configuration>

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<meta version="3.11.0.78">
<meta version="3.9.0.68">
<enums>
<allowed id="1" code="ALWD" name="Разрешено"/>
<allowed id="2" code="DEND" name="Запрещено"/>
@ -8,7 +8,6 @@
<countryCode id="1" code="RUS" name="Россия"/>
<section id="1" code="MKR" name="Секция Денежного рынка МКР"/>
<section id="2" code="FOND" name="Фондовая секция"/>
<section id="3" code="CURR" name="Валютная секция"/>
<userRole id="1" code="ADMN" name="Администратор Клиринга МКР"/>
<userRole id="2" code="SPVS" name="Супервайзер Клиринга МКР"/>
<userRole id="3" code="SCRT" name="Администратор безопасности Клиринга МКР"/>
@ -84,7 +83,6 @@
<companySymbol id="18" code="UUID" name="Идентификатор во внешней системе" shortname="Внешний идентификатор"/>
<companySymbol id="19" code="LICM" name="Лицензия на управление инвестиционными фондами, паевыми инвестиционными фондами, негосударственными пенсионными фондами" shortname="Лицензия на управление фондами"/>
<companySymbol id="20" code="INTC" name="Код инициатора" shortname="Код инициатора"/>
<companySymbol id="21" code="CRCD" name="Атрибут участника «Кросс - код»" shortname="Кросс код"/>
<companyRole id="1" code="RPRT" name="Отчетная организация"/>
<companyRole id="2" code="CLRH" name="Клиринговая организация"/>
<companyRole id="3" code="EXCH" name="Торговая система"/>
@ -93,18 +91,11 @@
<companyRole id="6" code="CLRM" name="Участник клиринга"/>
<companyRole id="7" code="ODEP" name="Участник расчетов по открытым депозитным счетам на секции МКР"/>
<currencyCode id="643" code="RUB" name="Российский рубль"/>
<currencyCode id="840" code="USD" name="Доллар США"/>
<currencyCode id="978" code="EUR" name="Евро"/>
<currencyCode id="156" code="CNY" name="Китайский Юань"/>
<currencyPair id="1" code="EUR/RUB" baseCurrency="EUR" quoteCurrency="RUB" majorSign="CONV"/>
<currencyPair id="2" code="USD/RUB" baseCurrency="USD" quoteCurrency="RUB" majorSign="CONV"/>
<currencyPair id="3" code="CNY/RUВ" baseCurrency="CNY" quoteCurrency="RUВ" majorSign="CONV"/>
<instrumentType id="1" code="RATE" name="Инструмент Денежного рынка"/>
<instrumentType id="2" code="CRNC" name="Валюта"/>
<instrumentType id="3" code="EQTY" name="Акция"/>
<instrumentType id="4" code="BOND" name="Облигация"/>
<instrumentType id="5" code="MFND" name="ПАИ"/>
<instrumentType id="6" code="CURR" name="Валютная пара"/>
<termType id="1" code="S" name="Срочный"/>
<termType id="2" code="K" name="Комбинированный"/>
<termType id="3" code="V" name="До востребования"/>
@ -120,7 +111,7 @@
<tradingClearingRegistryType id="1" code="A" name="Владелец"/>
<tradingClearingRegistryType id="2" code="B" name="Клиентский"/>
<tradingClearingRegistryType id="3" code="C" name="Клиентский"/> <!-- todo был Попечитель -->
<tradingClearingRegistryType id="3" code="C" name="Клиентский"/>
<tradingClearingRegistryType id="4" code="D" name="Доверительный управляющий"/>
<tradingClearingRegistryType id="5" code="E" name="Эмитент"/>
<tradingClearingRegistryType id="6" code="Z" name="К размещению/выкупу"/>
@ -165,36 +156,42 @@
<registryUnit id="5" code="U" name="Невыясненные"/>
<registryUnit id="5" code="I" name="Списания/зачисления"/>
<registryUnit id="7" code="V" name="Выписка"/>
<registryCode id="1" code="AMAT" name="Денежные средства - общие"/>
<registryCode id="2" code="AMAF" name="Денежные средства - свободные"/>
<registryCode id="3" code="AMAB" name="Денежные средства - блокированные"/>
<registryCode id="4" code="TMAT" name="Требования по деньгам"/>
<registryCode id="5" code="OSAT" name="Обязательства по бумагам"/>
<registryCode id="6" code="OMAT" name="Обязательства по деньгам"/>
<registryCode id="7" code="TSAT" name="Требования по бумагам"/>
<registryCode id="8" code="CMAT" name="Рассчитанные требования по деньгам"/>
<registryCode id="9" code="LSAT" name="Рассчитанные обязательства по бумагам"/>
<registryCode id="10" code="LMAT" name="Рассчитанные обязательства по деньгам"/>
<registryCode id="11" code="CSAT" name="Рассчитанные требования по бумагам"/>
<registryCode id="12" code="AMBT" name="Денежные средства клиента - общие"/>
<registryCode id="13" code="AMBF" name="Денежные средства клиента - свободные"/>
<registryCode id="14" code="AMBB" name="Денежные средства клиента - блокированные"/>
<registryCode id="15" code="TMBT" name="Требования по деньгам (кл)"/>
<registryCode id="16" code="OSBT" name="Обязательства по бумагам (кл)"/>
<registryCode id="17" code="OMBT" name="Обязательства по деньгам (кл)"/>
<registryCode id="18" code="TSBT" name="Требования по бумагам (кл)"/>
<registryCode id="19" code="CMBT" name="Рассчитанные требования по деньгам (кл)"/>
<registryCode id="20" code="LSBT" name="Рассчитанные обязательства по бумагам (кл)"/>
<registryCode id="21" code="LMBT" name="Рассчитанные обязательства по деньгам (кл)"/>
<registryCode id="22" code="CSBT" name="Рассчитанные требования по бумагам (кл)"/>
<registryCode id="23" code="DMAT" name="Возврат депозита"/>
<registryCode id="24" code="DMBT" name="Возврат депозита (кл)"/>
<registryCode id="25" code="ASAT" name="Ценные бумаги - общие"/>
<registryCode id="26" code="ASAF" name="Ценные бумаги - свободные"/>
<registryCode id="27" code="ASAB" name="Ценные бумаги - блокированные"/>
<registryCode id="28" code="DMAX" name="Возврат инициатору"/>
<registryCode id="29" code="DMBX" name="Возврат инициатору (кл)"/>
<registryCode id="30" code="DMAU" name="Денежные средства - невыясненные"/>
<registryCode id="1" code="AMAT" name="Денежные средства Участника клиринга, зарезервированные на торги"/>
<registryCode id="2" code="AMAF" name="Денежные средства - свободные"/>
<registryCode id="3" code="AMAB" name="Денежные средства - блокированные"/>
<registryCode id="4" code="TMAT" name="Требования по деньгам"/>
<registryCode id="5" code="OSAT" name="Обязательства по бумагам"/>
<registryCode id="6" code="OMAT" name="Обязательства по деньгам"/>
<registryCode id="7" code="TSAT" name="Требования по бумагам"/>
<registryCode id="8" code="CMAT" name="Рассчитанные требования по деньгам"/>
<registryCode id="9" code="LSAT" name="Рассчитанные обязательства по бумагам"/>
<registryCode id="10" code="LMAT" name="Рассчитанные обязательства по деньгам"/>
<registryCode id="11" code="CSAT" name="Рассчитанные требования по бумагам"/>
<registryCode id="12" code="AMBT" name="Денежные средства Участника клиринга, зарезервированные на торги клиенты"/>
<registryCode id="13" code="AMBF" name="Денежные средства клиента - свободные"/>
<registryCode id="14" code="AMBB" name="Денежные средства клиента - блокированные"/>
<registryCode id="15" code="TMBT" name="Требования по деньгам (кл)"/>
<registryCode id="16" code="OSBT" name="Обязательства по бумагам (кл)"/>
<registryCode id="17" code="OMBT" name="Обязательства по деньгам (кл)"/>
<registryCode id="18" code="TSBT" name="Требования по бумагам (кл)"/>
<registryCode id="19" code="CMBT" name="Рассчитанные требования по деньгам (кл)"/>
<registryCode id="20" code="LSBT" name="Рассчитанные обязательства по бумагам (кл)"/>
<registryCode id="21" code="LMBT" name="Рассчитанные обязательства по деньгам (кл)"/>
<registryCode id="22" code="CSBT" name="Рассчитанные требования по бумагам (кл)"/>
<registryCode id="23" code="DMAT" name="Возврат депозита"/>
<registryCode id="24" code="DMBT" name="Возврат депозита (кл)"/>
<registryCode id="25" code="ASAT" name="Ценные бумаги Участника клиринга свои"/>
<registryCode id="26" code="ASAF" name="Ценные бумаги - свободные"/>
<registryCode id="27" code="ASAB" name="Ценные бумаги - блокированные"/>
<registryCode id="28" code="DMAX" name="Возврат инициатору"/>
<registryCode id="29" code="DMBX" name="Возврат инициатору (кл)"/>
<registryCode id="30" code="DMAU" name="Денежные средства - невыясненные"/>
<registryCode id="31" code="DMAV" name="Треб. выписки"/>
<registryCode id="32" code="ASZT" name="Ценные бумаги для размещения/выкупа"/>
<registryCode id="33" code="ASBT" name="Ценные бумаги Участника клиринга клиенты"/>
<registryCode id="34" code="ASCT" name="Ценные бумаги Участника клиринга клиенты-нерезиденты"/>
<registryCode id="35" code="AMCT" name="Денежные средства Участника клиринга, зарезервированные на торги клиенты"/>
<registryCode id="36" code="ASXT" name="Ценные бумаги Участника клиринга ДУ"/>
<registryStatus id="1" code="OK" name="Рассчитано"/>
<registryStatus id="2" code="UNCV" name="Не исполнено"/>
<registryStatus id="3" code="FAIL" name="Не исполнено контрагентом"/>
@ -219,7 +216,6 @@
<accountType id="8" code="TRAN" name="Транзакционный счет"/>
<accountType id="9" code="DEPO" name="Депозитарный счет"/>
<accountType id="10" code="DTRN" name="Депозитарный транзакционный счет"/>
<accountType id="11" code="CURR" name="Валютный счет"/>
<depoAccountType id="1" code="A" name="Счет участника"/>
<depoAccountType id="2" code="B" name="Счет клиента"/>
<depoAccountType id="3" code="C" name="Счет нерезидента"/>
@ -258,9 +254,6 @@
<task id="27" code="EDEP" name="Время завершения возврата депозитов"/>
<task id="28" code="CHDF" name="Проверка наличия пары ДФ-01/ДФ-57 и ДФ-08/ДФ-21"/>
<task id="29" code="CCLR" name="Завершение неудачных клиринговых сессий"/>
<task id="30" code="CBRR" name="Загрузка кросс-курсов"/>
<task id="31" code="MTCR" name="Формирование файлов с МТКР"/>
<task id="32" code="LIMC" name="Выгрузка в Торговую систему остатков по валюте (отправка lim)"/>
<taskStatus id="1" code="ACTV" name="Активна"/>
<taskStatus id="2" code="BLKD" name="Не активна"/>
<taskStatus id="3" code="CNCL" name="Отмена расписания"/>
@ -269,9 +262,7 @@
<parent id="1" code="TMPL" name="Шаблон"/>
<parent id="2" code="PLNR" name="Расписание"/>
<parent id="3" code="CLND" name="Календарь"/>
<currencySettlementType id="1" code="TOD" name="Поставка сегодня"/>
<majorSign id="1" code="CONV" name="Конвертируемая валюта"/>
<majorSign id="2" code="UNCV" name="Неконвертируемая валюта"/>
<sessionStatus id="1" code="ACTV" name="Сессия активна"/>
<sessionStatus id="2" code="CLRN" name="Идет клиринг"/>
<sessionStatus id="3" code="CLOS" name="Клиринг завершен"/>
@ -295,7 +286,6 @@
<sessionType id="6" code="LIQU" name="Ликвидационное прекращение обязательств"/>
<sessionType id="7" code="IPOB" name="Первичные торги Bn"/>
<sessionType id="8" code="IPO0" name="Первичные торги B0"/>
<sessionType id="9" code="CURR" name="Валютные торги"/>
<moneyFlowSide id="1" code="BUY" name="Привлечь"/>
<moneyFlowSide id="2" code="SELL" name="Разместить"/>
<side id="1" code="B" name="Покупка"/>
@ -333,7 +323,6 @@
<objectType id="4" code="GTWY" name="gateway-api"/>
<objectType id="5" code="ACCA" name="account"/>
<objectType id="6" code="ACCB" name="account"/>
<objectType id="7" code="DIFF" name="registry"/>
<notificationStatus id="1" code="PEND" name="В ожидании"/>
<notificationStatus id="2" code="CNCL" name="Отменено"/>
<notificationStatus id="3" code="ACPT" name="Принято"/>
@ -349,8 +338,6 @@
<courierType id="1" code="STHS" name="ЭДО с Расчетной Организацией"/>
<resultStatus id="1" code="NACK" name="Неуспешно"/>
<resultStatus id="2" code="ACK" name="Успешно"/>
<gatewayResultStatus id="1" code="NACK" name="Неуспешно"/>
<gatewayResultStatus id="2" code="ACK" name="Успешно"/>
<eventType id="1" code="CRET" name="Создание"/>
<eventType id="2" code="UPDT" name="Обновление"/>
<eventType id="3" code="DELT" name="Удаление"/>
@ -422,10 +409,6 @@
<errorCode id="3028" code="CMPN" name="Для клиента %s отстутствует счет ДЕПО."/>
<errorCode id="3029" code="CMPN" name="Для клиента %s отстутствует денежный счет."/>
<errorCode id="3030" code="CMPN" name="Категория %s для компании %s уже добавлена."/>
<errorCode id="3031" code="CMPN" name="Валюта %s уже добавлена."/>
<errorCode id="3032" code="CMPN" name="Параметр компании %s не найден."/>
<errorCode id="3033" code="CMPN" name="По валюте Российской Федерации может выступать только НКО АО ПРЦ."/>
<errorCode id="3034" code="CMPN" name="Компания %s не является расчетной организацией"/>
<!-- error code for report-serivce -->
<errorCode id="4000" code="RPRT" name="Общая ошибка модуля report-serivce."/>
@ -451,9 +434,7 @@
<errorCode id="5022" code="ACNT" name="Для компании %s отсутствует клиринговый код."/>
<errorCode id="5023" code="ACNT" name="Счет %s уже используется."/>
<errorCode id="5024" code="ACNT" name="Не указан номер счета."/>
<errorCode id="5025" code="ACNT" name="Необходимо указать ДЕПО счет."/>
<errorCode id="5026" code="ACNT" name="Счет %S не валютный."/>
<errorCode id="5027" code="ACNT" name="У компании %s отсутствует категория."/>
<errorCode id="5025" code="ACNT" name="Необходимо указать ДЕПО счет."/>
<!-- error code for balance-service -->
<errorCode id="5200" code="BLNC" name="Общая ошибка модуля balance-service."/>
<errorCode id="5210" code="BLNC" name="Клиринговая сессия неактивна."/>
@ -504,11 +485,8 @@
<errorCode id="5432" code="CLRN" name="После сверки обнаружена разница между плановым и фактическим балансом"/>
<errorCode id="5433" code="CLRN" name="Сессия по возврату депозита не может исполняться вне временного интервала, установленного в системе"/>
<errorCode id="5434" code="CLRN" name="Операция невозможна по счету с типом %s."/>
<errorCode id="5435" code="CLRN" name="Сверка входящего остатка по транзакции %s не совпала с регистром %s."/>
<!-- error code for dbf-importer -->
<errorCode id="5600" code="DBFI" name="Общая ошибка модуля dbf-importer."/>
<!-- error code for RgsError -->
<errorCode id="5700" code="CLRN" name="При проверке обязательств во время сессии не найден регистр для хранения активов для инструмента."/>
<!-- error code for dbf-exporter -->
<errorCode id="5800" code="DBFE" name="Общая ошибка модуля dbf-exporter."/>

View file

@ -11,15 +11,83 @@
<!--company id="5" fullName="Центральный Банк Российской Федерации" shortName="ЦБ РФ" tradingCode="" clearingCode="" workflowStatus="ACTV"/-->
<companySymbols id="1" companyId="1" companySymbol="BIC" companySymbolValue="044030920"/>
<companySymbols id="2" companyId="2" companySymbol="BIC" companySymbolValue="044030505"/>
<currency id="643" currencyCode="RUB"/>
<currency id="840" currencyCode="USD"/>
<currency id="978" currencyCode="EUR"/>
<currency id="156" currencyCode="CNY"/>
<currency id="643" currency_code="RUB"/>
<security id="643" instrumentType="CRNC" shortName="RUB" fullName="Российский рубль" securitySymbol="RUB" workflowStatus="ACTV"/>
<security id="840" instrumentType="CRNC" shortName="USD" fullName="Доллар США" securitySymbol="USD" workflowStatus="ACTV"/>
<account id="1" companyId="1" account="30414810300000006000" accountType="TRAN" status="ACTV" processingSign="ALWD"/>
<account id="2" companyId="1" account="30414810600000007000" accountType="ANLT" status="ACTV" processingSign="ALWD"/>
<account id="3" companyId="1" account="700100000AT0" accountType="DTRN" status="ACTV" processingSign="ALWD"/>
<market id="1" marketType="SCND" section="FOND" settlementCurrency="RUB" code="UESC" name="Режим непрерывных торгов" exchangeId="1" description="Режим непрерывных торгов: Обыкновенные акции"/>
<market id="2" marketType="SCND" section="FOND" settlementCurrency="RUB" code="NESC" name="Режим переговорных сделок (РПС)" exchangeId="1" description="Режим переговорных сделок (РПС): Обыкновенные акции"/>
<market id="3" marketType="SCND" section="FOND" settlementCurrency="RUB" code="DESC" name="Дискретный аукцион" exchangeId="1" description="Дискретный аукцион: Обыкновенные акции"/>
<market id="4" marketType="PRMR" section="FOND" settlementCurrency="RUB" code="AESC" name="Размещение: акции (аукцион по цене)" exchangeId="1" description="Размещение: акции (аукцион по цене): Обыкновенные акции"/>
<market id="5" marketType="PRMR" section="FOND" settlementCurrency="RUB" code="WESC" name="Размещение: адресные заявки (подписка)" exchangeId="1" description="Размещение: адресные заявки (подписка): Обыкновенные акции"/>
<market id="6" marketType="SCND" section="FOND" settlementCurrency="RUB" code="UEPC" name="Режим непрерывных торгов" exchangeId="1" description="Режим непрерывных торгов: Привилегированные акции"/>
<market id="7" marketType="SCND" section="FOND" settlementCurrency="RUB" code="NEPC" name="Режим переговорных сделок (РПС)" exchangeId="1" description="Режим переговорных сделок (РПС): Привилегированные акции"/>
<market id="8" marketType="SCND" section="FOND" settlementCurrency="RUB" code="DEPC" name="Дискретный аукцион" exchangeId="1" description="Дискретный аукцион: Привилегированные акции"/>
<market id="9" marketType="PRMR" section="FOND" settlementCurrency="RUB" code="AEPC" name="Размещение: акции (аукцион по цене)" exchangeId="1" description="Размещение: акции (аукцион по цене): Привилегированные акции"/>
<market id="10" marketType="PRMR" section="FOND" settlementCurrency="RUB" code="WEPC" name="Размещение: адресные заявки (подписка)" exchangeId="1" description="Размещение: адресные заявки (подписка): Привилегированные акции"/>
<market id="11" marketType="PRMR" section="FOND" settlementCurrency="RUB" code="ABVC" name="Размещение: Аукцион по цене" exchangeId="1" description="Размещение: Аукцион по цене: Купонные облигации с переменным купоном"/>
<market id="12" marketType="PRMR" section="FOND" settlementCurrency="RUB" code="KBVC" name="Размещение: Аукцион по ставке" exchangeId="1" description="Размещение: Аукцион по ставке: Купонные облигации с переменным купоном"/>
<market id="13" marketType="SCND" section="FOND" settlementCurrency="RUB" code="UBVC" name="Режим непрерывных торгов" exchangeId="1" description="Режим непрерывных торгов: Купонные облигации с переменным купоном"/>
<market id="14" marketType="SCND" section="FOND" settlementCurrency="RUB" code="NBVC" name="Режим переговорных сделок (РПС)" exchangeId="1" description="Режим переговорных сделок (РПС): Купонные облигации с переменным купоном"/>
<market id="15" marketType="SCND" section="FOND" settlementCurrency="RUB" code="DBVC" name="Дискретный аукцион" exchangeId="1" description="Дискретный аукцион: Купонные облигации с переменным купоном"/>
<market id="16" marketType="PRMR" section="FOND" settlementCurrency="RUB" code="WBVC" name="Размещение: адресные заявки (подписка)" exchangeId="1" description="Размещение: адресные заявки (подписка): Купонные облигации с переменным купоном"/>
<market id="17" marketType="PRMR" section="FOND" settlementCurrency="RUB" code="ABFC" name="Размещение: Аукцион по цене" exchangeId="1" description="Размещение: Аукцион по цене: Купонные облигации с постоянным купоном"/>
<market id="18" marketType="PRMR" section="FOND" settlementCurrency="RUB" code="KBFC" name="Размещение: Аукцион по ставке" exchangeId="1" description="Размещение: Аукцион по ставке: Купонные облигации с постоянным купоном"/>
<market id="19" marketType="SCND" section="FOND" settlementCurrency="RUB" code="UBFC" name="Режим непрерывных торгов" exchangeId="1" description="Режим непрерывных торгов: Купонные облигации с постоянным купоном"/>
<market id="20" marketType="SCND" section="FOND" settlementCurrency="RUB" code="NBFC" name="Режим переговорных сделок (РПС)" exchangeId="1" description="Режим переговорных сделок (РПС): Купонные облигации с постоянным купоном"/>
<market id="21" marketType="SCND" section="FOND" settlementCurrency="RUB" code="DBFC" name="Дискретный аукцион" exchangeId="1" description="Дискретный аукцион: Купонные облигации с постоянным купоном"/>
<market id="22" marketType="PRMR" section="FOND" settlementCurrency="RUB" code="WBFC" name="Размещение: адресные заявки (подписка)" exchangeId="1" description="Размещение: адресные заявки (подписка): Купонные облигации с постоянным купоном"/>
<market id="23" marketType="PRMR" section="FOND" settlementCurrency="RUB" code="ABIC" name="Размещение: Аукцион по цене" exchangeId="1" description="Размещение: Аукцион по цене: Облигации с индексированным номиналом"/>
<market id="24" marketType="PRMR" section="FOND" settlementCurrency="RUB" code="KBIC" name="Размещение: Аукцион по ставке" exchangeId="1" description="Размещение: Аукцион по ставке: Облигации с индексированным номиналом"/>
<market id="25" marketType="SCND" section="FOND" settlementCurrency="RUB" code="UBIC" name="Режим непрерывных торгов" exchangeId="1" description="Режим непрерывных торгов: Облигации с индексированным номиналом"/>
<market id="26" marketType="SCND" section="FOND" settlementCurrency="RUB" code="NBIC" name="Режим переговорных сделок (РПС)" exchangeId="1" description="Режим переговорных сделок (РПС): Облигации с индексированным номиналом"/>
<market id="27" marketType="SCND" section="FOND" settlementCurrency="RUB" code="DBIC" name="Дискретный аукцион" exchangeId="1" description="Дискретный аукцион: Облигации с индексированным номиналом"/>
<market id="28" marketType="PRMR" section="FOND" settlementCurrency="RUB" code="WBIC" name="Размещение: адресные заявки (подписка)" exchangeId="1" description="Размещение: адресные заявки (подписка): Облигации с индексированным номиналом"/>
<market id="29" marketType="PRMR" section="FOND" settlementCurrency="RUB" code="ABMC" name="Размещение: Аукцион по цене" exchangeId="1" description="Размещение: Аукцион по цене: Облигации с амортизацией долга"/>
<market id="30" marketType="PRMR" section="FOND" settlementCurrency="RUB" code="KBMC" name="Размещение: Аукцион по ставке" exchangeId="1" description="Размещение: Аукцион по ставке: Облигации с амортизацией долга"/>
<market id="31" marketType="SCND" section="FOND" settlementCurrency="RUB" code="UBMC" name="Режим непрерывных торгов" exchangeId="1" description="Режим непрерывных торгов: Облигации с амортизацией долга"/>
<market id="32" marketType="SCND" section="FOND" settlementCurrency="RUB" code="NBMC" name="Режим переговорных сделок (РПС)" exchangeId="1" description="Режим переговорных сделок (РПС): Облигации с амортизацией долга"/>
<market id="33" marketType="SCND" section="FOND" settlementCurrency="RUB" code="DBMC" name="Дискретный аукцион" exchangeId="1" description="Дискретный аукцион: Облигации с амортизацией долга"/>
<market id="34" marketType="PRMR" section="FOND" settlementCurrency="RUB" code="WBMC" name="Размещение: адресные заявки (подписка)" exchangeId="1" description="Размещение: адресные заявки (подписка): Облигации с амортизацией долга"/>
<market id="35" marketType="PRMR" section="FOND" settlementCurrency="RUB" code="BKVC" name="Размещение: Аукцион БР" exchangeId="1" description="Размещение: Аукцион БР: Облигации Банка России с переменным купоном (КОБР)"/>
<market id="36" marketType="PRMR" section="FOND" settlementCurrency="RUB" code="SKVC" name="Доразмещение: Адресные заявки БР" exchangeId="1" description="Доразмещение: Адресные заявки БР: Облигации Банка России с переменным купоном (КОБР)"/>
<market id="37" marketType="SCND" section="FOND" settlementCurrency="RUB" code="UKVC" name="Режим непрерывных торгов" exchangeId="1" description="Режим непрерывных торгов: Облигации Банка России с переменным купоном (КОБР)"/>
<market id="38" marketType="SCND" section="FOND" settlementCurrency="RUB" code="NKVC" name="Режим переговорных сделок (РПС)" exchangeId="1" description="Режим переговорных сделок (РПС): Облигации Банка России с переменным купоном (КОБР)"/>
<market id="39" marketType="SCND" section="FOND" settlementCurrency="RUB" code="DKVC" name="Дискретный аукцион" exchangeId="1" description="Дискретный аукцион: Облигации Банка России с переменным купоном (КОБР)"/>
<market id="45" marketType="PRMR" section="FOND" settlementCurrency="RUB" code="ABEC" name="Размещение: Аукцион СПВБ" exchangeId="1" description="Размещение: Аукцион СПВБ: Биржевые облигации"/>
<market id="46" marketType="SCND" section="FOND" settlementCurrency="RUB" code="UBEC" name="Режим непрерывных торгов" exchangeId="1" description="Режим непрерывных торгов: Биржевые облигации"/>
<market id="47" marketType="SCND" section="FOND" settlementCurrency="RUB" code="NBEC" name="Режим переговорных сделок (РПС)" exchangeId="1" description="Режим переговорных сделок (РПС): Биржевые облигации"/>
<market id="48" marketType="SCND" section="FOND" settlementCurrency="RUB" code="DBEC" name="Дискретный аукцион" exchangeId="1" description="Дискретный аукцион: Биржевые облигации"/>
<market id="61" marketType="PRMR" section="FOND" settlementCurrency="RUB" code="BMVC" name="ОФЗПК-Размещение: Аукцион БР" exchangeId="1" description="ОФЗПК-Размещение: Аукцион БР: Облигации Минфина"/>
<market id="62" marketType="PRMR" section="FOND" settlementCurrency="RUB" code="SMVC" name="ОФЗПК-Доразмещение: Адресные заявки БР" exchangeId="1" description="ОФЗПК-Доразмещение: Адресные заявки БР: Облигации Минфина"/>
<market id="63" marketType="SCND" section="FOND" settlementCurrency="RUB" code="UMVC" name="ОФЗПК-Режим непрерывных торгов" exchangeId="1" description="ОФЗПК-Режим непрерывных торгов: Облигации Минфина"/>
<market id="64" marketType="SCND" section="FOND" settlementCurrency="RUB" code="DMVC" name="ОФЗПК-Дискретный аукцион" exchangeId="1" description="ОФЗПК-Дискретный аукцион: Облигации Минфина"/>
<market id="65" marketType="SCND" section="FOND" settlementCurrency="RUB" code="MMVC" name="ОФЗПК-Торги в режиме выкупа" exchangeId="1" description="ОФЗПК-Торги в режиме выкупа: Облигации Минфина"/>
<market id="66" marketType="PRMR" section="FOND" settlementCurrency="RUB" code="BMFC" name="ОФЗПД-Размещение: Аукцион БР" exchangeId="1" description="ОФЗПД-Размещение: Аукцион БР: Облигации Минфина"/>
<market id="67" marketType="PRMR" section="FOND" settlementCurrency="RUB" code="SMFC" name="ОФЗПД- Доразмещение: Адресные заявки БР" exchangeId="1" description="ОФЗПД- Доразмещение: Адресные заявки БР: Облигации Минфина"/>
<market id="68" marketType="SCND" section="FOND" settlementCurrency="RUB" code="UMFC" name="ОФЗПД-Режим непрерывных торгов" exchangeId="1" description="ОФЗПД-Режим непрерывных торгов: Облигации Минфина"/>
<market id="69" marketType="SCND" section="FOND" settlementCurrency="RUB" code="DMFC" name="ОФЗПД-Дискретный аукцион" exchangeId="1" description="ОФЗПД-Дискретный аукцион: Облигации Минфина"/>
<market id="70" marketType="SCND" section="FOND" settlementCurrency="RUB" code="MMFC" name="ОФЗПД-Торги в режиме выкупа" exchangeId="1" description="ОФЗПД-Торги в режиме выкупа: Облигации Минфина"/>
<market id="71" marketType="PRMR" section="FOND" settlementCurrency="RUB" code="BMMC" name="ОФЗАД-Размещение: Аукцион БР" exchangeId="1" description="ОФЗАД-Размещение: Аукцион БР: Облигации Минфина"/>
<market id="72" marketType="PRMR" section="FOND" settlementCurrency="RUB" code="SMMC" name="ОФЗАД-Доразмещение: Адресные заявки БР" exchangeId="1" description="ОФЗАД-Доразмещение: Адресные заявки БР: Облигации Минфина"/>
<market id="73" marketType="SCND" section="FOND" settlementCurrency="RUB" code="UMMC" name="ОФЗАД-Режим непрерывных торгов" exchangeId="1" description="ОФЗАД-Режим непрерывных торгов: Облигации Минфина"/>
<market id="74" marketType="SCND" section="FOND" settlementCurrency="RUB" code="DMMC" name="ОФЗАД-Дискретный аукцион" exchangeId="1" description="ОФЗАД-Дискретный аукцион: Облигации Минфина"/>
<market id="75" marketType="SCND" section="FOND" settlementCurrency="RUB" code="MMMC" name="ОФЗАД-Торги в режиме выкупа" exchangeId="1" description="ОФЗАД-Торги в режиме выкупа: Облигации Минфина"/>
<market id="76" marketType="PRMR" section="FOND" settlementCurrency="RUB" code="BMIC" name="ОФЗИН-Размещение: Аукцион БР" exchangeId="1" description="ОФЗИН-Размещение: Аукцион БР: Облигации Минфина"/>
<market id="77" marketType="PRMR" section="FOND" settlementCurrency="RUB" code="SMIC" name="ОФЗИН-Доразмещение: Адресные заявки БР" exchangeId="1" description="ОФЗИН-Доразмещение: Адресные заявки БР: Облигации Минфина"/>
<market id="78" marketType="SCND" section="FOND" settlementCurrency="RUB" code="UMIC" name="ОФЗИН-Режим непрерывных торгов" exchangeId="1" description="ОФЗИН-Режим непрерывных торгов: Облигации Минфина"/>
<market id="79" marketType="SCND" section="FOND" settlementCurrency="RUB" code="DMIC" name="ОФЗИН-Дискретный аукцион" exchangeId="1" description="ОФЗИН-Дискретный аукцион: Облигации Минфина"/>
<market id="80" marketType="SCND" section="FOND" settlementCurrency="RUB" code="MMIC" name="ОФЗИН-Торги в режиме выкупа" exchangeId="1" description="ОФЗИН-Торги в режиме выкупа: Облигации Минфина"/>
<market id="82" marketType="PRMR" section="FOND" settlementCurrency="RUB" code="BBVC" name="ОФЗ-ПК - Аукцион БР" exchangeId="1" description="ОФЗ-ПК - Аукцион БР"/>
<market id="83" marketType="PRMR" section="MKR" settlementCurrency="RUB" code="XMDTATSS" name="СПб ГУП АТС Смольного" exchangeId="1" description="СПб ГУП АТС Смольного"/>
<market id="88" marketType="PRMR" section="MKR" settlementCurrency="RUB" code="XMTTKFSP" name="Комитет финансов СПб" exchangeId="1" description="Комитет финансов СПб"/>
<market id="89" marketType="PRMR" section="MKR" settlementCurrency="RUB" code="XMDSKFLO" name="Комитет финансов ЛО" exchangeId="1" description="Комитет финансов ЛО"/>
<market id="90" marketType="PRMR" section="MKR" settlementCurrency="RUB" code="XMDTFSKB" name="ФСКМБ" exchangeId="1" description="ФСКМБ"/>
<market id="91" marketType="PRMR" section="MKR" settlementCurrency="RUB" code="XMDSFGGE" name="ФАУ ГГЭ" exchangeId="1" description="ФАУ ГГЭ"/>
<market id="92" marketType="PRMR" section="MKR" settlementCurrency="RUB" code="XMDTVRGO" name="ВВО РГО" exchangeId="1" description="ВВО РГО"/>
<market id="93" marketType="PRMR" section="MKR" settlementCurrency="RUB" code="XMDTTDRM" name="ООО Торговый дом РМ-Рейл" exchangeId="1" description="ООО Торговый дом РМ-Рейл"/>
<market id="95" marketType="PRMR" section="MKR" settlementCurrency="RUB" code="XMDTRKFN" name="АО РК Финанс" exchangeId="1" description="АО РК Финанс"/>
</objects>
</meta>

View file

@ -1,46 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<meta version="3.9.0.68">
<enums>
<registryCode id="1" code="AMAT" name="Денежные средства Участника клиринга, зарезервированные на торги"/>
<registryCode id="2" code="AMAF" name="Денежные средства - свободные"/>
<registryCode id="3" code="AMAB" name="Денежные средства - блокированные"/>
<registryCode id="4" code="TMAT" name="Требования по деньгам"/>
<registryCode id="5" code="OSAT" name="Обязательства по бумагам"/>
<registryCode id="6" code="OMAT" name="Обязательства по деньгам"/>
<registryCode id="7" code="TSAT" name="Требования по бумагам"/>
<registryCode id="8" code="CMAT" name="Рассчитанные требования по деньгам"/>
<registryCode id="9" code="LSAT" name="Рассчитанные обязательства по бумагам"/>
<registryCode id="10" code="LMAT" name="Рассчитанные обязательства по деньгам"/>
<registryCode id="11" code="CSAT" name="Рассчитанные требования по бумагам"/>
<registryCode id="12" code="AMBT" name="Денежные средства Участника клиринга, зарезервированные на торги клиенты"/>
<registryCode id="13" code="AMBF" name="Денежные средства клиента - свободные"/>
<registryCode id="14" code="AMBB" name="Денежные средства клиента - блокированные"/>
<registryCode id="15" code="TMBT" name="Требования по деньгам (кл)"/>
<registryCode id="16" code="OSBT" name="Обязательства по бумагам (кл)"/>
<registryCode id="17" code="OMBT" name="Обязательства по деньгам (кл)"/>
<registryCode id="18" code="TSBT" name="Требования по бумагам (кл)"/>
<registryCode id="19" code="CMBT" name="Рассчитанные требования по деньгам (кл)"/>
<registryCode id="20" code="LSBT" name="Рассчитанные обязательства по бумагам (кл)"/>
<registryCode id="21" code="LMBT" name="Рассчитанные обязательства по деньгам (кл)"/>
<registryCode id="22" code="CSBT" name="Рассчитанные требования по бумагам (кл)"/>
<registryCode id="23" code="DMAT" name="Возврат депозита"/>
<registryCode id="24" code="DMBT" name="Возврат депозита (кл)"/>
<registryCode id="25" code="ASAT" name="Ценные бумаги Участника клиринга свои"/>
<registryCode id="26" code="ASAF" name="Ценные бумаги - свободные"/>
<registryCode id="27" code="ASAB" name="Ценные бумаги - блокированные"/>
<registryCode id="28" code="DMAX" name="Возврат инициатору"/>
<registryCode id="29" code="DMBX" name="Возврат инициатору (кл)"/>
<registryCode id="30" code="DMAU" name="Денежные средства - невыясненные"/>
<registryCode id="31" code="DMAV" name="Треб. выписки"/>
<registryCode id="32" code="ASZT" name="Ценные бумаги для размещения/выкупа"/>
<registryCode id="33" code="ASBT" name="Ценные бумаги Участника клиринга клиенты"/>
<registryCode id="34" code="ASCT" name="Ценные бумаги Участника клиринга клиенты-нерезиденты"/>
<registryCode id="35" code="AMCT" name="Денежные средства Участника клиринга, зарезервированные на торги клиенты"/>
<registryCode id="36" code="ASXT" name="Ценные бумаги Участника клиринга ДУ"/>
</enums>
<objects>
</objects>
</meta>

View file

@ -1,98 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<meta version="3.11.0.78">
<enums>
</enums>
<objects>
<market id="1" code="ABEC" section="FOND" marketType="PRMR" settlementCurrency="RUB" name="Размещение: Аукцион СПВБ" description="Размещение: Аукцион СПВБ"/>
<market id="2" code="AEPC" section="FOND" marketType="PRMR" settlementCurrency="RUB" name="Размещение: акции (аукцион по цене)" description="Размещение: акции (аукцион по цене)"/>
<market id="3" code="AESC" section="FOND" marketType="PRMR" settlementCurrency="RUB" name="Размещение: акции (аукцион по цене)" description="Размещение: акции (аукцион по цене)"/>
<market id="4" code="ABFC" section="FOND" marketType="PRMR" settlementCurrency="RUB" name="СПВБ: Обл. с ПД-Аукцион" description="СПВБ: Обл. с ПД-Аукцион"/>
<market id="5" code="ABIC" section="FOND" marketType="PRMR" settlementCurrency="RUB" name="СПВБ: Обл. с ИН - Аукцион" description="СПВБ: Обл. с ИН - Аукцион"/>
<market id="6" code="ABMC" section="FOND" marketType="PRMR" settlementCurrency="RUB" name="СПВБ: Обл. с АД - Аукцион" description="СПВБ: Обл. с АД - Аукцион"/>
<market id="7" code="ABVC" section="FOND" marketType="PRMR" settlementCurrency="RUB" name="СПВБ: Обл. с ПК - Аукцион" description="СПВБ: Обл. с ПК - Аукцион"/>
<market id="8" code="BKVC" section="FOND" marketType="PRMR" settlementCurrency="RUB" name="Размещение: Аукцион БР" description="Размещение: Аукцион БР"/>
<market id="9" code="BMFC" section="FOND" marketType="PRMR" settlementCurrency="RUB" name="ОФЗПД-Размещение: Аукцион" description="ОФЗПД-Размещение: Аукцион"/>
<market id="10" code="BMIC" section="FOND" marketType="PRMR" settlementCurrency="RUB" name="ОФЗИН-Размещение: Аукцион" description="ОФЗИН-Размещение: Аукцион"/>
<market id="11" code="BMMC" section="FOND" marketType="PRMR" settlementCurrency="RUB" name="ОФЗАД-Размещение: Аукцион" description="ОФЗАД-Размещение: Аукцион"/>
<market id="12" code="BMVC" section="FOND" marketType="PRMR" settlementCurrency="RUB" name="ОФЗПК-Размещение: Аукцион" description="ОФЗПК-Размещение: Аукцион"/>
<market id="13" code="DBEC" section="FOND" marketType="SCND" settlementCurrency="RUB" name="Дискретный аукцион" description="Дискретный аукцион"/>
<market id="14" code="DBFC" section="FOND" marketType="SCND" settlementCurrency="RUB" name="Дискретный аукцион" description="Дискретный аукцион"/>
<market id="15" code="DBIC" section="FOND" marketType="SCND" settlementCurrency="RUB" name="Дискретный аукцион" description="Дискретный аукцион"/>
<market id="16" code="DBMC" section="FOND" marketType="SCND" settlementCurrency="RUB" name="Дискретный аукцион" description="Дискретный аукцион"/>
<market id="17" code="DBVC" section="FOND" marketType="SCND" settlementCurrency="RUB" name="Дискретный аукцион" description="Дискретный аукцион"/>
<market id="18" code="DEPC" section="FOND" marketType="SCND" settlementCurrency="RUB" name="Дискретный аукцион" description="Дискретный аукцион"/>
<market id="19" code="DESC" section="FOND" marketType="SCND" settlementCurrency="RUB" name="Дискретный аукцион" description="Дискретный аукцион"/>
<market id="20" code="DKVC" section="FOND" marketType="SCND" settlementCurrency="RUB" name="Дискретный аукцион" description="Дискретный аукцион"/>
<market id="21" code="DMFC" section="FOND" marketType="SCND" settlementCurrency="RUB" name="ОФЗПД-Дискретный аукцион" description="ОФЗПД-Дискретный аукцион"/>
<market id="22" code="DMIC" section="FOND" marketType="SCND" settlementCurrency="RUB" name="ОФЗИН-Дискретный аукцион" description="ОФЗИН-Дискретный аукцион"/>
<market id="23" code="DMMC" section="FOND" marketType="SCND" settlementCurrency="RUB" name="ОФЗАД-Дискретный аукцион" description="ОФЗАД-Дискретный аукцион"/>
<market id="24" code="DMVC" section="FOND" marketType="SCND" settlementCurrency="RUB" name="ОФЗПК-Дискретный аукцион" description="ОФЗПК-Дискретный аукцион"/>
<market id="25" code="KBFC" section="FOND" marketType="PRMR" settlementCurrency="RUB" name="Размещение: Аукцион по ставке" description="Размещение: Аукцион по ставке"/>
<market id="26" code="KBIC" section="FOND" marketType="PRMR" settlementCurrency="RUB" name="Размещение: Аукцион по ставке" description="Размещение: Аукцион по ставке"/>
<market id="27" code="KBMC" section="FOND" marketType="PRMR" settlementCurrency="RUB" name="Размещение: Аукцион по ставке" description="Размещение: Аукцион по ставке"/>
<market id="28" code="KBVC" section="FOND" marketType="PRMR" settlementCurrency="RUB" name="Размещение: Аукцион по ставке" description="Размещение: Аукцион по ставке"/>
<market id="29" code="PMFC" section="FOND" marketType="PRMR" settlementCurrency="RUB" name="ОФЗПД-Торги в режиме выкупа" description="ОФЗПД-Торги в режиме выкупа"/>
<market id="30" code="PMIC" section="FOND" marketType="PRMR" settlementCurrency="RUB" name="ОФЗИН-Торги в режиме выкупа" description="ОФЗИН-Торги в режиме выкупа"/>
<market id="31" code="PMMC" section="FOND" marketType="PRMR" settlementCurrency="RUB" name="ОФЗАД-Торги в режиме выкупа" description="ОФЗАД-Торги в режиме выкупа"/>
<market id="32" code="PMVC" section="FOND" marketType="PRMR" settlementCurrency="RUB" name="ОФЗПК-Торги в режиме выкупа" description="ОФЗПК-Торги в режиме выкупа"/>
<market id="33" code="NBEC" section="FOND" marketType="SCND" settlementCurrency="RUB" name="Режим переговорных сделок (РПС)" description="Режим переговорных сделок (РПС)"/>
<market id="34" code="NBFC" section="FOND" marketType="SCND" settlementCurrency="RUB" name="Режим переговорных сделок (РПС)" description="Режим переговорных сделок (РПС)"/>
<market id="35" code="NBIC" section="FOND" marketType="SCND" settlementCurrency="RUB" name="Режим переговорных сделок (РПС)" description="Режим переговорных сделок (РПС)"/>
<market id="36" code="NBMC" section="FOND" marketType="SCND" settlementCurrency="RUB" name="Режим переговорных сделок (РПС)" description="Режим переговорных сделок (РПС)"/>
<market id="37" code="NBVC" section="FOND" marketType="SCND" settlementCurrency="RUB" name="Режим переговорных сделок (РПС)" description="Режим переговорных сделок (РПС)"/>
<market id="38" code="NEPC" section="FOND" marketType="SCND" settlementCurrency="RUB" name="Режим переговорных сделок (РПС)" description="Режим переговорных сделок (РПС)"/>
<market id="39" code="NESC" section="FOND" marketType="SCND" settlementCurrency="RUB" name="Режим переговорных сделок (РПС)" description="Режим переговорных сделок (РПС)"/>
<market id="40" code="NKVC" section="FOND" marketType="SCND" settlementCurrency="RUB" name="Режим переговорных сделок (РПС)" description="Режим переговорных сделок (РПС)"/>
<market id="41" code="SBFC" section="FOND" marketType="PRMR" settlementCurrency="RUB" name="СПВБ: Обл. с ПД - Доразмещение" description="СПВБ: Обл. с ПД - Доразмещение"/>
<market id="42" code="SBIC" section="FOND" marketType="PRMR" settlementCurrency="RUB" name="СПВБ: Обл. с ИН - Доразмещение" description="СПВБ: Обл. с ИН - Доразмещение"/>
<market id="43" code="SBMC" section="FOND" marketType="PRMR" settlementCurrency="RUB" name="СПВБ: Обл. с АД -Доразмещение" description="СПВБ: Обл. с АД -Доразмещение"/>
<market id="44" code="SBVC" section="FOND" marketType="PRMR" settlementCurrency="RUB" name="СПВБ: Обл. с ПК-Доразмещение" description="СПВБ: Обл. с ПК-Доразмещение"/>
<market id="45" code="SKVC" section="FOND" marketType="PRMR" settlementCurrency="RUB" name="Доразмещение: Адресные заявки БР" description="Доразмещение: Адресные заявки БР"/>
<market id="46" code="SMFC" section="FOND" marketType="PRMR" settlementCurrency="RUB" name="ОФЗПД- Доразмещение: Адресные заявки" description="ОФЗПД- Доразмещение: Адресные заявки"/>
<market id="47" code="SMIC" section="FOND" marketType="PRMR" settlementCurrency="RUB" name="ОФЗИН-Доразмещение: Адресные заявки" description="ОФЗИН-Доразмещение: Адресные заявки"/>
<market id="48" code="SMMC" section="FOND" marketType="PRMR" settlementCurrency="RUB" name="ОФЗАД-Доразмещение: Адресные заявки" description="ОФЗАД-Доразмещение: Адресные заявки"/>
<market id="49" code="SMVC" section="FOND" marketType="PRMR" settlementCurrency="RUB" name="ОФЗПК-Доразмещение: Адресные заявки" description="ОФЗПК-Доразмещение: Адресные заявки"/>
<market id="50" code="UBEC" section="FOND" marketType="SCND" settlementCurrency="RUB" name="Режим непрерывных торгов" description="Режим непрерывных торгов"/>
<market id="51" code="UBFC" section="FOND" marketType="SCND" settlementCurrency="RUB" name="СПВБ: Обл. с ПД - Торги" description="СПВБ: Обл. с ПД - Торги"/>
<market id="52" code="UBIC" section="FOND" marketType="SCND" settlementCurrency="RUB" name="СПВБ: Обл. с ИН - Торги" description="СПВБ: Обл. с ИН - Торги"/>
<market id="53" code="UBMC" section="FOND" marketType="SCND" settlementCurrency="RUB" name="СПВБ: Обл. с АД - Торги" description="СПВБ: Обл. с АД - Торги"/>
<market id="54" code="UBVC" section="FOND" marketType="SCND" settlementCurrency="RUB" name="СПВБ: Обл. с ПК - Торги" description="СПВБ: Обл. с ПК - Торги"/>
<market id="55" code="UEPC" section="FOND" marketType="SCND" settlementCurrency="RUB" name="Режим непрерывных торгов" description="Режим непрерывных торгов"/>
<market id="56" code="UESC" section="FOND" marketType="SCND" settlementCurrency="RUB" name="СПВБ: Акции Торги" description="СПВБ: Акции Торги"/>
<market id="57" code="UKVC" section="FOND" marketType="SCND" settlementCurrency="RUB" name="Режим непрерывных торгов" description="Режим непрерывных торгов"/>
<market id="58" code="UMFC" section="FOND" marketType="SCND" settlementCurrency="RUB" name="ОФЗПД-Режим непрерывных торгов" description="ОФЗПД-Режим непрерывных торгов"/>
<market id="59" code="UMIC" section="FOND" marketType="SCND" settlementCurrency="RUB" name="ОФЗИН-Режим непрерывных торгов" description="ОФЗИН-Режим непрерывных торгов"/>
<market id="60" code="UMMC" section="FOND" marketType="SCND" settlementCurrency="RUB" name="ОФЗАД-Режим непрерывных торгов" description="ОФЗАД-Режим непрерывных торгов"/>
<market id="61" code="UMVC" section="FOND" marketType="SCND" settlementCurrency="RUB" name="ОФЗПК-Режим непрерывных торгов" description="ОФЗПК-Режим непрерывных торгов"/>
<market id="62" code="WBFC" section="FOND" marketType="PRMR" settlementCurrency="RUB" name="Размещение: адресные заявки (подписка)" description="Размещение: адресные заявки (подписка)"/>
<market id="63" code="WBIC" section="FOND" marketType="PRMR" settlementCurrency="RUB" name="Размещение: адресные заявки (подписка)" description="Размещение: адресные заявки (подписка)"/>
<market id="64" code="WBMC" section="FOND" marketType="PRMR" settlementCurrency="RUB" name="Размещение: адресные заявки (подписка)" description="Размещение: адресные заявки (подписка)"/>
<market id="65" code="WBVC" section="FOND" marketType="PRMR" settlementCurrency="RUB" name="Размещение: адресные заявки (подписка)" description="Размещение: адресные заявки (подписка)"/>
<market id="66" code="WEPC" section="FOND" marketType="PRMR" settlementCurrency="RUB" name="Размещение: адресные заявки (подписка)" description="Размещение: адресные заявки (подписка)"/>
<market id="67" code="WESC" section="FOND" marketType="PRMR" settlementCurrency="RUB" name="Размещение: адресные заявки (подписка)" description="Размещение: адресные заявки (подписка)"/>
<market id="68" code="ABZC" section="FOND" marketType="PRMR" settlementCurrency="RUB" name="СПВБ: Диск. обл. - Аукцион" description="СПВБ: Диск. обл. - Аукцион"/>
<market id="69" code="SBZC" section="FOND" marketType="PRMR" settlementCurrency="RUB" name="СПВБ: Диск. обл.-Доразмещение" description="СПВБ: Диск. обл.-Доразмещение"/>
<market id="70" code="UBZC" section="FOND" marketType="PRMR" settlementCurrency="RUB" name="СПВБ: Диск. обл. - Торги" description="СПВБ: Диск. обл. - Торги"/>
<market id="71" code="NBZC" section="FOND" marketType="PRMR" settlementCurrency="RUB" name="СПВБ: Диск. обл. - РПС" description="СПВБ: Диск. обл. - РПС"/>
<market id="72" code="DBZC" section="FOND" marketType="PRMR" settlementCurrency="RUB" name="СПВБ: Диск. обл. - Дискретный аукцион" description="СПВБ: Диск. обл. - Дискретный аукцион"/>
<market id="73" code="WBZC" section="FOND" marketType="PRMR" settlementCurrency="RUB" name="СПВБ: Диск. обл. - адресные заявки (подписка)" description="СПВБ: Диск. обл. - адресные заявки (подписка)"/>
<market id="74" code="XMDTATSS" section="MKR" marketType="PRMR" settlementCurrency="RUB" name="Размещение: депозитный аукцион" description="Размещение: депозитный аукцион"/>
<market id="75" code="XMDTAVGB" section="MKR" marketType="PRMR" settlementCurrency="RUB" name="Размещение: депозитный аукцион" description="Размещение: депозитный аукцион"/>
<market id="76" code="XMDTFSKB" section="MKR" marketType="PRMR" settlementCurrency="RUB" name="Размещение: депозитный аукцион" description="Размещение: депозитный аукцион"/>
<market id="77" code="XMDTKFLO" section="MKR" marketType="PRMR" settlementCurrency="RUB" name="Размещение: депозитный аукцион" description="Размещение: депозитный аукцион"/>
<market id="78" code="XMDTKFSP" section="MKR" marketType="PRMR" settlementCurrency="RUB" name="Размещение: депозитный аукцион" description="Размещение: депозитный аукцион"/>
<market id="79" code="XMNTFSKB" section="MKR" marketType="PRMR" settlementCurrency="RUB" name="Депозитные торги (аукцион)" description="Депозитные торги (аукцион)"/>
<market id="80" code="XMNTKFLO" section="MKR" marketType="PRMR" settlementCurrency="RUB" name="Депозитные торги (аукцион)" description="Депозитные торги (аукцион)"/>
<market id="81" code="XMNTKFSP" section="MKR" marketType="PRMR" settlementCurrency="RUB" name="Депозитные торги (аукцион)" description="Депозитные торги (аукцион)"/>
<market id="82" code="XMDSFSKB" section="MKR" marketType="PRMR" settlementCurrency="RUB" name="Размещение: депозитный аукцион" description="Размещение: депозитный аукцион"/>
<market id="83" code="XMDSKFLO" section="MKR" marketType="PRMR" settlementCurrency="RUB" name="Размещение: депозитный аукцион" description="Размещение: депозитный аукцион"/>
<market id="84" code="XMDSKFSP" section="MKR" marketType="PRMR" settlementCurrency="RUB" name="Размещение: депозитный аукцион" description="Размещение: депозитный аукцион"/>
<market id="85" code="XMTTKFSP" section="MKR" marketType="PRMR" settlementCurrency="RUB" name="Размещение: депозитные торги" description="Размещение: депозитные торги"/>
<market id="86" code="XMNSKFLO" section="MKR" marketType="PRMR" settlementCurrency="RUB" name="Депозитные торги (аукцион)" description="Депозитные торги (аукцион)"/>
<market id="96" marketType="PRMR" section="CURR" settlementCurrency="RUB" code="UVAV" name="Двусторонний непрерывный аукцион" exchangeId="1" description="Двусторонний непрерывный аукцион (TOD)"/>
<market id="97" marketType="PRMR" section="CURR" settlementCurrency="RUB" code="NVAV" name="Режим адресных сделок с клирингом и расчетами на СПВБ" exchangeId="1" description="Режим адресных сделок с клирингом и расчетами на СПВБ (TOD)"/>
</objects>
</meta>

File diff suppressed because it is too large Load diff

View file

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--?xml-stylesheet type="text/xsl" href="\..\corp-reports\src\data\meta\meta.server.xslt"?-->
<meta version="3.11.0.90">
<meta version="3.9.0.71">
<!-- _xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" _xsi:noNamespaceSchemaLocation="file:///E:/d/projects/meta/from/meta.xsd" -->
<!--Здесь словари-->
<enums>
@ -105,6 +105,7 @@
<code name="Код облигации" shortname="Код" type="12"/>
<name name="Наименование" shortname="Тип" type="2" length="255"/>
</bondType>
<tradingClearingRegistryType name="Справочник типов торгово-клиринговых регистров" class="com.spicex.dictionary.TradingClearingRegistryTypeDictionary" table="trading_clearing_registry_type_dictionary">
<id name="Идентификатор записи" shortname="ID" type="1"/>
<code name="Код" shortname="Код" type="12"/>
@ -185,26 +186,26 @@
<code name="Код" shortname="Код" type="12"/>
<name name="Наименование" shortname="Наименование" type="2" length="255"/>
</clearingAccountType>
<task name="Справочник задач" class="com.spicex.dictionary.TaskDictionary" table="task_dictionary">
<id name="Идентификатор записи" shortname="ID" type="1"/>
<task name="Справочник задач" class="com.spicex.dictionary.TaskDictionary" table="task_dictionary">
<id name="Идентификатор записи" shortname="ID" type="1"/>
<code name="Код" shortname="Код" type="12"/>
<name name="Задача" shortname="Задача" type="2" length="150"/>
</task>
<taskStatus name="Справочник статусов задач" class="com.spicex.dictionary.TaskStatusDictionary" table="task_status_dictionary">
<id name="Идентификатор записи" shortname="ID" type="1"/>
<code name="Код" shortname="Код" type="12"/>
<name name="Задача" shortname="Задача" type="2" length="150"/>
</task>
<taskStatus name="Справочник статусов задач" class="com.spicex.dictionary.TaskStatusDictionary" table="task_status_dictionary">
<id name="Идентификатор записи" shortname="ID" type="1"/>
<name name="Статус задачи" shortname="Статус" type="2" length="50"/>
</taskStatus>
<dayStatus name="Справочник статусов дней" class="ru.clearing.platform.dictionary.DayStatusDictionary" table="day_status_dictionary">
<id name="Идентификатор записи" shortname="ID" type="1"/>
<code name="Код" shortname="Код" type="12"/>
<name name="Статус задачи" shortname="Статус" type="2" length="50"/>
</taskStatus>
<dayStatus name="Справочник статусов дней" class="ru.clearing.platform.dictionary.DayStatusDictionary" table="day_status_dictionary">
<id name="Идентификатор записи" shortname="ID" type="1"/>
<name name="Статус дня" shortname="Статус" type="2" length="50"/>
</dayStatus>
<parent name="Справочник источников" class="com.spicex.dictionary.ParentDictionary" table="parent_dictionary">
<id name="Идентификатор записи" shortname="ID" type="1"/>
<code name="Код" shortname="Код" type="12"/>
<name name="Статус дня" shortname="Статус" type="2" length="50"/>
</dayStatus>
<parent name="Справочник источников" class="com.spicex.dictionary.ParentDictionary" table="parent_dictionary">
<id name="Идентификатор записи" shortname="ID" type="1"/>
<code name="Код" shortname="Код" type="12"/>
<name name="Наименование" shortname="Источник" type="2" length="50"/>
</parent>
<name name="Наименование" shortname="Источник" type="2" length="50"/>
</parent>
<sessionStatus name="Справочник статусов клиринговых сессий" class="ru.clearing.platform.dictionary.SessionStatusDictionary" table="session_status_dictionary">
<id name="Идентификатор" shortname="ID" type="1"/>
@ -262,11 +263,11 @@
<code name="Код" shortname="Код" type="12"/>
<name name="Значение" shortname="Значение" type="2" length="255"/>
</inOutDirection>
<transactionStatus name="Справочник статусов транзакций" class="com.spicex.dictionary.TransactionStatusDictionary" table="transaction_status_dictionary">
<id name="Идентификатор записи" shortname="ID" type="1"/>
<transactionStatus name="Справочник статусов транзакций" class="com.spicex.dictionary.TransactionStatusDictionary" table="transaction_status_dictionary">
<id name="Идентификатор записи" shortname="ID" type="1"/>
<code name="Код" shortname="Код" type="12"/>
<name name="Статус транзакции" shortname="Статус" type="2" length="50"/>
</transactionStatus>
<name name="Статус транзакции" shortname="Статус" type="2" length="50"/>
</transactionStatus>
<objectType name="Справочник типов объектов" class="ru.clearing.platform.dictionary.ObjectTypeDictionary" table="object_type_dictionary">
<id name="Идентификатор" shortname="ID" type="1"/>
<code name="Код" shortname="Код" type="12"/>
@ -292,33 +293,11 @@
<code name="Код" shortname="Код" type="12"/>
<name name="Статус сообщения" shortname="Наименование" type="2" length="50"/>
</managementJournalStatus>
<majorSign name="Справочник типов конвертируемости валюты" class="ru.clearing.platform.dictionary.MajorSign" table="major_sign">
<id name="Идентификатор" shortname="ID" type="1"/>
<code name="Код" shortname="Код" type="12"/>
<name name="Наименование типа" shortname="Наименование" type="2" length="50"/>
</majorSign>
<courierType name="Справочник способов доставки документа" class="ru.clearing.platform.dictionary.CourierTypeDictionary" table="courier_type_dictionary">
<id name="Идентификатор" shortname="ID" type="1"/>
<code name="Код" shortname="Код" type="12"/>
<name name="Способ доставки" shortname="Способ доставки" type="2" length="50"/>
</courierType>
<currencySettlementType name="Справочник типов расчетов валютных пар" class="ru.clearing.platform.dictionary.CurrencySettlementType" table="currency_settlement_type">
<id name="Идентификатор" shortname="ID" type="1"/>
<code name="Код" shortname="Код" type="12"/>
<name name="Тип расчета" shortname="Тип расчета" type="2" length="50"/>
</currencySettlementType>
<currencyPair name="Справочник валютных пар" class="ru.clearing.platform.dictionary.CurrencyPairDictionary" table="currency_pair">
<id name="Идентификатор" shortname="ID" type="1"/>
<code name="Код" shortname="Код" type="2" length="25"/>
<baseCurrency name="Код валюты лота" shortname="Валюта лота" link="currencyCode" type="12"/>
<quoteCurrency name="Код сопряженной валюты" shortname="Сопряженная валюта" link="currencyCode" type="12"/>
<majorSign name="Код признака конвертируемости валюты" shortname="Конвертируемость валюты" link="majorSign" type="12"/>
</currencyPair>
<gatewayResultStatus name="Справочник статусов обработки" class="ru.clearing.platform.dictionary.GatewayResultStatusDictionary" table="gateway_result_status">
<id name="Идентификатор записи" shortname="ID" type="1"/>
<code name="Код" shortname="Код" type="12"/>
<name name="Статус обработки" shortname="Статус" type="2" length="255"/>
</gatewayResultStatus>
<courierType name="Справочник способов доставки документа" class="ru.clearing.platform.dictionary.CourierTypeDictionary" table="courier_type_dictionary">
<id name="Идентификатор" shortname="ID" type="1"/>
<code name="Код" shortname="Код" type="12"/>
<name name="Способ доставки" shortname="Способ доставки" type="2" length="50"/>
</courierType>
<resultStatus name="Справочник статусов обработки" class="ru.clearing.platform.dictionary.ResultStatusDictionary" table="result_status_dictionary">
<id name="Идентификатор записи" shortname="ID" type="1"/>
<code name="Код" shortname="Код" type="12"/>
@ -336,61 +315,61 @@
</priority>
</enums>
<objects>
<dbVersion name="Версия базы данных" destination="db-versions" class="" table="db_version">
<id type="1" name="Идентификатор записи" shortname="ID" searchable="true" sortable="true" visible="true"/>
<version type="2" length="50" name="Версия базы данных, привязанная к релизу" shortname="Версия БД" searchable="true" sortable="true" visible="true"/>
</dbVersion>
<userCls name="Пользователь" destination="users" class="ru.clearing.classes.statics.data.user.User" logUpdates="true" table="user_cls">
<id type="1" name="Идентификатор записи" shortname="ID" searchable="true" sortable="true"/>
<createdAt field="created" type="4" webtype="5" dbname="Дата-время создания записи" name="Время создания записи" shortname="Создано" searchable="true" sortable="true"/>
<updatedAt field="updated" type="4" webtype="5" dbname="Дата-время изменения записи" name="Время изменения записи" shortname="Изменено" searchable="true" sortable="true"/>
<identifier type="2" length="250" name="Внешний идентификатор" shortname="Идентификатор" searchable="true" sortable="true" visible="true"/>
<name type="2" length="250" name="Имя и фамилия пользователя" shortname="Имя и фамилия" searchable="true" sortable="true" visible="true"/>
<firstName type="2" length="250" name="Имя пользователя" shortname="Имя" searchable="true" sortable="true" visible="true"/>
<lastName type="2" length="250" name="Фамилия пользователя" shortname="Фамилия" searchable="true" sortable="true" visible="true"/>
<middleName type="2" length="250" name="Отчество пользователя" shortname="Отчество" searchable="true" sortable="true" visible="true"/>
<email type="2" length="250" name="Email пользователя" shortname="Email" searchable="true" sortable="true" visible="true"/>
<actions>
<dbVersion name="Версия базы данных" destination="db-versions" class="" table="db_version">
<id type="1" name="Идентификатор записи" shortname="ID" searchable="true" sortable="true" visible="true"/>
<version type="2" length="50" name="Версия базы данных, привязанная к релизу" shortname="Версия БД" searchable="true" sortable="true" visible="true"/>
</dbVersion>
<userCls name="Пользователь" destination="users" class="ru.clearing.classes.statics.data.user.User" logUpdates="true" table="user_cls">
<id type="1" name="Идентификатор записи" shortname="ID" searchable="true" sortable="true"/>
<createdAt field="created" type="4" webtype="5" dbname="Дата-время создания записи" name="Время создания записи" shortname="Создано" searchable="true" sortable="true"/>
<updatedAt field="updated" type="4" webtype="5" dbname="Дата-время изменения записи" name="Время изменения записи" shortname="Изменено" searchable="true" sortable="true"/>
<identifier type="2" length="250" name="Внешний идентификатор" shortname="Идентификатор" searchable="true" sortable="true" visible="true"/>
<name type="2" length="250" name="Имя и фамилия пользователя" shortname="Имя и фамилия" searchable="true" sortable="true" visible="true"/>
<firstName type="2" length="250" name="Имя пользователя" shortname="Имя" searchable="true" sortable="true" visible="true"/>
<lastName type="2" length="250" name="Фамилия пользователя" shortname="Фамилия" searchable="true" sortable="true" visible="true"/>
<middleName type="2" length="250" name="Отчество пользователя" shortname="Отчество" searchable="true" sortable="true" visible="true"/>
<email type="2" length="250" name="Email пользователя" shortname="Email" searchable="true" sortable="true" visible="true"/>
<actions>
<put name="Авторизация пользователя">
<userName type="2" length="255" name="Логин пользователя" required="true"/>
<roles type="2" length="255" name="Роли пользователя" required="false"/>
</put>
</actions>
</userCls>
<userRoleSession name="Набор ролей" destination="user-role-sessions" class="ru.clearing.classes.statics.data.user.UserRoleSession" table="user_role_session">
<id type="1" name="Идентификатор записи" shortname="ID" searchable="true" sortable="true"/>
<userId type="1" dbname="Идентификатор пользователя" name="Имя и фамилия пользователя" shortname="Пользователь" searchable="true" sortable="true" visible="true" link="userCls" linkCode="identifier"/>
<userRole type="12" dbname="Код роли пользователя" name="Роль пользователя" shortname="Роль" searchable="true" sortable="true" visible="true" link="userRole"/>
<companyId type="1" dbname="Идентификатор компании" name="Наименование компании" shortname="Компания" searchable="true" sortable="true" visible="true" link="company"/>
</actions>
</userCls>
<userRoleSession name="Набор ролей" destination="user-role-sessions" class="ru.clearing.classes.statics.data.user.UserRoleSession" table="user_role_session">
<id type="1" name="Идентификатор записи" shortname="ID" searchable="true" sortable="true"/>
<userId type="1" dbname="Идентификатор пользователя" name="Имя и фамилия пользователя" shortname="Пользователь" searchable="true" sortable="true" visible="true" link="userCls" linkCode="identifier"/>
<userRole type="12" dbname="Код роли пользователя" name="Роль пользователя" shortname="Роль" searchable="true" sortable="true" visible="true" link="userRole"/>
<companyId type="1" dbname="Идентификатор компании" name="Наименование компании" shortname="Компания" searchable="true" sortable="true" visible="true" link="company"/>
<status type="12" dbname="Код статуса" name="Наименование статуса" shortname="Статус" searchable="true" sortable="true" link="workflowStatus"/>
</userRoleSession>
<userSettings name="Настройки пользователя" destination="utilities/user-settings" class="ru.clearing.classes.statics.data.user.UserSettings" table="user_settings">
<id type="1" name="Идентификатор записи" shortname="ID" searchable="true" sortable="true"/>
<userId type="1" dbname="Идентификатор пользователя" name="Имя и фамилия пользователя" shortname="Пользователь" searchable="true" sortable="true" visible="true" link="userCls" linkCode="identifier"/>
<version type="2" length="50" name="Версия настроек пользователя" shortname="Версия" searchable="false" sortable="false" visible="true"/>
<json type="2" length="200000" name="Данные конфигурации" shortname="Настройки" searchable="false" sortable="false" visible="true"/>
<actions>
</userRoleSession>
<userSettings name="Настройки пользователя" destination="utilities/user-settings" class="ru.clearing.classes.statics.data.user.UserSettings" table="user_settings">
<id type="1" name="Идентификатор записи" shortname="ID" searchable="true" sortable="true"/>
<userId type="1" dbname="Идентификатор пользователя" name="Имя и фамилия пользователя" shortname="Пользователь" searchable="true" sortable="true" visible="true" link="userCls" linkCode="identifier"/>
<version type="2" length="50" name="Версия настроек пользователя" shortname="Версия" searchable="false" sortable="false" visible="true"/>
<json type="2" length="200000" name="Данные конфигурации" shortname="Настройки" searchable="false" sortable="false" visible="true"/>
<actions>
<put name="Изменение настроек пользователя">
<userId type="1" name="Имя и фамилия пользователя" shortname="Пользователь" required="false" link="userCls" linkCode="identifier"/>
<version type="2" length="50" name="Версия настроек пользователя" shortname="Версия" required="false"/>
<json type="2" length="200000" name="Данные конфигурации" shortname="Настройки" required="false"/>
</put>
</actions>
</userSettings>
<userConnect name="Активность пользователей в системе" class="ru.clearing.classes.statics.data.user.UserConnect" logUpdates="true" table="user_connect">
<id type="1" name="Идентификатор записи" shortname="ID" searchable="true" sortable="true"/>
<createdAt field="created" type="4" webtype="5" dbname="Дата-время создания записи" name="Время создания записи" shortname="Создано" searchable="true" sortable="true"/>
<updatedAt field="updated" type="4" webtype="5" dbname="Дата-время изменения записи" name="Время изменения записи" shortname="Изменено" searchable="true" sortable="true"/>
<userId type="1" dbname="Идентификатор пользователя" name="Имя и фамилия пользователя" shortname="Пользователь" searchable="true" sortable="true" visible="true" link="userCls" linkCode="identifier"/>
<connectionTime type="4" name="Последнее соединение" shortname="Вход" searchable="true" sortable="true"/>
<disconnectionTime type="4" name="Разрыв соединения" shortname="Выход" searchable="true" sortable="true"/>
<serverIp type="2" length="250" name="IP адрес сервера" shortname="IP сервера" searchable="true" sortable="true" visible="true"/>
<clientIp type="2" length="250" name="IP адрес клиента" shortname="IP клиента" searchable="true" sortable="true" visible="true"/>
<connectionState type="12" dbname="Код статуса соединения" name="Статус соединения" shortname="Статус" searchable="true" sortable="true" visible="true" link="connectionState"/>
<clearingDate type="6" name="Дата" shortname="Дата" searchable="true" sortable="true"/>
<errorCodeId type="1" dbname="Идентификатор кода ошибки" name="Код ошибки" shortname="Код ошибки" searchable="true" sortable="true" link="errorCode" linkCode="code"/>
<errorTextId type="1" dbname="Идентификатор полного текста ошибки" name="Полный текст ошибки" shortname="Ошибка" searchable="true" sortable="true" link="errorText" linkCode="text"/>
</userConnect>
</actions>
</userSettings>
<userConnect name="Активность пользователей в системе" class="ru.clearing.classes.statics.data.user.UserConnect" logUpdates="true" table="user_connect">
<id type="1" name="Идентификатор записи" shortname="ID" searchable="true" sortable="true"/>
<createdAt field="created" type="4" webtype="5" dbname="Дата-время создания записи" name="Время создания записи" shortname="Создано" searchable="true" sortable="true"/>
<updatedAt field="updated" type="4" webtype="5" dbname="Дата-время изменения записи" name="Время изменения записи" shortname="Изменено" searchable="true" sortable="true"/>
<userId type="1" dbname="Идентификатор пользователя" name="Имя и фамилия пользователя" shortname="Пользователь" searchable="true" sortable="true" visible="true" link="userCls" linkCode="identifier"/>
<connectionTime type="4" name="Последнее соединение" shortname="Вход" searchable="true" sortable="true"/>
<disconnectionTime type="4" name="Разрыв соединения" shortname="Выход" searchable="true" sortable="true"/>
<serverIp type="2" length="250" name="IP адрес сервера" shortname="IP сервера" searchable="true" sortable="true" visible="true"/>
<clientIp type="2" length="250" name="IP адрес клиента" shortname="IP клиента" searchable="true" sortable="true" visible="true"/>
<connectionState type="12" dbname="Код статуса соединения" name="Статус соединения" shortname="Статус" searchable="true" sortable="true" visible="true" link="connectionState"/>
<clearingDate type="6" name="Дата" shortname="Дата" searchable="true" sortable="true"/>
<errorCodeId type="1" dbname="Идентификатор кода ошибки" name="Код ошибки" shortname="Код ошибки" searchable="true" sortable="true" link="errorCode" linkCode="code"/>
<errorTextId type="1" dbname="Идентификатор полного текста ошибки" name="Полный текст ошибки" shortname="Ошибка" searchable="true" sortable="true" link="errorText" linkCode="text"/>
</userConnect>
<company name="Компании" destination="companies" class="ru.clearing.classes.statics.data.company.Company" logUpdates="true" table="company">
<shortName type="2" length="255" name="Краткое наименование компании" shortname="Компания" searchable="true" sortable="true" visible="true"/>
<fullName type="2" length="255" name="Полное наименование компании" shortname="Полное наименование" searchable="true" sortable="true" visible="true"/>
@ -567,40 +546,16 @@
<workflowStatus type="12" dbname="Код статуса" name="Наименование статуса" shortname="Статус" searchable="true" sortable="true" link="workflowStatus"/>
<id type="1" name="Идентификатор записи" shortname="ID" searchable="true" sortable="true"/>
<actions>
<post name="Добавление роли компании" class="ru.spcex.clearing.backendapi.controller.request.cud.company.CompanyRoleSetNewAction">
<post name="Добавление роли участнику" class="ru.spcex.clearing.backendapi.controller.request.cud.company.CompanyRoleSetNewAction">
<companyId type="1" name="Наименование компании" shortname="Компания" link="company" linkCode="shortName" required="true"/>
<companyRole type="12" name="Наименование роли компании" shortname="Роль" link="companyRole" required="true"/>
<workflowStatus type="12" name="Наименование статуса" shortname="Статус" link="workflowStatus"/>
<companyRole type="12" dbname="Код роли компании" name="Наименование роли компании" shortname="Роль" link="companyRole" required="true"/>
<workflowStatus type="12" dbname="Код статуса" name="Наименование статуса" shortname="Статус" link="workflowStatus" required="true"/>
</post>
<put name="Изменение роли компании" class="ru.spcex.clearing.backendapi.controller.request.cud.company.CompanyRoleSetUpdateAction">
<id type="1" name="Идентификатор записи" shortname="ID" link="companyRoleSet" linkCode="id"/>
<companyId type="1" name="Наименование компании" shortname="Компания" link="company" linkCode="shortName" required="true"/>
<companyRole type="12" name="Наименование роли компании" shortname="Роль" link="companyRole" required="true"/>
<workflowStatus type="12" name="Наименование статуса" shortname="Статус" link="workflowStatus"/>
</put>
<delete name="Удаление роли компании" class="ru.spcex.clearing.backendapi.controller.request.cud.common.CommonDeleteAction">
<id type="1" name="Идентификатор записи" shortname="ID" link="settlementHouseProperties" linkCode="id" required="true"/>
<delete name="Удаление роли участнику" class="ru.spcex.clearing.backendapi.controller.request.cud.common.CommonDeleteAction">
<id type="1" name="Идентификатор записи" shortname="ID" link="companyRoleSet" linkCode="id" required="true"/>
</delete>
</actions>
</companyRoleSet>
<settlementHouseProperties name="Параметры расчетной организации" destination="settlement-house-properties" class="ru.clearing.classes.statics.data.company.SettlementHouseProperties" logUpdates="true" table="settlement_house_properties">
<companyId type="1" name="Наименование компании" shortname="Компания" searchable="true" sortable="true" visible="true" link="company" linkCode="shortName"/>
<currencyCode type="12" name="Код валюты" shortname="Валюта" searchable="true" sortable="true" visible="true" link="currencyCode" linkCode="code"/>
<id type="1" name="Идентификатор записи" shortname="ID" searchable="true" sortable="true"/>
<actions>
<post name="Добавление параметра РО" class="ru.spcex.clearing.backendapi.controller.request.cud.company.SettlementHousePropertiesNewAction">
<companyId type="1" name="Наименование компании" shortname="Компания" link="company" linkCode="shortName" required="true"/>
<currencyCode type="12" name="Код валюты" shortname="Валюта" link="currencyCode" linkCode="code" required="true"/>
</post>
<put name="Изменение параметра РО" class="ru.spcex.clearing.backendapi.controller.request.cud.company.SettlementHousePropertiesUpdateAction">
<id type="1" name="Идентификатор записи" shortname="ID" link="settlementHouseProperties" linkCode="id" required="true"/>
<currencyCode type="12" name="Код валюты" shortname="Валюта" link="currencyCode" linkCode="code" required="true"/>
</put>
<delete name="Удаление параметра РО" class="ru.spcex.clearing.backendapi.controller.request.cud.common.CommonDeleteAction">
<id type="1" name="Идентификатор записи" shortname="ID" link="settlementHouseProperties" linkCode="id" required="true"/>
</delete>
</actions>
</settlementHouseProperties>
<security name="Инструменты" destination="securities" class="ru.clearing.classes.statics.data.security.Security" logUpdates="true" table="security">
<id type="1" name="Идентификатор записи" shortname="ID" searchable="true" sortable="true"/>
<instrumentType type="12" dbname="Код типа инструмента" name="Наименование типа инструмента" shortname="Тип инструмента" searchable="true" sortable="true" visible="true" link="instrumentType"/>
@ -829,8 +784,6 @@
<symbolName type="2" length="255" name="Наименование инструмента на торговой площадке" shortname="Наименование инструмента на режиме" searchable="true" sortable="true"/>
<tradingCurrency type="12" dbname="Код валюты расчета" name="Наименование валюты расчета" shortname="Валюта" searchable="true" sortable="true" visible="true" link="currencyCode" linkCode="code"/>
<workflowStatus type="12" dbname="Код статуса листинга в системе" name="Наименование статуса листинга в системе" shortname="Статус" searchable="true" sortable="true" visible="true" link="workflowStatus"/>
<minStep type="11" name="Шаг цены" shortname="Шаг цены" visible="true" searchable="true" sortable="true"/>
<precision type="11" name="Точность" shortname="Точность" visible="true" searchable="true" sortable="true"/>
<id type="1" name="Идентификатор записи" shortname="ID" searchable="true" sortable="true"/>
<createdAt field="created" type="4" webtype="5" dbname="Дата-время создания записи" name="Время создания записи" shortname="Создано" searchable="true" sortable="true" ignore="true"/>
<updatedAt field="updated" type="4" webtype="5" dbname="Дата-время изменения записи" name="Время изменения записи" shortname="Изменено" searchable="true" sortable="true" ignore="true"/>
@ -855,49 +808,6 @@
</delete>
</actions>
</listing>
<currencyPairSecurity name="Инструменты валютного рынка" destination="securities/currency-pair-securities" class="ru.clearing.classes.statics.data.security.CurrencyPairSecurity" logUpdates="true" table="currency_pair_security">
<securitySymbol type="2" length="255" name="Код инструмента" shortname="Код" searchable="true" sortable="true" visible="true" extends="security"/>
<shortName type="2" length="255" name="Краткое наименование инструмента" shortname="Краткое наименование" searchable="true" sortable="true" visible="true" extends="security"/>
<currencyPairId type="1" dbname="Валютная пара" name="Валютная пара" shortname="Инструмент" searchable="true" sortable="true" ignore="true" link="currencyPair" linkKeyCode="id" linkCode="code" />
<baseUnitSize type="11" name="Количество валюты лота" shortname="Количество" visible="true" searchable="true" sortable="true"/>
<code type="2" length="255" name="Наименование валютной пары" shortname="Валютная пара" searchable="true" sortable="true" visible="false" link="currencyPair" linkKeyCode="id" linkCode="name"/>
<settlementType type="12" dbname="Тип расчета" name="Тип расчета" shortname="Тип расчета" searchable="true" sortable="true" visible="true" link="currencySettlementType" linkCode="code"/>
<clearingOrganization type="2" length="255" name="Наименование клиринговой организации" shortname="Клиринговая организация" searchable="true" sortable="true" visible="true"/>
<securityId type="1" name="Наименование инструмента" shortname="Инструмент" searchable="true" sortable="true" link="security" linkCode="shortName"/>
<fullName type="2" length="255" name="Полное наименование инструмента" shortname="Наименование" searchable="true" sortable="true" visible="true" extends="security"/>
<workflowStatus type="12" dbname="Код статуса" name="Наименование статуса" shortname="Статус" searchable="true" sortable="true" visible="true" link="workflowStatus" extends="security"/>
<id type="1" name="Идентификатор записи" shortname="ID" searchable="true" sortable="true"/>
<createdAt field="created" type="4" webtype="5" name="Время создания записи" shortname="Создано" searchable="true" sortable="true"/>
<updatedAt field="updated" type="4" webtype="5" name="Время изменения записи" shortname="Изменено" searchable="true" sortable="true"/>
<actions>
<post name="Добавление валютной пары" confirmation="securitySymbol,shortName,fullName,section,lotCurrencyCode,counterPartyLotCurrencyCode,lots,price,accuracy,amountLotsCurrency,settlementDate,workflowStatus" class="ru.spcex.clearing.backendapi.controller.request.cud.securities.CurrencyPairSecurityNewAction">
<instrumentType type="12" name="Наименование типа инструмента" shortname="Тип инструмента" link="instrumentType" required="true" enabled="false"/>
<securitySymbol type="2" length="255" name="Код инструмента" shortname="Инструмент" required="true"/>
<shortName type="2" length="255" name="Краткое наименование инструмента" shortname="Краткое наименование" required="true"/>
<fullName type="2" length="255" name="Полное наименование инструмента" shortname="Наименование" required="true"/>
<currencyPairId type="1" dbname="Идентификатор валютной пары" name="Валютная пара" shortname="Валютная пара" link="currencyPair" linkKeyCode="id" linkCode="code" required="true"/>
<baseUnitSize type="11" name="Количество валюты в лоте" shortname="Количество валюты в лоте" required="true"/>
<settlementType type="12" dbname="Тип расчета" name="Тип расчета" shortname="Тип расчета" link="currencySettlementType" required="true" linkCode="code"/>
<workflowStatus type="12" dbname="Код статуса" name="Наименование статуса" shortname="Статус" link="workflowStatus" extends="security" required="true"/>
<clearingOrganization type="2" length="255" name="Наименование клиринговой организации" shortname="Клиринговая организация" required="true" enabled="false"/>
</post>
<put name="Изменение валютной пары" confirmation="securitySymbol,shortName,fullName,section,lotCurrencyCode,counterPartyLotCurrencyCode,lots,price,accuracy,amountLotsCurrency,settlementDate,workflowStatus" class="ru.spcex.clearing.backendapi.controller.request.cud.securities.CurrencyPairSecurityUpdateAction">
<id type="1" name="Идентификатор записи" shortname="ID" link="currencySecurity" linkCode="id" required="true"/>
<instrumentType type="12" name="Наименование типа инструмента" shortname="Тип инструмента" link="instrumentType" required="true" enabled="false"/>
<securitySymbol type="2" length="255" name="Код инструмента" shortname="Инструмент" required="true"/>
<shortName type="2" length="255" name="Краткое наименование инструмента" shortname="Краткое наименование" required="true"/>
<fullName type="2" length="255" name="Полное наименование инструмента" shortname="Наименование" required="true"/>
<currencyPairId type="1" dbname="Идентификатор валютной пары" name="Валютная пара" shortname="Валютная пара" link="currencyPair" linkKeyCode="id" linkCode="code" required="true"/>
<baseUnitSize type="11" name="Количество валюты в лоте" shortname="Количество валюты в лоте" required="true"/>
<settlementType dbname="Тип расчета" name="Тип расчета" shortname="Тип расчета" link="currencySettlementType" required="true" linkCode="code"/>
<workflowStatus type="12" dbname="Код статуса" name="Наименование статуса" shortname="Статус" link="workflowStatus" extends="security" required="true"/>
<clearingOrganization type="2" length="255" name="Наименование клиринговой организации" shortname="Клиринговая организация" required="true" enabled="false"/>
</put>
<delete name="Блокировка валютной пары" confirmation="securitySymbol,shortName" class="ru.spcex.clearing.backendapi.controller.request.cud.common.CommonDeleteAction">
<id type="1" name="Идентификатор записи" shortname="ID" link="currencySecurity" linkCode="id" required="true"/>
</delete>
</actions>
</currencyPairSecurity>
<market name="Рынки" destination="markets" class="ru.clearing.classes.statics.data.misc.Market" logUpdates="true" table="market">
<description type="2" length="255" name="Описание" shortname="Описание" searchable="true" sortable="true"/>
<exchangeId type="1" dbname="Идентификатор площадки" name="Наименование площадки" shortname="Площадка" searchable="true" sortable="true" link="company"/>
@ -910,15 +820,15 @@
<createdAt field="created" type="4" webtype="5" dbname="Дата-время создания записи" name="Время создания записи" shortname="Создано" searchable="true" sortable="true" ignore="true"/>
<updatedAt field="updated" type="4" webtype="5" dbname="Дата-время изменения записи" name="Время изменения записи" shortname="Изменено" searchable="true" sortable="true" ignore="true"/>
</market>
<errorText name="Полные тексты ошибок" destination="error-texts" class="ru.clearing.classes.statics.data.messages.ErrorText" table="error_text">
<id type="1" name="Идентификатор записи" shortname="ID" searchable="true" sortable="true"/>
<errorText name="Полные тексты ошибок" destination="error-texts" class="ru.clearing.classes.statics.data.messages.ErrorText" table="error_text">
<id type="1" name="Идентификатор записи" shortname="ID" searchable="true" sortable="true"/>
<createdAt field="created" type="4" webtype="5" dbname="Дата-время создания записи" name="Время создания записи" shortname="Создано" searchable="true" sortable="true" ignore="true"/>
<updatedAt field="updated" type="4" webtype="5" dbname="Дата-время изменения записи" name="Время изменения записи" shortname="Изменено" searchable="true" sortable="true" ignore="true"/>
<errorCodeId type="1" dbname="Идентификатор кода ошибки" name="Код ошибки" shortname="Код" searchable="true" sortable="true" visible="true" link="errorCode"/>
<text type="2" length="255" name="Полный текст ошибки" shortname="Ошибка" searchable="true" sortable="true" visible="true"/>
<text type="2" length="255" name="Полный текст ошибки" shortname="Ошибка" searchable="true" sortable="true" visible="true"/>
<userId type="1" dbname="Идентификатор автора сообщения" name="Автор сообщения" shortname="Сотрудник" searchable="true" sortable="true" visible="true" link="userCls" linkCode="identifier" ignore="true"/>
<clearingDate type="6" name="Текущая дата" shortname="Дата" visible="false" searchable="true" sortable="true" ignore="true"/>
</errorText>
</errorText>
<clientCode name="Коды клиентов компании" destination="client-codes" class="ru.clearing.classes.statics.data.account.ClientCode" logUpdates="true" table="client_сode">
<id type="1" name="Идентификатор записи" shortname="ID" searchable="true" sortable="true"/>
@ -927,7 +837,6 @@
<tradingClearingRegistryId type="1" dbname="Идентификатор торгово-клирингового регистра" name="Торгово-клиринговый регистр" shortname="ТКР" searchable="true" sortable="true" link="tradingClearingRegistry" linkCode="code"/>
<moneyAccountId type="1" dbname="Идентификатор денежного счета" name="Номер денежного счета" shortname="Денежный счет" searchable="true" sortable="true" link="account" linkCode="account"/>
<depoAccountId type="1" dbname="Идентификатор депозитарного счета" name="Номер депозитарного счета" shortname="Депозитарный счет" searchable="true" sortable="true" link="account" linkCode="account"/>
<currencyAccountId type="1" dbname="Идентификатор валютного счета" name="Номер валютного счета" shortname="Валютный счет" searchable="true" sortable="true" link="account" linkCode="account"/>
<status type="12" dbname="Код статуса" name="Наименование статуса" shortname="Статус" searchable="true" sortable="true" link="workflowStatus"/>
<createdAt field="created" type="4" webtype="5" dbname="Дата-время создания записи" name="Время создания записи" shortname="Создано" searchable="true" sortable="true"/>
<updatedAt field="updated" type="4" webtype="5" dbname="Дата-время изменения записи" name="Время изменения записи" shortname="Изменено" searchable="true" sortable="true"/>
@ -938,7 +847,6 @@
<tradingClearingRegistryId type="1" name="Торгово-клиринговый регистр" shortname="ТКР" link="tradingClearingRegistry" linkCode="code"/>
<moneyAccountId type="1" name="Номер денежного счета" shortname="Денежный счет" link="account" linkCode="account"/>
<depoAccountId type="1" name="Номер депозитарного счета" shortname="Депозитарный счет" link="account" linkCode="account"/>
<currencyAccountList type="7" name="Список валютных счетов" shortname="Список валютных счетов" link="account" linkCode="account"/>
<status type="12" name="Наименование статуса" shortname="Статус" link="workflowStatus"/>
</post>
<put name="Изменение кода клиента" confirmation="companyId,code,tradingClearingRegistryId,moneyAccountId,depoAccountId,status" class="ru.spcex.clearing.backendapi.controller.request.cud.account.ClientCodeUpdateAction">
@ -948,7 +856,6 @@
<tradingClearingRegistryId type="1" name="Торгово-клиринговый регистр" shortname="ТКР" link="tradingClearingRegistry" linkCode="code"/>
<moneyAccountId type="1" name="Номер денежного счета" shortname="Денежный счет" link="account" linkCode="account"/>
<depoAccountId type="1" name="Номер депозитарного счета" shortname="Депозитарный счет" link="account" linkCode="account"/>
<currencyAccountList type="7" name="Список валютных счетов" shortname="Список валютных счетов" link="account" linkCode="account"/>
<status type="12" name="Наименование статуса" shortname="Статус" link="workflowStatus"/>
</put>
<delete name="Блокировка кода клиента" confirmation="companyId,code" class="ru.spcex.clearing.backendapi.controller.request.cud.common.CommonDeleteAction">
@ -960,8 +867,8 @@
<id type="1" name="Идентификатор записи" shortname="ID" searchable="true" sortable="true"/>
<companyId type="1" dbname="Идентификатор компании" name="Наименование компании" shortname="Компания" searchable="true" sortable="true" visible="true" link="company" linkCode="shortName"/>
<code type="2" length="255" name="Код торгово-клирингового регистра" shortname="ТКР" searchable="true" sortable="true" visible="true"/>
<moneyAccountId type="1" dbname="Идентификатор денежного счета" name="Номер денежного счета" shortname="Денежный счет" searchable="true" sortable="true" visible="true" link="account" linkCode="account"/>
<depoAccountId type="1" dbname="Идентификатор депозитарного счета" name="Номер депозитарного счета" shortname="Депозитарный счет" searchable="true" sortable="true" visible="true" link="account" linkCode="account"/>
<moneyAccountId type="1" dbname="Идентификатор денежного счета" name="Номер денежного счета" shortname="Денежный счет" searchable="true" sortable="true" visible="true" link="account" linkCode="account"/>
<depoAccountId type="1" dbname="Идентификатор депозитарного счета" name="Номер депозитарного счета" shortname="Депозитарный счет" searchable="true" sortable="true" visible="true" link="account" linkCode="account"/>
<tradingClearingRegistryType type="12" dbname="Код торгово-клирингового регистра" name="Тип торгово-клирингового регистра" shortname="Тип ТКР" searchable="true" sortable="true" link="tradingClearingRegistryType"/>
<tradingClearingRegistryLevel type="12" dbname="Код торгово-клирингового регистра" name="Уровень торгово-клирингового регистра" shortname="Уровень ТКР" searchable="true" sortable="true" link="tradingClearingRegistryLevel" ignore="true"/>
<tradingClearingRegistryPurpose type="12" dbname="Код области применения" name="Область применения" shortname="Область" searchable="true" sortable="true" link="tradingClearingRegistryPurpose"/>
@ -980,7 +887,7 @@
<companyId type="1" name="Наименование компании" shortname="Компания" link="company" linkCode="shortName" enabled="false"/>
<code type="2" length="255" name="Код торгово-клирингового регистра" shortname="ТКР" enabled="false"/>
<moneyAccountId type="1" name="Номер денежного счета" shortname="Денежный счет" link="account" linkCode="account" enabled="false"/>
<depoAccountId type="1" name="Номер депозитарного счета" shortname="Депозитарный счет" link="account" linkCode="account"/>
<depoAccountId type="1" name="Номер депозитарного счета" shortname="Депозитарный счет" link="account" linkCode="account" enabled="false"/>
<status type="12" name="Наименование статуса" shortname="Статус" link="serviceStatus" required="true"/>
</put>
<delete name="Блокировка ТКР" confirmation="companyId,code" class="ru.spcex.clearing.backendapi.controller.request.cud.common.CommonDeleteAction">
@ -988,25 +895,6 @@
</delete>
</actions>
</tradingClearingRegistry>
<tradingClearingRegistryList name="Список счетов ТКР" destination="trading-clearing-registries-list" class="ru.clearing.classes.statics.data.registry.TradingClearingRegistryList" logUpdates="true" table="trading_clearing_registry_list">
<tradingClearingRegistryId type="1" dbname="Идентификатор торгово-клирингового регистра" name="Торгово-клиринговый регистр" shortname="Торгово-клиринговый регистр" searchable="true" sortable="true" link="tradingClearingRegistry" linkKeyCode="id" linkCode="code" />
<accountId type="1" dbname="Идентификатор валютного счета" name="Номер валютного счета" shortname="Денежный счет" searchable="true" sortable="true" visible="true" link="account" linkCode="account"/>
<currency type="12" dbname="Код валюты" name="Код валюты" shortname="Валюта" searchable="true" sortable="true" visible="true" link="currencyCode" linkCode="code"/>
<status type="12" dbname="Код статуса" name="Наименование статуса" shortname="Статус" searchable="true" sortable="true" visible="true" link="serviceStatus"/>
<id type="1" name="Идентификатор записи" shortname="ID" searchable="true" sortable="true"/>
<createdAt field="created" type="4" name="Дата и время создания записи" shortname="Создано" searchable="true" sortable="true" ignore="true"/>
<updatedAt field="updated" type="4" name="Дата и время изменения записи" shortname="Изменено" searchable="true" sortable="true" ignore="true"/>
<actions>
<post name="Добавление списка счетов ТКР" confirmation="tradingClearingRegistryId,accountId" class="ru.spcex.clearing.backendapi.controller.request.cud.registry.TradingClearingRegistryListNewAction">
<tradingClearingRegistryId type="1" name="Торгово-клиринговый регистр" shortname="ТКР" link="tradingClearingRegistry" linkCode="code"/>
<accountId type="1" name="Идентификатор счёта" shortname="Счёт" link="account" linkCode="account"/>
</post>
<put name="Изменение списка счетов ТКР" confirmation="id,status" class="ru.spcex.clearing.backendapi.controller.request.cud.registry.TradingClearingRegistryListUpdateAction">
<id type="1" name="Идентификатор записи" shortname="ID" link="clientCode" linkCode="id" required="true"/>
<status type="12" name="Наименование статуса" shortname="Статус" link="serviceStatus" required="true"/>
</put>
</actions>
</tradingClearingRegistryList>
<registry name="Регистр активов, обязательств и требований УК" destination="registries" class="ru.clearing.classes.statics.data.registry.Registry" logUpdates="true" table="registry">
<companyId type="1" dbname="Идентификатор участника" name="Наименование участника" shortname="Участник" searchable="true" sortable="true" visible="true" link="company" linkCode="shortName"/>
<tradingCode type="2" length="255" name="Торговый код участника" shortname="Торговый код" searchable="true" sortable="true" visible="false"/>
@ -1074,7 +962,7 @@
<companyId type="1" name="Наименование компании" shortname="Компания" link="company" linkCode="shortName" required="true"/>
<tradingClearingRegistryId type="1" name="Торгово-клиринговый регистр" shortname="Торгово-клиринговый регистр" link="tradingClearingRegistry" linkCode="code" required="true"/>
</post>
<put name="Изменение даты возврата депозита" destination="registries/changeRefundDate" confirmation="contact,contract,refundDate" class="ru.spcex.clearing.backendapi.controller.request.cud.registry.ChangeRefundDateActionNew">
<put name="Изменение даты возврата депозита" destination="registries/changeRefundDate" confirmation="contact,contract,refundDate" class="ru.spcex.clearing.backendapi.controller.request.cud.registry.ChangeRefundDateActionNew">
<groupId type="1" dbname="Идентификатор группы связанных регистров" name="Идентификатор группы" required="true" enabled="false" visible="false"/>
<contract type="2" length="255" name="Договор" shortname="Номер договора" required="true" enabled="false"/>
<refundDate type="6" name="Дата возврата депозита" shortname="Возврат депозита" visible="true" enabled="true"/>
@ -1092,10 +980,9 @@
<account type="2" length="50" name="Номер счета" shortname="Счет" searchable="true" sortable="true" visible="true"/>
<accountType type="12" dbname="Код типа счета" name="Наименование типа счета" shortname="Тип" searchable="true" sortable="true" visible="true" link="accountType"/>
<relationId type="1" dbname="Идентификатор договорных отношений" name="Договорные отношения" shortname="Договор" searchable="true" sortable="true" link="relation" ignore="true"/>
<currency type="12" dbname="Код валюты" name="Код валюты" shortname="Валюта" searchable="true" sortable="true" visible="true" link="currencyCode" linkCode="code"/>
<status type="12" dbname="Код статуса" name="Наименование статуса" shortname="Статус" searchable="true" sortable="true" visible="true" link="serviceStatus"/>
<processingSign type="12" dbname="Код признака обработки счета" name="Признак обработки счета" shortname="Обработка счета" searchable="true" sortable="true" visible="true" link="allowed" ignore="true"/>
<companyId type="1" dbname="Идентификатор компании" name="Наименование компании" shortname="Компания" searchable="true" sortable="true" visible="true" link="company" linkCode="shortName"/>
<companyId type="1" dbname="Идентификатор компании" name="Наименование компании" shortname="Компания" searchable="true" sortable="true" visible="true" link="company" linkCode="shortName"/>
<id type="1" name="Идентификатор записи" shortname="ID" searchable="true" sortable="true"/>
<createdAt field="created" type="4" webtype="5" dbname="Дата-время создания записи" name="Время создания записи" shortname="Создано" searchable="true" sortable="true"/>
<updatedAt field="updated" type="4" webtype="5" dbname="Дата-время изменения записи" name="Время изменения записи" shortname="Изменено" searchable="true" sortable="true"/>
@ -1105,7 +992,6 @@
<account type="2" length="50" name="Номер счета" shortname="Счет"/>
<status type="12" name="Наименование статуса" shortname="Статус" link="serviceStatus"/>
<accountType type="12" name="Наименование типа счета" shortname="Тип" link="accountType" required="true" visible="false"/>
<currency type="12" name="Код валюты" shortname="Валюта" visible="true" link="currencyCode" linkCode="code"/>
</post>
<put name="Изменение счета" confirmation="companyId,account,status" class="ru.spcex.clearing.backendapi.controller.request.cud.account.AccountUpdateAction">
<id type="1" name="Идентификатор записи" shortname="ID" link="account" linkCode="id" required="true"/>
@ -1133,11 +1019,11 @@
<put name="Изменение статуса договорных отношений" confirmation="serviceStatus,comment">
<id type="1" name="Идентификатор записи" shortname="ID" link="relation" linkCode="id" required="true"/>
<serviceStatus type="12" name="Наименование статуса" shortname="Статус" link="serviceStatus" required="true"/>
<comment type="2" length="255" name="Текст причины" shortname="Причина"/>
<comment type="2" length="255" name="Текст причины" shortname="Причина"/>
</put>
</actions>
</relation>
<bankAccount name="Счета вывода средств" destination="accounting/bank-accounts" class="ru.clearing.classes.statics.data.account.BankAccount" logUpdates="true" table="bank_account">
<bankAccount name="Счета вывода средств из ПРЦ" destination="accounting/bank-accounts" class="ru.clearing.classes.statics.data.account.BankAccount" logUpdates="true" table="bank_account">
<accountId type="1" dbname="Идентификатор счета" name="Номер счета" shortname="Счет" searchable="true" sortable="true" link="account" ignore="true"/>
<bankIdentificationCode type="2" length="255" name="Банковский идентификационный код (БИК)" shortname="БИК" searchable="true" sortable="true" visible="true"/>
<bankName type="2" length="255" name="Наименование банка" shortname="Наименование" searchable="true" sortable="true" visible="true"/>
@ -1147,41 +1033,39 @@
<destination type="2" length="255" name="Назначение платежа" shortname="Назначение платежа" searchable="true" sortable="true" visible="true" ignore="true"/>
<iban type="2" length="255" name="Международный номер банковского счета" shortname="Международный номер банковского счета" searchable="true" sortable="true" visible="true" ignore="true"/>
<internationalTransferSign type="12" dbname="Код доступности международных переводов" name="Доступность международных переводов" shortname="Международные переводы" searchable="true" sortable="true" visible="true" link="allowed" ignore="true"/>
<swiftCode type="2" length="255" name="Код SWIFT" shortname="SWIFT" searchable="true" sortable="true" visible="true"/>
<swiftCode type="2" length="255" name="Код SWIFT" shortname="SWIFT" searchable="true" sortable="true" visible="true" ignore="true"/>
<taxpayerIdentificationNumber type="2" length="255" name="Идентификационный номер налогоплательщика (ИНН)" shortname="ИНН" searchable="true" sortable="true" visible="true"/>
<taxRegistrationReasonCode type="2" length="255" name="Код причины постановки (КПП)" shortname="КПП" searchable="true" sortable="true" visible="true"/>
<account type="2" length="50" name="Номер счета" shortname="Счет" searchable="true" sortable="true" visible="true"/>
<companyId type="1" dbname="Идентификатор компании" name="Наименование компании" shortname="Компания" searchable="true" sortable="true" visible="true" link="company" linkCode="shortName"/>
<companyId type="1" dbname="Идентификатор компании" name="Наименование компании" shortname="Компания" searchable="true" sortable="true" visible="true" link="company" linkCode="shortName"/>
<status field="accountId" type="12" dbname="Код статуса" name="Наименование статуса" shortname="Статус" searchable="true" sortable="true" visible="true" linkKeyCode="id" linkCode="status" link="account" extends="account"/>
<id type="1" name="Идентификатор записи" shortname="ID" searchable="true" sortable="true"/>
<actions>
<post name="Добавление счета вывода средств" confirmation="currency,bankIdentificationCode,bankName,correspondentAccount,correspondentAccountName,taxpayerIdentificationNumber,taxRegistrationReasonCode,account" class="ru.spcex.clearing.backendapi.controller.request.cud.account.BankAccountNewAction">
<post name="Добавление счета вывода средств из ПРЦ" confirmation="currency,bankIdentificationCode,bankName,correspondentAccount,correspondentAccountName,taxpayerIdentificationNumber,taxRegistrationReasonCode,account" class="ru.spcex.clearing.backendapi.controller.request.cud.account.BankAccountNewAction">
<currency type="12" name="Код валюты" shortname="Валюта" required="true" link="currencyCode" linkCode="code"/>
<bankIdentificationCode type="2" length="255" name="Банковский идентификационный код (БИК)" shortname="БИК" required="true"/>
<bankName type="2" length="255" name="Наименование банка" shortname="Наименование" required="true"/>
<correspondentAccount type="2" length="255" name="Корреспондентский счет" shortname="Корр. счет"/>
<correspondentAccountName type="2" length="255" name="Наименование корреспондентского счета" shortname="Наименование корр. счета"/>
<swiftCode type="2" length="255" shortname="SWIFT"/>
<taxpayerIdentificationNumber type="2" length="255" name="Идентификационный номер налогоплательщика (ИНН)" shortname="ИНН"/>
<taxRegistrationReasonCode type="2" length="255" name="Код причины постановки (КПП)" shortname="КПП"/>
<account type="2" length="50" name="Номер счета" shortname="Счет" required="true"/>
<destination type="2" length="255" name="Назначение платежа" shortname="Назначение платежа" visible="false"/>
<companyId type="1" name="Компания" shortname="Компания" link="company" linkCode="shortName" visible="false"/>
<destination type="2" length="255" name="Назначение платежа" shortname="Назначение платежа" visible="true"/>
</post>
<put name="Изменение счета вывода средств" confirmation="currency,bankIdentificationCode,bankName,correspondentAccount,correspondentAccountName,taxpayerIdentificationNumber,taxRegistrationReasonCode,account" class="ru.spcex.clearing.backendapi.controller.request.cud.account.BankAccountUpdateAction">
<put name="Изменение счета вывода средств из ПРЦ" confirmation="currency,bankIdentificationCode,bankName,correspondentAccount,correspondentAccountName,taxpayerIdentificationNumber,taxRegistrationReasonCode,account" class="ru.spcex.clearing.backendapi.controller.request.cud.account.BankAccountUpdateAction">
<id type="1" name="Идентификатор записи" shortname="ID" link="bankAccount" linkCode="id" required="true"/>
<currency type="12" name="Код валюты" shortname="Валюта" link="currencyCode" linkCode="code"/>
<bankIdentificationCode type="2" length="255" name="Банковский идентификационный код (БИК)" shortname="БИК"/>
<bankName type="2" length="255" name="Наименование банка" shortname="Наименование"/>
<correspondentAccount type="2" length="255" name="Корреспондентский счет" shortname="Корр. счет"/>
<correspondentAccountName type="2" length="255" name="Наименование корреспондентского счета" shortname="Наименование корр. счета"/>
<swiftCode type="2" length="255" shortname="SWIFT"/>
<taxpayerIdentificationNumber type="2" length="255" name="Идентификационный номер налогоплательщика (ИНН)" shortname="ИНН"/>
<taxRegistrationReasonCode type="2" length="255" name="Код причины постановки (КПП)" shortname="КПП"/>
<account type="2" length="50" name="Номер счета" shortname="Счет"/>
<destination type="2" length="255" name="Назначение платежа" shortname="Назначение платежа" visible="true"/>
<destination type="2" length="255" name="Назначение платежа" shortname="Назначение платежа" visible="false"/>
</put>
<delete name="Блокировка счета вывода средств" confirmation="currency,bankIdentificationCode,correspondentAccount,taxpayerIdentificationNumber,taxRegistrationReasonCode,account" class="ru.spcex.clearing.backendapi.controller.request.cud.common.CommonDeleteAction">
<delete name="Блокировка счета вывода средств из ПРЦ" confirmation="currency,bankIdentificationCode,correspondentAccount,taxpayerIdentificationNumber,taxRegistrationReasonCode,account" class="ru.spcex.clearing.backendapi.controller.request.cud.common.CommonDeleteAction">
<id type="1" name="Идентификатор записи" shortname="ID" link="bankAccount" linkCode="id" required="true"/>
</delete>
</actions>
@ -1189,7 +1073,7 @@
<informationAccount name="Регистр КС" destination="accounting/information-accounts" class="ru.clearing.classes.statics.data.account.InformationAccount" logUpdates="true" table="information_account">
<accountId type="1" dbname="Идентификатор информационного счета" name="Номер информационного счета" shortname="Регистр на КС" searchable="true" sortable="true" visible="true" link="account" linkCode="account"/>
<clearingAccountId type="1" dbname="Идентификатор аналитического счета" name="Номер аналитического счета" shortname="Клиринговый счет" searchable="true" sortable="true" visible="true" link="account" linkCode="account"/>
<companyId type="1" dbname="Идентификатор компании" name="Наименование компании" shortname="Компания" searchable="true" sortable="true" visible="true" link="company" linkCode="shortName"/>
<companyId type="1" dbname="Идентификатор компании" name="Наименование компании" shortname="Компания" searchable="true" sortable="true" visible="true" link="company" linkCode="shortName"/>
<serviceStatus field="accountId" type="12" dbname="Код статуса" name="Наименование статуса" shortname="Статус" searchable="true" sortable="true" visible="true" linkKeyCode="id" linkCode="status" link="account" extends="account" />
<id type="1" name="Идентификатор записи" shortname="ID" searchable="true" sortable="true"/>
</informationAccount>
@ -1202,12 +1086,12 @@
</depoAccount>
<accountSymbols name="Депо КС - РДЦ" destination="accounting/depo-accounts-symbols" class="ru.clearing.classes.statics.data.account.AccountSymbols" logUpdates="true" table="depo_account_symbols">
<id type="1" name="Идентификатор записи" shortname="ID" searchable="true" sortable="true"/>
<accountId type="1" dbname="Идентификатор счета" name="Номер счета" shortname="Счет" searchable="true" sortable="true" visible="true" link="account" linkCode="account"/>
<accountSymbolValue type="2" length="255" name="Значение реквизита" shortname="Значение" searchable="true" sortable="true" visible="true"/>
<accountId type="1" dbname="Идентификатор счета" name="Счет депо КС" shortname= "Счет депо КС" searchable="true" sortable="true" visible="true" link="account" linkCode="account"/>
<accountSymbolValue type="2" length="255" name="Счет РДЦ" shortname="Счет РДЦ" searchable="true" sortable="true" visible="true"/>
<actions>
<post name="Добавление депо КС - РДЦ" confirmation="accountId,accountSymbolValue">
<accountId type="1" dbname="Идентификатор счета" name="Номер счета" shortname="Счет" link="account" linkCode="account" required="true"/>
<accountSymbolValue type="2" length="255" name="Значение реквизита" shortname="Значение" required="true"/>
<post name="Добавление депо КС - РДЦ" confirmation="accountId,accountSymbolValue" class="ru.spcex.clearing.backendapi.controller.request.cud.account.AccountSymbolsNewAction">
<accountId type="1" dbname="Идентификатор счета" name="Счет депо КС" shortname= "Счет депо КС" link="account" linkCode="account" required="true"/>
<accountSymbolValue type="2" length="255" name="Счет РДЦ" shortname="Счет РДЦ" required="true"/>
</post>
<delete name="Удаление депо КС - РДЦ" confirmation="accountId,accountSymbolValue">
<id type="1" name="Идентификатор записи" shortname="ID" link="account" linkCode="id" required="true"/>
@ -1221,10 +1105,10 @@
<serviceStatus field="accountId" type="12" dbname="Код статуса" name="Наименование статуса" shortname="Статус" searchable="true" sortable="true" visible="true" linkKeyCode="id" linkCode="status" link="account" extends="account" />
<id type="1" name="Идентификатор записи" shortname="ID" searchable="true" sortable="true"/>
</clearingAccount>
<plannerTemplate name="Шаблон расписания операционного дня" destination="schedule/planner-templates" class="ru.clearing.classes.statics.data.scheduler.PlannerTemplate" table="planner_template">
<plannerTemplate name="Шаблон расписания операционного дня" destination="schedule/planner-templates" class="ru.clearing.classes.statics.data.scheduler.PlannerTemplate" table="planner_template">
<task type="12" dbname="Код задачи" name="Наименование задачи" shortname="Задача" searchable="false" sortable="false" visible="true" link="task"/>
<taskTime type="5" name="Время задачи" shortname="Время задачи" searchable="false" sortable="false" visible="true"/>
<market type="12" dbname="Код рынка" name="Наименование рынка" shortname="Рынок" searchable="true" sortable="true" visible="true" link="market" linkKeyCode="code" linkCode="description" ignore="true"/>
<market type="12" dbname="Код рынка" name="Наименование рынка" shortname="Рынок" searchable="true" sortable="true" visible="true" link="market" linkKeyCode="code" linkCode="description" ignore="true"/>
<section type="12" dbname="Код наименования секции" name="Наименование секции" shortname="Секция" searchable="true" sortable="true" visible="true" link="section" linkCode="name"/>
<sessionType type="12" dbname="Код типа клиринговой сессии" name="Тип клиринговой сессии" shortname="Тип КС" searchable="true" sortable="true" visible="true" link="sessionType" linkCode="name"/>
<taskStatus type="12" dbname="Код статуса" name="Наименование статуса" shortname="Статус" searchable="false" sortable="true" visible="true" link="taskStatus"/>
@ -1257,8 +1141,8 @@
<id type="1" name="Идентификатор записи" shortname="ID" link="plannerTemplate" linkCode="id" required="true"/>
</delete>
</actions>
</plannerTemplate>
<clearingCalendar name="Рабочие и нерабочие дни" destination="schedule/clearing-calendars" class="ru.clearing.classes.statics.data.scheduler.ClearingCalendar" table="clearing_calendar">
</plannerTemplate>
<clearingCalendar name="Рабочие и нерабочие дни" destination="schedule/clearing-calendars" class="ru.clearing.classes.statics.data.scheduler.ClearingCalendar" table="clearing_calendar">
<clearingDate type="6" name="Дата" shortname="Дата" searchable="false" sortable="false" visible="true"/>
<companyId type="1" dbname="Идентификатор компании" name="Наименование компании" shortname="Компания" searchable="false" sortable="false" link="company" linkCode="shortName"/>
<dayStatus type="12" dbname="Код статуса" name="Статус" shortname="Статус" searchable="false" sortable="true" visible="true" link="dayStatus"/>
@ -1281,20 +1165,20 @@
<id type="1" name="Идентификатор записи" shortname="ID" link="clearingCalendar" linkCode="id" required="true"/>
</delete>
</actions>
</clearingCalendar>
<planner name="Расписание на все даты" destination="schedule/planners" class="ru.clearing.classes.statics.data.scheduler.Planner" table="planner">
<task type="12" dbname="Код задачи" name="Наименование задачи" shortname="Задача" searchable="false" sortable="false" visible="true" link="task"/>
<taskTime type="5" name="Время задачи" shortname="Время задачи" searchable="false" sortable="false" visible="true"/>
<clearingDate type="6" name="Дата задачи" shortname="Дата задачи" searchable="false" sortable="false" visible="true"/>
<market type="12" dbname="Код рынка" name="Наименование рынка" shortname="Рынок" searchable="true" sortable="true" visible="true" link="market" linkKeyCode="code" linkCode="description" ignore="true"/>
</clearingCalendar>
<planner name="Расписание на все даты" destination="schedule/planners" class="ru.clearing.classes.statics.data.scheduler.Planner" table="planner">
<task type="12" dbname="Код задачи" name="Наименование задачи" shortname="Задача" searchable="false" sortable="false" visible="true" link="task"/>
<taskTime type="5" name="Время задачи" shortname="Время задачи" searchable="false" sortable="false" visible="true"/>
<clearingDate type="6" name="Дата задачи" shortname="Дата задачи" searchable="false" sortable="false" visible="true"/>
<market type="12" dbname="Код рынка" name="Наименование рынка" shortname="Рынок" searchable="true" sortable="true" visible="true" link="market" linkKeyCode="code" linkCode="description" ignore="true"/>
<section type="12" dbname="Код наименования секции" name="Наименование секции" shortname="Секция" searchable="true" sortable="true" visible="true" link="section" linkCode="name"/>
<sessionType type="12" dbname="Код типа клиринговой сессии" name="Тип клиринговой сессии" shortname="Тип КС" searchable="true" sortable="true" visible="true" link="sessionType" linkCode="name"/>
<taskStatus type="12" dbname="Код статуса" name="Наименование статуса" shortname="Статус" searchable="false" sortable="true" visible="true" link="taskStatus"/>
<companyId type="1" dbname="Идентификатор компании" name="Наименование компании" shortname="Компания" searchable="false" sortable="false" link="company" linkCode="shortName"/>
<securityId type="1" dbname="Идентификатор инструмента" name="Наименование инструмента" shortname="Инструмент" searchable="false" sortable="true" link="security" linkCode="shortName"/>
<id type="1" name="Идентификатор" shortname="ID" searchable="true" sortable="true"/>
<createdAt field="created" type="4" webtype="5" dbname="Дата-время создания записи" name="Время создания записи" shortname="Создано" searchable="true" sortable="true"/>
<updatedAt field="updated" type="4" webtype="5" dbname="Дата-время изменения записи" name="Время изменения записи" shortname="Изменено" searchable="true" sortable="true"/>
<taskStatus type="12" dbname="Код статуса" name="Наименование статуса" shortname="Статус" searchable="false" sortable="true" visible="true" link="taskStatus"/>
<companyId type="1" dbname="Идентификатор компании" name="Наименование компании" shortname="Компания" searchable="false" sortable="false" link="company" linkCode="shortName"/>
<securityId type="1" dbname="Идентификатор инструмента" name="Наименование инструмента" shortname="Инструмент" searchable="false" sortable="true" link="security" linkCode="shortName"/>
<id type="1" name="Идентификатор" shortname="ID" searchable="true" sortable="true"/>
<createdAt field="created" type="4" webtype="5" dbname="Дата-время создания записи" name="Время создания записи" shortname="Создано" searchable="true" sortable="true"/>
<updatedAt field="updated" type="4" webtype="5" dbname="Дата-время изменения записи" name="Время изменения записи" shortname="Изменено" searchable="true" sortable="true"/>
<actions>
<post name="Новое расписание" class="ru.spcex.clearing.backendapi.controller.request.cud.schedule.PlannerNewAction">
<task type="12" name="Наименование задачи" shortname="Задача" link="task" required="true"/>
@ -1321,38 +1205,37 @@
<id type="1" name="Идентификатор записи" shortname="ID" link="planner" linkCode="id" required="true"/>
</delete>
</actions>
</planner>
<plannerAllToday name="Расписание на текущий день" destination="schedule/planners-all-today" class="ru.clearing.classes.statics.data.scheduler.PlannerAllToday" table="planner_all_today">
<task type="12" dbname="Код задачи" name="Наименование задачи" shortname="Задача" searchable="true" sortable="true" visible="true" link="task"/>
<taskTime type="5" name="Время" shortname="Время" searchable="true" sortable="true" visible="true"/>
<clearingDate type="6" name="Дата" shortname="Дата" searchable="true" sortable="true" visible="true"/>
<market type="12" dbname="Код рынка" name="Наименование рынка" shortname="Рынок" searchable="true" sortable="true" visible="true" link="market" linkKeyCode="code" linkCode="description" ignore="true"/>
</planner>
<plannerAllToday name="Расписание на текущий день" destination="schedule/planners-all-today" class="ru.clearing.classes.statics.data.scheduler.PlannerAllToday" table="planner_all_today">
<task type="12" dbname="Код задачи" name="Наименование задачи" shortname="Задача" searchable="true" sortable="true" visible="true" link="task"/>
<taskTime type="5" name="Время" shortname="Время" searchable="true" sortable="true" visible="true"/>
<clearingDate type="6" name="Дата" shortname="Дата" searchable="true" sortable="true" visible="true"/>
<market type="12" dbname="Код рынка" name="Наименование рынка" shortname="Рынок" searchable="true" sortable="true" visible="true" link="market" linkKeyCode="code" linkCode="description" ignore="true"/>
<section type="12" dbname="Код наименования секции" name="Наименование секции" shortname="Секция" searchable="true" sortable="true" visible="true" link="section" linkCode="name"/>
<sessionType type="12" dbname="Код типа клиринговой сессии" name="Тип клиринговой сессии" shortname="Тип КС" searchable="true" sortable="true" visible="true" link="sessionType" linkCode="name"/>
<taskStatus type="12" dbname="Код статуса" name="Наименование статуса" shortname="Статус" searchable="true" sortable="true" visible="true" link="taskStatus"/>
<companyId type="1" dbname="Идентификатор компании" name="Наименование компании" shortname="Компания" searchable="false" sortable="false" link="company" linkCode="shortName"/>
<securityId type="1" dbname="Идентификатор инструмента" name="Наименование инструмента" shortname="Инструмент" searchable="true" sortable="true" link="security" linkCode="shortName"/>
<parent type="12" dbname="Код источника записи расписания" name="Источник записи расписания" shortname="Источник" searchable="true" sortable="true" link="parent"/>
<parentId type="1" name="Идентификатор записи в таблице-источнике" shortname="ID источника" searchable="false" sortable="false"/>
<id type="1" name="Идентификатор" shortname="ID" searchable="true" sortable="true"/>
</plannerAllToday>
<launcher name="Запуск задачи" destination="launchers" class="ru.clearing.classes.statics.data.scheduler.Launcher" table="launcher">
<senderId type="1" dbname="Идентификатор отправителя" name="Наименование отправителя" shortname="Отправитель" searchable="true" sortable="true" visible="true" link="userCls" linkCode="identifier"/>
<task type="12" dbname="Код задачи" name="Наименование задачи" shortname="Задача" searchable="true" sortable="true" visible="true" link="task"/>
<id type="1" name="Идентификатор" shortname="ID" searchable="true" sortable="true"/>
<createdAt field="created" type="4" webtype="5" dbname="Дата-время создания записи" name="Время создания записи" shortname="Создано" searchable="true" sortable="true"/>
<updatedAt field="updated" type="4" webtype="5" dbname="Дата-время изменения записи" name="Время изменения записи" shortname="Изменено" searchable="true" sortable="true"/>
<taskStatus type="12" dbname="Код статуса" name="Наименование статуса" shortname="Статус" searchable="true" sortable="true" visible="true" link="taskStatus"/>
<companyId type="1" dbname="Идентификатор компании" name="Наименование компании" shortname="Компания" searchable="false" sortable="false" link="company" linkCode="shortName"/>
<securityId type="1" dbname="Идентификатор инструмента" name="Наименование инструмента" shortname="Инструмент" searchable="true" sortable="true" link="security" linkCode="shortName"/>
<parent type="12" dbname="Код источника записи расписания" name="Источник записи расписания" shortname="Источник" searchable="true" sortable="true" link="parent"/>
<parentId type="1" name="Идентификатор записи в таблице-источнике" shortname="ID источника" searchable="false" sortable="false"/>
<id type="1" name="Идентификатор" shortname="ID" searchable="true" sortable="true"/>
</plannerAllToday>
<launcher name="Запуск задачи" destination="launchers" class="ru.clearing.classes.statics.data.scheduler.Launcher" table="launcher">
<senderId type="1" dbname="Идентификатор отправителя" name="Наименование отправителя" shortname="Отправитель" searchable="true" sortable="true" visible="true" link="userCls" linkCode="identifier"/>
<task type="12" dbname="Код задачи" name="Наименование задачи" shortname="Задача" searchable="true" sortable="true" visible="true" link="task"/>
<id type="1" name="Идентификатор" shortname="ID" searchable="true" sortable="true"/>
<createdAt field="created" type="4" webtype="5" dbname="Дата-время создания записи" name="Время создания записи" shortname="Создано" searchable="true" sortable="true"/>
<updatedAt field="updated" type="4" webtype="5" dbname="Дата-время изменения записи" name="Время изменения записи" shortname="Изменено" searchable="true" sortable="true"/>
<actions>
<post destination="GVER" group="Общее" name="Запуск сверки">
</post>
<post destination="GRYT" group="Общее" name="Подготовка КС к клиринговому дню">
</post>
<post destination="LOCM" group="Обмен с интеграционными модулями" name="Загрузка участников">
</post>
</post>
<post destination="LOSC" group="Обмен с интеграционными модулями" name="Загрузка инструментов">
</post>
<post destination="GALB" group="Обмен с расчетной организацией" name="Запрос остатков по всем счетам (отправка ДФ-56 для получения ответа ДФ-01, ДФ-57)">
<fromTime type="5" name="Запросить с " shortname="Запросить с "/>
</post>
<post destination="OUTV" group="Обмен с расчетной организацией" name="Вывод свободных средств с клирингового регистра (отправка ДФ-54 для получения ответа ДФ-55)">
<fullBalance type="10" name="Текущий баланс (всего)" shortname="Текущие средства (всего)" enabled="false"/>
@ -1364,12 +1247,9 @@
<creditLeg_accountId type="1" group="Отправитель" name="Наименование счета отправителя" shortname="Регистр списания" link="account" linkCode="account"/>
<addresseeId type="1" group="Получатель" name="Участник получатель" shortname="Получатель" link="company" linkCode="shortName" required="true" enabled="false"/>
<debitLeg_accountId type="1" group="Получатель" name="Наименование счета получателя" shortname="Счет получателя" link="bankAccount" linkCode="correspondentAccount"/>
<swiftCode type="2" length="255" group="Получатель" shortname="SWIFT" enabled="false"/>
</post>
<post destination="GTRD" group="Обмен с Торговой системой" name="Получение сделок из Торговой системы">
</post>
<post destination="CBRR" group="Обмен с интеграционными модулями" name="Загрузка кросс-курсов">
</post>
<post destination="LIMM" group="Обмен с Торговой системой" name="Выгрузка в Торговую систему остатков по деньгам (отправка lim)">
</post>
<post destination="LIMS" group="Обмен с Торговой системой" name="Выгрузка в Торговую систему остатков по бумагам (отправка lim)">
@ -1382,9 +1262,23 @@
</post>
<post destination="GREP" group="Формирование отчетности" name="Формирование промежуточной отчетности">
</post>
<post destination="GBRR" group="Формирование реестров" name="Формирование реестров за период">
<fromDate type="6" name="С дата" shortname="с"/>
<toDate type="6" name="По дату" shortname="по"/>
<post destination="GRRT" group="Формирование реестров" name="Формирование реестра остатков ценных бумаг">
</post>
<post destination="GBRR" group="Формирование реестров" name="Формирование реестра остатков денежных средств">
</post>
<post destination="ADLR" group="Формирование реестров" name="Формирование реестра обязательств, допущенных к клирингу">
</post>
<post destination="CDLR" group="Формирование реестров" name="Формирование реестра обязательств, прошедших процедуру контроля обеспечения">
</post>
<post destination="GORR" group="Формирование реестров" name="Формирование реестра распоряжений, направленных расчетной организации">
</post>
<post destination="GORD" group="Формирование реестров" name="Формирование реестра распоряжений, направленных расчетному депозитарию">
</post>
<post destination="EXLR" group="Формирование реестров" name="Формирование реестра обязательств, исключенных из клирингового пула">
</post>
<post destination="LBSR" group="Формирование реестров" name="Формирование реестра учета обязательств">
</post>
<post destination="ECNR" group="Формирование реестров" name="Формирование реестра сделок">
</post>
<post destination="GRET" group="Формирование отчетности" name="Формирование отчетности PFX64/PFX65">
</post>
@ -1393,19 +1287,16 @@
<post destination="FDFF" group="Обмен с расчетной организацией" name="Формирование ДФ-05 с кодом 9 (финальный)">
</post>
<post destination="CHDF" group="Общее" name="Проверка наличия пары ДФ-01/ДФ-57 и ДФ-08/ДФ-21">
</post>
</post>
<post destination="CCLR" group="Клиринг" name="Завершение неудачных клиринговых сессий">
</post>
<post destination="MTCR" group="Обмен с интеграционными модулями" name="Выгрузка ТКР">
</post>
<post destination="LIMC" group="Обмен с Торговой системой" name="Выгрузка в Торговую систему остатков по валют (отправка lim)">
</post>
</actions>
</launcher>
<session name="Клиринговые сессии" destination="sessions" historyDestination="history" class="ru.clearing.classes.statics.data.misc.Session" logUpdates="true" table="session">
</launcher>
<session name="Клиринговые сессии" destination="sessions" class="ru.clearing.classes.statics.data.misc.Session" logUpdates="true" table="session">
<id type="1" name="Идентификатор записи" shortname="ID" searchable="true" sortable="true"/>
<createdAt field="created" type="4" webtype="5" dbname="Дата-время создания записи" name="Время создания записи" shortname="Создано" searchable="true" sortable="true"/>
<updatedAt field="updated" type="4" webtype="5" dbname="Дата-время изменения записи" name="Время изменения записи" shortname="Завершено" searchable="true" sortable="true"/>
<createdAt field="created" type="4" webtype="5" dbname="Дата-время создания записи" name="Время создания записи" shortname="Создано" searchable="true" sortable="true" ignore="true"/>
<updatedAt field="updated" type="4" webtype="5" dbname="Дата-время изменения записи" name="Время изменения записи" shortname="Изменено" searchable="true" sortable="true" ignore="true"/>
<clearingDate type="6" name="Дата" shortname="Дата" searchable="true" sortable="true" visible="true"/>
<sessionStatus type="12" dbname="Код статуса клиринговой сессии" name="Статус клиринговой сессии" shortname="Шаг" searchable="true" sortable="true" visible="true" link="sessionStatus"/>
<companyId type="1" dbname="Идентификатор инициатора торгов" name="Наименование инициатора торгов" shortname="Инициатор" visible="false" searchable="true" sortable="true" link="company" linkCode="shortName"/>
@ -1470,7 +1361,7 @@
<tradingDate type="6" name="Дата заключения сделки" shortname="Дата заключения сделки" visible="true" searchable="true" sortable="true"/>
<tradingClearingRegistryId type="1" dbname="Идентификатор торгово-клирингового регистра" name="Торгово-клиринговый регистр" shortname="ТКР" visible="true" searchable="true" sortable="true" link="tradingClearingRegistry" linkCode="code"/>
<partyTradingClearingRegistry type="2" length="20" dbname="Торгово-клиринговый регистр " name="Торгово-клиринговый регистр " shortname="ТКР " searchable="true" sortable="true" ignore="true"/>
<market type="2" length="8" dbname="Код секции финансового инструмента" name="Секция финансового инструмента" shortname="Секция" visible="true" searchable="true" sortable="true"/>
<market type="2" length="8" dbname="Код секции финансового инструмента" name="Секция финансового инструмента" shortname="Секция" visible="true" searchable="true" sortable="true" link="market" linkKeyCode="code" linkCode="description"/>
<price type="10" name="Ставка по депозиту" shortname="Ставка, %" visible="true" searchable="true" sortable="true"/>
<lots type="11" name="Количество лотов" shortname="Лоты" visible="true" searchable="true" sortable="true"/>
<quantity type="11" name="Количество штук" shortname="Штуки" visible="false" searchable="true" sortable="true"/>
@ -1507,7 +1398,7 @@
<clearingDate type="6" name="Дата клиринга" shortname="Дата клиринга" visible="false" searchable="true" sortable="true"/>
<exchangeExecutionId type="1" name="Идентификационный номер сделки в Торговой системе" shortname="Номер сделки" visible="true" searchable="true" sortable="true"/>
<side type="12" dbname="Код направления сделки" name="Направление сделки" shortname="Направление" visible="true" searchable="true" sortable="true" link="side"/>
<market type="12" dbname="Код секции финансового инструмента" name="Секция финансового инструмента" shortname="Секция" visible="true" searchable="true" sortable="true"/>
<market type="12" dbname="Код секции финансового инструмента" name="Секция финансового инструмента" shortname="Секция" visible="true" searchable="true" sortable="true" link="market" linkKeyCode="code" linkCode="description"/>
<tradingDate type="6" name="Дата заключения сделки" shortname="Дата заключения сделки" visible="true" searchable="true" sortable="true"/>
<securitySymbol type="2" length="255" name="Код инструмента в Торговой Системе" shortname="Код инструмента" visible="true" searchable="true" sortable="true"/>
<securityId type="1" dbname="Идентификатор финансового инструмента" name="Финансовый инструмент" shortname="Код биржевого инструмента / товара" searchable="true" sortable="true" link="security" linkCode="securitySymbol" ignore="true"/>
@ -1535,65 +1426,29 @@
<coverageStatus type="12" dbname="Код статуса достаточности обеспечения" name="Cтатус достаточности обеспечения" shortname="Обеспеченность" searchable="true" sortable="true" link="allowed"/>
<sessionId type="1" dbname="Идентификатор клиринговой сессии" name="Клиринговая сессия" shortname="Сессия" visible="true" searchable="true" sortable="true" link="session"/>
</executionFond>
<executionCurrency name="Сделки с валютными инструментами" destination="execution-currency" class="ru.clearing.classes.statics.data.execution.ExecutionCurrency" logUpdates="true" table="execution_currency">
<exchangeExecutionId type="1" name="Идентификационный номер сделки в Торговой системе" shortname="Номер сделки" visible="true" searchable="true" sortable="true"/>
<exchangeExecutionTime type="4" name="Время заключения сделки в Торговой системе" shortname="Время заключения сделки" visible="true" searchable="true" sortable="true"/>
<exchangeExecutionMicroseconds type="4" name="Микросекунды заключения сделки в Торговой системе" shortname="Микросекунды заключения сделки" visible="true" searchable="true" sortable="true"/>
<tradingDate type="6" name="Дата заключения сделки" shortname="Дата заключения сделки" visible="true" searchable="true" sortable="true"/>
<settlementDate type="6" name="Дата расчетов" shortname="Дата расчетов" visible="true" searchable="true" sortable="true"/>
<settlementCode type="2" length="12" name="Код расчетов при размещении" shortname="Код расчетов при размещении" visible="false" searchable="true" sortable="true" ignore="true"/>
<securityId type="1" dbname="Идентификатор финансового инструмента" name="Финансовый инструмент" shortname="Код биржевого инструмента / товара" searchable="true" sortable="true" link="security" linkCode="securitySymbol" ignore="true"/>
<securitySymbol type="2" length="255" name="Код инструмента в Торговой Системе" shortname="Код инструмента" visible="true" searchable="true" sortable="true"/>
<securityName type="2" length="255" name="Краткое наименование инструмента" shortname="Наименование инструмента" searchable="true" sortable="true" visible="true"/>
<companyId type="1" dbname="Идентификатор компании" name="Наименование компании" shortname="Компания" visible="true" searchable="true" sortable="true" link="company" linkCode="shortName"/>
<partyTradingClearingRegistryId type="1" dbname="Идентификатор торгово-клирингового регистра" name="Торгово-клиринговый регистр" shortname="ТКР" visible="true" searchable="true" sortable="true" link="tradingClearingRegistry" linkCode="code"/>
<partyTradingClearingRegistry type="2" length="20" dbname="Торгово-клиринговый регистр " name="Торгово-клиринговый регистр " shortname="ТКР " searchable="true" sortable="true" ignore="true"/>
<counterPartyId type="1" dbname="Идентификатор компании-партнера, с которой заключена сделка" name="Наименование компании-партнера, с которой заключена сделка" shortname="Партнер" visible="false" searchable="true" sortable="true" link="company" linkCode="shortName"/>
<counterPartyTradingClearingRegistryId type="1" dbname="Идентификатор торгово-клирингового регистра партнера" name="Торгово-клиринговый регистр партнера" shortname="ТКР партнера" visible="true" searchable="true" sortable="true" link="tradingClearingRegistry" linkCode="code" ignore="true"/>
<counterPartyTradingClearingRegistry type="2" length="20" dbname="Торгово-клиринговый регистр партнера" name="Торгово-клиринговый регистр партнера" shortname="ТКР партнера" visible="true" searchable="true" sortable="true" />
<market type="12" dbname="Код секции валютного инструмента" name="Секция валютного инструмента" shortname="Секция" visible="true" searchable="true" sortable="true" link="market" linkKeyCode="code" linkCode="description"/>
<price type="10" name="Цена" shortname ="Цена" visible="true" searchable="true" sortable="true"/>
<lotSize type="11" name="Размер лота" shortname="Лот" searchable="true" sortable="true" visible="true" linkKeyCode="securityId" linkCode="lotSize" link="listing" extends="listing"/>
<lots type="11" name="Количество лотов" shortname="Лоты" visible="true" searchable="true" sortable="true"/>
<settlementAmount type="11" name="Объем сделки в валюте лота" shortname="Объем в валюте" visible="true" searchable="true" sortable="true"/>
<quantity type="11" name="Количество штук" shortname="Количество штук" visible="true" searchable="true" sortable="true"/>
<side type="12" dbname="Код направления сделки" name="Направление сделки" shortname="Направление" visible="true" searchable="true" sortable="true" link="side"/>
<currencyCode type="12" name="Код валюты лота" shortname="Код валюты лота" searchable="true" sortable="true" link="currencyCode" linkCode="code"/>
<settlementOrganization type="2" length="255" name="Наименование расчетной организации" shortname="Расчетная организация" searchable="true" sortable="true" visible="true"/>
<coverageStatus type="12" dbname="Код статуса достаточности обеспечения" name="Cтатус достаточности обеспечения" shortname="Обеспеченность" searchable="true" sortable="true" link="allowed"/>
<sessionId type="1" dbname="Идентификатор клиринговой сессии" name="Клиринговая сессия" shortname="Сессия" visible="true" searchable="true" sortable="true" link="session"/>
<clearingDate type="6" name="Дата клиринга" shortname="Дата клиринга" visible="false" searchable="true" sortable="true"/>
<id type="1" name="Идентификатор записи" shortname="ID" visible="false" searchable="true" sortable="true"/>
<createdAt field="created" type="4" webtype="5" dbname="Дата-время создания записи" name="Время создания записи" shortname="Создано" visible="false" searchable="true" sortable="true"/>
<updatedAt field="updated" type="4" webtype="5" dbname="Дата-время изменения записи" name="Время изменения записи" shortname="Изменено" visible="false" searchable="true" sortable="true"/>
</executionCurrency>
<depoBalanceRegister name="Реестр остатков ценных бумаг" destination="depo-balance-registers" historyDestination="history" class="ru.clearing.classes.statics.data.register.DepoBalanceRegister" table="balance_depo_register">
<id type="1" name="Идентификатор записи" shortname="ID" searchable="true" sortable="true" ignore="true"/>
<createdAt field="created" type="4" webtype="5" dbname="Дата-время создания записи" name="Время создания записи" shortname="Создано" searchable="true" sortable="true"/>
<createdAt field="created" type="4" webtype="5" dbname="Дата-время создания записи" name="Время создания записи" shortname="Создано" searchable="true" sortable="true"/>
<updatedAt field="updated" type="4" webtype="5" dbname="Дата-время изменения записи" name="Время изменения записи" shortname="Изменено" searchable="true" sortable="true" ignore="true"/>
<companyId type="1" dbname="Идентификатор компании" name="Наименование компании" shortname="Компания" visible="true" searchable="true" sortable="true" link="company" linkCode="shortName"/>
<companyId type="1" dbname="Идентификатор компании" name="Наименование компании" shortname="Компания" visible="true" searchable="true" sortable="true" link="company" linkCode="shortName"/>
<sessionId type="1" dbname="Идентификатор клиринговой сессии" name="Клиринговая сессия" shortname="Сессия" visible="true" searchable="true" sortable="true" link="session" ignore="true"/>
<setHouseName type="2" length="255" name="Наименование РД" shortname="Наименование РД" searchable="true" sortable="true" visible="true"/>
<number type="2" length="255" name="Номер отчета" shortname="Номер отчета" searchable="true" sortable="true" visible="true"/>
<depoCode type="2" length="50" name="Код раздела субсчета/счета депо" shortname="Код счета депо" searchable="true" sortable="true"/>
<quantity type="11" name="Количество" shortname="Количество" searchable="true" sortable="true"/>
<depoCode type="2" length="50" name="Код раздела субсчета/счета депо" shortname="Код счета депо" searchable="true" sortable="true"/>
<quantity type="11" name="Количество" shortname="Количество" searchable="true" sortable="true"/>
<securitySymbol type="2" length="255" name="Код ценной бумаги" shortname="Ценная бумага" searchable="true" sortable="true"/>
</depoBalanceRegister>
<moneyBalanceRegister name="Реестр остатков денежных средств" destination="money-balance-registers" historyDestination="history" class="ru.clearing.classes.statics.data.register.MoneyBalanceRegister" table="money_balance_register">
<setHouseName type="2" length="255" name="Наименование РО" shortname="Наименование РО" searchable="true" sortable="true" visible="true"/>
<number type="2" length="255" name="Номер отчета" shortname="Номер отчета" searchable="true" sortable="true" visible="true"/>
<createdAt field="created" type="4" webtype="5" dbname="Дата-время создания записи" name="Время создания записи" shortname="Создано" searchable="true" sortable="true"/>
<currencyCode type="12" dbname="Код валюты" name="Код валюты" shortname="Валюта" searchable="true" sortable="true" visible="true" link="currencyCode" linkCode="code"/>
<companyId type="1" dbname="Идентификатор компании" name="Наименование компании" shortname="Компания" searchable="true" sortable="true" visible="true" link="company" linkCode="shortName"/>
<account type="2" length="50" name="Номер торгового /клирингового счета/ счета внутреннего учета СПВБ" shortname="Счет" searchable="true" sortable="true" visible="true"/>
<remainderSum type="10" name="Остаток денежных средств" shortname="Остаток" searchable="true" sortable="true"/>
<account type="2" length="50" name="Номер торгового/клирингового счета" shortname="Номер торгового/клирингового счета" searchable="true" sortable="true" visible="true"/>
<infoAccount type="2" length="50" name="Номер счета внутреннего учета СПВБ" shortname="Номер счета внутреннего учета СПВБ" searchable="true" sortable="true" visible="true" ignore="true"/>
<companyFullName type="2" length="255" name="Полное наименование компании" shortname="Полное наименование компании" searchable="true" sortable="true" visible="true" ignore="true"/>
<id type="1" name="Идентификатор записи" shortname="ID" searchable="true" sortable="true" ignore="true"/>
<inn type="2" length="255" name="Идентификационный номер налогоплательщика (ИНН)" shortname="ИНН" searchable="true" sortable="true" visible="true" ignore="true"/>
<sessionId type="1" dbname="Идентификатор клиринговой сессии" name="Клиринговая сессия" shortname="Сессия" visible="true" searchable="true" sortable="true" link="session" ignore="true"/>
<remainderSum type="10" name="Остаток денежных средств" shortname="Остаток" searchable="true" sortable="true"/>
<blockedSum type="10" name="Сумма блокированных денежных средств" shortname="Блокированные" searchable="true" sortable="true" ignore="true"/>
<unblockedSum type="10" name="Сумма свободных денежных средств" shortname="Свободные" searchable="true" sortable="true" ignore="true"/>
<inn type="2" length="255" name="Идентификационный номер налогоплательщика (ИНН)" shortname="ИНН" searchable="true" sortable="true" visible="true" ignore="true"/>
<sessionId type="1" dbname="Идентификатор клиринговой сессии" name="Клиринговая сессия" shortname="Сессия" visible="true" searchable="true" sortable="true" link="session" ignore="true"/>
<companyFullName type="2" length="255" name="Полное наименование компании" shortname="Полное наименование компании" searchable="true" sortable="true" visible="true" ignore="true"/>
<companyId type="1" dbname="Идентификатор компании" name="Наименование компании" shortname="Компания" searchable="true" sortable="true" visible="true" link="company" linkCode="shortName"/>
<id type="1" name="Идентификатор записи" shortname="ID" searchable="true" sortable="true" ignore="true"/>
<createdAt field="created" type="4" webtype="5" dbname="Дата-время создания записи" name="Время создания записи" shortname="Создано" searchable="true" sortable="true"/>
<updatedAt field="updated" type="4" webtype="5" dbname="Дата-время изменения записи" name="Время изменения записи" shortname="Изменено" searchable="true" sortable="true" ignore="true"/>
</moneyBalanceRegister>
<admittedLiabilitiesRegister name="Реестр обязательств, допущенных к клирингу" destination="admitted-liabilities-registers" historyDestination="history" class="ru.clearing.classes.statics.data.register.AdmittedLiabilitiesRegister" table="admitted_liabilities_register">
@ -1609,7 +1464,7 @@
<createdAt field="created" type="4" webtype="5" dbname="Дата-время создания записи" name="Время создания записи" shortname="Создано" searchable="true" sortable="true" visible="false"/>
<updatedAt field="updated" type="4" webtype="5" dbname="Дата-время изменения записи" name="Время изменения записи" shortname="Изменено" searchable="true" sortable="true" visible="false"/>
<clearingDate type="6" name="Дата клиринга" shortname="Дата клиринга" searchable="true" sortable="true" visible="false"/>
</admittedLiabilitiesRegister>
</admittedLiabilitiesRegister>
<coveredLiabilitiesRegister name="Реестр обязательств, прошедших процедуру контроля обеспечения" destination="covered-liabilities-registers" historyDestination="history" class="ru.clearing.classes.statics.data.register.CoveredLiabilitiesRegister" table="covered_Liabilities_register">
<companyFullName type="2" length="255" name="Полное наименование компании" shortname="Полное наименование компании" searchable="true" sortable="true" visible="true"/>
<sessionId type="1" dbname="Идентификатор клиринговой сессии" name="Клиринговая сессия" shortname="Сессия" visible="true" searchable="true" sortable="true" link="session"/>
@ -1623,7 +1478,7 @@
<createdAt field="created" type="4" webtype="5" dbname="Дата-время создания записи" name="Время создания записи" shortname="Создано" searchable="true" sortable="true" visible="false"/>
<updatedAt field="updated" type="4" webtype="5" dbname="Дата-время изменения записи" name="Время изменения записи" shortname="Изменено" searchable="true" sortable="true" visible="false"/>
<clearingDate type="6" name="Дата клиринга" shortname="Дата клиринга" searchable="true" sortable="true" visible="false"/>
</coveredLiabilitiesRegister>
</coveredLiabilitiesRegister>
<moneyPaymentInstructionRegister name="Реестр распоряжений, направленных расчетной организации" destination="money-payment-instruction-registers" historyDestination="history" class="ru.clearing.classes.statics.data.register.MoneyPaymentInstructionRegister" table="money_payment_instruction_register">
<creditLegAccount type="2" length="50" name="Счет отправителя" shortname="Счет отправителя" searchable="true" sortable="true" visible="true"/>
<creditLegAmount type="10" name="Сумма отправителя" shortname="Сумма отправителя" searchable="true" sortable="true" visible="true"/>
@ -1645,7 +1500,7 @@
<tradingClearingRegistry type="2" length="50" name="Торгово-клиринговый регистр" shortname="ТКР" searchable="true" sortable="true"/>
<cbCode type="2" length="50" name="Код ЦБ" shortname="Код ЦБ" searchable="true" sortable="true"/>
<quantity type="11" name="Количество" shortname="Количество" searchable="true" sortable="true" visible="true"/>
<direction type="1" name="Направление" shortname="Направление" searchable="true" sortable="true" link="inOutDirection" ignore="true"/>
<direction type="1" name="Направление" shortname="Направление" searchable="true" sortable="true" link="inOutDirection" ignore="true"/>
<sessionId type="1" dbname="Идентификатор клиринговой сессии" name="Клиринговая сессия" shortname="Сессия" visible="true" searchable="true" sortable="true" link="session"/>
</depoPaymentInstructionRegister>
<excludeLiabilitiesRegister name="Реестр обязательств, исключенных из клирингового пула" destination="exclude-liabilities-registers" historyDestination="history" class="ru.clearing.classes.statics.data.register.ExcludeLiabilitiesRegister" table="exclude_liabilities_register">
@ -1666,25 +1521,6 @@
<sumLiabilities type="10" name="Сумма обязательств" shortname="Обязательства" searchable="true" sortable="true" visible="true"/>
<settlementDate type="6" name="Дата расчета" shortname="Расчет" searchable="true" sortable="true"/>
</excludeLiabilitiesRegister>
<pairSdf name="Пары файлов" destination="pair-sdf" class="ru.clearing.classes.statics.data.register.PairSdf" table="pair_sdf">
<id type="1" name="Идентификатор записи" shortname="ID" searchable="true" sortable="true"/>
<createdAt field="created" type="4" webtype="5" name="Время создания записи" shortname="Создано" searchable="true" sortable="true" visible="true"/>
<updatedAt field="updated" type="4" webtype="5" name="Время изменения записи" shortname="Изменено" searchable="true" sortable="true" visible="true"/>
<inSDfId type="2" length="255" name="Идентификатор входящего файла" shortname="Входящая запись" searchable="true" sortable="true" ignore="true"/>
<inSDf type="2" length="255" name="Входящий файл" shortname="Входящий" searchable="true" sortable="true" visible="true"/>
<outSDfId type="2" length="255" name="Идентификатор исходящего файла" shortname="Исходящий файл" searchable="true" sortable="true" ignore="true"/>
<outSDf type="2" length="255" name="Исходящий файл" shortname="Исходящий файл" searchable="true" sortable="true" visible="true"/>
</pairSdf>
<gatewayResult name="Результаты запросов к ТС" destination="gateway-result" class="ru.clearing.classes.statics.data.register.GatewayResult" table="gateway_result">
<id type="1" name="Идентификатор записи" shortname="ID" searchable="true" sortable="true"/>
<createdAt field="created" type="4" webtype="5" name="Время создания записи" shortname="Создано" searchable="true" sortable="true" visible="true"/>
<updatedAt field="updated" type="4" webtype="5" name="Время изменения записи" shortname="Изменено" searchable="true" sortable="true" visible="true"/>
<requestId type="2" length="255" name="ID запроса" shortname="ID" searchable="true" sortable="true" visible="true"/>
<nameRequest type="2" length="255" name="Наименование запроса" shortname="Наименование" searchable="true" sortable="true" visible="true"/>
<request type="2" length="1023" name="Тело запроса" shortname="Запрос" searchable="true" sortable="true" visible="true"/>
<result type="2" length="1023" name="Тело ответа" shortname="Ответ" searchable="true" sortable="true" visible="true"/>
<gatewayResultStatus type="12" name="Статус запроса" shortname="Статус" searchable="true" sortable="true" link="gatewayResultStatus" visible="true"/>
</gatewayResult>
<liabilitiesRegister name="Реестр учета обязательств" destination="liabilities-registers" historyDestination="history" class="ru.clearing.classes.statics.data.register.LiabilitiesRegister" table="liabilities_register">
<id type="1" name="Идентификатор записи" shortname="ID" searchable="true" sortable="true"/>
<createdAt field="created" type="4" webtype="5" dbname="Дата-время создания записи" name="Время создания записи" shortname="Создано" searchable="true" sortable="true" ignore="true"/>
@ -1738,8 +1574,8 @@
<settlementDate type="6" name="Дата расчетов" shortname="Дата расчетов" searchable="true" sortable="true"/>
<amount type="11" name="Объем" shortname="Объем" searchable="true" sortable="true" visible="true"/>
<operationStatus type="12" dbname="Код статуса обработки" name="Наименование статуса обработки" shortname="Статус" searchable="true" sortable="true" visible="true" link="operationStatus"/>
<errorCodeId type="1" dbname="Идентификатор кода ошибки" name="Код ошибки" shortname="Код ошибки" searchable="true" sortable="true" visible="true" link="errorCode" linkCode="code" linkKeyCode="id"/>
<errorTextId type="1" dbname="Идентификатор полного текста ошибки" name="Полный текст ошибки" shortname="Ошибка" searchable="true" sortable="true" visible="true" link="errorText" linkCode="text"/>
<errorCodeId type="1" dbname="Идентификатор кода ошибки" name="Код ошибки" shortname="Код ошибки" searchable="true" sortable="true" visible="true" link="errorCode" linkCode="code" linkKeyCode="id"/>
<errorTextId type="1" dbname="Идентификатор полного текста ошибки" name="Полный текст ошибки" shortname="Ошибка" searchable="true" sortable="true" visible="true" link="errorText" linkCode="text"/>
<inSDfId type="1" name="Идентификатор записи, инициировавшая изменения этой таблицы" shortname="Входящая запись" searchable="true" sortable="true" ignore="true"/>
<outSDfId type="1" name="Идентификатор записи, сформированная в результате изменения этой таблицы" shortname="Исходящая запись" searchable="true" sortable="true" ignore="true"/>
<inOutSDfType type="12" dbname="Код типа входящей и исходящей записей" name="Типы входящей и исходящей записей" shortname="Типы входящей и исходящей записей" searchable="true" sortable="true" ignore="true" link="inOutSDfType"/>
@ -1794,11 +1630,11 @@
<id type="1" name="Идентификатор записи" shortname="ID" searchable="true" sortable="true"/>
<clearingDate type="6" name="Дата" shortname="Дата" searchable="true" sortable="true" visible="true"/>
<createdAt field="created" type="4" webtype="5" dbname="Дата-время создания записи" name="Время создания записи" shortname="Создано" searchable="true" sortable="true" visible="true"/>
<updatedAt field="updated" type="4" webtype="5" dbname="Дата-время изменения записи" name="Время прочтения записи" shortname="Прочитано" searchable="true" sortable="true"/>
<senderId type="1" dbname="Идентификатор компании-отправителя" name="Наименование компании-отправителя" shortname="Отправитель" searchable="true" sortable="true" link="company" ignore="true"/>
<updatedAt field="updated" type="4" webtype="5" dbname="Дата-время изменения записи" name="Время изменения записи" shortname="Изменено" searchable="true" sortable="true"/>
<senderId type="1" dbname="Идентификатор отправителя" name="Наименование отправителя" shortname="Отправитель" searchable="true" sortable="true" visible="true" link="userCls" linkCode="identifier"/>
<addresseeId type="1" dbname="Идентификатор компании-получателя" name="Наименование компании-получателя" shortname="Получатель" searchable="true" sortable="true" link="company" ignore="true"/>
<objectType type="12" dbname="Код типа объекта" name="Наименование типа объекта" shortname="Объект" searchable="true" sortable="true" link="objectType" ignore="true"/>
<objectId type="1" name="Идентификатор объекта" shortname="ID объекта" searchable="true" sortable="true" ignore="true"/>
<objectId type="1" name="Идентификатор объекта" shortname="ID объекта" searchable="true" sortable="true" ignore="true"/>
<notificationStatus type="12" dbname="Код статуса сообщения" name="Наименование статуса сообщения" shortname="Статус" searchable="true" sortable="true" visible="true" link="notificationStatus"/>
<comment type="2" length="255" name="Текст сообщения" shortname="Сообщение" searchable="true" sortable="true" visible="true"/>
<priority type="12" dbname="Код приоритета отображения" name="Наименование приоритета отображения" shortname="Приоритет отображения" searchable="true" sortable="true" link="priority"/>
@ -1816,7 +1652,7 @@
<outIntSum type="11" name="Исходящая сумма остатков, полученная в КС" shortname="Остатки, полученные в КС" visible="true" searchable="true" sortable="true"/>
<outExtSum type="11" name="Исходящая сумма остатков из отчета ПРЦ" shortname="Остатки, полученные из ПРЦ" visible="true" searchable="true" sortable="true"/>
<diffSum type="11" name="Сумма расхождений" shortname="Сумма расхождений" visible="true" searchable="true" sortable="true"/>
<generationId type="1" name="Идентификатор взаимодействия" shortname="ID взаимодействия" searchable="true" sortable="true"/>
<generationId type="1" name="Идентификатор взаимодействия" shortname="ID взаимодействия" searchable="true" sortable="true"/>
<generationStatus type="12" dbname="Код общего статуса сверки" name="Наименование общего статуса сверки" shortname="Статус" searchable="true" sortable="true" visible="true" link="resultStatus"/>
<resultStatus type="12" dbname="Код статуса сверки" name="Наименование статуса сверки" shortname="Статус" searchable="true" sortable="true" visible="true" link="resultStatus"/>
<id type="1" name="Идентификатор записи" shortname="ID" searchable="true" sortable="true"/>
@ -1858,7 +1694,6 @@
<result type="2" length="3" name="Результат обработки каждой записи исходного файла ДФ-01" shortname="Результат обработки ДФ-01" searchable="true" sortable="true" visible="true"/>
<generationTime type="4" name="Дата и время создания записи" shortname="Дата и время создания" searchable="true" sortable="true" visible="true"/>
<generationId type="1" name="Идентификатор взаимодействия" shortname="ID взаимодействия" searchable="true" sortable="true" visible="true"/>
<fileName type="2" length="255" name="Наименование входящего файла" shortname="Наименование файла" searchable="true" sortable="true" visible="true"/>
<inSDfId type="1" name="Идентификатор соответствующей записи из таблицы-источника" shortname="Входящая запись" searchable="true" sortable="true" visible="true"/>
</sDf02>
<sDf03 name="ДФ-03 Реестр платежных поручений" destination="s-dfs/s-df03" class="ru.clearing.classes.statics.data.sdf.SDf03" table="s_df_03">
@ -1884,7 +1719,6 @@
<sum_deb type="2" length="22" name="Сумма дебет" shortname="Сумма дебет" searchable="true" sortable="true" visible="true"/>
<specif_1 type="2" length="255" name="Назначение платежа" shortname="Назначение платежа" searchable="true" sortable="true" visible="true"/>
<imp_result type="2" length="3" name="Результат приема" shortname="Результат приема" searchable="true" sortable="true" visible="true"/>
<fileName type="2" length="255" name="Наименование входящего файла" shortname="Наименование файла" searchable="true" sortable="true" visible="true"/>
<generationTime type="4" name="Дата и время создания записи" shortname="Дата и время создания" searchable="true" sortable="true" visible="true"/>
<generationId type="1" name="Идентификатор взаимодействия" shortname="ID взаимодействия" searchable="true" sortable="true" visible="true"/>
<paymentInstructionId type="1" name="Идентификатор соответствующей записи из таблицы-источника" shortname="Входящая запись" searchable="true" sortable="true" visible="true" link="paymentInstruction"/>
@ -1940,9 +1774,6 @@
<fileName type="2" length="255" name="Наименование входящего файла" shortname="Наименование файла" searchable="true" sortable="true" visible="true"/>
<generationTime type="4" name="Дата и время обработки файла" shortname="Дата и время обработки" searchable="true" sortable="true" visible="true"/>
<generationId type="1" name="Идентификатор взаимодействия" shortname="ID взаимодействия" searchable="true" sortable="true" visible="true"/>
<Doc_Num field="Doc_Num" type="2" length="3" name="Номер выгружаемого документа" shortname="Номер выгружаемого документа" searchable="true" sortable="true" visible="true"/>
<Doc_Date field="Doc_Date" type="2" length="8" name="Дата выгружаемого документа" shortname="Дата выгружаемого документа" searchable="true" sortable="true" visible="true"/>
<pay_val type="2" length="12" name="Валюта документа" shortname="Валюта" searchable="true" sortable="true" visible="true"/>
</sDf06>
<sDf07 name="ДФ-07 Ответ на запрос по зачислению/списанию денежных средств" destination="s-dfs/s-df07" class="ru.clearing.classes.statics.data.sdf.SDf07" table="s_df_07">
<id type="1" name="Идентификатор записи" shortname="ID" searchable="true" sortable="true" visible="false"/>
@ -1957,13 +1788,9 @@
<spec type="2" length="255" name="Назначение" shortname="Назначение" searchable="true" sortable="true" visible="true"/>
<number type="10" name="Номер платежного документа (операции)" shortname="Номер платежного документа" searchable="true" sortable="true" visible="true"/>
<result type="10" name="Код завершения операции" shortname="Код завершения операции" searchable="true" sortable="true" visible="true"/>
<fileName type="2" length="255" name="Наименование входящего файла" shortname="Наименование файла" searchable="true" sortable="true" visible="true"/>
<generationTime type="4" name="Дата и время создания записи" shortname="Дата и время создания" searchable="true" sortable="true" visible="true"/>
<generationId type="1" name="Идентификатор взаимодействия" shortname="ID взаимодействия" searchable="true" sortable="true" visible="true"/>
<inSDfId type="1" name="Идентификатор соответствующей записи из таблицы-источника" shortname="Входящая запись" searchable="true" sortable="true" visible="true"/>
<Doc_Num field="Doc_Num" type="2" length="3" name="Номер выгружаемого документа" shortname="Номер выгружаемого документа" searchable="true" sortable="true" visible="true"/>
<Doc_Date field="Doc_Date" type="2" length="8" name="Дата выгружаемого документа" shortname="Дата выгружаемого документа" searchable="true" sortable="true" visible="true"/>
<pay_val type="2" length="12" name="Валюта документа" shortname="Валюта" searchable="true" sortable="true" visible="true"/>
</sDf07>
<sDf08 name="ДФ-08 Загрузка счетов с остатками" destination="s-dfs/s-df08" class="ru.clearing.classes.statics.data.sdf.SDf08" table="s_df_08">
<id type="1" name="Идентификатор записи" shortname="ID" searchable="true" sortable="true" visible="false"/>
@ -2022,7 +1849,6 @@
<transactionNumber type="2" length="255" name="Порядковый номер транзакции" shortname="Номер транзакции" searchable="true" sortable="true" visible="true"/>
<transactionQuantity type="2" length="255" name="Количество транзакций" shortname="Количество транзакций" searchable="true" sortable="true" visible="true"/>
<result type="2" length="255" name="Результат операции" shortname="Результат операции" searchable="true" sortable="true" visible="true"/>
<fileName type="2" length="255" name="Наименование входящего файла" shortname="Наименование файла" searchable="true" sortable="true" visible="true"/>
<generationTime type="4" name="Дата и время создания записи" shortname="Дата и время создания" searchable="true" sortable="true" visible="true"/>
<generationId type="1" name="Идентификатор взаимодействия" shortname="ID взаимодействия" searchable="true" sortable="true" visible="true"/>
</sDf12>
@ -2049,7 +1875,7 @@
<inDocument type="2" name="Исходящий номер входящего сообщения" shortname="Сформировано" searchable="true" sortable="true" visible="true"/>
<security type="2" name="Ценная бумага" shortname="Ценная бумага" searchable="true" sortable="true" visible="true"/>
<securityName type="2" name="Наименование ценной бумаги" shortname="Ценная бумага" searchable="true" sortable="true" visible="true"/>
<securityType type="2" name="Тип ценной бумаги" shortname="Ценная бумага" searchable="true" sortable="true" visible="true"/>
<securityType type="2" name="Тип ценной бумаги" shortname="Ценная бумага" searchable="true" sortable="true" visible="true"/>
<openBalance type="2" name="Входящий остаток" shortname="Входящий остаток" searchable="true" sortable="true" visible="true"/>
<depoCodeCl type="2" name="Код раздела тех.счета/счета депо/ и наименование клиента" shortname="Код раздела тех.счета/счета депо/ и наименование клиента" searchable="true" sortable="true" visible="true"/>
<nameCl type="2" name="Наименование клиента" shortname="Клиент" searchable="true" sortable="true" visible="true"/>
@ -2095,7 +1921,6 @@
<id type="1" name="Идентификатор записи" shortname="ID" searchable="true" sortable="true" visible="false"/>
<account type="2" length="25" name="Код счета участника клиринга" shortname="Код счета УК" searchable="true" sortable="true" visible="true"/>
<acc_name type="2" length="30" name="Наименование участника клиринга" shortname="Наименование УК" searchable="true" sortable="true" visible="true"/>
<acc_type type="2" length="3" name="Признак счета" shortname="Признак счета" searchable="true" sortable="true" visible="true"/>
<deal type="2" length="4" name="Биржевой код участника клиринга" shortname="Биржевой код УК" searchable="true" sortable="true" visible="true"/>
<date type="2" length="8" name="Дата изменения состояния счета" shortname="Дата изменения состояния счета" searchable="true" sortable="true" visible="true"/>
<status type="3" name="Статус счета" shortname="Статус" searchable="true" sortable="true" visible="true"/>
@ -2111,7 +1936,6 @@
<date type="2" length="8" name="Дата изменения состояния счета" shortname="Дата изменения состояния счета" searchable="true" sortable="true" visible="true"/>
<status type="3" name="Статус счета" shortname="Статус" searchable="true" sortable="true" visible="true"/>
<result type="2" length="255" name="Код завершения операции" shortname="Код завершения операции" searchable="true" sortable="true" visible="true"/>
<fileName type="2" length="255" name="Наименование входящего файла" shortname="Наименование файла" searchable="true" sortable="true" visible="true"/>
<generationTime type="4" name="Дата и время создания записи" shortname="Дата и время создания" searchable="true" sortable="true" visible="true"/>
<generationId type="1" name="Идентификатор взаимодействия" shortname="ID взаимодействия" searchable="true" sortable="true" visible="true"/>
<inSDfId type="1" name="Идентификатор соответствующей записи из таблицы-источника" shortname="Входящая запись" searchable="true" sortable="true" visible="true"/>
@ -2160,11 +1984,6 @@
<doc_result type="2" length="2" name="Результат операции" shortname="Результат операции" searchable="true" sortable="true" visible="true"/>
<generationTime type="4" name="Дата и время создания записи" shortname="Дата и время создания" searchable="true" sortable="true" visible="true"/>
<generationId type="1" name="Идентификатор взаимодействия" shortname="ID взаимодействия" searchable="true" sortable="true" visible="true"/>
<Doc_Num field="Doc_Num" type="2" length="3" name="Номер выгружаемого документа" shortname="Номер выгружаемого документа" searchable="true" sortable="true" visible="true"/>
<Doc_Date field="Doc_Date" type="2" length="8" name="Дата выгружаемого документа" shortname="Дата выгружаемого документа" searchable="true" sortable="true" visible="true"/>
<Value_date field="Value_date" type="2" length="8" name="Дата валютирования" shortname="Дата валютирования" searchable="true" sortable="true" visible="true"/>
<Swift_ben field="Swift_ben" type="2" length="11" name="Свифт банка бенефициара" shortname="Свифт банка бенефициара" searchable="true" sortable="true" visible="true"/>
<Swift_int field="Swift_int" type="2" length="11" name="Свифт банка посредника" shortname="Свифт банка посредника" searchable="true" sortable="true" visible="true"/>
</sDf54>
<sDf55 name="ДФ-55 Квитанция об обработке ДФ-54" destination="s-dfs/s-df55" class="ru.clearing.classes.statics.data.sdf.SDf55" table="s_df_55">
<id type="1" name="Идентификатор записи" shortname="ID" searchable="true" sortable="true" visible="false"/>
@ -2211,11 +2030,6 @@
<fileName type="2" length="255" name="Наименование входящего файла" shortname="Наименование файла" searchable="true" sortable="true" visible="true"/>
<generationTime type="4" name="Дата и время обработки файла" shortname="Дата и время обработки" searchable="true" sortable="true" visible="true"/>
<generationId type="1" name="Идентификатор взаимодействия" shortname="ID взаимодействия" searchable="true" sortable="true" visible="true"/>
<Doc_Num field="Doc_Num" type="2" length="3" name="Номер выгружаемого документа" shortname="Номер выгружаемого документа" searchable="true" sortable="true" visible="true"/>
<Doc_Date field="Doc_Date" type="2" length="8" name="Дата выгружаемого документа" shortname="Дата выгружаемого документа" searchable="true" sortable="true" visible="true"/>
<Value_date field="Value_date" type="2" length="8" name="Дата валютирования" shortname="Дата валютирования" searchable="true" sortable="true" visible="true"/>
<Swift_ben field="Swift_ben" type="2" length="11" name="Свифт банка бенефициара" shortname="Свифт банка бенефициара" searchable="true" sortable="true" visible="true"/>
<Swift_int field="Swift_int" type="2" length="11" name="Свифт банка посредника" shortname="Свифт банка посредника" searchable="true" sortable="true" visible="true"/>
</sDf55>
<sDf56 name="ДФ-56 Запрос транзакций за период" destination="s-dfs/s-df56" class="ru.clearing.classes.statics.data.sdf.SDf56" table="s_df_56">
<id type="1" name="Идентификатор записи" shortname="ID" searchable="true" sortable="true" visible="false"/>
@ -2269,12 +2083,6 @@
<specif type="2" length="255" name="Назначение платежа" shortname="Назначение платежа" searchable="true" sortable="true" visible="true"/>
<fileName type="2" length="255" name="Наименование входящего файла" shortname="Наименование файла" searchable="true" sortable="true" visible="true"/>
<generationId type="1" name="Идентификатор взаимодействия" shortname="ID взаимодействия" searchable="true" sortable="true" visible="true"/>
<Doc_Num field="Doc_Num" type="2" length="3" name="Номер выгружаемого документа" shortname="Номер выгружаемого документа" searchable="true" sortable="true" visible="true"/>
<Doc_Date field="Doc_Date" type="2" length="8" name="Дата выгружаемого документа" shortname="Дата выгружаемого документа" searchable="true" sortable="true" visible="true"/>
<dt_in type="2" length="22" name="Входящий дебетовый остаток" shortname="Входящий дебетовый остаток" searchable="true" sortable="true" visible="true"/>
<kt_in type="2" length="22" name="Входящий кредитовый остаток" shortname="Входящий кредитовый остаток" searchable="true" sortable="true" visible="true"/>
<dt_out type="2" length="22" name="Исходящий дебетовый остаток" shortname="Исходящий дебетовый остаток" searchable="true" sortable="true" visible="true"/>
<kt_out type="2" length="22" name="Исходящий кредитовый остаток" shortname="Исходящий кредитовый остаток" searchable="true" sortable="true" visible="true"/>
</sDf57>
<managementJournal name="Журнал мониторинга и контроля" destination="management-journals" class="ru.clearing.classes.statics.data.journal.ManagementJournal" table="management_journal">
<companyId type="1" dbname="Идентификатор компании" name="Наименование компании" shortname="Компания" searchable="true" sortable="true" visible="true" link="company" linkCode="shortName"/>
@ -2323,7 +2131,7 @@
<resultStatus type="12" dbname="Код статуса загрузки документа" name="Наименование статуса загрузки документа" shortname="Статус" searchable="true" sortable="true" visible="true" link="resultStatus"/>
<id type="1" name="Идентификатор записи" shortname="ID" searchable="true" sortable="true" visible="false"/>
</outDocumentJournal>
<reportRegister name="Реестр отправленных отчетов" destination="report-registers" class="ru.clearing.classes.statics.data.register.ReportRegister" table="report_register">
<reportRegister name="Реестр отправленных отчетов" destination="report-registers" class="ru.clearing.classes.statics.data.register.ReportRegister" table="report_register">
<companyFullName type="2" length="255" name="Полное наименование компании" shortname="Полное наименование компании" searchable="true" sortable="true"/>
<clearingCode type="2" length="255" name="Код клиринга" shortname="Код участника" searchable="true" sortable="true"/>
<sessionId type="1" dbname="Идентификатор клиринговой сессии" name="Клиринговая сессия" shortname="Сессия" visible="true" searchable="true" sortable="true" link="session"/>
@ -2370,19 +2178,6 @@
<price type="10" name="Цена за 1 штуку ликвидационного актива" shortname="Цена за шт." searchable="true" sortable="true" visible="true"/>
<clearingDate type="6" name="Дата" shortname="Дата" searchable="true" sortable="true" ignore="true"/>
</marketDataLiquidation>
<sCrossRate name="Кросс курсы валют от ЦБ" destination="cross-rate" class="ru.clearing.classes.statics.data.misc.SCrossRate" table="s_cross_rate">
<id type="1" name="Идентификатор записи" shortname="ID" searchable="true" sortable="true" visible="false"/>
<date type="6" name="Дата торгов" shortname="Дата торгов" searchable="true" sortable="true" visible="false"/>
<currency type="2" length="50" name="Наименование валюты" shortname="Наименование валюты" searchable="true" sortable="true" visible = "true"/>
<currCode type="2" length="50" name="Код валюты" shortname="Код валюты" searchable="true" sortable="true" visible = "true"/>
<faceValue type="10" name="Номинал" shortname="Номинал" searchable="true" sortable="true" visible = "true"/>
<rate type="10" name="Курс валюты с учетом размера лота" shortname="Курс валюты" searchable="true" sortable="true" visible = "true"/>
<unitRate type="10" name="Курс за единицу иностранной валюты" shortname="Курс за единицу валюты" searchable="true" sortable="true" visible="true"/>
<generationTime type="4" name="Дата и время создания записи" shortname="Дата и время создания" searchable="true" sortable="true" visible="true"/>
<generationId type="1" name="Идентификатор взаимодействия" shortname="ID взаимодействия" searchable="true" sortable="true" visible="true"/>
<createdAt field="created" type="4" webtype="5" dbname="Дата-время создания записи" name="Время создания записи" shortname="Создано" searchable="true" sortable="true" ignore="true"/>
<updatedAt field="updated" type="4" webtype="5" dbname="Дата-время изменения записи" name="Время изменения записи" shortname="Изменено" searchable="true" sortable="true" ignore="true"/>
</sCrossRate>
</objects>
<views>
<AccountUnion>

View file

@ -113,7 +113,6 @@ import static ru.spcex.clearing.test.json.MatcherFactoryWithJson.usingIgnoringFi
MarketController.class,
NotificationController.class,
SessionController.class,
SCrossRateController.class,
//payment
PaymentInstructionController.class,
//register
@ -127,8 +126,6 @@ import static ru.spcex.clearing.test.json.MatcherFactoryWithJson.usingIgnoringFi
MoneyBalanceRegisterController.class,
ContractRegisterController.class,
ReportRegisterController.class,
GatewayResultController.class,
PairSdfController.class,
//registry
RegistryController.class,
TradingClearingRegistryController.class,

View file

@ -1,40 +0,0 @@
package ru.spcex.clearing.backendapi.controller.queue.misc;
import org.junit.jupiter.api.Test;
import ru.clearing.classes.statics.data.misc.SCrossRate;
import ru.spcex.clearing.backendapi.controller.queue.AbstractControllerTest;
import ru.spcex.clearing.imdg.IMDGDistributedNames;
import java.math.BigDecimal;
import java.time.Instant;
import java.time.LocalDate;
class SCrossRateControllerTest extends AbstractControllerTest {
private static final String REST_URL = "/cross-rate/";
/**
* {@link SCrossRateController#getAll()} <br>
* Тест проверяет получение запроса по REST API.<br>
* Входной запрос /cross-rate/ <br>
* Ответ SCrossRate <br>
*/
@Test
void getAll() throws Exception {
//ARRANGE
SCrossRate sCrossRate = new SCrossRate();
sCrossRate.setId(currentId.get());
sCrossRate.setDate(LocalDate.now());
sCrossRate.setCurrency("RUB");
sCrossRate.setCurrCode("RUB");
sCrossRate.setFaceValue(new BigDecimal("1.00"));
sCrossRate.setRate(new BigDecimal("1.00"));
sCrossRate.setUnitRate(new BigDecimal("1.00"));
sCrossRate.setGenerationTime(Instant.now());
sCrossRate.setGenerationId(10L);
sCrossRate.setCreated(Instant.now());
sCrossRate.setUpdated(sCrossRate.getCreated());
//ACT and ASSERT
checkGettingAllFromRestApi(IMDGDistributedNames.Map_SCrossRate, sCrossRate, REST_URL);
}
}

View file

@ -1,35 +0,0 @@
package ru.spcex.clearing.backendapi.controller.queue.register;
import org.junit.jupiter.api.Test;
import ru.clearing.classes.statics.data.register.GatewayResult;
import ru.spcex.clearing.backendapi.controller.queue.AbstractControllerTest;
import ru.spcex.clearing.imdg.IMDGDistributedNames;
import java.time.Instant;
class GatewayResultControllerTest extends AbstractControllerTest {
private static final String REST_URL = "/gateway-result/";
/**
* {@link GatewayResultController#getAll()} <br>
* Тест проверяет получение запроса по REST API.<br>
* Входной запрос /gateway-result/ <br>
* Ответ CommonGetAllResponse <br>
*/
@Test
void getAll() throws Exception {
//ARRANGE
GatewayResult gatewayResult = new GatewayResult();
gatewayResult.setId(currentId.get());
gatewayResult.setGatewayResultStatus("NACK");
gatewayResult.setResult("TEST");
gatewayResult.setRequest("req");
gatewayResult.setNameRequest("nameReq");
gatewayResult.setRequestId("req-id");
gatewayResult.setCreated(Instant.now());
//ACT and ASSERT
checkGettingAllFromRestApi(IMDGDistributedNames.Map_GatewayResult, gatewayResult, REST_URL);
}
}

View file

@ -1,35 +0,0 @@
package ru.spcex.clearing.backendapi.controller.queue.register;
import org.junit.jupiter.api.Test;
import ru.clearing.classes.statics.data.register.PairSdf;
import ru.spcex.clearing.backendapi.controller.queue.AbstractControllerTest;
import ru.spcex.clearing.imdg.IMDGDistributedNames;
import java.time.Instant;
class PairSdfControllerTest extends AbstractControllerTest {
private static final String REST_URL = "/pair-sdf/";
/**
* {@link PairSdfController#getAll()} <br>
* Тест проверяет получение запроса по REST API.<br>
* Входной запрос /pair-sdf/ <br>
* Ответ CommonGetAllResponse <br>
*/
@Test
void getAll() throws Exception {
//ARRANGE
PairSdf pairSdf = new PairSdf();
pairSdf.setId(currentId.get());
pairSdf.setCreated(Instant.now());
pairSdf.setId(3L);
pairSdf.setInSDf("in-sdf");
pairSdf.setInSDfId("in-id");
pairSdf.setOutSDf("out-sdf");
pairSdf.setOutSDfId("out-id");
//ACT and ASSERT
checkGettingAllFromRestApi(IMDGDistributedNames.Map_PairSdf, pairSdf, REST_URL);
}
}

View file

@ -1,11 +1,8 @@
package ru.spcex.clearing.backendapi.meta;
import org.apache.commons.lang3.StringUtils;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.test.context.ContextConfiguration;
@ -17,7 +14,6 @@ import java.util.stream.Collectors;
@ExtendWith(SpringExtension.class)
@ContextConfiguration(classes = GetResponseFactoryTestConfiguration.class)
public class GetResponseFactoryTest {
private Logger log = LoggerFactory.getLogger(getClass());
private final MetaServer meta;
@Autowired
@ -41,10 +37,6 @@ public class GetResponseFactoryTest {
try {
classByName = Class.forName(className);
} catch (ClassNotFoundException e) {
if ("db-versions".equals(objectElement.getDestination()) && StringUtils.isEmpty(objectElement.getClazz())) {
log.info("No class for system table \"{}\" (cannot find class)", objectElement.getDestination());
continue;
}
error.computeIfAbsent(ent.getKey(), v -> new ArrayList<>()).add(ent.getKey() + " cannot find class " + className);
continue;
}

View file

@ -1,62 +0,0 @@
package ru.spcex.clearing.backendapi.service.validation;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit.jupiter.SpringExtension;
import ru.spcex.clearing.backendapi.meta.*;
import java.util.Map;
import static org.junit.jupiter.api.Assertions.*;
@ExtendWith(SpringExtension.class)
@ContextConfiguration(classes = GetResponseFactoryTestConfiguration.class)
class FieldNameMetaValidationTest {
@Autowired
@Qualifier("metaJsonTest")
protected MetaServer meta;
@Test
void checkLatinSymbolInName() {
for (Map.Entry<String, ObjectEnumElement> dictionary : meta.getEnums().entrySet()) {
String dicName = dictionary.getKey();
assertFalse(containWrongSymbols(dicName), "dictionary name: " + dicName);
//assertEquals(dicName, dictionary.getValue().getName());
for (ActionField field : dictionary.getValue().getFields()) {
String fieldName = field.getCode();
assertFalse(containWrongSymbols(fieldName), "dictionary " + dicName + " code: " + fieldName);
if (field.getField() != null) {
fieldName = field.getField();
assertFalse(containWrongSymbols(fieldName), "dictionary " + dicName + " field: " + fieldName);
}
}
}
for (Map.Entry<String, ObjectElement> object : meta.getObjects().entrySet()) {
String objName = object.getKey();
assertFalse(containWrongSymbols(objName), "object name: " + objName);
// assertEquals(objName, object.getValue().getName());
for (ActionField field : object.getValue().getFields()) {
String fieldName = field.getCode();
assertFalse(containWrongSymbols(fieldName), "object " + objName + " code: " + fieldName);
if (field.getField() != null) {
fieldName = field.getField();
assertFalse(containWrongSymbols(fieldName), "object " + objName + " field: " + fieldName);
}
}
}
}
protected boolean containWrongSymbols(String name) {
if (name == null)
return true;
if (name.equals("namа"))
return true;
return name.matches("[^A-Za-z_0-9]");
}
}

File diff suppressed because it is too large Load diff

View file

@ -5,7 +5,7 @@
<parent>
<artifactId>clearing-parent</artifactId>
<groupId>ru.spcex.clearing</groupId>
<version>SPCEX-3.11.0.0</version>
<version>SPCEX-1.0.0.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>
@ -44,13 +44,6 @@
<groupId>ru.spcex.platform</groupId>
<artifactId>platform-enum</artifactId>
</dependency>
<!-- special logging -->
<dependency>
<groupId>net.logstash.logback</groupId>
<artifactId>logstash-logback-encoder</artifactId>
<version>7.0.1</version>
</dependency>
<!-- TEST -->
<dependency>
<groupId>org.springframework</groupId>

View file

@ -10,7 +10,6 @@ import ru.spcex.clearing.imdg.IMDGDistributedNames;
import ru.spcex.clearing.platform.messaging.domain.BaseRequest;
import ru.spcex.clearing.platform.messaging.domain.Consts;
import ru.spcex.clearing.platform.messaging.domain.cud.balance.ExportToFileRequest;
import ru.spcex.clearing.platform.messaging.domain.cud.schedule.LauncherCommandRequest;
import ru.spcex.clearing.platform.messaging.service.QueueConsumer;
import ru.spcex.clearing.platform.messaging.service.sender.KafkaSender;
import ru.spcex.platform.enumeration.Task;
@ -37,17 +36,14 @@ public class Sdf08Service extends QueueConsumer implements InitializingBean {
@Override
public void afterPropertiesSet() {
callback(LauncherCommandRequest.class)
callback(Object.class)
.setConsumer(this::newSDf08)
.forDestination(Task.getAllBalance.topic(), callbacks::put);
init();
}
private void newSDf08(BaseRequest<LauncherCommandRequest> userRequest) {
LauncherCommandRequest req = userRequest.getRequestPayload();
log.debug("getAllBalance request received, parameter fromTime={}",
req == null ? null : req.getFromTime());
// todo use опциональный параметр req.fromTime
private void newSDf08(BaseRequest<Object> userRequest) {
log.debug("getAllBalance request received");
SDf08 sDf08 = new SDf08();
// sDf08.setNumber(idGenerator.nextId().toString());
Instant now = Instant.now();

View file

@ -1,56 +1,38 @@
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<property name="LOG_PATH" value="./log" />
<property name="FILE_NAME" value="balance-service" />
<property name="CONSOLE_LOG_PATTERN" value="%date{HH:mm:ss.SSS} [%thread] %-5level %class{0}:%line - %message%n" />
<property name="FILE_LOG_PATTERN" value="%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %class{0}:%msg%n" />
<appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
<appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<!-- |%X{ru.nbch.scoring.web.logging.mdc_key}-->
<Pattern>%date{HH:mm:ss.SSS} [%thread] %-5level %class{0}:%line - %message%n</Pattern>
<charset>utf-8</charset>
</encoder>
</appender>
<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>./logs/balance-service.log</file>
<encoder>
<!-- |%X{ru.nbch.scoring.web.logging.mdc_key}-->
<Pattern>${CONSOLE_LOG_PATTERN}</Pattern>
<charset>utf-8</charset>
</encoder>
</appender>
<!-- first FILE TEXT appender -->
<appender name="TEXT_FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${LOG_PATH}/${FILE_NAME}-text.log</file>
<encoder>
<!-- |%X{ru.nbch.scoring.web.logging.mdc_key}-->
<Pattern>${FILE_LOG_PATTERN}</Pattern>
<!-- |%X{ru.nbch.scoring.web.logging.mdc_key}-->
<Pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %class{0}:%msg%n</Pattern>
<charset>utf8</charset>
</encoder>
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<fileNamePattern>${LOG_PATH}/${FILE_NAME}-text.%d{yyyy-MM-dd}.%i.gz
<rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
<fileNamePattern>
./logs/balance-service.%i.log
</fileNamePattern>
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
<maxFileSize>100MB</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
<maxHistory>10</maxHistory>
</rollingPolicy>
</appender>
<!-- second FILE JSON appender -->
<appender name="JSON_FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${LOG_PATH}/${FILE_NAME}-json.log</file>
<encoder class="net.logstash.logback.encoder.LogstashEncoder" />
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<fileNamePattern>${LOG_PATH}/${FILE_NAME}-json.%d{yyyy-MM-dd}.%i.gz
</fileNamePattern>
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
<maxFileSize>100MB</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
<maxHistory>10</maxHistory>
<minIndex>1</minIndex>
<maxIndex>10</maxIndex>
</rollingPolicy>
<triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
<maxFileSize>500MB</maxFileSize>
</triggeringPolicy>
</appender>
<root level="info">
<!-- <appender-ref ref="CONSOLE"/> -->
<appender-ref ref="TEXT_FILE"/>
<appender-ref ref="JSON_FILE" />
</root>
<root level="warn">
<appender-ref ref="CONSOLE"/>
<appender-ref ref="FILE"/>
</root>
<logger name="ru.spcex" level="debug" additivity="false">
<appender-ref ref="TEXT_FILE"/>
<appender-ref ref="JSON_FILE" />
<!-- <appender-ref ref="CONSOLE"/> -->
<appender-ref ref="FILE"/>
<appender-ref ref="CONSOLE"/>
</logger>
</configuration>

View file

@ -15,14 +15,11 @@ import ru.spcex.clearing.platform.messaging.domain.ActionType;
import ru.spcex.clearing.platform.messaging.domain.BaseRequest;
import ru.spcex.clearing.platform.messaging.domain.Consts;
import ru.spcex.clearing.platform.messaging.domain.cud.balance.ExportToFileRequest;
import ru.spcex.clearing.platform.messaging.domain.cud.schedule.LauncherCommandRequest;
import ru.spcex.clearing.platform.messaging.service.RequestInfo;
import ru.spcex.platform.enumeration.Task;
import javax.annotation.PostConstruct;
import java.time.LocalTime;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNotNull;
import static org.mockito.Mockito.timeout;
@ -83,43 +80,4 @@ class Sdf08ServiceTest extends AbstractServiceTest {
assertNotNull(resultsSDf08);
assertNotNull(resultRequestInfo);
}
/**
* {@link Sdf08Service}<br>
* Тест проверяет генерацию сущностей {@link RequestInfo}<br>
* Входные параметры:<br>
* {@link BaseRequest} - new BaseRequest<>() с полем fromTime <br>
*/
@Test
void newSDf08_withTime() throws JsonProcessingException {
BaseRequest<LauncherCommandRequest> baseNewRequest = new BaseRequest<>();
baseNewRequest.setId(currentId.getAndIncrement());
baseNewRequest.setActionType(ActionType.NEW);
LauncherCommandRequest launcherCommandRequest = new LauncherCommandRequest();
final LocalTime fromTime = LocalTime.of(12, 23);
launcherCommandRequest.setFromTime(fromTime);
baseNewRequest.setRequestPayload(launcherCommandRequest);
ObjectMapper objectMapper = new ObjectMapper();
String jsonBaseNewRequest = objectMapper.writeValueAsString(baseNewRequest);
addRecordToKafka(mockConsumer, TOPIC, PARTITION, 0, jsonBaseNewRequest);
//waiting for kafka producer send message (finale event)
verify(producer, timeout(30_000L).times(1))
.send(producerRecord.capture());
assertEquals(Consts.EXPORT_PROCESS, producerRecord.getValue().topic());
BaseRequest<Object> baseRequest = (BaseRequest<Object>) producerRecord.getValue().value();
ExportToFileRequest exportToFileRequest = (ExportToFileRequest) baseRequest.getRequestPayload();
//todo test newSDf08_withTime assertEquals(fromTime, exportToFileRequest.getFromTime());
SDf08 resultsSDf08 = sdf08Imdg.getFirstObjectBySQL(String.format("generationId = %s and id != null", exportToFileRequest.getSdfGroupId()));
RequestInfo resultRequestInfo = requestInfoImdg.getSingleObjectByID(baseRequest.getId());
assertNotNull(baseRequest);
assertNotNull(resultsSDf08);
assertNotNull(resultRequestInfo);
}
}

View file

@ -12,7 +12,7 @@
<parent>
<artifactId>clearing-parent</artifactId>
<groupId>ru.spcex.clearing</groupId>
<version>SPCEX-3.11.0.0</version>
<version>SPCEX-1.0.0.0</version>
</parent>
<properties>

View file

@ -14,7 +14,6 @@ public class Account extends BusinessObject {
private String account;
private String accountType;
private Long relationId;
private String currency;
private String status;
private String processingSign;
private Long companyId;
@ -43,14 +42,6 @@ public class Account extends BusinessObject {
this.relationId = value;
}
public String getCurrency() {
return currency;
}
public void setCurrency(String currency) {
this.currency = currency;
}
public String getStatus() {
return status;
}

View file

@ -18,7 +18,6 @@ public class ClientCode extends BusinessObject {
private Long tradingClearingRegistryId;
private Long moneyAccountId;
private Long depoAccountId;
private Long currencyAccountId;
private String status;
public Long getCompanyId() {
@ -61,14 +60,6 @@ public class ClientCode extends BusinessObject {
this.depoAccountId = value;
}
public Long getCurrencyAccountId() {
return currencyAccountId;
}
public void setCurrencyAccountId(Long value) {
this.currencyAccountId = value;
}
public String getStatus() {
return status;
}

View file

@ -1,5 +0,0 @@
package ru.clearing.classes.statics.data.api;
public interface WithCurrency {
String currency();
}

View file

@ -1,33 +0,0 @@
package ru.clearing.classes.statics.data.company;
import ru.clearing.classes.ConstSerializable;
import ru.spcex.platform.classes.base.SpcexObjectBase;
/**
* Параметры расчетной организации
*
* DB table: SETTLEMENT_HOUSE_PROPERTIES
**/
public class SettlementHouseProperties extends SpcexObjectBase {
private static final long serialVersionUID = ConstSerializable.serialVersionUID;
private Long companyId;
private String currencyCode;
public Long getCompanyId() {
return companyId;
}
public void setCompanyId(Long value) {
this.companyId = value;
}
public String getCurrencyCode() {
return currencyCode;
}
public void setCurrencyCode(String value) {
this.currencyCode = value;
}
}

View file

@ -1,28 +0,0 @@
package ru.clearing.classes.statics.data.company;
import ru.clearing.classes.ConstSerializable;
import ru.clearing.classes.objects.BusinessEvent;
import java.io.Serial;
/**
* Изменение состояния объекта Параметры расчетной организации
*
* DB table: SETTLEMENT_HOUSE_PROPERTIES_HISTORY
**/
public class SettlementHousePropertiesHistory extends BusinessEvent<SettlementHouseProperties> {
@Serial
private static final long serialVersionUID = ConstSerializable.serialVersionUID;
private SettlementHouseProperties object;
@Override
public SettlementHouseProperties getObject() {
return object;
}
@Override
public void setObject(SettlementHouseProperties object) {
this.object = object;
}
}

View file

@ -1,171 +0,0 @@
package ru.clearing.classes.statics.data.execution;
import ru.clearing.classes.ConstSerializable;
import ru.spcex.platform.classes.base.interfaces.ExecutionType;
import java.math.BigDecimal;
import java.time.Instant;
import java.time.LocalDate;
/**
* Сделки с валютными инструментами
* <p>
* DB table: EXECUTION_CURRENCY
**/
public class ExecutionCurrency extends ExecutionCommon {
private static final long serialVersionUID = ConstSerializable.serialVersionUID;
// private Long exchangeExecutionId;
// private Instant exchangeExecutionTime;
private Instant exchangeExecutionMicroseconds;
// private LocalDate tradingDate;
private LocalDate settlementDate;
private String settlementCode;
// private Long securityId;
// private String securitySymbol;
private String securityName;
// private Long companyId;
private Long partyTradingClearingRegistryId;
// private String partyTradingClearingRegistry;
// private Long counterPartyId;
// private Long counterPartyTradingClearingRegistryId;
// private String counterPartyTradingClearingRegistry;
// private String market;
// private BigDecimal price;
// extend: private BigDecimal lotSize;
// private BigDecimal lots;
private BigDecimal settlementAmount;
// private BigDecimal quantity;
// private String side;
private String currencyCode;
private String settlementOrganization;
// private String coverageStatus;
// private Long sessionId;
// private LocalDate clearingDate;
// --- API ExecutionCommon ---
public ExecutionType type() {
return ExecutionType.ExecutionCurrency;
}
@Deprecated
@Override
public Long getTradingClearingRegistryId() {
return getPartyTradingClearingRegistryId();
}
@Deprecated
@Override
public void setTradingClearingRegistryId(Long partyTradingClearingRegistryId) {
setPartyTradingClearingRegistryId(partyTradingClearingRegistryId);
}
@Deprecated
@Override
public BigDecimal getInterestAmount() {
throw new IllegalStateException("Not implemented for ExecutionCurrency");
}
@Deprecated
@Override
public void setInterestAmount(BigDecimal interestAmount) {
throw new IllegalStateException("Not implemented for ExecutionCurrency");
}
@Deprecated
@Override
public String getSettlementCurrency() {
throw new IllegalStateException("Not implemented for ExecutionCurrency");
}
@Deprecated
@Override
public void setSettlementCurrency(String settlementCurrency) {
throw new IllegalStateException("Not implemented for ExecutionCurrency");
}
@Deprecated
@Override
public Long getDuration() {
throw new IllegalStateException("Not implemented for ExecutionCurrency");
}
@Deprecated
@Override
public void setDuration(Long duration) {
throw new IllegalStateException("Not implemented for ExecutionCurrency");
}
@Deprecated
@Override
public String getSecurityFullName() {
return getSecurityName();
}
@Deprecated
@Override
public void setSecurityFullName(String securityFullName) {
setSecurityName(securityFullName);
}
// --- end of API ---
public Instant getExchangeExecutionMicroseconds() {
return exchangeExecutionMicroseconds;
}
public void setExchangeExecutionMicroseconds(Instant value) {
this.exchangeExecutionMicroseconds = value;
}
public LocalDate getSettlementDate() {
return settlementDate;
}
public void setSettlementDate(LocalDate value) {
this.settlementDate = value;
}
public String getSettlementCode() {
return settlementCode;
}
public void setSettlementCode(String value) {
this.settlementCode = value;
}
public String getSecurityName() {
return securityName;
}
public void setSecurityName(String value) {
this.securityName = value;
}
public Long getPartyTradingClearingRegistryId() {
return partyTradingClearingRegistryId;
}
public void setPartyTradingClearingRegistryId(Long value) {
this.partyTradingClearingRegistryId = value;
}
public BigDecimal getSettlementAmount() {
return settlementAmount;
}
public void setSettlementAmount(BigDecimal value) {
this.settlementAmount = value;
}
public String getCurrencyCode() {
return currencyCode;
}
public void setCurrencyCode(String currencyCode) {
this.currencyCode = currencyCode;
}
public String getSettlementOrganization() {
return settlementOrganization;
}
public void setSettlementOrganization(String value) {
this.settlementOrganization = value;
}
}

View file

@ -1,28 +0,0 @@
package ru.clearing.classes.statics.data.execution;
import ru.clearing.classes.ConstSerializable;
import ru.clearing.classes.objects.BusinessEvent;
import java.io.Serial;
/**
* Изменение состояния объекта Сделки с валютными инструментами
* <p>
* DB table: EXECUTION_CURRENCY_HISTORY
**/
public class ExecutionCurrencyHistory extends BusinessEvent<ExecutionCurrency> {
@Serial
private static final long serialVersionUID = ConstSerializable.serialVersionUID;
private ExecutionCurrency object;
@Override
public ExecutionCurrency getObject() {
return object;
}
@Override
public void setObject(ExecutionCurrency object) {
this.object = object;
}
}

View file

@ -13,8 +13,6 @@ public class Listing extends BusinessObject {
private String symbolName;
private String tradingCurrency;
private String workflowStatus;
private BigDecimal minStep;
private BigDecimal precision;
public Long getSecurityId() {
return securityId;
@ -71,20 +69,4 @@ public class Listing extends BusinessObject {
public void setWorkflowStatus(String workflowStatus) {
this.workflowStatus = workflowStatus;
}
public BigDecimal getMinStep() {
return minStep;
}
public void setMinStep(BigDecimal minStep) {
this.minStep = minStep;
}
public BigDecimal getPrecision() {
return precision;
}
public void setPrecision(BigDecimal precision) {
this.precision = precision;
}
}

View file

@ -1,88 +0,0 @@
package ru.clearing.classes.statics.data.misc;
import ru.clearing.classes.ConstSerializable;
import ru.clearing.classes.objects.BusinessObject;
import ru.spcex.platform.classes.base.SpcexObjectBase;
import ru.clearing.classes.ConstSerializable;
import ru.spcex.platform.classes.base.SpcexObjectBase;
import java.math.BigDecimal;
import java.time.Instant;
import java.time.LocalDate;
/**
* Кросс курсы валют от ЦБ
*
* DB table: S_CROSS_RATE
**/
public class SCrossRate extends BusinessObject {
private static final long serialVersionUID = ConstSerializable.serialVersionUID;
// (in parent) private Long id;
private LocalDate date;
private String currency;
private String currCode;
private BigDecimal faceValue;
private BigDecimal rate;
private BigDecimal unitRate;
private Instant generationTime;
private Long generationId;
public LocalDate getDate() {
return date;
}
public void setDate(LocalDate value) {
this.date=value;
}
public String getCurrency() {
return currency;
}
public void setCurrency(String value) {
this.currency=value;
}
public String getCurrCode() {
return currCode;
}
public void setCurrCode(String value) {
this.currCode=value;
}
public BigDecimal getFaceValue() {
return faceValue;
}
public void setFaceValue(BigDecimal value) {
this.faceValue=value;
}
public BigDecimal getRate() {
return rate;
}
public void setRate(BigDecimal value) {
this.rate=value;
}
public BigDecimal getUnitRate() {
return unitRate;
}
public void setUnitRate(BigDecimal value) {
this.unitRate=value;
}
public Instant getGenerationTime() {
return generationTime;
}
public void setGenerationTime(Instant value) {
this.generationTime=value;
}
public Long getGenerationId() {
return generationId;
}
public void setGenerationId(Long value) {
this.generationId=value;
}
}

View file

@ -17,8 +17,6 @@ public class DepoBalanceRegister extends BusinessObject {
private Long companyId;
private Long sessionId;
private String setHouseName;
private String number;
private String depoCode;
private BigDecimal quantity;
private String securitySymbol;
@ -38,20 +36,6 @@ public class DepoBalanceRegister extends BusinessObject {
this.sessionId=value;
}
public String getSetHouseName() {
return setHouseName;
}
public void setSetHouseName(String value) {
this.setHouseName=value;
}
public String getNumber() {
return number;
}
public void setNumber(String value) {
this.number=value;
}
public String getDepoCode() {
return depoCode;
}

View file

@ -1,61 +0,0 @@
package ru.clearing.classes.statics.data.register;
import ru.clearing.classes.ConstSerializable;
import ru.clearing.classes.objects.BusinessObject;
/**
* Результат запроса к gateway
* <p>
* DB table: GATEWAY_RESULT
**/
public class GatewayResult extends BusinessObject {
private static final long serialVersionUID = ConstSerializable.serialVersionUID;
private String requestId;
private String nameRequest;
private String request;
private String result;
private String gatewayResultStatus;
public String getRequestId() {
return requestId;
}
public void setRequestId(String value) {
this.requestId = value;
}
public String getNameRequest() {
return nameRequest;
}
public void setNameRequest(String value) {
this.nameRequest = value;
}
public String getRequest() {
return request;
}
public void setRequest(String value) {
this.request = value;
}
public String getResult() {
return result;
}
public void setResult(String value) {
this.result = value;
}
public String getGatewayResultStatus() {
return gatewayResultStatus;
}
public void setGatewayResultStatus(String value) {
this.gatewayResultStatus = value;
}
}

View file

@ -14,8 +14,6 @@ public class MoneyBalanceRegister extends BusinessObject {
private static final long serialVersionUID = ConstSerializable.serialVersionUID;
private String setHouseName;
private String number;
private String currencyCode;
private String account;
private String infoAccount;
private BigDecimal remainderSum;
@ -26,6 +24,30 @@ public class MoneyBalanceRegister extends BusinessObject {
private String companyFullName;
private Long companyId;
public static MoneyBalanceRegister makeMoneyBalanceRegister(String setHouseName,
String account,
String infoAccount,
BigDecimal remainderSum,
BigDecimal blockedSum,
BigDecimal unblockedSum,
String inn,
Long sessionId,
String companyFullName,
Long companyId) {
MoneyBalanceRegister moneyBalanceRegister = new MoneyBalanceRegister();
moneyBalanceRegister.setSetHouseName(setHouseName);
moneyBalanceRegister.setAccount(account);
moneyBalanceRegister.setInfoAccount(infoAccount);
moneyBalanceRegister.setRemainderSum(remainderSum);
moneyBalanceRegister.setBlockedSum(blockedSum);
moneyBalanceRegister.setUnblockedSum(unblockedSum);
moneyBalanceRegister.setInn(inn);
moneyBalanceRegister.setSessionId(sessionId);
moneyBalanceRegister.setCompanyFullName(companyFullName);
moneyBalanceRegister.setCompanyId(companyId);
return moneyBalanceRegister;
}
public String getSetHouseName() {
return setHouseName;
}
@ -34,22 +56,6 @@ public class MoneyBalanceRegister extends BusinessObject {
this.setHouseName = value;
}
public String getNumber() {
return number;
}
public void setNumber(String value) {
this.number = value;
}
public String getCurrencyCode() {
return currencyCode;
}
public void setCurrencyCode(String value) {
this.currencyCode = value;
}
public String getAccount() {
return account;
}

View file

@ -1,51 +0,0 @@
package ru.clearing.classes.statics.data.register;
//todo в какой пэкэдж - в data.sdf; или data.registers;?
import ru.clearing.classes.ConstSerializable;
import ru.clearing.classes.objects.BusinessObject;
/**
* Пары файлов
*
* DB table: PAIR_SDF
**/
public class PairSdf extends BusinessObject {
private static final long serialVersionUID = ConstSerializable.serialVersionUID;
private String inSDfId;
private String inSDf;
private String outSDfId;
private String outSDf;
public String getInSDfId() {
return inSDfId;
}
public void setInSDfId(String value) {
this.inSDfId = value;
}
public String getInSDf() {
return inSDf;
}
public void setInSDf(String value) {
this.inSDf = value;
}
public String getOutSDfId() {
return outSDfId;
}
public void setOutSDfId(String value) {
this.outSDfId = value;
}
public String getOutSDf() {
return outSDf;
}
public void setOutSDf(String value) {
this.outSDf = value;
}
}

View file

@ -1,51 +0,0 @@
package ru.clearing.classes.statics.data.registry;
import ru.clearing.classes.ConstSerializable;
import ru.clearing.classes.objects.BusinessObject;
/**
* Список счетов ТКР
* <p>
* DB table: TRADING_CLEARING_REGISTRY_LIST
**/
public class TradingClearingRegistryList extends BusinessObject {
private static final long serialVersionUID = ConstSerializable.serialVersionUID;
private Long tradingClearingRegistryId;
private Long accountId;
private String currency;
private String status;
public Long getTradingClearingRegistryId() {
return tradingClearingRegistryId;
}
public void setTradingClearingRegistryId(Long value) {
this.tradingClearingRegistryId = value;
}
public Long getAccountId() {
return accountId;
}
public void setAccountId(Long value) {
this.accountId = value;
}
public String getCurrency() {
return currency;
}
public void setCurrency(String value) {
this.currency = value;
}
public String getStatus() {
return status;
}
public void setStatus(String value) {
this.status = value;
}
}

View file

@ -1,28 +0,0 @@
package ru.clearing.classes.statics.data.registry;
import ru.clearing.classes.ConstSerializable;
import ru.clearing.classes.objects.BusinessEvent;
import java.io.Serial;
/**
* Изменение состояния объекта Список счетов ТКР
* <p>
* DB table: TRADING_CLEARING_REGISTRY_LIST_HISTORY
**/
public class TradingClearingRegistryListHistory extends BusinessEvent<TradingClearingRegistryList> {
@Serial
private static final long serialVersionUID = ConstSerializable.serialVersionUID;
private TradingClearingRegistryList object;
@Override
public TradingClearingRegistryList getObject() {
return object;
}
@Override
public void setObject(TradingClearingRegistryList object) {
this.object = object;
}
}

View file

@ -1,19 +1,19 @@
package ru.clearing.classes.statics.data.sdf;
import java.time.Instant;
import ru.clearing.classes.ConstSerializable;
import ru.spcex.platform.classes.base.SpcexObjectBase;
import ru.spcex.platform.classes.base.interfaces.WithAccount;
import ru.spcex.platform.classes.base.interfaces.WithCurrency;
import ru.spcex.platform.classes.base.interfaces.WithFileName;
import ru.spcex.platform.classes.base.interfaces.WithMarket;
import java.time.Instant;
/**
* ДФ-01 Информации о денежных средствах, находящихся на торговых банковских счетах участников клиринга
* <p>
* DB table: S_DF01
**/
public class SDf01 extends SpcexObjectBase implements WithAccount, WithMarket, WithFileName, WithCurrency {
public class SDf01 extends SpcexObjectBase implements WithAccount, WithMarket, WithFileName {
private static final long serialVersionUID = ConstSerializable.serialVersionUID;
private String curr_code;
@ -153,8 +153,4 @@ public class SDf01 extends SpcexObjectBase implements WithAccount, WithMarket, W
this.generationId = value;
}
@Override
public String currency() {
return getCurr_code();
}
}

View file

@ -27,7 +27,6 @@ public class SDf02 extends SpcexObjectBase implements WithAccount {
private String sumunblock;
private String file_type;
private String result;
private String fileName;
private Instant generationTime;
private Long generationId;
private Long inSDfId;
@ -137,14 +136,6 @@ public class SDf02 extends SpcexObjectBase implements WithAccount {
this.result = value;
}
public String getFileName() {
return fileName;
}
public void setFileName(String fileName) {
this.fileName = fileName;
}
public Instant getGenerationTime() {
return generationTime;
}

View file

@ -34,7 +34,6 @@ public class SDf03 extends SpcexObjectBase {
private String sum_deb;
private String specif_1;
private String imp_result;
private String fileName;
private Instant generationTime;
private Long generationId;
private Long paymentInstructionId;
@ -207,14 +206,6 @@ public class SDf03 extends SpcexObjectBase {
this.imp_result = imp_result;
}
public String getFileName() {
return fileName;
}
public void setFileName(String fileName) {
this.fileName = fileName;
}
public Instant getGenerationTime() {
return generationTime;
}

View file

@ -1,18 +1,18 @@
package ru.clearing.classes.statics.data.sdf;
import ru.clearing.classes.ConstSerializable;
import ru.spcex.platform.classes.base.SpcexObjectBase;
import ru.spcex.platform.classes.base.interfaces.WithFileName;
import java.math.BigDecimal;
import java.time.Instant;
import ru.clearing.classes.ConstSerializable;
import ru.spcex.platform.classes.base.SpcexObjectBase;
import ru.spcex.platform.classes.base.interfaces.WithCurrency;
import ru.spcex.platform.classes.base.interfaces.WithFileName;
/**
* ДФ-06 Запрос на зачисление/списание денежных средств
* <p>
* DB table: S_DF06
**/
public class SDf06 extends SpcexObjectBase implements WithFileName, WithCurrency {
public class SDf06 extends SpcexObjectBase implements WithFileName {
private static final long serialVersionUID = ConstSerializable.serialVersionUID;
private String account;
@ -28,9 +28,6 @@ public class SDf06 extends SpcexObjectBase implements WithFileName, WithCurrency
private String fileName;
private Instant generationTime;
private Long generationId;
private String Doc_Num;
private String Doc_Date;
private String pay_val;
public String getAccount() {
return account;
@ -136,29 +133,4 @@ public class SDf06 extends SpcexObjectBase implements WithFileName, WithCurrency
this.generationId = value;
}
public String getDoc_Num() {
return Doc_Num;
}
public void setDoc_Num(String value) {
this.Doc_Num=value;
}
public String getDoc_Date() {
return Doc_Date;
}
public void setDoc_Date(String value) {
this.Doc_Date=value;
}
public String getPay_val() {
return pay_val;
}
public void setPay_val(String value) {
this.pay_val=value;
}
@Override
public String currency() {
return getPay_val();
}
}

View file

@ -5,7 +5,6 @@ import ru.spcex.platform.classes.base.SpcexObjectBase;
import java.math.BigDecimal;
import java.time.Instant;
import java.time.LocalDate;
/**
* ДФ-07 Ответ на запрос по зачислению/списанию денежных средств
@ -26,13 +25,9 @@ public class SDf07 extends SpcexObjectBase {
private String spec;
private BigDecimal number;
private BigDecimal result;
private String fileName;
private Instant generationTime;
private Long generationId;
private Long inSDfId;
private String Doc_Num;
private String Doc_Date;
private String pay_val;
public String getAccount() {
return account;
@ -122,14 +117,6 @@ public class SDf07 extends SpcexObjectBase {
this.result = value;
}
public String getFileName() {
return fileName;
}
public void setFileName(String fileName) {
this.fileName = fileName;
}
public Instant getGenerationTime() {
return generationTime;
}
@ -154,28 +141,4 @@ public class SDf07 extends SpcexObjectBase {
this.inSDfId = value;
}
public String getDoc_Num() {
return Doc_Num;
}
public void setDoc_Num(String value) {
this.Doc_Num = value;
}
public String getDoc_Date() {
return Doc_Date;
}
public void setDoc_Date(String value) {
this.Doc_Date = value;
}
public String getPay_val() {
return pay_val;
}
public void setPay_val(String value) {
this.pay_val = value;
}
}

View file

@ -23,7 +23,6 @@ public class SDf12 extends SpcexObjectBase {
private String transactionNumber;
private String transactionQuantity;
private String result;
private String fileName;
private Instant generationTime;
private Long generationId;
@ -99,14 +98,6 @@ public class SDf12 extends SpcexObjectBase {
this.result = result;
}
public String getFileName() {
return fileName;
}
public void setFileName(String fileName) {
this.fileName = fileName;
}
public Instant getGenerationTime() {
return generationTime;
}

View file

@ -15,7 +15,6 @@ public class SDf52 extends SpcexObjectBase {
private String account;
private String acc_name;
private String acc_type;
private String deal;
private String date;
private Long status;
@ -37,13 +36,6 @@ public class SDf52 extends SpcexObjectBase {
this.acc_name=value;
}
public String getAcc_type() {
return acc_type;
}
public void setAcc_type(String value) {
this.acc_type=value;
}
public String getDeal() {
return deal;
}

View file

@ -1,9 +1,12 @@
package ru.clearing.classes.statics.data.sdf;
import java.time.Instant;
import ru.clearing.classes.ConstSerializable;
import ru.spcex.platform.classes.base.SpcexObjectBase;
import java.math.BigDecimal;
import java.time.Instant;
import java.time.LocalDate;
/**
* ДФ-53 Квитанция о получении информации о состоянии счета (блокировка/разблокировка/закрытие/открытие)
* <p>
@ -19,10 +22,8 @@ public class SDf53 extends SpcexObjectBase {
private String result;
private Instant generationTime;
private Long generationId;
private String fileName;
private Long inSDfId;
private String accName;
private String accType;
public String getAccount() {
return account;
@ -80,14 +81,6 @@ public class SDf53 extends SpcexObjectBase {
this.generationId = value;
}
public String getFileName() {
return fileName;
}
public void setFileName(String fileName) {
this.fileName = fileName;
}
public Long getInSDfId() {
return inSDfId;
}
@ -103,12 +96,4 @@ public class SDf53 extends SpcexObjectBase {
public void setAccName(String accName) {
this.accName = accName;
}
public String getAccType() {
return accType;
}
public void setAccType(String accType) {
this.accType = accType;
}
}

View file

@ -4,7 +4,6 @@ import ru.clearing.classes.ConstSerializable;
import ru.spcex.platform.classes.base.SpcexObjectBase;
import java.time.Instant;
import java.time.LocalDate;
/**
* ДФ-54 Вывод свободных средств для инициаторов категории В с клирингового счета 30414
@ -56,11 +55,6 @@ public class SDf54 extends SpcexObjectBase {
private String doc_result;
private Instant generationTime;
private Long generationId;
private String Doc_Num;
private String Doc_Date;
private String Value_date;
private String Swift_ben;
private String Swift_int;
public String getSeg_type() {
return seg_type;
@ -398,44 +392,4 @@ public class SDf54 extends SpcexObjectBase {
this.generationId = value;
}
public String getDoc_Num() {
return Doc_Num;
}
public void setDoc_Num(String value) {
this.Doc_Num = value;
}
public String getDoc_Date() {
return Doc_Date;
}
public void setDoc_Date(String value) {
this.Doc_Date = value;
}
public String getValue_date() {
return Value_date;
}
public void setValue_date(String value) {
this.Value_date = value;
}
public String getSwift_ben() {
return Swift_ben;
}
public void setSwift_ben(String value) {
this.Swift_ben = value;
}
public String getSwift_int() {
return Swift_int;
}
public void setSwift_int(String value) {
this.Swift_int = value;
}
}

View file

@ -4,7 +4,6 @@ import ru.clearing.classes.ConstSerializable;
import ru.spcex.platform.classes.base.SpcexObjectBase;
import java.time.Instant;
import java.time.LocalDate;
/**
* ДФ-55 Квитанция об обработке ДФ-54
@ -57,11 +56,6 @@ public class SDf55 extends SpcexObjectBase {
private String fileName;
private Instant generationTime;
private Long generationId;
private String Doc_Num;
private String Doc_Date;
private String Value_date;
private String Swift_ben;
private String Swift_int;
public String getSeg_type() {
return seg_type;
@ -407,44 +401,4 @@ public class SDf55 extends SpcexObjectBase {
this.generationId = value;
}
public String getDoc_Num() {
return Doc_Num;
}
public void setDoc_Num(String value) {
this.Doc_Num = value;
}
public String getDoc_Date() {
return Doc_Date;
}
public void setDoc_Date(String value) {
this.Doc_Date = value;
}
public String getValue_date() {
return Value_date;
}
public void setValue_date(String value) {
this.Value_date = value;
}
public String getSwift_ben() {
return Swift_ben;
}
public void setSwift_ben(String value) {
this.Swift_ben = value;
}
public String getSwift_int() {
return Swift_int;
}
public void setSwift_int(String value) {
this.Swift_int = value;
}
}

View file

@ -1,16 +1,16 @@
package ru.clearing.classes.statics.data.sdf;
import java.time.Instant;
import ru.clearing.classes.ConstSerializable;
import ru.spcex.platform.classes.base.SpcexObjectBase;
import ru.spcex.platform.classes.base.interfaces.WithCurrency;
import java.time.Instant;
/**
* ДФ-57 Список транзакций о списании/зачислении за период по всем счетам (ТБС и КС)
* <p>
* DB table: S_DF57
**/
public class SDf57 extends SpcexObjectBase implements WithCurrency {
public class SDf57 extends SpcexObjectBase {
private static final long serialVersionUID = ConstSerializable.serialVersionUID;
private Long dbfId;
@ -53,12 +53,6 @@ public class SDf57 extends SpcexObjectBase implements WithCurrency {
private String fileName;
private Instant generationTime;
private Long generationId;
private String Doc_Num;
private String Doc_Date;
private String dt_in;
private String kt_in;
private String dt_out;
private String kt_out;
public Long getDbfId() {
return dbfId;
@ -380,56 +374,4 @@ public class SDf57 extends SpcexObjectBase implements WithCurrency {
this.generationId = value;
}
public String getDoc_Num() {
return Doc_Num;
}
public void setDoc_Num(String value) {
this.Doc_Num = value;
}
public String getDoc_Date() {
return Doc_Date;
}
public void setDoc_Date(String value) {
this.Doc_Date = value;
}
public String getDt_in() {
return dt_in;
}
public void setDt_in(String value) {
this.dt_in = value;
}
public String getKt_in() {
return kt_in;
}
public void setKt_in(String value) {
this.kt_in = value;
}
public String getDt_out() {
return dt_out;
}
public void setDt_out(String value) {
this.dt_out = value;
}
public String getKt_out() {
return kt_out;
}
public void setKt_out(String value) {
this.kt_out = value;
}
@Override
public String currency() {
return getPay_val();
}
}

View file

@ -1,77 +0,0 @@
package ru.clearing.classes.statics.data.security;
import ru.clearing.classes.ConstSerializable;
import java.math.BigDecimal;
/**
* Валютные пары
* <p>
* DB table: CURRENCY_PAIR_SECURITY
**/
public class CurrencyPairSecurity extends Security {
private static final long serialVersionUID = ConstSerializable.serialVersionUID;
private BigDecimal baseUnitSize;
private Long currencyPairId;
private String code;
private String settlementType;
private String clearingOrganization;
// private String settlementOrganization;
private Long securityId;
// extend: private String securitySymbol;
// extend: private String shortName;
// extend: private String fullName;
// extend: private String shortNameEng;
// extend: private String fullNameEng;
// extend: private String workflowStatus;
public BigDecimal getBaseUnitSize() {
return baseUnitSize;
}
public void setBaseUnitSize(BigDecimal value) {
this.baseUnitSize = value;
}
public Long getCurrencyPairId() {
return currencyPairId;
}
public void setCurrencyPairId(Long currencyPairId) {
this.currencyPairId = currencyPairId;
}
public String getCode() {
return code;
}
public void setCode(String value) {
this.code = value;
}
public String getSettlementType() {
return settlementType;
}
public void setSettlementType(String value) {
this.settlementType = value;
}
public String getClearingOrganization() {
return clearingOrganization;
}
public void setClearingOrganization(String value) {
this.clearingOrganization = value;
}
public Long getSecurityId() {
return securityId;
}
public void setSecurityId(Long value) {
this.securityId = value;
}
}

View file

@ -1,28 +0,0 @@
package ru.clearing.classes.statics.data.security;
import ru.clearing.classes.ConstSerializable;
import ru.clearing.classes.objects.BusinessEvent;
import java.io.Serial;
/**
* Изменение состояния объекта Валютные пары
* <p>
* DB table: CURRENCY_PAIR_SECURITY_HISTORY
**/
public class CurrencyPairSecurityHistory extends BusinessEvent<CurrencyPairSecurity> {
@Serial
private static final long serialVersionUID = ConstSerializable.serialVersionUID;
private CurrencyPairSecurity object;
@Override
public CurrencyPairSecurity getObject() {
return object;
}
@Override
public void setObject(CurrencyPairSecurity object) {
this.object = object;
}
}

View file

@ -6,13 +6,13 @@
<parent>
<groupId>ru.spcex.clearing</groupId>
<artifactId>clearing-parent</artifactId>
<version>SPCEX-3.11.0.0</version>
<version>SPCEX-1.0.0.0</version>
</parent>
<artifactId>cleaning-builders</artifactId>
<name>cleaning-builders</name>
<description>Cleaning builders module</description>
<version>SPCEX-3.11.0.0</version>
<version>SPCEX-1.0.0.0</version>
<packaging>jar</packaging>
@ -26,7 +26,7 @@
<dependency>
<groupId>ru.spcex.clearing</groupId>
<artifactId>classes</artifactId>
<version>SPCEX-3.11.0.0</version>
<version>SPCEX-1.0.0.0</version>
<scope>compile</scope>
</dependency>
<dependency>

Some files were not shown because too many files have changed in this diff Show more