Merge remote-tracking branch 'origin/dev' into dev

This commit is contained in:
psemenkov 2023-05-19 19:41:16 +03:00
commit 363c4e4e88
19 changed files with 734 additions and 243 deletions

View file

@ -1,6 +1,6 @@
{
"version": "3.5.0.22",
"version": "3.5.0.23",
"enums": {
@ -1726,7 +1726,7 @@
}
,
{"code": "corporationSoleType",
"type": 12,"dbname": "Код единоличного исполнительного органа","name": "Единоличный исполнительный орган","shortname": "Исполнительный орган","searchable": true,"sortable": true,"visible": true,"link": "corporationSoleType"
"type": 12,"dbname": "Код единоличного исполнительного органа","name": "Единоличный исполнительный орган","shortname": "Исполнительный орган","searchable": true,"sortable": true,"visible": true,"link": "corporationSoleType","ignore": true
}
,
{"code": "countryCode",
@ -1734,7 +1734,7 @@
}
,
{"code": "description",
"type": 2,"length": 255,"name": "Описание компании","shortname": "Описание","searchable": true,"sortable": true,"visible": true
"type": 2,"length": 255,"name": "Описание компании","shortname": "Описание","searchable": true,"sortable": true,"visible": true,"ignore": true
}
,
{"code": "professionalSign",
@ -1812,7 +1812,7 @@
}
,
{"code": "corporationSoleType",
"type": 12,"name": "Единоличный исполнительный орган","shortname": "Исполнительный орган","link": "corporationSoleType"
"type": 12,"name": "Единоличный исполнительный орган","shortname": "Исполнительный орган","link": "corporationSoleType","visible": false
}
,
{"code": "legalKind",
@ -1840,7 +1840,7 @@
}
,
{"code": "description",
"type": 2,"length": 255,"name": "Описание компании","shortname": "Описание компании"
"type": 2,"length": 255,"name": "Описание компании","shortname": "Описание компании","visible": false
}
,
{"code": "workflowStatus",
@ -2025,7 +2025,7 @@
}
,
{"code": "issuePlace",
"type": 2,"length": 255,"name": "Место выдачи","shortname": "Место выдачи","searchable": true,"sortable": true,"visible": true
"type": 2,"length": 255,"name": "Место выдачи","shortname": "Место выдачи","searchable": true,"sortable": true,"visible": true,"ignore": true
}
,
{"code": "issuer",
@ -2033,11 +2033,11 @@
}
,
{"code": "issuerCode",
"type": 2,"length": 255,"name": "Код выдавшего органа","shortname": "Выдавший орган","searchable": true,"sortable": true,"visible": true
"type": 2,"length": 255,"name": "Код выдавшего органа","shortname": "Выдавший орган","searchable": true,"sortable": true,"visible": true,"ignore": true
}
,
{"code": "name",
"type": 2,"length": 255,"name": "Наименование документа","shortname": "Документ","searchable": true,"sortable": true,"visible": true
"type": 2,"length": 255,"name": "Наименование документа","shortname": "Документ","searchable": true,"sortable": true,"visible": true,"ignore": true
}
,
{"code": "number",
@ -2045,11 +2045,11 @@
}
,
{"code": "place",
"type": 2,"length": 255,"name": "Место","shortname": "Место","searchable": true,"sortable": true,"visible": true
"type": 2,"length": 255,"name": "Место","shortname": "Место","searchable": true,"sortable": true,"visible": true,"ignore": true
}
,
{"code": "validFromDate",
"type": 6,"name": "Дата начала срока действия","shortname": "Начало","searchable": true,"sortable": true
"type": 6,"name": "Дата начала срока действия","shortname": "Начало","searchable": true,"sortable": true,"ignore": true
}
,
{"code": "validToDate",
@ -2085,7 +2085,7 @@
}
,
{"code": "issuePlace",
"type": 2,"length": 255,"name": "Место выдачи","shortname": "Место выдачи","required": true
"type": 2,"length": 255,"name": "Место выдачи","shortname": "Место выдачи","visible": false
}
,
{"code": "issuer",
@ -2093,11 +2093,11 @@
}
,
{"code": "issuerCode",
"type": 2,"length": 255,"name": "Код выдавшего органа","shortname": "Выдавший орган","required": true
"type": 2,"length": 255,"name": "Код выдавшего органа","shortname": "Выдавший орган","visible": false
}
,
{"code": "name",
"type": 2,"length": 255,"name": "Наименование документа","shortname": "Документ","required": true
"type": 2,"length": 255,"name": "Наименование документа","shortname": "Документ","visible": false
}
,
{"code": "number",
@ -2105,11 +2105,11 @@
}
,
{"code": "place",
"type": 2,"length": 255,"name": "Место","shortname": "Место","required": true
"type": 2,"length": 255,"name": "Место","shortname": "Место","visible": false
}
,
{"code": "validFromDate",
"type": 6,"name": "Дата начала срока действия","shortname": "Начало","required": true
"type": 6,"name": "Дата начала срока действия","shortname": "Начало","visible": false
}
,
{"code": "validToDate",
@ -2146,7 +2146,7 @@
}
,
{"code": "issuePlace",
"type": 2,"length": 255,"name": "Место выдачи","shortname": "Место выдачи"
"type": 2,"length": 255,"name": "Место выдачи","shortname": "Место выдачи","visible": false
}
,
{"code": "issuer",
@ -2154,11 +2154,11 @@
}
,
{"code": "issuerCode",
"type": 2,"length": 255,"name": "Код выдавшего органа","shortname": "Выдавший орган"
"type": 2,"length": 255,"name": "Код выдавшего органа","shortname": "Выдавший орган","visible": false
}
,
{"code": "name",
"type": 2,"length": 255,"name": "Наименование документа","shortname": "Документ"
"type": 2,"length": 255,"name": "Наименование документа","shortname": "Документ","visible": false
}
,
{"code": "number",
@ -2166,11 +2166,11 @@
}
,
{"code": "place",
"type": 2,"length": 255,"name": "Место","shortname": "Место"
"type": 2,"length": 255,"name": "Место","shortname": "Место","visible": false
}
,
{"code": "validFromDate",
"type": 6,"name": "Дата начала срока действия","shortname": "Начало"
"type": 6,"name": "Дата начала срока действия","shortname": "Начало","visible": false
}
,
{"code": "validToDate",
@ -2391,7 +2391,7 @@
"fields": [
{"code": "countryCode",
"type": 12,"dbname": "Код страны","name": "Наименование страны","shortname": "Страна","searchable": true,"sortable": true,"visible": true,"link": "countryCode"
"type": 12,"dbname": "Код страны","name": "Наименование страны","shortname": "Страна","searchable": true,"sortable": true,"visible": true,"link": "countryCode","ignore": true
}
,
{"code": "currencyCode",
@ -2423,15 +2423,15 @@
}
,
{"code": "description",
"type": 2,"length": 255,"name": "Описание","shortname": "Описание","searchable": true,"sortable": false
"type": 2,"length": 255,"name": "Описание","shortname": "Описание","searchable": true,"sortable": false,"ignore": true
}
,
{"code": "startDate",
"type": 6,"name": "Дата начала действия","shortname": "Дата начала","searchable": true,"sortable": true
"type": 6,"name": "Дата начала действия","shortname": "Дата начала","searchable": true,"sortable": true,"ignore": true
}
,
{"code": "endDate",
"type": 6,"name": "Дата окончания действия","shortname": "Дата окончания","searchable": true,"sortable": true
"type": 6,"name": "Дата окончания действия","shortname": "Дата окончания","searchable": true,"sortable": true,"ignore": true
}
,
{"code": "nominalValue",
@ -2463,7 +2463,7 @@
}
,
{"code": "termType",
"type": 12,"dbname": "Код вида инструмента","name": "Наименование вида инструмента","shortname": "Вид инструмента","searchable": true,"sortable": true,"visible": false,"link": "termType"
"type": 12,"dbname": "Код вида инструмента","name": "Наименование вида инструмента","shortname": "Вид инструмента","searchable": true,"sortable": true,"visible": false,"link": "termType","ignore": true
}
,
{"code": "lotSize",
@ -2499,7 +2499,7 @@
"name": "Добавление инструмента Денежного рынка",
"confirmation": "securitySymbol,shortName,fullName,lotSize,nominalValue,nominalCurrency,startDate,endDate,termType",
"confirmation": "securitySymbol,shortName,fullName,lotSize,nominalValue,nominalCurrency",
"fields": [
{"code": "securitySymbol",
@ -2531,19 +2531,19 @@
}
,
{"code": "startDate",
"type": 6,"name": "Дата начала действия","shortname": "Дата начала","required": true
"type": 6,"name": "Дата начала действия","shortname": "Дата начала","visible": false
}
,
{"code": "endDate",
"type": 6,"name": "Дата окончания действия","shortname": "Дата окончания","required": true
"type": 6,"name": "Дата окончания действия","shortname": "Дата окончания","visible": false
}
,
{"code": "termType",
"type": 12,"name": "Наименование вида инструмента","shortname": "Вид инструмента","link": "termType","required": true
"type": 12,"name": "Наименование вида инструмента","shortname": "Вид инструмента","link": "termType","visible": false
}
,
{"code": "description",
"type": 2,"length": 255,"name": "Описание","shortname": "Описание"
"type": 2,"length": 255,"name": "Описание","shortname": "Описание","visible": false
}
,
{"code": "issuerId",
@ -2576,7 +2576,7 @@
"name": "Изменение инструмента Денежного рынка",
"confirmation": "securitySymbol,shortName,fullName,lotSize,nominalValue,nominalCurrency,startDate,endDate,termType",
"confirmation": "securitySymbol,shortName,fullName,lotSize,nominalValue,nominalCurrency",
"fields": [
{"code": "id",
@ -2612,19 +2612,19 @@
}
,
{"code": "startDate",
"type": 6,"name": "Дата начала действия","shortname": "Дата начала","enabled": false
"type": 6,"name": "Дата начала действия","shortname": "Дата начала","enabled": false,"visible": false
}
,
{"code": "endDate",
"type": 6,"name": "Дата окончания действия","shortname": "Дата окончания"
"type": 6,"name": "Дата окончания действия","shortname": "Дата окончания","visible": false
}
,
{"code": "termType",
"type": 12,"name": "Наименование вида инструмента","shortname": "Вид инструмента","link": "termType"
"type": 12,"name": "Наименование вида инструмента","shortname": "Вид инструмента","link": "termType","visible": false
}
,
{"code": "description",
"type": 2,"length": 255,"name": "Описание","shortname": "Описание"
"type": 2,"length": 255,"name": "Описание","shortname": "Описание","visible": false
}
,
{"code": "issuerId",
@ -3531,7 +3531,7 @@
}
,
{"code": "code",
"type": 2,"length": 255,"name": "Код торгово-клирингового регистра","shortname": "Код ТКР","searchable": true,"sortable": true,"visible": true
"type": 2,"length": 255,"name": "Код торгово-клирингового регистра","shortname": "ТКР","searchable": true,"sortable": true,"visible": true
}
,
{"code": "moneyAccountId",
@ -3596,15 +3596,31 @@
"name": "Изменение ТКР",
"confirmation": "companyId,moneyAccountId,depoAccountId,status",
"confirmation": "companyId,code,moneyAccountId,depoAccountId,status",
"fields": [
{"code": "id",
"type": 1,"name": "Идентификатор записи","shortname": "ID","link": "clientCode","linkCode": "id","required": true
}
,
{"code": "companyId",
"type": 1,"name": "Наименование компании","shortname": "Компания","link": "company","linkCode": "shortName","enabled": false
}
,
{"code": "code",
"type": 2,"length": 255,"name": "Код торгово-клирингового регистра","shortname": "ТКР","enabled": false
}
,
{"code": "moneyAccountId",
"type": 1,"name": "Номер денежного счета","shortname": "Денежный счет","link": "account","linkCode": "account","enabled": false
}
,
{"code": "depoAccountId",
"type": 1,"name": "Номер депозитарного счета","shortname": "Депозитарный счет","link": "account","linkCode": "account","enabled": false
}
,
{"code": "status",
"type": 12,"name": "Наименование статуса","shortname": "Статус","link": "workflowStatus"
"type": 12,"name": "Наименование статуса","shortname": "Статус","link": "workflowStatus","required": true
}
]
}
@ -4439,11 +4455,11 @@
}
,
{"code": "task",
"type": 12,"name": "Наименование задачи","shortname": "Задача","link": "task"
"type": 12,"name": "Наименование задачи","shortname": "Задача","link": "task","required": true
}
,
{"code": "taskTime",
"type": 5,"name": "Время задачи","shortname": "Время задачи"
"type": 5,"name": "Время задачи","shortname": "Время задачи","required": true
}
,
{"code": "section",
@ -4455,7 +4471,7 @@
}
,
{"code": "taskStatus",
"type": 12,"name": "Наименование статуса","shortname": "Статус","link": "taskStatus"
"type": 12,"name": "Наименование статуса","shortname": "Статус","link": "taskStatus","required": true
}
,
{"code": "companyId",
@ -4548,11 +4564,11 @@
}
,
{"code": "clearingDate",
"type": 6,"name": "Дата","shortname": "Дата"
"type": 6,"name": "Дата","shortname": "Дата","required": true
}
,
{"code": "dayStatus",
"type": 12,"name": "Статус","shortname": "Статус","link": "dayStatus"
"type": 12,"name": "Статус","shortname": "Статус","link": "dayStatus","required": true
}
,
{"code": "companyId",
@ -4685,15 +4701,15 @@
}
,
{"code": "task",
"type": 12,"name": "Наименование задачи","shortname": "Задача","link": "task"
}
,
{"code": "taskTime",
"type": 5,"name": "Время задачи","shortname": "Время задачи"
"type": 12,"name": "Наименование задачи","shortname": "Задача","link": "task","required": true
}
,
{"code": "clearingDate",
"type": 6,"name": "Дата задачи","shortname": "Дата задачи"
"type": 6,"name": "Дата задачи","shortname": "Дата задачи","required": true
}
,
{"code": "taskTime",
"type": 5,"name": "Время задачи","shortname": "Время задачи","required": true
}
,
{"code": "section",
@ -4705,7 +4721,7 @@
}
,
{"code": "taskStatus",
"type": 12,"name": "Наименование статуса","shortname": "Статус","link": "taskStatus"
"type": 12,"name": "Наименование статуса","shortname": "Статус","link": "taskStatus","required": true
}
,
{"code": "companyId",

View file

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--?xml-stylesheet type="text/xsl" href="\..\corp-reports\src\data\meta\meta.server.xslt"?-->
<meta version="3.5.0.22">
<meta version="3.5.0.23">
<!-- _xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" _xsi:noNamespaceSchemaLocation="file:///E:/d/projects/meta/from/meta.xsd" -->
<!--Здесь словари-->
<enums>
@ -388,9 +388,9 @@
</company>
<companyInfo name="Профили компаний" destination="company-infos" class="ru.clearing.classes.statics.data.profile.CompanyInfo" logUpdates="true" table="company_info">
<companyId type="1" dbname="Идентификатор компании" name="Наименование компании" shortname="Компания" searchable="true" sortable="true" visible="true" link="company" linkCode="shortName"/>
<corporationSoleType type="12" dbname="Код единоличного исполнительного органа" name="Единоличный исполнительный орган" shortname="Исполнительный орган" searchable="true" sortable="true" visible="true" link="corporationSoleType"/>
<corporationSoleType type="12" dbname="Код единоличного исполнительного органа" name="Единоличный исполнительный орган" shortname="Исполнительный орган" searchable="true" sortable="true" visible="true" link="corporationSoleType" ignore="true"/>
<countryCode type="12" dbname="Код юрисдикции" name="Юрисдикция" shortname="Юрисдикция" searchable="true" sortable="true" visible="true" link="countryCode"/>
<description type="2" length="255" name="Описание компании" shortname="Описание" searchable="true" sortable="true" visible="true"/>
<description type="2" length="255" name="Описание компании" shortname="Описание" searchable="true" sortable="true" visible="true" ignore="true"/>
<professionalSign type="12" dbname="Код признака профессионального участника" name="Признак профессионального участника" shortname="Проф. участник" searchable="true" sortable="true" visible="true" link="allowed"/>
<legalKind type="12" dbname="Код вида субъекта" name="Вид субъекта" shortname="Юр. лицо/Физ. лицо" searchable="true" sortable="true" visible="true" link="legalKind"/>
<organizationType type="12" dbname="Код типа организации" name="Тип организации" shortname="Тип организации" searchable="true" sortable="true" visible="true" link="organizationType"/>
@ -410,14 +410,14 @@
<shortName type="2" length="255" name="Краткое наименование компании" shortname="Краткое наименование"/>
<fullName type="2" length="255" name="Полное наименование компании" shortname="Полное наименование"/>
<countryCode type="12" name="Юрисдикция" shortname="Юрисдикция" link="countryCode"/>
<corporationSoleType type="12" name="Единоличный исполнительный орган" shortname="Исполнительный орган" link="corporationSoleType"/>
<corporationSoleType type="12" name="Единоличный исполнительный орган" shortname="Исполнительный орган" link="corporationSoleType" visible="false"/>
<legalKind type="12" name="Вид субъекта" shortname="Юр. лицо/Физ. лицо" link="legalKind"/>
<organizationType type="12" name="Тип организации" shortname="Тип организации" link="organizationType"/>
<residence type="12" name="Резиденция" shortname="Резиденция" link="countryCode"/>
<fullNameEng type="2" length="255" name="Полное наименование компании на английском" shortname="Полное наименование на английском"/>
<shortNameEng type="2" length="255" name="Краткое наименование компании на английском" shortname="Краткое наименование на английском"/>
<professionalSign type="12" name="Признак профессионального участника" shortname="Проф. участника" link="allowed"/>
<description type="2" length="255" name="Описание компании" shortname="Описание компании"/>
<description type="2" length="255" name="Описание компании" shortname="Описание компании" visible="false"/>
<workflowStatus type="12" name="Наименование статуса" shortname="Статус" link="workflowStatus"/>
</put>
</actions>
@ -465,13 +465,13 @@
<companyId type="1" dbname="Идентификатор компании" name="Наименование компании" shortname="Компания" searchable="true" sortable="true" visible="true" link="company" linkCode="shortName"/>
<documentType type="12" dbname="Код типа документа" name="Наименование типа документа" shortname="Тип документа" searchable="true" sortable="true" visible="true" link="documentType"/>
<issueDate type="6" name="Дата выдачи" shortname="Дата выдачи" searchable="true" sortable="true"/>
<issuePlace type="2" length="255" name="Место выдачи" shortname="Место выдачи" searchable="true" sortable="true" visible="true"/>
<issuePlace type="2" length="255" name="Место выдачи" shortname="Место выдачи" searchable="true" sortable="true" visible="true" ignore="true"/>
<issuer type="2" length="255" name="Кем выдан" shortname="Кем выдан" searchable="true" sortable="true" visible="true"/>
<issuerCode type="2" length="255" name="Код выдавшего органа" shortname="Выдавший орган" searchable="true" sortable="true" visible="true"/>
<name type="2" length="255" name="Наименование документа" shortname="Документ" searchable="true" sortable="true" visible="true"/>
<issuerCode type="2" length="255" name="Код выдавшего органа" shortname="Выдавший орган" searchable="true" sortable="true" visible="true" ignore="true"/>
<name type="2" length="255" name="Наименование документа" shortname="Документ" searchable="true" sortable="true" visible="true" ignore="true"/>
<number type="2" length="255" name="Номер документа" shortname="Номер" searchable="true" sortable="true" visible="true"/>
<place type="2" length="255" name="Место" shortname="Место" searchable="true" sortable="true" visible="true"/>
<validFromDate type="6" name="Дата начала срока действия" shortname="Начало" searchable="true" sortable="true"/>
<place type="2" length="255" name="Место" shortname="Место" searchable="true" sortable="true" visible="true" ignore="true"/>
<validFromDate type="6" name="Дата начала срока действия" shortname="Начало" searchable="true" sortable="true" ignore="true"/>
<validToDate type="6" name="Дата окончания срока действия" shortname="Окончание" searchable="true" sortable="true"/>
<link type="2" length="255" name="Ссылка на документ" shortname="Ссылка на документ" searchable="true" sortable="true" visible="true"/>
<id type="1" name="Идентификатор записи" shortname="ID" searchable="true" sortable="true"/>
@ -480,13 +480,13 @@
<companyId type="1" name="Наименование компании" shortname="Компании" link="company" linkCode="shortName" required="true" enabled="false"/>
<documentType type="12" name="Наименование типа документа" shortname="Тип документа" link="documentType" required="true"/>
<issueDate type="6" name="Дата выдачи" shortname="Дата выдачи" required="true"/>
<issuePlace type="2" length="255" name="Место выдачи" shortname="Место выдачи" required="true"/>
<issuePlace type="2" length="255" name="Место выдачи" shortname="Место выдачи" visible="false"/>
<issuer type="2" length="255" name="Кем выдан" shortname="Кем выдан" required="true"/>
<issuerCode type="2" length="255" name="Код выдавшего органа" shortname="Выдавший орган" required="true"/>
<name type="2" length="255" name="Наименование документа" shortname="Документ" required="true"/>
<issuerCode type="2" length="255" name="Код выдавшего органа" shortname="Выдавший орган" visible="false"/>
<name type="2" length="255" name="Наименование документа" shortname="Документ" visible="false"/>
<number type="2" length="255" name="Номер документа" shortname="Номер" required="true"/>
<place type="2" length="255" name="Место" shortname="Место" required="true"/>
<validFromDate type="6" name="Дата начала срока действия" shortname="Начало" required="true"/>
<place type="2" length="255" name="Место" shortname="Место" visible="false"/>
<validFromDate type="6" name="Дата начала срока действия" shortname="Начало" visible="false"/>
<validToDate type="6" name="Дата окончания срока действия" shortname="Окончание" required="true"/>
<link type="2" length="255" name="Ссылка на документ" shortname="Ссылка на документ"/>
</post>
@ -495,13 +495,13 @@
<companyId type="1" name="Наименование компании" shortname="Компании" link="company" linkCode="shortName" enabled="false"/>
<documentType type="12" name="Наименование типа документа" shortname="Тип документа" link="documentType"/>
<issueDate type="6" name="Дата выдачи" shortname="Дата выдачи"/>
<issuePlace type="2" length="255" name="Место выдачи" shortname="Место выдачи"/>
<issuePlace type="2" length="255" name="Место выдачи" shortname="Место выдачи" visible="false"/>
<issuer type="2" length="255" name="Кем выдан" shortname="Кем выдан"/>
<issuerCode type="2" length="255" name="Код выдавшего органа" shortname="Выдавший орган"/>
<name type="2" length="255" name="Наименование документа" shortname="Документ"/>
<issuerCode type="2" length="255" name="Код выдавшего органа" shortname="Выдавший орган" visible="false"/>
<name type="2" length="255" name="Наименование документа" shortname="Документ" visible="false"/>
<number type="2" length="255" name="Номер документа" shortname="Номер"/>
<place type="2" length="255" name="Место" shortname="Место"/>
<validFromDate type="6" name="Дата начала срока действия" shortname="Начало"/>
<place type="2" length="255" name="Место" shortname="Место" visible="false"/>
<validFromDate type="6" name="Дата начала срока действия" shortname="Начало" visible="false"/>
<validToDate type="6" name="Дата окончания срока действия" shortname="Окончание"/>
<link type="2" length="255" name="Ссылка на документ" shortname="Ссылка на документ"/>
</put>
@ -553,15 +553,15 @@
<updatedAt field="updated" type="4" webtype="5" dbname="Дата-время изменения записи" name="Время изменения записи" shortname="Изменено" searchable="true" sortable="true"/>
</security>
<currency name="Валюты" destination="currencies" class="ru.clearing.classes.statics.data.misc.Currency" logUpdates="true" table="currency">
<countryCode type="12" dbname="Код страны" name="Наименование страны" shortname="Страна" searchable="true" sortable="true" visible="true" link="countryCode"/>
<countryCode type="12" dbname="Код страны" name="Наименование страны" shortname="Страна" searchable="true" sortable="true" visible="true" link="countryCode" ignore="true"/>
<currencyCode type="12" dbname="Код валюты" name="Код валюты" shortname="Валюта" searchable="true" sortable="true" visible="true" link="currencyCode" linkCode="code"/>
<id type="1" name="Идентификатор записи" shortname="ID" searchable="true" sortable="true"/>
</currency>
<moneyMarketSecurity name="Инструменты Денежного рынка" destination="securities/money-securities" class="ru.clearing.classes.statics.data.security.MoneyMarketSecurity" logUpdates="true" table="money_market_security">
<securityId type="1" dbname="Идентификатор инструмента" name="Наименование инструмента" shortname="Инструмент" searchable="true" sortable="true" link="security" linkCode="shortName"/>
<description type="2" length="255" name="Описание" shortname="Описание" searchable="true" sortable="false"/>
<startDate type="6" name="Дата начала действия" shortname="Дата начала" searchable="true" sortable="true"/>
<endDate type="6" name="Дата окончания действия" shortname="Дата окончания" searchable="true" sortable="true"/>
<description type="2" length="255" name="Описание" shortname="Описание" searchable="true" sortable="false" ignore="true"/>
<startDate type="6" name="Дата начала действия" shortname="Дата начала" searchable="true" sortable="true" ignore="true"/>
<endDate type="6" name="Дата окончания действия" shortname="Дата окончания" searchable="true" sortable="true" ignore="true"/>
<nominalValue type="10" name="Номинал" shortname="Номинал" searchable="true" sortable="true"/>
<nominalCurrency type="12" dbname="Код валюты номинала" name="Наименование валюты номинала" shortname="Валюта номинала" searchable="true" sortable="true" link="currencyCode" linkCode="code"/>
<instrumentType type="12" dbname="Код типа инструмента" name="Наименование типа инструмента" shortname="Тип инструмента" searchable="true" sortable="true" visible="true" link="instrumentType" extends="security"/>
@ -569,7 +569,7 @@
<fullName type="2" length="255" name="Полное наименование инструмента" shortname="Наименование" searchable="true" sortable="true" visible="true" extends="security"/>
<convention type="2" length="255" name="Нотация наименования инструмента" shortname="Маска" visible="true"/>
<securitySymbol type="2" length="255" name="Код инструмента" shortname="Код" searchable="true" sortable="true" visible="true" extends="security"/>
<termType type="12" dbname="Код вида инструмента" name="Наименование вида инструмента" shortname="Вид инструмента" searchable="true" sortable="true" visible="false" link="termType"/>
<termType type="12" dbname="Код вида инструмента" name="Наименование вида инструмента" shortname="Вид инструмента" searchable="true" sortable="true" visible="false" link="termType" ignore="true"/>
<lotSize field="securityId" type="11" name="Размер лота" shortname="Лот" searchable="true" sortable="true" visible="true" linkKeyCode="securityId" linkCode="lotSize" link="listing" extends="listing"/>
<issuerId type="1" dbname="Идентификатор эмитента" name="Наименование эмитента" shortname="Эмитент" searchable="true" sortable="true" link="company" extends="security"/>
<shortNameEng type="2" length="255" name="Краткое наименование инструмента на английском" shortname="Краткое наименование на английском" searchable="true" sortable="true" visible="true" extends="security"/>
@ -578,7 +578,7 @@
<workflowStatus type="12" dbname="Код статуса" name="Наименование статуса" shortname="Статус" searchable="true" sortable="true" visible="true" link="workflowStatus" extends="security"/>
<id type="1" name="Идентификатор записи" shortname="ID" searchable="true" sortable="true"/>
<actions>
<post name="Добавление инструмента Денежного рынка" confirmation="securitySymbol,shortName,fullName,lotSize,nominalValue,nominalCurrency,startDate,endDate,termType">
<post name="Добавление инструмента Денежного рынка" confirmation="securitySymbol,shortName,fullName,lotSize,nominalValue,nominalCurrency">
<securitySymbol type="2" length="255" name="Код инструмента" shortname="Код" required="true"/>
<shortName type="2" length="255" name="Краткое наименование инструмента" shortname="Краткое наименование" required="true"/>
<fullName type="2" length="255" name="Полное наименование инструмента" shortname="Наименование"/>
@ -586,10 +586,10 @@
<lotSize type="11" name="Размер лота" shortname="Лот" required="true"/>
<nominalValue type="10" name="Номинал" shortname="Номинал" required="true"/>
<nominalCurrency type="12" name="Наименование валюты номинала" shortname="Валюта номинала" link="currencyCode" linkCode="code" required="true"/>
<startDate type="6" name="Дата начала действия" shortname="Дата начала" required="true"/>
<endDate type="6" name="Дата окончания действия" shortname="Дата окончания" required="true"/>
<termType type="12" name="Наименование вида инструмента" shortname="Вид инструмента" link="termType" required="true"/>
<description type="2" length="255" name="Описание" shortname="Описание"/>
<startDate type="6" name="Дата начала действия" shortname="Дата начала" visible="false"/>
<endDate type="6" name="Дата окончания действия" shortname="Дата окончания" visible="false"/>
<termType type="12" name="Наименование вида инструмента" shortname="Вид инструмента" link="termType" visible="false"/>
<description type="2" length="255" name="Описание" shortname="Описание" visible="false"/>
<issuerId type="1" name="Наименование эмитента" shortname="Эмитент" link="company"/>
<shortNameEng type="2" length="255" name="Краткое наименование инструмента на английском" shortname="Краткое название на английском"/>
<fullNameEng type="2" length="255" name="Полное наименование инструмента на английском" shortname="Наименование на английском"/>
@ -597,7 +597,7 @@
<workflowStatus type="12" name="Наименование статуса" shortname="Статус" link="workflowStatus"/>
<instrumentType type="12" name="Наименование типа инструмента" shortname="Тип инструмента" link="instrumentType" required="true" visible="false"/>
</post>
<put name="Изменение инструмента Денежного рынка" confirmation="securitySymbol,shortName,fullName,lotSize,nominalValue,nominalCurrency,startDate,endDate,termType">
<put name="Изменение инструмента Денежного рынка" confirmation="securitySymbol,shortName,fullName,lotSize,nominalValue,nominalCurrency">
<id type="1" name="Идентификатор записи" shortname="ID" link="moneyMarketSecurity" linkCode="id" required="true"/>
<securitySymbol type="2" length="255" name="Код инструмента" shortname="Код" enabled="false"/>
<shortName type="2" length="255" name="Краткое наименование инструмента" shortname="Краткое наименование"/>
@ -606,10 +606,10 @@
<lotSize type="11" name="Размер лота" shortname="Лот"/>
<nominalValue type="10" name="Номинал" shortname="Номинал"/>
<nominalCurrency type="12" name="Наименование валюты номинала" shortname="Валюта номинала" link="currencyCode" linkCode="code"/>
<startDate type="6" name="Дата начала действия" shortname="Дата начала" enabled="false"/>
<endDate type="6" name="Дата окончания действия" shortname="Дата окончания"/>
<termType type="12" name="Наименование вида инструмента" shortname="Вид инструмента" link="termType"/>
<description type="2" length="255" name="Описание" shortname="Описание"/>
<startDate type="6" name="Дата начала действия" shortname="Дата начала" enabled="false" visible="false"/>
<endDate type="6" name="Дата окончания действия" shortname="Дата окончания" visible="false"/>
<termType type="12" name="Наименование вида инструмента" shortname="Вид инструмента" link="termType" visible="false"/>
<description type="2" length="255" name="Описание" shortname="Описание" visible="false"/>
<issuerId type="1" name="Наименование эмитента" shortname="Эмитент" link="company"/>
<shortNameEng type="2" length="255" name="Краткое наименование инструмента на английском" shortname="Краткое название на английском"/>
<fullNameEng type="2" length="255" name="Полное наименование инструмента на английском" shortname="Наименование на английском"/>
@ -823,7 +823,7 @@
<tradingClearingRegistry name="Торгово-клиринговый регистр" destination="trading-clearing-registries" class="ru.clearing.classes.statics.data.registry.TradingClearingRegistry" logUpdates="true" table="trading_clearing_registry">
<id type="1" name="Идентификатор записи" shortname="ID" searchable="true" sortable="true"/>
<companyId type="1" dbname="Идентификатор компании" name="Наименование компании" shortname="Компания" searchable="true" sortable="true" visible="true" link="company" linkCode="shortName"/>
<code type="2" length="255" name="Код торгово-клирингового регистра" shortname="Код ТКР" searchable="true" sortable="true" visible="true"/>
<code type="2" length="255" name="Код торгово-клирингового регистра" shortname="ТКР" searchable="true" sortable="true" visible="true"/>
<moneyAccountId type="1" dbname="Идентификатор денежного счета" name="Номер денежного счета" shortname="Денежный счет" searchable="true" sortable="true" link="account"/>
<depoAccountId type="1" dbname="Идентификатор депозитарного счета" name="Номер депозитарного счета" shortname="Депозитарный счет" searchable="true" sortable="true" link="account"/>
<tradingClearingRegistryType type="12" dbname="Код торгово-клирингового регистра" name="Тип торгово-клирингового регистра" shortname="Тип ТКР" searchable="true" sortable="true" link="tradingClearingRegistryType"/>
@ -839,9 +839,13 @@
<depoAccountId type="1" name="Номер депозитарного счета" shortname="Депозитарный счет" link="account" linkCode="account"/>
<status type="12" name="Наименование статуса" shortname="Статус" link="workflowStatus"/>
</post>
<put name="Изменение ТКР" confirmation="companyId,moneyAccountId,depoAccountId,status">
<put name="Изменение ТКР" confirmation="companyId,code,moneyAccountId,depoAccountId,status">
<id type="1" name="Идентификатор записи" shortname="ID" link="clientCode" linkCode="id" required="true"/>
<status type="12" name="Наименование статуса" shortname="Статус" link="workflowStatus"/>
<companyId type="1" name="Наименование компании" shortname="Компания" link="company" linkCode="shortName" enabled="false"/>
<code type="2" length="255" name="Код торгово-клирингового регистра" shortname="ТКР" enabled="false"/>
<moneyAccountId type="1" name="Номер денежного счета" shortname="Денежный счет" link="account" linkCode="account" enabled="false"/>
<depoAccountId type="1" name="Номер депозитарного счета" shortname="Депозитарный счет" link="account" linkCode="account" enabled="false"/>
<status type="12" name="Наименование статуса" shortname="Статус" link="workflowStatus" required="true"/>
</put>
<delete name="Блокировка ТКР" confirmation="companyId,code">
<id type="1" name="Идентификатор записи" shortname="ID" link="clientCode" linkCode="id" required="true"/>
@ -1042,11 +1046,11 @@
</post>
<put name="Изменение шаблона расписания операционного дня">
<id type="1" name="Идентификатор записи" shortname="ID" link="plannerTemplate" linkCode="id" required="true"/>
<task type="12" name="Наименование задачи" shortname="Задача" link="task"/>
<taskTime type="5" name="Время задачи" shortname="Время задачи"/>
<task type="12" name="Наименование задачи" shortname="Задача" link="task" required="true"/>
<taskTime type="5" name="Время задачи" shortname="Время задачи" required="true"/>
<section type="12" name="Секция" shortname="Секция" link="section" linkCode="name" linkKeyCode="code"/>
<sessionType type="12" name="Тип клиринговой сессии" shortname="Тип клиринговой сессии" link="sessionType" linkCode="name" linkKeyCode="code"/>
<taskStatus type="12" name="Наименование статуса" shortname="Статус" link="taskStatus"/>
<taskStatus type="12" name="Наименование статуса" shortname="Статус" link="taskStatus" required="true"/>
<companyId type="1" name="Наименование компании" shortname="Компания" link="company" linkCode="shortName"/>
<securityId type="1" name="Наименование инструмента" shortname="Инструмент" link="security" linkCode="shortName"/>
</put>
@ -1070,8 +1074,8 @@
</post>
<put name="Изменение записи в календаре">
<id type="1" name="Идентификатор записи" shortname="ID" link="clearingCalendar" linkCode="id" required="true"/>
<clearingDate type="6" name="Дата" shortname="Дата"/>
<dayStatus type="12" name="Статус" shortname="Статус" link="dayStatus"/>
<clearingDate type="6" name="Дата" shortname="Дата" required="true"/>
<dayStatus type="12" name="Статус" shortname="Статус" link="dayStatus" required="true"/>
<companyId type="1" name="Наименование компании" shortname="Компания" link="company" linkCode="shortName"/>
</put>
<delete name="Блокировка записи в календаре" confirmation="clearingDate,dayStatus,companyId">
@ -1105,12 +1109,12 @@
</post>
<put name="Изменение расписания">
<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="Дата задачи"/>
<task type="12" name="Наименование задачи" shortname="Задача" link="task" required="true"/>
<clearingDate type="6" name="Дата задачи" shortname="Дата задачи" required="true"/>
<taskTime type="5" name="Время задачи" shortname="Время задачи" required="true"/>
<section type="12" name="Секция" shortname="Секция" link="section" linkCode="name" linkKeyCode="code"/>
<sessionType type="12" name="Тип клиринговой сессии" shortname="Тип клиринговой сессии" link="sessionType" linkCode="name" linkKeyCode="code"/>
<taskStatus type="12" name="Наименование статуса" shortname="Статус" link="taskStatus"/>
<taskStatus type="12" name="Наименование статуса" shortname="Статус" link="taskStatus" required="true"/>
<companyId type="1" name="Наименование компании" shortname="Компания" link="company" linkCode="shortName"/>
<securityId type="1" name="Наименование инструмента" shortname="Инструмент" link="security" linkCode="shortName"/>
</put>

View file

@ -1,6 +1,6 @@
{
"version": "3.5.0.22",
"version": "3.5.0.23",
"enums": {
@ -1726,7 +1726,7 @@
}
,
{"code": "corporationSoleType",
"type": 12,"dbname": "Код единоличного исполнительного органа","name": "Единоличный исполнительный орган","shortname": "Исполнительный орган","searchable": true,"sortable": true,"visible": true,"link": "corporationSoleType"
"type": 12,"dbname": "Код единоличного исполнительного органа","name": "Единоличный исполнительный орган","shortname": "Исполнительный орган","searchable": true,"sortable": true,"visible": true,"link": "corporationSoleType","ignore": true
}
,
{"code": "countryCode",
@ -1734,7 +1734,7 @@
}
,
{"code": "description",
"type": 2,"length": 255,"name": "Описание компании","shortname": "Описание","searchable": true,"sortable": true,"visible": true
"type": 2,"length": 255,"name": "Описание компании","shortname": "Описание","searchable": true,"sortable": true,"visible": true,"ignore": true
}
,
{"code": "professionalSign",
@ -1812,7 +1812,7 @@
}
,
{"code": "corporationSoleType",
"type": 12,"name": "Единоличный исполнительный орган","shortname": "Исполнительный орган","link": "corporationSoleType"
"type": 12,"name": "Единоличный исполнительный орган","shortname": "Исполнительный орган","link": "corporationSoleType","visible": false
}
,
{"code": "legalKind",
@ -1840,7 +1840,7 @@
}
,
{"code": "description",
"type": 2,"length": 255,"name": "Описание компании","shortname": "Описание компании"
"type": 2,"length": 255,"name": "Описание компании","shortname": "Описание компании","visible": false
}
,
{"code": "workflowStatus",
@ -2025,7 +2025,7 @@
}
,
{"code": "issuePlace",
"type": 2,"length": 255,"name": "Место выдачи","shortname": "Место выдачи","searchable": true,"sortable": true,"visible": true
"type": 2,"length": 255,"name": "Место выдачи","shortname": "Место выдачи","searchable": true,"sortable": true,"visible": true,"ignore": true
}
,
{"code": "issuer",
@ -2033,11 +2033,11 @@
}
,
{"code": "issuerCode",
"type": 2,"length": 255,"name": "Код выдавшего органа","shortname": "Выдавший орган","searchable": true,"sortable": true,"visible": true
"type": 2,"length": 255,"name": "Код выдавшего органа","shortname": "Выдавший орган","searchable": true,"sortable": true,"visible": true,"ignore": true
}
,
{"code": "name",
"type": 2,"length": 255,"name": "Наименование документа","shortname": "Документ","searchable": true,"sortable": true,"visible": true
"type": 2,"length": 255,"name": "Наименование документа","shortname": "Документ","searchable": true,"sortable": true,"visible": true,"ignore": true
}
,
{"code": "number",
@ -2045,11 +2045,11 @@
}
,
{"code": "place",
"type": 2,"length": 255,"name": "Место","shortname": "Место","searchable": true,"sortable": true,"visible": true
"type": 2,"length": 255,"name": "Место","shortname": "Место","searchable": true,"sortable": true,"visible": true,"ignore": true
}
,
{"code": "validFromDate",
"type": 6,"name": "Дата начала срока действия","shortname": "Начало","searchable": true,"sortable": true
"type": 6,"name": "Дата начала срока действия","shortname": "Начало","searchable": true,"sortable": true,"ignore": true
}
,
{"code": "validToDate",
@ -2085,7 +2085,7 @@
}
,
{"code": "issuePlace",
"type": 2,"length": 255,"name": "Место выдачи","shortname": "Место выдачи","required": true
"type": 2,"length": 255,"name": "Место выдачи","shortname": "Место выдачи","visible": false
}
,
{"code": "issuer",
@ -2093,11 +2093,11 @@
}
,
{"code": "issuerCode",
"type": 2,"length": 255,"name": "Код выдавшего органа","shortname": "Выдавший орган","required": true
"type": 2,"length": 255,"name": "Код выдавшего органа","shortname": "Выдавший орган","visible": false
}
,
{"code": "name",
"type": 2,"length": 255,"name": "Наименование документа","shortname": "Документ","required": true
"type": 2,"length": 255,"name": "Наименование документа","shortname": "Документ","visible": false
}
,
{"code": "number",
@ -2105,11 +2105,11 @@
}
,
{"code": "place",
"type": 2,"length": 255,"name": "Место","shortname": "Место","required": true
"type": 2,"length": 255,"name": "Место","shortname": "Место","visible": false
}
,
{"code": "validFromDate",
"type": 6,"name": "Дата начала срока действия","shortname": "Начало","required": true
"type": 6,"name": "Дата начала срока действия","shortname": "Начало","visible": false
}
,
{"code": "validToDate",
@ -2146,7 +2146,7 @@
}
,
{"code": "issuePlace",
"type": 2,"length": 255,"name": "Место выдачи","shortname": "Место выдачи"
"type": 2,"length": 255,"name": "Место выдачи","shortname": "Место выдачи","visible": false
}
,
{"code": "issuer",
@ -2154,11 +2154,11 @@
}
,
{"code": "issuerCode",
"type": 2,"length": 255,"name": "Код выдавшего органа","shortname": "Выдавший орган"
"type": 2,"length": 255,"name": "Код выдавшего органа","shortname": "Выдавший орган","visible": false
}
,
{"code": "name",
"type": 2,"length": 255,"name": "Наименование документа","shortname": "Документ"
"type": 2,"length": 255,"name": "Наименование документа","shortname": "Документ","visible": false
}
,
{"code": "number",
@ -2166,11 +2166,11 @@
}
,
{"code": "place",
"type": 2,"length": 255,"name": "Место","shortname": "Место"
"type": 2,"length": 255,"name": "Место","shortname": "Место","visible": false
}
,
{"code": "validFromDate",
"type": 6,"name": "Дата начала срока действия","shortname": "Начало"
"type": 6,"name": "Дата начала срока действия","shortname": "Начало","visible": false
}
,
{"code": "validToDate",
@ -2391,7 +2391,7 @@
"fields": [
{"code": "countryCode",
"type": 12,"dbname": "Код страны","name": "Наименование страны","shortname": "Страна","searchable": true,"sortable": true,"visible": true,"link": "countryCode"
"type": 12,"dbname": "Код страны","name": "Наименование страны","shortname": "Страна","searchable": true,"sortable": true,"visible": true,"link": "countryCode","ignore": true
}
,
{"code": "currencyCode",
@ -2423,15 +2423,15 @@
}
,
{"code": "description",
"type": 2,"length": 255,"name": "Описание","shortname": "Описание","searchable": true,"sortable": false
"type": 2,"length": 255,"name": "Описание","shortname": "Описание","searchable": true,"sortable": false,"ignore": true
}
,
{"code": "startDate",
"type": 6,"name": "Дата начала действия","shortname": "Дата начала","searchable": true,"sortable": true
"type": 6,"name": "Дата начала действия","shortname": "Дата начала","searchable": true,"sortable": true,"ignore": true
}
,
{"code": "endDate",
"type": 6,"name": "Дата окончания действия","shortname": "Дата окончания","searchable": true,"sortable": true
"type": 6,"name": "Дата окончания действия","shortname": "Дата окончания","searchable": true,"sortable": true,"ignore": true
}
,
{"code": "nominalValue",
@ -2463,7 +2463,7 @@
}
,
{"code": "termType",
"type": 12,"dbname": "Код вида инструмента","name": "Наименование вида инструмента","shortname": "Вид инструмента","searchable": true,"sortable": true,"visible": false,"link": "termType"
"type": 12,"dbname": "Код вида инструмента","name": "Наименование вида инструмента","shortname": "Вид инструмента","searchable": true,"sortable": true,"visible": false,"link": "termType","ignore": true
}
,
{"code": "lotSize",
@ -2499,7 +2499,7 @@
"name": "Добавление инструмента Денежного рынка",
"confirmation": "securitySymbol,shortName,fullName,lotSize,nominalValue,nominalCurrency,startDate,endDate,termType",
"confirmation": "securitySymbol,shortName,fullName,lotSize,nominalValue,nominalCurrency",
"fields": [
{"code": "securitySymbol",
@ -2531,19 +2531,19 @@
}
,
{"code": "startDate",
"type": 6,"name": "Дата начала действия","shortname": "Дата начала","required": true
"type": 6,"name": "Дата начала действия","shortname": "Дата начала","visible": false
}
,
{"code": "endDate",
"type": 6,"name": "Дата окончания действия","shortname": "Дата окончания","required": true
"type": 6,"name": "Дата окончания действия","shortname": "Дата окончания","visible": false
}
,
{"code": "termType",
"type": 12,"name": "Наименование вида инструмента","shortname": "Вид инструмента","link": "termType","required": true
"type": 12,"name": "Наименование вида инструмента","shortname": "Вид инструмента","link": "termType","visible": false
}
,
{"code": "description",
"type": 2,"length": 255,"name": "Описание","shortname": "Описание"
"type": 2,"length": 255,"name": "Описание","shortname": "Описание","visible": false
}
,
{"code": "issuerId",
@ -2576,7 +2576,7 @@
"name": "Изменение инструмента Денежного рынка",
"confirmation": "securitySymbol,shortName,fullName,lotSize,nominalValue,nominalCurrency,startDate,endDate,termType",
"confirmation": "securitySymbol,shortName,fullName,lotSize,nominalValue,nominalCurrency",
"fields": [
{"code": "id",
@ -2612,19 +2612,19 @@
}
,
{"code": "startDate",
"type": 6,"name": "Дата начала действия","shortname": "Дата начала","enabled": false
"type": 6,"name": "Дата начала действия","shortname": "Дата начала","enabled": false,"visible": false
}
,
{"code": "endDate",
"type": 6,"name": "Дата окончания действия","shortname": "Дата окончания"
"type": 6,"name": "Дата окончания действия","shortname": "Дата окончания","visible": false
}
,
{"code": "termType",
"type": 12,"name": "Наименование вида инструмента","shortname": "Вид инструмента","link": "termType"
"type": 12,"name": "Наименование вида инструмента","shortname": "Вид инструмента","link": "termType","visible": false
}
,
{"code": "description",
"type": 2,"length": 255,"name": "Описание","shortname": "Описание"
"type": 2,"length": 255,"name": "Описание","shortname": "Описание","visible": false
}
,
{"code": "issuerId",
@ -3531,7 +3531,7 @@
}
,
{"code": "code",
"type": 2,"length": 255,"name": "Код торгово-клирингового регистра","shortname": "Код ТКР","searchable": true,"sortable": true,"visible": true
"type": 2,"length": 255,"name": "Код торгово-клирингового регистра","shortname": "ТКР","searchable": true,"sortable": true,"visible": true
}
,
{"code": "moneyAccountId",
@ -3596,15 +3596,31 @@
"name": "Изменение ТКР",
"confirmation": "companyId,moneyAccountId,depoAccountId,status",
"confirmation": "companyId,code,moneyAccountId,depoAccountId,status",
"fields": [
{"code": "id",
"type": 1,"name": "Идентификатор записи","shortname": "ID","link": "clientCode","linkCode": "id","required": true
}
,
{"code": "companyId",
"type": 1,"name": "Наименование компании","shortname": "Компания","link": "company","linkCode": "shortName","enabled": false
}
,
{"code": "code",
"type": 2,"length": 255,"name": "Код торгово-клирингового регистра","shortname": "ТКР","enabled": false
}
,
{"code": "moneyAccountId",
"type": 1,"name": "Номер денежного счета","shortname": "Денежный счет","link": "account","linkCode": "account","enabled": false
}
,
{"code": "depoAccountId",
"type": 1,"name": "Номер депозитарного счета","shortname": "Депозитарный счет","link": "account","linkCode": "account","enabled": false
}
,
{"code": "status",
"type": 12,"name": "Наименование статуса","shortname": "Статус","link": "workflowStatus"
"type": 12,"name": "Наименование статуса","shortname": "Статус","link": "workflowStatus","required": true
}
]
}
@ -4439,11 +4455,11 @@
}
,
{"code": "task",
"type": 12,"name": "Наименование задачи","shortname": "Задача","link": "task"
"type": 12,"name": "Наименование задачи","shortname": "Задача","link": "task","required": true
}
,
{"code": "taskTime",
"type": 5,"name": "Время задачи","shortname": "Время задачи"
"type": 5,"name": "Время задачи","shortname": "Время задачи","required": true
}
,
{"code": "section",
@ -4455,7 +4471,7 @@
}
,
{"code": "taskStatus",
"type": 12,"name": "Наименование статуса","shortname": "Статус","link": "taskStatus"
"type": 12,"name": "Наименование статуса","shortname": "Статус","link": "taskStatus","required": true
}
,
{"code": "companyId",
@ -4548,11 +4564,11 @@
}
,
{"code": "clearingDate",
"type": 6,"name": "Дата","shortname": "Дата"
"type": 6,"name": "Дата","shortname": "Дата","required": true
}
,
{"code": "dayStatus",
"type": 12,"name": "Статус","shortname": "Статус","link": "dayStatus"
"type": 12,"name": "Статус","shortname": "Статус","link": "dayStatus","required": true
}
,
{"code": "companyId",
@ -4685,15 +4701,15 @@
}
,
{"code": "task",
"type": 12,"name": "Наименование задачи","shortname": "Задача","link": "task"
}
,
{"code": "taskTime",
"type": 5,"name": "Время задачи","shortname": "Время задачи"
"type": 12,"name": "Наименование задачи","shortname": "Задача","link": "task","required": true
}
,
{"code": "clearingDate",
"type": 6,"name": "Дата задачи","shortname": "Дата задачи"
"type": 6,"name": "Дата задачи","shortname": "Дата задачи","required": true
}
,
{"code": "taskTime",
"type": 5,"name": "Время задачи","shortname": "Время задачи","required": true
}
,
{"code": "section",
@ -4705,7 +4721,7 @@
}
,
{"code": "taskStatus",
"type": 12,"name": "Наименование статуса","shortname": "Статус","link": "taskStatus"
"type": 12,"name": "Наименование статуса","shortname": "Статус","link": "taskStatus","required": true
}
,
{"code": "companyId",

View file

@ -9,7 +9,7 @@ import ru.spcex.clearing.imdg.IMDGDistributedNames;
import ru.spcex.clearing.session.stage.ISessionStage;
import ru.spcex.clearing.session.stage.StageResult;
import ru.spcex.clearing.session.stage.Task;
import ru.spcex.clearing.session.stage.task.RegistryOnObligationsAndSettlementRequirementsPayload;
import ru.spcex.clearing.session.stage.task.FormingRegistersOnOSPayload;
import ru.spcex.clearing.session.stage.util.RegistryUtil;
import ru.spcex.platform.enumeration.RegistryDesignation;
import ru.spcex.platform.enumeration.RegistryInstrumentType;
@ -39,10 +39,10 @@ public class FormingRegistersOnOS implements ISessionStage {
@Override
public StageResult<?> submit(Task<?> task) {
RegistryOnObligationsAndSettlementRequirementsPayload payload = (RegistryOnObligationsAndSettlementRequirementsPayload) task.getData();
FormingRegistersOnOSPayload payload = (FormingRegistersOnOSPayload) task.getData();
switch (task.getTaskType()) {
case FormingRegistersOnOS -> {
return createRegistryOnObligationsAndSettlementRequirements(payload.getSessionId());
return createRegistryOnObligationsAndSettlementRequirements();
}
default -> {
throw new IllegalStateException("Unknown task type: " + task.getTaskType());
@ -53,12 +53,10 @@ public class FormingRegistersOnOS implements ISessionStage {
/**
* Select Registry by: registryCode = [O/T][S/M][*][T] & registryStatus=OK
*
* @param sessionId
* @return
*/
protected Collection<Registry> selectRegistry(Long sessionId) {
String registrySQL = "sessionId = " + sessionId;
registrySQL += " and (registryDesignation=" + RegistryDesignation.O.getKey() + " or registryDesignation=" + RegistryDesignation.T.getKey() + ")";
protected Collection<Registry> selectRegistry() {
String registrySQL = "(registryDesignation=" + RegistryDesignation.O.getKey() + " or registryDesignation=" + RegistryDesignation.T.getKey() + ")";
registrySQL += " and (registryInstrumentType=" + RegistryInstrumentType.S.getKey() + " or registryInstrumentType=" + RegistryInstrumentType.M.getKey() + ")";
registrySQL += " and (registryUnit=" + RegistryUnit.T.getKey() + ")";
registrySQL += " and registryStatus=" + RegistryStatus.OK.getKey() + ")";
@ -67,8 +65,8 @@ public class FormingRegistersOnOS implements ISessionStage {
return result;
}
protected StageResult<?> createRegistryOnObligationsAndSettlementRequirements(Long sessionId) {
Collection<Registry> forRegistries = selectRegistry(sessionId);
protected StageResult<?> createRegistryOnObligationsAndSettlementRequirements() {
Collection<Registry> forRegistries = selectRegistry();
ArrayList<Registry> newRegistries = new ArrayList<>();
//todo oreder by обрабатываться группами по полю registry.groupId

View file

@ -0,0 +1,151 @@
package ru.spcex.clearing.session.stage.impl;
import ru.clearing.classes.statics.data.account.Account;
import ru.clearing.classes.statics.data.company.Company;
import ru.clearing.classes.statics.data.execution.ExecutionCommon;
import ru.clearing.classes.statics.data.execution.ExecutionDeposit;
import ru.clearing.classes.statics.data.execution.ExecutionFond;
import ru.clearing.classes.statics.data.misc.Market;
import ru.clearing.classes.statics.data.misc.Session;
import ru.clearing.classes.statics.data.registry.Registry;
import ru.clearing.classes.statics.data.registry.TradingClearingRegistry;
import ru.spcex.clearing.imdg.IMDGDistributedNames;
import ru.spcex.clearing.session.stage.util.RegistryUtil;
import ru.spcex.platform.classes.base.interfaces.ExecutionType;
import ru.spcex.platform.enumeration.*;
import ru.spcex.platform.imdg.api.Imdg;
import ru.spcex.platform.imdg.api.ImdgProvider;
import java.time.LocalDate;
import java.time.format.DateTimeFormatter;
public class RegistryBuilder {
private Imdg<Company> companyImdg;
private Imdg<TradingClearingRegistry> tradingClearingRegistryImdg;
private Imdg<Account> accountImdg;
private Imdg<Market> marketImdg;
private Imdg<Session> sessionImdg;
private ExecutionCommon exec;
private RegistryDesignation regDsgn;
private RegistryBuilder() {
}
public static RegistryBuilder builder() {
return new RegistryBuilder();
}
public RegistryBuilder imdg(ImdgProvider imdgProvider) {
this.companyImdg = imdgProvider.getImdg(IMDGDistributedNames.Map_Company, Company.class);
this.tradingClearingRegistryImdg = imdgProvider.getImdg(IMDGDistributedNames.Map_TradingClearingRegistry, TradingClearingRegistry.class);
this.accountImdg = imdgProvider.getImdg(IMDGDistributedNames.Map_Account, Account.class);
this.marketImdg = imdgProvider.getImdg(IMDGDistributedNames.Map_Market, Market.class);
this.sessionImdg = imdgProvider.getImdg(IMDGDistributedNames.Map_Session, Session.class);
return this;
}
public RegistryBuilder exec(ExecutionCommon exec) {
this.exec = exec;
return this;
}
public RegistryBuilder registryDesignation(RegistryDesignation registryDesignation) {
this.regDsgn = registryDesignation;
return this;
}
public Registry build() {
ISide side = getSide(exec);
Registry reg = new Registry();
reg.setCompanyId(exec.getCompanyId());
Company company = searchCompany();
reg.setTradingCode(company.getTradingCode());
reg.setClearingCode(company.getClearingCode());
reg.setShortName(company.getShortName());
reg.setFullName(company.getFullName());
TradingClearingRegistry tcr = searchTradingClearingRegistry();
if ((regDsgn.equals(RegistryDesignation.O) && side.isBuy()) || (regDsgn.equals(RegistryDesignation.T) && side.isSell())) {
reg.setAccountId(tcr.getMoneyAccountId());
reg.setRegistryInstrumentType(RegistryInstrumentType.M.getKey());
reg.setBalanceDimension(BalanceDimension.MONY.getKey()); //fixme add second leg code branch
} else if ((regDsgn.equals(RegistryDesignation.T) && side.isBuy()) || (regDsgn.equals(RegistryDesignation.O) && side.isSell())) {
reg.setAccountId(tcr.getDepoAccountId());
reg.setRegistryInstrumentType(RegistryInstrumentType.S.getKey());
reg.setBalanceDimension(BalanceDimension.PICS.getKey()); //fixme add second leg code branch
}
Account account = accountImdg.getSingleObjectByID(reg.getAccountId());
reg.setAccountType(account.getAccountType());
reg.setAccount(account.getAccount());
reg.setRegistryDesignation(regDsgn.getKey());
reg.setRegistryCapacity(account.getAccountType());
reg.setRegistryUnit(RegistryUnit.T.getKey());
reg.setRegistryCode(RegistryUtil.clearingCode(reg));
reg.setTradingClearingRegistryId(exec.getTradingClearingRegistryId());
reg.setTradingClearingRegistry(tcr.getCode());
reg.setRegistryStatus(RegistryStatus.PROC.getKey());
reg.setSecurityId(exec.getSecurityId());
reg.setSecuritySymbol(exec.getSecuritySymbol());
switch (exec.type()) {
case ExecutionDeposit -> {
ExecutionDeposit execDep = (ExecutionDeposit) this.exec;
reg.setBalance((execDep).getFirstLegAmount());
if (regDsgn.equals(RegistryDesignation.T)) {
reg.setSettledCredit((execDep).getFirstLegAmount());
} else if (regDsgn.equals(RegistryDesignation.O)) {
reg.setSettledDebit((execDep).getFirstLegAmount());
}
reg.setSettlementDate(execDep.getFirstLegSettlementDate()); //fixme add second leg code branch
reg.setSettlementCode(execDep.getFirstLegSettlementCode()); //fixme add second leg code branch
reg.setRefundDate(execDep.getSecondLegSettlementDate()); //fixme add second leg code branch??
reg.setValueDate(execDep.getFirstLegSettlementDate());
reg.setContract(execDep.getContract());
}
case ExecutionFond -> {
ExecutionFond execFond = (ExecutionFond) this.exec;
reg.setBalance(execFond.getSettlementAmount());
reg.setSettlementDate(execFond.getSettlementDate());
reg.setSettlementCode(execFond.getSettlementCode());
}
}
reg.setTradingDate(exec.getTradingDate());
reg.setClearingDate(LocalDate.now());
reg.setPrice(exec.getPrice());
reg.setCounterPartyId(exec.getCounterPartyId());
reg.setGroupId(groupId());
reg.setSessionId(exec.getSessionId());
reg.setSessionType(sessionType());
return reg;
}
private static DateTimeFormatter yyyyMMdd = DateTimeFormatter.ofPattern("yyyyMMdd");
private Long groupId() {
LocalDate now = LocalDate.now();
Market market = marketImdg.getSingleObjectBySQL("code = '" + exec.getMarket() + "'");
return Long.valueOf(now.format(yyyyMMdd) + exec.getExchangeExecutionId() + market.getId());
}
//можно передать из стейджа
private String sessionType() {
Session session = sessionImdg.getSingleObjectByID(exec.getSessionId());
return session.getSessionType();
}
private Company searchCompany() {
return companyImdg.getSingleObjectBySQL("id = " + exec.getCompanyId());
}
private TradingClearingRegistry searchTradingClearingRegistry() {
return tradingClearingRegistryImdg.getSingleObjectBySQL("tradingClearingRegistryId = " + exec.getTradingClearingRegistryId());
}
private static ISide getSide(ExecutionCommon exec) {
if (exec.type().equals(ExecutionType.ExecutionDeposit)) {
return ISide.parse(MoneyFlowSide.class, exec.getSide());
} else if (exec.type().equals(ExecutionType.ExecutionFond)) {
return ISide.parse(Side.class, exec.getSide());
} else {
throw new RuntimeException("Unknown Execution type: " + exec.type());
}
}
}

View file

@ -0,0 +1,66 @@
package ru.spcex.clearing.session.stage.impl;
import ru.clearing.classes.statics.data.company.Company;
import ru.clearing.classes.statics.data.execution.ExecutionCommon;
import ru.clearing.classes.statics.data.registry.Registry;
import ru.clearing.classes.statics.data.registry.TradingClearingRegistry;
import ru.spcex.clearing.imdg.IMDGDistributedNames;
import ru.spcex.platform.imdg.api.Imdg;
import ru.spcex.platform.imdg.api.ImdgProvider;
public class RegistryUpdater {
public static RegistryUpdater updater() {
return new RegistryUpdater();
}
private RegistryUpdater() {
}
private Imdg<Registry> registryImdg;
private Imdg<Company> companyImdg;
private Imdg<TradingClearingRegistry> tradingClearingRegistryImdg;
private ExecutionCommon exec;
private Registry rgs;
public RegistryUpdater imdg(ImdgProvider imdgProvider) {
this.registryImdg = imdgProvider.getImdg(IMDGDistributedNames.Map_Registry, Registry.class);
this.companyImdg = imdgProvider.getImdg(IMDGDistributedNames.Map_Company, Company.class);
this.tradingClearingRegistryImdg = imdgProvider.getImdg(IMDGDistributedNames.Map_TradingClearingRegistry, TradingClearingRegistry.class);
return this;
}
public RegistryUpdater registry(Registry rgs) {
this.rgs = rgs;
return this;
}
public RegistryUpdater exec(ExecutionCommon exec) {
this.exec = exec;
return this;
}
public Registry update() {
Registry reg = new Registry();
reg.setCompanyId(exec.getCompanyId());
Company company = searchCompany();
reg.setTradingCode(company.getTradingCode());
reg.setClearingCode(company.getClearingCode());
reg.setShortName(company.getShortName());
reg.setFullName(company.getFullName());
TradingClearingRegistry tcr = searchTradingClearingRegistry();
return null;
}
private Company searchCompany() {
return companyImdg.getSingleObjectBySQL("id = " + exec.getCompanyId());
}
private TradingClearingRegistry searchTradingClearingRegistry() {
return tradingClearingRegistryImdg.getSingleObjectBySQL("tradingClearingRegistryId = " + exec.getTradingClearingRegistryId());
}
// public
}

View file

@ -0,0 +1,180 @@
package ru.spcex.clearing.session.stage.impl;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import ru.clearing.classes.statics.data.execution.ExecutionCommon;
import ru.clearing.classes.statics.data.execution.ExecutionDeposit;
import ru.clearing.classes.statics.data.execution.ExecutionFond;
import ru.clearing.classes.statics.data.registry.Registry;
import ru.spcex.clearing.imdg.IMDGDistributedNames;
import ru.spcex.clearing.models.RegistryTradingParams;
import ru.spcex.clearing.service.builder.sql.RegistryCodeSqlBuilder;
import ru.spcex.clearing.session.stage.ISessionStage;
import ru.spcex.clearing.session.stage.StageResult;
import ru.spcex.clearing.session.stage.Task;
import ru.spcex.clearing.session.stage.TaskType;
import ru.spcex.platform.classes.base.interfaces.ExecutionType;
import ru.spcex.platform.enumeration.*;
import ru.spcex.platform.imdg.api.Imdg;
import ru.spcex.platform.imdg.api.ImdgProvider;
import ru.spcex.platform.imdg.api.predicate.ImdgPredicate;
import ru.spcex.platform.imdg.api.predicate.ImdgPredicateBuilder;
import ru.spcex.platform.utils.collection.Pair;
import java.time.LocalDate;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import java.util.function.BiConsumer;
@Service
public class RequirmentsAndObligationCreation implements ISessionStage {
private final Logger log = LoggerFactory.getLogger(getClass());
private final Imdg<Registry> registryImdg;
private final ImdgProvider imdgProvider;
@Autowired
public RequirmentsAndObligationCreation(ImdgProvider imdgProvider) {
this.registryImdg = imdgProvider.getImdg(IMDGDistributedNames.Map_Registry, Registry.class);
this.imdgProvider = imdgProvider;
}
@SuppressWarnings("unchecked")
@Override
public StageResult<?> submit(Task<?> task) {
if (task.getTaskType() == TaskType.RequirementsAndObligationsCreate) {
return createRegisters((List<ExecutionCommon>) task.getData());
}
throw new IllegalStateException("Unknown task type: " + task.getTaskType());
}
private StageResult<?> createRegisters(List<ExecutionCommon> data) {
if (data.size() % 2 != 0) {
throw new IllegalStateException("Data size must be even (executions must match)");
}
//см. описание к #matchExecutions
for (int i = 0; i < data.size(); ) {
Pair<ExecutionCommon, ExecutionCommon> matched = matchExecutions(data, i);
if (matched == null) {
log.error("couldn't find match execution for id = {}", data.get(i).getId());
i += 1;
continue;
}
i += 2;
ExecutionCommon partyExec = matched.getFirst();
ExecutionCommon counterExec = matched.getSecond();
BiConsumer<ExecutionCommon, RegistryDesignation> findAndUpdateOrCreate = (exec, regDsgn) ->
findReg(exec, regDsgn).ifPresentOrElse(registry -> {
RegistryUpdater.updater()
.imdg(imdgProvider)
.exec(partyExec)
.registry(registry)
.update();
registryImdg.update(registry);
}, () -> {
Registry newRegister = RegistryBuilder.builder()
.imdg(imdgProvider)
.exec(partyExec)
.registryDesignation(regDsgn)
.build();
registryImdg.insert(newRegister);
});
findAndUpdateOrCreate.accept(partyExec, RegistryDesignation.O);
findAndUpdateOrCreate.accept(partyExec, RegistryDesignation.T);
findAndUpdateOrCreate.accept(counterExec, RegistryDesignation.O);
findAndUpdateOrCreate.accept(counterExec, RegistryDesignation.T);
}
return new StageResult<>(null, true);
}
private Optional<Registry> findReg(ExecutionCommon exec, RegistryDesignation des) {
ISide side = getSide(exec);
RegistryTradingParams p;
if (side.isBuy() && des.equals(RegistryDesignation.O)) {
p = new RegistryTradingParams(
RegistryDesignation.O, RegistryInstrumentType.M, null, RegistryUnit.T
);
} else if (side.isBuy() && des.equals(RegistryDesignation.T)) {
p = new RegistryTradingParams(
RegistryDesignation.T, RegistryInstrumentType.S, null, RegistryUnit.T
);
} else if (side.isSell() && des.equals(RegistryDesignation.O)) {
p = new RegistryTradingParams(
RegistryDesignation.O, RegistryInstrumentType.S, null, RegistryUnit.T
);
} else if (side.isSell() && des.equals(RegistryDesignation.T)) {
p = new RegistryTradingParams(
RegistryDesignation.T, RegistryInstrumentType.M, null, RegistryUnit.T
);
} else {
throw new IllegalStateException("cannot construct for " + des + " " + side);
}
String sql = RegistryCodeSqlBuilder.getInstance(p).build();
ImdgPredicateBuilder pb = registryImdg.predicateBuilder();
ImdgPredicate rgstrPredicate = pb.and(pb.sql(sql),
pb.equals("tradingClearingRegistryId", exec.getTradingClearingRegistryId()),
pb.equals("companyId", exec.getCompanyId()),
pb.equals("settlementDate", settlementDt(exec))
);
return Optional.ofNullable(registryImdg.getSingleObjectByPredicate(rgstrPredicate));
}
private LocalDate settlementDt(ExecutionCommon exec) {
if (exec.type().equals(ExecutionType.ExecutionDeposit)) {
return ((ExecutionDeposit) exec).getFirstLegSettlementDate();
} else if (exec.type().equals(ExecutionType.ExecutionFond)) {
return ((ExecutionFond) exec).getSettlementDate();
} else {
throw new RuntimeException("Unknown Execution type: " + exec.type());
}
}
/**
* входные данные отсортированы по exchangeExecutionId.
* сортировка выполнена на предыдущем шаге. (такое описание шагов в ТЗ)
* по идее, Execution с одинаковым exchangeExecutionId должно быть всего два.
* если это не так, передалать на коллекцию Long executionId в правильном порядке
* и для каждого искать мэтч отдельно в Imdg, с сохранением уже обработанных для избежания дублирования
*/
private Pair<ExecutionCommon, ExecutionCommon> matchExecutions(List<ExecutionCommon> data, int i) {
//if the last execution, then no match
if (i >= data.size() - 1) {
return null;
}
ExecutionCommon exec1 = data.get(i);
ExecutionCommon exec2 = data.get(i + 1);
//Встречная сделка контрагента выбирается из executionDeposit/Fond по условию:
//exchangeExecutionId=currentExecutionDeposit/Fond.exchangeExecutionId
//и [side=SELL (если currentExecutionDeposit/Fond.side=BUY) или side=BUY (если currentExecutionDeposit/Fond.side=SELL) по справочнику moneyFlowSide или справочнику side в зависимости от секции обрабатываемой сделки]
//и companyId=currentExecutionDeposit/Fond.counterPartyId
boolean valid = true;
if (!Objects.equals(exec1.getExchangeExecutionId(), exec2.getExchangeExecutionId())) {
valid = false;
} else if (Objects.equals(getSide(exec1), getSide(exec2))) {
valid = false;
} else if (!Objects.equals(exec1.getCounterPartyId(), exec2.getCounterPartyId())) {
valid = false;
}
if (!valid) {
log.error("FATAL skipping ExchangeExecutionId: {}", exec1.getId());
}
return new Pair<>(exec1, exec2);
}
private static ISide getSide(ExecutionCommon exec) {
if (exec.type().equals(ExecutionType.ExecutionDeposit)) {
return ISide.parse(MoneyFlowSide.class, exec.getSide());
} else if (exec.type().equals(ExecutionType.ExecutionFond)) {
return ISide.parse(Side.class, exec.getSide());
} else {
throw new RuntimeException("Unknown Execution type: " + exec.type());
}
}
}

View file

@ -15,6 +15,7 @@ import ru.spcex.platform.enumeration.RegistryInstrumentType;
import ru.spcex.platform.enumeration.RegistryUnit;
import ru.spcex.platform.imdg.api.Imdg;
import ru.spcex.platform.imdg.api.ImdgProvider;
import ru.spcex.platform.imdg.api.ImdgTransaction;
import ru.spcex.platform.imdg.api.predicate.ImdgPredicate;
import ru.spcex.platform.imdg.api.predicate.ImdgPredicateBuilder;
@ -26,10 +27,12 @@ import java.util.Collection;
public class UnlockResources implements ISessionStage {
private final Logger log = LoggerFactory.getLogger(getClass());
protected final ImdgProvider imdgProvider;
private final Imdg<Registry> registryImdg;
@Autowired
public UnlockResources(ImdgProvider imdgProvider) {
this.imdgProvider = imdgProvider;
this.registryImdg = imdgProvider.getImdg(IMDGDistributedNames.Map_Registry, Registry.class);
}
@ -39,7 +42,7 @@ public class UnlockResources implements ISessionStage {
switch (task.getTaskType()) {
case UnlockResources -> {
UnlockResourcesPayload payload = (UnlockResourcesPayload) task.getData();
return unlockResources(payload.getSdfMode(), payload.getSessionId(),
return unlockResources(payload.getSdfMode(),
payload.getAccount(),
payload.getSecurityId(),
payload.getFullNames(),
@ -52,26 +55,18 @@ public class UnlockResources implements ISessionStage {
}
}
/**
* Select Registry by: account; fullName* / securityId
*/
protected Collection<Registry> selectRegistry(Long sessionId, String account, Long securityId, Collection<String> fullNames) {
protected Collection<Registry> selectRegistryForSDF04(String account, Collection<String> fullNames) {
ImdgPredicateBuilder pb = registryImdg.predicateBuilder();
ImdgPredicate queryPart;
if (securityId != null) {
queryPart = pb.in("securityId", securityId);
} else if (fullNames != null && !fullNames.isEmpty()) {
queryPart = pb.in("fullName", fullNames.toArray(new String[fullNames.size()]));
} else {
throw new IllegalArgumentException("Required securityId or fullNames");
}
ImdgPredicate query = pb.and(
pb.and(
pb.equals("sessionId", sessionId),
pb.equals("registryDesignation", RegistryDesignation.A.getKey()) // не все нужны, только с этим кодом отфильтруем.
pb.equals("registryDesignation", RegistryDesignation.A.getKey()),
pb.equals("registryInstrumentType", RegistryInstrumentType.M.getKey()),
// pb.equals("registryCapacity", *),
pb.or(pb.equals("registryUnit", RegistryUnit.F.getKey()),
pb.equals("registryUnit", RegistryUnit.B.getKey()))
),
pb.equals("account", account),
queryPart
pb.in("fullName", fullNames.toArray(new String[fullNames.size()]))
);
Collection<Registry> result = registryImdg.getCollectionObjectsByPredicate(query);
@ -79,50 +74,74 @@ public class UnlockResources implements ISessionStage {
return result;
}
/**
* Select Registry by: account; fullName* / securityId
*/
protected Collection<Registry> selectRegistryForSDF12(String account, Long securityId) {
ImdgPredicateBuilder pb = registryImdg.predicateBuilder();
ImdgPredicate query = pb.and(
pb.and(
pb.equals("registryDesignation", RegistryDesignation.A.getKey()),
pb.equals("registryInstrumentType", RegistryInstrumentType.S.getKey()),
// pb.equals("registryCapacity", *),
pb.or(pb.equals("registryUnit", RegistryUnit.F.getKey()),
pb.equals("registryUnit", RegistryUnit.B.getKey()))
),
pb.equals("account", account),
pb.in("securityId", securityId)
);
Collection<Registry> result = registryImdg.getCollectionObjectsByPredicate(query);
log.trace("Selected {} registry's by sql: {}", result.size(), query);
return result;
}
/**
* @param sdfMode UnlockResourcesPayload.sdfMode
* @param sessionId
* @param account
* @param securityId
* @param fullNames
* @return
*/
protected StageResult<?> unlockResources(String sdfMode, Long sessionId, String account, Long securityId, Collection<String> fullNames, BigDecimal value) {
Collection<Registry> forRegistries = selectRegistry(sessionId, account, securityId, fullNames);
protected StageResult<?> unlockResources(String sdfMode, String account, Long securityId, Collection<String> fullNames, BigDecimal value) {
Collection<Registry> forRegistries;
//todo при перезапуске после незапланированного завершения стадии: надо ли проверять уже созданные регистры и не создавать дубликаты?
if (UnlockResourcesPayload.MODE_SDF04.equals(sdfMode)) {
forRegistries = forRegistries.stream().filter(
(Registry r) ->
RegistryDesignation.A.equalsByKey(r.getRegistryDesignation())
&&
RegistryInstrumentType.M.equalsByKey(r.getRegistryInstrumentType())
&&
(RegistryUnit.F.equalsByKey(r.getRegistryUnit()) || RegistryUnit.B.equalsByKey(r.getRegistryUnit()))
).toList();
forRegistries = selectRegistryForSDF04(account, fullNames);
} else if (UnlockResourcesPayload.MODE_SDF12.equals(sdfMode)) {
forRegistries = forRegistries.stream().filter(
(Registry r) ->
RegistryDesignation.A.equalsByKey(r.getRegistryDesignation())
&&
RegistryInstrumentType.S.equalsByKey(r.getRegistryInstrumentType())
&&
(RegistryUnit.F.equalsByKey(r.getRegistryUnit()) || RegistryUnit.B.equalsByKey(r.getRegistryUnit()))
).toList();
forRegistries = selectRegistryForSDF12(account, securityId);
} else {
throw new IllegalArgumentException("Mode not support: " + sdfMode);
}
for (Registry registry : forRegistries) {
boolean modified = unlockRegistry(registry, value);
if (modified) {
registry.setUpdated(Instant.now());
registryImdg.update(registry);
log.trace("Registry {} changed; value +- registry",
registry.getId(), registry.getRegistryCode(), value);
ImdgTransaction tx = imdgProvider.newTransaction();
boolean txOk = false;
try {
log.debug("Processing transaction {}, input {} registers.", tx, forRegistries.size());
Imdg<Registry> registryTxImdg = tx.getImdg(IMDGDistributedNames.Map_Registry, Registry.class);
int nUpdates = 0;
for (Registry registry : forRegistries) {
boolean modified = unlockRegistry(registry, value);
if (modified) {
registry.setUpdated(Instant.now());
registryTxImdg.update(registry);
nUpdates++;
log.trace("Registry {} (registryCode={}) changed; value +- {}",
registry.getId(), registry.getRegistryCode(), value);
}
}
log.info("Updated {} registry's (under transaction {}", nUpdates, tx);
txOk = true;
} finally {
if (txOk) {
log.debug("Commit transaction {}.", tx);
tx.commitTransaction();
} else {
log.info("Rollback transaction {}", tx);
tx.rollbackTransaction();
}
}
//todo рекомендуется делать транзакцией.
StageResult<Collection<Registry>> res = new StageResult<>(null, true);
res.setStageResult(forRegistries);

View file

@ -0,0 +1,5 @@
package ru.spcex.clearing.session.stage.task;
public class FormingRegistersOnOSPayload {
}

View file

@ -1,31 +0,0 @@
package ru.spcex.clearing.session.stage.task;
public class RegistryOnObligationsAndSettlementRequirementsPayload {
private Long sessionId;
// private Long companyId;
// private Long securityId;
public Long getSessionId() {
return sessionId;
}
public void setSessionId(Long sessionId) {
this.sessionId = sessionId;
}
// public Long getCompanyId() {
// return companyId;
// }
//
// public void setCompanyId(Long companyId) {
// this.companyId = companyId;
// }
//
// public Long getSecurityId() {
// return securityId;
// }
//
// public void setSecurityId(Long securityId) {
// this.securityId = securityId;
// }
}

View file

@ -12,8 +12,6 @@ public class UnlockResourcesPayload {
*/
private String sdfMode;
private Long sessionId;
/**
* sDf04.c_acc_cred
* sDf12.depoCodeSender
@ -46,13 +44,6 @@ public class UnlockResourcesPayload {
}
public Long getSessionId() {
return sessionId;
}
public void setSessionId(Long sessionId) {
this.sessionId = sessionId;
}
public String getAccount() {
return account;

View file

@ -0,0 +1,20 @@
package ru.spcex.platform.enumeration;
import ru.spcex.platform.utils.enumeration.IEnumKey;
public enum BalanceDimension implements IEnumKey {
MONY("MONY"),
PICS("PICS"),
;
private final String key;
BalanceDimension(String key) {
this.key = key;
}
@Override
public String getKey() {
return key;
}
}

View file

@ -0,0 +1,15 @@
package ru.spcex.platform.enumeration;
import ru.spcex.platform.utils.enumeration.IEnumKey;
public interface ISide {
boolean isBuy();
boolean isSell();
default boolean isOpposite(ISide other) {
return (isBuy() && other.isSell()) || (isSell() && other.isBuy());
}
static <T extends Enum<T> & IEnumKey & ISide> ISide parse(Class<T> clazz, String key) {
return IEnumKey.getEnumByKey(clazz, key);
}
}

View file

@ -2,7 +2,7 @@ package ru.spcex.platform.enumeration;
import ru.spcex.platform.utils.enumeration.IEnumKey;
public enum MoneyFlowSide implements IEnumKey {
public enum MoneyFlowSide implements IEnumKey, ISide {
BUY("BUY"),
SELL("SELL"),
;
@ -17,4 +17,15 @@ public enum MoneyFlowSide implements IEnumKey {
public String getKey() {
return key;
}
@Override
public boolean isBuy() {
return equals(BUY);
}
@Override
public boolean isSell() {
return equals(SELL);
}
}

View file

@ -3,7 +3,7 @@ package ru.spcex.platform.enumeration;
import ru.spcex.platform.utils.enumeration.IEnumKey;
public enum RegistryStatus implements IEnumKey {
OK("OK"),
OK("OK"), PROC("PROC"),
;
private final String key;

View file

@ -2,7 +2,7 @@ package ru.spcex.platform.enumeration;
import ru.spcex.platform.utils.enumeration.IEnumKey;
public enum Side implements IEnumKey {
public enum Side implements IEnumKey, ISide {
BUY("B"),
SELL("S"),
;
@ -17,4 +17,15 @@ public enum Side implements IEnumKey {
public String getKey() {
return key;
}
@Override
public boolean isBuy() {
return equals(BUY);
}
@Override
public boolean isSell() {
return equals(SELL);
}
}

View file

@ -251,6 +251,15 @@ public class ImdgHazelcast<T extends SpcexObjectBase> implements Imdg<T> {
return searchResult;
}
@Override
public T getSingleObjectByPredicate(ImdgPredicate predicate) {
Collection<T> els = getCollectionObjectsByPredicate(predicate);
if (els.size() > 1) {
throw new RuntimeException("More than one element found by predicate - " + els.size());
}
return els.iterator().next();
}
@Override
public ImdgPredicateBuilder predicateBuilder() {
return ImdgPredicateBuilderHazelcast.instance();

View file

@ -68,4 +68,9 @@ public class ImdgTransactionProviderHazelcast implements ImdgTransaction {
public void setHz(HazelcastInstance hz) {
this.hz = hz;
}
@Override
public String toString() {
return "ImdgTransaction{" + (ctx == null ? null : ctx.getTxnId()) + "}";
}
}

View file

@ -101,6 +101,11 @@ public interface Imdg<T extends SpcexObjectBase> {
throw new UnsupportedOperationException("not implemented getCollectionObjectsByPredicate");
}
// Predicate API
default T getSingleObjectByPredicate(ImdgPredicate predicate) {
throw new UnsupportedOperationException("not implemented getSingleObjectByPredicate");
}
default ImdgPredicateBuilder predicateBuilder() {
throw new UnsupportedOperationException("not implemented predicateBuilder API");
}