Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
commit
0e120a9866
66 changed files with 629 additions and 193 deletions
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<artifactId>clearing-parent</artifactId>
|
||||
<groupId>ru.spcex.clearing</groupId>
|
||||
<version>SPCEX-3.12.0.0</version>
|
||||
<version>SPCEX-3.12.2</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
|
|
|
|||
|
|
@ -302,7 +302,7 @@ public class InformationAccountService extends QueueConsumer implements Initiali
|
|||
}
|
||||
|
||||
public String generateInfoAccount(Long currencyCodeId, Long id) {
|
||||
return "%d%d%08d%d".formatted(39911, currencyCodeId, id, 7000);
|
||||
return "%d%03d%08d%d".formatted(39911, currencyCodeId, id, 7000);
|
||||
}
|
||||
|
||||
public synchronized Long accountNextId(String currency) {
|
||||
|
|
@ -316,6 +316,7 @@ public class InformationAccountService extends QueueConsumer implements Initiali
|
|||
* @return infoCounter++
|
||||
*/
|
||||
public synchronized Long accountNextId(String currency, Long currencyCodeId) {
|
||||
String idWithTrailingZero = String.format("%03d", currencyCodeId);
|
||||
if (currency == null)
|
||||
currency = CurrencyCode.RUB.getKey(); // default
|
||||
AtomicLong infoCounter = infoCounterByCurrency.get(currency);
|
||||
|
|
@ -338,7 +339,7 @@ public class InformationAccountService extends QueueConsumer implements Initiali
|
|||
infoCounter = new AtomicLong(1);
|
||||
log.debug("No account information on map. n={}", infoCounter.get());
|
||||
} else {
|
||||
Pattern accPattern = Pattern.compile("39911%d([0-9]{8})7000".formatted(currencyCodeId));
|
||||
Pattern accPattern = Pattern.compile("39911%s([0-9]{8})7000".formatted(idWithTrailingZero));
|
||||
int maxN = 1;
|
||||
int parsedCount = 0;
|
||||
String lastAccount = null; // for debug
|
||||
|
|
|
|||
|
|
@ -49,7 +49,9 @@ 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.AccountType;
|
||||
import ru.spcex.platform.enumeration.CompanySymbol;
|
||||
import ru.spcex.platform.enumeration.CurrencyCode;
|
||||
import ru.spcex.platform.enumeration.ServiceStatus;
|
||||
import ru.spcex.platform.enumeration.Status;
|
||||
import static ru.spcex.platform.enumeration.Task.makeFiles_MTCR;
|
||||
|
|
@ -460,13 +462,13 @@ public class TradingClearingRegistryService extends QueueConsumer implements Ini
|
|||
return requestHelper.makeErrorResponse(userRequest, AccountError.WrongFieldValue, "MoneyAccountId", req.getMoneyAccountId());
|
||||
}
|
||||
if (tradingClearingRegistry.getDepoAccountId() != null && // но можно с null заменить
|
||||
req.getDepoAccountId() != null && !req.getDepoAccountId().equals(tradingClearingRegistry.getDepoAccountId())) {
|
||||
req.getDepoAccountId() != null && !req.getDepoAccountId().equals(tradingClearingRegistry.getDepoAccountId())) {
|
||||
return requestHelper.makeErrorResponse(userRequest, AccountError.WrongFieldValue, "DepoAccountId", req.getDepoAccountId());
|
||||
}
|
||||
// tradingClearingRegistry.setMoneyAccountId(req.getMoneyAccountId());
|
||||
|
||||
if (req.getStatus() != null && !Objects.equals(req.getStatus(), tradingClearingRegistry.getStatus())
|
||||
|| req.getDepoAccountId() != null && !req.getDepoAccountId().equals(tradingClearingRegistry.getDepoAccountId())
|
||||
|| req.getDepoAccountId() != null && !req.getDepoAccountId().equals(tradingClearingRegistry.getDepoAccountId())
|
||||
) {
|
||||
Instant now = Instant.now();
|
||||
tradingClearingRegistry.setUpdated(now);
|
||||
|
|
@ -586,6 +588,7 @@ public class TradingClearingRegistryService extends QueueConsumer implements Ini
|
|||
MoneyAccountMsgResponse moneyAccountMsg = new MoneyAccountMsgResponse();
|
||||
moneyAccountMsg.setAccount(moneyAccount.getAccount());
|
||||
moneyAccountMsg.setCurrCode(StringUtils.hasText(moneyAccount.getCurrency()) ? moneyAccount.getCurrency() : "RUB");
|
||||
getEksAccount(moneyAccount).ifPresent(moneyAccountMsg::setEksAccount);
|
||||
moneyAccountMsg.setActive(Status.Active.equalsByKey(moneyAccount.getStatus()));
|
||||
tkr.getMoneyAccounts().add(moneyAccountMsg);
|
||||
}
|
||||
|
|
@ -600,6 +603,7 @@ public class TradingClearingRegistryService extends QueueConsumer implements Ini
|
|||
Account additionalAcc = accountImdg.getSingleObjectByID(tkrList.getAccountId());
|
||||
MoneyAccountMsgResponse moneyAccountMsg = new MoneyAccountMsgResponse();
|
||||
moneyAccountMsg.setAccount(additionalAcc.getAccount());
|
||||
getEksAccount(additionalAcc).ifPresent(moneyAccountMsg::setEksAccount);
|
||||
moneyAccountMsg.setCurrCode(StringUtils.hasText(additionalAcc.getCurrency()) ? additionalAcc.getCurrency() : "RUB");
|
||||
moneyAccountMsg.setActive(Status.Active.equalsByKey(additionalAcc.getStatus()));
|
||||
tkr.getMoneyAccounts().add(moneyAccountMsg);
|
||||
|
|
@ -610,6 +614,22 @@ public class TradingClearingRegistryService extends QueueConsumer implements Ini
|
|||
return Optional.empty();
|
||||
}
|
||||
|
||||
private Optional<String> getEksAccount(Account account) {
|
||||
if (AccountType.Info.equalsByKey(account.getAccountType())) {
|
||||
String currency = StringUtils.hasText(account.getCurrency()) ? account.getCurrency() : CurrencyCode.RUB.getKey();
|
||||
Account anltAcc = accountImdg.getFirstObjectByFieldValues(
|
||||
Map.of(
|
||||
"currency", currency,
|
||||
"accountType", AccountType.Anlt.getKey()
|
||||
)
|
||||
);
|
||||
if (anltAcc != null) {
|
||||
return Optional.of(anltAcc.getAccount());
|
||||
}
|
||||
}
|
||||
return Optional.empty();
|
||||
}
|
||||
|
||||
/**
|
||||
* company-service сообщение об успешном добавлении ТКР клиента с параметром tradingClearingRegistry.code
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ public enum GatewayClientCodeValidationRule implements IValidationRule<ImdgValid
|
|||
|
||||
Imdg<Company> companyImdg = context.obtainMap(IMDGDistributedNames.Map_Company, Company.class);
|
||||
Company company = companyImdg.getFirstObjectByFieldValues(
|
||||
Map.of("trading_code", String.valueOf(tradingCode))
|
||||
Map.of("tradingCode", String.valueOf(tradingCode))
|
||||
);
|
||||
if (company == null) {
|
||||
return of(AccountError.COMPANY_NOT_FOUND_GTW, "trading_code");
|
||||
|
|
@ -62,6 +62,9 @@ public enum GatewayClientCodeValidationRule implements IValidationRule<ImdgValid
|
|||
for (MoneyAccountMsgRequest moneyAccountMsg : accountList) {
|
||||
ImdgPredicateBuilder predicateBuilder = imdg.predicateBuilder();
|
||||
ImdgPredicate currencyPredicate;
|
||||
if (!StringUtils.hasText(moneyAccountMsg.getAccount())){
|
||||
return of(AccountError.RequiredFieldEmpty, "account");
|
||||
}
|
||||
ImdgPredicate accountPredicate = predicateBuilder.equals("account", moneyAccountMsg.getAccount());
|
||||
if (moneyAccountMsg.getCurrCode().equals(CurrencyCode.RUB.getKey())) {
|
||||
currencyPredicate = predicateBuilder.or(
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
<parent>
|
||||
<artifactId>clearing-parent</artifactId>
|
||||
<groupId>ru.spcex.clearing</groupId>
|
||||
<version>SPCEX-3.12.0.0</version>
|
||||
<version>SPCEX-3.12.2</version>
|
||||
</parent>
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -237,6 +237,19 @@ public class SdfsController extends AbstractQueueController {
|
|||
return response;
|
||||
}
|
||||
|
||||
@ApiOperation(value = "get all S_DF51")
|
||||
@ApiResponses(value = {@ApiResponse(code = 200, message = "OK", response = CommonGetAllResponse.class)})
|
||||
@RequestMapping(value = "s-df51", method = RequestMethod.GET)
|
||||
@ResponseBody
|
||||
public CommonGetAllResponse getAllSdf51() {
|
||||
Collection<Map<String, Object>> all = stateLoader.getAllMetaTransform(
|
||||
IMDGDistributedNames.Map_SDf51,
|
||||
SDf51.class);
|
||||
CommonGetAllResponse response = new CommonGetAllResponse();
|
||||
response.fromEntity(all);
|
||||
return response;
|
||||
}
|
||||
|
||||
@ApiOperation(value = "get all S_DF52")
|
||||
@ApiResponses(value = {@ApiResponse(code = 200, message = "OK", response = CommonGetAllResponse.class)})
|
||||
@RequestMapping(value = "s-df52", method = RequestMethod.GET)
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<meta version="3.12.0.92">
|
||||
<meta version="3.12.1.92">
|
||||
<enums>
|
||||
<allowed id="1" code="ALWD" name="Разрешено"/>
|
||||
<allowed id="2" code="DEND" name="Запрещено"/>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
|
||||
{
|
||||
"version": "3.12.0.94",
|
||||
"version": "3.12.2.95",
|
||||
|
||||
"enums": {
|
||||
|
||||
|
|
@ -4627,6 +4627,10 @@
|
|||
{"code": "tradingClearingRegistryId",
|
||||
"type": 1,"name": "Торгово-клиринговый регистр","shortname": "Торгово-клиринговый регистр","link": "tradingClearingRegistry","linkCode": "code","required": true
|
||||
}
|
||||
,
|
||||
{"code": "securitySymbol",
|
||||
"type": 2,"length": 255,"dbname": "Код инструмента","name": "Наименование инструмента/валюты","shortname": "Инструмент/валюта","searchable": false,"sortable": false,"visible": false
|
||||
}
|
||||
]
|
||||
}
|
||||
,
|
||||
|
|
|
|||
|
|
@ -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.12.0.94">
|
||||
<meta version="3.12.2.95">
|
||||
<!-- _xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" _xsi:noNamespaceSchemaLocation="file:///E:/d/projects/meta/from/meta.xsd" -->
|
||||
<!--Здесь словари-->
|
||||
<enums>
|
||||
|
|
@ -1074,6 +1074,7 @@
|
|||
<balance type="10" name="Сумма" shortname="Сумма" required="true"/>
|
||||
<companyId type="1" name="Наименование компании" shortname="Компания" link="company" linkCode="shortName" required="true"/>
|
||||
<tradingClearingRegistryId type="1" name="Торгово-клиринговый регистр" shortname="Торгово-клиринговый регистр" link="tradingClearingRegistry" linkCode="code" required="true"/>
|
||||
<securitySymbol type="2" length="255" dbname="Код инструмента" name="Наименование инструмента/валюты" shortname="Инструмент/валюта" searchable="false" sortable="false" visible="false"/>
|
||||
</post>
|
||||
<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"/>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
|
||||
{
|
||||
"version": "3.12.0.94",
|
||||
"version": "3.12.2.95",
|
||||
|
||||
"enums": {
|
||||
|
||||
|
|
@ -4627,6 +4627,10 @@
|
|||
{"code": "tradingClearingRegistryId",
|
||||
"type": 1,"name": "Торгово-клиринговый регистр","shortname": "Торгово-клиринговый регистр","link": "tradingClearingRegistry","linkCode": "code","required": true
|
||||
}
|
||||
,
|
||||
{"code": "securitySymbol",
|
||||
"type": 2,"length": 255,"dbname": "Код инструмента","name": "Наименование инструмента/валюты","shortname": "Инструмент/валюта","searchable": false,"sortable": false,"visible": false
|
||||
}
|
||||
]
|
||||
}
|
||||
,
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<artifactId>clearing-parent</artifactId>
|
||||
<groupId>ru.spcex.clearing</groupId>
|
||||
<version>SPCEX-3.12.0.0</version>
|
||||
<version>SPCEX-3.12.2</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@
|
|||
<parent>
|
||||
<artifactId>clearing-parent</artifactId>
|
||||
<groupId>ru.spcex.clearing</groupId>
|
||||
<version>SPCEX-3.12.0.0</version>
|
||||
<version>SPCEX-3.12.2</version>
|
||||
</parent>
|
||||
|
||||
<properties>
|
||||
|
|
|
|||
|
|
@ -6,13 +6,13 @@
|
|||
<parent>
|
||||
<groupId>ru.spcex.clearing</groupId>
|
||||
<artifactId>clearing-parent</artifactId>
|
||||
<version>SPCEX-3.12.0.0</version>
|
||||
<version>SPCEX-3.12.2</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>cleaning-builders</artifactId>
|
||||
<name>cleaning-builders</name>
|
||||
<description>Cleaning builders module</description>
|
||||
<version>SPCEX-3.12.0.0</version>
|
||||
<version>SPCEX-3.12.2</version>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
|
||||
|
|
@ -26,7 +26,7 @@
|
|||
<dependency>
|
||||
<groupId>ru.spcex.clearing</groupId>
|
||||
<artifactId>classes</artifactId>
|
||||
<version>SPCEX-3.12.0.0</version>
|
||||
<version>SPCEX-3.12.2</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<artifactId>clearing-parent</artifactId>
|
||||
<groupId>ru.spcex.clearing</groupId>
|
||||
<version>SPCEX-3.12.0.0</version>
|
||||
<version>SPCEX-3.12.2</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
|
|
|
|||
|
|
@ -8,12 +8,12 @@
|
|||
<name>clearing-validation</name>
|
||||
<description>Clearing-module, dependency version of platform-utils</description>
|
||||
<packaging>jar</packaging>
|
||||
<version>SPCEX-3.12.0.0</version>
|
||||
<version>SPCEX-3.12.2</version>
|
||||
|
||||
<parent>
|
||||
<artifactId>clearing-parent</artifactId>
|
||||
<groupId>ru.spcex.clearing</groupId>
|
||||
<version>SPCEX-3.12.0.0</version>
|
||||
<version>SPCEX-3.12.2</version>
|
||||
</parent>
|
||||
|
||||
<properties>
|
||||
|
|
@ -35,13 +35,13 @@
|
|||
<dependency>
|
||||
<groupId>ru.spcex.clearing</groupId>
|
||||
<artifactId>classes</artifactId>
|
||||
<version>SPCEX-3.12.0.0</version>
|
||||
<version>SPCEX-3.12.2</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>ru.spcex.clearing</groupId>
|
||||
<artifactId>dictionary</artifactId>
|
||||
<version>SPCEX-3.12.0.0</version>
|
||||
<version>SPCEX-3.12.2</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<artifactId>clearing-parent</artifactId>
|
||||
<groupId>ru.spcex.clearing</groupId>
|
||||
<version>SPCEX-3.12.0.0</version>
|
||||
<version>SPCEX-3.12.2</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
|
|
|
|||
|
|
@ -7,12 +7,12 @@
|
|||
<artifactId>db-scripts</artifactId>
|
||||
<name>db-scripts</name>
|
||||
<description>db-scripts for PostgreSQL</description>
|
||||
<version>SPCEX-3.12.0.0</version>
|
||||
<version>SPCEX-3.12.2</version>
|
||||
|
||||
<parent>
|
||||
<artifactId>clearing-parent</artifactId>
|
||||
<groupId>ru.spcex.clearing</groupId>
|
||||
<version>SPCEX-3.12.0.0</version>
|
||||
<version>SPCEX-3.12.2</version>
|
||||
</parent>
|
||||
|
||||
<build>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
-- DB version: 3.12
|
||||
-- DATA version: 3.12.0.92
|
||||
-- DATA version: 3.12.2.93
|
||||
|
||||
|
||||
/* Dictionaries */
|
||||
|
|
@ -196,6 +196,14 @@ INSERT INTO CURRENCY_CODE_DICTIONARY(ID, CODE, NAME) values (978, 'EUR', 'Евр
|
|||
|
||||
INSERT INTO CURRENCY_CODE_DICTIONARY(ID, CODE, NAME) values (156, 'CNY', 'Китайский Юань') ON CONFLICT (ID) DO UPDATE SET CODE = EXCLUDED.CODE, NAME = EXCLUDED.NAME;
|
||||
|
||||
INSERT INTO CURRENCY_CODE_DICTIONARY(ID, CODE, NAME) values (398, 'KZT', 'Тенге') ON CONFLICT (ID) DO UPDATE SET CODE = EXCLUDED.CODE, NAME = EXCLUDED.NAME;
|
||||
|
||||
INSERT INTO CURRENCY_CODE_DICTIONARY(ID, CODE, NAME) values (51, 'AMD', 'Армянский драм') ON CONFLICT (ID) DO UPDATE SET CODE = EXCLUDED.CODE, NAME = EXCLUDED.NAME;
|
||||
|
||||
INSERT INTO CURRENCY_CODE_DICTIONARY(ID, CODE, NAME) values (417, 'KGS', 'Com') ON CONFLICT (ID) DO UPDATE SET CODE = EXCLUDED.CODE, NAME = EXCLUDED.NAME;
|
||||
|
||||
INSERT INTO CURRENCY_CODE_DICTIONARY(ID, CODE, NAME) values (933, 'BYN', 'Белорусский рубль') ON CONFLICT (ID) DO UPDATE SET CODE = EXCLUDED.CODE, NAME = EXCLUDED.NAME;
|
||||
|
||||
INSERT INTO CURRENCY_PAIR_DICTIONARY(ID, CODE, BASE_CURRENCY, QUOTE_CURRENCY, MAJOR_SIGN) values (1, 'EUR/RUB', 'EUR', 'RUB', 'CONV') ON CONFLICT (ID) DO UPDATE SET CODE = EXCLUDED.CODE, BASE_CURRENCY = EXCLUDED.BASE_CURRENCY, QUOTE_CURRENCY = EXCLUDED.QUOTE_CURRENCY, MAJOR_SIGN = EXCLUDED.MAJOR_SIGN;
|
||||
|
||||
INSERT INTO CURRENCY_PAIR_DICTIONARY(ID, CODE, BASE_CURRENCY, QUOTE_CURRENCY, MAJOR_SIGN) values (2, 'USD/RUB', 'USD', 'RUB', 'CONV') ON CONFLICT (ID) DO UPDATE SET CODE = EXCLUDED.CODE, BASE_CURRENCY = EXCLUDED.BASE_CURRENCY, QUOTE_CURRENCY = EXCLUDED.QUOTE_CURRENCY, MAJOR_SIGN = EXCLUDED.MAJOR_SIGN;
|
||||
|
|
|
|||
|
|
@ -7,12 +7,12 @@
|
|||
<artifactId>dbf-exporter</artifactId>
|
||||
<name>dbf-exporter</name>
|
||||
<description>DBF exporter for DBF files</description>
|
||||
<version>SPCEX-3.12.0.0</version>
|
||||
<version>SPCEX-3.12.2</version>
|
||||
|
||||
<parent>
|
||||
<artifactId>clearing-parent</artifactId>
|
||||
<groupId>ru.spcex.clearing</groupId>
|
||||
<version>SPCEX-3.12.0.0</version>
|
||||
<version>SPCEX-3.12.2</version>
|
||||
</parent>
|
||||
|
||||
<dependencies>
|
||||
|
|
|
|||
|
|
@ -47,6 +47,8 @@ public class PrepareDBFFile extends Stage implements InitializingBean {
|
|||
List<SftpFileInfo> files = new ArrayList<>();
|
||||
log.trace("Get files from SFTP paths: {}", settings.getStore().getOutPayValDir().values());
|
||||
for (String path : settings.getStore().getOutPayValDir().values()) {
|
||||
if (!path.endsWith("/")) // без "/" на конце папки пишет ошибку: Caused by: com.jcraft.jsch.SftpException: No such file
|
||||
path += "/";
|
||||
files.addAll(gateway.listFiles(path));
|
||||
}
|
||||
log.info("There are {} files on the sFTP server in the search directories.", files.size());
|
||||
|
|
|
|||
|
|
@ -7,10 +7,10 @@ export-dbf-service.hazelcast.password=dev-pass
|
|||
export-dbf-service.common.encoding=cp866
|
||||
export-dbf-service.common.threads-count=10
|
||||
|
||||
export-dbf-service.store.local-temp-dir=D:\\docs and T3\\clearing\\dbf\\
|
||||
export-dbf-service.store.local-temp-dir=D:\\docs and T3\\clearing\\dbf
|
||||
# код валюты должен быть в верхнем регистре, например для рублей - "RUB" (*.RUB=export/rub/).RUB=export/rub/
|
||||
export-dbf-service.store.out-pay-val-dir.RUB=export/rub/
|
||||
export-dbf-service.store.out-pay-val-dir.EUR=export/eur/
|
||||
export-dbf-service.store.out-pay-val-dir.RUB=export/rub
|
||||
export-dbf-service.store.out-pay-val-dir.EUR=export/eur
|
||||
export-dbf-service.store.user:tester
|
||||
export-dbf-service.store.password=password
|
||||
export-dbf-service.store.server-ip=10.230.238.53
|
||||
|
|
|
|||
|
|
@ -8,12 +8,12 @@
|
|||
<artifactId>dbf-importer</artifactId>
|
||||
<name>dbf-importer</name>
|
||||
<description>DBF loader for DBF files</description>
|
||||
<version>SPCEX-3.12.0.0</version>
|
||||
<version>SPCEX-3.12.2</version>
|
||||
|
||||
<parent>
|
||||
<artifactId>clearing-parent</artifactId>
|
||||
<groupId>ru.spcex.clearing</groupId>
|
||||
<version>SPCEX-3.12.0.0</version>
|
||||
<version>SPCEX-3.12.2</version>
|
||||
</parent>
|
||||
|
||||
<dependencies>
|
||||
|
|
|
|||
|
|
@ -78,6 +78,8 @@ public class FileChecker {
|
|||
List<File> files = new ArrayList<>();
|
||||
log.trace("Load from SFTP paths: {}", settings.getStore().getSftpIn().getSftpSrcPayValDir().values());
|
||||
for (String path : settings.getStore().getSftpIn().getSftpSrcPayValDir().values()) {
|
||||
if (!path.endsWith("/")) // без "/" на конце папки пишет ошибку: Caused by: com.jcraft.jsch.SftpException: No such file
|
||||
path += "/";
|
||||
files.addAll(gateway.listFiles(path));
|
||||
}
|
||||
if (files.size() > 0) log.info("Loaded from SFTP files count={}", files.size());
|
||||
|
|
|
|||
|
|
@ -14,8 +14,8 @@ import-dbf-service.common.insert-batch-size=100
|
|||
import-dbf-service.common.threads-count=10
|
||||
|
||||
#sftpSrcDir
|
||||
import-dbf-service.store.sftp-in.sftp-src-pay-val-dir.rub=clearing_importer_sftp/rub/
|
||||
import-dbf-service.store.sftp-in.sftp-src-pay-val-dir.eur=clearing_importer_sftp/eur/
|
||||
import-dbf-service.store.sftp-in.sftp-src-pay-val-dir.rub=clearing_importer_sftp/rub
|
||||
import-dbf-service.store.sftp-in.sftp-src-pay-val-dir.eur=clearing_importer_sftp/eur
|
||||
import-dbf-service.store.sftp-in.sftp-src-dir=clearing_importer_sftp
|
||||
import-dbf-service.store.sftp-in.user=user
|
||||
import-dbf-service.store.sftp-in.password=*********
|
||||
|
|
|
|||
|
|
@ -8,12 +8,12 @@
|
|||
<name>Clearing dictionary</name>
|
||||
<description>Clearing dictionary</description>
|
||||
<packaging>jar</packaging>
|
||||
<version>SPCEX-3.12.0.0</version>
|
||||
<version>SPCEX-3.12.2</version>
|
||||
|
||||
<parent>
|
||||
<artifactId>clearing-parent</artifactId>
|
||||
<groupId>ru.spcex.clearing</groupId>
|
||||
<version>SPCEX-3.12.0.0</version>
|
||||
<version>SPCEX-3.12.2</version>
|
||||
</parent>
|
||||
|
||||
<properties>
|
||||
|
|
|
|||
|
|
@ -4,12 +4,12 @@
|
|||
<parent>
|
||||
<groupId>ru.spcex.clearing</groupId>
|
||||
<artifactId>clearing-parent</artifactId>
|
||||
<version>SPCEX-3.12.0.0</version>
|
||||
<version>SPCEX-3.12.2</version>
|
||||
</parent>
|
||||
<artifactId>extdb-importer</artifactId>
|
||||
<name>extdb-importer</name>
|
||||
<description>Extdb importer module. Аналог trade-importer.</description>
|
||||
<version>SPCEX-3.12.0.0</version>
|
||||
<version>SPCEX-3.12.2</version>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<properties>
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<artifactId>clearing-parent</artifactId>
|
||||
<groupId>ru.spcex.clearing</groupId>
|
||||
<version>SPCEX-3.12.0.0</version>
|
||||
<version>SPCEX-3.12.2</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
|
|
|
|||
|
|
@ -186,7 +186,7 @@ public class GatewayController {
|
|||
log.debug("Received message: {}", request);
|
||||
executor.submit(() -> {
|
||||
operationService.checkAssetsAndSendMessage(request);
|
||||
notificationService.updateGatewayResultInMap(request);
|
||||
notificationService.sendToJournal(request);
|
||||
});
|
||||
return createCommonResponse(request.getId());
|
||||
}
|
||||
|
|
@ -206,6 +206,7 @@ public class GatewayController {
|
|||
log.debug("Received message: {}", request);
|
||||
executor.submit(() -> {
|
||||
tkrService.processedTkrRequest(request);
|
||||
notificationService.sendToJournal(request);
|
||||
});
|
||||
return createCommonResponse(request.getId());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,7 @@
|
|||
package ru.spcex.clearing.gatewayapi.controller.inbound.request;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
public interface WithId {
|
||||
UUID getId();
|
||||
}
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
package ru.spcex.clearing.gatewayapi.controller.inbound.request;
|
||||
|
||||
public interface WithResult {
|
||||
Boolean getResult();
|
||||
}
|
||||
|
|
@ -1,10 +1,11 @@
|
|||
package ru.spcex.clearing.gatewayapi.controller.inbound.request.limit;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
import java.util.UUID;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import ru.spcex.clearing.gatewayapi.controller.inbound.request.WithId;
|
||||
import ru.spcex.clearing.gatewayapi.controller.inbound.request.WithResult;
|
||||
|
||||
public class LimitRequest {
|
||||
public class LimitRequest implements WithId, WithResult {
|
||||
@JsonProperty("result")
|
||||
private Boolean result;
|
||||
@JsonProperty("description")
|
||||
|
|
@ -16,6 +17,7 @@ public class LimitRequest {
|
|||
@JsonProperty("error_file")
|
||||
private String errorFile;
|
||||
|
||||
@Override
|
||||
public Boolean getResult() {
|
||||
return result;
|
||||
}
|
||||
|
|
@ -32,6 +34,7 @@ public class LimitRequest {
|
|||
this.description = description;
|
||||
}
|
||||
|
||||
@Override
|
||||
public UUID getId() {
|
||||
return id;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,10 +1,11 @@
|
|||
package ru.spcex.clearing.gatewayapi.controller.inbound.request.operations;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
import java.util.UUID;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import ru.spcex.clearing.gatewayapi.controller.inbound.request.WithId;
|
||||
import ru.spcex.clearing.gatewayapi.controller.inbound.request.WithResult;
|
||||
|
||||
public class OperationsRequest {
|
||||
public class OperationsRequest implements WithId, WithResult {
|
||||
@JsonProperty("id")
|
||||
private UUID id;
|
||||
@JsonProperty("result")
|
||||
|
|
@ -12,6 +13,7 @@ public class OperationsRequest {
|
|||
@JsonProperty("description")
|
||||
private String description;
|
||||
|
||||
@Override
|
||||
public UUID getId() {
|
||||
return id;
|
||||
}
|
||||
|
|
@ -20,6 +22,7 @@ public class OperationsRequest {
|
|||
this.id = id;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean getResult() {
|
||||
return result;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,6 +7,8 @@ public class MoneyAccount {
|
|||
private String currCode;
|
||||
@JsonProperty("account")
|
||||
private String account;
|
||||
@JsonProperty("eks_account")
|
||||
private String eksAccount;
|
||||
@JsonProperty("status")
|
||||
private String status;
|
||||
|
||||
|
|
@ -26,6 +28,14 @@ public class MoneyAccount {
|
|||
this.account = account;
|
||||
}
|
||||
|
||||
public String getEksAccount() {
|
||||
return eksAccount;
|
||||
}
|
||||
|
||||
public void setEksAccount(String eksAccount) {
|
||||
this.eksAccount = eksAccount;
|
||||
}
|
||||
|
||||
public String getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,46 @@
|
|||
package ru.spcex.clearing.gatewayapi.controller.inbound.request.tkr.request;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
public class TkrError {
|
||||
@JsonProperty("trading_code")
|
||||
private Integer tradingCode;
|
||||
@JsonProperty("client_code")
|
||||
private String clientCode;
|
||||
@JsonProperty("tkr_code")
|
||||
private String tkrCode;
|
||||
@JsonProperty("error_message")
|
||||
private String errorMessage;
|
||||
|
||||
public Integer getTradingCode() {
|
||||
return tradingCode;
|
||||
}
|
||||
|
||||
public void setTradingCode(Integer tradingCode) {
|
||||
this.tradingCode = tradingCode;
|
||||
}
|
||||
|
||||
public String getClientCode() {
|
||||
return clientCode;
|
||||
}
|
||||
|
||||
public void setClientCode(String clientCode) {
|
||||
this.clientCode = clientCode;
|
||||
}
|
||||
|
||||
public String getTkrCode() {
|
||||
return tkrCode;
|
||||
}
|
||||
|
||||
public void setTkrCode(String tkrCode) {
|
||||
this.tkrCode = tkrCode;
|
||||
}
|
||||
|
||||
public String getErrorMessage() {
|
||||
return errorMessage;
|
||||
}
|
||||
|
||||
public void setErrorMessage(String errorMessage) {
|
||||
this.errorMessage = errorMessage;
|
||||
}
|
||||
}
|
||||
|
|
@ -6,8 +6,10 @@ import java.util.UUID;
|
|||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
|
||||
import ru.spcex.clearing.gatewayapi.config.deserializers.LocalDateTimeDeserializer;
|
||||
import ru.spcex.clearing.gatewayapi.controller.inbound.request.WithId;
|
||||
import ru.spcex.clearing.gatewayapi.controller.inbound.request.WithResult;
|
||||
|
||||
public class TkrRequest {
|
||||
public class TkrRequest implements WithId, WithResult {
|
||||
@JsonProperty("id")
|
||||
private UUID id;
|
||||
@JsonDeserialize(using = LocalDateTimeDeserializer.class)
|
||||
|
|
@ -17,7 +19,12 @@ public class TkrRequest {
|
|||
private String type;
|
||||
@JsonProperty("sent_info_accounts")
|
||||
private List<InfoAccount> infoAccount;
|
||||
@JsonProperty("errors")
|
||||
private List<TkrError> errors;
|
||||
@JsonProperty("result")
|
||||
private Boolean result;
|
||||
|
||||
@Override
|
||||
public UUID getId() {
|
||||
return id;
|
||||
}
|
||||
|
|
@ -49,4 +56,22 @@ public class TkrRequest {
|
|||
public void setInfoAccount(List<InfoAccount> infoAccount) {
|
||||
this.infoAccount = infoAccount;
|
||||
}
|
||||
|
||||
public List<TkrError> getErrors() {
|
||||
|
||||
return errors;
|
||||
}
|
||||
|
||||
public void setErrors(List<TkrError> errors) {
|
||||
this.errors = errors;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean getResult() {
|
||||
return result;
|
||||
}
|
||||
|
||||
public void setResult(Boolean result) {
|
||||
this.result = result;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,14 +1,14 @@
|
|||
package ru.spcex.clearing.gatewayapi.controller.outbound.response;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonAnySetter;
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.UUID;
|
||||
import com.fasterxml.jackson.annotation.JsonAnySetter;
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import ru.spcex.clearing.gatewayapi.controller.inbound.request.WithId;
|
||||
|
||||
public class ErrorResponse {
|
||||
public class ErrorResponse implements WithId {
|
||||
@JsonProperty("id")
|
||||
private UUID id;
|
||||
@JsonProperty("message")
|
||||
|
|
@ -22,6 +22,7 @@ public class ErrorResponse {
|
|||
unknownProperties.put(key, value);
|
||||
}
|
||||
|
||||
@Override
|
||||
public UUID getId() {
|
||||
return id;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -282,6 +282,10 @@ public class GatewayService extends QueueConsumer implements InitializingBean {
|
|||
if (reportRequest.getRequestId() != null) {
|
||||
outboundRequest.setId(reportRequest.getRequestId());
|
||||
}
|
||||
GatewayResult gatewayResult = GatewayResultBuilder.builder()
|
||||
.outboundRequest(outboundRequest)
|
||||
.build();
|
||||
gatewayResultImdg.insert(gatewayResult);
|
||||
String url = formingInboundUrl(inboundServerSettings.getPathLOCM());
|
||||
HttpEntity<OutboundRequest> r = makeDefaultRequest(outboundRequest);
|
||||
ResponseEntity<SuccessResponse> response = restTemplate.exchange(url, HttpMethod.POST, r, SuccessResponse.class);
|
||||
|
|
|
|||
|
|
@ -1,11 +1,16 @@
|
|||
package ru.spcex.clearing.gatewayapi.service;
|
||||
|
||||
import java.time.Instant;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.UUID;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.stereotype.Service;
|
||||
import ru.clearing.classes.statics.data.register.GatewayResult;
|
||||
import ru.spcex.clearing.gatewayapi.controller.inbound.request.WithId;
|
||||
import ru.spcex.clearing.gatewayapi.controller.inbound.request.WithResult;
|
||||
import ru.spcex.clearing.gatewayapi.controller.inbound.request.limit.LimitRequest;
|
||||
import ru.spcex.clearing.gatewayapi.controller.inbound.request.operations.OperationsRequest;
|
||||
import ru.spcex.clearing.gatewayapi.controller.outbound.request.OutboundRequest;
|
||||
import ru.spcex.clearing.gatewayapi.controller.outbound.response.ErrorResponse;
|
||||
import ru.spcex.clearing.gatewayapi.enums.OutboundRequestType;
|
||||
|
|
@ -20,11 +25,6 @@ import ru.spcex.platform.enumeration.ResultStatuses;
|
|||
import ru.spcex.platform.imdg.api.Imdg;
|
||||
import ru.spcex.platform.imdg.api.ImdgProvider;
|
||||
|
||||
import java.time.Instant;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.UUID;
|
||||
|
||||
@Service
|
||||
public class NotificationService {
|
||||
private final Logger log = LoggerFactory.getLogger(getClass());
|
||||
|
|
@ -50,9 +50,9 @@ public class NotificationService {
|
|||
return;
|
||||
}
|
||||
log.info("Receive request: uuid = {}, file = {} with result = {} and sending section = {}.",
|
||||
request.getId(), request.getLogFile(), request.getResult(), outboundReq.getSection());
|
||||
request.getId(), request.getLogFile(), request.getResult(), outboundReq.getSection());
|
||||
|
||||
updateGatewayResultInMap(request);
|
||||
sendToJournal(request);
|
||||
|
||||
newRequest.setObjectType(ObjectType.rgst.getKey());
|
||||
newRequest.setComment(request.getDescription());
|
||||
|
|
@ -67,63 +67,12 @@ public class NotificationService {
|
|||
kafkaSender.sendRequestToQueue(Consts.NOTIFICATION_NEW, newRequest);
|
||||
}
|
||||
|
||||
public void updateGatewayResultInMap(LimitRequest request) {
|
||||
if (request.getId() == null || request.getResult() == null) {
|
||||
log.warn("GatewayResult not found because LimitRequest not valid: {}", LogFormatter.toString(request));
|
||||
return;
|
||||
}
|
||||
GatewayResult gatewayResult = gatewayResultImdg.getFirstObjectByFieldValues(Map.of("requestId", request.getId().toString()));
|
||||
if (gatewayResult == null) {
|
||||
log.warn("GatewayResult by requestId = {} not found in map", request.getId().toString());
|
||||
return;
|
||||
}
|
||||
gatewayResult.setUpdated(Instant.now());
|
||||
gatewayResult.setGatewayResultStatus(request.getResult() ? ResultStatuses.success.getKey() : ResultStatuses.notSuccess.getKey());
|
||||
gatewayResult.setResult(LogFormatter.toString(request));
|
||||
gatewayResultImdg.update(gatewayResult);
|
||||
log.info("Updated gatewayResult: {} in map", LogFormatter.toString(gatewayResult));
|
||||
}
|
||||
|
||||
public void updateGatewayResultInMap(OperationsRequest request) {
|
||||
if (request.getId() == null || request.getResult() == null) {
|
||||
log.warn("GatewayResult not found because OperationsRequest not valid: {}", LogFormatter.toString(request));
|
||||
return;
|
||||
}
|
||||
GatewayResult gatewayResult = gatewayResultImdg.getFirstObjectByFieldValues(Map.of("requestId", request.getId().toString()));
|
||||
if (gatewayResult == null) {
|
||||
log.warn("GatewayResult by requestId = {} not found in map", request.getId().toString());
|
||||
return;
|
||||
}
|
||||
gatewayResult.setUpdated(Instant.now());
|
||||
gatewayResult.setGatewayResultStatus(request.getResult() ? ResultStatuses.success.getKey() : ResultStatuses.notSuccess.getKey());
|
||||
gatewayResult.setResult(LogFormatter.toString(request));
|
||||
gatewayResultImdg.update(gatewayResult);
|
||||
log.info("Updated gatewayResult: {} in map", LogFormatter.toString(gatewayResult));
|
||||
}
|
||||
|
||||
public void updateGatewayResultInMap(ErrorResponse response) {
|
||||
if (response.getId() == null) {
|
||||
log.warn("GatewayResult not found because OperationsRequest not valid: {}", LogFormatter.toString(response));
|
||||
return;
|
||||
}
|
||||
GatewayResult gatewayResult = gatewayResultImdg.getFirstObjectByFieldValues(Map.of("requestId", response.getId().toString()));
|
||||
if (gatewayResult == null) {
|
||||
log.warn("GatewayResult by requestId = {} not found in map", response.getId().toString());
|
||||
return;
|
||||
}
|
||||
gatewayResult.setUpdated(Instant.now());
|
||||
gatewayResult.setGatewayResultStatus(ResultStatuses.notSuccess.getKey());
|
||||
gatewayResult.setResult(LogFormatter.toString(response));
|
||||
gatewayResultImdg.update(gatewayResult);
|
||||
log.info("Updated gatewayResult: {} in map", LogFormatter.toString(gatewayResult));
|
||||
}
|
||||
|
||||
public void sendErrorNotification(ErrorResponse response, OutboundRequest request) {
|
||||
NotificationNewRequest newRequest = new NotificationNewRequest();
|
||||
updateGatewayResultInMap(response);
|
||||
sendErrorToJournal(response);
|
||||
if (OutboundRequestType.FILL_LIMITS.equalsByKey(request.getType()) && request.getContent() != null && request.getContent().size() > 0)
|
||||
log.info("Receive ErrorResponse: uuid = {}, file = {}, sending type = {} and section = {}.",
|
||||
response.getId(), request.getContent().get("file"), request.getType(), request.getSection());
|
||||
response.getId(), request.getContent().get("file"), request.getType(), request.getSection());
|
||||
else
|
||||
log.info("Receive ErrorResponse: uuid = {}, sending type = {} and section = {}.", response.getId(), request.getType(), request.getSection());
|
||||
newRequest.setObjectType(ObjectType.rgst.getKey());
|
||||
|
|
@ -133,6 +82,39 @@ public class NotificationService {
|
|||
kafkaSender.sendRequestToQueue(Consts.NOTIFICATION_NEW, newRequest);
|
||||
}
|
||||
|
||||
public <T extends WithId & WithResult> void sendToJournal(T request) {
|
||||
if (request.getResult() == null) {
|
||||
log.warn("GatewayResult not found because LimitRequest not valid: {}", LogFormatter.toString(request));
|
||||
return;
|
||||
}
|
||||
updateResult(request, ResultStatuses.successOrNot(request.getResult()));
|
||||
}
|
||||
|
||||
public void sendErrorToJournal(ErrorResponse response) {
|
||||
updateResult(response, ResultStatuses.notSuccess);
|
||||
}
|
||||
|
||||
private <T extends WithId> void updateResult(T request, ResultStatuses resultStatus) {
|
||||
if (request.getId() == null) {
|
||||
log.warn("Request without id: {}; skipping...", LogFormatter.toString(request));
|
||||
return;
|
||||
}
|
||||
GatewayResult gatewayResult = gatewayResultImdg.getFirstObjectByFieldValues(Map.of("requestId", request.getId().toString()));
|
||||
if (gatewayResult == null) {
|
||||
log.warn("GatewayResult by requestId = {} not found in map", request.getId().toString());
|
||||
return;
|
||||
}
|
||||
gatewayResult.setUpdated(Instant.now());
|
||||
gatewayResult.setGatewayResultStatus(resultStatus.getKey());
|
||||
String res = LogFormatter.toString(request);
|
||||
if (res.length() > 1000){
|
||||
res = res.substring(0, 1000);
|
||||
}
|
||||
gatewayResult.setResult(res);
|
||||
gatewayResultImdg.update(gatewayResult);
|
||||
log.info("Updated gatewayResult: {} in map", LogFormatter.toString(gatewayResult));
|
||||
}
|
||||
|
||||
public boolean canProcess(String type) {
|
||||
return supportedTypes.contains(type);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -23,6 +23,9 @@ public class TkrService {
|
|||
}
|
||||
|
||||
public void processedTkrRequest(TkrRequest tkrRequest) {
|
||||
if (tkrRequest.getErrors() != null && !tkrRequest.getErrors().isEmpty()) {
|
||||
return;
|
||||
}
|
||||
List<TkrAccount> tkrAccountsForCheck = tkrRequest.getInfoAccount()
|
||||
.stream().filter(infoAccount -> TypeOperations.CHECK.equalsByKey(infoAccount.getTypeOperationClient()))
|
||||
.map(tkrAdapter::toTkrResponse)
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
package ru.spcex.clearing.gatewayapi.service.builders;
|
||||
|
||||
import java.time.Instant;
|
||||
import ru.clearing.classes.statics.data.register.GatewayResult;
|
||||
import ru.spcex.clearing.gatewayapi.controller.outbound.request.OutboundRequest;
|
||||
import ru.spcex.clearing.gatewayapi.enums.OutboundRequestType;
|
||||
|
|
@ -7,9 +8,6 @@ import ru.spcex.clearing.platform.messaging.domain.cud.clearing.AssetOperationRe
|
|||
import ru.spcex.clearing.platform.messaging.serialization.LogFormatter;
|
||||
import ru.spcex.platform.enumeration.InOutDirection;
|
||||
import ru.spcex.platform.enumeration.Section;
|
||||
|
||||
import java.time.Instant;
|
||||
|
||||
import static ru.spcex.platform.utils.enumeration.IEnumKey.getEnumByKey;
|
||||
|
||||
public class GatewayResultBuilder {
|
||||
|
|
@ -39,6 +37,8 @@ public class GatewayResultBuilder {
|
|||
this.nameRequest = getNameReqByAsset(section, direction);
|
||||
else if (OutboundRequestType.FILL_LIMITS.equalsByKey(outboundRequest.getType()))
|
||||
this.nameRequest = getNameReqByLim(section);
|
||||
else if (OutboundRequestType.MEMBER_RESPONSE_TKR.equalsByKey(outboundRequest.getType()))
|
||||
this.nameRequest = "Выгрузка ТКР";
|
||||
return this;
|
||||
}
|
||||
|
||||
|
|
@ -49,6 +49,9 @@ public class GatewayResultBuilder {
|
|||
outboundRequest.setUpdated(now);
|
||||
outboundRequest.setRequestId(requestId);
|
||||
outboundRequest.setNameRequest(nameRequest);
|
||||
if (request.length() > 1000){
|
||||
request = request.substring(0, 1000);
|
||||
}
|
||||
outboundRequest.setRequest(request);
|
||||
return outboundRequest;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,12 +5,12 @@
|
|||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>imdg-hist</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
<version>SPCEX-3.12.0.0</version>
|
||||
<version>SPCEX-3.12.2</version>
|
||||
|
||||
<parent>
|
||||
<artifactId>clearing-parent</artifactId>
|
||||
<groupId>ru.spcex.clearing</groupId>
|
||||
<version>SPCEX-3.12.0.0</version>
|
||||
<version>SPCEX-3.12.2</version>
|
||||
</parent>
|
||||
|
||||
|
||||
|
|
@ -36,13 +36,13 @@
|
|||
<dependency>
|
||||
<groupId>ru.spcex.clearing</groupId>
|
||||
<artifactId>classes</artifactId>
|
||||
<version>SPCEX-3.12.0.0</version>
|
||||
<version>SPCEX-3.12.2</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>ru.spcex.clearing</groupId>
|
||||
<artifactId>dictionary</artifactId>
|
||||
<version>SPCEX-3.12.0.0</version>
|
||||
<version>SPCEX-3.12.2</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
|
||||
|
|
@ -82,7 +82,7 @@
|
|||
<dependency>
|
||||
<groupId>ru.spcex.clearing</groupId>
|
||||
<artifactId>cleaning-builders</artifactId>
|
||||
<version>SPCEX-3.12.0.0</version>
|
||||
<version>SPCEX-3.12.2</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
|
|
|
|||
|
|
@ -7,12 +7,12 @@
|
|||
<artifactId>imdg</artifactId>
|
||||
<name>Clearing in memory data grid</name>
|
||||
<packaging>jar</packaging>
|
||||
<version>SPCEX-3.12.0.0</version>
|
||||
<version>SPCEX-3.12.2</version>
|
||||
|
||||
<parent>
|
||||
<artifactId>clearing-parent</artifactId>
|
||||
<groupId>ru.spcex.clearing</groupId>
|
||||
<version>SPCEX-3.12.0.0</version>
|
||||
<version>SPCEX-3.12.2</version>
|
||||
</parent>
|
||||
|
||||
<properties>
|
||||
|
|
@ -32,13 +32,13 @@
|
|||
<dependency>
|
||||
<groupId>ru.spcex.clearing</groupId>
|
||||
<artifactId>classes</artifactId>
|
||||
<version>SPCEX-3.12.0.0</version>
|
||||
<version>SPCEX-3.12.2</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>ru.spcex.clearing</groupId>
|
||||
<artifactId>dictionary</artifactId>
|
||||
<version>SPCEX-3.12.0.0</version>
|
||||
<version>SPCEX-3.12.2</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
|
||||
|
|
@ -89,7 +89,7 @@
|
|||
<dependency>
|
||||
<groupId>ru.spcex.clearing</groupId>
|
||||
<artifactId>cleaning-builders</artifactId>
|
||||
<version>SPCEX-3.12.0.0</version>
|
||||
<version>SPCEX-3.12.2</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
|
|
|
|||
|
|
@ -3,13 +3,13 @@
|
|||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>lim-exporter</artifactId>
|
||||
<name>Lim exporter</name>
|
||||
<version>SPCEX-3.12.0.0</version>
|
||||
<version>SPCEX-3.12.2</version>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<parent>
|
||||
<groupId>ru.spcex.clearing</groupId>
|
||||
<artifactId>clearing-parent</artifactId>
|
||||
<version>SPCEX-3.12.0.0</version>
|
||||
<version>SPCEX-3.12.2</version>
|
||||
</parent>
|
||||
|
||||
<properties>
|
||||
|
|
@ -35,7 +35,7 @@
|
|||
<dependency>
|
||||
<groupId>ru.spcex.clearing</groupId>
|
||||
<artifactId>classes</artifactId>
|
||||
<version>SPCEX-3.12.0.0</version>
|
||||
<version>SPCEX-3.12.2</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
|
|
|
|||
|
|
@ -7,12 +7,12 @@
|
|||
<name>_parent_clearing</name>
|
||||
<description>Clearing parent module</description>
|
||||
<packaging>pom</packaging>
|
||||
<version>SPCEX-3.12.0.0</version>
|
||||
<version>SPCEX-3.12.2</version>
|
||||
|
||||
<parent>
|
||||
<artifactId>clearing</artifactId>
|
||||
<groupId>ru.spcex.clearing</groupId>
|
||||
<version>SPCEX-3.12.0.0</version>
|
||||
<version>SPCEX-3.12.2</version>
|
||||
</parent>
|
||||
|
||||
<modules>
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<artifactId>clearing-parent</artifactId>
|
||||
<groupId>ru.spcex.clearing</groupId>
|
||||
<version>SPCEX-3.12.0.0</version>
|
||||
<version>SPCEX-3.12.2</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
|
|
|
|||
|
|
@ -8,12 +8,12 @@
|
|||
<artifactId>reports-service</artifactId>
|
||||
<name>reports-service</name>
|
||||
<description>Service for creating reports</description>
|
||||
<version>SPCEX-3.12.0.0</version>
|
||||
<version>SPCEX-3.12.2</version>
|
||||
|
||||
<parent>
|
||||
<artifactId>clearing-parent</artifactId>
|
||||
<groupId>ru.spcex.clearing</groupId>
|
||||
<version>SPCEX-3.12.0.0</version>
|
||||
<version>SPCEX-3.12.2</version>
|
||||
</parent>
|
||||
<dependencies>
|
||||
<!-- Spring boot -->
|
||||
|
|
|
|||
|
|
@ -63,6 +63,19 @@ public class KSRepCashNettoReport {
|
|||
@CsvDate(value = "dd.MM.yyyy")
|
||||
private LocalDate trExecDate;
|
||||
|
||||
|
||||
public KSRepCashNettoReport cloneWithoutValues() {
|
||||
KSRepCashNettoReport result = new KSRepCashNettoReport();
|
||||
result.setFirmId(firmId);
|
||||
result.setSessionId(sessionId);
|
||||
result.setSessionDate(sessionDate);
|
||||
result.setAccount(account);
|
||||
result.setTkr(tkr);
|
||||
result.setDate(date);
|
||||
result.setLotCurrency(lotCurrency);
|
||||
return result;
|
||||
}
|
||||
|
||||
public String getFirmId() {
|
||||
return firmId;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -26,6 +26,7 @@ import ru.spcex.platform.enumeration.RegistryDesignation;
|
|||
import ru.spcex.platform.enumeration.RegistryTradingParams;
|
||||
import ru.spcex.platform.enumeration.ReportBuilderType;
|
||||
import ru.spcex.platform.enumeration.ReportKeys;
|
||||
import ru.spcex.platform.enumeration.Section;
|
||||
import ru.spcex.platform.enumeration.SessionType;
|
||||
import ru.spcex.platform.imdg.api.Imdg;
|
||||
import ru.spcex.platform.imdg.api.ImdgProvider;
|
||||
|
|
@ -125,8 +126,6 @@ public class KSRepCashNettoReportBuilder extends CSVReportBuilder<SessionIdParam
|
|||
}
|
||||
|
||||
boolean invalid = false;
|
||||
BigDecimal currencyNettoCmt = BigDecimal.ZERO;
|
||||
BigDecimal currencyNettoLmt = BigDecimal.ZERO;
|
||||
if (!cmtRegistries.isEmpty() || !lmtRegistries.isEmpty()) {
|
||||
String sourceTradingCode = null;
|
||||
String sourceTkr = null;
|
||||
|
|
@ -151,7 +150,6 @@ public class KSRepCashNettoReportBuilder extends CSVReportBuilder<SessionIdParam
|
|||
log.warn("Invalid CM_T registries set, tradingClearingRegistry not equals. Registries was skipped");
|
||||
break;
|
||||
}
|
||||
currencyNettoCmt = currencyNettoCmt.add(currRegistry.getBalance());
|
||||
}
|
||||
for (Registry currRegistry : lmtRegistries) {
|
||||
if (!Objects.equals(sourceTradingCode, currRegistry.getTradingCode())) {
|
||||
|
|
@ -164,7 +162,6 @@ public class KSRepCashNettoReportBuilder extends CSVReportBuilder<SessionIdParam
|
|||
log.warn("Invalid CM_T registries set, tradingClearingRegistry not equals. Registries was skipped");
|
||||
break;
|
||||
}
|
||||
currencyNettoLmt = currencyNettoLmt.add(currRegistry.getBalance());
|
||||
}
|
||||
if (invalid) continue;
|
||||
}
|
||||
|
|
@ -194,12 +191,15 @@ public class KSRepCashNettoReportBuilder extends CSVReportBuilder<SessionIdParam
|
|||
ksRepCashNettoReport.setTkr(registry.getTradingClearingRegistry());
|
||||
ksRepCashNettoReport.setDate(nowDate);
|
||||
|
||||
BigDecimal cmtCurrencyNetto = BigDecimal.ZERO;
|
||||
BigDecimal lmtCurrencyNetto = BigDecimal.ZERO;
|
||||
BigDecimal cmtBalance = BigDecimal.ZERO;
|
||||
BigDecimal lmtBalance = BigDecimal.ZERO;
|
||||
BigDecimal oblValue = BigDecimal.ZERO;
|
||||
BigDecimal reqValue = BigDecimal.ZERO;
|
||||
boolean withValue = false;
|
||||
boolean withOblReqValue = false;
|
||||
boolean withCurrencyNetto = false;
|
||||
Set<SessionType> sessionTypeForValue = Set.of(
|
||||
SessionType.IPOT,
|
||||
SessionType.TRDT,
|
||||
|
|
@ -215,44 +215,59 @@ public class KSRepCashNettoReportBuilder extends CSVReportBuilder<SessionIdParam
|
|||
for (Registry cmtRegistry : cmtRegistries) {
|
||||
if (cmtRegistry.getBalance() != null) {
|
||||
SessionType sessionType = IEnumKey.getEnumByKey(SessionType.class, cmtRegistry.getSessionType());
|
||||
if (sessionType == null) continue;
|
||||
if (sessionTypeForValue.contains(sessionType)) {
|
||||
Section section = IEnumKey.getEnumByKey(Section.class, cmtRegistry.getSection());
|
||||
if (section == Section.FOND || sessionTypeForValue.contains(sessionType)) {
|
||||
cmtBalance = cmtBalance.add(cmtRegistry.getBalance());
|
||||
withValue = true;
|
||||
}
|
||||
if (sessionTypeForOblReqValue.contains(sessionType)) {
|
||||
if (section == Section.MKR || sessionTypeForOblReqValue.contains(sessionType)) {
|
||||
reqValue = reqValue.add(cmtRegistry.getBalance());
|
||||
withOblReqValue = true;
|
||||
}
|
||||
if (section == Section.CURR || sessionType == SessionType.CURR) {
|
||||
cmtCurrencyNetto = cmtCurrencyNetto.add(cmtRegistry.getBalance());
|
||||
withCurrencyNetto = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
for (Registry lmtRegistry : lmtRegistries) {
|
||||
if (lmtRegistry.getBalance() != null) {
|
||||
SessionType sessionType = IEnumKey.getEnumByKey(SessionType.class, lmtRegistry.getSessionType());
|
||||
if (sessionType == null) continue;
|
||||
if (sessionTypeForValue.contains(sessionType)) {
|
||||
Section section = IEnumKey.getEnumByKey(Section.class, lmtRegistry.getSection());
|
||||
if (section == Section.FOND || sessionTypeForValue.contains(sessionType)) {
|
||||
lmtBalance = lmtBalance.add(lmtRegistry.getBalance());
|
||||
withValue = true;
|
||||
}
|
||||
if (sessionTypeForOblReqValue.contains(sessionType)) {
|
||||
if (section == Section.MKR || sessionTypeForOblReqValue.contains(sessionType)) {
|
||||
oblValue = oblValue.add(lmtRegistry.getBalance());
|
||||
withOblReqValue = true;
|
||||
}
|
||||
if (section == Section.CURR || sessionType == SessionType.CURR) {
|
||||
lmtCurrencyNetto = lmtCurrencyNetto.add(lmtRegistry.getBalance());
|
||||
withCurrencyNetto = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
BigDecimal value;
|
||||
value = cmtBalance.subtract(lmtBalance);
|
||||
ksRepCashNettoReport.setValue(withValue ? value : null);
|
||||
ksRepCashNettoReport.setOblValue(withOblReqValue ? oblValue : null);
|
||||
ksRepCashNettoReport.setReqValue(withOblReqValue ? reqValue : null);
|
||||
ksRepCashNettoReport.setLotCurrency(registry.getSecuritySymbol());
|
||||
SessionType sessionType = IEnumKey.getEnumByKey(SessionType.class, registry.getSessionType());
|
||||
if (sessionType == SessionType.CURR) {
|
||||
ksRepCashNettoReport.setCurrencyNetto(currencyNettoCmt.subtract(currencyNettoLmt));
|
||||
ksRepCashNettoReport.setTrExecDate(LocalDate.now());
|
||||
if (withValue) {
|
||||
KSRepCashNettoReport withoutValueClone = ksRepCashNettoReport.cloneWithoutValues();
|
||||
withoutValueClone.setValue(value);
|
||||
rows.add(withoutValueClone);
|
||||
}
|
||||
if (withOblReqValue) {
|
||||
KSRepCashNettoReport withoutValueClone = ksRepCashNettoReport.cloneWithoutValues();
|
||||
withoutValueClone.setOblValue(oblValue);
|
||||
withoutValueClone.setReqValue(reqValue);
|
||||
rows.add(withoutValueClone);
|
||||
}
|
||||
if (withCurrencyNetto) {
|
||||
KSRepCashNettoReport withoutValueClone = ksRepCashNettoReport.cloneWithoutValues();
|
||||
withoutValueClone.setCurrencyNetto(cmtCurrencyNetto.subtract(lmtCurrencyNetto));
|
||||
withoutValueClone.setTrExecDate(LocalDate.now());
|
||||
rows.add(withoutValueClone);
|
||||
}
|
||||
|
||||
rows.add(ksRepCashNettoReport);
|
||||
} catch (Throwable e) {
|
||||
log.error(
|
||||
"Can't create report row for registries (id = [%s]), row was skipped".formatted(
|
||||
|
|
|
|||
|
|
@ -0,0 +1,8 @@
|
|||
package ru.spcex.clearing.reports.config;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.math.BigInteger;
|
||||
|
||||
public class ReportConst {
|
||||
public static BigDecimal DB_ZERO = new BigDecimal(BigInteger.valueOf(0), 18);
|
||||
}
|
||||
|
|
@ -1,14 +1,41 @@
|
|||
package ru.spcex.clearing.reports.services;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileReader;
|
||||
import java.io.IOException;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.BigInteger;
|
||||
import java.time.Instant;
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.ZoneOffset;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.regex.Pattern;
|
||||
import com.opencsv.CSVParser;
|
||||
import com.opencsv.CSVParserBuilder;
|
||||
import com.opencsv.CSVReader;
|
||||
import com.opencsv.CSVReaderBuilder;
|
||||
import com.opencsv.exceptions.CsvValidationException;
|
||||
import javax.annotation.PostConstruct;
|
||||
import org.apache.commons.io.FileUtils;
|
||||
import org.apache.kafka.clients.consumer.MockConsumer;
|
||||
import org.apache.kafka.clients.producer.Producer;
|
||||
import org.junit.jupiter.api.*;
|
||||
import org.junit.jupiter.api.AfterAll;
|
||||
import org.junit.jupiter.api.Assertions;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import org.junit.jupiter.api.BeforeAll;
|
||||
import org.junit.jupiter.api.MethodOrderer;
|
||||
import org.junit.jupiter.api.Order;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.api.TestMethodOrder;
|
||||
import org.junit.jupiter.api.extension.ExtendWith;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Qualifier;
|
||||
|
|
@ -42,24 +69,24 @@ import ru.spcex.clearing.reports.config.validation.ValidationConfig;
|
|||
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.*;
|
||||
import ru.spcex.platform.enumeration.AccountType;
|
||||
import ru.spcex.platform.enumeration.ClearingCategory;
|
||||
import ru.spcex.platform.enumeration.CompanySymbol;
|
||||
import ru.spcex.platform.enumeration.CoverageStatus;
|
||||
import ru.spcex.platform.enumeration.DocumentTypes;
|
||||
import ru.spcex.platform.enumeration.MoneyFlowSide;
|
||||
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.enumeration.ReportBuilderType;
|
||||
import ru.spcex.platform.enumeration.Section;
|
||||
import ru.spcex.platform.enumeration.SessionType;
|
||||
import ru.spcex.platform.enumeration.Side;
|
||||
import ru.spcex.platform.enumeration.WorkflowStatus;
|
||||
import ru.spcex.platform.imdg.api.Imdg;
|
||||
import ru.spcex.platform.imdg.api.ImdgProvider;
|
||||
|
||||
import javax.annotation.PostConstruct;
|
||||
import java.io.File;
|
||||
import java.io.FileReader;
|
||||
import java.io.IOException;
|
||||
import java.math.BigDecimal;
|
||||
import java.time.Instant;
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.ZoneOffset;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.*;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
@ExtendWith(SpringExtension.class)
|
||||
@ContextConfiguration(classes = {
|
||||
BeanConfiguration.class,
|
||||
|
|
@ -73,6 +100,8 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
|
|||
})
|
||||
@TestMethodOrder(MethodOrderer.OrderAnnotation.class)
|
||||
public class ReportServiceTest_KS {
|
||||
private Pattern bigDecimalPattern = Pattern.compile("^[-+\\d.,]+$");
|
||||
private BigDecimal bigDecimalZero = new BigDecimal(BigInteger.ZERO, 18);
|
||||
protected DateTimeFormatter dateFormatter_yyyyMMdd = DateTimeFormatter.ofPattern("yyyyMMdd");
|
||||
private static File outFolder;
|
||||
private static int reportRequestCnt = 0;
|
||||
|
|
@ -1156,6 +1185,93 @@ public class ReportServiceTest_KS {
|
|||
executionDepositImdg.delete(executionDeposit);
|
||||
}
|
||||
|
||||
@Test
|
||||
@Order(11)
|
||||
public void ksRepCashNettoExtendedTest() throws IOException, CsvValidationException {
|
||||
clearTestDir();
|
||||
|
||||
Session session = new Session();
|
||||
session.setCreated(
|
||||
Instant.ofEpochMilli(LocalDateTime.of(
|
||||
2022,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1
|
||||
).toEpochSecond(ZoneOffset.UTC))
|
||||
);
|
||||
Long sessionId = sessionImdg.insert(session);
|
||||
|
||||
ReportRequestWithSessionId reportRequest = new ReportRequestWithSessionId();
|
||||
reportRequest.setReportId(ReportBuilderType.KS_REP_CASH_NETTO.getKey());
|
||||
reportRequest.setSessionId(sessionId);
|
||||
|
||||
CSVParser parser = new CSVParserBuilder()
|
||||
.withSeparator(';')
|
||||
.withIgnoreQuotations(true)
|
||||
.build();
|
||||
|
||||
List<Registry> registries = new ArrayList<>();
|
||||
List<Account> accounts = new ArrayList<>();
|
||||
try (CSVReader csvReader = new CSVReaderBuilder(
|
||||
new FileReader(
|
||||
getClass().getClassLoader().getResource("expected_reports_csv/ks/ksRepCashNetto_registries.csv").getFile()
|
||||
)
|
||||
).withSkipLines(1)
|
||||
.withCSVParser(parser)
|
||||
.build()) {
|
||||
do {
|
||||
String[] row = csvReader.readNext();
|
||||
if (row == null) break;
|
||||
Registry registry = new Registry();
|
||||
registry.setSessionId(sessionId);
|
||||
registry.setClearingDate(LocalDate.now());
|
||||
registry.setTradingCode(row[1]);
|
||||
registry.setTradingClearingRegistry(row[14]);
|
||||
registry.setRegistryDesignation(row[8]);
|
||||
registry.setRegistryInstrumentType(row[9]);
|
||||
registry.setRegistryCapacity(row[10]);
|
||||
registry.setRegistryUnit(row[11]);
|
||||
registry.setRegistryCode(row[12]);
|
||||
registry.setAccountType(row[6]);
|
||||
registry.setAccount(row[7]);
|
||||
if (row[6].equalsIgnoreCase(AccountType.Info.getKey())) {
|
||||
Account account = new Account();
|
||||
account.setCompanyId(1L);
|
||||
account.setAccountType(AccountType.Anlt.getKey());
|
||||
account.setAccount(row[7]);
|
||||
accountImdg.insert(account);
|
||||
accounts.add(account);
|
||||
}
|
||||
registry.setSessionType(row[42]);
|
||||
registry.setSection(row[47]);
|
||||
registry.setBalance(new BigDecimal(row[18].replace(',', '.')));
|
||||
registry.setSecuritySymbol(row[17]);
|
||||
registryImdg.insert(registry);
|
||||
registries.add(registry);
|
||||
} while (true);
|
||||
}
|
||||
|
||||
String jsonString = TestUtils.getJsonStringForSystem(reportRequest, 0L);
|
||||
|
||||
TestUtils.addRecordToKafka((MockConsumer) reportService.getConsumer(),
|
||||
Consts.CREATE_REPORT_FOR_SESSION_ID,
|
||||
reportRequestWithSessionIdCnt++,
|
||||
0,
|
||||
jsonString);
|
||||
|
||||
TestUtils.waitingSendAndCheckRecord(0L, producer);
|
||||
|
||||
File outFile = outFolder.listFiles()[0];
|
||||
File expectedFile = new File(getClass().getClassLoader().getResource("expected_reports_csv/ks/KS_REP_CASH_NETTO_extended_expected.csv").getFile());
|
||||
compareCSVFiles(expectedFile, outFile, Arrays.asList("SESSION_ID", "DATE", "ACCOUNT", "SESSION_DATE", "TR_EXECDATE"));
|
||||
|
||||
for (Registry registry : registries) registryImdg.delete(registry);
|
||||
for (Account account : accounts) accountImdg.delete(account);
|
||||
sessionImdg.delete(session);
|
||||
}
|
||||
|
||||
|
||||
private void compareCSVFiles(File expectedFile, File actualFile, List<String> columnsForSkip) throws IOException, CsvValidationException {
|
||||
if (columnsForSkip == null) columnsForSkip = Collections.emptyList();
|
||||
|
|
@ -1204,7 +1320,14 @@ public class ReportServiceTest_KS {
|
|||
String expected = expectedLine[expectedIdx];
|
||||
String actual = actualLine[actualIdx];
|
||||
lineEqual = expected.equals(actual);
|
||||
if (!lineEqual) break;
|
||||
if (!lineEqual) {
|
||||
if (bigDecimalPattern.matcher(expected).find() && bigDecimalPattern.matcher(actual).find()) {
|
||||
BigDecimal actualBD = new BigDecimal(actual.replace(',', '.'));
|
||||
BigDecimal expectedBD = new BigDecimal(expected.replace(',', '.'));
|
||||
lineEqual = Math.abs(actualBD.subtract(expectedBD).compareTo(bigDecimalZero)) <= 0;
|
||||
}
|
||||
if (!lineEqual) break;
|
||||
}
|
||||
}
|
||||
if (lineEqual) {
|
||||
findEqual = true;
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
"FIRMID","SESSION_ID","SESSION_DATE","ACCOUNT","TKR","VALUE","DATE","OBL_VALUE","REQ_VALUE","LOT_CURRENCY","CURRENCY_NETTO","TR_EXECDATE"
|
||||
"TRADING_CODE","2","20.01.1970T02:49:58","ACCOUNT","TKR","22.22","03.06.2024",,,,,
|
||||
"TRADING_CODE","2","20.01.1970T02:49:58","ACCOUNT_FROM_ACCOUNT","TKR",,"03.06.2024","22.22","44.44",,,
|
||||
"TRADING_CODE","146","20.01.1970T02:49:58","ACCOUNT","TKR","22.22","26.06.2024",,,,,
|
||||
"TRADING_CODE","146","20.01.1970T02:49:58","ACCOUNT_FROM_ACCOUNT","TKR",,"26.06.2024","22.22","44.44",,,
|
||||
|
|
|
|||
|
|
|
@ -0,0 +1,16 @@
|
|||
"FIRMID","SESSION_ID","SESSION_DATE","ACCOUNT","TKR","VALUE","DATE","OBL_VALUE","REQ_VALUE","LOT_CURRENCY","CURRENCY_NETTO","TR_EXECDATE"
|
||||
"95","2","20.01.1970T02:49:58","30411810300000002049","0095CAT00001",,"27.06.2024",,,"UZS","-10000","27.06.2024"
|
||||
"8","2","20.01.1970T02:49:58","3,04118607E+019","0008MAT00001",,"27.06.2024",,,"UZS","10000","27.06.2024"
|
||||
"8","2","20.01.1970T02:49:58","3,041181E+019","0008CAT00001","9743.90","27.06.2024",,,"RUB",,
|
||||
"8","2","20.01.1970T02:49:58","3,041181E+019","0008CAT00001",,"27.06.2024","0.00","7000000000.00","RUB",,
|
||||
"8","2","20.01.1970T02:49:58","3,04118102E+019","0008MAT00001",,"27.06.2024",,,"RUB","-69.75","27.06.2024"
|
||||
"472","2","20.01.1970T02:49:58","3,04118605E+019","0472CAT00001",,"27.06.2024",,,"UZS","-10000000","27.06.2024"
|
||||
"302","2","20.01.1970T02:49:58","3,04118107E+019","0302MAT00001",,"27.06.2024","10000000000.00","0.00","RUB",,
|
||||
"472","2","20.01.1970T02:49:58","3,04111569E+019","0472CAT00001",,"27.06.2024",,,"CNY","10","27.06.2024"
|
||||
"472","2","20.01.1970T02:49:58","3,0411810101E+019","0472CAT00001","-9743.90","27.06.2024",,,"RUB",,
|
||||
"472","2","20.01.1970T02:49:58","3,0411810101E+019","0472CAT00001",,"27.06.2024",,,"RUB","69627.92","27.06.2024"
|
||||
"45","2","20.01.1970T02:49:58","3,04118103E+019","0045CAT00001",,"27.06.2024","0.00","3000000000.00","RUB",,
|
||||
"234","2","20.01.1970T02:49:58","3,99118100000003E+019","0234CAT00001",,"27.06.2024",,,"RUB","-69627.92","27.06.2024"
|
||||
"234","2","20.01.1970T02:49:58","3,99118100000003E+019","0234CAT00001",,"27.06.2024",,,"UZS","10000000","27.06.2024"
|
||||
"95","2","20.01.1970T02:49:58","30411810300000002094","0095CAT00001",,"27.06.2024",,,"RUB","69.75","27.06.2024"
|
||||
"234","2","20.01.1970T02:49:58","3,99118100000003E+019","0234CAT00001",,"27.06.2024",,,"CNY","-10","27.06.2024"
|
||||
|
|
|
@ -0,0 +1,19 @@
|
|||
company_id;trading_code;clearing_code;short_name;full_name;account_id;account_type;account;registry_designation;registry_instrument_type;registry_capacity;registry_unit;registry_code;trading_clearing_registry_id;trading_clearing_registry;registry_status;security_id;security_symbol;balance;open_balance;close_balance;credit;debit;settled_credit;settled_debit;check_balance;diff_balance;plan_balance;balance_dimension;settlement_date;settlement_code;trading_date;clearing_date;refund_date;value_date;price;contract;counter_party_id;comment;parent_id;group_id;session_id;session_type;payment_id;id;created_at;updated_at;section
|
||||
4500120;95;95;Банк ВТБ (ПАО);Банк ВТБ (публичное акционерное общество);4410078;CLRN;30411810300000002094;C;M;A;T;CMAT;21240012;0095CAT00001;CLRD;643;RUB;69,75;(null);(null);0;0;0;0;0;0;0;MONY;24.06.2024;T0;24.06.2024;24.06.2024;(null);24.06.2024;69,7515;38840009;80162;(null);(null);507;47580029;UNIT;(null);47580094;24.06.2024 14:16;24.06.2024 15:19;CURR
|
||||
80162;8;8;ПАО Сбербанк;Публичное акционерное общество «Сбербанк России»;38690096;CLRN;3,04118607E+019;C;M;A;T;CMAT;130040;0008MAT00001;CLRD;860;UZS;10000;(null);(null);0;0;0;0;0;0;0;MONY;24.06.2024;T0;24.06.2024;24.06.2024;(null);24.06.2024;69,7515;38840009;4500120;(null);(null);507;47580029;UNIT;(null);47580076;24.06.2024 14:16;24.06.2024 15:19;CURR
|
||||
80022;472;472;ПАО "Промсвязьбанк";Публичное акционерное общество «Промсвязьбанк» ;38690028;CLRN;3,04111569E+019;C;M;A;T;CMAT;1860016;0472CAT00001;CLRD;156;CNY;10;(null);(null);0;0;0;0;0;0;0;MONY;24.06.2024;T0;24.06.2024;24.06.2024;(null);24.06.2024;12,9575;38840004;4500072;(null);(null);508;47580029;UNIT;(null);47580074;24.06.2024 14:16;24.06.2024 15:19;CURR
|
||||
80136;45;45;АО "АБ "РОССИЯ";Акционерное общество «Акционерный Банк «РОССИЯ»;130023;CLRN;3,04118103E+019;C;M;A;T;CMAT;1860025;0045CAT00001;CLRD;643;RUB;3000000000;(null);(null);0;0;0;0;0;0;0;MONY;24.06.2024;T0;24.06.2024;24.06.2024;25.06.2024;24.06.2024;17,12;DT1000S001U/240624/45/24062400000001;80074;(null);(null);24062400000001;47580029;UNIT;(null);47580072;24.06.2024 14:16;24.06.2024 15:19;MKR
|
||||
4500072;234;234;Банк "ВБРР" (АО);Акционерное общество "Всероссийский банк развития регионов";47130002;INFO;3,99118600000001E+019;C;M;A;T;CMAT;47130004;0234CAT00001;CLRD;860;UZS;10000000;(null);(null);0;0;0;0;0;0;0;MONY;24.06.2024;T0;24.06.2024;24.06.2024;(null);24.06.2024;69,7575;38840005;80022;(null);(null);1518298;47580029;UNIT;(null);47580093;24.06.2024 14:16;24.06.2024 15:19;CURR
|
||||
80162;8;8;ПАО Сбербанк;Публичное акционерное общество «Сбербанк России»;130013;CLRN;3,041181E+019;C;M;A;T;CMAT;1930000;0008CAT00001;CLRD;643;RUB;7000000000;(null);(null);0;0;0;0;0;0;0;MONY;24.06.2024;T0;24.06.2024;24.06.2024;25.06.2024;24.06.2024;16,88;DT1000S001U/240624/8/24062400000002;80074;(null);(null);24062400000002;47580029;UNIT;(null);47580079;24.06.2024 14:16;24.06.2024 15:19;MKR
|
||||
4500072;234;234;Банк "ВБРР" (АО);Акционерное общество "Всероссийский банк развития регионов";4410023;INFO;3,99118100000003E+019;C;M;A;T;CMAT;47130004;0234CAT00001;CLRD;643;RUB;129,58;(null);(null);0;0;0;0;0;0;0;MONY;24.06.2024;T0;24.06.2024;24.06.2024;(null);24.06.2024;12,9575;38840004;80022;(null);(null);508;47580029;UNIT;(null);47580073;24.06.2024 14:16;24.06.2024 15:19;CURR
|
||||
80162;8;8;ПАО Сбербанк;Публичное акционерное общество «Сбербанк России»;130013;CLRN;3,041181E+019;C;M;A;T;CMAT;1930000;0008CAT00001;CLRD;643;RUB;9743,9;(null);(null);0;0;0;0;0;0;0;MONY;24.06.2024;T0;24.06.2024;24.06.2024;(null);24.06.2024;97;(null);80022;(null);(null);1461034;47580029;UNIT;(null);47580085;24.06.2024 14:16;24.06.2024 15:19;FOND
|
||||
80022;472;472;ПАО "Промсвязьбанк";Публичное акционерное общество «Промсвязьбанк» ;130005;CLRN;3,0411810101E+019;C;M;A;T;CMAT;1860016;0472CAT00001;CLRD;643;RUB;69757,5;(null);(null);0;0;0;0;0;0;0;MONY;24.06.2024;T0;24.06.2024;24.06.2024;(null);24.06.2024;69,7575;38840005;4500072;(null);(null);1518298;47580029;UNIT;(null);47580090;24.06.2024 14:16;24.06.2024 15:19;CURR
|
||||
80022;472;472;ПАО "Промсвязьбанк";Публичное акционерное общество «Промсвязьбанк» ;38690032;CLRN;3,04118605E+019;L;M;A;T;LMAT;1860016;0472CAT00001;CLRD;860;UZS;10000000;(null);(null);0;0;0;0;0;0;0;MONY;24.06.2024;T0;24.06.2024;24.06.2024;(null);24.06.2024;69,7575;38840005;4500072;(null);(null);1518298;47580029;UNIT;(null);47580075;24.06.2024 14:16;24.06.2024 15:19;CURR
|
||||
4500072;234;234;Банк "ВБРР" (АО);Акционерное общество "Всероссийский банк развития регионов";47130000;INFO;3,99111560000002E+019;L;M;A;T;LMAT;47130004;0234CAT00001;CLRD;156;CNY;10;(null);(null);0;0;0;0;0;0;0;MONY;24.06.2024;T0;24.06.2024;24.06.2024;(null);24.06.2024;12,9575;38840004;80022;(null);(null);508;47580029;UNIT;(null);47580087;24.06.2024 14:16;24.06.2024 15:19;CURR
|
||||
80022;472;472;ПАО "Промсвязьбанк";Публичное акционерное общество «Промсвязьбанк» ;130005;CLRN;3,0411810101E+019;L;M;A;T;LMAT;1860016;0472CAT00001;CLRD;643;RUB;129,58;(null);(null);0;0;0;0;0;0;0;MONY;24.06.2024;T0;24.06.2024;24.06.2024;(null);24.06.2024;12,9575;38840004;4500072;(null);(null);508;47580029;UNIT;(null);47580083;24.06.2024 14:16;24.06.2024 15:19;CURR
|
||||
80022;472;472;ПАО "Промсвязьбанк";Публичное акционерное общество «Промсвязьбанк» ;130005;CLRN;3,0411810101E+019;L;M;A;T;LMAT;1860016;0472CAT00001;CLRD;643;RUB;9743,9;(null);(null);0;0;0;0;0;0;0;MONY;24.06.2024;T0;24.06.2024;24.06.2024;(null);24.06.2024;97;(null);80162;(null);(null);1461034;47580029;UNIT;(null);47580095;24.06.2024 14:16;24.06.2024 15:19;FOND
|
||||
80074;302;302;Комитет финансов СПб;Комитет финансов Санкт-Петербурга;130019;CLRN;3,04118107E+019;L;M;A;T;LMAT;130034;0302MAT00001;CLRD;643;RUB;7000000000;(null);(null);0;0;0;0;0;0;0;MONY;24.06.2024;T0;24.06.2024;24.06.2024;25.06.2024;24.06.2024;16,88;DT1000S001U/240624/8/24062400000002;80162;(null);(null);24062400000002;47580029;UNIT;(null);47580089;24.06.2024 14:16;24.06.2024 15:19;MKR
|
||||
4500072;234;234;Банк "ВБРР" (АО);Акционерное общество "Всероссийский банк развития регионов";4410023;INFO;3,99118100000003E+019;L;M;A;T;LMAT;47130004;0234CAT00001;CLRD;643;RUB;69757,5;(null);(null);0;0;0;0;0;0;0;MONY;24.06.2024;T0;24.06.2024;24.06.2024;(null);24.06.2024;69,7575;38840005;80022;(null);(null);1518298;47580029;UNIT;(null);47580078;24.06.2024 14:16;24.06.2024 15:19;CURR
|
||||
80074;302;302;Комитет финансов СПб;Комитет финансов Санкт-Петербурга;130019;CLRN;3,04118107E+019;L;M;A;T;LMAT;130034;0302MAT00001;CLRD;643;RUB;3000000000;(null);(null);0;0;0;0;0;0;0;MONY;24.06.2024;T0;24.06.2024;24.06.2024;25.06.2024;24.06.2024;17,12;DT1000S001U/240624/45/24062400000001;80136;(null);(null);24062400000001;47580029;UNIT;(null);47580086;24.06.2024 14:16;24.06.2024 15:19;MKR
|
||||
80162;8;8;ПАО Сбербанк;Публичное акционерное общество «Сбербанк России»;130017;CLRN;3,04118102E+019;L;M;A;T;LMAT;130040;0008MAT00001;CLRD;643;RUB;69,75;(null);(null);0;0;0;0;0;0;0;MONY;24.06.2024;T0;24.06.2024;24.06.2024;(null);24.06.2024;69,7515;38840009;4500120;(null);(null);507;47580029;UNIT;(null);47580084;24.06.2024 14:16;24.06.2024 15:19;CURR
|
||||
4500120;95;95;Банк ВТБ (ПАО);Банк ВТБ (публичное акционерное общество);38690016;CLRN;30411810300000002049;L;M;A;T;LMAT;21240012;0095CAT00001;CLRD;860;UZS;10000;(null);(null);0;0;0;0;0;0;0;MONY;24.06.2024;T0;24.06.2024;24.06.2024;(null);24.06.2024;69,7515;38840009;80162;(null);(null);507;47580029;UNIT;(null);47580088;24.06.2024 14:16;24.06.2024 15:19;CURR
|
||||
|
Can't render this file because it contains an unexpected character in line 4 and column 22.
|
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<artifactId>clearing-parent</artifactId>
|
||||
<groupId>ru.spcex.clearing</groupId>
|
||||
<version>SPCEX-3.12.0.0</version>
|
||||
<version>SPCEX-3.12.2</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
|
|
@ -51,7 +51,7 @@
|
|||
<dependency>
|
||||
<groupId>ru.spcex.clearing</groupId>
|
||||
<artifactId>cleaning-builders</artifactId>
|
||||
<version>SPCEX-3.12.0.0</version>
|
||||
<version>SPCEX-3.12.2</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<artifactId>clearing-parent</artifactId>
|
||||
<groupId>ru.spcex.clearing</groupId>
|
||||
<version>SPCEX-3.12.0.0</version>
|
||||
<version>SPCEX-3.12.2</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
|
|
|
|||
|
|
@ -8,12 +8,12 @@
|
|||
<name>security-util clearing</name>
|
||||
<description>Clearing misc util for verify user roles</description>
|
||||
<packaging>jar</packaging>
|
||||
<version>SPCEX-3.12.0.0</version>
|
||||
<version>SPCEX-3.12.2</version>
|
||||
|
||||
<parent>
|
||||
<artifactId>clearing-parent</artifactId>
|
||||
<groupId>ru.spcex.clearing</groupId>
|
||||
<version>SPCEX-3.12.0.0</version>
|
||||
<version>SPCEX-3.12.2</version>
|
||||
</parent>
|
||||
|
||||
<properties>
|
||||
|
|
@ -35,13 +35,13 @@
|
|||
<dependency>
|
||||
<groupId>ru.spcex.clearing</groupId>
|
||||
<artifactId>classes</artifactId>
|
||||
<version>SPCEX-3.12.0.0</version>
|
||||
<version>SPCEX-3.12.2</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>ru.spcex.clearing</groupId>
|
||||
<artifactId>dictionary</artifactId>
|
||||
<version>SPCEX-3.12.0.0</version>
|
||||
<version>SPCEX-3.12.2</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
|
|
|
|||
|
|
@ -3,13 +3,13 @@
|
|||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>swt-exporter</artifactId>
|
||||
<name>Swt exporter</name>
|
||||
<version>SPCEX-3.12.0.0</version>
|
||||
<version>SPCEX-3.12.2</version>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<parent>
|
||||
<groupId>ru.spcex.clearing</groupId>
|
||||
<artifactId>clearing-parent</artifactId>
|
||||
<version>SPCEX-3.12.0.0</version>
|
||||
<version>SPCEX-3.12.2</version>
|
||||
</parent>
|
||||
|
||||
<properties>
|
||||
|
|
@ -35,7 +35,7 @@
|
|||
<dependency>
|
||||
<groupId>ru.spcex.clearing</groupId>
|
||||
<artifactId>classes</artifactId>
|
||||
<version>SPCEX-3.12.0.0</version>
|
||||
<version>SPCEX-3.12.2</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<artifactId>clearing-parent</artifactId>
|
||||
<groupId>ru.spcex.clearing</groupId>
|
||||
<version>SPCEX-3.12.0.0</version>
|
||||
<version>SPCEX-3.12.2</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
|
|
|
|||
|
|
@ -4,11 +4,11 @@
|
|||
<parent>
|
||||
<groupId>ru.spcex.clearing</groupId>
|
||||
<artifactId>clearing-parent</artifactId>
|
||||
<version>SPCEX-3.12.0.0</version>
|
||||
<version>SPCEX-3.12.2</version>
|
||||
</parent>
|
||||
<artifactId>test-clearing</artifactId>
|
||||
<name>Test-clearing</name>
|
||||
<version>SPCEX-3.12.0.0</version>
|
||||
<version>SPCEX-3.12.2</version>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>ru.spcex.platform</groupId>
|
||||
|
|
|
|||
|
|
@ -4,12 +4,12 @@
|
|||
<parent>
|
||||
<groupId>ru.spcex.clearing</groupId>
|
||||
<artifactId>clearing-parent</artifactId>
|
||||
<version>SPCEX-3.12.0.0</version>
|
||||
<version>SPCEX-3.12.2</version>
|
||||
</parent>
|
||||
<artifactId>trade-importer</artifactId>
|
||||
<name>trade-importer</name>
|
||||
<description>Trade importer module</description>
|
||||
<version>SPCEX-3.12.0.0</version>
|
||||
<version>SPCEX-3.12.2</version>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<properties>
|
||||
|
|
@ -51,7 +51,7 @@
|
|||
<dependency>
|
||||
<groupId>ru.spcex.clearing</groupId>
|
||||
<artifactId>classes</artifactId>
|
||||
<version>SPCEX-3.12.0.0</version>
|
||||
<version>SPCEX-3.12.2</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<artifactId>clearing-parent</artifactId>
|
||||
<groupId>ru.spcex.clearing</groupId>
|
||||
<version>SPCEX-3.12.0.0</version>
|
||||
<version>SPCEX-3.12.2</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
|
|
|
|||
|
|
@ -19,4 +19,8 @@ public enum ResultStatuses implements IEnumKey {
|
|||
public String getKey() {
|
||||
return key;
|
||||
}
|
||||
|
||||
public static ResultStatuses successOrNot(final Boolean val){
|
||||
return val ? ResultStatuses.success : ResultStatuses.notSuccess;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,6 +7,8 @@ public class MoneyAccountMsgResponse {
|
|||
private String currCode;
|
||||
@JsonProperty("account")
|
||||
private String account;
|
||||
@JsonProperty("eks_account")
|
||||
private String eksAccount;
|
||||
@JsonProperty("is_active")
|
||||
private Boolean isActive;
|
||||
|
||||
|
|
@ -26,6 +28,14 @@ public class MoneyAccountMsgResponse {
|
|||
this.account = account;
|
||||
}
|
||||
|
||||
public String getEksAccount() {
|
||||
return eksAccount;
|
||||
}
|
||||
|
||||
public void setEksAccount(String eksAccount) {
|
||||
this.eksAccount = eksAccount;
|
||||
}
|
||||
|
||||
public Boolean getActive() {
|
||||
return isActive;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@
|
|||
<parent>
|
||||
<groupId>ru.spcex.clearing</groupId>
|
||||
<artifactId>clearing</artifactId>
|
||||
<version>SPCEX-3.12.0.0</version>
|
||||
<version>SPCEX-3.12.2</version>
|
||||
</parent>
|
||||
|
||||
<modules>
|
||||
|
|
|
|||
4
pom.xml
4
pom.xml
|
|
@ -9,7 +9,7 @@
|
|||
<name>__parent_ROOT</name>
|
||||
<description>Clearing main parent</description>
|
||||
<packaging>pom</packaging>
|
||||
<version>SPCEX-3.12.0.0</version>
|
||||
<version>SPCEX-3.12.2</version>
|
||||
|
||||
<modules>
|
||||
<module>clearing-parent</module>
|
||||
|
|
@ -24,7 +24,7 @@
|
|||
<project.java.version>17</project.java.version>
|
||||
<built.by>Maven</built.by>
|
||||
|
||||
<global.project.version>SPCEX-3.12.0.0</global.project.version>
|
||||
<global.project.version>SPCEX-3.12.2</global.project.version>
|
||||
|
||||
<spring-boot.version>2.6.3</spring-boot.version>
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<artifactId>clearing</artifactId>
|
||||
<groupId>ru.spcex.clearing</groupId>
|
||||
<version>SPCEX-3.12.0.0</version>
|
||||
<version>SPCEX-3.12.2</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
|
|
@ -17,6 +17,7 @@
|
|||
<folder.clearing.distr>${project.basedir}/target/clearing</folder.clearing.distr>
|
||||
<folder.clearing.distr.settings>${project.basedir}/target/clearing/settings</folder.clearing.distr.settings>
|
||||
<folder.clearing.distr.bin>${project.basedir}/target/clearing/bin</folder.clearing.distr.bin>
|
||||
<folder.clearing.distr.services>${project.basedir}/target/clearing/services</folder.clearing.distr.services>
|
||||
<folder.clearing.distr.db>${project.basedir}/target/clearing/db</folder.clearing.distr.db>
|
||||
</properties>
|
||||
|
||||
|
|
@ -124,6 +125,10 @@
|
|||
<sourceFile>${folder_root_clearing_backend-api}/target/backend-api.jar</sourceFile>
|
||||
<destinationFile>${folder.clearing.distr.bin}/backend-api.jar</destinationFile>
|
||||
</fileSet>
|
||||
<fileSet>
|
||||
<sourceFile>${folder_root_clearing_backend-api}/target/backend-api.jar</sourceFile>
|
||||
<destinationFile>${folder.clearing.distr.services}/backend-api/backend-api.jar</destinationFile>
|
||||
</fileSet>
|
||||
<fileSet>
|
||||
<sourceFile>${folder_root_clearing_backend-api}/src/main/resources/application.properties</sourceFile>
|
||||
<destinationFile>${folder.clearing.distr.settings}/backend-api/application.properties</destinationFile>
|
||||
|
|
@ -151,6 +156,10 @@
|
|||
<sourceFile>${folder_root_clearing_securities-service}/target/securities-service.jar</sourceFile>
|
||||
<destinationFile>${folder.clearing.distr.bin}/securities-service.jar</destinationFile>
|
||||
</fileSet>
|
||||
<fileSet>
|
||||
<sourceFile>${folder_root_clearing_securities-service}/target/securities-service.jar</sourceFile>
|
||||
<destinationFile>${folder.clearing.distr.services}/securities-service/securities-service.jar</destinationFile>
|
||||
</fileSet>
|
||||
<fileSet>
|
||||
<sourceFile>${folder_root_clearing_securities-service}/src/main/resources/application.properties</sourceFile>
|
||||
<destinationFile>${folder.clearing.distr.settings}/securities-service/application.properties</destinationFile>
|
||||
|
|
@ -170,6 +179,10 @@
|
|||
<sourceFile>${folder_root_clearing_imdg}/target/imdg-exec.jar</sourceFile>
|
||||
<destinationFile>${folder.clearing.distr.bin}/imdg.jar</destinationFile>
|
||||
</fileSet>
|
||||
<fileSet>
|
||||
<sourceFile>${folder_root_clearing_imdg}/target/imdg-exec.jar</sourceFile>
|
||||
<destinationFile>${folder.clearing.distr.services}/imdg/imdg.jar</destinationFile>
|
||||
</fileSet>
|
||||
<fileSet>
|
||||
<sourceFile>${folder_root_clearing_imdg}/src/main/resources/application.properties</sourceFile>
|
||||
<destinationFile>${folder.clearing.distr.settings}/imdg/application.properties</destinationFile>
|
||||
|
|
@ -190,6 +203,10 @@
|
|||
<sourceFile>${folder_root_clearing_imdg_hist}/target/imdg-hist.jar</sourceFile>
|
||||
<destinationFile>${folder.clearing.distr.bin}/imdg-hist.jar</destinationFile>
|
||||
</fileSet>
|
||||
<fileSet>
|
||||
<sourceFile>${folder_root_clearing_imdg_hist}/target/imdg-hist.jar</sourceFile>
|
||||
<destinationFile>${folder.clearing.distr.services}/imdg-hist/imdg-hist.jar</destinationFile>
|
||||
</fileSet>
|
||||
<fileSet>
|
||||
<sourceFile>${folder_root_clearing_imdg_hist}/src/main/resources/application.properties</sourceFile>
|
||||
<destinationFile>${folder.clearing.distr.settings}/imdg-hist/application.properties</destinationFile>
|
||||
|
|
@ -210,6 +227,10 @@
|
|||
<sourceFile>${folder_root_dbf-exporter}/target/dbf-exporter.jar</sourceFile>
|
||||
<destinationFile>${folder.clearing.distr.bin}/dbf-exporter.jar</destinationFile>
|
||||
</fileSet>
|
||||
<fileSet>
|
||||
<sourceFile>${folder_root_dbf-exporter}/target/dbf-exporter.jar</sourceFile>
|
||||
<destinationFile>${folder.clearing.distr.services}/dbf-exporter/dbf-exporter.jar</destinationFile>
|
||||
</fileSet>
|
||||
<fileSet>
|
||||
<sourceFile>${folder_root_dbf-exporter}/src/main/resources/application.properties</sourceFile>
|
||||
<destinationFile>${folder.clearing.distr.settings}/dbf-exporter/application.properties</destinationFile>
|
||||
|
|
@ -229,6 +250,10 @@
|
|||
<sourceFile>${folder_root_dbf-importer}/target/dbf-importer.jar</sourceFile>
|
||||
<destinationFile>${folder.clearing.distr.bin}/dbf-importer.jar</destinationFile>
|
||||
</fileSet>
|
||||
<fileSet>
|
||||
<sourceFile>${folder_root_dbf-importer}/target/dbf-importer.jar</sourceFile>
|
||||
<destinationFile>${folder.clearing.distr.services}/dbf-importer/dbf-importer.jar</destinationFile>
|
||||
</fileSet>
|
||||
<fileSet>
|
||||
<sourceFile>${folder_root_dbf-importer}/src/main/resources/application.properties</sourceFile>
|
||||
<destinationFile>${folder.clearing.distr.settings}/dbf-importer/application.properties</destinationFile>
|
||||
|
|
@ -249,6 +274,10 @@
|
|||
<sourceFile>${folder_root_lim-exporter}/target/lim-exporter.jar</sourceFile>
|
||||
<destinationFile>${folder.clearing.distr.bin}/lim-exporter.jar</destinationFile>
|
||||
</fileSet>
|
||||
<fileSet>
|
||||
<sourceFile>${folder_root_lim-exporter}/target/lim-exporter.jar</sourceFile>
|
||||
<destinationFile>${folder.clearing.distr.services}/lim-exporter/lim-exporter.jar</destinationFile>
|
||||
</fileSet>
|
||||
<fileSet>
|
||||
<sourceFile>${folder_root_lim-exporter}/src/main/resources/application.properties</sourceFile>
|
||||
<destinationFile>${folder.clearing.distr.settings}/lim-exporter/application.properties</destinationFile>
|
||||
|
|
@ -268,6 +297,10 @@
|
|||
<sourceFile>${folder_root_swt-exporter}/target/swt-exporter.jar</sourceFile>
|
||||
<destinationFile>${folder.clearing.distr.bin}/swt-exporter.jar</destinationFile>
|
||||
</fileSet>
|
||||
<fileSet>
|
||||
<sourceFile>${folder_root_swt-exporter}/target/swt-exporter.jar</sourceFile>
|
||||
<destinationFile>${folder.clearing.distr.services}/swt-exporter/swt-exporter.jar</destinationFile>
|
||||
</fileSet>
|
||||
<fileSet>
|
||||
<sourceFile>${folder_root_swt-exporter}/src/main/resources/application.properties</sourceFile>
|
||||
<destinationFile>${folder.clearing.distr.settings}/swt-exporter/application.properties</destinationFile>
|
||||
|
|
@ -287,6 +320,10 @@
|
|||
<sourceFile>${folder_root_swt-importer}/target/swt-importer.jar</sourceFile>
|
||||
<destinationFile>${folder.clearing.distr.bin}/swt-importer.jar</destinationFile>
|
||||
</fileSet>
|
||||
<fileSet>
|
||||
<sourceFile>${folder_root_swt-importer}/target/swt-importer.jar</sourceFile>
|
||||
<destinationFile>${folder.clearing.distr.services}/swt-importer/swt-importer.jar</destinationFile>
|
||||
</fileSet>
|
||||
<fileSet>
|
||||
<sourceFile>${folder_root_swt-importer}/src/main/resources/application.properties</sourceFile>
|
||||
<destinationFile>${folder.clearing.distr.settings}/swt-importer/application.properties</destinationFile>
|
||||
|
|
@ -306,6 +343,10 @@
|
|||
<sourceFile>${folder_root_trade-importer}/target/trade-importer.jar</sourceFile>
|
||||
<destinationFile>${folder.clearing.distr.bin}/trade-importer.jar</destinationFile>
|
||||
</fileSet>
|
||||
<fileSet>
|
||||
<sourceFile>${folder_root_trade-importer}/target/trade-importer.jar</sourceFile>
|
||||
<destinationFile>${folder.clearing.distr.services}/trade-importer/trade-importer.jar</destinationFile>
|
||||
</fileSet>
|
||||
<fileSet>
|
||||
<sourceFile>${folder_root_trade-importer}/src/main/resources/application.properties</sourceFile>
|
||||
<destinationFile>${folder.clearing.distr.settings}/trade-importer/application.properties</destinationFile>
|
||||
|
|
@ -325,6 +366,10 @@
|
|||
<sourceFile>${folder_root_extdb-importer}/target/extdb-importer.jar</sourceFile>
|
||||
<destinationFile>${folder.clearing.distr.bin}/extdb-importer.jar</destinationFile>
|
||||
</fileSet>
|
||||
<fileSet>
|
||||
<sourceFile>${folder_root_extdb-importer}/target/extdb-importer.jar</sourceFile>
|
||||
<destinationFile>${folder.clearing.distr.services}/extdb-importer/extdb-importer.jar</destinationFile>
|
||||
</fileSet>
|
||||
<fileSet>
|
||||
<sourceFile>${folder_root_extdb-importer}/src/main/resources/application.properties</sourceFile>
|
||||
<destinationFile>${folder.clearing.distr.settings}/extdb-importer/application.properties</destinationFile>
|
||||
|
|
@ -344,6 +389,10 @@
|
|||
<sourceFile>${folder_root_account-service}/target/account-service.jar</sourceFile>
|
||||
<destinationFile>${folder.clearing.distr.bin}/account-service.jar</destinationFile>
|
||||
</fileSet>
|
||||
<fileSet>
|
||||
<sourceFile>${folder_root_account-service}/target/account-service.jar</sourceFile>
|
||||
<destinationFile>${folder.clearing.distr.services}/account-service/account-service.jar</destinationFile>
|
||||
</fileSet>
|
||||
<fileSet>
|
||||
<sourceFile>${folder_root_account-service}/src/main/resources/application.properties</sourceFile>
|
||||
<destinationFile>${folder.clearing.distr.settings}/account-service/application.properties</destinationFile>
|
||||
|
|
@ -363,6 +412,10 @@
|
|||
<sourceFile>${folder_root_company-service}/target/company-service.jar</sourceFile>
|
||||
<destinationFile>${folder.clearing.distr.bin}/company-service.jar</destinationFile>
|
||||
</fileSet>
|
||||
<fileSet>
|
||||
<sourceFile>${folder_root_company-service}/target/company-service.jar</sourceFile>
|
||||
<destinationFile>${folder.clearing.distr.services}/company-service/company-service.jar</destinationFile>
|
||||
</fileSet>
|
||||
<fileSet>
|
||||
<sourceFile>${folder_root_company-service}/src/main/resources/application.properties</sourceFile>
|
||||
<destinationFile>${folder.clearing.distr.settings}/company-service/application.properties</destinationFile>
|
||||
|
|
@ -382,6 +435,10 @@
|
|||
<sourceFile>${folder_root_clearing-service}/target/clearing-service.jar</sourceFile>
|
||||
<destinationFile>${folder.clearing.distr.bin}/clearing-service.jar</destinationFile>
|
||||
</fileSet>
|
||||
<fileSet>
|
||||
<sourceFile>${folder_root_clearing-service}/target/clearing-service.jar</sourceFile>
|
||||
<destinationFile>${folder.clearing.distr.services}/clearing-service/clearing-service.jar</destinationFile>
|
||||
</fileSet>
|
||||
<fileSet>
|
||||
<sourceFile>${folder_root_clearing-service}/src/main/resources/application.properties</sourceFile>
|
||||
<destinationFile>${folder.clearing.distr.settings}/clearing-service/application.properties</destinationFile>
|
||||
|
|
@ -401,6 +458,10 @@
|
|||
<sourceFile>${folder_root_scheduler-service}/target/scheduler-service.jar</sourceFile>
|
||||
<destinationFile>${folder.clearing.distr.bin}/scheduler-service.jar</destinationFile>
|
||||
</fileSet>
|
||||
<fileSet>
|
||||
<sourceFile>${folder_root_scheduler-service}/target/scheduler-service.jar</sourceFile>
|
||||
<destinationFile>${folder.clearing.distr.services}/scheduler-service/scheduler-service.jar</destinationFile>
|
||||
</fileSet>
|
||||
<fileSet>
|
||||
<sourceFile>${folder_root_scheduler-service}/src/main/resources/application.properties</sourceFile>
|
||||
<destinationFile>${folder.clearing.distr.settings}/scheduler-service/application.properties</destinationFile>
|
||||
|
|
@ -420,6 +481,10 @@
|
|||
<sourceFile>${folder_root_reports-service}/target/reports-service.jar</sourceFile>
|
||||
<destinationFile>${folder.clearing.distr.bin}/reports-service.jar</destinationFile>
|
||||
</fileSet>
|
||||
<fileSet>
|
||||
<sourceFile>${folder_root_reports-service}/target/reports-service.jar</sourceFile>
|
||||
<destinationFile>${folder.clearing.distr.services}/reports-service/reports-service.jar</destinationFile>
|
||||
</fileSet>
|
||||
<fileSet>
|
||||
<sourceFile>${folder_root_reports-service}/src/main/resources/application.properties</sourceFile>
|
||||
<destinationFile>${folder.clearing.distr.settings}/reports-service/application.properties</destinationFile>
|
||||
|
|
@ -439,6 +504,10 @@
|
|||
<sourceFile>${folder_root_registry-service}/target/registry-service.jar</sourceFile>
|
||||
<destinationFile>${folder.clearing.distr.bin}/registry-service.jar</destinationFile>
|
||||
</fileSet>
|
||||
<fileSet>
|
||||
<sourceFile>${folder_root_registry-service}/target/registry-service.jar</sourceFile>
|
||||
<destinationFile>${folder.clearing.distr.services}/registry-service/registry-service.jar</destinationFile>
|
||||
</fileSet>
|
||||
<fileSet>
|
||||
<sourceFile>${folder_root_registry-service}/src/main/resources/application.properties</sourceFile>
|
||||
<destinationFile>${folder.clearing.distr.settings}/registry-service/application.properties</destinationFile>
|
||||
|
|
@ -458,6 +527,10 @@
|
|||
<sourceFile>${folder_root_utility-service}/target/utility-service.jar</sourceFile>
|
||||
<destinationFile>${folder.clearing.distr.bin}/utility-service.jar</destinationFile>
|
||||
</fileSet>
|
||||
<fileSet>
|
||||
<sourceFile>${folder_root_utility-service}/target/utility-service.jar</sourceFile>
|
||||
<destinationFile>${folder.clearing.distr.services}/utility-service/utility-service.jar</destinationFile>
|
||||
</fileSet>
|
||||
<fileSet>
|
||||
<sourceFile>${folder_root_utility-service}/src/main/resources/application.properties</sourceFile>
|
||||
<destinationFile>${folder.clearing.distr.settings}/utility-service/application.properties</destinationFile>
|
||||
|
|
@ -480,6 +553,10 @@
|
|||
${folder.clearing.distr.bin}/gateway-api.jar
|
||||
</destinationFile>
|
||||
</fileSet>
|
||||
<fileSet>
|
||||
<sourceFile>${folder_root_gateway-api}/target/gateway-api.jar</sourceFile>
|
||||
<destinationFile>${folder.clearing.distr.services}/gateway-api/gateway-api.jar</destinationFile>
|
||||
</fileSet>
|
||||
<fileSet>
|
||||
<sourceFile>
|
||||
${folder_root_gateway-api}/src/main/resources/application.properties
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue