Compare commits
113 commits
10_01_2024
...
dev_force_
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9f78eff8a3 | ||
|
|
9bf616b61c | ||
|
|
9971299c70 | ||
|
|
e8fda5a8f8 | ||
|
|
e5d0e208bd | ||
|
|
085acf8a2b | ||
|
|
e58a19a511 | ||
|
|
3d47b2b2f3 | ||
|
|
0f5ec7419e | ||
|
|
db4a084e83 | ||
|
|
b028aca544 | ||
|
|
7308f69c78 | ||
|
|
cbad15aab9 | ||
|
|
9d0e092d70 | ||
|
|
4da055edad | ||
|
|
eb79ccf8d0 | ||
|
|
89bf4fe820 | ||
|
|
0dfd89d294 | ||
|
|
4580880fe4 | ||
|
|
38c04c7150 | ||
|
|
fe84a88781 | ||
|
|
60deeca9b9 | ||
|
|
2adb585aa2 | ||
|
|
a8481d0e9e | ||
|
|
bb35521cb7 | ||
|
|
7d8def669d | ||
|
|
867d5f928a | ||
|
|
862b7f0006 | ||
|
|
4e205f0f74 | ||
|
|
576eaaee9f | ||
|
|
1a940c4322 | ||
|
|
ba4b9aa042 | ||
|
|
4f0c6a6311 | ||
|
|
110f95f74c | ||
|
|
b6ff7b091d | ||
|
|
d1cf6da58e | ||
|
|
e32733de60 | ||
|
|
634e6200f9 | ||
|
|
a804a64078 | ||
|
|
3ab04ca9e8 | ||
|
|
481a24be77 | ||
|
|
c705b4e27c | ||
|
|
42c75db19e | ||
|
|
7942939aee | ||
|
|
afc6983537 | ||
|
|
619b7d8767 | ||
|
|
686b15318d | ||
|
|
98a77dc53e | ||
|
|
499b196183 | ||
|
|
bc5377a752 | ||
|
|
50962c34b5 | ||
|
|
0815f66ee7 | ||
|
|
96a0ef78aa | ||
|
|
b722a9b90e | ||
|
|
4d7a2ebbf7 | ||
|
|
960e4ffab0 | ||
|
|
f64910154c | ||
|
|
5d40c9db34 | ||
|
|
f92941a2fc | ||
|
|
d06a0efeec | ||
|
|
9e5d54b130 | ||
|
|
8ee172b075 | ||
|
|
1f2f70d301 | ||
|
|
f033ea8244 | ||
|
|
233b301c8f | ||
|
|
5eff6962fe | ||
|
|
4a4c4f94db | ||
|
|
c2bd914e79 | ||
|
|
1e6eb8fd00 | ||
|
|
57855bd8b5 | ||
|
|
c8f65428ff | ||
|
|
159231763d | ||
|
|
43f534e02b | ||
|
|
603bec95b0 | ||
|
|
1e1840028a | ||
|
|
24c203a83f | ||
|
|
d4285494af | ||
|
|
624f0dfd29 | ||
|
|
35151a172f | ||
|
|
58f78c39b4 | ||
|
|
2c3a08232b | ||
|
|
d5da4b3c1e | ||
|
|
ad0d807b2c | ||
|
|
aefd907ec7 | ||
|
|
2572e7ea26 | ||
|
|
b19bc3b426 | ||
|
|
6a20c2faed | ||
|
|
efce62e518 | ||
|
|
11fb7509f4 | ||
|
|
960e8b2c7e | ||
|
|
460642c98c | ||
|
|
e605897cc1 | ||
|
|
4992cc4bad | ||
|
|
7e40208ce7 | ||
|
|
a7c791e61a | ||
|
|
cb49f07b10 | ||
|
|
157658962a | ||
|
|
b9b50ba957 | ||
|
|
ce85bbe8be | ||
|
|
8d8322e009 | ||
|
|
227e76a5ce | ||
|
|
ed3c08cdeb | ||
|
|
256dfafce3 | ||
|
|
256f88a5c5 | ||
|
|
9b81ee6b35 | ||
|
|
fd2ba48189 | ||
|
|
0f65c05f08 | ||
|
|
2cbb8a39ef | ||
|
|
be58666afc | ||
|
|
da8adbd052 | ||
|
|
fd900e27b6 | ||
|
|
97b8a4fd78 | ||
|
|
32c7d50444 |
359 changed files with 29768 additions and 3812 deletions
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<artifactId>clearing-parent</artifactId>
|
||||
<groupId>ru.spcex.clearing</groupId>
|
||||
<version>SPCEX-1.0.0.0</version>
|
||||
<version>SPCEX-3.5.10.2</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
|
|
@ -48,6 +48,12 @@
|
|||
<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>
|
||||
|
|
|
|||
|
|
@ -17,11 +17,15 @@ 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;
|
||||
|
||||
|
|
@ -67,7 +71,9 @@ public class ClientCodeValidationConfig {
|
|||
acc -> Objects.equals(context.getValidatedObject().getCompanyId(), acc.getCompanyId())
|
||||
? null : AccountError.AccountNotFound
|
||||
),
|
||||
|
||||
new ExistAllCurrencyAccountId<>("currencyAccountList",
|
||||
ClientCodeNewRequest::getCurrencyAccountList
|
||||
),
|
||||
|
||||
DictionaryPresentRule.instance("stauts",
|
||||
ClientCodeNewRequest::getStatus,
|
||||
|
|
@ -80,6 +86,41 @@ 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 -> {
|
||||
|
|
@ -128,6 +169,9 @@ public class ClientCodeValidationConfig {
|
|||
acc -> Objects.equals(context.getValidatedObject().getCompanyId(), acc.getCompanyId())
|
||||
? null : AccountError.AccountNotFound
|
||||
),
|
||||
new ExistAllCurrencyAccountId<>("currencyAccountList",
|
||||
ClientCodeUpdateRequest::getCurrencyAccountList
|
||||
),
|
||||
|
||||
DictionaryPresentRule.instance("stauts",
|
||||
ClientCodeUpdateRequest::getStatus,
|
||||
|
|
|
|||
|
|
@ -0,0 +1,169 @@
|
|||
package ru.spcex.clearing.account.config.validation;
|
||||
|
||||
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.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.validation.IValidationRule;
|
||||
import ru.spcex.platform.utils.validation.IValidator;
|
||||
import ru.spcex.platform.utils.validation.ValidatorImpl;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.function.Consumer;
|
||||
import java.util.function.Function;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@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("id",
|
||||
TradingClearingRegistryListNewRequest::getTradingClearingRegistryId,
|
||||
IMDGDistributedNames.Map_TradingClearingRegistry,
|
||||
TradingClearingRegistry.class,
|
||||
AccountError.RequiredFieldEmpty,
|
||||
AccountError.TradingClearingRegistryNotFound,
|
||||
false),
|
||||
new ExistAllCurrencyAccountId<>("currencyAccountList",
|
||||
TradingClearingRegistryListNewRequest::getCurrencyAccountList,
|
||||
false,
|
||||
null),
|
||||
DictionaryPresentRule.instance("stauts",
|
||||
TradingClearingRegistryListNewRequest::getStatus,
|
||||
IMDGDistributedNames.Map_ServiceStatusDictionary,
|
||||
ServiceStatusDictionary.class,
|
||||
AccountError.RequiredFieldEmpty,
|
||||
AccountError.DictionaryNotFound,
|
||||
true)
|
||||
);
|
||||
};
|
||||
}
|
||||
|
||||
@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.instance("id",
|
||||
TradingClearingRegistryListUpdateRequest::getTradingClearingRegistryId,
|
||||
IMDGDistributedNames.Map_TradingClearingRegistry,
|
||||
TradingClearingRegistry.class,
|
||||
AccountError.RequiredFieldEmpty,
|
||||
AccountError.TradingClearingRegistryNotFound,
|
||||
false),
|
||||
new ExistAllCurrencyAccountId<>("currencyAccountList",
|
||||
TradingClearingRegistryListUpdateRequest::getCurrencyAccountList,
|
||||
false,
|
||||
TradingClearingRegistryListUpdateRequest::getId
|
||||
),
|
||||
DictionaryPresentRule.instance("stauts",
|
||||
TradingClearingRegistryListUpdateRequest::getStatus,
|
||||
IMDGDistributedNames.Map_ServiceStatusDictionary,
|
||||
ServiceStatusDictionary.class,
|
||||
AccountError.RequiredFieldEmpty,
|
||||
AccountError.DictionaryNotFound,
|
||||
true)
|
||||
);
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
public static class ExistAllCurrencyAccountId<R> implements IValidationRule<ImdgValidationContext<R>> {
|
||||
String fieldName;
|
||||
Function<R, List<Long>> idListGetter;
|
||||
boolean required;
|
||||
Function<R, Long> idGetter;
|
||||
|
||||
public ExistAllCurrencyAccountId(String fieldName, Function<R, List<Long>> idListGetter, boolean required, Function<R, Long> idGetter) {
|
||||
this.fieldName = fieldName;
|
||||
this.idListGetter = idListGetter;
|
||||
this.required = required;
|
||||
this.idGetter = idGetter;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Optional<EnumMessage> validate(ImdgValidationContext<R> context) {
|
||||
R validatedObject = context.getValidatedObject();
|
||||
List<Long> ids = idListGetter.apply(validatedObject);
|
||||
if (ids == null || ids.isEmpty()) {
|
||||
if (required)
|
||||
return of(AccountError.RequiredFieldEmpty, fieldName); // обязательное поле
|
||||
else
|
||||
return Optional.empty();
|
||||
}
|
||||
Imdg<Account> accountImdg = context.obtainMap(IMDGDistributedNames.Map_Account, Account.class);
|
||||
// Проверить существование счетов
|
||||
for (Long id : ids) {
|
||||
if (id == null) { // null значения в массиве не ожидаются
|
||||
return of(AccountError.RequiredFieldEmpty, fieldName);
|
||||
}
|
||||
Account byIdObject = accountImdg.getSingleObjectByID(id);
|
||||
if (byIdObject == null)
|
||||
return of(AccountError.AccountNotFound, id, fieldName);
|
||||
if (!AccountType.Curr.equalsByKey(byIdObject.getAccountType())) {
|
||||
return of(AccountError.AccountIsNotACurrency, id, 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.in("accountId", ids.toArray(new Comparable[0])));
|
||||
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(ids::contains)
|
||||
.collect(Collectors.toSet());
|
||||
return of(AccountError.AccountForTradingClearingRegistryAlreadyUsed, duplicateAccounts, fieldName); // (5023) «Счет %s уже используется»
|
||||
}
|
||||
|
||||
return empty();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String ruleName() {
|
||||
return getClass().getSimpleName() + "{" + fieldName + "}";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -8,6 +8,7 @@ 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.registry.TradingClearingRegistry;
|
||||
import ru.clearing.classes.statics.data.registry.TradingClearingRegistryList;
|
||||
import ru.clearing.platform.dictionary.*;
|
||||
import ru.spcex.clearing.imdg.IMDGDistributedNames;
|
||||
import ru.spcex.clearing.validation.common.ValidationHelper;
|
||||
|
|
@ -42,6 +43,7 @@ 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);
|
||||
|
||||
//for ClientCodeValidationConfig
|
||||
addImdg.accept(IMDGDistributedNames.Map_ClientCode, ClientCode.class);
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@ public enum AccountError implements IErrorEnumId {
|
|||
AccountForTradingClearingRegistryAlreadyUsed(5023L),
|
||||
AccountFieldNotSet(5024L),
|
||||
AccountDepoTypeRequired(5025L),
|
||||
AccountIsNotACurrency(5026L), // Счет %S не валютный
|
||||
TradingClearingRegistryNotFound(3022L),
|
||||
;
|
||||
|
||||
|
|
|
|||
|
|
@ -187,6 +187,10 @@ public class ClearingAccountService extends QueueConsumer implements Initializin
|
|||
imdgTransaction.rollbackTransaction();
|
||||
}
|
||||
}
|
||||
|
||||
if (txOk && account != null) {
|
||||
sendNotificationAccountNewRequest(account);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
|
|
@ -242,6 +246,7 @@ public class ClearingAccountService extends QueueConsumer implements Initializin
|
|||
|
||||
AccountSdf01Request req = userRequest.getRequestPayload();
|
||||
List<AccountSdfToStatementRequestPart> accountToStatement = new ArrayList<>();
|
||||
List<Account> accountsToNotification = new ArrayList<>();
|
||||
|
||||
ImdgTransaction imdgTransaction = imdgProvider.newTransaction();
|
||||
boolean txOk = false;
|
||||
|
|
@ -289,6 +294,7 @@ 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());
|
||||
|
|
@ -317,6 +323,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;
|
||||
|
|
@ -531,6 +542,24 @@ 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;
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ 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 ru.clearing.classes.statics.data.account.ClientCode;
|
||||
import ru.clearing.classes.statics.data.registry.TradingClearingRegistry;
|
||||
|
|
@ -20,6 +21,8 @@ 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.platform.messaging.domain.cud.registry.TradingClearingRegistryNewRequest;
|
||||
import ru.spcex.clearing.platform.messaging.domain.cud.registry.TradingClearingRegistryUpdateRequest;
|
||||
import ru.spcex.clearing.platform.messaging.serialization.LogFormatter;
|
||||
|
|
@ -40,7 +43,9 @@ import ru.spcex.platform.utils.log.ExceptionUtils;
|
|||
import ru.spcex.platform.utils.validation.IValidator;
|
||||
|
||||
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;
|
||||
|
|
@ -65,6 +70,8 @@ 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,
|
||||
|
|
@ -74,6 +81,7 @@ 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,
|
||||
|
|
@ -92,6 +100,7 @@ public class ClientCodeService extends QueueConsumer implements InitializingBean
|
|||
this.messageResolver = messageResolver;
|
||||
this.userRoleVerification = userRoleVerification;
|
||||
this.tradingClearingRegistryService = tradingClearingRegistryService;
|
||||
this.context = context; // TradingClearingRegistryListService
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -119,10 +128,11 @@ 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) {
|
||||
|
|
@ -132,8 +142,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) {
|
||||
|
|
@ -144,6 +154,10 @@ public class ClientCodeService extends QueueConsumer implements InitializingBean
|
|||
}
|
||||
|
||||
protected RequestInfoUpdate clientCodeNew(BaseRequest<ClientCodeNewRequest> userRequest) {
|
||||
return clientCodeNew0(userRequest, false);
|
||||
}
|
||||
|
||||
protected RequestInfoUpdate clientCodeNew0(BaseRequest<ClientCodeNewRequest> userRequest, boolean fromTCRList) {
|
||||
log.debug("ClientCodeNewRequest received {}", userRequest.getId());
|
||||
|
||||
RequestInfoUpdate requestInfoUpdate = userRoleVerification.validateRoleAndGetResult(userRequest);
|
||||
|
|
@ -171,15 +185,57 @@ public class ClientCodeService extends QueueConsumer implements InitializingBean
|
|||
}
|
||||
}
|
||||
|
||||
ClientCode newClientCode = buildClientCode(req);
|
||||
clientCodeMap.insert(newClientCode);
|
||||
log.debug("successfully processed, new clientCode id {}", newClientCode.getId());
|
||||
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);
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
protected RequestInfoUpdate clientCodeNewFromApiUmCompany(BaseRequest<ClientCodeNewRequest> userRequest) {
|
||||
return clientCodeNewFromApiUmCompany0(userRequest, false);
|
||||
}
|
||||
|
||||
protected RequestInfoUpdate clientCodeNewFromApiUmCompany0(BaseRequest<ClientCodeNewRequest> userRequest, boolean fromTCRList) {
|
||||
log.debug("ClientCodeNewRequest (UM_COMPANY) received {}", userRequest.getId());
|
||||
|
||||
RequestInfoUpdate requestInfoUpdate = userRoleVerification.validateRoleAndGetResult(userRequest);
|
||||
|
|
@ -208,9 +264,47 @@ public class ClientCodeService extends QueueConsumer implements InitializingBean
|
|||
}
|
||||
}
|
||||
|
||||
ClientCode newClientCode = buildClientCode(req);
|
||||
clientCodeMap.insert(newClientCode);
|
||||
log.debug("successfully processed, new clientCode id {}", newClientCode.getId());
|
||||
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);
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
|
@ -250,6 +344,7 @@ public class ClientCodeService extends QueueConsumer implements InitializingBean
|
|||
}
|
||||
|
||||
updateClientCode(clientCode, req);
|
||||
//fixme спросить, у нас при апдейте передаётся clientCode.id которого надо изменять. А тут список currencyAccountList приходит - в нём что будет - только 1 счёт для него и его же менять?
|
||||
|
||||
clientCodeMap.update(clientCode);
|
||||
log.debug("successfully processed update, id {}", clientCode.getId());
|
||||
|
|
@ -283,7 +378,7 @@ public class ClientCodeService extends QueueConsumer implements InitializingBean
|
|||
return null;
|
||||
}
|
||||
|
||||
TradingClearingRegistry selectTradingClearingRegistry(Long companyId, Long moneyAccountId, Long depoAccountId) {
|
||||
protected TradingClearingRegistry selectTradingClearingRegistry(Long companyId, Long moneyAccountId, Long depoAccountId) {
|
||||
Map<String, Comparable<?>> query = new HashMap<>();
|
||||
query.put("companyId", companyId);
|
||||
query.put("moneyAccountId", moneyAccountId);
|
||||
|
|
@ -310,7 +405,7 @@ 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);
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@ 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;
|
||||
|
|
@ -129,6 +130,9 @@ public class DepoAccountService extends QueueConsumer implements InitializingBea
|
|||
imdgTransaction.rollbackTransaction();
|
||||
}
|
||||
}
|
||||
if (txOk && depoAccount != null) {
|
||||
sendNotificationAccountNewRequest(account);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
|
|
@ -137,6 +141,7 @@ 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;
|
||||
|
|
@ -184,7 +189,8 @@ public class DepoAccountService extends QueueConsumer implements InitializingBea
|
|||
Long depoAccountId = -1L;
|
||||
Long accountId = -1L;
|
||||
|
||||
accountId = accountImdg.insert(account);
|
||||
accountId = accountImdg.insert(account);
|
||||
accountsToNotification.add(account);
|
||||
|
||||
DepoAccount depoAccount = new DepoAccount();
|
||||
depoAccount.setCompanyId(accountReq.getCompanyId());
|
||||
|
|
@ -219,6 +225,11 @@ 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;
|
||||
|
|
@ -228,10 +239,27 @@ public class DepoAccountService extends QueueConsumer implements InitializingBea
|
|||
StatementRequest request = new StatementRequest();
|
||||
request.setGroupId(groupingSdf01Id);
|
||||
request.setChildGenerationId(groupingSdf02Id);
|
||||
request.setContinueSdf(true); //fixme????
|
||||
request.setContinueSdf(true);
|
||||
request.setAccountCreationResults(results);
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,240 @@
|
|||
package ru.spcex.clearing.account.service;
|
||||
|
||||
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.CreateRegistryByTCRListRequest;
|
||||
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.registry.TradingClearingRegistryListNewRequest;
|
||||
import ru.spcex.clearing.platform.messaging.domain.cud.registry.TradingClearingRegistryListUpdateRequest;
|
||||
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.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.enumeration.TradingClearingRegistryPurpose;
|
||||
import ru.spcex.platform.enumeration.TradingClearingRegistryType;
|
||||
import ru.spcex.platform.imdg.api.Imdg;
|
||||
import ru.spcex.platform.imdg.api.ImdgProvider;
|
||||
import ru.spcex.platform.imdg.api.predicate.ImdgPredicateBuilder;
|
||||
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.*;
|
||||
import java.util.function.Function;
|
||||
|
||||
@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 tradingClearingRegistryListNew0(userRequest, false);
|
||||
}
|
||||
|
||||
protected RequestInfoUpdate tradingClearingRegistryListNew0(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();
|
||||
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);
|
||||
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 {
|
||||
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(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);
|
||||
|
||||
log.debug("successfully processed, id {}", newIds);
|
||||
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());
|
||||
|
||||
//todo какие поля нужно обновлять?
|
||||
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());
|
||||
}
|
||||
|
||||
log.debug("successfully processed, id {}", tradingClearingRegistryList.getId());
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* clearing-service сообщение на открытие клиринговых регистров;
|
||||
*/
|
||||
protected void sendNotificationToClearingSvc(List<Long> tradingClearingRegistries) {
|
||||
CreateRegistryByTCRListRequest request = new CreateRegistryByTCRListRequest();
|
||||
request.setTradingClearingRegistryListIds(tradingClearingRegistries);
|
||||
log.debug("Send message to kafka \"{}\": {}", Consts.DESTINATION_TRADING_CLEARING_REGISTRY_ON_TCRLIST_NEW, LogFormatter.toStringWrapper(request));
|
||||
kafkaSender.sendRequestToQueue(Consts.DESTINATION_TRADING_CLEARING_REGISTRY_ON_TCRLIST_NEW, request);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -1,38 +1,56 @@
|
|||
<?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>%date{HH:mm:ss.SSS} [%thread] %-5level %class{0}:%line - %message%n</Pattern>
|
||||
<Pattern>${CONSOLE_LOG_PATTERN}</Pattern>
|
||||
<charset>utf-8</charset>
|
||||
</encoder>
|
||||
</appender>
|
||||
<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<file>./logs/account-service.log</file>
|
||||
<!-- 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>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %class{0}:%msg%n</Pattern>
|
||||
<Pattern>${FILE_LOG_PATTERN}</Pattern>
|
||||
<charset>utf8</charset>
|
||||
</encoder>
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
|
||||
<fileNamePattern>
|
||||
./logs/account-service.%i.log
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||
<fileNamePattern>${LOG_PATH}/${FILE_NAME}-text.%d{yyyy-MM-dd}.%i.gz
|
||||
</fileNamePattern>
|
||||
<minIndex>1</minIndex>
|
||||
<maxIndex>10</maxIndex>
|
||||
<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>
|
||||
</rollingPolicy>
|
||||
<triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
|
||||
<maxFileSize>500MB</maxFileSize>
|
||||
</triggeringPolicy>
|
||||
</appender>
|
||||
|
||||
<root level="warn">
|
||||
<appender-ref ref="CONSOLE"/>
|
||||
<appender-ref ref="FILE"/>
|
||||
<root level="info">
|
||||
<!-- <appender-ref ref="CONSOLE"/> -->
|
||||
<appender-ref ref="TEXT_FILE"/>
|
||||
<appender-ref ref="JSON_FILE" />
|
||||
</root>
|
||||
|
||||
<logger name="ru.spcex" level="debug" additivity="false">
|
||||
<appender-ref ref="FILE"/>
|
||||
<appender-ref ref="CONSOLE"/>
|
||||
<appender-ref ref="TEXT_FILE"/>
|
||||
<appender-ref ref="JSON_FILE" />
|
||||
<!-- <appender-ref ref="CONSOLE"/> -->
|
||||
</logger>
|
||||
</configuration>
|
||||
|
|
|
|||
|
|
@ -19,9 +19,11 @@ 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;
|
||||
|
|
@ -35,6 +37,8 @@ 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;
|
||||
|
|
@ -42,6 +46,8 @@ 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;
|
||||
|
||||
|
|
@ -53,6 +59,9 @@ import static ru.spcex.clearing.test.TestUtils.waitingSendAndCheckRecord;
|
|||
TradingClearingRegistryService.class,
|
||||
TradingClearingRegistryValidationConfig.class,
|
||||
|
||||
TradingClearingRegistryListService.class,
|
||||
TradingClearingRegistryListValidationConfig.class,
|
||||
|
||||
ValidationConfig.class,
|
||||
BeanConfiguration.class,
|
||||
|
||||
|
|
@ -79,6 +88,7 @@ class ClientCodeServiceTest {
|
|||
protected Producer<String, Object> mockProducer;
|
||||
|
||||
private Imdg<ClientCode> clientCodeImdg;
|
||||
private Imdg<TradingClearingRegistryList> tradingClearingRegistryListImdg;
|
||||
|
||||
|
||||
// ****************************-*******************
|
||||
|
|
@ -87,9 +97,11 @@ 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");
|
||||
|
|
@ -149,6 +161,14 @@ 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);
|
||||
}
|
||||
|
||||
|
|
@ -207,7 +227,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);
|
||||
|
|
@ -292,6 +312,52 @@ 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>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,282 @@
|
|||
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.Curr.getKey());
|
||||
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.Curr.getKey());
|
||||
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.setCurrencyAccountList(Arrays.asList(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("RUB");
|
||||
|
||||
//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);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -11,7 +11,7 @@
|
|||
<parent>
|
||||
<artifactId>clearing-parent</artifactId>
|
||||
<groupId>ru.spcex.clearing</groupId>
|
||||
<version>SPCEX-1.0.0.0</version>
|
||||
<version>SPCEX-3.5.10.2</version>
|
||||
</parent>
|
||||
|
||||
|
||||
|
|
@ -61,6 +61,17 @@
|
|||
<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>
|
||||
|
|
@ -208,6 +219,19 @@
|
|||
</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>
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@ 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;
|
||||
|
|
@ -30,35 +31,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 = "get all CompanyRoleSet'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_CompanyRoleSet,
|
||||
CompanyRoleSet.class);
|
||||
CommonGetAllResponse response = new CommonGetAllResponse();
|
||||
response.fromEntity(all);
|
||||
return response;
|
||||
}
|
||||
|
||||
@ApiOperation(value = "create CompanyRoleSet.")
|
||||
@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)
|
||||
@RequestMapping(method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
@ResponseBody
|
||||
public CudResponse create(
|
||||
@ApiParam(value = "Значения полей нового объекта.", required = true)
|
||||
public CudResponse add(
|
||||
@ApiParam(value = "Параметры команды в JSON формате.", required = true)
|
||||
@RequestBody CompanyRoleSetNewAction companyRoleSetNewAction) throws ExecutionException, InterruptedException {
|
||||
return processRequest(Consts.DESTINATION_COMPANY_ROLE_SET_NEW, companyRoleSetNewAction);
|
||||
return processRequest(Consts.DESTINATION_COMPANY_ROLE_SETS_NEW, companyRoleSetNewAction);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "delete CompanyRoleSet.")
|
||||
@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.")
|
||||
@ApiResponses(value = {@ApiResponse(code = 200, message = "OK", response = CudResponse.class)})
|
||||
@RequestMapping(value = "/{id}", method = RequestMethod.DELETE)
|
||||
@ResponseBody
|
||||
|
|
@ -66,7 +67,17 @@ 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_SET_DELETE, deleteAction);
|
||||
return processRequest(Consts.DESTINATION_COMPANY_ROLE_SETS_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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,83 @@
|
|||
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;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,43 @@
|
|||
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;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,41 @@
|
|||
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;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,41 @@
|
|||
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;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,73 @@
|
|||
package ru.spcex.clearing.backendapi.controller.queue.register;
|
||||
|
||||
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;
|
||||
|
||||
@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);
|
||||
}
|
||||
}
|
||||
|
|
@ -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)) {
|
||||
if (!IEnumKey.contains(taskEnum.getCode(), Task.startOfClearing, Task.dbfExport_OUTV, Task.getAllBalance)) {
|
||||
log.warn(String.format("Task %s not support request with body", taskEnum.getCode()));
|
||||
} // else В мете эти модели с дополнительными параметрами (OUTV).
|
||||
Authentication authentication = SecurityContextHolder.getContext().getAuthentication();
|
||||
|
|
|
|||
|
|
@ -0,0 +1,84 @@
|
|||
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;
|
||||
}
|
||||
}
|
||||
|
|
@ -48,6 +48,9 @@ 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;
|
||||
|
|
|
|||
|
|
@ -31,6 +31,9 @@ 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;
|
||||
|
|
@ -43,6 +46,7 @@ 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;
|
||||
}
|
||||
|
|
@ -93,6 +97,14 @@ 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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -32,6 +32,9 @@ 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;
|
||||
|
|
@ -46,6 +49,7 @@ 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;
|
||||
}
|
||||
|
|
@ -104,6 +108,14 @@ 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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,71 @@
|
|||
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;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,46 @@
|
|||
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;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,60 @@
|
|||
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;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,60 @@
|
|||
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,456]")
|
||||
@JsonProperty
|
||||
private List<Long> currencyAccountList;
|
||||
@ApiModelProperty(value = "Наименование статуса", example = "ACTV")
|
||||
@JsonProperty
|
||||
private String status;
|
||||
|
||||
@Override
|
||||
public TradingClearingRegistryListNewRequest toRequest() {
|
||||
var req = new TradingClearingRegistryListNewRequest();
|
||||
req.setTradingClearingRegistryId(this.tradingClearingRegistryId);
|
||||
req.setCurrencyAccountList(this.currencyAccountList);
|
||||
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 List<Long> getCurrencyAccountList() {
|
||||
return currencyAccountList;
|
||||
}
|
||||
|
||||
public void setCurrencyAccountList(List<Long> currencyAccountList) {
|
||||
this.currencyAccountList = currencyAccountList;
|
||||
}
|
||||
|
||||
public String getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(String status) {
|
||||
this.status = status;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,74 @@
|
|||
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 = "1200")
|
||||
@JsonProperty
|
||||
private Long tradingClearingRegistryId;
|
||||
@ApiModelProperty(value = "Список валютных счетов", example = "[123,456]")
|
||||
@JsonProperty
|
||||
private List<Long> currencyAccountList;
|
||||
@ApiModelProperty(value = "Наименование статуса", example = "ACTV")
|
||||
@JsonProperty
|
||||
private String status;
|
||||
|
||||
|
||||
@Override
|
||||
public TradingClearingRegistryListUpdateRequest toRequest() {
|
||||
var req = new TradingClearingRegistryListUpdateRequest();
|
||||
req.setId(this.id);
|
||||
req.setTradingClearingRegistryId(this.tradingClearingRegistryId);
|
||||
req.setCurrencyAccountList(this.currencyAccountList);
|
||||
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 Long getTradingClearingRegistryId() {
|
||||
return tradingClearingRegistryId;
|
||||
}
|
||||
|
||||
public void setTradingClearingRegistryId(Long tradingClearingRegistryId) {
|
||||
this.tradingClearingRegistryId = tradingClearingRegistryId;
|
||||
}
|
||||
|
||||
public List<Long> getCurrencyAccountList() {
|
||||
return currencyAccountList;
|
||||
}
|
||||
|
||||
public void setCurrencyAccountList(List<Long> currencyAccountList) {
|
||||
this.currencyAccountList = currencyAccountList;
|
||||
}
|
||||
|
||||
public String getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(String status) {
|
||||
this.status = status;
|
||||
}
|
||||
}
|
||||
|
|
@ -2,14 +2,19 @@ package ru.spcex.clearing.backendapi.controller.request.cud.schedule;
|
|||
|
||||
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.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.LocalTime;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
|
@ -64,6 +69,12 @@ public class LauncherNew implements IAction<Object> {
|
|||
@JsonProperty
|
||||
private Long debitLeg_accountId;
|
||||
|
||||
@ApiModelProperty(value = "Время", dataType = "java.lang.String", example = "16:30:00")
|
||||
@JsonSerialize(using = LocalTimeSerializer.class)
|
||||
@JsonDeserialize(using = LocalTimeDeserializer.class)
|
||||
@JsonProperty
|
||||
public LocalTime fromTime;
|
||||
|
||||
@Override
|
||||
public Object toRequest() {
|
||||
LauncherCommandRequest taskRunnerCommandRequest = new LauncherCommandRequest();
|
||||
|
|
@ -83,6 +94,7 @@ public class LauncherNew implements IAction<Object> {
|
|||
taskRunnerCommandRequest.setCreditLeg_accountId(creditLeg_accountId);
|
||||
taskRunnerCommandRequest.setAddresseeId(addresseeId);
|
||||
taskRunnerCommandRequest.setDebitLeg_accountId(debitLeg_accountId);
|
||||
taskRunnerCommandRequest.setFromTime(fromTime);
|
||||
return taskRunnerCommandRequest;
|
||||
}
|
||||
|
||||
|
|
@ -227,4 +239,12 @@ 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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,159 @@
|
|||
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 getLotSize() {
|
||||
return lotSize;
|
||||
}
|
||||
|
||||
public void setLotSize(BigDecimal lotSize) {
|
||||
this.lotSize = lotSize;
|
||||
}
|
||||
|
||||
public BigDecimal getMinStep() {
|
||||
return minStep;
|
||||
}
|
||||
|
||||
public void setMinStep(BigDecimal minStep) {
|
||||
this.minStep = minStep;
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,172 @@
|
|||
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 getLotSize() {
|
||||
return lotSize;
|
||||
}
|
||||
|
||||
public void setLotSize(BigDecimal lotSize) {
|
||||
this.lotSize = lotSize;
|
||||
}
|
||||
|
||||
public BigDecimal getMinStep() {
|
||||
return minStep;
|
||||
}
|
||||
|
||||
public void setMinStep(BigDecimal minStep) {
|
||||
this.minStep = minStep;
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,39 +1,56 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<configuration>
|
||||
<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>
|
||||
<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">
|
||||
<encoder>
|
||||
<!-- |%X{ru.nbch.scoring.web.logging.mdc_key}-->
|
||||
<Pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %class{0}:%msg%n</Pattern>
|
||||
<!-- |%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>
|
||||
<charset>utf8</charset>
|
||||
</encoder>
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
|
||||
<fileNamePattern>
|
||||
./logs/backend-api.%i.log
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||
<fileNamePattern>${LOG_PATH}/${FILE_NAME}-text.%d{yyyy-MM-dd}.%i.gz
|
||||
</fileNamePattern>
|
||||
<minIndex>1</minIndex>
|
||||
<maxIndex>10</maxIndex>
|
||||
<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>
|
||||
</rollingPolicy>
|
||||
<triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
|
||||
<maxFileSize>500MB</maxFileSize>
|
||||
</triggeringPolicy>
|
||||
</appender>
|
||||
|
||||
<root level="warn">
|
||||
<appender-ref ref="CONSOLE"/>
|
||||
<appender-ref ref="FILE"/>
|
||||
</root>
|
||||
<root level="info">
|
||||
<!-- <appender-ref ref="CONSOLE"/> -->
|
||||
<appender-ref ref="TEXT_FILE"/>
|
||||
<appender-ref ref="JSON_FILE" />
|
||||
</root>
|
||||
|
||||
<logger name="ru.spcex" level="debug" additivity="false">
|
||||
<appender-ref ref="FILE"/>
|
||||
<appender-ref ref="CONSOLE"/>
|
||||
<appender-ref ref="TEXT_FILE"/>
|
||||
<appender-ref ref="JSON_FILE" />
|
||||
<!-- <appender-ref ref="CONSOLE"/> -->
|
||||
</logger>
|
||||
<!--<logger name="org.springframework" level="info" />-->
|
||||
</configuration>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<meta version="3.9.0.68">
|
||||
<meta version="3.11.0.78">
|
||||
<enums>
|
||||
<allowed id="1" code="ALWD" name="Разрешено"/>
|
||||
<allowed id="2" code="DEND" name="Запрещено"/>
|
||||
|
|
@ -8,6 +8,7 @@
|
|||
<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="Администратор безопасности Клиринга МКР"/>
|
||||
|
|
@ -91,11 +92,18 @@
|
|||
<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" baseCurrencyId="EUR" quoteCurrencyId="RUB" majorSign="CONV"/>
|
||||
<currencyPair id="2" code="USD/RUB" baseCurrencyId="USD" quoteCurrencyId="RUB" majorSign="CONV"/>
|
||||
<currencyPair id="3" code="CNY/RUВ" baseCurrencyId="CNY" quoteCurrencyId="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="До востребования"/>
|
||||
|
|
@ -111,7 +119,7 @@
|
|||
|
||||
<tradingClearingRegistryType id="1" code="A" name="Владелец"/>
|
||||
<tradingClearingRegistryType id="2" code="B" name="Клиентский"/>
|
||||
<tradingClearingRegistryType id="3" code="C" name="Клиентский"/>
|
||||
<tradingClearingRegistryType id="3" code="C" name="Клиентский"/> <!-- todo был Попечитель -->
|
||||
<tradingClearingRegistryType id="4" code="D" name="Доверительный управляющий"/>
|
||||
<tradingClearingRegistryType id="5" code="E" name="Эмитент"/>
|
||||
<tradingClearingRegistryType id="6" code="Z" name="К размещению/выкупу"/>
|
||||
|
|
@ -156,42 +164,36 @@
|
|||
<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="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="Ценные бумаги Участника клиринга – ДУ"/>
|
||||
<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="Денежные средства - невыясненные"/>
|
||||
<registryStatus id="1" code="OK" name="Рассчитано"/>
|
||||
<registryStatus id="2" code="UNCV" name="Не исполнено"/>
|
||||
<registryStatus id="3" code="FAIL" name="Не исполнено контрагентом"/>
|
||||
|
|
@ -216,6 +218,7 @@
|
|||
<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="Счет нерезидента"/>
|
||||
|
|
@ -254,6 +257,9 @@
|
|||
<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="Отмена расписания"/>
|
||||
|
|
@ -262,7 +268,9 @@
|
|||
<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="Клиринг завершен"/>
|
||||
|
|
@ -286,6 +294,7 @@
|
|||
<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="Покупка"/>
|
||||
|
|
@ -323,6 +332,7 @@
|
|||
<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="Принято"/>
|
||||
|
|
@ -338,6 +348,8 @@
|
|||
<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="Удаление"/>
|
||||
|
|
@ -409,6 +421,10 @@
|
|||
<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."/>
|
||||
|
||||
|
|
@ -434,7 +450,8 @@
|
|||
<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="5025" code="ACNT" name="Необходимо указать ДЕПО счет."/>
|
||||
<errorCode id="5026" code="ACNT" name="Счет %S не валютный"/>
|
||||
<!-- error code for balance-service -->
|
||||
<errorCode id="5200" code="BLNC" name="Общая ошибка модуля balance-service."/>
|
||||
<errorCode id="5210" code="BLNC" name="Клиринговая сессия неактивна."/>
|
||||
|
|
|
|||
|
|
@ -11,83 +11,15 @@
|
|||
<!--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" currency_code="RUB"/>
|
||||
<currency id="643" currencyCode="RUB"/>
|
||||
<currency id="840" currencyCode="USD"/>
|
||||
<currency id="978" currencyCode="EUR"/>
|
||||
<currency id="156" currencyCode="CNY"/>
|
||||
<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>
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,46 @@
|
|||
<?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>
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,98 @@
|
|||
<?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
|
|
@ -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.9.0.71">
|
||||
<meta version="3.11.0.81">
|
||||
<!-- _xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" _xsi:noNamespaceSchemaLocation="file:///E:/d/projects/meta/from/meta.xsd" -->
|
||||
<!--Здесь словари-->
|
||||
<enums>
|
||||
|
|
@ -105,7 +105,6 @@
|
|||
<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"/>
|
||||
|
|
@ -186,26 +185,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"/>
|
||||
<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"/>
|
||||
<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="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="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="50"/>
|
||||
</dayStatus>
|
||||
<parent name="Справочник источников" class="com.spicex.dictionary.ParentDictionary" table="parent_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"/>
|
||||
</parent>
|
||||
<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>
|
||||
|
||||
<sessionStatus name="Справочник статусов клиринговых сессий" class="ru.clearing.platform.dictionary.SessionStatusDictionary" table="session_status_dictionary">
|
||||
<id name="Идентификатор" shortname="ID" type="1"/>
|
||||
|
|
@ -263,11 +262,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"/>
|
||||
|
|
@ -293,11 +292,33 @@
|
|||
<code name="Код" shortname="Код" type="12"/>
|
||||
<name name="Статус сообщения" shortname="Наименование" type="2" length="50"/>
|
||||
</managementJournalStatus>
|
||||
<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>
|
||||
<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.СurrencyPair" table="currency_pair">
|
||||
<id name="Идентификатор" shortname="ID" type="1"/>
|
||||
<code name="Код" shortname="Код" type="2" length="25"/>
|
||||
<baseCurrencyId name="Код валюты лота" shortname="Валюта лота" link="currencyCode" type="12"/>
|
||||
<quoteCurrencyId 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>
|
||||
<resultStatus name="Справочник статусов обработки" class="ru.clearing.platform.dictionary.ResultStatusDictionary" table="result_status_dictionary">
|
||||
<id name="Идентификатор записи" shortname="ID" type="1"/>
|
||||
<code name="Код" shortname="Код" type="12"/>
|
||||
|
|
@ -315,61 +336,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"/>
|
||||
|
|
@ -546,16 +567,40 @@
|
|||
<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" dbname="Код роли компании" name="Наименование роли компании" shortname="Роль" link="companyRole" required="true"/>
|
||||
<workflowStatus type="12" dbname="Код статуса" name="Наименование статуса" shortname="Статус" link="workflowStatus" required="true"/>
|
||||
<companyRole type="12" name="Наименование роли компании" shortname="Роль" link="companyRole" required="true"/>
|
||||
<workflowStatus type="12" name="Наименование статуса" shortname="Статус" link="workflowStatus"/>
|
||||
</post>
|
||||
<delete name="Удаление роли участнику" class="ru.spcex.clearing.backendapi.controller.request.cud.common.CommonDeleteAction">
|
||||
<id type="1" name="Идентификатор записи" shortname="ID" link="companyRoleSet" linkCode="id" required="true"/>
|
||||
<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>
|
||||
</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"/>
|
||||
|
|
@ -784,6 +829,8 @@
|
|||
<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"/>
|
||||
|
|
@ -808,6 +855,56 @@
|
|||
</delete>
|
||||
</actions>
|
||||
</listing>
|
||||
<currencyPairSecurity name="Валютные пары" destination="securities/currency-pair-securities" class="ru.clearing.classes.statics.data.security.CurrencyPairSecurity" logUpdates="true" table="currency_pair_security">
|
||||
<baseUnitSize type="11" name="Количество валюты лота" shortname="Количество" visible="true" searchable="true" sortable="true"/>
|
||||
<currencyPairId type="1" dbname="Идентификатор валютной пары" name="Валютная пара" shortname="Инструмент" searchable="true" sortable="true" ignore="true" link="currencyPair"/>
|
||||
<code type="2" length="255" name="Наименование валютной пары" shortname="Валютная пара" searchable="true" sortable="true" visible="true" 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"/>
|
||||
<settlementOrganization 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"/>
|
||||
<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"/>
|
||||
<fullName type="2" length="255" name="Полное наименование инструмента" shortname="Наименование" searchable="true" sortable="true" visible="true" extends="security"/>
|
||||
<shortNameEng type="2" length="255" name="Краткое наименование инструмента на английском" shortname="Краткое наименование на английском" searchable="true" sortable="true" visible="true" extends="security"/>
|
||||
<fullNameEng 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" required="true"/>
|
||||
<lotSize type="11" name="Размер лота" shortname="Лот" required="true"/>
|
||||
<minStep type="11" name="Шаг цены" shortname="Шаг цены" required="true"/>
|
||||
<baseUnitSize type="11" name="Количество валюты лота" shortname="Количество" required="true"/>
|
||||
<settlementType type="12" dbname="Тип расчета" name="Тип расчета" shortname="Тип расчета" link="currencySettlementType" required="true"/>
|
||||
<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" required="true"/>
|
||||
<lotSize type="11" name="Размер лота" shortname="Лот" required="true"/>
|
||||
<minStep type="11" name="Шаг цены" shortname="Шаг цены" required="true"/>
|
||||
<baseUnitSize type="11" name="Количество валюты лота" shortname="Количество" required="true"/>
|
||||
<settlementType dbname="Тип расчета" name="Тип расчета" shortname="Тип расчета" link="currencySettlementType" required="true"/>
|
||||
<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"/>
|
||||
|
|
@ -820,15 +917,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"/>
|
||||
|
|
@ -837,6 +934,7 @@
|
|||
<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"/>
|
||||
|
|
@ -847,6 +945,7 @@
|
|||
<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">
|
||||
|
|
@ -856,6 +955,7 @@
|
|||
<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">
|
||||
|
|
@ -867,8 +967,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"/>
|
||||
|
|
@ -895,6 +995,28 @@
|
|||
</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"/>
|
||||
<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,status" class="ru.spcex.clearing.backendapi.controller.request.cud.registry.TradingClearingRegistryListNewAction">
|
||||
<tradingClearingRegistryId type="1" name="Торгово-клиринговый регистр" shortname="ТКР" link="tradingClearingRegistry" linkCode="code"/>
|
||||
<currencyAccountList type="7" name="Список валютных счетов" shortname="Список валютных счетов" link="account" linkCode="account"/>
|
||||
<status type="12" name="Наименование статуса" shortname="Статус" link="serviceStatus" required="true"/>
|
||||
</post>
|
||||
<put name="Изменение списка счетов ТКР" confirmation="tradingClearingRegistryId,accountId,status" class="ru.spcex.clearing.backendapi.controller.request.cud.registry.TradingClearingRegistryListUpdateAction">
|
||||
<id type="1" name="Идентификатор записи" shortname="ID" link="clientCode" linkCode="id" required="true"/>
|
||||
<tradingClearingRegistryId type="1" name="Торгово-клиринговый регистр" shortname="ТКР" link="tradingClearingRegistry" linkCode="code"/>
|
||||
<currencyAccountList type="7" name="Список валютных счетов" shortname="Список валютных счетов" link="account" linkCode="account"/>
|
||||
<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"/>
|
||||
|
|
@ -962,7 +1084,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"/>
|
||||
|
|
@ -980,9 +1102,10 @@
|
|||
<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"/>
|
||||
|
|
@ -1019,7 +1142,7 @@
|
|||
<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>
|
||||
|
|
@ -1037,7 +1160,7 @@
|
|||
<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>
|
||||
|
|
@ -1073,7 +1196,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>
|
||||
|
|
@ -1086,12 +1209,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" 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 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>
|
||||
<delete name="Удаление депо КС - РДЦ" confirmation="accountId,accountSymbolValue">
|
||||
<id type="1" name="Идентификатор записи" shortname="ID" link="account" linkCode="id" required="true"/>
|
||||
|
|
@ -1105,10 +1228,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"/>
|
||||
|
|
@ -1141,8 +1264,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"/>
|
||||
|
|
@ -1165,20 +1288,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"/>
|
||||
|
|
@ -1205,37 +1328,38 @@
|
|||
<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"/>
|
||||
|
|
@ -1250,6 +1374,8 @@
|
|||
</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)">
|
||||
|
|
@ -1277,6 +1403,7 @@
|
|||
<post destination="EXLR" group="Формирование реестров" name="Формирование реестра обязательств, исключенных из клирингового пула">
|
||||
</post>
|
||||
<post destination="LBSR" group="Формирование реестров" name="Формирование реестра учета обязательств">
|
||||
<settlementDate type="6" name="Дата" shortname="Дата"/>
|
||||
</post>
|
||||
<post destination="ECNR" group="Формирование реестров" name="Формирование реестра сделок">
|
||||
</post>
|
||||
|
|
@ -1287,16 +1414,19 @@
|
|||
<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>
|
||||
|
||||
</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" ignore="true"/>
|
||||
<updatedAt field="updated" type="4" webtype="5" dbname="Дата-время изменения записи" name="Время изменения записи" shortname="Изменено" 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"/>
|
||||
<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"/>
|
||||
|
|
@ -1361,7 +1491,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" link="market" linkKeyCode="code" linkCode="description"/>
|
||||
<market type="2" length="8" dbname="Код секции финансового инструмента" name="Секция финансового инструмента" shortname="Секция" visible="true" searchable="true" sortable="true"/>
|
||||
<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"/>
|
||||
|
|
@ -1398,7 +1528,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" link="market" linkKeyCode="code" linkCode="description"/>
|
||||
<market type="12" dbname="Код секции финансового инструмента" name="Секция финансового инструмента" shortname="Секция" visible="true" searchable="true" sortable="true"/>
|
||||
<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"/>
|
||||
|
|
@ -1426,29 +1556,65 @@
|
|||
<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"/>
|
||||
<сurrencyCode 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"/>
|
||||
<depoCode type="2" length="50" name="Код раздела субсчета/счета депо" shortname="Код счета депо" searchable="true" sortable="true"/>
|
||||
<quantity type="11" name="Количество" shortname="Количество" searchable="true" sortable="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"/>
|
||||
<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"/>
|
||||
<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"/>
|
||||
<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"/>
|
||||
<blockedSum type="10" name="Сумма блокированных денежных средств" shortname="Блокированные" searchable="true" sortable="true" ignore="true"/>
|
||||
<unblockedSum type="10" name="Сумма свободных денежных средств" shortname="Свободные" searchable="true" sortable="true" ignore="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"/>
|
||||
<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"/>
|
||||
<blockedSum type="10" name="Сумма блокированных денежных средств" shortname="Блокированные" searchable="true" sortable="true" ignore="true"/>
|
||||
<unblockedSum type="10" name="Сумма свободных денежных средств" shortname="Свободные" searchable="true" sortable="true" ignore="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">
|
||||
|
|
@ -1464,7 +1630,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"/>
|
||||
|
|
@ -1478,7 +1644,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"/>
|
||||
|
|
@ -1500,7 +1666,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">
|
||||
|
|
@ -1521,6 +1687,25 @@
|
|||
<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"/>
|
||||
<updatedAt field="updated" type="4" webtype="5" name="Время изменения записи" shortname="Изменено" searchable="true" sortable="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"/>
|
||||
<outSDfId type="2" length="255" name="Идентификатор исходящего файла" shortname="Исходящий файл" searchable="true" sortable="true" ignore="true"/>
|
||||
<outSDf type="2" length="255" name="Исходящий файл" shortname="Исходящий файл" searchable="true" sortable="true"/>
|
||||
</pairSdf>
|
||||
<gatewayResult name="Результат запроса к gateway" 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"/>
|
||||
<updatedAt field="updated" type="4" webtype="5" name="Время изменения записи" shortname="Изменено" searchable="true" sortable="true"/>
|
||||
<requestId type="2" length="255" name="ID запроса" shortname="ID" searchable="true" sortable="true"/>
|
||||
<nameRequest type="2" length="255" name="Наименование запроса" shortname="Наименование" searchable="true" sortable="true"/>
|
||||
<request type="2" length="1023" name="Тело запроса" shortname="Запрос" searchable="true" sortable="true"/>
|
||||
<result type="2" length="1023" name="Тело ответа" shortname="Ответ" searchable="true" sortable="true"/>
|
||||
<gatewayResultStatus type="12" name="Статус запроса" shortname="Статус" searchable="true" sortable="true" link="gatewayResultStatus"/>
|
||||
</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"/>
|
||||
|
|
@ -1574,8 +1759,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"/>
|
||||
|
|
@ -1630,11 +1815,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" visible="true" link="userCls" linkCode="identifier"/>
|
||||
<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"/>
|
||||
<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"/>
|
||||
|
|
@ -1652,7 +1837,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"/>
|
||||
|
|
@ -1694,6 +1879,7 @@
|
|||
<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">
|
||||
|
|
@ -1719,6 +1905,7 @@
|
|||
<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"/>
|
||||
|
|
@ -1774,6 +1961,9 @@
|
|||
<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"/>
|
||||
|
|
@ -1788,9 +1978,13 @@
|
|||
<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"/>
|
||||
|
|
@ -1849,6 +2043,7 @@
|
|||
<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>
|
||||
|
|
@ -1875,7 +2070,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"/>
|
||||
|
|
@ -1936,6 +2131,7 @@
|
|||
<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"/>
|
||||
|
|
@ -1984,6 +2180,11 @@
|
|||
<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"/>
|
||||
|
|
@ -2030,6 +2231,11 @@
|
|||
<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"/>
|
||||
|
|
@ -2083,6 +2289,12 @@
|
|||
<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"/>
|
||||
|
|
@ -2131,7 +2343,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"/>
|
||||
|
|
@ -2178,6 +2390,19 @@
|
|||
<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>
|
||||
|
|
|
|||
|
|
@ -113,6 +113,7 @@ import static ru.spcex.clearing.test.json.MatcherFactoryWithJson.usingIgnoringFi
|
|||
MarketController.class,
|
||||
NotificationController.class,
|
||||
SessionController.class,
|
||||
SCrossRateController.class,
|
||||
//payment
|
||||
PaymentInstructionController.class,
|
||||
//register
|
||||
|
|
@ -126,6 +127,8 @@ import static ru.spcex.clearing.test.json.MatcherFactoryWithJson.usingIgnoringFi
|
|||
MoneyBalanceRegisterController.class,
|
||||
ContractRegisterController.class,
|
||||
ReportRegisterController.class,
|
||||
GatewayResultController.class,
|
||||
PairSdfController.class,
|
||||
//registry
|
||||
RegistryController.class,
|
||||
TradingClearingRegistryController.class,
|
||||
|
|
|
|||
|
|
@ -0,0 +1,40 @@
|
|||
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);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
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);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
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);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,8 +1,11 @@
|
|||
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;
|
||||
|
|
@ -14,6 +17,7 @@ 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
|
||||
|
|
@ -37,6 +41,10 @@ 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;
|
||||
}
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<artifactId>clearing-parent</artifactId>
|
||||
<groupId>ru.spcex.clearing</groupId>
|
||||
<version>SPCEX-1.0.0.0</version>
|
||||
<version>SPCEX-3.5.10.2</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
|
|
@ -44,6 +44,13 @@
|
|||
<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>
|
||||
|
|
|
|||
|
|
@ -10,6 +10,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.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;
|
||||
|
|
@ -36,14 +37,17 @@ public class Sdf08Service extends QueueConsumer implements InitializingBean {
|
|||
|
||||
@Override
|
||||
public void afterPropertiesSet() {
|
||||
callback(Object.class)
|
||||
callback(LauncherCommandRequest.class)
|
||||
.setConsumer(this::newSDf08)
|
||||
.forDestination(Task.getAllBalance.topic(), callbacks::put);
|
||||
init();
|
||||
}
|
||||
|
||||
private void newSDf08(BaseRequest<Object> userRequest) {
|
||||
log.debug("getAllBalance request received");
|
||||
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
|
||||
SDf08 sDf08 = new SDf08();
|
||||
// sDf08.setNumber(idGenerator.nextId().toString());
|
||||
Instant now = Instant.now();
|
||||
|
|
|
|||
|
|
@ -1,38 +1,56 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<configuration>
|
||||
<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>
|
||||
<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">
|
||||
<encoder>
|
||||
<!-- |%X{ru.nbch.scoring.web.logging.mdc_key}-->
|
||||
<Pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %class{0}:%msg%n</Pattern>
|
||||
<!-- |%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>
|
||||
<charset>utf8</charset>
|
||||
</encoder>
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
|
||||
<fileNamePattern>
|
||||
./logs/balance-service.%i.log
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||
<fileNamePattern>${LOG_PATH}/${FILE_NAME}-text.%d{yyyy-MM-dd}.%i.gz
|
||||
</fileNamePattern>
|
||||
<minIndex>1</minIndex>
|
||||
<maxIndex>10</maxIndex>
|
||||
<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>
|
||||
</rollingPolicy>
|
||||
<triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
|
||||
<maxFileSize>500MB</maxFileSize>
|
||||
</triggeringPolicy>
|
||||
</appender>
|
||||
|
||||
<root level="warn">
|
||||
<appender-ref ref="CONSOLE"/>
|
||||
<appender-ref ref="FILE"/>
|
||||
</root>
|
||||
<root level="info">
|
||||
<!-- <appender-ref ref="CONSOLE"/> -->
|
||||
<appender-ref ref="TEXT_FILE"/>
|
||||
<appender-ref ref="JSON_FILE" />
|
||||
</root>
|
||||
|
||||
<logger name="ru.spcex" level="debug" additivity="false">
|
||||
<appender-ref ref="FILE"/>
|
||||
<appender-ref ref="CONSOLE"/>
|
||||
<appender-ref ref="TEXT_FILE"/>
|
||||
<appender-ref ref="JSON_FILE" />
|
||||
<!-- <appender-ref ref="CONSOLE"/> -->
|
||||
</logger>
|
||||
</configuration>
|
||||
|
|
|
|||
|
|
@ -15,11 +15,14 @@ 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;
|
||||
|
|
@ -80,4 +83,43 @@ 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);
|
||||
}
|
||||
}
|
||||
|
|
@ -12,7 +12,7 @@
|
|||
<parent>
|
||||
<artifactId>clearing-parent</artifactId>
|
||||
<groupId>ru.spcex.clearing</groupId>
|
||||
<version>SPCEX-1.0.0.0</version>
|
||||
<version>SPCEX-3.5.10.2</version>
|
||||
</parent>
|
||||
|
||||
<properties>
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@ 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;
|
||||
|
|
@ -42,6 +43,14 @@ 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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@ public class ClientCode extends BusinessObject {
|
|||
private Long tradingClearingRegistryId;
|
||||
private Long moneyAccountId;
|
||||
private Long depoAccountId;
|
||||
private Long currencyAccountId;
|
||||
private String status;
|
||||
|
||||
public Long getCompanyId() {
|
||||
|
|
@ -60,6 +61,14 @@ 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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,5 @@
|
|||
package ru.clearing.classes.statics.data.api;
|
||||
|
||||
public interface WithCurrency {
|
||||
String currency();
|
||||
}
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
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;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
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;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,180 @@
|
|||
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 String depoCode;
|
||||
// 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;
|
||||
}
|
||||
|
||||
public String getDepoCode() {
|
||||
return depoCode;
|
||||
}
|
||||
|
||||
public void setDepoCode(String value) {
|
||||
this.depoCode = value;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
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;
|
||||
}
|
||||
}
|
||||
|
|
@ -13,6 +13,8 @@ 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;
|
||||
|
|
@ -69,4 +71,20 @@ 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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,88 @@
|
|||
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;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -17,6 +17,8 @@ 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;
|
||||
|
|
@ -36,6 +38,20 @@ 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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,61 @@
|
|||
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;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -14,6 +14,8 @@ 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;
|
||||
|
|
@ -24,30 +26,6 @@ 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;
|
||||
}
|
||||
|
|
@ -56,6 +34,22 @@ 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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,51 @@
|
|||
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;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,51 @@
|
|||
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;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
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;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,19 +1,19 @@
|
|||
package ru.clearing.classes.statics.data.sdf;
|
||||
|
||||
import java.time.Instant;
|
||||
import ru.clearing.classes.ConstSerializable;
|
||||
import ru.clearing.classes.statics.data.api.WithCurrency;
|
||||
import ru.spcex.platform.classes.base.SpcexObjectBase;
|
||||
import ru.spcex.platform.classes.base.interfaces.WithAccount;
|
||||
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 {
|
||||
public class SDf01 extends SpcexObjectBase implements WithAccount, WithMarket, WithFileName, WithCurrency {
|
||||
private static final long serialVersionUID = ConstSerializable.serialVersionUID;
|
||||
|
||||
private String curr_code;
|
||||
|
|
@ -153,4 +153,8 @@ public class SDf01 extends SpcexObjectBase implements WithAccount, WithMarket, W
|
|||
this.generationId = value;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String currency() {
|
||||
return getCurr_code();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@ 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;
|
||||
|
|
@ -136,6 +137,14 @@ 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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -34,6 +34,7 @@ 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;
|
||||
|
|
@ -206,6 +207,14 @@ 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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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.clearing.classes.statics.data.api.WithCurrency;
|
||||
import ru.spcex.platform.classes.base.SpcexObjectBase;
|
||||
import ru.spcex.platform.classes.base.interfaces.WithFileName;
|
||||
|
||||
/**
|
||||
* ДФ-06 Запрос на зачисление/списание денежных средств
|
||||
* <p>
|
||||
* DB table: S_DF06
|
||||
**/
|
||||
public class SDf06 extends SpcexObjectBase implements WithFileName {
|
||||
public class SDf06 extends SpcexObjectBase implements WithFileName, WithCurrency {
|
||||
private static final long serialVersionUID = ConstSerializable.serialVersionUID;
|
||||
|
||||
private String account;
|
||||
|
|
@ -28,6 +28,9 @@ public class SDf06 extends SpcexObjectBase implements WithFileName {
|
|||
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;
|
||||
|
|
@ -133,4 +136,29 @@ public class SDf06 extends SpcexObjectBase implements WithFileName {
|
|||
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();
|
||||
}
|
||||
}
|
||||
|
|
@ -5,6 +5,7 @@ import ru.spcex.platform.classes.base.SpcexObjectBase;
|
|||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.Instant;
|
||||
import java.time.LocalDate;
|
||||
|
||||
/**
|
||||
* ДФ-07 Ответ на запрос по зачислению/списанию денежных средств
|
||||
|
|
@ -25,9 +26,13 @@ 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;
|
||||
|
|
@ -117,6 +122,14 @@ 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;
|
||||
}
|
||||
|
|
@ -141,4 +154,28 @@ 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;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -23,6 +23,7 @@ public class SDf12 extends SpcexObjectBase {
|
|||
private String transactionNumber;
|
||||
private String transactionQuantity;
|
||||
private String result;
|
||||
private String fileName;
|
||||
private Instant generationTime;
|
||||
private Long generationId;
|
||||
|
||||
|
|
@ -98,6 +99,14 @@ 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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@ public class SDf53 extends SpcexObjectBase {
|
|||
private String result;
|
||||
private Instant generationTime;
|
||||
private Long generationId;
|
||||
private String fileName;
|
||||
private Long inSDfId;
|
||||
private String accName;
|
||||
|
||||
|
|
@ -81,6 +82,14 @@ 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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ import ru.clearing.classes.ConstSerializable;
|
|||
import ru.spcex.platform.classes.base.SpcexObjectBase;
|
||||
|
||||
import java.time.Instant;
|
||||
import java.time.LocalDate;
|
||||
|
||||
/**
|
||||
* ДФ-54 Вывод свободных средств для инициаторов категории В с клирингового счета 30414
|
||||
|
|
@ -55,6 +56,11 @@ 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;
|
||||
|
|
@ -392,4 +398,44 @@ 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;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -4,6 +4,7 @@ import ru.clearing.classes.ConstSerializable;
|
|||
import ru.spcex.platform.classes.base.SpcexObjectBase;
|
||||
|
||||
import java.time.Instant;
|
||||
import java.time.LocalDate;
|
||||
|
||||
/**
|
||||
* ДФ-55 Квитанция об обработке ДФ-54
|
||||
|
|
@ -56,6 +57,11 @@ 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;
|
||||
|
|
@ -401,4 +407,44 @@ 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;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,16 +1,16 @@
|
|||
package ru.clearing.classes.statics.data.sdf;
|
||||
|
||||
import ru.clearing.classes.ConstSerializable;
|
||||
import ru.spcex.platform.classes.base.SpcexObjectBase;
|
||||
|
||||
import java.time.Instant;
|
||||
import ru.clearing.classes.ConstSerializable;
|
||||
import ru.clearing.classes.statics.data.api.WithCurrency;
|
||||
import ru.spcex.platform.classes.base.SpcexObjectBase;
|
||||
|
||||
/**
|
||||
* ДФ-57 Список транзакций о списании/зачислении за период по всем счетам (ТБС и КС)
|
||||
* <p>
|
||||
* DB table: S_DF57
|
||||
**/
|
||||
public class SDf57 extends SpcexObjectBase {
|
||||
public class SDf57 extends SpcexObjectBase implements WithCurrency {
|
||||
private static final long serialVersionUID = ConstSerializable.serialVersionUID;
|
||||
|
||||
private Long dbfId;
|
||||
|
|
@ -53,6 +53,12 @@ public class SDf57 extends SpcexObjectBase {
|
|||
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;
|
||||
|
|
@ -374,4 +380,56 @@ public class SDf57 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 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();
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,85 @@
|
|||
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 value) {
|
||||
this.currencyPairId = value;
|
||||
}
|
||||
|
||||
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 String getSettlementOrganization() {
|
||||
return settlementOrganization;
|
||||
}
|
||||
|
||||
public void setSettlementOrganization(String value) {
|
||||
this.settlementOrganization = value;
|
||||
}
|
||||
|
||||
public Long getSecurityId() {
|
||||
return securityId;
|
||||
}
|
||||
|
||||
public void setSecurityId(Long value) {
|
||||
this.securityId = value;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
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;
|
||||
}
|
||||
}
|
||||
|
|
@ -6,13 +6,13 @@
|
|||
<parent>
|
||||
<groupId>ru.spcex.clearing</groupId>
|
||||
<artifactId>clearing-parent</artifactId>
|
||||
<version>SPCEX-1.0.0.0</version>
|
||||
<version>SPCEX-3.5.10.2</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>cleaning-builders</artifactId>
|
||||
<name>cleaning-builders</name>
|
||||
<description>Cleaning builders module</description>
|
||||
<version>SPCEX-1.0.0.0</version>
|
||||
<version>SPCEX-3.5.10.2</version>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
|
||||
|
|
@ -26,7 +26,7 @@
|
|||
<dependency>
|
||||
<groupId>ru.spcex.clearing</groupId>
|
||||
<artifactId>classes</artifactId>
|
||||
<version>SPCEX-1.0.0.0</version>
|
||||
<version>SPCEX-3.5.10.2</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<artifactId>clearing-parent</artifactId>
|
||||
<groupId>ru.spcex.clearing</groupId>
|
||||
<version>SPCEX-1.0.0.0</version>
|
||||
<version>SPCEX-3.5.10.2</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
|
|
@ -54,6 +54,13 @@
|
|||
<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>org.junit.jupiter</groupId>
|
||||
<artifactId>junit-jupiter</artifactId>
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ public class KafkaConfig {
|
|||
|
||||
public KafkaConfig(ClearingServiceSettings settings) {
|
||||
this.kafkaSettings = settings.getKafkaConsumer();
|
||||
Integer gtwTimeout = settings.getSessionStage().getInspectionGatewayTimeout();
|
||||
Integer gtwTimeout = settings.getSessionStage() == null ? null : settings.getSessionStage().getInspectionGatewayTimeout();
|
||||
if (gtwTimeout != null) {
|
||||
int maxPollIntervalMs = gtwTimeout * 1000 + 1000;
|
||||
log.debug("setting max.poll.interval.ms {}", maxPollIntervalMs);
|
||||
|
|
|
|||
|
|
@ -1,5 +1,8 @@
|
|||
package ru.spcex.clearing.config;
|
||||
|
||||
import java.util.function.BiFunction;
|
||||
import java.util.function.Function;
|
||||
import java.util.function.Supplier;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import ru.clearing.classes.statics.data.account.Account;
|
||||
|
|
@ -12,12 +15,23 @@ import ru.clearing.classes.statics.data.company.relation.Relation;
|
|||
import ru.clearing.classes.statics.data.execution.ExecutionDeposit;
|
||||
import ru.clearing.classes.statics.data.instrument.issue.EquitySecurity;
|
||||
import ru.clearing.classes.statics.data.instrument.issue.FixedIncomeSecurity;
|
||||
import ru.clearing.classes.statics.data.misc.Currency;
|
||||
import ru.clearing.classes.statics.data.misc.STrades;
|
||||
import ru.clearing.classes.statics.data.misc.Session;
|
||||
import ru.clearing.classes.statics.data.payment.PaymentInstruction;
|
||||
import ru.clearing.classes.statics.data.registry.Registry;
|
||||
import ru.clearing.classes.statics.data.registry.TradingClearingRegistry;
|
||||
import ru.clearing.classes.statics.data.sdf.*;
|
||||
import ru.clearing.classes.statics.data.registry.TradingClearingRegistryList;
|
||||
import ru.clearing.classes.statics.data.sdf.SDf01;
|
||||
import ru.clearing.classes.statics.data.sdf.SDf06;
|
||||
import ru.clearing.classes.statics.data.sdf.SDf08;
|
||||
import ru.clearing.classes.statics.data.sdf.SDf10;
|
||||
import ru.clearing.classes.statics.data.sdf.SDf20;
|
||||
import ru.clearing.classes.statics.data.sdf.SDf21;
|
||||
import ru.clearing.classes.statics.data.sdf.SDf54;
|
||||
import ru.clearing.classes.statics.data.sdf.SDf55;
|
||||
import ru.clearing.classes.statics.data.sdf.SDf57;
|
||||
import ru.clearing.classes.statics.data.security.CurrencyPairSecurity;
|
||||
import ru.clearing.classes.statics.data.security.MoneyMarketSecurity;
|
||||
import ru.clearing.classes.statics.data.security.Security;
|
||||
import ru.clearing.classes.statics.data.statement.Statement;
|
||||
|
|
@ -27,8 +41,35 @@ import ru.spcex.clearing.error.ClearingError;
|
|||
import ru.spcex.clearing.imdg.IMDGDistributedNames;
|
||||
import ru.spcex.clearing.platform.messaging.domain.cud.balance.StatementRequest;
|
||||
import ru.spcex.clearing.platform.messaging.domain.cud.payment.PIClearingOutbondActionNewRequest;
|
||||
import ru.spcex.clearing.platform.messaging.domain.cud.registry.*;
|
||||
import ru.spcex.clearing.service.validation.*;
|
||||
import ru.spcex.clearing.platform.messaging.domain.cud.registry.IdentificationFundsRequest;
|
||||
import ru.spcex.clearing.platform.messaging.domain.cud.registry.RegistryChangeRefundDateRequest;
|
||||
import ru.spcex.clearing.platform.messaging.domain.cud.registry.RegistryChangeStatusExtractRequest;
|
||||
import ru.spcex.clearing.platform.messaging.domain.cud.registry.RegistryReturnDepositRequest;
|
||||
import ru.spcex.clearing.platform.messaging.domain.cud.registry.RegistrySplitDepositActionRequest;
|
||||
import ru.spcex.clearing.service.validation.ClrngValidationStored;
|
||||
import ru.spcex.clearing.service.validation.CompanyByTradingCodeValidationRule;
|
||||
import ru.spcex.clearing.service.validation.CurrencyCodeValidationRule;
|
||||
import ru.spcex.clearing.service.validation.ExecutionDepositValidationRule;
|
||||
import ru.spcex.clearing.service.validation.IdentificationFundsValidationRule;
|
||||
import ru.spcex.clearing.service.validation.MarketIsUValidationRule;
|
||||
import ru.spcex.clearing.service.validation.PaymentOutboundValidationRule;
|
||||
import ru.spcex.clearing.service.validation.RefundDateValidationRule;
|
||||
import ru.spcex.clearing.service.validation.RegistryStep3ValidationRule;
|
||||
import ru.spcex.clearing.service.validation.ReturnDepositValidationRule;
|
||||
import ru.spcex.clearing.service.validation.STradesValidationRule;
|
||||
import ru.spcex.clearing.service.validation.Sdf01NewValidationRule;
|
||||
import ru.spcex.clearing.service.validation.Sdf01ValidationRule;
|
||||
import ru.spcex.clearing.service.validation.Sdf06NewValidationRule;
|
||||
import ru.spcex.clearing.service.validation.Sdf08NewValidationRule;
|
||||
import ru.spcex.clearing.service.validation.Sdf10ValidationRule;
|
||||
import ru.spcex.clearing.service.validation.Sdf20ValidationRule;
|
||||
import ru.spcex.clearing.service.validation.Sdf21ValidationRule;
|
||||
import ru.spcex.clearing.service.validation.Sdf55ValidationRule;
|
||||
import ru.spcex.clearing.service.validation.Sdf57ValidationRule;
|
||||
import ru.spcex.clearing.service.validation.SecurityBySecurityCodeValidationRule;
|
||||
import ru.spcex.clearing.service.validation.SessionTerminationValidationRule;
|
||||
import ru.spcex.clearing.service.validation.SplitDepositRequestValidationRule;
|
||||
import ru.spcex.clearing.service.validation.StatusExtractValidationRule;
|
||||
import ru.spcex.clearing.util.security.UserRoleVerification;
|
||||
import ru.spcex.clearing.validation.common.rules.DictionaryPresentRule;
|
||||
import ru.spcex.clearing.validation.common.rules.FieldRequiredRule;
|
||||
|
|
@ -44,26 +85,26 @@ import ru.spcex.platform.utils.enumeration.IMessageResolver;
|
|||
import ru.spcex.platform.utils.validation.IValidator;
|
||||
import ru.spcex.platform.utils.validation.ValidatorImpl;
|
||||
|
||||
import java.util.function.BiFunction;
|
||||
import java.util.function.Function;
|
||||
import java.util.function.Supplier;
|
||||
|
||||
@Configuration
|
||||
public class ValidationConfig {
|
||||
|
||||
Imdg<Relation> imdgRelation;
|
||||
Imdg<Company> imdgCompany;
|
||||
Imdg<Currency> imdgCurrency;
|
||||
Imdg<FixedIncomeSecurity> fixedIncomeSecurityImdg;
|
||||
Imdg<EquitySecurity> equitySecurityImdg;
|
||||
Imdg<CurrencyPairSecurity> currencyPairSecurityImdg;
|
||||
|
||||
Imdg<CompanySymbols> imdgCompanySymbols;
|
||||
Imdg<Registry> imdgRegistry;
|
||||
Imdg<SDf20> imdgSdf20;
|
||||
Imdg<Account> imdgAccount;
|
||||
Imdg<DepoAccount> imdgDepoAccount;
|
||||
Imdg<AccountBalance> imdgAccountBalance;
|
||||
Imdg<Security> imdgSecurity;
|
||||
Imdg<MoneyMarketSecurity> imdgMoneyMarketSecurity;
|
||||
Imdg<TradingClearingRegistry> imdgTradingClearingRegistry;
|
||||
Imdg<TradingClearingRegistryList> imdgTradingClearingRegistryList;
|
||||
Imdg<Session> imdgSession;
|
||||
Imdg<SectionDictionary> imdgSectionDictionary;
|
||||
Imdg<Statement> imdgStatement;
|
||||
|
|
@ -77,12 +118,16 @@ public class ValidationConfig {
|
|||
public ValidationConfig(ImdgProvider imdgProvider) {
|
||||
this.imdgRelation = imdgProvider.getImdg(IMDGDistributedNames.Map_Relation, Relation.class);
|
||||
this.imdgCompany = imdgProvider.getImdg(IMDGDistributedNames.Map_Company, Company.class);
|
||||
this.imdgCurrency = imdgProvider.getImdg(IMDGDistributedNames.Map_Currency, Currency.class);
|
||||
this.imdgCompanySymbols = imdgProvider.getImdg(IMDGDistributedNames.Map_CompanySymbols, CompanySymbols.class);
|
||||
this.imdgRegistry = imdgProvider.getImdg(IMDGDistributedNames.Map_Registry, Registry.class);
|
||||
this.imdgSdf20 = imdgProvider.getImdg(IMDGDistributedNames.Map_SDf20, SDf20.class);
|
||||
this.imdgAccount = imdgProvider.getImdg(IMDGDistributedNames.Map_Account, Account.class);
|
||||
this.imdgAccountBalance = imdgProvider.getImdg(IMDGDistributedNames.Map_AccountBalance, AccountBalance.class);
|
||||
this.imdgSecurity = imdgProvider.getImdg(IMDGDistributedNames.Map_Security, Security.class);
|
||||
this.imdgTradingClearingRegistry = imdgProvider.getImdg(IMDGDistributedNames.Map_TradingClearingRegistry, TradingClearingRegistry.class);
|
||||
this.imdgTradingClearingRegistryList
|
||||
= imdgProvider.getImdg(IMDGDistributedNames.Map_TradingClearingRegistryList, TradingClearingRegistryList.class);
|
||||
this.imdgSession = imdgProvider.getImdg(IMDGDistributedNames.Map_Session, Session.class);
|
||||
this.imdgSectionDictionary = imdgProvider.getImdg(IMDGDistributedNames.Map_SectionDictionary, SectionDictionary.class);
|
||||
this.imdgMoneyMarketSecurity = imdgProvider.getImdg(IMDGDistributedNames.Map_MoneyMarketSecurity, MoneyMarketSecurity.class);
|
||||
|
|
@ -95,6 +140,7 @@ public class ValidationConfig {
|
|||
this.sDf54Imdg = imdgProvider.getImdg(IMDGDistributedNames.Map_SDf54, SDf54.class);
|
||||
this.pmtImdg = imdgProvider.getImdg(IMDGDistributedNames.Map_PaymentInstruction, PaymentInstruction.class);
|
||||
this.ctgrImdg = imdgProvider.getImdg(IMDGDistributedNames.Map_ClearingMemberCategory, ClearingMemberCategory.class);
|
||||
this.currencyPairSecurityImdg = imdgProvider.getImdg(IMDGDistributedNames.Map_CurrencyPairSecurity, CurrencyPairSecurity.class);
|
||||
this.imdgProvider = imdgProvider;
|
||||
}
|
||||
|
||||
|
|
@ -135,6 +181,7 @@ public class ValidationConfig {
|
|||
context.addImdg(IMDGDistributedNames.Map_FixedIncomeSecurity, fixedIncomeSecurityImdg);
|
||||
context.addImdg(IMDGDistributedNames.Map_MoneyMarketSecurity, imdgMoneyMarketSecurity);
|
||||
context.addImdg(IMDGDistributedNames.Map_EquitySecurity, equitySecurityImdg);
|
||||
context.addImdg(IMDGDistributedNames.Map_CurrencyPairSecurity, currencyPairSecurityImdg);
|
||||
context.setLogPrefix(LogPrefixId.INSTANCE);
|
||||
return new ValidatorImpl<>(context,
|
||||
STradesValidationRule.SecurityPresentFond,
|
||||
|
|
@ -162,6 +209,26 @@ public class ValidationConfig {
|
|||
};
|
||||
}
|
||||
|
||||
@Bean("sTradesValidatorCurrency")
|
||||
public Function<STrades, IValidator> sTradesValidatorCurrency() {
|
||||
return sTrades -> {
|
||||
ImdgValidationContext<STrades> context = new ImdgValidationContext<>();
|
||||
context.setValidatedObject(sTrades);
|
||||
context.addImdg(IMDGDistributedNames.Map_CurrencyPairSecurity, currencyPairSecurityImdg);
|
||||
context.addImdg(IMDGDistributedNames.Map_MoneyMarketSecurity, imdgMoneyMarketSecurity);
|
||||
context.addImdg(IMDGDistributedNames.Map_FixedIncomeSecurity, fixedIncomeSecurityImdg);
|
||||
context.addImdg(IMDGDistributedNames.Map_EquitySecurity, equitySecurityImdg);
|
||||
context.addImdg(IMDGDistributedNames.Map_Company, imdgCompany);
|
||||
context.addImdg(IMDGDistributedNames.Map_TradingClearingRegistry, imdgTradingClearingRegistry);
|
||||
context.setLogPrefix(LogPrefixId.INSTANCE);
|
||||
return new ValidatorImpl<>(context,
|
||||
STradesValidationRule.SecurityPresentCurrencyPair,
|
||||
STradesValidationRule.CompanyPresent,
|
||||
STradesValidationRule.CounterCompanyPresent,
|
||||
STradesValidationRule.TradingClearingRegistryPresent);
|
||||
};
|
||||
}
|
||||
|
||||
@Bean("obligationAndRequirementsAdmissionValidator")
|
||||
public Function<Registry, IValidator> registryValidator() {
|
||||
return rgs -> {
|
||||
|
|
@ -206,12 +273,13 @@ public class ValidationConfig {
|
|||
context.setValidatedObject(sDf57);
|
||||
context.addImdg(IMDGDistributedNames.Map_Account, imdgAccount);
|
||||
context.addImdg(IMDGDistributedNames.Map_Company, imdgCompany);
|
||||
context.addImdg(IMDGDistributedNames.Map_Currency, imdgCurrency);
|
||||
context.setLogPrefix(LogPrefixId.INSTANCE);
|
||||
return new ValidatorImpl<>(context,
|
||||
Sdf57ValidationRule.CompanyDebOrCredPresent,
|
||||
Sdf57ValidationRule.AccountDebOrCredPresent,
|
||||
Sdf57ValidationRule.AccountAndCompanyMatch,
|
||||
Sdf57ValidationRule.CurrencyCodeCheck
|
||||
CurrencyCodeValidationRule.INSTANCE
|
||||
);
|
||||
};
|
||||
}
|
||||
|
|
@ -226,13 +294,16 @@ public class ValidationConfig {
|
|||
context.addImdg(IMDGDistributedNames.Map_MoneyMarketSecurity, imdgMoneyMarketSecurity);
|
||||
context.addImdg(IMDGDistributedNames.Map_FixedIncomeSecurity, fixedIncomeSecurityImdg);
|
||||
context.addImdg(IMDGDistributedNames.Map_EquitySecurity, equitySecurityImdg);
|
||||
context.addImdg(IMDGDistributedNames.Map_CurrencyPairSecurity, currencyPairSecurityImdg);
|
||||
context.addImdg(IMDGDistributedNames.Map_Registry, imdgRegistry);
|
||||
context.addImdg(IMDGDistributedNames.Map_SDf20, imdgSdf20);
|
||||
context.setLogPrefix(LogPrefixId.INSTANCE);
|
||||
return new ValidatorImpl<>(context,
|
||||
CompanyByTradingCodeValidationRule.instance(SDf21::getDepoCodeCl),
|
||||
Sdf21ValidationRule.AccountPresent,
|
||||
SecurityBySecurityCodeValidationRule.instance(SDf21::getSecurityCode),
|
||||
Sdf21ValidationRule.TransactionNumberProcessed
|
||||
Sdf21ValidationRule.TransactionNumberProcessed,
|
||||
Sdf21ValidationRule.TransactionNumberForSdf20
|
||||
);
|
||||
};
|
||||
}
|
||||
|
|
@ -244,12 +315,13 @@ public class ValidationConfig {
|
|||
context.setValidatedObject(sDf01);
|
||||
context.addImdg(IMDGDistributedNames.Map_Account, imdgAccount);
|
||||
context.addImdg(IMDGDistributedNames.Map_Company, imdgCompany);
|
||||
context.addImdg(IMDGDistributedNames.Map_Currency, imdgCurrency);
|
||||
context.setLogPrefix(LogPrefixId.INSTANCE);
|
||||
return new ValidatorImpl<>(context,
|
||||
Sdf01NewValidationRule.CompanyPresent,
|
||||
Sdf01NewValidationRule.AccountType,
|
||||
Sdf01NewValidationRule.AccountPresent,
|
||||
Sdf01NewValidationRule.CurrencyCodeCheck,
|
||||
CurrencyCodeValidationRule.INSTANCE,
|
||||
Sdf01NewValidationRule.DatIsCurrentDt
|
||||
);
|
||||
};
|
||||
|
|
@ -282,6 +354,8 @@ public class ValidationConfig {
|
|||
context.addImdg(IMDGDistributedNames.Map_Registry, imdgRegistry);
|
||||
context.addImdg(IMDGDistributedNames.Map_Session, imdgSession);
|
||||
context.addImdg(IMDGDistributedNames.Map_TradingClearingRegistry, imdgTradingClearingRegistry);
|
||||
context.addImdg(IMDGDistributedNames.Map_TradingClearingRegistryList, imdgTradingClearingRegistryList);
|
||||
context.addImdg(IMDGDistributedNames.Map_Currency, imdgCurrency);
|
||||
context.setLogPrefix(LogPrefixId.INSTANCE);
|
||||
return new ValidatorImpl<>(context,
|
||||
Sdf06NewValidationRule.Fields,
|
||||
|
|
@ -290,7 +364,9 @@ public class ValidationConfig {
|
|||
Sdf06NewValidationRule.CompanyAndAccountMatch,
|
||||
Sdf06NewValidationRule.Session,
|
||||
Sdf06NewValidationRule.Balance,
|
||||
Sdf06NewValidationRule.TcrPresent
|
||||
Sdf06NewValidationRule.TcrPresent,
|
||||
CurrencyCodeValidationRule.INSTANCE
|
||||
|
||||
|
||||
);
|
||||
};
|
||||
|
|
@ -307,6 +383,7 @@ public class ValidationConfig {
|
|||
context.addImdg(IMDGDistributedNames.Map_FixedIncomeSecurity , fixedIncomeSecurityImdg);
|
||||
context.addImdg(IMDGDistributedNames.Map_MoneyMarketSecurity , imdgMoneyMarketSecurity);
|
||||
context.addImdg(IMDGDistributedNames.Map_EquitySecurity , equitySecurityImdg);
|
||||
context.addImdg(IMDGDistributedNames.Map_CurrencyPairSecurity, currencyPairSecurityImdg);
|
||||
context.addImdg(IMDGDistributedNames.Map_CompanySymbols, imdgCompanySymbols);
|
||||
context.addImdg(IMDGDistributedNames.Map_Company, imdgCompany);
|
||||
context.addImdg(IMDGDistributedNames.Map_Registry, imdgRegistry);
|
||||
|
|
@ -461,6 +538,7 @@ public class ValidationConfig {
|
|||
ctx.addImdg(IMDGDistributedNames.Map_FixedIncomeSecurity , fixedIncomeSecurityImdg);
|
||||
ctx.addImdg(IMDGDistributedNames.Map_MoneyMarketSecurity , imdgMoneyMarketSecurity);
|
||||
ctx.addImdg(IMDGDistributedNames.Map_EquitySecurity , equitySecurityImdg);
|
||||
ctx.addImdg(IMDGDistributedNames.Map_CurrencyPairSecurity, currencyPairSecurityImdg);
|
||||
return new ValidatorImpl<>(ctx,
|
||||
Sdf20ValidationRule.Fields,
|
||||
Sdf20ValidationRule.AccountPresent,
|
||||
|
|
|
|||
|
|
@ -44,6 +44,7 @@ public enum ClearingError implements IErrorEnumId {
|
|||
AccountNotFoundB(5217L),
|
||||
MarketIsNotMkr(5217L),
|
||||
BalanceInsufficient(5222L),
|
||||
Sdf57UnexpectedBalance(5435L),
|
||||
TCRegistryNotFound(3022L),
|
||||
WrongField(5004L),
|
||||
GatewayTimeout(6003L),
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
package ru.spcex.clearing.service;
|
||||
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
|
@ -7,9 +9,11 @@ import org.springframework.stereotype.Component;
|
|||
import ru.clearing.classes.statics.data.account.Account;
|
||||
import ru.clearing.classes.statics.data.company.Company;
|
||||
import ru.clearing.classes.statics.data.registry.TradingClearingRegistry;
|
||||
import ru.clearing.classes.statics.data.registry.TradingClearingRegistryList;
|
||||
import ru.spcex.clearing.error.ClearingError;
|
||||
import ru.spcex.clearing.imdg.IMDGDistributedNames;
|
||||
import ru.spcex.platform.enumeration.AccountType;
|
||||
import ru.spcex.platform.enumeration.CurrencyCode;
|
||||
import ru.spcex.platform.enumeration.ServiceStatus;
|
||||
import ru.spcex.platform.imdg.api.Imdg;
|
||||
import ru.spcex.platform.imdg.api.ImdgProvider;
|
||||
|
|
@ -19,25 +23,25 @@ import ru.spcex.platform.utils.enumeration.EnumMessage;
|
|||
import ru.spcex.platform.utils.enumeration.IEnumId;
|
||||
import ru.spcex.platform.utils.text.TextUtil;
|
||||
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
@Component
|
||||
public class AnltSearcher {
|
||||
private Logger log = LoggerFactory.getLogger(getClass());
|
||||
private final Imdg<TradingClearingRegistry> tradingClearingRegistryImdg;
|
||||
private final Imdg<Company> companyImdg;
|
||||
private final Imdg<Account> accountImdg;
|
||||
private Imdg<TradingClearingRegistryList> tcrListImdg;
|
||||
|
||||
@Autowired
|
||||
public AnltSearcher(ImdgProvider imdgProvider) {
|
||||
this.tradingClearingRegistryImdg = imdgProvider.getImdg(IMDGDistributedNames.Map_TradingClearingRegistry, TradingClearingRegistry.class);
|
||||
this.companyImdg = imdgProvider.getImdg(IMDGDistributedNames.Map_Company, Company.class);
|
||||
this.accountImdg = imdgProvider.getImdg(IMDGDistributedNames.Map_Account, Account.class);
|
||||
this.tcrListImdg = imdgProvider.getImdg(IMDGDistributedNames.Map_TradingClearingRegistryList, TradingClearingRegistryList.class);
|
||||
}
|
||||
|
||||
public AnltSearcher(Imdg<TradingClearingRegistry> tcrImdg, Imdg<Company> companyImdg, Imdg<Account> accountImdg) {
|
||||
public AnltSearcher(Imdg<TradingClearingRegistry> tcrImdg, Imdg<TradingClearingRegistryList> tcrListImdg, Imdg<Company> companyImdg, Imdg<Account> accountImdg) {
|
||||
this.tradingClearingRegistryImdg = tcrImdg;
|
||||
this.tcrListImdg = tcrListImdg;
|
||||
this.companyImdg = companyImdg;
|
||||
this.accountImdg = accountImdg;
|
||||
}
|
||||
|
|
@ -47,33 +51,58 @@ public class AnltSearcher {
|
|||
void log(IEnumId subject, Object... args);
|
||||
}
|
||||
|
||||
|
||||
public AnltSearch loadByAnlt(String comment) {
|
||||
return loadByAnlt(comment, CurrencyCode.RUB.getKey());
|
||||
}
|
||||
|
||||
public AnltSearch loadByAnlt(String comment, String currencyCode) {
|
||||
String commentTcrStripped = getTkrCodeFromComment(comment);
|
||||
// AnltLogger localLogger = (subject, args) -> log.debug("stmt.id={} comment='{}' error: {}", statementId, commentTcrStripped, messageResolver.resolve(new EnumMessage(subject, args)));
|
||||
if (commentTcrStripped == null) {
|
||||
return new AnltSearch(ClearingError.AccountNotFound, "comment not contain TCR");
|
||||
}
|
||||
ImdgPredicateBuilder pb = tradingClearingRegistryImdg.predicateBuilder();
|
||||
ImdgPredicate tcrPredicate = pb.and(
|
||||
pb.equals("code", commentTcrStripped),
|
||||
pb.or(
|
||||
pb.equals("status", ServiceStatus.Active.getKey()),
|
||||
pb.equals("status", ServiceStatus.Reopened.getKey())
|
||||
)
|
||||
ImdgPredicate statusPrdct = pb.or(
|
||||
pb.equals("status", ServiceStatus.Active.getKey()),
|
||||
pb.equals("status", ServiceStatus.Reopened.getKey())
|
||||
);
|
||||
|
||||
ImdgPredicate tcrPredicate = pb.and(
|
||||
pb.equals("code", commentTcrStripped),
|
||||
statusPrdct
|
||||
);
|
||||
TradingClearingRegistryList tcrList = null;
|
||||
TradingClearingRegistry tcr = tradingClearingRegistryImdg.getSingleObjectByPredicate(tcrPredicate);
|
||||
if (tcr == null) {
|
||||
return new AnltSearch(ClearingError.TCRegistryNotFound, commentTcrStripped);
|
||||
}
|
||||
|
||||
if (tcr.getMoneyAccountId() == null) {
|
||||
return new AnltSearch(ClearingError.WrongField, "moneyAccountId");
|
||||
Account infoAcc = null;
|
||||
if (CurrencyCode.isRub(currencyCode)) {
|
||||
if (tcr.getMoneyAccountId() == null) {
|
||||
return new AnltSearch(ClearingError.WrongField, "moneyAccountId");
|
||||
}
|
||||
infoAcc = accountImdg.getSingleObjectByID(tcr.getMoneyAccountId());
|
||||
} else {
|
||||
tcrList = tcrListImdg.getSingleObjectByPredicate(
|
||||
pb.and(
|
||||
pb.equals("currency", currencyCode),
|
||||
pb.equals("tradingClearingRegistryId", tcr.getId()),
|
||||
statusPrdct
|
||||
)
|
||||
);
|
||||
if (tcrList == null) {
|
||||
return new AnltSearch(ClearingError.TCRegistryNotFound, "<by commend=%s and currency=%s>"
|
||||
.formatted(comment, currencyCode));
|
||||
}
|
||||
infoAcc = accountImdg.getSingleObjectByID(tcrList.getAccountId());
|
||||
}
|
||||
|
||||
Account infoAcc = accountImdg.getSingleObjectByID(tcr.getMoneyAccountId());
|
||||
if (infoAcc == null) {
|
||||
return new AnltSearch(ClearingError.AccountNotFound, "moneyAccountId");
|
||||
return new AnltSearch(ClearingError.AccountNotFoundB,
|
||||
"<for tcr.id=%d/moneyAccountId=%d> currency %s".formatted(
|
||||
tcr.getId(), tcr.getMoneyAccountId(), currencyCode
|
||||
));
|
||||
}
|
||||
|
||||
if (!infoAcc.getAccountType().equals(AccountType.Info.getKey())) {
|
||||
|
|
@ -84,7 +113,7 @@ public class AnltSearcher {
|
|||
if (company == null) {
|
||||
return new AnltSearch(ClearingError.CompanyNotFoundB, tcr.getCompanyId());
|
||||
}
|
||||
return new AnltSearch(infoAcc, company, tcr);
|
||||
return new AnltSearch(infoAcc, company, tcr, tcrList, currencyCode);
|
||||
}
|
||||
|
||||
private static final Pattern tcrPattern = Pattern.compile("ТКР.*?([0-9A-Z-]{12})");
|
||||
|
|
@ -107,15 +136,33 @@ public class AnltSearcher {
|
|||
private Account account;
|
||||
private Company company;
|
||||
private TradingClearingRegistry tcr;
|
||||
private TradingClearingRegistryList tcrList;
|
||||
private String currency;
|
||||
|
||||
public AnltSearch(IEnumId errSubject, Object... args) {
|
||||
this.error = new EnumMessage(errSubject, args);
|
||||
}
|
||||
|
||||
public AnltSearch() {
|
||||
}
|
||||
|
||||
public AnltSearch(Account account, Company company, TradingClearingRegistry tcr) {
|
||||
this.account = account;
|
||||
this.company = company;
|
||||
this.tcr = tcr;
|
||||
this.currency = CurrencyCode.RUB.getKey();
|
||||
}
|
||||
|
||||
public AnltSearch(Account account,
|
||||
Company company,
|
||||
TradingClearingRegistry tcr,
|
||||
TradingClearingRegistryList tcrList,
|
||||
String currency) {
|
||||
this.account = account;
|
||||
this.company = company;
|
||||
this.tcr = tcr;
|
||||
this.tcrList = tcrList;
|
||||
this.currency = CurrencyCode.RUB.getKey();
|
||||
}
|
||||
|
||||
public boolean isFound() {
|
||||
|
|
@ -153,5 +200,21 @@ public class AnltSearcher {
|
|||
public void setTcr(TradingClearingRegistry tcr) {
|
||||
this.tcr = tcr;
|
||||
}
|
||||
|
||||
public TradingClearingRegistryList getTcrList() {
|
||||
return tcrList;
|
||||
}
|
||||
|
||||
public void setTcrList(TradingClearingRegistryList tcrList) {
|
||||
this.tcrList = tcrList;
|
||||
}
|
||||
|
||||
public String getCurrency() {
|
||||
return currency;
|
||||
}
|
||||
|
||||
public void setCurrency(String currency) {
|
||||
this.currency = currency;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ import org.springframework.scheduling.annotation.EnableScheduling;
|
|||
import org.springframework.stereotype.Service;
|
||||
import ru.spcex.clearing.platform.messaging.domain.BaseRequest;
|
||||
import ru.spcex.clearing.platform.messaging.domain.cud.common.CommonIdRequest;
|
||||
import ru.spcex.clearing.service.execution.ExecutionCurrencyComponent;
|
||||
import ru.spcex.clearing.service.execution.ExecutionDepositComponent;
|
||||
import ru.spcex.clearing.service.execution.ExecutionFondComponent;
|
||||
import ru.spcex.platform.utils.log.ExceptionUtils;
|
||||
|
|
@ -26,18 +27,21 @@ public class ClearingService implements DisposableBean {
|
|||
private final Clearing clearing;
|
||||
private final ExecutionDepositComponent executionDepositComponent;
|
||||
private final ExecutionFondComponent executionFondComponent;
|
||||
private final ExecutionCurrencyComponent executionCurrencyComponent;
|
||||
|
||||
@Autowired
|
||||
public ClearingService(SdfCreatorBySTLDPayment sdfCreator, PaymentUpdateBySdf04 paymentUpdater,
|
||||
VerificationResultComponent verificationResultComponent, Clearing clearing,
|
||||
ExecutionDepositComponent executionDepositComponent,
|
||||
ExecutionFondComponent executionFondComponent) {
|
||||
ExecutionFondComponent executionFondComponent,
|
||||
ExecutionCurrencyComponent executionCurrencyComponent) {
|
||||
this.sdfCreator = sdfCreator;
|
||||
this.paymentUpdater = paymentUpdater;
|
||||
this.verificationResultComponent = verificationResultComponent;
|
||||
this.executionDepositComponent = executionDepositComponent;
|
||||
this.clearing = clearing;
|
||||
this.executionFondComponent = executionFondComponent;
|
||||
this.executionCurrencyComponent = executionCurrencyComponent;
|
||||
this.executor = Executors.newSingleThreadExecutor();
|
||||
}
|
||||
|
||||
|
|
@ -106,6 +110,7 @@ public class ClearingService implements DisposableBean {
|
|||
try {
|
||||
executionDepositComponent.processNewTS();
|
||||
executionFondComponent.processNewTS();
|
||||
executionCurrencyComponent.processNewTS();
|
||||
} catch (Throwable e) {
|
||||
log.error("{}", ExceptionUtils.getStackTrace(e));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
package ru.spcex.clearing.service;
|
||||
|
||||
import java.time.LocalTime;
|
||||
import org.apache.kafka.clients.consumer.Consumer;
|
||||
import org.apache.kafka.clients.producer.Producer;
|
||||
import org.slf4j.Logger;
|
||||
|
|
@ -7,9 +8,12 @@ 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.core.env.Environment;
|
||||
import org.springframework.core.env.Profiles;
|
||||
import org.springframework.stereotype.Service;
|
||||
import ru.spcex.clearing.platform.messaging.domain.BaseRequest;
|
||||
import ru.spcex.clearing.platform.messaging.domain.Consts;
|
||||
import static ru.spcex.clearing.platform.messaging.domain.Consts.S_TRADES_IMPORTED;
|
||||
import ru.spcex.clearing.platform.messaging.domain.cud.balance.StatementRequest;
|
||||
import ru.spcex.clearing.platform.messaging.domain.cud.clearing.CreateRegistryRequest;
|
||||
import ru.spcex.clearing.platform.messaging.domain.cud.clearing.Sdf04Request;
|
||||
|
|
@ -17,7 +21,11 @@ import ru.spcex.clearing.platform.messaging.domain.cud.clearing.SessionContinueE
|
|||
import ru.spcex.clearing.platform.messaging.domain.cud.common.CommonIdRequest;
|
||||
import ru.spcex.clearing.platform.messaging.domain.cud.gateway.AssetOperationApprovalRequest;
|
||||
import ru.spcex.clearing.platform.messaging.domain.cud.payment.PIClearingOutbondActionNewRequest;
|
||||
import ru.spcex.clearing.platform.messaging.domain.cud.registry.*;
|
||||
import ru.spcex.clearing.platform.messaging.domain.cud.registry.IdentificationFundsRequest;
|
||||
import ru.spcex.clearing.platform.messaging.domain.cud.registry.RegistryChangeRefundDateRequest;
|
||||
import ru.spcex.clearing.platform.messaging.domain.cud.registry.RegistryChangeStatusExtractRequest;
|
||||
import ru.spcex.clearing.platform.messaging.domain.cud.registry.RegistryReturnDepositRequest;
|
||||
import ru.spcex.clearing.platform.messaging.domain.cud.registry.RegistrySplitDepositActionRequest;
|
||||
import ru.spcex.clearing.platform.messaging.domain.cud.schedule.LauncherCommandRequest;
|
||||
import ru.spcex.clearing.platform.messaging.domain.cud.utilities.STradesImportedRequest;
|
||||
import ru.spcex.clearing.platform.messaging.service.QueueConsumer;
|
||||
|
|
@ -26,18 +34,26 @@ import ru.spcex.clearing.platform.messaging.service.Status;
|
|||
import ru.spcex.clearing.service.executors.Sdf06Executor;
|
||||
import ru.spcex.clearing.service.executors.Sdf10Executor;
|
||||
import ru.spcex.clearing.service.payment.PaymentInstructionOutboundService;
|
||||
import ru.spcex.clearing.session.stage.*;
|
||||
import ru.spcex.clearing.session.stage.FinalMkrSession;
|
||||
import ru.spcex.clearing.session.stage.IntermediateMkrSession;
|
||||
import ru.spcex.clearing.session.stage.PrimaryAuctionB0Session;
|
||||
import ru.spcex.clearing.session.stage.PrimaryAuctionBnSession;
|
||||
import ru.spcex.clearing.session.stage.PrimaryAuctionT0Session;
|
||||
import ru.spcex.clearing.session.stage.ReturnDepositSession;
|
||||
import ru.spcex.clearing.session.stage.SecondaryAuctionT0Session;
|
||||
import ru.spcex.clearing.session.stage.SessionManager;
|
||||
import ru.spcex.clearing.session.stage.SessionTerminator;
|
||||
import ru.spcex.clearing.session.stage.TaskType;
|
||||
import ru.spcex.clearing.session.stage.impl.BalanceRevise;
|
||||
import ru.spcex.clearing.statement.StatementServiceV2;
|
||||
import ru.spcex.platform.enumeration.Task;
|
||||
import ru.spcex.platform.utils.enumeration.IMessageResolver;
|
||||
import ru.spcex.platform.utils.error.ValidationException;
|
||||
|
||||
import static ru.spcex.clearing.platform.messaging.domain.Consts.S_TRADES_IMPORTED;
|
||||
|
||||
@Service
|
||||
public class EventsReceiver extends QueueConsumer implements InitializingBean {
|
||||
private final Logger log = LoggerFactory.getLogger(getClass());
|
||||
private final Environment environment;
|
||||
private final IMessageResolver errorResolver;
|
||||
private final ClearingService clearingService;
|
||||
private final RegistryService registryService;
|
||||
|
|
@ -59,7 +75,7 @@ public class EventsReceiver extends QueueConsumer implements InitializingBean {
|
|||
|
||||
@Autowired
|
||||
public EventsReceiver(@Qualifier("kafkaConsumer") Consumer<String, Object> kafkaQueue, Producer<String, Object> kafkaResponseQueue,
|
||||
IMessageResolver errorResolver,
|
||||
Environment environment, IMessageResolver errorResolver,
|
||||
ClearingService clearingService,
|
||||
RegistryService registryService,
|
||||
PrimaryAuctionBnSession primaryAuctionBnSession,
|
||||
|
|
@ -68,6 +84,7 @@ public class EventsReceiver extends QueueConsumer implements InitializingBean {
|
|||
Sdf06Executor sdf06Executor,
|
||||
Sdf10Executor sdf10Executor, BalanceRevise balanceRevise, Sdf05Sender sdf05Sender, StatementServiceV2 statementService, SessionTerminator sessionTerminator, PaymentInstructionOutboundService pmtOutboundService) {
|
||||
super(kafkaQueue, kafkaResponseQueue);
|
||||
this.environment = environment;
|
||||
this.errorResolver = errorResolver;
|
||||
this.clearingService = clearingService;
|
||||
this.registryService = registryService;
|
||||
|
|
@ -173,7 +190,13 @@ public class EventsReceiver extends QueueConsumer implements InitializingBean {
|
|||
|
||||
callback(LauncherCommandRequest.class)
|
||||
.setConsumer(task -> {
|
||||
balanceRevise.submit(new ru.spcex.clearing.session.stage.Task<>(TaskType.StartRevise, null));
|
||||
LocalTime fromTime = null;
|
||||
if (task != null
|
||||
&& task.getRequestPayload() != null
|
||||
&& task.getRequestPayload().getFromTime() != null) {
|
||||
fromTime = task.getRequestPayload().getFromTime();
|
||||
}
|
||||
balanceRevise.submit(new ru.spcex.clearing.session.stage.Task<>(TaskType.StartRevise, fromTime));
|
||||
})
|
||||
.forDestination(Task.getAllBalance.topic(), callbacks::put);
|
||||
|
||||
|
|
@ -191,6 +214,12 @@ public class EventsReceiver extends QueueConsumer implements InitializingBean {
|
|||
.setFunction(sessionTerminator::stopCurrentSession)
|
||||
.forDestination(Consts.KILL_SESSION, callbacks::put);
|
||||
|
||||
if (environment.acceptsProfiles(Profiles.of("dev"))) {
|
||||
callback(LauncherCommandRequest.class)
|
||||
.setFunction(sessionTerminator::forceStopSession)
|
||||
.forDestination(Consts.FORCE_STOP_SESSION, callbacks::put);
|
||||
}
|
||||
|
||||
init();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,16 @@
|
|||
package ru.spcex.clearing.service;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.Instant;
|
||||
import java.time.LocalDate;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Optional;
|
||||
import java.util.function.Function;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Qualifier;
|
||||
|
|
@ -18,13 +29,18 @@ import ru.spcex.clearing.platform.messaging.domain.Consts;
|
|||
import ru.spcex.clearing.platform.messaging.domain.cud.clearing.AssetOperationListRequest;
|
||||
import ru.spcex.clearing.platform.messaging.domain.cud.clearing.AssetOperationRequest;
|
||||
import ru.spcex.clearing.platform.messaging.domain.cud.clearing.CreateRegistryRequest;
|
||||
import ru.spcex.clearing.platform.messaging.domain.cud.registry.*;
|
||||
import ru.spcex.clearing.platform.messaging.domain.cud.registry.IdentificationFundsRequest;
|
||||
import ru.spcex.clearing.platform.messaging.domain.cud.registry.RegistryChangeRefundDateRequest;
|
||||
import ru.spcex.clearing.platform.messaging.domain.cud.registry.RegistryChangeStatusExtractRequest;
|
||||
import ru.spcex.clearing.platform.messaging.domain.cud.registry.RegistryReturnDepositRequest;
|
||||
import ru.spcex.clearing.platform.messaging.domain.cud.registry.RegistrySplitDepositActionRequest;
|
||||
import ru.spcex.clearing.platform.messaging.service.RequestInfoUpdate;
|
||||
import ru.spcex.clearing.platform.messaging.service.Status;
|
||||
import ru.spcex.clearing.platform.messaging.service.sender.KafkaSender;
|
||||
import ru.spcex.clearing.service.builder.PaymentInstructionBuilderV2;
|
||||
import ru.spcex.clearing.service.integration.GatewayRequestCreator;
|
||||
import ru.spcex.clearing.service.registry.AssetTBFProcessing;
|
||||
import ru.spcex.clearing.service.registry.DmiService;
|
||||
import ru.spcex.clearing.service.registry.RegistryManager;
|
||||
import ru.spcex.clearing.service.schedule.TradingTimeService;
|
||||
import ru.spcex.clearing.service.validation.ValidationStored;
|
||||
|
|
@ -32,7 +48,18 @@ import ru.spcex.clearing.session.stage.impl.GatewayRequester;
|
|||
import ru.spcex.clearing.session.stage.util.RegistryUtil;
|
||||
import ru.spcex.clearing.util.security.UserRoleVerification;
|
||||
import ru.spcex.clearing.util.services.RequestHelper;
|
||||
import ru.spcex.platform.enumeration.*;
|
||||
import ru.spcex.platform.enumeration.CurrencyCode;
|
||||
import ru.spcex.platform.enumeration.InOutDirection;
|
||||
import ru.spcex.platform.enumeration.RegistryCapacity;
|
||||
import ru.spcex.platform.enumeration.RegistryDesignation;
|
||||
import ru.spcex.platform.enumeration.RegistryInstrumentType;
|
||||
import ru.spcex.platform.enumeration.RegistryStatus;
|
||||
import ru.spcex.platform.enumeration.RegistryTradingParams;
|
||||
import ru.spcex.platform.enumeration.RegistryUnit;
|
||||
import ru.spcex.platform.enumeration.Sender;
|
||||
import ru.spcex.platform.enumeration.TradingClearingRegistryType;
|
||||
import ru.spcex.platform.enumeration.TransactionStatus;
|
||||
import ru.spcex.platform.enumeration.UserRole;
|
||||
import ru.spcex.platform.imdg.api.Imdg;
|
||||
import ru.spcex.platform.imdg.api.ImdgProvider;
|
||||
import ru.spcex.platform.imdg.api.ImdgTransaction;
|
||||
|
|
@ -44,15 +71,6 @@ 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.math.BigDecimal;
|
||||
import java.time.Instant;
|
||||
import java.time.LocalDate;
|
||||
import java.util.*;
|
||||
import java.util.function.Function;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
import static ru.spcex.platform.utils.number.BigDecimalUtil.safeBD;
|
||||
|
||||
@Service
|
||||
|
|
@ -75,6 +93,7 @@ public class RegistryService {
|
|||
private final TradingTimeService trdTime;
|
||||
private final NotificationSender notification;
|
||||
private final KafkaSender kafkaSender;
|
||||
private final DmiService diService;
|
||||
|
||||
private final IMessageResolver msgResolver;
|
||||
private final RequestHelper reqHelp;
|
||||
|
|
@ -90,7 +109,7 @@ public class RegistryService {
|
|||
GatewayRequester gateway,
|
||||
TradingTimeService tradingTimeService,
|
||||
NotificationSender notification,
|
||||
KafkaSender kafkaSender, IMessageResolver msgResolver,
|
||||
KafkaSender kafkaSender, DmiService diService, IMessageResolver msgResolver,
|
||||
RequestHelper reqHelp,
|
||||
UserRoleVerification rights,
|
||||
AssetTBFProcessing assets) {
|
||||
|
|
@ -110,6 +129,7 @@ public class RegistryService {
|
|||
this.trdTime = tradingTimeService;
|
||||
this.notification = notification;
|
||||
this.kafkaSender = kafkaSender;
|
||||
this.diService = diService;
|
||||
this.assets = assets;
|
||||
this.gateway.setName("RgsService|DM*V");
|
||||
this.msgResolver = msgResolver;
|
||||
|
|
@ -341,6 +361,10 @@ public class RegistryService {
|
|||
Instant now = Instant.now();
|
||||
dmau.setUpdated(now);
|
||||
asts.a__t().setUpdated(now);
|
||||
Registry d_i = diService.createDmi(reqBalance, asts.a__t());
|
||||
d_i.setRegistryStatus(RegistryStatus.OK.getKey());
|
||||
registryImdg.insert(d_i);
|
||||
log.debug("created {}.id={}", d_i.getRegistryCode(), d_i.getId());
|
||||
//paymentInstruction
|
||||
PaymentInstruction pmt = PaymentInstructionBuilderV2.builder(imdgProvider)
|
||||
.registry(asts.a__b())
|
||||
|
|
|
|||
|
|
@ -0,0 +1,99 @@
|
|||
package ru.spcex.clearing.service;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
import ru.clearing.classes.statics.data.account.Account;
|
||||
import ru.clearing.classes.statics.data.company.Company;
|
||||
import ru.clearing.classes.statics.data.registry.TradingClearingRegistry;
|
||||
import ru.clearing.classes.statics.data.registry.TradingClearingRegistryList;
|
||||
import ru.spcex.clearing.error.ClearingError;
|
||||
import ru.spcex.clearing.imdg.IMDGDistributedNames;
|
||||
import ru.spcex.platform.enumeration.CurrencyCode;
|
||||
import ru.spcex.platform.enumeration.ServiceStatus;
|
||||
import ru.spcex.platform.imdg.api.Imdg;
|
||||
import ru.spcex.platform.imdg.api.ImdgProvider;
|
||||
import ru.spcex.platform.imdg.api.predicate.ImdgPredicate;
|
||||
import ru.spcex.platform.imdg.api.predicate.ImdgPredicateBuilder;
|
||||
|
||||
@Component
|
||||
public class TcrSearcher {
|
||||
private Logger log = LoggerFactory.getLogger(getClass());
|
||||
private final Imdg<TradingClearingRegistry> tcrImdg;
|
||||
private final Imdg<TradingClearingRegistryList> tcrListImdg;
|
||||
private final Imdg<Company> companyImdg;
|
||||
private final Imdg<Account> accountImdg;
|
||||
|
||||
|
||||
@Autowired
|
||||
public TcrSearcher(ImdgProvider imdgProvider) {
|
||||
this.tcrImdg = imdgProvider.getImdg(
|
||||
IMDGDistributedNames.Map_TradingClearingRegistry,
|
||||
TradingClearingRegistry.class);
|
||||
this.tcrListImdg = imdgProvider.getImdg(
|
||||
IMDGDistributedNames.Map_TradingClearingRegistryList,
|
||||
TradingClearingRegistryList.class);
|
||||
this.companyImdg = imdgProvider.getImdg(IMDGDistributedNames.Map_Company, Company.class);
|
||||
this.accountImdg = imdgProvider.getImdg(IMDGDistributedNames.Map_Account, Account.class);
|
||||
}
|
||||
|
||||
public TcrSearcher(Imdg<TradingClearingRegistry> tcrImdg,
|
||||
Imdg<TradingClearingRegistryList> tcrListImdg,
|
||||
Imdg<Company> companyImdg,
|
||||
Imdg<Account> accountImdg) {
|
||||
this.tcrImdg = tcrImdg;
|
||||
this.tcrListImdg = tcrListImdg;
|
||||
this.companyImdg = companyImdg;
|
||||
this.accountImdg = accountImdg;
|
||||
}
|
||||
|
||||
public AnltSearcher.AnltSearch loadByCurrencyAccountId(Long accountId, String currency) {
|
||||
AnltSearcher.AnltSearch srchRes = new AnltSearcher.AnltSearch();
|
||||
ImdgPredicateBuilder pb = tcrImdg.predicateBuilder();
|
||||
ImdgPredicate sttsPrdct = pb.or(
|
||||
pb.equals("status", ServiceStatus.Active.getKey()),
|
||||
pb.equals("status", ServiceStatus.Reopened.getKey())
|
||||
);
|
||||
//fixme BASED ON CURRENCY
|
||||
TradingClearingRegistry tcr = tcrImdg.getSingleObjectByPredicate(
|
||||
pb.and(
|
||||
pb.equals("moneyAccountId", accountId),
|
||||
sttsPrdct
|
||||
)
|
||||
);
|
||||
|
||||
if (tcr != null) {
|
||||
srchRes.setCurrency(CurrencyCode.RUB.getKey());
|
||||
} else {
|
||||
TradingClearingRegistryList tcrList = tcrListImdg.getSingleObjectByPredicate(
|
||||
pb.and(
|
||||
pb.equals("accountId", accountId),
|
||||
sttsPrdct
|
||||
)
|
||||
);
|
||||
if (tcrList == null) {
|
||||
return new AnltSearcher.AnltSearch(ClearingError.TCRegistryNotFound, "<by accountId=%s".formatted(accountId));
|
||||
}
|
||||
tcr = tcrImdg.getSingleObjectByID(tcrList.getTradingClearingRegistryId());
|
||||
if (tcr == null) {
|
||||
return new AnltSearcher.AnltSearch(ClearingError.TCRegistryNotFound, "<by accountId=%s".formatted(accountId));
|
||||
}
|
||||
srchRes.setCurrency(tcrList.getCurrency());
|
||||
srchRes.setTcrList(tcrList);
|
||||
}
|
||||
srchRes.setTcr(tcr);
|
||||
|
||||
Account acc = accountImdg.getSingleObjectByID(accountId);
|
||||
if (acc == null) {
|
||||
return new AnltSearcher.AnltSearch(ClearingError.AccountNotFoundB, accountId);
|
||||
}
|
||||
Company cmp = companyImdg.getSingleObjectByID(acc.getCompanyId());
|
||||
if (cmp == null) {
|
||||
return new AnltSearcher.AnltSearch(ClearingError.CompanyNotFoundB, acc.getCompanyId());
|
||||
}
|
||||
srchRes.setAccount(acc);
|
||||
srchRes.setCompany(cmp);
|
||||
return srchRes;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,5 +1,9 @@
|
|||
package ru.spcex.clearing.service.builder;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.Instant;
|
||||
import java.time.LocalDate;
|
||||
import java.util.Map;
|
||||
import ru.clearing.classes.statics.data.account.Account;
|
||||
import ru.clearing.classes.statics.data.account.ClearingAccount;
|
||||
import ru.clearing.classes.statics.data.company.Company;
|
||||
|
|
@ -8,22 +12,24 @@ import ru.clearing.classes.statics.data.instrument.issue.FixedIncomeSecurity;
|
|||
import ru.clearing.classes.statics.data.misc.Currency;
|
||||
import ru.clearing.classes.statics.data.registry.Registry;
|
||||
import ru.clearing.classes.statics.data.registry.TradingClearingRegistry;
|
||||
import ru.clearing.classes.statics.data.security.CurrencyPairSecurity;
|
||||
import ru.clearing.classes.statics.data.security.MoneyMarketSecurity;
|
||||
import ru.clearing.classes.statics.data.security.Security;
|
||||
import ru.clearing.classes.statics.data.statement.Statement;
|
||||
import ru.spcex.clearing.imdg.IMDGDistributedNames;
|
||||
import ru.spcex.clearing.service.AnltSearcher;
|
||||
import ru.spcex.clearing.service.TcrSearcher;
|
||||
import ru.spcex.clearing.session.stage.util.RegistryUtil;
|
||||
import ru.spcex.platform.enumeration.*;
|
||||
import ru.spcex.platform.enumeration.AccountType;
|
||||
import ru.spcex.platform.enumeration.RegistryCapacity;
|
||||
import ru.spcex.platform.enumeration.RegistryDesignation;
|
||||
import ru.spcex.platform.enumeration.RegistryInstrumentType;
|
||||
import ru.spcex.platform.enumeration.RegistryStatus;
|
||||
import ru.spcex.platform.enumeration.RegistryUnit;
|
||||
import ru.spcex.platform.imdg.api.Imdg;
|
||||
import ru.spcex.platform.imdg.api.ImdgProvider;
|
||||
import ru.spcex.platform.utils.enumeration.IEnumKey;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.Instant;
|
||||
import java.time.LocalDate;
|
||||
import java.util.Collection;
|
||||
import java.util.Map;
|
||||
|
||||
public class RegistryBuilder {
|
||||
private Statement statement;
|
||||
private Company company;
|
||||
|
|
@ -37,7 +43,10 @@ public class RegistryBuilder {
|
|||
private final Imdg<FixedIncomeSecurity> fixedIncomeSecurityImdg;
|
||||
private final Imdg<MoneyMarketSecurity> moneyMarketSecurityImdg;
|
||||
private final Imdg<EquitySecurity> equitySecurityImdg;
|
||||
private final Imdg<CurrencyPairSecurity> currencyPairSecurityImdg;
|
||||
private final Imdg<Currency> currencyImdg;
|
||||
private final TcrSearcher tcrSrcher;
|
||||
private String currency;
|
||||
|
||||
|
||||
public static RegistryBuilder builder(ImdgProvider imdgProvider) {
|
||||
|
|
@ -52,7 +61,9 @@ public class RegistryBuilder {
|
|||
this.fixedIncomeSecurityImdg = imdgProvider.getImdg(IMDGDistributedNames.Map_FixedIncomeSecurity, FixedIncomeSecurity.class);
|
||||
this.moneyMarketSecurityImdg = imdgProvider.getImdg(IMDGDistributedNames.Map_MoneyMarketSecurity, MoneyMarketSecurity.class);
|
||||
this.equitySecurityImdg = imdgProvider.getImdg(IMDGDistributedNames.Map_EquitySecurity, EquitySecurity.class);
|
||||
this.currencyPairSecurityImdg = imdgProvider.getImdg(IMDGDistributedNames.Map_CurrencyPairSecurity, CurrencyPairSecurity.class);
|
||||
this.currencyImdg = imdgProvider.getImdg(IMDGDistributedNames.Map_Currency, Currency.class);
|
||||
this.tcrSrcher = new TcrSearcher(imdgProvider);
|
||||
}
|
||||
|
||||
public RegistryBuilder statement(Statement statement) {
|
||||
|
|
@ -70,6 +81,11 @@ public class RegistryBuilder {
|
|||
return this;
|
||||
}
|
||||
|
||||
public RegistryBuilder loadTcrForCurrency(String currency) {
|
||||
this.currency = currency;
|
||||
return this;
|
||||
}
|
||||
|
||||
public RegistryBuilder designation(RegistryDesignation designation) {
|
||||
this.designation = designation;
|
||||
return this;
|
||||
|
|
@ -100,15 +116,13 @@ public class RegistryBuilder {
|
|||
rgs.setRegistryUnit(RegistryUnit.T.getKey());
|
||||
rgs.setRegistryCode(RegistryUtil.clearingCode(rgs));
|
||||
|
||||
Collection<TradingClearingRegistry> tcrsByAccount = tradingClearingRegistryImdg.getCollectionObjectsByFieldValues(Map.of(
|
||||
"moneyAccountId", account.getId(),
|
||||
"companyId", company.getId(),
|
||||
"status", ServiceStatus.Active.getKey()
|
||||
));
|
||||
if (!tcrsByAccount.isEmpty()) {
|
||||
TradingClearingRegistry tcr = tcrsByAccount.iterator().next();
|
||||
rgs.setTradingClearingRegistryId(tcr.getId());
|
||||
rgs.setTradingClearingRegistry(tcr.getCode());
|
||||
if (currency != null) {
|
||||
AnltSearcher.AnltSearch anltSearch = tcrSrcher.loadByCurrencyAccountId(account.getId(), currency);
|
||||
if (anltSearch.isFound()) {
|
||||
TradingClearingRegistry tcr = anltSearch.getTcr();
|
||||
rgs.setTradingClearingRegistryId(tcr.getId());
|
||||
rgs.setTradingClearingRegistry(tcr.getCode());
|
||||
}
|
||||
}
|
||||
|
||||
rgs.setRegistryStatus(RegistryStatus.PROC.getKey());
|
||||
|
|
@ -138,12 +152,15 @@ public class RegistryBuilder {
|
|||
}
|
||||
|
||||
private String obtainSecuritySymbol(Long securityId) {
|
||||
// похожий код есть в SecuritySelector
|
||||
Security security = fixedIncomeSecurityImdg.getSingleObjectByID(securityId);
|
||||
if (security != null) return security.getSecuritySymbol();
|
||||
security = moneyMarketSecurityImdg.getSingleObjectByID(securityId);
|
||||
if (security != null) return security.getSecuritySymbol();
|
||||
security = equitySecurityImdg.getSingleObjectByID(securityId);
|
||||
if (security != null) return security.getSecuritySymbol();
|
||||
security = currencyPairSecurityImdg.getSingleObjectByID(securityId);
|
||||
if (security != null) return security.getSecuritySymbol();
|
||||
Currency currency = currencyImdg.getSingleObjectByID(securityId);
|
||||
if (currency != null) return currency.getCurrencyCode();
|
||||
return null;
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ import ru.clearing.classes.statics.data.instrument.issue.FixedIncomeSecurity;
|
|||
import ru.clearing.classes.statics.data.misc.Currency;
|
||||
import ru.clearing.classes.statics.data.registry.Registry;
|
||||
import ru.clearing.classes.statics.data.registry.TradingClearingRegistry;
|
||||
import ru.clearing.classes.statics.data.security.CurrencyPairSecurity;
|
||||
import ru.clearing.classes.statics.data.security.MoneyMarketSecurity;
|
||||
import ru.clearing.classes.statics.data.security.Security;
|
||||
import ru.clearing.classes.statics.data.statement.Statement;
|
||||
|
|
@ -37,6 +38,7 @@ public class RegistrySecurityBuilder {
|
|||
private final Imdg<FixedIncomeSecurity> fixedIncomeSecurityImdg;
|
||||
private final Imdg<MoneyMarketSecurity> moneyMarketSecurityImdg;
|
||||
private final Imdg<EquitySecurity> equitySecurityImdg;
|
||||
private final Imdg<CurrencyPairSecurity> currencyPairSecurityImdg;
|
||||
private final Imdg<Currency> currencyImdg;
|
||||
|
||||
|
||||
|
|
@ -52,6 +54,7 @@ public class RegistrySecurityBuilder {
|
|||
this.fixedIncomeSecurityImdg = imdgProvider.getImdg(IMDGDistributedNames.Map_FixedIncomeSecurity, FixedIncomeSecurity.class);
|
||||
this.moneyMarketSecurityImdg = imdgProvider.getImdg(IMDGDistributedNames.Map_MoneyMarketSecurity, MoneyMarketSecurity.class);
|
||||
this.equitySecurityImdg = imdgProvider.getImdg(IMDGDistributedNames.Map_EquitySecurity, EquitySecurity.class);
|
||||
this.currencyPairSecurityImdg = imdgProvider.getImdg(IMDGDistributedNames.Map_CurrencyPairSecurity, CurrencyPairSecurity.class);
|
||||
this.currencyImdg = imdgProvider.getImdg(IMDGDistributedNames.Map_Currency, Currency.class);
|
||||
}
|
||||
|
||||
|
|
@ -138,12 +141,15 @@ public class RegistrySecurityBuilder {
|
|||
}
|
||||
|
||||
private String obtainSecuritySymbol(Long securityId) {
|
||||
// похожий код есть в SecuritySelector
|
||||
Security security = fixedIncomeSecurityImdg.getSingleObjectByID(securityId);
|
||||
if (security != null) return security.getSecuritySymbol();
|
||||
security = moneyMarketSecurityImdg.getSingleObjectByID(securityId);
|
||||
if (security != null) return security.getSecuritySymbol();
|
||||
security = equitySecurityImdg.getSingleObjectByID(securityId);
|
||||
if (security != null) return security.getSecuritySymbol();
|
||||
security = currencyPairSecurityImdg.getSingleObjectByID(securityId);
|
||||
if (security != null) return security.getSecuritySymbol();
|
||||
Currency currency = currencyImdg.getSingleObjectByID(securityId);
|
||||
if (currency != null) return currency.getCurrencyCode();
|
||||
return null;
|
||||
|
|
|
|||
|
|
@ -0,0 +1,287 @@
|
|||
package ru.spcex.clearing.service.execution;
|
||||
|
||||
import org.apache.kafka.clients.producer.Producer;
|
||||
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.scheduling.annotation.EnableScheduling;
|
||||
import org.springframework.scheduling.annotation.Scheduled;
|
||||
import org.springframework.stereotype.Component;
|
||||
import ru.clearing.classes.statics.data.company.Company;
|
||||
import ru.clearing.classes.statics.data.execution.ExecutionCurrency;
|
||||
import ru.clearing.classes.statics.data.misc.Listing;
|
||||
import ru.clearing.classes.statics.data.misc.Market;
|
||||
import ru.clearing.classes.statics.data.misc.STrades;
|
||||
import ru.clearing.classes.statics.data.registry.TradingClearingRegistry;
|
||||
import ru.clearing.classes.statics.data.security.Security;
|
||||
import ru.spcex.clearing.error.ClearingError;
|
||||
import ru.spcex.clearing.error.ClearingException;
|
||||
import ru.spcex.clearing.imdg.IMDGDistributedNames;
|
||||
import ru.spcex.clearing.platform.messaging.domain.Consts;
|
||||
import ru.spcex.clearing.platform.messaging.domain.cud.registry.DealRegisterNewRequest;
|
||||
import ru.spcex.clearing.platform.messaging.domain.cud.registry.ExecutionType;
|
||||
import ru.spcex.clearing.platform.messaging.service.sender.KafkaSender;
|
||||
import ru.spcex.clearing.service.validation.ValidationStored;
|
||||
import ru.spcex.platform.enumeration.Section;
|
||||
import ru.spcex.platform.enumeration.Side;
|
||||
import ru.spcex.platform.imdg.api.Imdg;
|
||||
import ru.spcex.platform.imdg.api.ImdgProvider;
|
||||
import ru.spcex.platform.imdg.api.predicate.ImdgPredicateBuilder;
|
||||
import ru.spcex.platform.utils.enumeration.EnumMessage;
|
||||
import ru.spcex.platform.utils.enumeration.IEnumId;
|
||||
import ru.spcex.platform.utils.enumeration.IEnumKey;
|
||||
import ru.spcex.platform.utils.enumeration.IMessageResolver;
|
||||
import ru.spcex.platform.utils.log.ExceptionUtils;
|
||||
import ru.spcex.platform.utils.time.TimeUtil;
|
||||
import ru.spcex.platform.utils.validation.IValidator;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.Instant;
|
||||
import java.time.LocalDate;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.Collection;
|
||||
import java.util.Map;
|
||||
import java.util.Optional;
|
||||
import java.util.function.Function;
|
||||
|
||||
/**
|
||||
* ExecutionCurrency - Сделки на Валютной секции
|
||||
*/
|
||||
@Component
|
||||
@EnableScheduling
|
||||
public class ExecutionCurrencyComponent {
|
||||
private final Logger log = LoggerFactory.getLogger(getClass());
|
||||
|
||||
private final Imdg<STrades> sTradeImdg;
|
||||
private final Imdg<ExecutionCurrency> executionCurrencyImdg;
|
||||
private final Imdg<Listing> listingImdg;
|
||||
|
||||
// protected transient Long tradeNum; //todo used?
|
||||
// protected transient Instant tradingDay;
|
||||
private final IMessageResolver msgResolver;
|
||||
private final Function<STrades, IValidator> stradesValidator;
|
||||
private final KafkaSender kafkaSender;
|
||||
private static final DateTimeFormatter contractFormatter = DateTimeFormatter.ofPattern("ddMMyy");
|
||||
|
||||
|
||||
|
||||
@Autowired
|
||||
public ExecutionCurrencyComponent(ImdgProvider imdgProvider, Producer<String, Object> kafka,
|
||||
@Qualifier("sTradesValidatorCurrency") Function<STrades, IValidator> stradesValidator,
|
||||
@Qualifier("kafkaSenderWithoutRequestInfo") KafkaSender kafkaSender,
|
||||
IMessageResolver msgResolver) {
|
||||
this.sTradeImdg = imdgProvider.getImdg(IMDGDistributedNames.Map_STrades, STrades.class);
|
||||
this.executionCurrencyImdg = imdgProvider.getImdg(IMDGDistributedNames.Map_ExecutionCurrency, ExecutionCurrency.class);
|
||||
this.listingImdg = imdgProvider.getImdg(IMDGDistributedNames.Map_Listing, Listing.class);
|
||||
this.stradesValidator = stradesValidator;
|
||||
this.kafkaSender = kafkaSender;
|
||||
this.msgResolver = msgResolver;
|
||||
|
||||
// resetTradingDay();
|
||||
}
|
||||
|
||||
// /**
|
||||
// * Сбрасывать каждый день в 01:00:01 "0 1 0 1 * ?"
|
||||
// */
|
||||
// @Scheduled(cron = "0 1 0 1 * ?")
|
||||
// public void resetTradingDay() {
|
||||
// log.trace("Recheck today trading day for search STrade. Current state: tradeNum={}, tradeDat={}", tradeNum, tradingDay);
|
||||
// Instant today = TimeUtil.localDateToInstant(LocalDate.now());
|
||||
// if (tradingDay == null || !tradingDay.equals(today)) {
|
||||
// tradeNum = -1L;
|
||||
// tradingDay = today;
|
||||
// }
|
||||
// log.info("Reset trading day for search STrade: tradeNum={}, tradeDat={}", tradeNum, tradingDay);
|
||||
// }
|
||||
|
||||
public void processNewTS() {
|
||||
LocalDate today = LocalDate.now();
|
||||
log.debug("Start check new S_TRADE at {}", today);
|
||||
//выбираем STrades на сегодня с правильным section
|
||||
Collection<STrades> sTrades = sTradeImdg.getCollectionObjectsByFieldValues(Map.of(
|
||||
"tradeDate", today,
|
||||
"section", Section.CURR.getKey()
|
||||
));
|
||||
log.info("Found {} s_trade for today", sTrades.size());
|
||||
|
||||
if (sTrades.isEmpty()) {
|
||||
logError(ClearingError.NewDealsNotFound);
|
||||
return;
|
||||
}
|
||||
|
||||
//убираем уже добавленные в ExecutionCurrency
|
||||
sTrades.removeIf(sTrd -> {
|
||||
Side sTrdSide = IEnumKey.getEnumByKey(Side.class, sTrd.getOperation());
|
||||
if (sTrdSide == null || !(sTrdSide.equals(Side.BUY) || sTrdSide.equals(Side.SELL))) {
|
||||
log.warn("cannot parse strade.tradeNum={} strade.operation {}", sTrd.getTradeNum(), sTrd.getOperation());
|
||||
return true;
|
||||
}
|
||||
// MoneyFlowSide excDepSide = sTrdSide == Side.BUY ? MoneyFlowSide.BUY : MoneyFlowSide.SELL;
|
||||
return executionCurrencyImdg.getFirstObjectByFieldValues(
|
||||
Map.of("tradingDate", sTrd.getTradeDate(),
|
||||
"exchangeExecutionId", sTrd.getTradeNum(),
|
||||
"side", sTrdSide.getKey())) != null;
|
||||
});
|
||||
log.info("{} strades left after already-added filtering", sTrades.size());
|
||||
|
||||
for (STrades sTrd : sTrades) {
|
||||
log.trace("S_TRADE[{}] new", sTrd.getId());
|
||||
|
||||
//проверки
|
||||
IValidator validator = stradesValidator.apply(sTrd);
|
||||
Optional<EnumMessage> error = validator.tillFirstError();
|
||||
if (error.isPresent()) {
|
||||
logError(sTrd.getId(), error.get());
|
||||
continue;
|
||||
}
|
||||
ExecutionCurrency newEC;
|
||||
try {
|
||||
newEC = createExecutionCurrency(sTrd, validator);
|
||||
executionCurrencyImdg.insert(newEC);
|
||||
sendNotification(newEC);
|
||||
log.debug("New executionCurrency.id={} was created.", newEC.getId());
|
||||
} catch (ClearingException ce) {
|
||||
auditMessage(ce);
|
||||
} catch (Exception e) {
|
||||
log.error("When create new ExecutionCurrency by STrade[{}] error: {}", sTrd.getId(), ExceptionUtils.getStackTrace(e));
|
||||
}
|
||||
}
|
||||
|
||||
Long newMaxTradeNum = sTrades.stream().mapToLong(STrades::getTradeNum).max().orElse(0); // orElseGet(() -> tradeNum)
|
||||
log.info("Process completed. Next tradeNum is {}", newMaxTradeNum);
|
||||
}
|
||||
|
||||
|
||||
protected void auditMessage(ClearingException ce) {
|
||||
log.error("AUDIT error code {}: {}", ce.getEnumMsg(), ce.getMessage());
|
||||
}
|
||||
|
||||
protected void sendNotification(ExecutionCurrency forED) throws ClearingException {
|
||||
final String destination = Consts.REGISTRY_DEAL_REGISTER_NEW;
|
||||
DealRegisterNewRequest requestPayload = new DealRegisterNewRequest();
|
||||
requestPayload.setExecutionId(forED.getId());
|
||||
requestPayload.setExchangeExecutionId(forED.getExchangeExecutionId());
|
||||
requestPayload.setExecutionType(ExecutionType.currency);
|
||||
Long generatedRequestId = kafkaSender.sendRequestToQueue(destination, requestPayload);
|
||||
if (generatedRequestId == null) {
|
||||
throw new RuntimeException("failed to send request to " + destination);
|
||||
}
|
||||
}
|
||||
|
||||
protected ExecutionCurrency createExecutionCurrency(STrades sTrades,
|
||||
IValidator validator) throws ClearingException {
|
||||
Security security = validator.getStored(ValidationStored.STradesSecurity);
|
||||
Company company = validator.getStored(ValidationStored.STradesCompany);
|
||||
Company counterCompany = validator.getStored(ValidationStored.STradesCounterCompany);
|
||||
TradingClearingRegistry rgstr = validator.getStored(ValidationStored.STradesTradingClearingRegistry);
|
||||
Listing listing = listingImdg.getFirstObjectByFieldValues(Map.of("securityId", security.getId()));
|
||||
|
||||
ExecutionCurrency eCurrency = new ExecutionCurrency();
|
||||
final Instant now = Instant.now();
|
||||
eCurrency.setCreated(now);
|
||||
eCurrency.setTradingDate(sTrades.getTradeDate());
|
||||
eCurrency.setClearingDate(TimeUtil.toLocalDate(now));
|
||||
eCurrency.setExchangeExecutionId(sTrades.getTradeNum());
|
||||
eCurrency.setExchangeExecutionTime(sTrades.getTradeDateTime());
|
||||
eCurrency.setExchangeExecutionMicroseconds(sTrades.getTradeDateTime()); // todo проверить это дата+время или нет
|
||||
eCurrency.setPartyTradingClearingRegistryId(rgstr.getId()); // setTradingClearingRegistryId
|
||||
eCurrency.setPartyTradingClearingRegistry(sTrades.getAccount()); // todo уточнить rgstr.code/strades.account?
|
||||
eCurrency.setMarket(sTrades.getClassCode());
|
||||
// { todo нет поля Description и не понятно как искать Market
|
||||
// Market market = market=market.code ;
|
||||
// eCurrency.setDescription(market.getDescription());
|
||||
// }
|
||||
eCurrency.setPrice(sTrades.getPrice());
|
||||
eCurrency.setLots(sTrades.getQty());
|
||||
eCurrency.setSettlementAmount(sTrades.getValue());
|
||||
if (listing != null && listing.getLotSize() != null && eCurrency.getLots() != null) {
|
||||
BigDecimal lots = eCurrency.getLots();
|
||||
BigDecimal listingLotSize = listing.getLotSize();
|
||||
if (listingLotSize != null && lots != null) {
|
||||
eCurrency.setQuantity(lots.multiply(listingLotSize));
|
||||
}
|
||||
}
|
||||
//todo fill eCurrency.setSessionId();
|
||||
// String companyContract = null;
|
||||
{
|
||||
Side sTradeSide = IEnumKey.getEnumByKey(Side.class, sTrades.getOperation());
|
||||
if (sTradeSide != null) {
|
||||
eCurrency.setSide(sTradeSide.getKey());
|
||||
// switch (sTradeSide) {
|
||||
// case BUY -> {
|
||||
// companyContract = sTrades.getFirmId();
|
||||
// eCurrency.setSide(?MoneyFlowSide.BUY.getKey());
|
||||
// }
|
||||
// case SELL -> {
|
||||
// companyContract = sTrades.getCpFirmId();
|
||||
// eCurrency.setSide(?MoneyFlowSide.SELL.getKey());
|
||||
// }
|
||||
// }
|
||||
}
|
||||
}
|
||||
eCurrency.setCurrencyCode(sTrades.getSettleCurrency());//todo verify TZ
|
||||
// eCurrency.setSettlementCurrency(sTrades.getSettleCurrency());
|
||||
eCurrency.setCompanyId(company.getId());
|
||||
//todo fill eCurrency.setSettlementOrganization();
|
||||
//todo fill eCurrency.setCoverageStatus(); "Cтатус достаточности обеспечения" будет ли на следующих этапах?
|
||||
|
||||
eCurrency.setSettlementCode(sTrades.getSettleCode()); // todo не по заданию, но наверное так
|
||||
eCurrency.setSettlementDate(sTrades.getSettleDate());
|
||||
|
||||
eCurrency.setSecurityName(security.getFullName());
|
||||
eCurrency.setSecuritySymbol(security.getSecuritySymbol());
|
||||
eCurrency.setSecurityId(security.getId());
|
||||
eCurrency.setCounterPartyId(counterCompany.getId());
|
||||
{
|
||||
ImdgPredicateBuilder strPb = sTradeImdg.predicateBuilder();
|
||||
STrades counterSTrades = sTradeImdg.getFirstObjectByPredicate(strPb.and(
|
||||
strPb.equals("tradeNum", sTrades.getTradeNum()),
|
||||
strPb.equals("section", sTrades.getSection()),
|
||||
strPb.not(strPb.equals("operation", sTrades.getOperation()))));
|
||||
if (counterSTrades != null) {
|
||||
eCurrency.setCounterPartyTradingClearingRegistry(counterSTrades.getAccount());
|
||||
searchTcrByStrades(counterSTrades)
|
||||
.ifPresent(tcr -> eCurrency.setCounterPartyTradingClearingRegistryId(tcr.getId()));
|
||||
} else {
|
||||
log.trace("Counter STRade for {tradeNum={}, section={}, operation={}} not found.",
|
||||
sTrades.getTradeNum(), sTrades.getSection(), sTrades.getOperation());
|
||||
}
|
||||
}
|
||||
return eCurrency;
|
||||
}
|
||||
|
||||
private Optional<Long> stripDaysFromSecCode(String secCode) {
|
||||
if (secCode == null || secCode.length() <= 7) {
|
||||
return Optional.empty();
|
||||
}
|
||||
String digitsFromSecCode = secCode.substring(7).replaceAll("[^\\d]", "");
|
||||
if (digitsFromSecCode.length() == 0) {
|
||||
return Optional.empty();
|
||||
}
|
||||
try {
|
||||
Long days = Long.valueOf(digitsFromSecCode);
|
||||
return Optional.of(days);
|
||||
} catch (Throwable e) {
|
||||
return Optional.empty();
|
||||
}
|
||||
}
|
||||
|
||||
private void logError(IEnumId subject, Object... args) {
|
||||
log.info("{}", msgResolver.resolve(new EnumMessage(subject, args)));
|
||||
}
|
||||
|
||||
private void logError(Long sTradeId, EnumMessage msg) {
|
||||
log.warn("sTrade id={} {}", sTradeId, msgResolver.resolve(msg));
|
||||
}
|
||||
|
||||
private Optional<TradingClearingRegistry> searchTcrByStrades(STrades sTrades) {
|
||||
IValidator counterValidator = stradesValidator.apply(sTrades);
|
||||
Optional<EnumMessage> err = counterValidator.tillFirstError();
|
||||
if (err.isPresent()) {
|
||||
log.error("couldn't extract setCounterPartyTradingClearingRegistryId from strades.id={}", sTrades.getId());
|
||||
return Optional.empty();
|
||||
}
|
||||
return Optional.ofNullable(counterValidator.getStored(ValidationStored.STradesTradingClearingRegistry));
|
||||
}
|
||||
}
|
||||
|
|
@ -1,5 +1,13 @@
|
|||
package ru.spcex.clearing.service.execution;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.math.RoundingMode;
|
||||
import java.time.Instant;
|
||||
import java.time.LocalDate;
|
||||
import java.util.Collection;
|
||||
import java.util.Map;
|
||||
import java.util.Optional;
|
||||
import java.util.function.Function;
|
||||
import org.apache.kafka.clients.producer.Producer;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
|
@ -14,6 +22,8 @@ import ru.clearing.classes.statics.data.execution.ExecutionFond;
|
|||
import ru.clearing.classes.statics.data.instrument.issue.FixedIncomeCashFlow;
|
||||
import ru.clearing.classes.statics.data.instrument.issue.FixedIncomeSecurity;
|
||||
import ru.clearing.classes.statics.data.misc.Listing;
|
||||
import ru.clearing.classes.statics.data.misc.Market;
|
||||
import ru.clearing.classes.statics.data.misc.SCrossRate;
|
||||
import ru.clearing.classes.statics.data.misc.STrades;
|
||||
import ru.clearing.classes.statics.data.registry.TradingClearingRegistry;
|
||||
import ru.clearing.classes.statics.data.security.Security;
|
||||
|
|
@ -27,25 +37,25 @@ import ru.spcex.clearing.platform.messaging.domain.cud.registry.DealRegisterNewR
|
|||
import ru.spcex.clearing.platform.messaging.domain.cud.registry.ExecutionType;
|
||||
import ru.spcex.clearing.platform.messaging.service.sender.KafkaSender;
|
||||
import ru.spcex.clearing.service.validation.ValidationStored;
|
||||
import ru.spcex.platform.enumeration.*;
|
||||
import ru.spcex.platform.enumeration.CurrencyCode;
|
||||
import ru.spcex.platform.enumeration.InstrumentType;
|
||||
import ru.spcex.platform.enumeration.ObjectType;
|
||||
import ru.spcex.platform.enumeration.Priority;
|
||||
import ru.spcex.platform.enumeration.Section;
|
||||
import ru.spcex.platform.enumeration.Side;
|
||||
import ru.spcex.platform.imdg.api.Imdg;
|
||||
import ru.spcex.platform.imdg.api.ImdgProvider;
|
||||
import ru.spcex.platform.imdg.api.predicate.ImdgPredicate;
|
||||
import ru.spcex.platform.imdg.api.predicate.ImdgPredicateBuilder;
|
||||
import ru.spcex.platform.utils.enumeration.*;
|
||||
import ru.spcex.platform.utils.enumeration.EnumMessage;
|
||||
import ru.spcex.platform.utils.enumeration.IEnumId;
|
||||
import ru.spcex.platform.utils.enumeration.IEnumKey;
|
||||
import ru.spcex.platform.utils.enumeration.IMessageResolver;
|
||||
import ru.spcex.platform.utils.enumeration.SimpleMessageResolver;
|
||||
import ru.spcex.platform.utils.log.ExceptionUtils;
|
||||
import ru.spcex.platform.utils.text.TextUtil;
|
||||
import ru.spcex.platform.utils.time.TimeUtil;
|
||||
import ru.spcex.platform.utils.validation.IValidator;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.math.RoundingMode;
|
||||
import java.time.Instant;
|
||||
import java.time.LocalDate;
|
||||
import java.util.Collection;
|
||||
import java.util.Map;
|
||||
import java.util.Optional;
|
||||
import java.util.function.Function;
|
||||
|
||||
import static ru.spcex.platform.utils.number.BigDecimalUtil.safeBD;
|
||||
|
||||
@Component
|
||||
|
|
@ -58,7 +68,8 @@ public class ExecutionFondComponent {
|
|||
private final Imdg<Listing> listingImdg;
|
||||
private final Imdg<ClientCode> clientCodeImdg;
|
||||
private final Imdg<FixedIncomeCashFlow> fixedIncomeCashFlowImdg;
|
||||
private final Imdg<ru.clearing.classes.statics.data.misc.Market> marketImdg;
|
||||
private final Imdg<Market> marketImdg;
|
||||
private final Imdg<SCrossRate> crossRateImdg;
|
||||
|
||||
//fixme ждать ТЗ
|
||||
Long tradeNum;
|
||||
|
|
@ -80,8 +91,9 @@ public class ExecutionFondComponent {
|
|||
this.executionFondImdg = imdgProvider.getImdg(IMDGDistributedNames.Map_ExecutionFond, ExecutionFond.class);
|
||||
this.listingImdg = imdgProvider.getImdg(IMDGDistributedNames.Map_Listing, Listing.class);
|
||||
this.clientCodeImdg = imdgProvider.getImdg(IMDGDistributedNames.Map_ClientCode, ClientCode.class);
|
||||
this.marketImdg = imdgProvider.getImdg(IMDGDistributedNames.Map_Market, ru.clearing.classes.statics.data.misc.Market.class);
|
||||
this.marketImdg = imdgProvider.getImdg(IMDGDistributedNames.Map_Market, Market.class);
|
||||
this.fixedIncomeCashFlowImdg = imdgProvider.getImdg(IMDGDistributedNames.Map_FixedIncomeCashFlow, FixedIncomeCashFlow.class);
|
||||
this.crossRateImdg = imdgProvider.getImdg(IMDGDistributedNames.Map_SCrossRate, SCrossRate.class);
|
||||
this.valuation = settings.getTrade().getValuation(); //fixme
|
||||
this.stradesValidator = stradesValidator;
|
||||
this.kafkaSender = kafkaSender;
|
||||
|
|
@ -196,7 +208,7 @@ public class ExecutionFondComponent {
|
|||
eFond.setTradingClearingRegistryId(rgstr.getId());
|
||||
|
||||
//todo можем ли просто переложить sTrades.getClassCode() или все такие искать, одно и тоже же
|
||||
ru.clearing.classes.statics.data.misc.Market market = marketImdg.getFirstObjectBySQL("code = '%s'".formatted(sTrades.getClassCode()));
|
||||
Market market = marketImdg.getFirstObjectBySQL("code = '%s'".formatted(sTrades.getClassCode()));
|
||||
eFond.setMarket(sTrades.getClassCode());
|
||||
|
||||
eFond.setPrice(sTrades.getPrice());
|
||||
|
|
@ -251,8 +263,25 @@ public class ExecutionFondComponent {
|
|||
nominalValue = safeBD(fixedIncome.getNominalValue());
|
||||
}
|
||||
{
|
||||
BigDecimal crossRate;
|
||||
String currency = fixedIncome.getNominalCurrency();
|
||||
if (TextUtil.isEmpty(currency) || CurrencyCode.isRub(currency)) {
|
||||
crossRate = BigDecimal.ONE;
|
||||
} else {
|
||||
ImdgPredicateBuilder crsRtpb = crossRateImdg.predicateBuilder();
|
||||
ImdgPredicate crsRtePrdct = crsRtpb.and(
|
||||
crsRtpb.equals("date", LocalDate.now()),
|
||||
crsRtpb.equals("currency", currency)
|
||||
);
|
||||
SCrossRate crsRte = crossRateImdg.getFirstObjectByPredicate(crsRtePrdct);
|
||||
if (crsRte != null) {
|
||||
crossRate = safeBD(crsRte.getUnitRate());
|
||||
} else {
|
||||
crossRate = BigDecimal.ZERO;
|
||||
}
|
||||
}
|
||||
settlementAmount = eFond.getQuantity()
|
||||
.multiply(nominalValue)
|
||||
.multiply(nominalValue.multiply(crossRate))
|
||||
.multiply(price)
|
||||
.divide(new BigDecimal(100), RoundingMode.HALF_UP)
|
||||
.setScale(2, RoundingMode.HALF_UP);
|
||||
|
|
|
|||
|
|
@ -1,5 +1,15 @@
|
|||
package ru.spcex.clearing.service.executors;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.Instant;
|
||||
import java.time.LocalDate;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.Comparator;
|
||||
import java.util.Map;
|
||||
import java.util.Optional;
|
||||
import java.util.function.Function;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Qualifier;
|
||||
|
|
@ -26,7 +36,18 @@ import ru.spcex.clearing.service.builder.RegistryBuilder;
|
|||
import ru.spcex.clearing.service.model.Result;
|
||||
import ru.spcex.clearing.service.validation.ValidationStored;
|
||||
import ru.spcex.clearing.session.stage.util.RegistryUtil;
|
||||
import ru.spcex.platform.enumeration.*;
|
||||
import ru.spcex.platform.enumeration.AccountType;
|
||||
import ru.spcex.platform.enumeration.InOutDirection;
|
||||
import ru.spcex.platform.enumeration.InOutSDfType;
|
||||
import ru.spcex.platform.enumeration.OperationStatus;
|
||||
import ru.spcex.platform.enumeration.RegistryDesignation;
|
||||
import ru.spcex.platform.enumeration.RegistryInstrumentType;
|
||||
import ru.spcex.platform.enumeration.RegistryTradingParams;
|
||||
import ru.spcex.platform.enumeration.RegistryUnit;
|
||||
import ru.spcex.platform.enumeration.SdfResult;
|
||||
import ru.spcex.platform.enumeration.Sender;
|
||||
import ru.spcex.platform.enumeration.StatementType;
|
||||
import ru.spcex.platform.enumeration.WorkflowStatus;
|
||||
import ru.spcex.platform.imdg.api.Imdg;
|
||||
import ru.spcex.platform.imdg.api.ImdgProvider;
|
||||
import ru.spcex.platform.imdg.api.predicate.ImdgPredicate;
|
||||
|
|
@ -37,13 +58,6 @@ import ru.spcex.platform.utils.enumeration.IMessageResolver;
|
|||
import ru.spcex.platform.utils.number.BigDecimalUtil;
|
||||
import ru.spcex.platform.utils.validation.IValidator;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.Instant;
|
||||
import java.time.LocalDate;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.*;
|
||||
import java.util.function.Function;
|
||||
|
||||
@Service
|
||||
public class Sdf01Executor extends AbstractExecutor<SDf01> {
|
||||
private final Logger log = LoggerFactory.getLogger(getClass());
|
||||
|
|
@ -166,6 +180,7 @@ public class Sdf01Executor extends AbstractExecutor<SDf01> {
|
|||
.company(company)
|
||||
.account(account)
|
||||
.designation(RegistryDesignation.A)
|
||||
.loadTcrForCurrency(sdf01.getCurr_code())
|
||||
.build();
|
||||
calcBalance(rgs, stmt);
|
||||
Registry registryB = copyRegB(rgs);
|
||||
|
|
@ -246,7 +261,7 @@ public class Sdf01Executor extends AbstractExecutor<SDf01> {
|
|||
stmt.setInSDfId(sdf01.getId());
|
||||
stmt.setInOutSDfType(InOutSDfType.type1.getKey());
|
||||
stmt.setClearingDate(LocalDate.now());
|
||||
Currency currency = currencyImdg.getFirstObjectByFieldValues(Map.of("currencyCode", CurrencyCode.RUB.getKey()));
|
||||
Currency currency = currencyImdg.getFirstObjectByFieldValues(Map.of("currencyCode", sdf01.getCurr_code()));
|
||||
if (currency != null) {
|
||||
stmt.setSecurityId(currency.getId());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,14 @@
|
|||
package ru.spcex.clearing.service.executors;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.Instant;
|
||||
import java.time.LocalDate;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.LinkedList;
|
||||
import java.util.Map;
|
||||
import java.util.Optional;
|
||||
import java.util.function.Function;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
|
@ -7,6 +16,7 @@ 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.company.Company;
|
||||
import ru.clearing.classes.statics.data.misc.Currency;
|
||||
import ru.clearing.classes.statics.data.registry.TradingClearingRegistry;
|
||||
import ru.clearing.classes.statics.data.sdf.SDf06;
|
||||
import ru.clearing.classes.statics.data.sdf.SDf07;
|
||||
|
|
@ -30,7 +40,11 @@ import ru.spcex.clearing.service.schedule.TradingTimeService;
|
|||
import ru.spcex.clearing.service.validation.Sdf06NewValidationRule;
|
||||
import ru.spcex.clearing.service.validation.ValidationStored;
|
||||
import ru.spcex.platform.classes.base.SpcexObjectBase;
|
||||
import ru.spcex.platform.enumeration.*;
|
||||
import ru.spcex.platform.enumeration.InOutDirection;
|
||||
import ru.spcex.platform.enumeration.InOutSDfType;
|
||||
import ru.spcex.platform.enumeration.OperationStatus;
|
||||
import ru.spcex.platform.enumeration.Sender;
|
||||
import ru.spcex.platform.enumeration.StatementType;
|
||||
import ru.spcex.platform.imdg.api.Imdg;
|
||||
import ru.spcex.platform.imdg.api.ImdgId;
|
||||
import ru.spcex.platform.imdg.api.ImdgProvider;
|
||||
|
|
@ -38,18 +52,11 @@ 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.IMessageResolver;
|
||||
import static ru.spcex.platform.utils.number.BigDecimalUtil.safeBD;
|
||||
import ru.spcex.platform.utils.text.TextUtil;
|
||||
import ru.spcex.platform.utils.validation.IValidator;
|
||||
import ru.spcex.platform.utils.validation.ValidatorImpl;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.Instant;
|
||||
import java.time.LocalDate;
|
||||
import java.util.*;
|
||||
import java.util.function.Function;
|
||||
|
||||
import static ru.spcex.platform.utils.number.BigDecimalUtil.safeBD;
|
||||
|
||||
@Service
|
||||
public class Sdf06Executor {
|
||||
private final Logger log = LoggerFactory.getLogger(getClass());
|
||||
|
|
@ -136,7 +143,7 @@ public class Sdf06Executor {
|
|||
if (needToCreateStatement(err.get())) {
|
||||
stmt = createStatementBySdf06(sDf06,
|
||||
((Company) validator.getStored(ValidationStored.Sdf06Company)).getId(),
|
||||
validator.getStored(ValidationStored.Sdf06Account));
|
||||
validator.getStored(ValidationStored.Sdf06Account), null);
|
||||
}
|
||||
errorSdf07 = createSdf07(sDf06, now, errorResult);
|
||||
errorSdf07.setGenerationId(sdf07GroupId);
|
||||
|
|
@ -151,8 +158,12 @@ public class Sdf06Executor {
|
|||
}
|
||||
Company company = validator.getStored(ValidationStored.Sdf06Company);
|
||||
TradingClearingRegistry tcr = validator.getStored(ValidationStored.Sdf06Tcr);
|
||||
Currency currency = validator.getStored(ValidationStored.currency);
|
||||
//проверка существует ли statement пока убрал
|
||||
Statement stmt = createStatementBySdf06(sDf06, company.getId(), validator.getStored(ValidationStored.Sdf06Account));
|
||||
Statement stmt = createStatementBySdf06(sDf06,
|
||||
company.getId(),
|
||||
validator.getStored(ValidationStored.Sdf06Account),
|
||||
currency.getId());
|
||||
statementImdg.insert(stmt);
|
||||
log.debug("Statement created: {}", stmt.getId());
|
||||
if (InOutDirection.out.getKey().equals(stmt.getInOutDirection()) && tradingTimeService.isTradingTime()) {
|
||||
|
|
@ -161,7 +172,7 @@ public class Sdf06Executor {
|
|||
processedApproved(stmt, sDf06, now, sdf07GroupId);
|
||||
if (tcr != null) {
|
||||
dmiService.setProcContract(tcr.getId(),
|
||||
CurrencyCode.RUB.getKey(),
|
||||
sDf06.getPay_val(),
|
||||
safeBD(sDf06.getSum()),
|
||||
sDf06.getNumber().toString());
|
||||
Optional<AssetTrio> asts = assets.searchMoneyByAccAndCompany(company.getId(), tcr.getMoneyAccountId());
|
||||
|
|
@ -274,7 +285,7 @@ public class Sdf06Executor {
|
|||
processedApproved(stmt, sdf06, updatedTime);
|
||||
Optional<TradingClearingRegistry> tcr = searchTcrOnGatewayResponse(sdf06);
|
||||
dmiService.setProcContract(tcr.map(SpcexObjectBase::getId).orElse(null),
|
||||
CurrencyCode.RUB.getKey(),
|
||||
sdf06.getPay_val(),
|
||||
safeBD(sdf06.getSum()),
|
||||
sdf06.getNumber().toString()
|
||||
);
|
||||
|
|
@ -337,10 +348,11 @@ public class Sdf06Executor {
|
|||
sDf07.setNumber(sdf06.getNumber());
|
||||
sDf07.setSpec(sdf06.getSpec());
|
||||
sDf07.setResult(result);
|
||||
sDf07.setPay_val(sdf06.getPay_val());
|
||||
return sDf07;
|
||||
}
|
||||
|
||||
private Statement createStatementBySdf06(SDf06 sdf06, Long companyId, Account account) {
|
||||
private Statement createStatementBySdf06(SDf06 sdf06, Long companyId, Account account, Long securityId) {
|
||||
Statement stmt = new Statement();
|
||||
stmt.setContract(sdf06.getNumber().toString());
|
||||
stmt.setAddresseeId(companyId);
|
||||
|
|
@ -361,20 +373,10 @@ public class Sdf06Executor {
|
|||
stmt.setInOutSDfType(InOutSDfType.type6.getKey());
|
||||
stmt.setClearingDate(LocalDate.now());
|
||||
stmt.setCreated(Instant.now());
|
||||
stmt.setSecurityId(securityId);
|
||||
return stmt;
|
||||
}
|
||||
|
||||
private AssetOperationRequest requestFromStatement(Statement stmt, String tradingCode, String tcrCode) {
|
||||
AssetOperationRequest req = new AssetOperationRequest();
|
||||
req.setEntityId(stmt.getId());
|
||||
req.setAmount(stmt.getAmount());
|
||||
req.setSecuritySymbol(CurrencyCode.RUB.getKey()); //fixme retrieve security symbol from validator
|
||||
req.setTradingCode(tradingCode);
|
||||
req.setCode(tcrCode);
|
||||
req.setDirection(stmt.getInOutDirection());
|
||||
return req;
|
||||
}
|
||||
|
||||
private Optional<TradingClearingRegistry> searchTcrOnGatewayResponse(SDf06 sdf06) {
|
||||
ImdgValidationContext<SDf06> ctx = new ImdgValidationContext<>();
|
||||
ctx.addImdg(IMDGDistributedNames.Map_Account, accImdg);
|
||||
|
|
|
|||
|
|
@ -139,19 +139,19 @@ public class Sdf08Executor extends AbstractExecutor<SDf08> {
|
|||
Company company = searchCompany(sdf08.getDepoCode()); // validator.getStored(ValidationStored.Sdf08Company);
|
||||
Long companyId = company == null ? null : company.getId(); // account == null сегда, т.к. кейс AccountNotPresent
|
||||
if (companyId == null) {
|
||||
SDf09 errSdf = createErrorSdf09(sdf08, generationIdForGroup, new EnumMessage(ClearingError.AccountNotFoundB, sdf08.getDepoCode()));
|
||||
sdf09Imdg.insert(errSdf);
|
||||
log.warn("account {} for sdf08.id={} not found. Can not send request for creation, cause company not found too", sdf08.getDepoCode(), sdf08.getId());
|
||||
} else {
|
||||
result.getAccountRequests().add(createAccountRequestPart(sdf08.getId(), sdf08.getDepoCode(), companyId));
|
||||
log.info("account {} for sdf08.id={} not found - send request for creation", sdf08.getDepoCode(), sdf08.getId());
|
||||
}
|
||||
continue;
|
||||
} else if (ClearingErrorInternal.AccountNotPresent.equals(error.map(EnumMessage::getSubject).orElse(null))) {
|
||||
log.error("fatal error: resumed processing after generating accounts, but no account found for sdf01.id={}", sdf08.getId());
|
||||
}
|
||||
if (error.isPresent() && !ClearingError.SecurityNotFound.equals(error.get().getSubject())) {
|
||||
log.error("sdf01.id={} error: {}", sdf08.getId(), messageResolver.resolve(error.get()));
|
||||
//fixme инициировать = команда для другого сервиса? sdf02Imdg.insert(createErrorSdf02(sdf01, error.get(), generationIdForGroup));
|
||||
// sdf02Imdg.insert(createErrorSdf02(sdf01, error.get(), generationIdForGroup));
|
||||
SDf09 errSdf = createErrorSdf09(sdf08, generationIdForGroup, error.get());
|
||||
sdf09Imdg.insert(errSdf);
|
||||
continue;
|
||||
}
|
||||
stmt = createSdf08Statement(sdf08, account);
|
||||
|
|
@ -198,6 +198,8 @@ public class Sdf08Executor extends AbstractExecutor<SDf08> {
|
|||
} else {
|
||||
stmt.setErrorCodeId(error.get().getSubject().getId()); // fixme ErrorText insert
|
||||
stmt.setOperationStatus(OperationStatus.Rejected.getKey());
|
||||
sdf09New.setResult("");
|
||||
sdf09Imdg.update(sdf09New);
|
||||
statementImdg.update(stmt);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
|
|
@ -302,6 +304,19 @@ public class Sdf08Executor extends AbstractExecutor<SDf08> {
|
|||
return sDf09;
|
||||
}
|
||||
|
||||
private SDf09 createErrorSdf09(SDf08 sdf08, Long generationIdForGroup, EnumMessage err) {
|
||||
SDf09 sDf09 = new SDf09();
|
||||
sDf09.setInDocument(sdf08.getOutDocument());
|
||||
sDf09.setDepoCode(sdf08.getDepoCode());
|
||||
sDf09.setQuantity(sdf08.getQuantity());
|
||||
sDf09.setSecurityCode(sdf08.getSecurityCode());
|
||||
sDf09.setClientName(sdf08.getClientName());
|
||||
sDf09.setGenerationId(generationIdForGroup);
|
||||
sDf09.setGenerationTime(Instant.now());
|
||||
sDf09.setResult("");
|
||||
return sDf09;
|
||||
}
|
||||
|
||||
private Registry createRegistryByStatement(Statement statement, Company company, Account account) {
|
||||
Registry rgs = new Registry();
|
||||
rgs.setCompanyId(statement.getAddresseeId());
|
||||
|
|
|
|||
|
|
@ -1,5 +1,12 @@
|
|||
package ru.spcex.clearing.service.executors;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.Instant;
|
||||
import java.time.LocalDate;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.Optional;
|
||||
import java.util.function.Function;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
|
@ -10,6 +17,7 @@ import ru.clearing.classes.statics.data.company.Company;
|
|||
import ru.clearing.classes.statics.data.registry.Registry;
|
||||
import ru.clearing.classes.statics.data.registry.TradingClearingRegistry;
|
||||
import ru.clearing.classes.statics.data.sdf.SDf20;
|
||||
import ru.clearing.classes.statics.data.sdf.SDf21;
|
||||
import ru.clearing.classes.statics.data.security.Security;
|
||||
import ru.clearing.classes.statics.data.statement.Statement;
|
||||
import ru.spcex.clearing.imdg.IMDGDistributedNames;
|
||||
|
|
@ -24,28 +32,29 @@ import ru.spcex.clearing.service.registry.AssetTBFProcessing;
|
|||
import ru.spcex.clearing.service.registry.RegistryManager;
|
||||
import ru.spcex.clearing.service.validation.ValidationStored;
|
||||
import ru.spcex.clearing.session.stage.util.RegistryUtil;
|
||||
import ru.spcex.platform.enumeration.*;
|
||||
import ru.spcex.platform.enumeration.InOutDirection;
|
||||
import ru.spcex.platform.enumeration.InOutSDfType;
|
||||
import ru.spcex.platform.enumeration.OperationCode;
|
||||
import ru.spcex.platform.enumeration.OperationStatus;
|
||||
import ru.spcex.platform.enumeration.RegistryDesignation;
|
||||
import ru.spcex.platform.enumeration.RegistryStatus;
|
||||
import ru.spcex.platform.enumeration.RegistryUnit;
|
||||
import ru.spcex.platform.enumeration.Sender;
|
||||
import ru.spcex.platform.enumeration.StatementType;
|
||||
import ru.spcex.platform.imdg.api.Imdg;
|
||||
import ru.spcex.platform.imdg.api.ImdgProvider;
|
||||
import ru.spcex.platform.imdg.api.predicate.ImdgPredicateBuilder;
|
||||
import ru.spcex.platform.utils.enumeration.EnumMessage;
|
||||
import ru.spcex.platform.utils.enumeration.IMessageResolver;
|
||||
import ru.spcex.platform.utils.number.BigDecimalUtil;
|
||||
import ru.spcex.platform.utils.validation.IValidator;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.Instant;
|
||||
import java.time.LocalDate;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.Optional;
|
||||
import java.util.function.Function;
|
||||
|
||||
import static ru.spcex.platform.utils.number.BigDecimalUtil.safeBD;
|
||||
|
||||
@Service
|
||||
public class Sdf20Executor {
|
||||
private final Logger log = LoggerFactory.getLogger(getClass());
|
||||
private final Imdg<SDf20> sDf20Imdg;
|
||||
private final Imdg<SDf21> sDf21Imdg;
|
||||
private final Imdg<Registry> rgsImdg;
|
||||
private final Imdg<Statement> stmtImdg;
|
||||
private final Function<SDf20, IValidator> validation;
|
||||
|
|
@ -62,6 +71,7 @@ public class Sdf20Executor {
|
|||
this.sDf20Imdg = imdgProvider.getImdg(IMDGDistributedNames.Map_SDf20, SDf20.class);
|
||||
this.rgsImdg = imdgProvider.getImdg(IMDGDistributedNames.Map_Registry, Registry.class);
|
||||
this.stmtImdg = imdgProvider.getImdg(IMDGDistributedNames.Map_Statement, Statement.class);
|
||||
this.sDf21Imdg = imdgProvider.getImdg(IMDGDistributedNames.Map_SDf21, SDf21.class);
|
||||
this.validation = validation;
|
||||
this.msgRslv = msgRslv;
|
||||
this.kafka = kafka;
|
||||
|
|
@ -134,27 +144,39 @@ public class Sdf20Executor {
|
|||
ds_i.setContract(sDf20.getInDocument());
|
||||
ds_i.setRegistryStatus(RegistryStatus.OK.getKey());
|
||||
ds_i.setUpdated(now);
|
||||
as_t.setBalance(safeBD(as_t.getBalance()).add(quantity));
|
||||
if (direction.equals(InOutDirection.in)) {
|
||||
as_t.setCredit(safeBD(as_t.getCredit()).add(quantity.abs()));
|
||||
} else {
|
||||
as_t.setDebit(safeBD(as_t.getDebit()).add(quantity.abs()));
|
||||
}
|
||||
as_t.setCheckBalance(BigDecimalUtil.parseLeadingZeroes(sDf20.getCloseBalance()));
|
||||
as_t.setUpdated(now);
|
||||
rgsImdg.update(as_t);
|
||||
rgsImdg.update(ds_i);
|
||||
assetsMng.process(assets.a__b(), assets.a__t(), assets.a__f(), BigDecimal.ZERO);
|
||||
ImdgPredicateBuilder pb = sDf21Imdg.predicateBuilder();
|
||||
SDf21 sdf21 = sDf21Imdg.getFirstObjectByPredicate(
|
||||
pb.equals("transactionNumber", sDf20.getTransactionNumber())
|
||||
);
|
||||
if (sdf21 == null) {
|
||||
as_t.setBalance(safeBD(as_t.getBalance()).add(quantity));
|
||||
if (direction.equals(InOutDirection.in)) {
|
||||
as_t.setCredit(safeBD(as_t.getCredit()).add(quantity.abs()));
|
||||
} else {
|
||||
as_t.setDebit(safeBD(as_t.getDebit()).add(quantity.abs()));
|
||||
}
|
||||
as_t.setCheckBalance(BigDecimalUtil.parseLeadingZeroes(sDf20.getCloseBalance()));
|
||||
as_t.setUpdated(now);
|
||||
rgsImdg.update(as_t);
|
||||
assetsMng.process(assets.a__b(), assets.a__t(), assets.a__f(), BigDecimal.ZERO);
|
||||
|
||||
//statement recfree in
|
||||
//statement delfree out
|
||||
Statement statement = createStatement(cmp.getId(), acc, quantity, sDf20.getId(), sDf20.getTransactionNumber(), security.getId());
|
||||
stmtImdg.insert(statement);
|
||||
log.debug("sdf20.id={}, processing as_t.id={}, as_f.id={}, as_b.id={}, ds_t.id={}. statement.id={}",
|
||||
//statement recfree in
|
||||
//statement delfree out
|
||||
Statement statement = createStatement(cmp.getId(), acc, quantity, sDf20.getId(), sDf20.getTransactionNumber(), security.getId());
|
||||
stmtImdg.insert(statement);
|
||||
log.debug("sdf20.id={}, processing as_t.id={}, as_f.id={}, as_b.id={}, ds_t.id={}. statement.id={}",
|
||||
sDf20.getId(),
|
||||
assets.a__t().getId(), assets.a__f().getId(), assets.a__b().getId(),
|
||||
ds_i.getId(),
|
||||
statement.getId());
|
||||
} else {
|
||||
log.debug("sdf20.id={}, found sdf21.id={} by transactionNumber={}. skipping to gateway request",
|
||||
sDf20.getId(),
|
||||
sdf21.getId(),
|
||||
sDf20.getTransactionNumber());
|
||||
assetsMng.process(assets.a__b(), assets.a__t(), assets.a__f(), BigDecimal.ZERO);
|
||||
}
|
||||
//только при зачислении на 20 и 21 идет запрос в gateway в Торговую систему
|
||||
if (InOutDirection.in.equals(direction)) {
|
||||
Collection<AssetOperationRequest> requests = new ArrayList<>();
|
||||
|
|
|
|||
|
|
@ -1,5 +1,19 @@
|
|||
package ru.spcex.clearing.service.executors;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.Instant;
|
||||
import java.time.LocalDate;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.Collection;
|
||||
import java.util.Comparator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Optional;
|
||||
import java.util.concurrent.atomic.AtomicReference;
|
||||
import java.util.function.Consumer;
|
||||
import java.util.function.Function;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
|
@ -39,7 +53,30 @@ import ru.spcex.clearing.service.schedule.TradingTimeService;
|
|||
import ru.spcex.clearing.service.validation.ValidationStored;
|
||||
import ru.spcex.clearing.session.stage.util.RegistryUtil;
|
||||
import ru.spcex.platform.classes.base.SpcexObjectBase;
|
||||
import ru.spcex.platform.enumeration.*;
|
||||
import ru.spcex.platform.enumeration.AccountType;
|
||||
import ru.spcex.platform.enumeration.BalanceDimension;
|
||||
import ru.spcex.platform.enumeration.CurrencyCode;
|
||||
import ru.spcex.platform.enumeration.InOutDirection;
|
||||
import ru.spcex.platform.enumeration.InOutSDfType;
|
||||
import ru.spcex.platform.enumeration.ObjectType;
|
||||
import ru.spcex.platform.enumeration.OperationStatus;
|
||||
import ru.spcex.platform.enumeration.Priority;
|
||||
import ru.spcex.platform.enumeration.RegistryCapacity;
|
||||
import ru.spcex.platform.enumeration.RegistryDesignation;
|
||||
import ru.spcex.platform.enumeration.RegistryInstrumentType;
|
||||
import ru.spcex.platform.enumeration.RegistryStatus;
|
||||
import ru.spcex.platform.enumeration.RegistryTradingParams;
|
||||
import static ru.spcex.platform.enumeration.RegistryTradingParams.D__V;
|
||||
import static ru.spcex.platform.enumeration.RegistryTradingParams.OM_T;
|
||||
import ru.spcex.platform.enumeration.RegistryUnit;
|
||||
import ru.spcex.platform.enumeration.Section;
|
||||
import ru.spcex.platform.enumeration.Sender;
|
||||
import ru.spcex.platform.enumeration.SessionStatus;
|
||||
import ru.spcex.platform.enumeration.SessionType;
|
||||
import ru.spcex.platform.enumeration.SpecifFlag;
|
||||
import ru.spcex.platform.enumeration.StatementType;
|
||||
import ru.spcex.platform.enumeration.Task;
|
||||
import ru.spcex.platform.enumeration.WorkflowStatus;
|
||||
import ru.spcex.platform.imdg.api.Imdg;
|
||||
import ru.spcex.platform.imdg.api.ImdgProvider;
|
||||
import ru.spcex.platform.imdg.api.predicate.ImdgPredicate;
|
||||
|
|
@ -49,27 +86,11 @@ 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.log.ExceptionUtils;
|
||||
import ru.spcex.platform.utils.number.BigDecimalUtil;
|
||||
import static ru.spcex.platform.utils.number.BigDecimalUtil.safeBD;
|
||||
import ru.spcex.platform.utils.text.TextUtil;
|
||||
import ru.spcex.platform.utils.validation.IValidator;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.Instant;
|
||||
import java.time.LocalDate;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Optional;
|
||||
import java.util.concurrent.atomic.AtomicReference;
|
||||
import java.util.function.Consumer;
|
||||
import java.util.function.Function;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import static ru.spcex.platform.enumeration.RegistryTradingParams.D__V;
|
||||
import static ru.spcex.platform.enumeration.RegistryTradingParams.OM_T;
|
||||
import static ru.spcex.platform.utils.number.BigDecimalUtil.safeBD;
|
||||
|
||||
@Service
|
||||
public class Sdf57Executor extends AbstractExecutor<SDf57> {
|
||||
private final Logger log = LoggerFactory.getLogger(getClass());
|
||||
|
|
@ -172,6 +193,7 @@ public class Sdf57Executor extends AbstractExecutor<SDf57> {
|
|||
boolean sessionIsPresent = sessionImdg.getFirstObjectByFieldValues(Map.of(
|
||||
"workflowStatus", SessionStatus.ACTV.getKey()
|
||||
)) != null;
|
||||
sdf = sdf.stream().sorted(Comparator.comparing(SpcexObjectBase::getId)).toList();
|
||||
for (SDf57 sdf57 : sdf) {
|
||||
IValidator validator = sDf57Validator.apply(sdf57);
|
||||
Optional<EnumMessage> error = validator.tillFirstError();
|
||||
|
|
@ -222,7 +244,7 @@ public class Sdf57Executor extends AbstractExecutor<SDf57> {
|
|||
.find();
|
||||
AssetTrio asts = amtFound.map(rgs -> {
|
||||
log.debug("stmt.id={}, found AM*T.id={}, updating...", stmt.getId(), rgs.getId());
|
||||
updateReg(stmt, rgs);
|
||||
updateReg(stmt, rgs, sdf57);
|
||||
//добавил создание если не найдены
|
||||
Registry registryUnitB = findRegByUnit(company.getId(), account.getId(), stmt.getContract(), rgs, RegistryUnit.B).orElse(copyRegB(rgs));
|
||||
Registry registryUnitF = findRegByUnit(company.getId(), account.getId(), stmt.getContract(), rgs, RegistryUnit.F).orElse(copyRegF(rgs)); //передаю null т.к. отнимется ниже по коду
|
||||
|
|
@ -256,9 +278,10 @@ public class Sdf57Executor extends AbstractExecutor<SDf57> {
|
|||
.statement(stmt)
|
||||
.company(company)
|
||||
.account(account)
|
||||
.loadTcrForCurrency(sdf57.getPay_val())
|
||||
.designation(RegistryDesignation.A)
|
||||
.build();
|
||||
calcBalance(registry, stmt);
|
||||
calcBalance(registry, stmt, sdf57);
|
||||
Registry registryB = copyRegB(registry);
|
||||
Registry registryF = copyRegF(registry);
|
||||
|
||||
|
|
@ -327,7 +350,7 @@ public class Sdf57Executor extends AbstractExecutor<SDf57> {
|
|||
om_t.getId(),
|
||||
registryD.getId());
|
||||
sessionIsNeededFlag.set(true);
|
||||
} else if (tm_tFound.isPresent()) {
|
||||
} else if (tm_tFound.isPresent() && safeBD(stmt.getAmount()).compareTo(safeBD(tm_tFound.get().getBalance())) == 0) {
|
||||
Optional<Registry> dm_xFound = RegistrySearch.builder(registryImdg)
|
||||
.rgsCode(RegistryTradingParams.DM_X)
|
||||
.companyId(company.getId())
|
||||
|
|
@ -357,6 +380,12 @@ public class Sdf57Executor extends AbstractExecutor<SDf57> {
|
|||
dm_x.getId());
|
||||
sessionIsNeededFlag.set(true);
|
||||
}
|
||||
} else if (tm_tFound.isPresent()) {
|
||||
log.debug("skipping DM_X creation for stmt.id={} contract {}; " +
|
||||
"TM_T.id={} TM_T.balance[{}] != Statement.amount[{}]",
|
||||
stmt.getId(), stmt.getContract(),
|
||||
tm_tFound.get().getId(), tm_tFound.get().getBalance(), stmt.getAmount()
|
||||
);
|
||||
}
|
||||
}
|
||||
stmt.setOperationStatus(OperationStatus.Executed.getKey());
|
||||
|
|
@ -390,7 +419,7 @@ public class Sdf57Executor extends AbstractExecutor<SDf57> {
|
|||
Account acc = stmtCmpAcc.account();
|
||||
Optional<AssetTrio> asts = createRegistryIfNeeded.apply(stmtCmpAcc);
|
||||
if (accountIsAnlt(acc)) {
|
||||
AnltSearcher.AnltSearch searchResult = anltSearcher.loadByAnlt(stmt.getComment());
|
||||
AnltSearcher.AnltSearch searchResult = anltSearcher.loadByAnlt(stmt.getComment(), sdf57.getPay_val());
|
||||
if (searchResult.isFound()) {
|
||||
log.debug("stmt.id={} comment={} is anlt, loaded account.id={}/companyId={}",
|
||||
stmt.getId(),
|
||||
|
|
@ -536,7 +565,7 @@ public class Sdf57Executor extends AbstractExecutor<SDf57> {
|
|||
statement.setComment(sdf57.getSpecif());
|
||||
statement.setAccountId(accountDeb.getId());
|
||||
|
||||
Currency currency = currencyImdg.getFirstObjectByFieldValues(Map.of("currencyCode", "RUB"));
|
||||
Currency currency = currencyImdg.getFirstObjectByFieldValues(Map.of("currencyCode", sdf57.getPay_val()));
|
||||
if (currency != null) {
|
||||
statement.setSecurityId(currency.getId());
|
||||
}
|
||||
|
|
@ -553,7 +582,8 @@ public class Sdf57Executor extends AbstractExecutor<SDf57> {
|
|||
return statement;
|
||||
}
|
||||
|
||||
private void calcBalance(Registry rgs, Statement statement) {
|
||||
private void calcBalance(Registry rgs, Statement statement, SDf57 sdf57) {
|
||||
BigDecimal expectedBalance = checkBalanceSendNotification(rgs, sdf57);
|
||||
InOutDirection inOutDirection = IEnumKey.getEnumByKey(InOutDirection.class, statement.getInOutDirection());
|
||||
//считаю balance при создании нулевым и исхожу из этого
|
||||
//При добавлении (на базе изменения statement по sDf57):
|
||||
|
|
@ -574,12 +604,32 @@ public class Sdf57Executor extends AbstractExecutor<SDf57> {
|
|||
}
|
||||
AccountType accType = IEnumKey.getEnumByKey(AccountType.class, rgs.getAccountType());
|
||||
if (!AccountType.Info.equals(accType)) {
|
||||
rgs.setCheckBalance(expectedBalance);
|
||||
rgs.setDiffBalance(safeBD(rgs.getBalance()).subtract(safeBD(rgs.getCheckBalance())));
|
||||
}
|
||||
rgs.setBalanceDimension(BalanceDimension.MONY.getKey()); //fixme ! смотри описание и ссылка на начало html'ки
|
||||
}
|
||||
|
||||
private void updateReg(Statement s, Registry r) {
|
||||
private BigDecimal checkBalanceSendNotification(Registry r, SDf57 sdf57) {
|
||||
AccountType accType = IEnumKey.getEnumByKey(AccountType.class, r.getAccountType());
|
||||
BigDecimal expectedBalance = BigDecimalUtil.safeSumBD(
|
||||
BigDecimalUtil.parse(sdf57.getKt_in()),
|
||||
BigDecimalUtil.parse(sdf57.getDt_in()));
|
||||
if (!AccountType.Info.equals(accType)) {
|
||||
if (safeBD(r.getBalance()).compareTo(expectedBalance) != 0) {
|
||||
notification.sendNotification(
|
||||
ObjectType.session,
|
||||
messageResolver.resolve(ClearingError.Sdf57UnexpectedBalance, sdf57.getId(), r.getId()),
|
||||
Priority.HIGH);
|
||||
}
|
||||
}
|
||||
return BigDecimalUtil.safeSumBD(
|
||||
BigDecimalUtil.parse(sdf57.getKt_out()),
|
||||
BigDecimalUtil.parse(sdf57.getDt_out()));
|
||||
}
|
||||
|
||||
private void updateReg(Statement s, Registry r, SDf57 sdf57) {
|
||||
BigDecimal expectedBalance = checkBalanceSendNotification(r, sdf57);
|
||||
InOutDirection direction = IEnumKey.getEnumByKey(InOutDirection.class, s.getInOutDirection());
|
||||
switch (direction) {
|
||||
case in -> {
|
||||
|
|
@ -593,6 +643,7 @@ public class Sdf57Executor extends AbstractExecutor<SDf57> {
|
|||
}
|
||||
AccountType accType = IEnumKey.getEnumByKey(AccountType.class, r.getAccountType());
|
||||
if (!AccountType.Info.equals(accType)) {
|
||||
r.setCheckBalance(expectedBalance);
|
||||
r.setDiffBalance(safeBD(r.getBalance()).subtract(safeBD(r.getCheckBalance())));
|
||||
}
|
||||
r.setUpdated(Instant.now());
|
||||
|
|
|
|||
|
|
@ -1,5 +1,8 @@
|
|||
package ru.spcex.clearing.service.registry;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.Instant;
|
||||
import java.util.Optional;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
|
@ -8,7 +11,12 @@ import ru.clearing.classes.statics.data.sdf.SDf57;
|
|||
import ru.clearing.classes.statics.data.statement.Statement;
|
||||
import ru.spcex.clearing.imdg.IMDGDistributedNames;
|
||||
import ru.spcex.clearing.session.stage.util.RegistryUtil;
|
||||
import ru.spcex.platform.enumeration.*;
|
||||
import ru.spcex.platform.enumeration.InOutSDfType;
|
||||
import ru.spcex.platform.enumeration.OperationStatus;
|
||||
import ru.spcex.platform.enumeration.RegistryDesignation;
|
||||
import ru.spcex.platform.enumeration.RegistryStatus;
|
||||
import ru.spcex.platform.enumeration.RegistryTradingParams;
|
||||
import ru.spcex.platform.enumeration.RegistryUnit;
|
||||
import ru.spcex.platform.imdg.api.Imdg;
|
||||
import ru.spcex.platform.imdg.api.ImdgProvider;
|
||||
import ru.spcex.platform.imdg.api.predicate.ImdgPredicate;
|
||||
|
|
@ -17,10 +25,6 @@ import ru.spcex.platform.imdg.api.predicate.specific.RegistryCodeSqlBuilder;
|
|||
import ru.spcex.platform.utils.log.ExceptionUtils;
|
||||
import ru.spcex.platform.utils.number.BigDecimalUtil;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.Instant;
|
||||
import java.util.Optional;
|
||||
|
||||
@Component
|
||||
public class DmiService {
|
||||
private final Logger log = LoggerFactory.getLogger(getClass());
|
||||
|
|
@ -174,7 +178,7 @@ public class DmiService {
|
|||
return Optional.ofNullable(d__i);
|
||||
}
|
||||
|
||||
private Optional<Registry> createDmi(Long tcrId,
|
||||
public Optional<Registry> createDmi(Long tcrId,
|
||||
String securitySymbol,
|
||||
BigDecimal summ) {
|
||||
RegistryTradingParams rgsCde = RegistryTradingParams.AM_T;
|
||||
|
|
@ -190,6 +194,10 @@ public class DmiService {
|
|||
tcrId, securitySymbol);
|
||||
return Optional.empty();
|
||||
}
|
||||
return Optional.of(createDmi(summ, am_t));
|
||||
}
|
||||
|
||||
public Registry createDmi(BigDecimal summ, Registry am_t) {
|
||||
Registry rgsD = am_t.clone();
|
||||
RegistryManager.zeroState(rgsD);
|
||||
rgsD.setOpenBalance(BigDecimal.ZERO);
|
||||
|
|
@ -200,6 +208,6 @@ public class DmiService {
|
|||
rgsD.setBalance(summ);
|
||||
|
||||
rgsD.setRegistryStatus(RegistryStatus.PROC.getKey());
|
||||
return Optional.of(rgsD);
|
||||
return rgsD;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
package ru.spcex.clearing.service.validation;
|
||||
|
||||
public enum ClrngValidationStored {
|
||||
relation, categoryPredefined
|
||||
relation, categoryPredefined,
|
||||
|
||||
currency
|
||||
;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,35 @@
|
|||
package ru.spcex.clearing.service.validation;
|
||||
|
||||
import java.util.Optional;
|
||||
import ru.clearing.classes.statics.data.api.WithCurrency;
|
||||
import ru.clearing.classes.statics.data.misc.Currency;
|
||||
import ru.spcex.clearing.error.ClearingError;
|
||||
import ru.spcex.clearing.imdg.IMDGDistributedNames;
|
||||
import ru.spcex.platform.imdg.api.Imdg;
|
||||
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.text.TextUtil;
|
||||
import ru.spcex.platform.utils.validation.IValidationRule;
|
||||
|
||||
public class CurrencyCodeValidationRule implements IValidationRule<ImdgValidationContext<WithCurrency>> {
|
||||
public static CurrencyCodeValidationRule INSTANCE = new CurrencyCodeValidationRule();
|
||||
|
||||
@Override
|
||||
public Optional<EnumMessage> validate(ImdgValidationContext<WithCurrency> context) {
|
||||
WithCurrency obj = context.getValidatedObject();
|
||||
if (TextUtil.isEmpty(obj.currency())) {
|
||||
return of(ClearingError.CompanyDebitCheck, "null");
|
||||
}
|
||||
Imdg<Currency> curImdg = context.obtainMap(IMDGDistributedNames.Map_Currency, Currency.class);
|
||||
ImdgPredicateBuilder pb = curImdg.predicateBuilder();
|
||||
Currency currency = curImdg.getFirstObjectByPredicate(
|
||||
pb.equals("currencyCode", obj.currency())
|
||||
);
|
||||
if (currency == null) {
|
||||
return of(ClearingError.CompanyDebitCheck, obj.currency());
|
||||
}
|
||||
context.storeObject(ValidationStored.currency, currency);
|
||||
return empty();
|
||||
}
|
||||
}
|
||||
|
|
@ -3,6 +3,7 @@ package ru.spcex.clearing.service.validation;
|
|||
import ru.clearing.classes.statics.data.company.Company;
|
||||
import ru.clearing.classes.statics.data.misc.STrades;
|
||||
import ru.clearing.classes.statics.data.registry.TradingClearingRegistry;
|
||||
import ru.clearing.classes.statics.data.security.CurrencyPairSecurity;
|
||||
import ru.clearing.classes.statics.data.security.MoneyMarketSecurity;
|
||||
import ru.clearing.classes.statics.data.security.Security;
|
||||
import ru.spcex.clearing.error.ClearingError;
|
||||
|
|
@ -33,7 +34,8 @@ public enum STradesValidationRule implements IValidationRule<ImdgValidationConte
|
|||
SecuritySelector<Security> slctr = new SecuritySelector<>(
|
||||
context.obtainMap(IMDGDistributedNames.Map_FixedIncomeSecurity, Security.class),
|
||||
context.obtainMap(IMDGDistributedNames.Map_MoneyMarketSecurity, Security.class),
|
||||
context.obtainMap(IMDGDistributedNames.Map_EquitySecurity, Security.class)
|
||||
context.obtainMap(IMDGDistributedNames.Map_EquitySecurity, Security.class),
|
||||
context.obtainMap(IMDGDistributedNames.Map_CurrencyPairSecurity, Security.class)
|
||||
);
|
||||
Security security = slctr.selectSecurityBySymbol(validatedObject.getSecCode().trim());
|
||||
if (security == null) {
|
||||
|
|
@ -61,6 +63,35 @@ public enum STradesValidationRule implements IValidationRule<ImdgValidationConte
|
|||
return empty();
|
||||
}
|
||||
},
|
||||
SecurityPresentCurrencyPair() {
|
||||
@Override
|
||||
public Optional<EnumMessage> validate(ImdgValidationContext<STrades> context) {
|
||||
STrades validatedObject = context.getValidatedObject();
|
||||
if (TextUtil.isEmpty(validatedObject.getSecCode())) {
|
||||
return of(ClearingError.SecurityNotFound, validatedObject.getSecCode());
|
||||
}
|
||||
|
||||
String secCode = validatedObject.getSecCode().trim();
|
||||
SecuritySelector<Security> slctr = new SecuritySelector<>(
|
||||
context.obtainMap(IMDGDistributedNames.Map_FixedIncomeSecurity, Security.class),
|
||||
context.obtainMap(IMDGDistributedNames.Map_MoneyMarketSecurity, Security.class),
|
||||
context.obtainMap(IMDGDistributedNames.Map_EquitySecurity, Security.class),
|
||||
context.obtainMap(IMDGDistributedNames.Map_CurrencyPairSecurity, Security.class)
|
||||
);
|
||||
Security security = slctr.selectSecurityBySymbol(secCode);
|
||||
/*
|
||||
Imdg<CurrencyPairSecurity> securityImdg = context.obtainMap(IMDGDistributedNames.Map_CurrencyPairSecurity, CurrencyPairSecurity.class);
|
||||
String secCode = validatedObject.getSecCode();
|
||||
Security security = securityImdg.getFirstObjectByFieldValues(Map.of("securitySymbol", secCode));
|
||||
*/
|
||||
|
||||
if (security == null) {
|
||||
return of(ClearingError.SecurityNotFound, secCode);
|
||||
}
|
||||
context.storeObject(ValidationStored.STradesSecurity, security);
|
||||
return empty();
|
||||
}
|
||||
},
|
||||
// 2.2. Найти в company запись, у которой company.tradingCode=sTrades.firmId.
|
||||
// Если такой записи нет, записать в лог ошибку (5410) "Компания %s не найдена".
|
||||
CompanyPresent() {
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue