Merge branch 'dev' into psemenkov
This commit is contained in:
commit
4383255a91
32 changed files with 1470 additions and 206 deletions
|
|
@ -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="1.2.0.0">
|
||||
<meta version="1.3.0.0">
|
||||
<!-- _xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" _xsi:noNamespaceSchemaLocation="file:///E:/d/projects/meta/from/meta.xsd" -->
|
||||
<!--Здесь словари-->
|
||||
<enums>
|
||||
|
|
@ -29,32 +29,32 @@
|
|||
<code name="Код" shortname="Код" type="12"/>
|
||||
<name name="Наименование" shortname="Тип" type="2" length="255"/>
|
||||
</termType>
|
||||
<task name="Справочник задач" class="com.spicex.dictionary.TaskDictionary" table="TaskDictionary">
|
||||
<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="TaskStatusDictionary">
|
||||
<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"/>
|
||||
</taskStatus>
|
||||
<tradingStatus name="Справочник торговых статусов" class="com.spicex.dictionary.TradingStatusDictionary" table="TradingStatusDictionary">
|
||||
<dayStatus name="Справочник статусов дней" class="com.spicex.dictionary.DayStatusDictionary" table="day_status_dictionary">
|
||||
<id name="Идентификатор записи" shortname="ID" type="1"/>
|
||||
<code name="Код" shortname="Код" type="12"/>
|
||||
<name name="Торговый статус" shortname="Статус" type="2" length="50"/>
|
||||
</tradingStatus>
|
||||
<name name="Статус дня" shortname="Статус" type="2" length="50"/>
|
||||
</dayStatus>
|
||||
<transactionStatus name="Справочник статусов транзакций" class="com.spicex.dictionary.TransactionStatusDictionary" table="TransactionStatusDictionary">
|
||||
<id name="Идентификатор записи" shortname="ID" type="1"/>
|
||||
<code name="Код" shortname="Код" type="12"/>
|
||||
<name name="Статус транзакции" shortname="Статус" type="2" length="50"/>
|
||||
</transactionStatus>
|
||||
<source name="Справочник источников" class="com.spicex.dictionary.SourceDictionary" table="SourceDictionary">
|
||||
<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"/>
|
||||
</source>
|
||||
<clearingStatus name="Справочник результатов клиринга" class="com.spicex.dictionary.">
|
||||
</parent>
|
||||
<clearingStatus name="Справочник результатов клиринга" class="com.spicex.dictionary.">
|
||||
<id name="Идентификатор записи" shortname="ID" type="1"/>
|
||||
<code name="Код" shortname="Код" type="12"/>
|
||||
<name name="Наименование" shortname="Тип" type="2" length="255"/>
|
||||
|
|
@ -240,6 +240,11 @@
|
|||
<code name="Код" shortname="Код" type="12"/>
|
||||
<name name="Наименование" shortname="Наименование" type="2" length="50"/>
|
||||
</notificationStatus>
|
||||
<eventType name="Типы изменений записей" class="ru.clearing.platform.dictionary.EventTypeDictionary" table="EventTypeDictionary">
|
||||
<id name="Идентификатор" shortname="ID" type="1"/>
|
||||
<code name="Код" shortname="Код" type="12"/>
|
||||
<name name="Тип события" shortname="Событие" type="2" length="50"/>
|
||||
</eventType>
|
||||
</enums>
|
||||
<objects>
|
||||
<userCls name="Пользователь" class="ru.clearing.classes.statics.data.user.User" logUpdates="true" table="UserCls">
|
||||
|
|
@ -288,7 +293,7 @@
|
|||
<errorCode type="1" name="Код ошибки" shortname="Код ошибки" searchable="true" sortable="true" link="errorCode" linkCode="code"/>
|
||||
<errorText type="12" name="Полный текст ошибки" shortname="Ошибка" searchable="true" sortable="true" link="errorText" linkCode="text"/>
|
||||
</userConnect>
|
||||
<timetable name="Постоянное расписание операционного дня" class="ru.clearing.classes.statics.data.scheduler.Timetable" table="Timetable">
|
||||
<plannerTemplate name="Шаблон расписания операционного дня" class="ru.clearing.classes.statics.data.scheduler.Timetable" table="planner_template">
|
||||
<id type="1" name="Идентификатор" shortname="ID" searchable="true" sortable="true" visible="true"/>
|
||||
<createdAt field="created" type="4" name="Создано" shortname="Создано" searchable="true" sortable="true"/>
|
||||
<updatedAt field="updated" type="4" name="Изменено" shortname="Изменено" searchable="true" sortable="true"/>
|
||||
|
|
@ -302,41 +307,41 @@
|
|||
<taskStatus type="12" name="Статус" shortname="Статус" link="taskStatus" required="true"/>
|
||||
</post>
|
||||
<put name="Изменение расписания операционного дня" destination="">
|
||||
<id type="1" name="Идентификатор записи" shortname="ID" link="timetable" linkCode="id" required="true"/>
|
||||
<id type="1" name="Идентификатор записи" shortname="ID" link="plannerTemplate" linkCode="id" required="true"/>
|
||||
<task type="12" name="Идентификатор задачи" shortname="Задача" link="task"/>
|
||||
<taskTime type="5" name="Время задачи" shortname="Время"/>
|
||||
<taskStatus type="12" name="Статус" shortname="Статус" link="taskStatus"/>
|
||||
</put>
|
||||
<delete name="Удаление расписания операционного дня" destination="">
|
||||
<id type="1" name="Идентификатор записи" shortname="ID" link="timetable" linkCode="id" required="true"/>
|
||||
<id type="1" name="Идентификатор записи" shortname="ID" link="plannerTemplate" linkCode="id" required="true"/>
|
||||
</delete>
|
||||
</actions>
|
||||
</timetable>
|
||||
<tradingCalendar name="Торговые и неторговые дни" class="ru.clearing.classes.statics.data.scheduler.TradingCalendar" table="TradingCalendar">
|
||||
</plannerTemplate>
|
||||
<clearingCalendar name="Рабочие и нерабочие дни" class="ru.clearing.classes.statics.data.scheduler.TradingCalendar" table="clearing_calendar">
|
||||
<id type="1" name="Идентификатор" shortname="ID" searchable="true" sortable="true" visible="true"/>
|
||||
<createdAt field="created" type="4" name="Создано" shortname="Создано" searchable="true" sortable="true"/>
|
||||
<updatedAt field="updated" type="4" name="Изменено" shortname="Изменено" searchable="true" sortable="true"/>
|
||||
<clearingDate type="6" name="Дата" shortname="Дата" searchable="false" sortable="false" visible="true"/>
|
||||
<companyId type="1" name="Компания" shortname="Компания" searchable="false" sortable="false" visible="true" link="company"/>
|
||||
<tradingStatus type="12" name="Статус" shortname="Статус" searchable="false" sortable="true" visible="true" link="tradingStatus"/>
|
||||
<dayStatus type="12" name="Статус" shortname="Статус" searchable="false" sortable="true" visible="true" link="dayStatus"/>
|
||||
<actions>
|
||||
<post name="Добавление записи в календарь" destination="">
|
||||
<clearingDate type="6" name="Дата" shortname="Дата" required="true"/>
|
||||
<companyId type="1" name="Компания" shortname="Компания" link="company"/>
|
||||
<tradingStatus type="12" name="Статус" shortname="Статус" link="tradingStatus" required="true"/>
|
||||
<dayStatus type="12" name="Статус" shortname="Статус" link="dayStatus" required="true"/>
|
||||
</post>
|
||||
<put name="Изменение записи в календаре" destination="">
|
||||
<id type="1" name="Идентификатор записи" shortname="ID" link="tradingCalendar" linkCode="id" required="true"/>
|
||||
<id type="1" name="Идентификатор записи" shortname="ID" link="clearingCalendar" linkCode="id" required="true"/>
|
||||
<clearingDate type="6" name="Дата" shortname="Дата"/>
|
||||
<companyId type="1" name="Компания" shortname="Компания" link="company"/>
|
||||
<tradingStatus type="12" name="Статус" shortname="Статус" link="tradingStatus"/>
|
||||
<dayStatus type="12" name="Статус" shortname="Статус" link="dayStatus"/>
|
||||
</put>
|
||||
<delete name="Удаление записи из календаря" destination="">
|
||||
<id type="1" name="Идентификатор записи" shortname="ID" link="tradingCalendar" linkCode="id" required="true"/>
|
||||
<id type="1" name="Идентификатор записи" shortname="ID" link="clearingCalendar" linkCode="id" required="true"/>
|
||||
</delete>
|
||||
</actions>
|
||||
</tradingCalendar>
|
||||
<scheduler name="Расписание планировщика" class="ru.clearing.classes.statics.data.scheduler.Scheduler" table="Scheduler">
|
||||
</clearingCalendar>
|
||||
<planner name="Расписание" class="ru.clearing.classes.statics.data.scheduler.Scheduler" table="planner">
|
||||
<id type="1" name="Идентификатор" shortname="ID" searchable="true" sortable="true" visible="true"/>
|
||||
<createdAt field="created" type="4" name="Создано" shortname="Создано" searchable="true" sortable="true"/>
|
||||
<updatedAt field="updated" type="4" name="Изменено" shortname="Изменено" searchable="true" sortable="true"/>
|
||||
|
|
@ -347,7 +352,7 @@
|
|||
<taskStatus type="12" name="Статус" shortname="Статус" searchable="false" sortable="true" visible="true" link="taskStatus"/>
|
||||
<securityId type="1" name="Инструмент" shortname="Инструмент" searchable="false" sortable="true" visible="true" link="security"/>
|
||||
<actions>
|
||||
<post name="Новое расписание планировщика" destination="">
|
||||
<post name="Новое расписание" destination="">
|
||||
<task type="12" name="Идентификатор задачи" shortname="Задача" link="task" required="true"/>
|
||||
<taskTime type="5" name="Время" shortname="Время" required="true"/>
|
||||
<clearingDate type="6" name="Дата" shortname="Дата" required="true"/>
|
||||
|
|
@ -355,8 +360,8 @@
|
|||
<taskStatus type="12" name="Статус" shortname="Статус" link="taskStatus" required="true"/>
|
||||
<securityId type="1" name="Инструмент" shortname="Инструмент" link="security"/>
|
||||
</post>
|
||||
<put name="Изменение расписания планировщика" destination="">
|
||||
<id type="1" name="Идентификатор записи" shortname="ID" link="scheduler" required="true" linkCode="id"/>
|
||||
<put name="Изменение расписания" destination="">
|
||||
<id type="1" name="Идентификатор записи" shortname="ID" link="planner" required="true" linkCode="id"/>
|
||||
<task type="12" name="Идентификатор задачи" shortname="Задача" link="task"/>
|
||||
<taskTime type="5" name="Время" shortname="Время"/>
|
||||
<clearingDate type="6" name="Дата" shortname="Дата"/>
|
||||
|
|
@ -364,12 +369,12 @@
|
|||
<taskStatus type="12" name="Статус" shortname="Статус" link="taskStatus"/>
|
||||
<securityId type="1" name="Инструмент" shortname="Инструмент" link="security"/>
|
||||
</put>
|
||||
<delete name="Удаление расписания планировщика" destination="">
|
||||
<id type="1" name="Идентификатор записи" shortname="ID" link="scheduler" linkCode="id" required="true"/>
|
||||
<delete name="Удаление расписания" destination="">
|
||||
<id type="1" name="Идентификатор записи" shortname="ID" link="planner" linkCode="id" required="true"/>
|
||||
</delete>
|
||||
</actions>
|
||||
</scheduler>
|
||||
<schedulerAllToday name="Расписание на текущий день" class="ru.clearing.classes.statics.data.scheduler.SchedulerAllToday" table="SchedulerAllToday">
|
||||
</planner>
|
||||
<plannerAllToday name="Расписание на текущий день" class="ru.clearing.classes.statics.data.scheduler.SchedulerAllToday" table="planner_all_today">
|
||||
<id type="1" name="Идентификатор" shortname="ID" searchable="true" sortable="true" visible="true"/>
|
||||
<task type="12" name="Идентификатор задачи" shortname="Задача" searchable="true" sortable="true" visible="true" link="task"/>
|
||||
<taskTime type="5" name="Время" shortname="Время" searchable="true" sortable="true" visible="true"/>
|
||||
|
|
@ -377,10 +382,10 @@
|
|||
<market type="12" name="Секция" shortname="Секция" searchable="true" sortable="true" visible="true" link="market"/>
|
||||
<taskStatus type="12" name="Статус" shortname="Статус" searchable="true" sortable="true" visible="true" link="taskStatus"/>
|
||||
<securityId type="1" name="Инструмент" shortname="Инструмент" searchable="true" sortable="true" visible="true" link="security"/>
|
||||
<source type="12" name="Источник записи расписания" shortname="Источник" searchable="true" sortable="true" link="source"/>
|
||||
<origId type="1" name="Идентификатор источника" shortname="ID" searchable="false" sortable="false"/>
|
||||
</schedulerAllToday>
|
||||
<taskRunner name="Запуск задачи" class="ru.clearing.classes.statics.data.scheduler.TaskRunner" table="TaskRunnerRequest">
|
||||
<parent type="12" name="Источник записи расписания" shortname="Источник" searchable="true" sortable="true" link="parent"/>
|
||||
<parentId type="1" name="Идентификатор источника" shortname="ID" searchable="false" sortable="false"/>
|
||||
</plannerAllToday>
|
||||
<launcher name="Запуск задачи" class="ru.clearing.classes.statics.data.scheduler.TaskRunner" table="launcher_request">
|
||||
<id type="1" name="Идентификатор" shortname="ID" searchable="true" sortable="true" visible="true"/>
|
||||
<createdAt field="created" type="4" name="Создано" shortname="Создано" searchable="true" sortable="true"/>
|
||||
<updatedAt field="updated" type="4" name="Изменено" shortname="Изменено" searchable="true" sortable="true"/>
|
||||
|
|
@ -396,8 +401,8 @@
|
|||
<createOrderConfirm group="Обмен с расчетной организацией" name="Получение подтверждения переводов (загрузка ДФ-04)" destination=""/>
|
||||
<getTrades group="Обмен с Торговой системой" name="Получение сделок из Торговой системы" destination=""/>
|
||||
</actions>
|
||||
</taskRunner>
|
||||
<company name="Участник" class="ru.clearing.classes.statics.data.company.Company" logUpdates="true">
|
||||
</launcher>
|
||||
<company name="Компании" class="ru.clearing.classes.statics.data.company.Company" logUpdates="true">
|
||||
<id type="1" name="Идентификатор записи" shortname="ID" searchable="true" sortable="true" visible="true"/>
|
||||
<createdAt field="created" type="4" name="Дата и время создания записи" shortname="Создано" searchable="true" sortable="true"/>
|
||||
<updatedAt field="updated" type="4" name="Дата и время изменения записи" shortname="Изменено" searchable="true" sortable="true"/>
|
||||
|
|
@ -408,12 +413,12 @@
|
|||
<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"/>
|
||||
<actions>
|
||||
<delete name="Удаление участника" destination="">
|
||||
<delete name="Удаление компании" destination="">
|
||||
<id type="1" name="Идентификатор записи" shortname="ID" link="company" linkCode="id" required="true"/>
|
||||
</delete>
|
||||
</actions>
|
||||
</company>
|
||||
<companyInfo name="Профиль Компании" class="ru.clearing.classes.statics.data.profile.CompanyInfo" logUpdates="true">
|
||||
<companyInfo name="Профили Компаний" class="ru.clearing.classes.statics.data.profile.CompanyInfo" logUpdates="true">
|
||||
<id type="1" name="Идентификатор записи" shortname="ID" searchable="true" sortable="true" visible="true"/>
|
||||
<companyId type="1" name="Идентификатор Компании" shortname="Идентификатор Компании" searchable="true" sortable="true" visible="true" link="company"/>
|
||||
<corporationSoleType type="12" name="Идентификатор единоличного исполнительного органа" shortname="Единоличный исполнительный орган" searchable="true" sortable="true" visible="true" link="corporationSoleType"/>
|
||||
|
|
@ -506,7 +511,7 @@
|
|||
<validFromDate type="6" name="Дата начала срока действия" shortname="Дата начала срока действия" searchable="true" sortable="true" required="true"/>
|
||||
<validToDate type="6" name="Дата окончания срока действия" shortname="Дата окончания срока действия" searchable="true" sortable="true" required="true"/>
|
||||
<link type="2" length="255" name="Ссылка на документ" shortname="Ссылка на документ" searchable="true" sortable="true" visible="true"/>
|
||||
</post>
|
||||
</post>
|
||||
</actions>
|
||||
</profileDocument>
|
||||
<companySymbols name="Реквизиты Компании" class="ru.clearing.classes.statics.data.company.CompanySymbols">
|
||||
|
|
@ -852,107 +857,123 @@
|
|||
<resultStatus type="12" name="Статус выгрузки документа" shortname="Статус" searchable="true" sortable="true" visible="true" link="resultStatus"/>
|
||||
</outDocumentJournal>
|
||||
<executionDeposit name="Сделки" class="ru.clearing.classes.TransactionData.Execution.DepositExecution" table="execution_deposit">
|
||||
<id type="1" name="ID записи" shortname="ID записи" visible="false" searchable="true" sortable="true"/>
|
||||
<exchangeExecutionId type="1" name="Идентификационный номер сделки в Торговой системе" shortname="Сделка №" visible="true" searchable="true" sortable="true"/>
|
||||
<exchangeExecutionTime type="4" name="Время в Торговой системе" shortname="Время сделки" visible="true" searchable="true" sortable="true"/>
|
||||
<id type="1" name="ID записи" shortname="ID" visible="false" searchable="true" sortable="true"/>
|
||||
<exchangeExecutionId type="1" name="Идентификационный номер сделки в Торговой системе" shortname="Номер сделки" visible="true" searchable="true" sortable="true"/>
|
||||
<exchangeExecutionTime type="4" name="Время заключения сделки в Торговой системе" shortname="Время заключения сделки" visible="true" searchable="true" sortable="true"/>
|
||||
<createdAt type="5" name="Время регистрации сделки" shortname="Время сделки" visible="false" searchable="true" sortable="true"/>
|
||||
<updatedAt type="5" name="Время изменения сделки" shortname="Время изменения" visible="false" searchable="true" sortable="true"/>
|
||||
<tradingDate type="6" name="Дата торгов" shortname="Дата торгов" visible="false" searchable="true" sortable="true"/>
|
||||
<tradingDate type="6" name="Дата заключения сделки" shortname="Дата заключения сделки" visible="true" searchable="true" sortable="true"/>
|
||||
<clearingDate type="6" name="Дата клиринга" shortname="Дата клиринга" visible="false" searchable="true" sortable="true"/>
|
||||
<accountId field="tradingClearingAccount.id" type="1" name="Торговый счет" shortname="Счет" visible="true" searchable="true" sortable="true" link="account" linkCode="account"/>
|
||||
<market type="12" name="Секция финансового инструмента" shortname="Секция" visible="true" searchable="true" sortable="true" link="market"/>
|
||||
<price field="financialProduct.interestRate.value" 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"/>
|
||||
<firstLegAmount type="11" name="Объем сделки" shortname="Объем" visible="true" searchable="true" sortable="true"/>
|
||||
<secondLegAmount type="11" name="Объем возврата" shortname="Объем возврата" visible="true" searchable="true" sortable="true"/>
|
||||
<secondLegAmount type="11" name="Объем возврата" shortname="Объем возврата" visible="false" searchable="true" sortable="true"/>
|
||||
<interestAmount type="11" name="Объем процентов" shortname="Проценты" visible="false" searchable="true" sortable="true"/>
|
||||
<side type="12" name="Направление сделки" shortname="Направление" visible="true" searchable="true" sortable="true" link="moneyFlowSide"/>
|
||||
<settlementCurrency type="12" name="Валюта расчетов по инструменту" shortname="Валюта" visible="true" searchable="true" sortable="true" link="currencyCode" linkCode="currencyCode"/>
|
||||
<companyId field="company.id" type="1" name="Название компании" shortname="Компания" visible="true" searchable="true" sortable="true" link="company"/>
|
||||
<duration type="1" name="Срок, дней" shortname="Срок" visible="true" searchable="true" sortable="true"/>
|
||||
<firstLegSettlementDate field="firstLeg.settlementDate" type="6" name="Дата размещения" shortname="Дата размещения" visible="true" searchable="true" sortable="true"/>
|
||||
<secondLegSettlementDate field="secondLeg.settlementDate" type="6" name="Дата возврата" shortname="Дата возврата" visible="true" searchable="true" sortable="true"/>
|
||||
<firstLegSettlementCode field="firstLeg.settlementCode" type="6" name="Код расчетов при размещении" shortname="Код расчетов при размещении" visible="false" searchable="true" sortable="true"/>
|
||||
<secondLegSettlementCode field="secondLeg.settlementCode" type="6" name="Код расчетов при возврате" shortname="Код расчетов" visible="true" searchable="true" sortable="true"/>
|
||||
<securityFullName type="2" length="255" name="Наименование инструмента" shortname="Инструмент" visible="false" searchable="true" sortable="true"/>
|
||||
<securitySymbol type="2" length="255" name="Код инструмента в Торговой Системе" shortname="Код инструмента" visible="false" searchable="true" sortable="true"/>
|
||||
<securityId type="1" name="Финансовый инструмент" shortname="Код биржевого инструмента / товара" visible="true" searchable="true" sortable="true" link="moneyMarketSecurity" linkCode="securitySymbol"/>
|
||||
<counterPartyId type="1" name="Имя компании-партнера, с которым заключена сделка" shortname="Партнер" visible="false" searchable="true" sortable="true" link="company"/>
|
||||
<coverageStatus type="12" name="Cтатус достаточности обеспечения" shortname="Обеспеченность" searchable="true" sortable="true" link="allowed"/>
|
||||
<sessionId type="1" name="Идентификатор сессии" shortname="Сессия" visible="true" searchable="true" sortable="true" link="moneyMarketSession"/>
|
||||
<moneyMarketSecurityId type="1" name="Финансовый инструмент" shortname="Инструмент" visible="false" searchable="true" sortable="true" link="moneyMarketSecurity"/>
|
||||
<securitySymbol type="2" length="255" name="Код инструмента в Торговой Системе" shortname="Код инструмента" visible="true" searchable="true" sortable="true"/>
|
||||
<securityFullName type="2" length="255" name="Наименование инструмента" shortname="Инструмент" visible="true" searchable="true" sortable="true"/>
|
||||
</executionDeposit>
|
||||
<dealRegister name="Реестр сделок" class="" table="deal_register">
|
||||
<id type="1" name="ID записи" shortname="ID" visible="false" searchable="true" sortable="true"/>
|
||||
<createdAt type="5" name="Время регистрации" shortname="Время регистрации" visible="false" searchable="true" sortable="true"/>
|
||||
<updatedAt type="5" name="Время изменения" shortname="Время изменения" visible="false" searchable="true" sortable="true"/>
|
||||
<clearingDate type="6" name="Дата клиринга" shortname="Дата клиринга" visible="false" searchable="true" sortable="true"/>
|
||||
<executionId type="1" name="Идентификационный номер сделки в Клиринговой системе" shortname="Номер сделки КС" visible="false" searchable="true" sortable="true"/>
|
||||
<exchangeExecutionId type="1" name="Идентификационный номер сделки в Торговой системе" shortname="Номер сделки" visible="true" searchable="true" sortable="true"/>
|
||||
<exchangeExecutionTime type="4" name="Время заключения сделки в Торговой системе" shortname="Время заключения сделки" visible="true" searchable="true" sortable="true"/>
|
||||
<tradingDate type="6" name="Дата заключения сделки" shortname="Дата заключения сделки" visible="true" searchable="true" sortable="true"/>
|
||||
<account type="2" length="50" name="Торговый счет" shortname="Счет" visible="true" searchable="true" sortable="true"/>
|
||||
<market type="12" name="Секция финансового инструмента" shortname="Секция" visible="true" searchable="true" sortable="true" link="market"/>
|
||||
<price type="10" name="Ставка по депозиту" shortname="Ставка, %" visible="true" searchable="true" sortable="true"/>
|
||||
<amount type="11" name="Сумма сделки" shortname="Сумма сделки" visible="true" searchable="true" sortable="true"/>
|
||||
<side type="12" name="Направление сделки" shortname="Направление" visible="true" searchable="true" sortable="true" link="moneyFlowSide"/>
|
||||
<settlementCurrency type="12" name="Валюта расчетов по инструменту" shortname="Валюта" visible="true" searchable="true" sortable="true" link="currencyCode" linkCode="currencyCode"/>
|
||||
<companyId type="1" name="Название компании" shortname="Компания" visible="true" searchable="true" sortable="true" link="company"/>
|
||||
<firstLegSettlementDate type="6" name="Дата размещения" shortname="Дата размещения" visible="true" searchable="true" sortable="true"/>
|
||||
<secondLegSettlementDate type="6" name="Дата возврата" shortname="Дата возврата" visible="true" searchable="true" sortable="true"/>
|
||||
<securityFullName type="2" length="255" name="Наименование инструмента" shortname="Инструмент" visible="false" searchable="true" sortable="true"/>
|
||||
<securitySymbol type="2" length="255" name="Код инструмента в Торговой Системе" shortname="Код инструмента" visible="false" searchable="true" sortable="true"/>
|
||||
<securityId type="1" name="Финансовый инструмент" shortname="Код биржевого инструмента / товара" visible="true" searchable="true" sortable="true" link="security" linkCode="securitySymbol"/>
|
||||
<counterPartyId type="1" name="Имя компании-партнера, с которым заключена сделка" shortname="Партнер" visible="false" searchable="true" sortable="true" link="company"/>
|
||||
<coverageStatus type="12" name="Cтатус достаточности обеспечения" shortname="Обеспеченность" searchable="true" sortable="true" link="allowed"/>
|
||||
</executionDeposit>
|
||||
<executionDepositRegister name="Реестр сделок" class="ru.clearing.classes.TransactionData.Execution.DepositExecution" table="ExecutionDeposit">
|
||||
<id type="1" name="ID записи" shortname="ID записи" visible="false" searchable="true" sortable="true"/>
|
||||
<exchangeExecutionId type="3" name="Идентификационный номер сделкт в Торговой Системе" shortname="Сделка №" visible="true" searchable="true" sortable="true"/>
|
||||
<exchangeExecutionTime type="6" name="Время в Торговой Системе" shortname="Время сделки" visible="true" searchable="true" sortable="true"/>
|
||||
<createdAt type="5" name="Время регистрации сделки" shortname="Время сделки" visible="true" searchable="true" sortable="true"/>
|
||||
<updatedAt type="5" name="Время изменения сделки" shortname="Время изменения" visible="false" searchable="true" sortable="true"/>
|
||||
<tradingDate type="6" name="Дата торгов" shortname="Дата торгов" visible="false" searchable="true" sortable="true"/>
|
||||
<sessionId type="1" name="Идентификатор сессии" shortname="Сессия" visible="true" searchable="true" sortable="true" link="moneyMarketSession"/>
|
||||
</dealRegister>
|
||||
<admittedDealRegister name="Реестр сделок, допущенных к клирингу" class="" table="admitted_deal_register">
|
||||
<id type="1" name="ID записи" shortname="ID" visible="false" searchable="true" sortable="true"/>
|
||||
<createdAt type="5" name="Время регистрации" shortname="Время регистрации" visible="false" searchable="true" sortable="true"/>
|
||||
<updatedAt type="5" name="Время изменения" shortname="Время изменения" visible="false" searchable="true" sortable="true"/>
|
||||
<clearingDate type="6" name="Дата клиринга" shortname="Дата клиринга" visible="false" searchable="true" sortable="true"/>
|
||||
<accountId field="tradingClearingAccount.id" type="1" name="Торговый счет" shortname="Счет" visible="false" searchable="true" sortable="true" link="account" linkCode="account"/>
|
||||
<market type="12" name="Секция финансового инструмента" shortname="Секция" visible="true" searchable="true" sortable="true" link="market"/>
|
||||
<price field="financialProduct.interestRate.value" type="10" name="Ставка по депозиту" shortname="Ставка,%" visible="true" searchable="true" sortable="true"/>
|
||||
<amount field="financialProduct.amount" type="3" name="Объем сделки" shortname="Объем сделки" visible="true" searchable="true" sortable="true"/>
|
||||
<sideId type="1" name="Направление заявки" shortname="Направление" visible="true" searchable="true" sortable="true" link="moneyFlowSide"/>
|
||||
<settlementCurrencyId type="1" name="Валюта расчетов по инструменту" shortname="Валюта" visible="true" searchable="true" sortable="true" link="currencyCode" linkCode="currencyCode"/>
|
||||
<companyId field="company.id" type="1" name="Название компании" shortname="Участник" visible="false" searchable="true" sortable="true" link="company"/>
|
||||
<firstLegSettlementDate field="firstLeg.settlementDate" type="6" name="Дата размещения" shortname="Дата размещения" visible="true" searchable="true" sortable="true"/>
|
||||
<secondLegSettlementDate field="secondLeg.settlementDate" type="6" name="Дата возврата" shortname="Дата возврата" visible="true" searchable="true" sortable="true"/>
|
||||
<symbolName type="2" length="50" name="Наименование инструмента в Торговой Системе" shortname="Инструмент" visible="false" searchable="true" sortable="true"/>
|
||||
<symbolCode type="2" length="20" name="Код инструмента в Торговой Системе" shortname="Код инструмента" visible="false" searchable="true" sortable="true"/>
|
||||
<securitiesDepositId type="1" name="Наименование финансового инструмента" shortname="Инструмент" visible="true" searchable="true" sortable="true" link="security" linkCode="shortname"/>
|
||||
<counterPartyId type="1" name="Имя фирмы-партнера, с которым заключена сделка" shortname="Партнер" visible="true" searchable="true" sortable="true" link="company"/>
|
||||
<coverageStatusId type="1" name="Cтатус достаточности обеспечения" shortname="Обеспеченность" searchable="true" sortable="true" link="allowed"/>
|
||||
<sessionId type="1" name="Сессия" shortname="Сессия" visible="true" searchable="true" sortable="true" link="moneyMarketSession"/>
|
||||
<subscription enabled="true" destination="executionDeposit.state"/>
|
||||
</executionDepositRegister>
|
||||
<admittedDeal name="Реестр сделок, допущенных к клирингу" class="ru.clearing.classes.statics.data.misc.AdmittedDeal">
|
||||
<executionId type="1" name="Идентификационный номер сделки в Клиринговой системе" shortname="Номер сделки КС" visible="false" searchable="true" sortable="true"/>
|
||||
<companyFullName type="2" length="255" name="Наименование биржи" shortname="Наименование биржи" searchable="true" sortable="true" visible="true"/>
|
||||
<executionDepositRegisterTradingDate type="4" name="Дата заключения сделки" shortname="Дата сделки" searchable="true" sortable="true"/>
|
||||
<exchangeExecutionId type="2" length="255" name="Номер сделки" shortname="Номер" searchable="true" sortable="true" visible="true"/>
|
||||
<exchangeExecutionTime type="5" name="Время заключения сделки" shortname="Время сделки" searchable="false" sortable="false" visible="true"/>
|
||||
<securityId type="1" name="Биржевой код инструмента" shortname="Инструмент" visible="true" searchable="true" sortable="true" link="security" linkCode="shortname"/>
|
||||
<securityName type="2" length = "255" name="Наименование инструмента" shortname="Инструмент" searchable="true" sortable="true" visible="true"/>
|
||||
<tradingDate type="6" name="Дата заключения сделки" shortname="Дата заключения сделки" visible="true" searchable="true" sortable="true"/>
|
||||
<exchangeExecutionId type="1" name="Идентификационный номер сделки в Торговой системе" shortname="Номер сделки" visible="true" searchable="true" sortable="true"/>
|
||||
<exchangeExecutionTime type="4" name="Время заключения сделки в Торговой системе" shortname="Время заключения сделки" visible="true" searchable="true" sortable="true"/>
|
||||
<securitySymbol type="2" length="255" name="Финансовый инструмент" shortname="Код биржевого инструмента / товара" visible="true" searchable="true" sortable="true"/>
|
||||
<securityFullName type="2" length="255" name="Наименование инструмента" shortname="Инструмент" visible="false" searchable="true" sortable="true"/>
|
||||
<sellerFullName type="2" length="255" name="Наименование продавца" shortname="Наименование продавца" searchable="true" sortable="true" visible="true"/>
|
||||
<sellerClearingCode type="2" length="255" name="Код продавца" shortname="Код продавца" searchable="true" sortable="true" visible="true"/>
|
||||
<sellerAccount type="2" name="Счет продавца" shortname="Счет продавца" searchable="true" sortable="true" visible="true"/>
|
||||
<buyerFullName type="2" length="255" name="Наименование продавца" shortname="Наименование продавца" searchable="true" sortable="true" visible="true"/>
|
||||
<buyerClearingCode type="2" length="255" name="Код продавца" shortname="Код продавца" searchable="true" sortable="true" visible="true"/>
|
||||
<buyerAccount type="2" name="Счет продавца" shortname="Счет продавца" searchable="true" sortable="true" visible="true"/>
|
||||
<executionDepositRegisterAmount type="10" name="Сумма сделки" shortname="Сумма сделки" searchable="true" sortable="true"/>
|
||||
</admittedDeal>
|
||||
<dealPassedControl name="Реестр сделок, прошедших процедуру контроля обеспечения" coverageStatus="ALWD">
|
||||
<sellerClearingCode type="2" length="255" name="Код продавца" shortname="Код продавца" searchable="true" sortable="true" visible="true"/>
|
||||
<sellerAccount type="2" length="50" name="Счет продавца" shortname="Счет продавца" searchable="true" sortable="true" visible="true"/>
|
||||
<buyerFullName type="2" length="255" name="Наименование покупателя" shortname="Наименование покупателя" searchable="true" sortable="true" visible="true"/>
|
||||
<buyerClearingCode type="2" length="255" name="Код покупателя" shortname="Код покупателя" searchable="true" sortable="true" visible="true"/>
|
||||
<buyerAccount type="2" length="50" name="Счет покупателя" shortname="Счет покупателя" searchable="true" sortable="true" visible="true"/>
|
||||
<amount type="11" name="Сумма сделки" shortname="Сумма сделки" visible="true" searchable="true" sortable="true"/>
|
||||
</admittedDealRegister>
|
||||
<coveredDealRegister name="Реестр сделок, прошедших процедуру контроля обеспечения" table="covered_deal_register">
|
||||
<id type="1" name="ID записи" shortname="ID" visible="false" searchable="true" sortable="true"/>
|
||||
<createdAt type="5" name="Время регистрации" shortname="Время регистрации" visible="false" searchable="true" sortable="true"/>
|
||||
<updatedAt type="5" name="Время изменения" shortname="Время изменения" visible="false" searchable="true" sortable="true"/>
|
||||
<clearingDate type="6" name="Дата клиринга" shortname="Дата клиринга" visible="false" searchable="true" sortable="true"/>
|
||||
<executionId type="1" name="Идентификационный номер сделки в Клиринговой системе" shortname="Номер сделки КС" visible="false" searchable="true" sortable="true"/>
|
||||
<companyFullName type="2" length="255" name="Наименование биржи" shortname="Наименование биржи" searchable="true" sortable="true" visible="true"/>
|
||||
<executionDepositRegisterTradingDate type="4" name="Дата заключения сделки" shortname="Дата сделки" searchable="true" sortable="true"/>
|
||||
<exchangeExecutionId type="2" length="255" name="Номер сделки" shortname="Номер" searchable="true" sortable="true" visible="true"/>
|
||||
<exchangeExecutionTime type="5" name="Время заключения сделки" shortname="Время сделки" searchable="false" sortable="false" visible="true"/>
|
||||
<securityId type="1" name="Биржевой код инструмента" shortname="Инструмент" visible="true" searchable="true" sortable="true" link="security" linkCode="shortname"/>
|
||||
<securityName type="2" length = "255" name="Наименование инструмента" shortname="Инструмент" searchable="true" sortable="true" visible="true"/>
|
||||
<tradingDate type="6" name="Дата заключения сделки" shortname="Дата заключения сделки" visible="true" searchable="true" sortable="true"/>
|
||||
<exchangeExecutionId type="1" name="Идентификационный номер сделки в Торговой системе" shortname="Номер сделки" visible="true" searchable="true" sortable="true"/>
|
||||
<exchangeExecutionTime type="4" name="Время заключения сделки в Торговой системе" shortname="Время заключения сделки" visible="true" searchable="true" sortable="true"/>
|
||||
<securitySymbol type="2" length="255" name="Финансовый инструмент" shortname="Код биржевого инструмента / товара" visible="true" searchable="true" sortable="true"/>
|
||||
<securityFullName type="2" length="255" name="Наименование инструмента" shortname="Инструмент" visible="false" searchable="true" sortable="true"/>
|
||||
<sellerFullName type="2" length="255" name="Наименование продавца" shortname="Наименование продавца" searchable="true" sortable="true" visible="true"/>
|
||||
<sellerClearingCode type="2" length="255" name="Код продавца" shortname="Код продавца" searchable="true" sortable="true" visible="true"/>
|
||||
<sellerAccount type="2" name="Счет продавца" shortname="Счет продавца" searchable="true" sortable="true" visible="true"/>
|
||||
<buyerFullName type="2" length="255" name="Наименование продавца" shortname="Наименование продавца" searchable="true" sortable="true" visible="true"/>
|
||||
<buyerClearingCode type="2" length="255" name="Код продавца" shortname="Код продавца" searchable="true" sortable="true" visible="true"/>
|
||||
<buyerAccount type="2" name="Счет продавца" shortname="Счет продавца" searchable="true" sortable="true" visible="true"/>
|
||||
<executionDepositRegisterAmount type="10" name="Сумма сделки" shortname="Сумма сделки" searchable="true" sortable="true"/>
|
||||
</dealPassedControl>
|
||||
<dealUnPassedControl name="Реестр сделок, не прошедших процедуру контроля обеспечения" coverageStatus="DEND">
|
||||
<sellerClearingCode type="2" length="255" name="Код продавца" shortname="Код продавца" searchable="true" sortable="true" visible="true"/>
|
||||
<sellerAccount type="2" length="50" name="Счет продавца" shortname="Счет продавца" searchable="true" sortable="true" visible="true"/>
|
||||
<buyerFullName type="2" length="255" name="Наименование покупателя" shortname="Наименование покупателя" searchable="true" sortable="true" visible="true"/>
|
||||
<buyerClearingCode type="2" length="255" name="Код покупателя" shortname="Код покупателя" searchable="true" sortable="true" visible="true"/>
|
||||
<buyerAccount type="2" length="50" name="Счет покупателя" shortname="Счет покупателя" searchable="true" sortable="true" visible="true"/>
|
||||
<amount type="11" name="Сумма сделки" shortname="Сумма сделки" visible="true" searchable="true" sortable="true"/>
|
||||
</coveredDealRegister>
|
||||
<uncoveredDealRegister name="Реестр сделок, не прошедших процедуру контроля обеспечения" table="uncovered_deal_register">
|
||||
<id type="1" name="ID записи" shortname="ID" visible="false" searchable="true" sortable="true"/>
|
||||
<createdAt type="5" name="Время регистрации" shortname="Время регистрации" visible="false" searchable="true" sortable="true"/>
|
||||
<updatedAt type="5" name="Время изменения" shortname="Время изменения" visible="false" searchable="true" sortable="true"/>
|
||||
<clearingDate type="6" name="Дата клиринга" shortname="Дата клиринга" visible="false" searchable="true" sortable="true"/>
|
||||
<executionId type="1" name="Идентификационный номер сделки в Клиринговой системе" shortname="Номер сделки КС" visible="false" searchable="true" sortable="true"/>
|
||||
<companyFullName type="2" length="255" name="Наименование биржи" shortname="Наименование биржи" searchable="true" sortable="true" visible="true"/>
|
||||
<executionDepositRegisterTradingDate type="4" name="Дата заключения сделки" shortname="Дата сделки" searchable="true" sortable="true"/>
|
||||
<exchangeExecutionId type="2" length="255" name="Номер сделки" shortname="Номер" searchable="true" sortable="true" visible="true"/>
|
||||
<exchangeExecutionTime type="5" name="Время заключения сделки" shortname="Время сделки" searchable="false" sortable="false" visible="true"/>
|
||||
<securityId type="1" name="Биржевой код инструмента" shortname="Инструмент" visible="true" searchable="true" sortable="true" link="security" linkCode="shortname"/>
|
||||
<securityName type="2" length = "255" name="Наименование инструмента" shortname="Инструмент" searchable="true" sortable="true" visible="true"/>
|
||||
<tradingDate type="6" name="Дата заключения сделки" shortname="Дата заключения сделки" visible="true" searchable="true" sortable="true"/>
|
||||
<exchangeExecutionId type="1" name="Идентификационный номер сделки в Торговой системе" shortname="Номер сделки" visible="true" searchable="true" sortable="true"/>
|
||||
<exchangeExecutionTime type="4" name="Время заключения сделки в Торговой системе" shortname="Время заключения сделки" visible="true" searchable="true" sortable="true"/>
|
||||
<securitySymbol type="2" length="255" name="Финансовый инструмент" shortname="Код биржевого инструмента / товара" visible="true" searchable="true" sortable="true"/>
|
||||
<securityFullName type="2" length="255" name="Наименование инструмента" shortname="Инструмент" visible="false" searchable="true" sortable="true"/>
|
||||
<sellerFullName type="2" length="255" name="Наименование продавца" shortname="Наименование продавца" searchable="true" sortable="true" visible="true"/>
|
||||
<sellerClearingCode type="2" length="255" name="Код продавца" shortname="Код продавца" searchable="true" sortable="true" visible="true"/>
|
||||
<sellerAccount type="2" name="Счет продавца" shortname="Счет продавца" searchable="true" sortable="true" visible="true"/>
|
||||
<buyerFullName type="2" length="255" name="Наименование продавца" shortname="Наименование продавца" searchable="true" sortable="true" visible="true"/>
|
||||
<buyerClearingCode type="2" length="255" name="Код продавца" shortname="Код продавца" searchable="true" sortable="true" visible="true"/>
|
||||
<buyerAccount type="2" name="Счет продавца" shortname="Счет продавца" searchable="true" sortable="true" visible="true"/>
|
||||
<executionDepositRegisterAmount type="10" name="Сумма сделки" shortname="Сумма сделки" searchable="true" sortable="true"/>
|
||||
<result type="2" length="3" name="Результат клиринга" shortname="Результат клиринга" searchable="true" sortable="true"/>
|
||||
</dealUnPassedControl>
|
||||
<reportRegister name="Реестр отчетов" class="com.moex.platform.classes.TransactionData.Execution.DepositExecution" table="reportRegister">
|
||||
<sellerClearingCode type="2" length="255" name="Код продавца" shortname="Код продавца" searchable="true" sortable="true" visible="true"/>
|
||||
<sellerAccount type="2" length="50" name="Счет продавца" shortname="Счет продавца" searchable="true" sortable="true" visible="true"/>
|
||||
<buyerFullName type="2" length="255" name="Наименование покупателя" shortname="Наименование покупателя" searchable="true" sortable="true" visible="true"/>
|
||||
<buyerClearingCode type="2" length="255" name="Код покупателя" shortname="Код покупателя" searchable="true" sortable="true" visible="true"/>
|
||||
<buyerAccount type="2" length="50" name="Счет покупателя" shortname="Счет покупателя" searchable="true" sortable="true" visible="true"/>
|
||||
<amount type="11" name="Сумма сделки" shortname="Сумма сделки" visible="true" searchable="true" sortable="true"/>
|
||||
<result type="12" name="Результат клиринга" shortname="Результат клиринга" visible="true" searchable="true" sortable="true" link="resultStatus"/>
|
||||
</uncoveredDealRegister>
|
||||
<reportRegister name="Реестр отчетов" class="com.moex.platform.classes.TransactionData.Execution.DepositExecution" table="reportRegister">
|
||||
<id type="1" name="ID записи" shortname="ID записи" visible="false" searchable="true" sortable="true"/>
|
||||
<createdAt type="5" name="Время регистрации" shortname="Время" visible="true" searchable="true" sortable="true"/>
|
||||
<updatedAt type="5" name="Время изменения" shortname="Время изменения" visible="false" searchable="true" sortable="true"/>
|
||||
|
|
@ -1002,8 +1023,9 @@
|
|||
<companyId type="1" name="Идентификатор участника" shortname="Участник" searchable="true" sortable="true" link="company"/>
|
||||
<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"/>
|
||||
<clearingDate type="6" name="Дата клиринга" shortname="Дата клиринга" visible="false" searchable="true" sortable="true"/>
|
||||
<accountId type="1" name="Идентификатор счета" shortname="Идентификатор счета" searchable="true" sortable="true" link="account"/>
|
||||
<accountType type="1" name="Тип счета" shortname="Тип счета" searchable="true" sortable="true" link="account" linkCode="accountType"/>
|
||||
<accountType type="12" name="Тип счета" shortname="Тип счета" searchable="true" sortable="true" link="accountType"/>
|
||||
<account type="2" length="50" name="Счет" shortname="Счет" searchable="true" sortable="true"/>
|
||||
<liabilitiesAmount type="11" name="Регистр «Обязательства по денежным средствам, сформированные по результатам собственных сделок Участника клиринга», исключая проценты" shortname="Сумма обязательств" searchable="true" sortable="true"/>
|
||||
<refundInterest type="11" name="Проценты к возврату" shortname="Проценты к возврату" searchable="true" sortable="true"/>
|
||||
|
|
@ -1021,8 +1043,9 @@
|
|||
<companyId type="1" name="Идентификатор участника" shortname="Участник" searchable="true" sortable="true" link="company"/>
|
||||
<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"/>
|
||||
<clearingDate type="6" name="Дата клиринга" shortname="Дата клиринга" visible="false" searchable="true" sortable="true"/>
|
||||
<accountId type="1" name="Идентификатор счета" shortname="Идентификатор счета" searchable="true" sortable="true" link="account"/>
|
||||
<accountType type="1" name="Тип счета" shortname="Тип счета" searchable="true" sortable="true" link="account" linkCode="accountType"/>
|
||||
<accountType type="12" name="Тип счета" shortname="Тип счета" searchable="true" sortable="true" link="accountType"/>
|
||||
<account type="2" length="50" name="Счет" shortname="Счет" searchable="true" sortable="true"/>
|
||||
<liabilitiesQuantity type="10" name="Сумма обязательств" shortname="Сумма обязательств" searchable="true" sortable="true"/>
|
||||
<claimsQuantity type="10" name="Сумма требований" shortname="Сумма требований" searchable="true" sortable="true"/>
|
||||
|
|
@ -1102,14 +1125,14 @@
|
|||
<payeeBIC type="2" length="255" name="Банковский идентификационный код (БИК) отправителя" shortname="БИК отправителя" searchable="true" sortable="true" visible="true"/>
|
||||
<addresseeBankName type="2" length="255" name="Банк получателя" shortname="Получатель" searchable="true" sortable="true" visible="true"/>
|
||||
<paymentDate type="4" name="Дата и время платежа" shortname="Дата и время платежа" searchable="true" sortable="true" ignore="true"/>
|
||||
<PaymentPurpose type="2" name="Назначение платежа" shortname="Назначение" searchable="true" sortable="true" visible="true" length="255"/>
|
||||
<paymentPurpose type="2" name="Назначение платежа" shortname="Назначение" searchable="true" sortable="true" visible="true" length="255"/>
|
||||
<settlementDate type="6" name="Дата расчетов" shortname="Дата расчетов" searchable="true" sortable="true"/>
|
||||
<creditLeg_amount field="creditLegAmount" type="1" name="Сумма отправителя" shortname="Сумма отправителя" searchable="true" sortable="true" visible="true"/>
|
||||
<debitLeg_amount field="debitLegAmount" type="1" name="Сумма получателя" shortname="Сумма получателя" searchable="true" sortable="true" visible="true"/>
|
||||
<creditLeg_accountId field="creditLegAccountId" type="1" name="Идентификатор счета отправителя" shortname="Идентификатор счета" searchable="true" sortable="true" link="account"/>
|
||||
<credit_csAccount field="creditCsAccount" type="2" length="255" name="Корреспондентский счет отправителя" shortname="Корр. счет отправителя" searchable="true" sortable="true" visible="true"/>
|
||||
<creditLeg_account field="creditLegAccount" type="2" length="50" name="Счет отправителя" shortname="Отправитель" searchable="true" sortable="true" visible="true" link="Account"/>
|
||||
<debitLeg_accountId field="debitLegAccountId" type="1" name="Идентификатор счета отправителя" shortname="Идентификатор счета" searchable="true" sortable="true" link="account"/>
|
||||
<debitLeg_accountId field="debitLegAccountId" type="1" name="Идентификатор счета получателя" shortname="Идентификатор счета" searchable="true" sortable="true" link="account"/>
|
||||
<debit_csAccount field="debitCsAccount" type="2" length="255" name="Корреспондентский счет получателя" shortname="Корреспондентский счет" searchable="true" sortable="true" visible="true"/>
|
||||
<debitLeg_account field="debitLegAccount" type="2" length="50" name="Счет получателя" shortname="Получатель" searchable="true" sortable="true" visible="true" link="Account"/>
|
||||
<creditLeg_direction field="creditLegDirection" type="1" name="Направление отправителя" shortname="Направление" searchable="true" sortable="true" visible="true" link="inOutDirection"/>
|
||||
|
|
@ -1272,8 +1295,9 @@
|
|||
<servdate type="2" length="8" name="Дата получения товара, оказания услуг в плат. поручении" shortname="Дата получения товара" searchable="true" sortable="true"/>
|
||||
<doc_result type="2" length="2" name="" shortname="" searchable="true" sortable="true"/>
|
||||
<imp_result type="2" length="3" name="Результат приема" shortname="Результат приема" searchable="true" sortable="true"/>
|
||||
<generationTime type="4" name="Дата и время создания записи" shortname="Дата и время создания" searchable="true" sortable="true" />
|
||||
<generationId type="1" name="Идентификатор взаимодействия" shortname="ID взаимодействия" searchable="true" sortable="true"/>
|
||||
<generationTime type="4" name="Дата и время создания записи" shortname="Дата и время создания" searchable="true" sortable="true"/>
|
||||
<generationId type="1" name="Идентификатор взаимодействия" shortname="ID взаимодействия" searchable="true" sortable="true"/>
|
||||
<paymentInstructionId type="1" name="Идентификатор соответствующей записи из таблицы-источника" shortname="Входящая запись" searchable="true" sortable="true" link="paymentInstruction"/>
|
||||
</sDf03>
|
||||
<sDf04 name="ДФ-04 Подтверждение переводов из Расчетной организации для СПВБ" class="ru.clearing.classes.statics.data.sdf.SDf04">
|
||||
<id type="1" name="Идентификатор записи" shortname="ID" searchable="true" sortable="true"/>
|
||||
|
|
@ -1324,7 +1348,7 @@
|
|||
<doc_result type="2" length="2" name="" shortname="" searchable="true" sortable="true"/>
|
||||
<imp_result type="2" length="3" name="Результат приема" shortname="Результат приема" searchable="true" sortable="true"/>
|
||||
<fileName field="file_name" type="2" length="255" name="Наименование входящего файла" shortname="Наименование файла" searchable="true" sortable="true"/>
|
||||
<generationTime type="4" name="Дата и время обработки файла" shortname="Дата и время обработки" searchable="true" sortable="true" />
|
||||
<generationTime type="4" name="Дата и время обработки файла" shortname="Дата и время обработки" searchable="true" sortable="true"/>
|
||||
<generationId type="1" name="Идентификатор взаимодействия" shortname="ID взаимодействия" searchable="true" sortable="true"/>
|
||||
</sDf04>
|
||||
<sDf05 name="ДФ-05 Уведомление о завершении расчетов в ПРЦ" class="ru.clearing.classes.statics.data.sdf.SDf05">
|
||||
|
|
@ -1333,7 +1357,7 @@
|
|||
<dt type="6" name="Дата завершения расчетов" shortname="Дата завершения расчетов" searchable="true" sortable="true"/>
|
||||
<tm type="5" name="Время завершения расчетов" shortname="Время завершения расчетов" searchable="true" sortable="true"/>
|
||||
<pr type="2" length="1" name="Результат обработки запроса" shortname="Результат обработки запроса" searchable="true" sortable="true"/>
|
||||
<generationTime type="4" name="Дата и время создания записи" shortname="Дата и время создания" searchable="true" sortable="true" />
|
||||
<generationTime type="4" name="Дата и время создания записи" shortname="Дата и время создания" searchable="true" sortable="true"/>
|
||||
<generationId type="1" name="Идентификатор взаимодействия" shortname="ID взаимодействия" searchable="true" sortable="true"/>
|
||||
</sDf05>
|
||||
<sDf08 name="ДФ-08 Запрос остатков по всем счетам" class="ru.clearing.classes.statics.data.sdf.SDf08">
|
||||
|
|
@ -1352,7 +1376,7 @@
|
|||
<number type="10" name="Номер платежного документа (операции)" shortname="Номер запроса" searchable="true" sortable="true"/>
|
||||
<INN field="inn" type="10" name="ИНН" shortname="ИНН" searchable="true" sortable="true" visible="true"/>
|
||||
<fileName type="2" length="255" name="Наименование входящего файла" shortname="Наименование файла" searchable="true" sortable="true"/>
|
||||
<generationTime type="4" name="Дата и время обработки файла" shortname="Дата и время обработки" searchable="true" sortable="true" />
|
||||
<generationTime type="4" name="Дата и время обработки файла" shortname="Дата и время обработки" searchable="true" sortable="true"/>
|
||||
<generationId type="1" name="Идентификатор взаимодействия" shortname="ID взаимодействия" searchable="true" sortable="true"/>
|
||||
</sDf09>
|
||||
<sDf10 name="ДФ-10 Подтверждение о загрузке по поступлению на клиринговый счет" class="ru.clearing.classes.statics.data.sdf.SDf10">
|
||||
|
|
@ -1415,8 +1439,9 @@
|
|||
<send_type type="2" length="10" name="Тип отправления плат. поручения" shortname="Тип отправления плат. поручения" searchable="true" sortable="true"/>
|
||||
<servdate type="2" length="8" name="Дата получения товара, оказания услуг в плат. поручении" shortname="Дата получения товара" searchable="true" sortable="true"/>
|
||||
<doc_result type="2" length="2" name="" shortname="" searchable="true" sortable="true"/>
|
||||
<generationTime type="4" name="Дата и время создания записи" shortname="Дата и время создания" searchable="true" sortable="true" />
|
||||
<generationTime type="4" name="Дата и время создания записи" shortname="Дата и время создания" searchable="true" sortable="true"/>
|
||||
<generationId type="1" name="Идентификатор взаимодействия" shortname="ID взаимодействия" searchable="true" sortable="true"/>
|
||||
<paymentInstructionId type="1" name="Идентификатор соответствующей записи из таблицы-источника" shortname="Входящая запись" searchable="true" sortable="true" link="paymentInstruction"/>
|
||||
</sDf11>
|
||||
<sDf12 name="ДФ-12 Из ПРЦ в КС Информация о блокировке/разблокировке/закрытии ТБС УК" class="ru.clearing.classes.statics.data.sdf.SDf12">
|
||||
<id type="1" name="Идентификатор записи" shortname="ID" searchable="true" sortable="true"/>
|
||||
|
|
@ -1474,7 +1499,7 @@
|
|||
<send_type type="2" length="10" name="Вид платежа" shortname="Вид платежа" searchable="true" sortable="true"/>
|
||||
<servdate type="2" length="8" name="Дата получения товара, оказания услуг в плат. поручении" shortname="Дата получения товара" searchable="true" sortable="true"/>
|
||||
<doc_result type="2" length="2" name="" shortname="" searchable="true" sortable="true"/>
|
||||
<generationTime type="4" name="Дата и время создания записи" shortname="Дата и время создания" searchable="true" sortable="true" />
|
||||
<generationTime type="4" name="Дата и время создания записи" shortname="Дата и время создания" searchable="true" sortable="true"/>
|
||||
<generationId type="1" name="Идентификатор взаимодействия" shortname="ID взаимодействия" searchable="true" sortable="true"/>
|
||||
</sDf13>
|
||||
<sDf16 name="ДФ-16 Формат запроса по возврату депозита или дозачисление/списание денежных средств" class="ru.clearing.classes.statics.data.sdf.SDf16">
|
||||
|
|
@ -1488,7 +1513,7 @@
|
|||
<SPEC field="spec" type="2" length="255" name="Назначение" shortname="Назначение" searchable="true" sortable="true"/>
|
||||
<number type="10" name="Номер платежного документа (операции)" shortname="Номер платежного документа" searchable="true" sortable="true"/>
|
||||
<fileName type="2" length="255" name="Наименование входящего файла" shortname="Наименование файла" searchable="true" sortable="true"/>
|
||||
<generationTime type="4" name="Дата и время обработки файла" shortname="Дата и время обработки" searchable="true" sortable="true" />
|
||||
<generationTime type="4" name="Дата и время обработки файла" shortname="Дата и время обработки" searchable="true" sortable="true"/>
|
||||
<generationId type="1" name="Идентификатор взаимодействия" shortname="ID взаимодействия" searchable="true" sortable="true"/>
|
||||
</sDf16>
|
||||
<sDf17 name="ДФ-17 Формат ответа на запрос по возврату депозита или дозачисление/списание денежных средств" class="ru.clearing.classes.statics.data.sdf.SDf17">
|
||||
|
|
@ -1613,16 +1638,16 @@
|
|||
<rows liabilitiesClaimsAssets_fullName="" companySymbols_code="" liabilitiesClaimsAssets_countryCode="" liabilitiesClaimsAssets_refundDate="" liabilitiesClaimsAssets_Contract="" liabilitiesClaimsMoney_currencyCode="" liabilitiesClaimsAssets_liabilitiesQuantity="" liabilitiesClaimsMoney_name="" liabilitiesClaimsAssets_liabilities="" liabilitiesClaimsAssets_comment="" companySymbols_value="" liabilitiesClaimsAssets_fullNames=""/>
|
||||
</unfundedLiabilities>
|
||||
<accountTransactionLiabilities version="0.0.1" code="0420314" name="Сведения об УК и операциях, проведенных по торговым счетам, часть 1" startDate="" endDate="dd.MM.YYYY" destination="BR" clearingStatus="">
|
||||
<rows company_clearingCode="" profileDocument_id="" company_fullName="" companySymbols_code="" companySymbol_value="" clearingMemberCategory_clearingMemberCategory="" liabilitiesClaimsAssets_contract="" liabilitiesClaimsAssets_tradingDate="" liabilitiesClaimsAssests_liabilitiesQuantity="" />
|
||||
<rows company_clearingCode="" profileDocument_id="" company_fullName="" companySymbols_code="" companySymbol_value="" clearingMemberCategory_clearingMemberCategory="" liabilitiesClaimsAssets_contract="" liabilitiesClaimsAssets_tradingDate="" liabilitiesClaimsAssests_liabilitiesQuantity=""/>
|
||||
</accountTransactionLiabilities>
|
||||
<accountTransactionTurnover version="0.0.1" code="0420314" name="Сведения об УК и операциях, проведенных по торговым счетам, часть 2 " startDate="" endDate="dd.MM.YYYY" destination="BR" transactionStatus="">
|
||||
<rows company_clearingCode="" profileDocument_documentType="" accountBalance_openBalanceAmount="" paymentInstruction_creditLeg_amount="" paymentInstructiont_debitLeg_amount="" accountBalance_closeBalanceAmount="" />
|
||||
<rows company_clearingCode="" profileDocument_documentType="" accountBalance_openBalanceAmount="" paymentInstruction_creditLeg_amount="" paymentInstructiont_debitLeg_amount="" accountBalance_closeBalanceAmount=""/>
|
||||
</accountTransactionTurnover>
|
||||
<clearingCoverage1 version="0.0.1" code="0420312" name="Сведения о клиринговом обеспечении, часть 1" startDate="" endDate="dd.MM.YYYY" destination="BR">
|
||||
<rows company_clearingCode="" company_fullName="" companySymbol_code="" companySymbol_value="" countryCode_id="" clearingMemberCategory_clearingMemberCategory=""/>
|
||||
</clearingCoverage1>
|
||||
<clearingCoverage2 version="0.0.1" code="0420312" name="Сведения о клиринговом обеспечении, часть 2" startDate="" endDate="dd.MM.YYYY" destination="BR">
|
||||
<rows liabilitiesClaimsAssets_companyId="" liabilitiesClaimsAssets_liabilitiesQuantity="" />
|
||||
<rows liabilitiesClaimsAssets_companyId="" liabilitiesClaimsAssets_liabilitiesQuantity=""/>
|
||||
</clearingCoverage2>
|
||||
<clearingCoverage3 version="0.0.5" code="0420312" name="Сведения о клиринговом обеспечении, часть 3" startDate="" endDate="dd.MM.YYYY" destination="BR">
|
||||
<rows liabilitiesClaimsAssets_companyId="" liabilitiesClaimsAssets_liabilities=""/>
|
||||
|
|
@ -1631,7 +1656,7 @@
|
|||
<rows liabilities_amount=""/>
|
||||
</clearingCoverage4>
|
||||
<clearingCoverage5 version="0.0.5" code="0420312" name="Сведения о клиринговом обеспечении, часть 5" startDate="" endDate="dd.MM.YYYY" destination="BR">
|
||||
<rows liabilities_amount="" />
|
||||
<rows liabilities_amount=""/>
|
||||
</clearingCoverage5>
|
||||
<clearingCoverage6 version="0.0.5" code="0420312" name="Сведения о клиринговом обеспечении, часть 6" startDate="" endDate="dd.MM.YYYY" destination="BR">
|
||||
<rows liabilities_amount=""/>
|
||||
|
|
@ -1640,7 +1665,7 @@
|
|||
<rows liabilities_amount=""/>
|
||||
</clearingCoverage7>
|
||||
<clearingCoverage8 version="0.0.5" code="0420312" name="Сведения о клиринговом обеспечении, часть 8" startDate="" endDate="dd.MM.YYYY" destination="BR">
|
||||
<rows currency_id="" liabilitiesClaimsAssets_companyId="" liabilitiesClaimsAssets_fullName="" companySymbol_code="" companySymbol_value="" companyInfo_countryCode="" clearingMemberCategory_clearingMemberCategory="" />
|
||||
<rows currency_id="" liabilitiesClaimsAssets_companyId="" liabilitiesClaimsAssets_fullName="" companySymbol_code="" companySymbol_value="" companyInfo_countryCode="" clearingMemberCategory_clearingMemberCategory=""/>
|
||||
</clearingCoverage8>
|
||||
<clearingCoverage9 version="0.0.5" code="0420312" name="Сведения о клиринговом обеспечении, часть 9" startDate="" endDate="dd.MM.YYYY" destination="BR">
|
||||
<rows currency_id="" liabilitiesClaimsAssets_companyId="" liabilitiesClaimsMoney_currencyCode="" liabilitiesClaimsAssets_liabilities=""/>
|
||||
|
|
@ -1666,7 +1691,7 @@
|
|||
<total claimsAmount="" liabilitiesAmount="" paymentAmount=""/>
|
||||
</netPositionBank>
|
||||
<infoAccountBalance version="0.0.1" code="BT12.1" name="Отчет о денежных средствах Участника клиринга, находящихся на счете внутреннего учета средств Участника клиринга на клиринговом счете СПВБ" startDate=" dd.MM.YYYY " endDate="dd.MM.YYYY">
|
||||
<rows company_fullName="" company_fullNameOrg="" company_clearingCode="" clearing_sessionId="" Account_accountCLRN="" Account_accountINFO="" sum_statementIn="" tradeSettlement_amount="" sum_statementOut="" />
|
||||
<rows company_fullName="" company_fullNameOrg="" company_clearingCode="" clearing_sessionId="" Account_accountCLRN="" Account_accountINFO="" sum_statementIn="" tradeSettlement_amount="" sum_statementOut=""/>
|
||||
</infoAccountBalance>
|
||||
<reportMarketData version="0.0.1" code="BT17.6" name="Формирование КС Биржевой информации по итогам торгов в секции МКР" startDate=" dd.MM.YYYY " endDate="dd.MM.YYYY">
|
||||
<rows marketData_securitiesDepositId="" company_fullName="" marketData_marketId="" marketData_counterPartyNum="" marketData_tradesNum="" marketData_amount="" marketData_openPrice="" marketData_maxPrice="" marketData_minPrice="" marketData_closePrice="" marketData_avgPrice="" marketData_duration=""/>
|
||||
|
|
@ -1709,6 +1734,6 @@
|
|||
<boolean id="9" name="Булевый" type="boolean" javatype="Boolean"/>
|
||||
<double id="10" name="Число с точкой" type="numeric(72,18)" javatype="BigDecimal"/>
|
||||
<amount id="11" name="Объем из числа с точкой" type="numeric(72,2)" javatype="BigDecimal"/>
|
||||
<code id="12" name="Код 4 символа" type="char(4)" javatype="String"/>
|
||||
<code id="12" name="Код 4 символа" type="varchar(4)" javatype="String"/>
|
||||
</types>
|
||||
</meta>
|
||||
|
|
|
|||
82
clearing-parent/clearing-service/pom.xml
Normal file
82
clearing-parent/clearing-service/pom.xml
Normal file
|
|
@ -0,0 +1,82 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<artifactId>clearing-parent</artifactId>
|
||||
<groupId>ru.spcex.clearing</groupId>
|
||||
<version>SPCEX-1.0.0.0</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>clearing-service</artifactId>
|
||||
|
||||
<properties>
|
||||
<maven.compiler.source>17</maven.compiler.source>
|
||||
<maven.compiler.target>17</maven.compiler.target>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>ru.spcex.platform</groupId>
|
||||
<artifactId>platform-messaging</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>ru.spcex.platform</groupId>
|
||||
<artifactId>platform-imdg-api-hazelcast-impl</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>ru.spcex.clearing</groupId>
|
||||
<artifactId>classes</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.fasterxml.jackson.core</groupId>
|
||||
<artifactId>jackson-databind</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>ru.spcex.platform</groupId>
|
||||
<artifactId>platform-enum</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.junit.jupiter</groupId>
|
||||
<artifactId>junit-jupiter</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.assertj</groupId>
|
||||
<artifactId>assertj-core</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<build>
|
||||
<resources>
|
||||
<resource>
|
||||
<directory>src/main/resources</directory>
|
||||
<excludes>
|
||||
<exclude>application.properties</exclude>
|
||||
</excludes>
|
||||
<filtering>false</filtering>
|
||||
</resource>
|
||||
</resources>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>repackage</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
<configuration>
|
||||
<finalName>${project.artifactId}</finalName>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
package ru.spcex.clearing;
|
||||
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
|
||||
@SpringBootApplication
|
||||
public class ClearingServiceApplication {
|
||||
public static void main(String[] args) {
|
||||
SpringApplication app = new SpringApplication(ClearingServiceApplication.class);
|
||||
app.run(args);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,47 @@
|
|||
package ru.spcex.clearing.config;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Qualifier;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
|
||||
import ru.spcex.clearing.config.element.ClearingServiceSettings;
|
||||
import ru.spcex.platform.imdg.api.ImdgProvider;
|
||||
import ru.spcex.platform.imdg.iml.hazelcast.service.HazelcastService;
|
||||
|
||||
@Configuration
|
||||
public class ClearingImdgConfig {
|
||||
private static ThreadPoolTaskExecutor createThreadPoolTaskExecutor(int maxPoolSz, boolean waitForCompletion) {
|
||||
ThreadPoolTaskExecutor pool = new ThreadPoolTaskExecutor();
|
||||
if (maxPoolSz > 2) {
|
||||
pool.setKeepAliveSeconds(60);
|
||||
pool.setAllowCoreThreadTimeOut(true);
|
||||
}
|
||||
pool.setCorePoolSize(maxPoolSz);
|
||||
pool.setWaitForTasksToCompleteOnShutdown(waitForCompletion);
|
||||
return pool;
|
||||
}
|
||||
|
||||
@Bean(name = "taskExecutorHazelcastClientInitializer")
|
||||
public ThreadPoolTaskExecutor taskExecutorHazelcastClientInitializer() {
|
||||
return createThreadPoolTaskExecutor(1, true);
|
||||
}
|
||||
|
||||
@Bean(name = "taskExecutorIdGeneratorAwaiter")
|
||||
public ThreadPoolTaskExecutor taskExecutorIdGeneratorAwaiter() {
|
||||
return createThreadPoolTaskExecutor(1, false);
|
||||
}
|
||||
|
||||
@Autowired
|
||||
@Bean
|
||||
public ImdgProvider imdgProvider(
|
||||
@Qualifier("taskExecutorHazelcastClientInitializer") ThreadPoolTaskExecutor taskExecutorHazelcastClientInitializer,
|
||||
@Qualifier("taskExecutorIdGeneratorAwaiter") ThreadPoolTaskExecutor taskExecutorIdGeneratorAwaiter,
|
||||
ClearingServiceSettings settings
|
||||
) {
|
||||
return new HazelcastService(taskExecutorHazelcastClientInitializer,
|
||||
taskExecutorIdGeneratorAwaiter,
|
||||
settings.getHazelcast());
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,49 @@
|
|||
package ru.spcex.clearing.config;
|
||||
|
||||
import org.apache.kafka.clients.consumer.Consumer;
|
||||
import org.apache.kafka.clients.producer.Producer;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.config.ConfigurableBeanFactory;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.context.annotation.Scope;
|
||||
import ru.spcex.clearing.config.element.ClearingServiceSettings;
|
||||
import ru.spcex.clearing.imdg.IMDGDistributedNames;
|
||||
import ru.spcex.clearing.platform.messaging.config.KafkaConsumerFactory;
|
||||
import ru.spcex.clearing.platform.messaging.config.KafkaProducerFactory;
|
||||
import ru.spcex.clearing.platform.messaging.service.RequestInfo;
|
||||
import ru.spcex.clearing.platform.messaging.service.sender.KafkaSender;
|
||||
import ru.spcex.platform.imdg.api.Imdg;
|
||||
import ru.spcex.platform.imdg.api.ImdgId;
|
||||
import ru.spcex.platform.imdg.api.ImdgProvider;
|
||||
|
||||
@Configuration
|
||||
public class KafkaConfig {
|
||||
@Autowired
|
||||
@Scope(ConfigurableBeanFactory.SCOPE_PROTOTYPE)
|
||||
@Bean
|
||||
public Consumer<String, Object> createConsumer(ClearingServiceSettings settings) {
|
||||
return KafkaConsumerFactory.consumer(settings.getKafkaConsumer());
|
||||
}
|
||||
|
||||
@Autowired
|
||||
@Bean
|
||||
public Producer<String, Object> createProducer(ClearingServiceSettings settings) {
|
||||
return KafkaProducerFactory.producer(settings.getKafkaProducer());
|
||||
}
|
||||
|
||||
@Autowired
|
||||
@Bean
|
||||
public KafkaSender kafkaSender(Producer<String, Object> kafkaProducer, ImdgProvider imdgProvider) {
|
||||
ImdgId imdgIdGenerator = imdgProvider.getImdgIdGenerator();
|
||||
return KafkaSender
|
||||
.setup()
|
||||
.producer(kafkaProducer)
|
||||
.idGenerator(imdgIdGenerator::nextId)
|
||||
.imdgProvider(s -> {
|
||||
Imdg<RequestInfo> imdg = imdgProvider.getImdg(IMDGDistributedNames.Map_RequestInfo, RequestInfo.class);
|
||||
return imdg::insert;
|
||||
})
|
||||
.build();
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
package ru.spcex.clearing.config;
|
||||
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import ru.spcex.platform.utils.enumeration.IMessageResolver;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
@Configuration
|
||||
public class MessageResolverConfig {
|
||||
@Bean
|
||||
public IMessageResolver messageResolver() {
|
||||
return errorMessage -> {
|
||||
if (errorMessage == null) return "null";
|
||||
return String.format("(%d) args %s", errorMessage.getSubject().getId(), Arrays.toString(errorMessage.getArgs()));
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
package ru.spcex.clearing.config;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Qualifier;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.support.ResourceBundleMessageSource;
|
||||
import ru.spcex.platform.utils.enumeration.IMessageResolver;
|
||||
import ru.spcex.platform.utils.enumeration.SpringPropertiesMessageResolver;
|
||||
|
||||
import java.util.Locale;
|
||||
|
||||
//@Configuration
|
||||
public class MessagesConfig {
|
||||
@Bean("validation-error-messages")
|
||||
public ResourceBundleMessageSource messages() {
|
||||
ResourceBundleMessageSource source = new ResourceBundleMessageSource();
|
||||
source.setBasenames("messages/error");
|
||||
source.setUseCodeAsDefaultMessage(true);
|
||||
source.setDefaultEncoding("utf8");
|
||||
source.setDefaultLocale(Locale.ROOT);
|
||||
return source;
|
||||
}
|
||||
|
||||
@Bean
|
||||
public IMessageResolver errorResolver(@Qualifier("validation-error-messages") ResourceBundleMessageSource messageBundle) {
|
||||
SpringPropertiesMessageResolver resolver = new SpringPropertiesMessageResolver(messageBundle);
|
||||
resolver.setLocale("ru");
|
||||
return resolver;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,41 @@
|
|||
package ru.spcex.clearing.config.element;
|
||||
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
import org.springframework.context.annotation.PropertySource;
|
||||
import org.springframework.stereotype.Component;
|
||||
import ru.spcex.clearing.platform.messaging.config.element.KafkaConsumerSettings;
|
||||
import ru.spcex.clearing.platform.messaging.config.element.KafkaProducerSettings;
|
||||
import ru.spcex.platform.imdg.iml.hazelcast.config.HazelcastClientParams;
|
||||
|
||||
@Component
|
||||
@PropertySource("file:${spring.config.location}/application.properties")
|
||||
@ConfigurationProperties("clearing-service")
|
||||
public class ClearingServiceSettings {
|
||||
private HazelcastClientParams hazelcast;
|
||||
private KafkaConsumerSettings kafkaConsumer;
|
||||
private KafkaProducerSettings kafkaProducer;
|
||||
|
||||
public HazelcastClientParams getHazelcast() {
|
||||
return hazelcast;
|
||||
}
|
||||
|
||||
public void setHazelcast(HazelcastClientParams hazelcast) {
|
||||
this.hazelcast = hazelcast;
|
||||
}
|
||||
|
||||
public KafkaConsumerSettings getKafkaConsumer() {
|
||||
return kafkaConsumer;
|
||||
}
|
||||
|
||||
public void setKafkaConsumer(KafkaConsumerSettings kafkaConsumer) {
|
||||
this.kafkaConsumer = kafkaConsumer;
|
||||
}
|
||||
|
||||
public KafkaProducerSettings getKafkaProducer() {
|
||||
return kafkaProducer;
|
||||
}
|
||||
|
||||
public void setKafkaProducer(KafkaProducerSettings kafkaProducer) {
|
||||
this.kafkaProducer = kafkaProducer;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
package ru.spcex.clearing.error;
|
||||
|
||||
import ru.spcex.platform.utils.enumeration.IEnumId;
|
||||
|
||||
public enum ClearingError implements IEnumId {
|
||||
CompanyCreditCheck(10012L),
|
||||
CompanyDebitCheck(10013L),
|
||||
;
|
||||
private final Long id;
|
||||
|
||||
ClearingError(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,123 @@
|
|||
package ru.spcex.clearing.service;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.scheduling.annotation.EnableScheduling;
|
||||
import org.springframework.scheduling.annotation.Scheduled;
|
||||
import org.springframework.stereotype.Service;
|
||||
import ru.clearing.classes.statics.data.payment.PaymentInstruction;
|
||||
import ru.clearing.classes.statics.data.sdf.SDf03;
|
||||
import ru.clearing.classes.statics.data.sdf.SDf11;
|
||||
import ru.spcex.clearing.imdg.IMDGDistributedNames;
|
||||
import ru.spcex.clearing.platform.messaging.domain.Consts;
|
||||
import ru.spcex.clearing.platform.messaging.domain.cud.clearing.SdfClearingRequest;
|
||||
import ru.spcex.clearing.platform.messaging.service.sender.KafkaSender;
|
||||
import ru.spcex.platform.enumeration.TransactionStatus;
|
||||
import ru.spcex.platform.imdg.api.Imdg;
|
||||
import ru.spcex.platform.imdg.api.ImdgId;
|
||||
import ru.spcex.platform.imdg.api.ImdgProvider;
|
||||
|
||||
import java.util.AbstractMap;
|
||||
import java.util.Comparator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.ExecutorService;
|
||||
import java.util.concurrent.Executors;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@Service
|
||||
@EnableScheduling
|
||||
public class ClearingService {
|
||||
private final Logger log = LoggerFactory.getLogger(getClass());
|
||||
private final Imdg<PaymentInstruction> paymentImdgs;
|
||||
private final ExecutorService executor;
|
||||
private final ImdgId idGenerator;
|
||||
private final PaymentInstructionSorter senderGroupSorter;
|
||||
private final Imdg<SDf03> sdf03Imdg;
|
||||
private final Imdg<SDf11> sdf11Imdg;
|
||||
private final KafkaSender kafkaSender;
|
||||
|
||||
@Autowired
|
||||
public ClearingService(ImdgProvider imdgProvider, PaymentInstructionSorter senderGroupSorter, KafkaSender kafkaSender) {
|
||||
this.paymentImdgs = imdgProvider.getImdg(IMDGDistributedNames.Map_PaymentInstruction, PaymentInstruction.class);
|
||||
this.sdf03Imdg = imdgProvider.getImdg(IMDGDistributedNames.Map_SDf03, SDf03.class);
|
||||
this.sdf11Imdg = imdgProvider.getImdg(IMDGDistributedNames.Map_SDf11, SDf11.class);
|
||||
this.idGenerator = imdgProvider.getImdgIdGenerator();
|
||||
this.senderGroupSorter = senderGroupSorter;
|
||||
this.kafkaSender = kafkaSender;
|
||||
this.executor = Executors.newSingleThreadExecutor();
|
||||
}
|
||||
|
||||
@Scheduled(cron = "${clearing-service.scheduler.check-payment-instruction}")
|
||||
public void run() {
|
||||
executor.execute(this::createSdfFromPaymentInstructionSTLD);
|
||||
}
|
||||
|
||||
private void createSdfFromPaymentInstructionSTLD() {
|
||||
final boolean[] anyError = {false};
|
||||
//generationId для созадаваемых Sdf03/Sdf11
|
||||
Long generationId = idGenerator.nextId();
|
||||
//выгружаем PaymentInstructions с нужным статусом
|
||||
Map<Long, PaymentBatchInfo> paymentBySender = paymentImdgs.getCollectionObjectsByFieldValues(
|
||||
Map.of("transactionStatus", TransactionStatus.stld.getKey()))
|
||||
.stream()
|
||||
//группируем по компаниям (fixme sorted убрать?)
|
||||
.sorted(Comparator.comparing(PaymentInstruction::getSenderId))
|
||||
.collect(Collectors.groupingBy(PaymentInstruction::getSenderId))
|
||||
.entrySet()
|
||||
.stream()
|
||||
//результатом работы senderGroupSorter будет Map<senderId -> PaymentBatchInfo>
|
||||
//PaymentBatchInfo содержит возможную ошибку, при необходимости отсортированные Payment
|
||||
//тип ClearingMemberCategory
|
||||
.map(entry -> {
|
||||
Long senderId = entry.getKey();
|
||||
List<PaymentInstruction> pmtInstrcs = entry.getValue();
|
||||
PaymentBatchInfo senderInfo = senderGroupSorter.sortCompanyPayments(generationId, senderId, pmtInstrcs);
|
||||
if (senderInfo.getError() != null) {
|
||||
anyError[0] = true;
|
||||
}
|
||||
return new AbstractMap.SimpleEntry<>(senderId, senderInfo);
|
||||
})
|
||||
.collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue));
|
||||
//save SDF03/SDF11
|
||||
for (var entry : paymentBySender.entrySet()) {
|
||||
PaymentBatchInfo senderPayments = entry.getValue();
|
||||
saveSdfAnSendToKafka(senderPayments, generationId);
|
||||
}
|
||||
//update PaymentInstruction.transactionStatus
|
||||
for (var entry : paymentBySender.entrySet()) {
|
||||
PaymentBatchInfo batch = entry.getValue();
|
||||
//все PaymentInstruction.transactionStatus в batch с error != null
|
||||
//уже проапдейтились в методе sortCompanyPayments
|
||||
if (batch.getError() == null) {
|
||||
TransactionStatus stat = anyError[0] ? TransactionStatus.notSent : TransactionStatus.sent;
|
||||
batch.getOrderedPaymentInstructions()
|
||||
.forEach(paymentInstruction -> {
|
||||
paymentInstruction.setTransactionStatus(stat.getKey());
|
||||
paymentImdgs.update(paymentInstruction);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void saveSdfAnSendToKafka(PaymentBatchInfo batch, Long generationId) {
|
||||
SdfClearingRequest kafkaMessage = new SdfClearingRequest();
|
||||
kafkaMessage.setGroupId(generationId);
|
||||
switch (batch.getCategoryD()) {
|
||||
case I -> {
|
||||
batch.getOrderedPaymentInstructions()
|
||||
.map(paymentInstruction -> Sdf03Builder.buildSdf03(paymentInstruction, generationId))
|
||||
.forEach(sdf03Imdg::insert);
|
||||
kafkaSender.sendRequestToQueue(Consts.SDF03_PROCESS, kafkaMessage);
|
||||
}
|
||||
case B -> {
|
||||
batch.getOrderedPaymentInstructions()
|
||||
.map(paymentInstruction -> Sdf11Builder.buildSdf11(paymentInstruction, generationId))
|
||||
.forEach(sdf11Imdg::insert);
|
||||
kafkaSender.sendRequestToQueue(Consts.SDF11_PROCESS, kafkaMessage);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,69 @@
|
|||
package ru.spcex.clearing.service;
|
||||
|
||||
import ru.clearing.classes.statics.data.payment.PaymentInstruction;
|
||||
import ru.spcex.platform.enumeration.ClearingMemberCategoryD;
|
||||
import ru.spcex.platform.utils.enumeration.EnumMessage;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import java.util.function.Function;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
public class PaymentBatchInfo {
|
||||
private List<PaymentInstruction> initialOrder;
|
||||
private List<PaymentInstruction> fromClearingToBank;
|
||||
private List<PaymentInstruction> fromBankToClearing;
|
||||
private ClearingMemberCategoryD categoryD;
|
||||
private EnumMessage error;
|
||||
|
||||
public Stream<PaymentInstruction> getOrderedPaymentInstructions() {
|
||||
Function<Collection<PaymentInstruction>, Stream<PaymentInstruction>> safeStream
|
||||
= paymentInstructions -> paymentInstructions != null ? paymentInstructions.stream() : Stream.empty();
|
||||
if (categoryD.equals(ClearingMemberCategoryD.B)) {
|
||||
return safeStream.apply(initialOrder);
|
||||
} else {
|
||||
return Stream.concat(safeStream.apply(fromClearingToBank), safeStream.apply(fromBankToClearing));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public List<PaymentInstruction> getFromClearingToBank() {
|
||||
return fromClearingToBank;
|
||||
}
|
||||
|
||||
public void setFromClearingToBank(List<PaymentInstruction> fromClearingToBank) {
|
||||
this.fromClearingToBank = fromClearingToBank;
|
||||
}
|
||||
|
||||
public List<PaymentInstruction> getFromBankToClearing() {
|
||||
return fromBankToClearing;
|
||||
}
|
||||
|
||||
public void setFromBankToClearing(List<PaymentInstruction> fromBankToClearing) {
|
||||
this.fromBankToClearing = fromBankToClearing;
|
||||
}
|
||||
|
||||
public ClearingMemberCategoryD getCategoryD() {
|
||||
return categoryD;
|
||||
}
|
||||
|
||||
public void setCategoryD(ClearingMemberCategoryD categoryD) {
|
||||
this.categoryD = categoryD;
|
||||
}
|
||||
|
||||
public EnumMessage getError() {
|
||||
return error;
|
||||
}
|
||||
|
||||
public void setError(EnumMessage error) {
|
||||
this.error = error;
|
||||
}
|
||||
|
||||
public List<PaymentInstruction> getInitialOrder() {
|
||||
return initialOrder;
|
||||
}
|
||||
|
||||
public void setInitialOrder(List<PaymentInstruction> initialOrder) {
|
||||
this.initialOrder = initialOrder;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,121 @@
|
|||
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.generated.ClearingMemberCategory;
|
||||
import ru.clearing.classes.statics.data.payment.PaymentInstruction;
|
||||
import ru.spcex.clearing.error.ClearingError;
|
||||
import ru.spcex.clearing.imdg.IMDGDistributedNames;
|
||||
import ru.spcex.platform.enumeration.AccountType;
|
||||
import ru.spcex.platform.enumeration.ClearingMemberCategoryD;
|
||||
import ru.spcex.platform.enumeration.TransactionStatus;
|
||||
import ru.spcex.platform.imdg.api.Imdg;
|
||||
import ru.spcex.platform.imdg.api.ImdgProvider;
|
||||
import ru.spcex.platform.utils.enumeration.EnumMessage;
|
||||
import ru.spcex.platform.utils.enumeration.IEnumKey;
|
||||
import ru.spcex.platform.utils.enumeration.IMessageResolver;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.function.Function;
|
||||
|
||||
@Component
|
||||
public class PaymentInstructionSorter {
|
||||
|
||||
private final Logger log = LoggerFactory.getLogger(getClass());
|
||||
private final Imdg<ClearingMemberCategory> clrngMmbrImdg;
|
||||
private final Imdg<Account> accImdg;
|
||||
private final IMessageResolver messageResolver;
|
||||
private final Imdg<PaymentInstruction> pmtInstrctnsImdg;
|
||||
|
||||
@Autowired
|
||||
public PaymentInstructionSorter(ImdgProvider imdgProvider, IMessageResolver messageResolver) {
|
||||
this.clrngMmbrImdg = imdgProvider.getImdg(IMDGDistributedNames.Map_ClearingMemberCategory, ClearingMemberCategory.class);
|
||||
this.pmtInstrctnsImdg = imdgProvider.getImdg(IMDGDistributedNames.Map_PaymentInstruction, PaymentInstruction.class);
|
||||
this.accImdg = imdgProvider.getImdg(IMDGDistributedNames.Map_Account, Account.class);
|
||||
this.messageResolver = messageResolver;
|
||||
}
|
||||
|
||||
PaymentBatchInfo sortCompanyPayments(Long generationId, Long senderId, List<PaymentInstruction> payments) {
|
||||
PaymentBatchInfo batchInfo = new PaymentBatchInfo();
|
||||
log.info("processing PaymentInstruction's generationId={} senderId={} size={}", generationId, senderId, payments.size());
|
||||
ClearingMemberCategory category = clrngMmbrImdg.getSingleObjectByFieldValues(Map.of("companyId", senderId));
|
||||
ClearingMemberCategoryD categoryValue = IEnumKey.getEnumByKey(ClearingMemberCategoryD.class, category.getClearingMemberCategory());
|
||||
batchInfo.setCategoryD(categoryValue);
|
||||
if (ClearingMemberCategoryD.I.equals(categoryValue)) {
|
||||
EnumMessage error = null;
|
||||
List<PaymentInstruction> aList = new ArrayList<>();
|
||||
List<PaymentInstruction> bList = new ArrayList<>();
|
||||
for (PaymentInstruction payment : payments) {
|
||||
Account creditLegAcc = accImdg.getSingleObjectByID(payment.getCreditLegAccountId());
|
||||
Account debitLegAcc = accImdg.getSingleObjectByID(payment.getDebitLegAccountId());
|
||||
if (creditLegAcc == null || debitLegAcc == null) {
|
||||
String message = String.format("cannot find account CreditLegAccountId/DebitLegAccountId %d/%d", payment.getCreditLegAccountId(), payment.getDebitLegAccountId());
|
||||
log.error("generationId={}, senderId={} payment.id={} {}",
|
||||
generationId, senderId, payment.getId(), message);
|
||||
continue;
|
||||
}
|
||||
if (AccountType.Clrn.equalsByKey(creditLegAcc.getAccountType())
|
||||
&& AccountType.Bank.equalsByKey(debitLegAcc.getAccountType())) {
|
||||
aList.add(payment);
|
||||
} else if (AccountType.Bank.equalsByKey(creditLegAcc.getAccountType())
|
||||
&& AccountType.Clrn.equalsByKey(debitLegAcc.getAccountType())) {
|
||||
bList.add(payment);
|
||||
} else {
|
||||
String message = String.format("cannot sort creditLegAccount.type=%s, debitLegAccount.type=%s", creditLegAcc.getAccountType(), debitLegAcc.getAccountType());
|
||||
log.error("generationId={}, senderId={} payment.id={} {}",
|
||||
generationId, senderId, payment.getId(), message);
|
||||
//continue;
|
||||
}
|
||||
}
|
||||
Function<List<PaymentInstruction>, Long> creditAmountSum = paymentInstructions -> paymentInstructions
|
||||
.stream()
|
||||
.map(PaymentInstruction::getCreditLegAmount)
|
||||
.reduce(0L, Long::sum);
|
||||
Function<List<PaymentInstruction>, Long> debitAmountSum = paymentInstructions -> paymentInstructions
|
||||
.stream()
|
||||
.map(PaymentInstruction::getDebitLegAmount)
|
||||
.reduce(0L, Long::sum);
|
||||
Long fromClearingToBankCreditAmount = creditAmountSum.apply(aList);
|
||||
Long fromBankToClearingCreditAmount = creditAmountSum.apply(bList);
|
||||
Long fromClearingToBankDebitAmount = debitAmountSum.apply(aList);
|
||||
Long fromBankToClearingDebitAmount = debitAmountSum.apply(bList);
|
||||
if (!fromClearingToBankCreditAmount.equals(fromBankToClearingCreditAmount)) {
|
||||
error = new EnumMessage(ClearingError.CompanyCreditCheck, senderId.toString());
|
||||
} else if (!fromClearingToBankDebitAmount.equals(fromBankToClearingDebitAmount)) {
|
||||
error = new EnumMessage(ClearingError.CompanyDebitCheck, senderId.toString());
|
||||
}
|
||||
log.info("processing PaymentInstruction's generationId={} senderId={} [fromClearingToBankCreditAmount={}, " +
|
||||
"fromBankToClearingCreditAmount={}, " +
|
||||
"fromClearingToBankDebitAmount={}, " +
|
||||
"fromBankToClearingDebitAmount={}] {}", generationId, senderId,
|
||||
fromClearingToBankCreditAmount,
|
||||
fromBankToClearingCreditAmount,
|
||||
fromClearingToBankDebitAmount,
|
||||
fromBankToClearingDebitAmount,
|
||||
error != null ? ("error " + messageResolver.resolve(error)) : "ok");
|
||||
if (error != null) {
|
||||
batchInfo.setError(error);
|
||||
payments.forEach(pmt -> {
|
||||
pmt.setTransactionStatus(TransactionStatus.cher.getKey());
|
||||
pmtInstrctnsImdg.update(pmt);
|
||||
});
|
||||
return batchInfo;
|
||||
} else {
|
||||
batchInfo.setFromClearingToBank(aList);
|
||||
batchInfo.setFromBankToClearing(bList);
|
||||
return batchInfo;
|
||||
}
|
||||
} else if (ClearingMemberCategoryD.B.equals(categoryValue)) {
|
||||
batchInfo.setInitialOrder(payments);
|
||||
return batchInfo;
|
||||
} else {
|
||||
throw new IllegalStateException("unknown clearing member category for generationId="
|
||||
+ generationId + " companyId=" + senderId + "");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,53 @@
|
|||
package ru.spcex.clearing.service;
|
||||
|
||||
import ru.clearing.classes.statics.data.payment.PaymentInstruction;
|
||||
import ru.clearing.classes.statics.data.sdf.SDf03;
|
||||
import ru.spcex.platform.enumeration.Sender;
|
||||
import ru.spcex.platform.utils.time.TimeUtil;
|
||||
|
||||
import java.time.Instant;
|
||||
import java.time.LocalDate;
|
||||
|
||||
public class Sdf03Builder {
|
||||
public static SDf03 buildSdf03(PaymentInstruction paymentInstruction, Long generationId) {
|
||||
SDf03 sDf03 = new SDf03();
|
||||
sDf03.setSeg_type("S");
|
||||
sDf03.setDoc_type("002");
|
||||
sDf03.setDocnm_ref(paymentInstruction.getId().toString());
|
||||
sDf03.setPriority("9");
|
||||
sDf03.setSbankcode(Sender.Prc.equalsById(paymentInstruction.getSenderId()) ? "@09999" : "@0");
|
||||
sDf03.setC_acc_deb(paymentInstruction.getDebitLegAccount());
|
||||
sDf03.setSbanknam1(paymentInstruction.getPayeeBankName());
|
||||
// =@00100, если ?;
|
||||
// =@00000, если ?.
|
||||
sDf03.setRbankcode(Sender.Prc.equalsById(paymentInstruction.getSenderId()) ? "@09999" : "@0");
|
||||
sDf03.setC_acc_cred(paymentInstruction.getCreditLegAccount());
|
||||
sDf03.setRbanknam1(paymentInstruction.getAddresseeBankName());
|
||||
sDf03.setPay_date(LocalDate.now().format(TimeUtil.PROPERTY_DATE_FORMATTER));
|
||||
sDf03.setPay_val("RUR");
|
||||
sDf03.setSum_deb(paymentInstruction.getDebitLegAmount() != null ? paymentInstruction.getDebitLegAmount().toString() : null);
|
||||
//37 sp_code varchar(2) Код назначения платежа
|
||||
String[] splitPaymentPurpose = SpecifUtil.splitPaymentPurpose(paymentInstruction.getPaymentPurpose());
|
||||
for (int i = 0; i < splitPaymentPurpose.length; i++) {
|
||||
String specif = splitPaymentPurpose[i];
|
||||
if (i == 0) {
|
||||
sDf03.setSpecif_1(specif);
|
||||
} else if (i == 1) {
|
||||
sDf03.setSpecif_2(specif);
|
||||
} else if (i == 2) {
|
||||
sDf03.setSpecif_3(specif);
|
||||
} else if (i == 3) {
|
||||
sDf03.setSpecif_4(specif);
|
||||
} else if (i == 4) {
|
||||
sDf03.setSpecif_5(specif);
|
||||
} else if (i == 5) {
|
||||
sDf03.setSpecif_6(specif);
|
||||
}
|
||||
}
|
||||
sDf03.setGenerationTime(Instant.now());
|
||||
sDf03.setGenerationId(generationId);
|
||||
//todo
|
||||
// sDf03.setPaymentInstructionId(paymentInstruction.getId());
|
||||
return sDf03;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,53 @@
|
|||
package ru.spcex.clearing.service;
|
||||
|
||||
import ru.clearing.classes.statics.data.payment.PaymentInstruction;
|
||||
import ru.clearing.classes.statics.data.sdf.SDf11;
|
||||
import ru.spcex.platform.enumeration.Sender;
|
||||
import ru.spcex.platform.utils.time.TimeUtil;
|
||||
|
||||
import java.time.Instant;
|
||||
import java.time.LocalDate;
|
||||
|
||||
public class Sdf11Builder {
|
||||
public static SDf11 buildSdf11(PaymentInstruction paymentInstruction, Long generationId) {
|
||||
SDf11 sDf11 = new SDf11();
|
||||
sDf11.setSeg_type("S");
|
||||
sDf11.setDoc_type("002");
|
||||
sDf11.setDocnm_ref(paymentInstruction.getId().toString());
|
||||
sDf11.setPriority("9");
|
||||
sDf11.setSbankcode(Sender.Prc.equalsById(paymentInstruction.getSenderId()) ? "@09999" : "@0");
|
||||
sDf11.setC_acc_deb(paymentInstruction.getDebitLegAccount());
|
||||
sDf11.setSbanknam1(paymentInstruction.getPayeeBankName());
|
||||
// =@00100, если ?;
|
||||
// =@00000, если ?.
|
||||
sDf11.setRbankcode(Sender.Prc.equalsById(paymentInstruction.getSenderId()) ? "@09999" : "@0");
|
||||
sDf11.setC_acc_cred(paymentInstruction.getCreditLegAccount());
|
||||
sDf11.setRbanknam1(paymentInstruction.getAddresseeBankName());
|
||||
sDf11.setPay_date(LocalDate.now().format(TimeUtil.PROPERTY_DATE_FORMATTER));
|
||||
sDf11.setPay_val("RUR");
|
||||
sDf11.setSum_deb(paymentInstruction.getDebitLegAmount() != null ? paymentInstruction.getDebitLegAmount().toString() : null);
|
||||
//37 sp_code varchar(2) Код назначения платежа
|
||||
String[] splitPaymentPurpose = SpecifUtil.splitPaymentPurpose(paymentInstruction.getPaymentPurpose());
|
||||
for (int i = 0; i < splitPaymentPurpose.length; i++) {
|
||||
String specif = splitPaymentPurpose[i];
|
||||
if (i == 0) {
|
||||
sDf11.setSpecif_1(specif);
|
||||
} else if (i == 1) {
|
||||
sDf11.setSpecif_2(specif);
|
||||
} else if (i == 2) {
|
||||
sDf11.setSpecif_3(specif);
|
||||
} else if (i == 3) {
|
||||
sDf11.setSpecif_4(specif);
|
||||
} else if (i == 4) {
|
||||
sDf11.setSpecif_5(specif);
|
||||
} else if (i == 5) {
|
||||
sDf11.setSpecif_6(specif);
|
||||
}
|
||||
}
|
||||
sDf11.setGenerationTime(Instant.now());
|
||||
sDf11.setGenerationId(generationId);
|
||||
//todo
|
||||
// sDf03.setPaymentInstructionId(paymentInstruction.getId());
|
||||
return sDf11;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
package ru.spcex.clearing.service;
|
||||
|
||||
public class SpecifUtil {
|
||||
public static String[] splitPaymentPurpose(String paymentPurpose) {
|
||||
if (paymentPurpose == null || paymentPurpose.length() < 1) return new String[0];
|
||||
int specifSize = divisionRoundUp(paymentPurpose.length(), 35);
|
||||
specifSize = Math.min(specifSize, 6);
|
||||
String[] res = new String[specifSize];
|
||||
for (int i = 0; i < res.length; i++) {
|
||||
int startIndex = i * 35;
|
||||
int endIndex = Math.min(35 * (i + 1), paymentPurpose.length());
|
||||
res[i] = paymentPurpose.substring(startIndex, endIndex);
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
public static int divisionRoundUp(int a, int b) {
|
||||
int ostatok = a % b;
|
||||
return a / b + (ostatok > 0 ? 1 : 0);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
spring.main.web-application-type=none
|
||||
|
||||
clearing-service.hazelcast.cluster-members=127.0.0.1:5701
|
||||
clearing-service.hazelcast.login=dev
|
||||
clearing-service.hazelcast.password=dev-pass
|
||||
|
||||
clearing-service.kafka-consumer.bootstrap-servers=localhost:9092
|
||||
clearing-service.kafka-consumer.group-id=dev-group-clearing-service
|
||||
clearing-service.kafka-consumer.enable-auto-commit=false
|
||||
clearing-service.kafka-consumer.session-timeout-ms=30000
|
||||
clearing-service.kafka-consumer.auto-offset-reset=latest
|
||||
clearing-service.kafka-consumer.linger-ms=1
|
||||
clearing-service.kafka-consumer.buffer-memory=33554432
|
||||
|
||||
clearing-service.kafka-producer.bootstrap-servers=localhost:9092
|
||||
clearing-service.kafka-producer.acks=all
|
||||
clearing-service.kafka-producer.retries=0
|
||||
clearing-service.kafka-producer.batch-size=16384
|
||||
clearing-service.kafka-producer.linger-ms=1
|
||||
clearing-service.kafka-producer.buffer-memory=33554432
|
||||
|
||||
clearing-service.scheduler.check-payment-instruction=*/5 * * * * *
|
||||
|
|
@ -0,0 +1,76 @@
|
|||
package ru.spcex.clearing.service;
|
||||
|
||||
import org.junit.jupiter.api.Assertions;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
class SpecifUtilTest {
|
||||
@Test
|
||||
public void testDivideRoundUp() {
|
||||
Assertions.assertEquals(2, SpecifUtil.divisionRoundUp(36, 35));
|
||||
Assertions.assertEquals(2, SpecifUtil.divisionRoundUp(70, 35));
|
||||
Assertions.assertEquals(3, SpecifUtil.divisionRoundUp(71, 35));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testSplit() {
|
||||
{
|
||||
//40 symbols
|
||||
String[] splitted = SpecifUtil.splitPaymentPurpose("0123456789012345678901234567890123456789");
|
||||
Assertions.assertEquals(2, splitted.length);
|
||||
Assertions.assertEquals("01234567890123456789012345678901234", splitted[0]);
|
||||
Assertions.assertEquals("56789", splitted[1]);
|
||||
}
|
||||
|
||||
{
|
||||
//40 symbols
|
||||
String[] splitted = SpecifUtil.splitPaymentPurpose("01234567890123456789012345678901234");
|
||||
Assertions.assertEquals(1, splitted.length);
|
||||
Assertions.assertEquals("01234567890123456789012345678901234", splitted[0]);
|
||||
}
|
||||
|
||||
{
|
||||
//10 symbols
|
||||
String[] splitted = SpecifUtil.splitPaymentPurpose("0123456789");
|
||||
Assertions.assertEquals(1, splitted.length);
|
||||
Assertions.assertEquals("0123456789", splitted[0]);
|
||||
}
|
||||
|
||||
{
|
||||
//0 symbols
|
||||
String[] splitted = SpecifUtil.splitPaymentPurpose("");
|
||||
Assertions.assertEquals(0, splitted.length);
|
||||
}
|
||||
|
||||
{
|
||||
//80 symbols
|
||||
String[] splitted = SpecifUtil.splitPaymentPurpose("0123456789012345678901234567890123456789" +
|
||||
"0123456789012345678901234567890123456789");
|
||||
Assertions.assertEquals(3, splitted.length);
|
||||
Assertions.assertEquals("01234567890123456789012345678901234", splitted[0]);
|
||||
Assertions.assertEquals("56789012345678901234567890123456789", splitted[1]);
|
||||
Assertions.assertEquals("0123456789", splitted[2]);
|
||||
}
|
||||
|
||||
{
|
||||
//maximum symbols
|
||||
String[] splitted = SpecifUtil.splitPaymentPurpose("01234567890123456789012345678912345" +
|
||||
"01234567890123456789012345678912345" +
|
||||
"01234567890123456789012345678912345" +
|
||||
"01234567890123456789012345678912345" +
|
||||
"01234567890123456789012345678912345" +
|
||||
"01234567890123456789012345678912345" +
|
||||
"outside of scope"
|
||||
);
|
||||
Assertions.assertEquals(6, splitted.length);
|
||||
for (String s : splitted) {
|
||||
Assertions.assertEquals("01234567890123456789012345678912345", s);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
// "";
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -30,6 +30,7 @@
|
|||
<module>account-service</module>
|
||||
<module>balance-service</module>
|
||||
<module>scheduler-service</module>
|
||||
<module>clearing-service</module>
|
||||
</modules>
|
||||
|
||||
<properties>
|
||||
|
|
|
|||
|
|
@ -7,73 +7,75 @@ import org.slf4j.LoggerFactory;
|
|||
import org.springframework.beans.factory.InitializingBean;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import ru.clearing.classes.statics.data.misc.KeyRate;
|
||||
import ru.clearing.classes.statics.data.scheduler.Scheduler;
|
||||
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.common.CommonDeleteRequest;
|
||||
import ru.spcex.clearing.platform.messaging.domain.cud.utilities.KeyRateNewRequest;
|
||||
import ru.spcex.clearing.platform.messaging.domain.cud.utilities.KeyRateUpdateRequest;
|
||||
import ru.spcex.clearing.platform.messaging.domain.cud.schedule.SchedulerNewRequest;
|
||||
import ru.spcex.clearing.platform.messaging.domain.cud.schedule.SchedulerUpdateRequest;
|
||||
import ru.spcex.clearing.platform.messaging.service.QueueConsumer;
|
||||
import ru.spcex.platform.enumeration.Status;
|
||||
import ru.spcex.platform.imdg.api.Imdg;
|
||||
import ru.spcex.platform.imdg.api.ImdgProvider;
|
||||
|
||||
@Service
|
||||
public class SchedulerService extends QueueConsumer implements InitializingBean {
|
||||
private final Logger log = LoggerFactory.getLogger(getClass());
|
||||
private final Imdg<KeyRate> keyRateMap;
|
||||
private final Imdg<Scheduler> schedulerMap;
|
||||
|
||||
@Autowired
|
||||
public SchedulerService(Consumer<String, Object> kafkaQueue, Producer<String, Object> kafkaProducer,
|
||||
ImdgProvider imdgProvider) {
|
||||
super(kafkaQueue, kafkaProducer);
|
||||
this.keyRateMap = imdgProvider.getImdg(IMDGDistributedNames.Map_KeyRate, KeyRate.class);
|
||||
this.schedulerMap = imdgProvider.getImdg(IMDGDistributedNames.Map_Scheduler, Scheduler.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void afterPropertiesSet() {
|
||||
callback(KeyRateNewRequest.class)
|
||||
.setConsumer(this::newKeyRate)
|
||||
.forDestination(Consts.DESTINATION_KEY_RATE_NEW, callbacks::put);
|
||||
callback(KeyRateUpdateRequest.class)
|
||||
.setConsumer(this::updateKeyRate)
|
||||
.forDestination(Consts.DESTINATION_KEY_RATE_UPDATE, callbacks::put);
|
||||
callback(SchedulerNewRequest.class)
|
||||
.setConsumer(this::newScheduler)
|
||||
.forDestination(Consts.DESTINATION_SCHEDULER_NEW, callbacks::put);
|
||||
callback(SchedulerUpdateRequest.class)
|
||||
.setConsumer(this::updateScheduler)
|
||||
.forDestination(Consts.DESTINATION_SCHEDULER_UPDATE, callbacks::put);
|
||||
callback(CommonDeleteRequest.class)
|
||||
.setConsumer(this::deleteKeyRate)
|
||||
.forDestination(Consts.DESTINATION_KEY_RATE_DELETE, callbacks::put);
|
||||
.setConsumer(this::deleteScheduler)
|
||||
.forDestination(Consts.DESTINATION_SCHEDULER_DELETE, callbacks::put);
|
||||
init();
|
||||
}
|
||||
|
||||
private void newKeyRate(BaseRequest<KeyRateNewRequest> userRequest) {
|
||||
KeyRateNewRequest req = userRequest.getRequestPayload();
|
||||
log.debug("MoneyMarketSecurityNewRequest received");
|
||||
KeyRate keyRate = new KeyRate();
|
||||
keyRate.setEndDate(req.getEndDate());
|
||||
keyRate.setDocument(req.getDocument());
|
||||
keyRate.setRate(req.getKeyRate());
|
||||
keyRate.setStartDate(req.getStartDate());
|
||||
keyRate.setWorkflowStatus(Status.Active.getKey());
|
||||
keyRateMap.insert(keyRate);
|
||||
log.debug("successfully processed, new id {}", keyRate.getId());
|
||||
private void newScheduler(BaseRequest<SchedulerNewRequest> userRequest) {
|
||||
SchedulerNewRequest req = userRequest.getRequestPayload();
|
||||
log.debug("SchedulerNewRequest received");
|
||||
Scheduler scheduler = new Scheduler();
|
||||
scheduler.setTask(req.getTask());
|
||||
scheduler.setTaskTime(req.getTaskTime());
|
||||
scheduler.setClearingDate(req.getClearingDate());
|
||||
scheduler.setMarket(req.getMarket());
|
||||
scheduler.setTaskStatus(req.getTaskStatus());
|
||||
scheduler.setSecurityId(req.getSecurityId());
|
||||
schedulerMap.insert(scheduler);
|
||||
log.debug("successfully processed, new id {}", scheduler.getId());
|
||||
}
|
||||
|
||||
private void updateKeyRate(BaseRequest<KeyRateUpdateRequest> userRequest) {
|
||||
KeyRateUpdateRequest req = userRequest.getRequestPayload();
|
||||
private void updateScheduler(BaseRequest<SchedulerUpdateRequest> userRequest) {
|
||||
SchedulerUpdateRequest req = userRequest.getRequestPayload();
|
||||
log.debug("MoneyMarketSecurityUpdateRequest received id = {}", req.getId());
|
||||
KeyRate keyRate = keyRateMap.getSingleObjectByID(req.getId());
|
||||
keyRate.setEndDate(req.getEndDate());
|
||||
keyRate.setDocument(req.getDocument());
|
||||
keyRate.setRate(req.getKeyRate());
|
||||
keyRate.setStartDate(req.getStartDate());
|
||||
keyRateMap.update(keyRate);
|
||||
Scheduler scheduler = schedulerMap.getSingleObjectByID(req.getId());
|
||||
scheduler.setTask(req.getTask());
|
||||
scheduler.setTaskTime(req.getTaskTime());
|
||||
scheduler.setClearingDate(req.getClearingDate());
|
||||
scheduler.setMarket(req.getMarket());
|
||||
scheduler.setTaskStatus(req.getTaskStatus());
|
||||
scheduler.setSecurityId(req.getSecurityId());
|
||||
schedulerMap.update(scheduler);
|
||||
}
|
||||
|
||||
private void deleteKeyRate(BaseRequest<CommonDeleteRequest> userRequest) {
|
||||
private void deleteScheduler(BaseRequest<CommonDeleteRequest> userRequest) {
|
||||
CommonDeleteRequest req = userRequest.getRequestPayload();
|
||||
log.debug("CommonDeleteRequest received id = {}", req.getId());
|
||||
KeyRate keyRate = keyRateMap.getSingleObjectByID(req.getId());
|
||||
keyRateMap.delete(keyRate);
|
||||
Scheduler scheduler = schedulerMap.getSingleObjectByID(req.getId());
|
||||
schedulerMap.delete(scheduler);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,75 @@
|
|||
package ru.spcex.clearing.scheduler.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.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import ru.clearing.classes.statics.data.scheduler.Timetable;
|
||||
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.common.CommonDeleteRequest;
|
||||
import ru.spcex.clearing.platform.messaging.domain.cud.schedule.TimetableNewRequest;
|
||||
import ru.spcex.clearing.platform.messaging.domain.cud.schedule.TimetableUpdateRequest;
|
||||
import ru.spcex.clearing.platform.messaging.service.QueueConsumer;
|
||||
import ru.spcex.platform.imdg.api.Imdg;
|
||||
import ru.spcex.platform.imdg.api.ImdgProvider;
|
||||
|
||||
@Service
|
||||
public class TimetableService extends QueueConsumer implements InitializingBean {
|
||||
private final Logger log = LoggerFactory.getLogger(getClass());
|
||||
private final Imdg<Timetable> timetableMap;
|
||||
|
||||
@Autowired
|
||||
public TimetableService(Consumer<String, Object> kafkaQueue, Producer<String, Object> kafkaProducer,
|
||||
ImdgProvider imdgProvider) {
|
||||
super(kafkaQueue, kafkaProducer);
|
||||
this.timetableMap = imdgProvider.getImdg(IMDGDistributedNames.Map_Timetable, Timetable.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void afterPropertiesSet() {
|
||||
callback(TimetableNewRequest.class)
|
||||
.setConsumer(this::newTimetable)
|
||||
.forDestination(Consts.DESTINATION_TIMETABLE_NEW, callbacks::put);
|
||||
callback(TimetableUpdateRequest.class)
|
||||
.setConsumer(this::updateTimetable)
|
||||
.forDestination(Consts.DESTINATION_TIMETABLE_UPDATE, callbacks::put);
|
||||
callback(CommonDeleteRequest.class)
|
||||
.setConsumer(this::deleteTimetable)
|
||||
.forDestination(Consts.DESTINATION_TIMETABLE_DELETE, callbacks::put);
|
||||
init();
|
||||
}
|
||||
|
||||
private void newTimetable(BaseRequest<TimetableNewRequest> userRequest) {
|
||||
TimetableNewRequest req = userRequest.getRequestPayload();
|
||||
log.debug("TimetableNewRequest received");
|
||||
Timetable timetable = new Timetable();
|
||||
timetable.setTask(req.getTask());
|
||||
timetable.setTaskTime(req.getTaskTime());
|
||||
timetable.setTaskStatus(req.getTaskStatus());
|
||||
timetableMap.insert(timetable);
|
||||
log.debug("successfully processed, new id {}", timetable.getId());
|
||||
}
|
||||
|
||||
private void updateTimetable(BaseRequest<TimetableUpdateRequest> userRequest) {
|
||||
TimetableUpdateRequest req = userRequest.getRequestPayload();
|
||||
log.debug("TimetableNewRequest received");
|
||||
Timetable timetable = timetableMap.getSingleObjectByID(req.getId());
|
||||
timetable.setTask(req.getTask());
|
||||
timetable.setTaskTime(req.getTaskTime());
|
||||
timetable.setTaskStatus(req.getTaskStatus());
|
||||
timetableMap.update(timetable);
|
||||
log.debug("successfully processed, new id {}", timetable.getId());
|
||||
}
|
||||
|
||||
private void deleteTimetable(BaseRequest<CommonDeleteRequest> userRequest) {
|
||||
CommonDeleteRequest req = userRequest.getRequestPayload();
|
||||
log.debug("CommonDeleteRequest received id = {}", req.getId());
|
||||
Timetable timetable = timetableMap.getSingleObjectByID(req.getId());
|
||||
timetableMap.delete(timetable);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,75 @@
|
|||
package ru.spcex.clearing.scheduler.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.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import ru.clearing.classes.statics.data.scheduler.TradingCalendar;
|
||||
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.common.CommonDeleteRequest;
|
||||
import ru.spcex.clearing.platform.messaging.domain.cud.schedule.TradingCalendarNewRequest;
|
||||
import ru.spcex.clearing.platform.messaging.domain.cud.schedule.TradingCalendarUpdateRequest;
|
||||
import ru.spcex.clearing.platform.messaging.service.QueueConsumer;
|
||||
import ru.spcex.platform.imdg.api.Imdg;
|
||||
import ru.spcex.platform.imdg.api.ImdgProvider;
|
||||
|
||||
@Service
|
||||
public class TradingCalendarService extends QueueConsumer implements InitializingBean {
|
||||
private final Logger log = LoggerFactory.getLogger(getClass());
|
||||
private final Imdg<TradingCalendar> tradingCalendarMap;
|
||||
|
||||
@Autowired
|
||||
public TradingCalendarService(Consumer<String, Object> kafkaQueue, Producer<String, Object> kafkaProducer,
|
||||
ImdgProvider imdgProvider) {
|
||||
super(kafkaQueue, kafkaProducer);
|
||||
this.tradingCalendarMap = imdgProvider.getImdg(IMDGDistributedNames.Map_TradingCalendar, TradingCalendar.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void afterPropertiesSet() {
|
||||
callback(TradingCalendarNewRequest.class)
|
||||
.setConsumer(this::newTradingCalendar)
|
||||
.forDestination(Consts.DESTINATION_TRADING_CALENDAR_NEW, callbacks::put);
|
||||
callback(TradingCalendarUpdateRequest.class)
|
||||
.setConsumer(this::updateTradingCalendar)
|
||||
.forDestination(Consts.DESTINATION_TRADING_CALENDAR_UPDATE, callbacks::put);
|
||||
callback(CommonDeleteRequest.class)
|
||||
.setConsumer(this::deleteTradingCalendar)
|
||||
.forDestination(Consts.DESTINATION_TRADING_CALENDAR_DELETE, callbacks::put);
|
||||
init();
|
||||
}
|
||||
|
||||
private void newTradingCalendar(BaseRequest<TradingCalendarNewRequest> userRequest) {
|
||||
TradingCalendarNewRequest req = userRequest.getRequestPayload();
|
||||
log.debug("TradingCalendarNewRequest received");
|
||||
TradingCalendar tradingCalendar = new TradingCalendar();
|
||||
tradingCalendar.setClearingDate(req.getClearingDate());
|
||||
tradingCalendar.setCompanyId(req.getCompanyId());
|
||||
tradingCalendar.setTradingStatus(req.getTradingStatus());
|
||||
tradingCalendarMap.insert(tradingCalendar);
|
||||
log.debug("successfully processed, new id {}", tradingCalendar.getId());
|
||||
}
|
||||
|
||||
private void updateTradingCalendar(BaseRequest<TradingCalendarUpdateRequest> userRequest) {
|
||||
TradingCalendarUpdateRequest req = userRequest.getRequestPayload();
|
||||
log.debug("TradingCalendarUpdateRequest received");
|
||||
TradingCalendar tradingCalendar = tradingCalendarMap.getSingleObjectByID(req.getId());
|
||||
tradingCalendar.setClearingDate(req.getClearingDate());
|
||||
tradingCalendar.setCompanyId(req.getCompanyId());
|
||||
tradingCalendar.setTradingStatus(req.getTradingStatus());
|
||||
tradingCalendarMap.update(tradingCalendar);
|
||||
log.debug("successfully processed, new id {}", tradingCalendar.getId());
|
||||
}
|
||||
|
||||
private void deleteTradingCalendar(BaseRequest<CommonDeleteRequest> userRequest) {
|
||||
CommonDeleteRequest req = userRequest.getRequestPayload();
|
||||
log.debug("CommonDeleteRequest received id = {}", req.getId());
|
||||
TradingCalendar tradingCalendar = tradingCalendarMap.getSingleObjectByID(req.getId());
|
||||
tradingCalendarMap.delete(tradingCalendar);
|
||||
}
|
||||
}
|
||||
|
|
@ -3,7 +3,7 @@ package ru.spcex.platform.enumeration;
|
|||
import ru.spcex.platform.utils.enumeration.IEnumKey;
|
||||
|
||||
public enum AccountType implements IEnumKey {
|
||||
Clrn("CLRN");
|
||||
Clrn("CLRN"), Bank("BANK");
|
||||
|
||||
private final String key;
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,18 @@
|
|||
package ru.spcex.platform.enumeration;
|
||||
|
||||
import ru.spcex.platform.utils.enumeration.IEnumKey;
|
||||
|
||||
public enum ClearingMemberCategoryD implements IEnumKey {
|
||||
I("I"), B("B");
|
||||
|
||||
private final String key;
|
||||
|
||||
ClearingMemberCategoryD(String key) {
|
||||
this.key = key;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getKey() {
|
||||
return key;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
package ru.spcex.platform.enumeration;
|
||||
|
||||
import ru.spcex.platform.utils.enumeration.IEnumKey;
|
||||
|
||||
public enum TransactionStatus implements IEnumKey {
|
||||
stld("STLD"), notSent("NSNT"), cher("CHER"), sent("SENT");
|
||||
|
||||
private final String key;
|
||||
|
||||
TransactionStatus(String key) {
|
||||
this.key = key;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getKey() {
|
||||
return key;
|
||||
}
|
||||
}
|
||||
|
|
@ -9,6 +9,14 @@ public interface Consts {
|
|||
String DESTINATION_KEY_RATE_UPDATE = "key-rate-update";
|
||||
String DESTINATION_KEY_RATE_DELETE = "key-rate-delete";
|
||||
|
||||
String DESTINATION_TIMETABLE_NEW = "timetable-new";
|
||||
String DESTINATION_TIMETABLE_UPDATE = "timetable-update";
|
||||
String DESTINATION_TIMETABLE_DELETE = "timetable-delete";
|
||||
|
||||
String DESTINATION_TRADING_CALENDAR_NEW = "timetable-new";
|
||||
String DESTINATION_TRADING_CALENDAR_UPDATE = "timetable-update";
|
||||
String DESTINATION_TRADING_CALENDAR_DELETE = "timetable-delete";
|
||||
|
||||
String DESTINATION_SCHEDULER_NEW = "scheduler-new";
|
||||
String DESTINATION_SCHEDULER_UPDATE = "scheduler-update";
|
||||
String DESTINATION_SCHEDULER_DELETE = "scheduler-delete";
|
||||
|
|
@ -35,6 +43,8 @@ public interface Consts {
|
|||
//todo
|
||||
String STATEMENT_PROCESS = "statement-process";
|
||||
String SDF04_PROCESS = "sdf04-process";
|
||||
String SDF03_PROCESS = "sdf03-process";
|
||||
String SDF11_PROCESS = "sdf11-process";
|
||||
String EXPORT_PROCESS = "export-process";
|
||||
String ACCOUNT_NEW = "account-new";
|
||||
String BALANCE_ACCOUNT_NEW = "balance-account-new";
|
||||
|
|
|
|||
|
|
@ -0,0 +1,16 @@
|
|||
package ru.spcex.clearing.platform.messaging.domain.cud.clearing;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
public class SdfClearingRequest {
|
||||
@JsonProperty
|
||||
private Long groupId;
|
||||
|
||||
public Long getGroupId() {
|
||||
return groupId;
|
||||
}
|
||||
|
||||
public void setGroupId(Long groupId) {
|
||||
this.groupId = groupId;
|
||||
}
|
||||
}
|
||||
|
|
@ -4,23 +4,26 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
|||
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import ru.spcex.clearing.platform.messaging.domain.json.deserialize.LocalDateDeserializer;
|
||||
import ru.spcex.clearing.platform.messaging.domain.json.deserialize.LocalTimeDeserializer;
|
||||
import ru.spcex.clearing.platform.messaging.domain.json.serialize.LocalDateSerializer;
|
||||
import ru.spcex.clearing.platform.messaging.domain.json.serialize.LocalTimeSerializer;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalTime;
|
||||
|
||||
public class SchedulerNewRequest {
|
||||
@JsonProperty
|
||||
@JsonSerialize(using = LocalDateSerializer.class)
|
||||
@JsonDeserialize(using = LocalDateDeserializer.class)
|
||||
public LocalTime taskTime;
|
||||
|
||||
@JsonProperty
|
||||
public String task;
|
||||
|
||||
@JsonSerialize(using = LocalTimeSerializer.class)
|
||||
@JsonDeserialize(using = LocalTimeDeserializer.class)
|
||||
@JsonProperty
|
||||
public LocalTime taskTime;
|
||||
|
||||
@JsonSerialize(using = LocalDateSerializer.class)
|
||||
@JsonDeserialize(using = LocalDateDeserializer.class)
|
||||
@JsonProperty
|
||||
public LocalDate clearingDate;
|
||||
|
||||
@JsonProperty
|
||||
|
|
@ -32,13 +35,12 @@ public class SchedulerNewRequest {
|
|||
@JsonProperty
|
||||
public Long securityId;
|
||||
|
||||
public SchedulerNewRequest(LocalTime taskTime, String task, LocalDate clearingDate, String market, String taskStatus, Long securityId) {
|
||||
this.taskTime = taskTime;
|
||||
public String getTask() {
|
||||
return task;
|
||||
}
|
||||
|
||||
public void setTask(String task) {
|
||||
this.task = task;
|
||||
this.clearingDate = clearingDate;
|
||||
this.market = market;
|
||||
this.taskStatus = taskStatus;
|
||||
this.securityId = securityId;
|
||||
}
|
||||
|
||||
public LocalTime getTaskTime() {
|
||||
|
|
@ -49,14 +51,6 @@ public class SchedulerNewRequest {
|
|||
this.taskTime = taskTime;
|
||||
}
|
||||
|
||||
public String getTask() {
|
||||
return task;
|
||||
}
|
||||
|
||||
public void setTask(String task) {
|
||||
this.task = task;
|
||||
}
|
||||
|
||||
public LocalDate getClearingDate() {
|
||||
return clearingDate;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,30 +12,33 @@ import java.time.LocalDate;
|
|||
import java.time.LocalTime;
|
||||
|
||||
public class SchedulerUpdateRequest {
|
||||
@JsonProperty
|
||||
private String task;
|
||||
|
||||
@JsonProperty
|
||||
public Long id;
|
||||
@JsonProperty
|
||||
public String task;
|
||||
@JsonSerialize(using = LocalTimeSerializer.class)
|
||||
@JsonDeserialize(using = LocalTimeDeserializer.class)
|
||||
@JsonProperty
|
||||
private LocalTime taskTime;
|
||||
|
||||
public LocalTime taskTime;
|
||||
@JsonSerialize(using = LocalDateSerializer.class)
|
||||
@JsonDeserialize(using = LocalDateDeserializer.class)
|
||||
@JsonProperty
|
||||
private LocalDate clearingDate;
|
||||
|
||||
public LocalDate clearingDate;
|
||||
@JsonProperty
|
||||
private String market;
|
||||
|
||||
public String market;
|
||||
@JsonProperty
|
||||
private String taskStatus;
|
||||
|
||||
public String taskStatus;
|
||||
@JsonProperty
|
||||
private Long securityId;
|
||||
public Long securityId;
|
||||
|
||||
@JsonProperty
|
||||
private Long id;
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getTask() {
|
||||
return task;
|
||||
|
|
@ -84,12 +87,4 @@ public class SchedulerUpdateRequest {
|
|||
public void setSecurityId(Long securityId) {
|
||||
this.securityId = securityId;
|
||||
}
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,45 @@
|
|||
package ru.spcex.clearing.platform.messaging.domain.cud.schedule;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import ru.spcex.clearing.platform.messaging.domain.json.deserialize.LocalTimeDeserializer;
|
||||
import ru.spcex.clearing.platform.messaging.domain.json.serialize.LocalTimeSerializer;
|
||||
|
||||
import java.time.LocalTime;
|
||||
|
||||
public class TimetableNewRequest {
|
||||
@JsonProperty
|
||||
public String task;
|
||||
|
||||
@JsonSerialize(using = LocalTimeSerializer.class)
|
||||
@JsonDeserialize(using = LocalTimeDeserializer.class)
|
||||
@JsonProperty
|
||||
public LocalTime taskTime;
|
||||
@JsonProperty
|
||||
public String taskStatus;
|
||||
|
||||
public String getTask() {
|
||||
return task;
|
||||
}
|
||||
|
||||
public void setTask(String task) {
|
||||
this.task = task;
|
||||
}
|
||||
|
||||
public LocalTime getTaskTime() {
|
||||
return taskTime;
|
||||
}
|
||||
|
||||
public void setTaskTime(LocalTime taskTime) {
|
||||
this.taskTime = taskTime;
|
||||
}
|
||||
|
||||
public String getTaskStatus() {
|
||||
return taskStatus;
|
||||
}
|
||||
|
||||
public void setTaskStatus(String taskStatus) {
|
||||
this.taskStatus = taskStatus;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,56 @@
|
|||
package ru.spcex.clearing.platform.messaging.domain.cud.schedule;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import ru.spcex.clearing.platform.messaging.domain.json.deserialize.LocalTimeDeserializer;
|
||||
import ru.spcex.clearing.platform.messaging.domain.json.serialize.LocalTimeSerializer;
|
||||
|
||||
import java.time.LocalTime;
|
||||
|
||||
public class TimetableUpdateRequest {
|
||||
@JsonProperty
|
||||
public Long id;
|
||||
|
||||
@JsonProperty
|
||||
public String task;
|
||||
|
||||
@JsonSerialize(using = LocalTimeSerializer.class)
|
||||
@JsonDeserialize(using = LocalTimeDeserializer.class)
|
||||
@JsonProperty
|
||||
public LocalTime taskTime;
|
||||
@JsonProperty
|
||||
public String taskStatus;
|
||||
|
||||
public String getTask() {
|
||||
return task;
|
||||
}
|
||||
|
||||
public void setTask(String task) {
|
||||
this.task = task;
|
||||
}
|
||||
|
||||
public LocalTime getTaskTime() {
|
||||
return taskTime;
|
||||
}
|
||||
|
||||
public void setTaskTime(LocalTime taskTime) {
|
||||
this.taskTime = taskTime;
|
||||
}
|
||||
|
||||
public String getTaskStatus() {
|
||||
return taskStatus;
|
||||
}
|
||||
|
||||
public void setTaskStatus(String taskStatus) {
|
||||
this.taskStatus = taskStatus;
|
||||
}
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,44 @@
|
|||
package ru.spcex.clearing.platform.messaging.domain.cud.schedule;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import ru.spcex.clearing.platform.messaging.domain.json.deserialize.LocalDateDeserializer;
|
||||
import ru.spcex.clearing.platform.messaging.domain.json.serialize.LocalDateSerializer;
|
||||
|
||||
import java.time.LocalDate;
|
||||
|
||||
public class TradingCalendarNewRequest {
|
||||
@JsonSerialize(using = LocalDateSerializer.class)
|
||||
@JsonDeserialize(using = LocalDateDeserializer.class)
|
||||
@JsonProperty
|
||||
public LocalDate clearingDate;
|
||||
@JsonProperty
|
||||
public Long companyId;
|
||||
@JsonProperty
|
||||
public String tradingStatus;
|
||||
|
||||
public LocalDate getClearingDate() {
|
||||
return clearingDate;
|
||||
}
|
||||
|
||||
public void setClearingDate(LocalDate clearingDate) {
|
||||
this.clearingDate = clearingDate;
|
||||
}
|
||||
|
||||
public Long getCompanyId() {
|
||||
return companyId;
|
||||
}
|
||||
|
||||
public void setCompanyId(Long companyId) {
|
||||
this.companyId = companyId;
|
||||
}
|
||||
|
||||
public String getTradingStatus() {
|
||||
return tradingStatus;
|
||||
}
|
||||
|
||||
public void setTradingStatus(String tradingStatus) {
|
||||
this.tradingStatus = tradingStatus;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,55 @@
|
|||
package ru.spcex.clearing.platform.messaging.domain.cud.schedule;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import ru.spcex.clearing.platform.messaging.domain.json.deserialize.LocalDateDeserializer;
|
||||
import ru.spcex.clearing.platform.messaging.domain.json.serialize.LocalDateSerializer;
|
||||
|
||||
import java.time.LocalDate;
|
||||
|
||||
public class TradingCalendarUpdateRequest {
|
||||
@JsonProperty
|
||||
public Long id;
|
||||
|
||||
@JsonSerialize(using = LocalDateSerializer.class)
|
||||
@JsonDeserialize(using = LocalDateDeserializer.class)
|
||||
@JsonProperty
|
||||
public LocalDate clearingDate;
|
||||
@JsonProperty
|
||||
public Long companyId;
|
||||
@JsonProperty
|
||||
public String tradingStatus;
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public LocalDate getClearingDate() {
|
||||
return clearingDate;
|
||||
}
|
||||
|
||||
public void setClearingDate(LocalDate clearingDate) {
|
||||
this.clearingDate = clearingDate;
|
||||
}
|
||||
|
||||
public Long getCompanyId() {
|
||||
return companyId;
|
||||
}
|
||||
|
||||
public void setCompanyId(Long companyId) {
|
||||
this.companyId = companyId;
|
||||
}
|
||||
|
||||
public String getTradingStatus() {
|
||||
return tradingStatus;
|
||||
}
|
||||
|
||||
public void setTradingStatus(String tradingStatus) {
|
||||
this.tradingStatus = tradingStatus;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Reference in a new issue