GetSubProductChangesList v2.0: различия между версиями
Строка 122: | Строка 122: | ||
! Тип | ! Тип | ||
! Обязат. | ! Обязат. | ||
! Описание | ! Описание (нажмите [...] для отображения дополнительного описания) | ||
|- | |- | ||
| | |001 | ||
|style="font-weight: | |style="font-weight: ; font-family: Courier;" |{{color|#190dbf|'''<ws:getSubProductChangeListResponse>'''}} | ||
| | | | ||
| | | | ||
| style="width:52em;"| | |||
|style=" | |||
|- | |- | ||
| | |002 | ||
|style="font-weight: | |style="font-weight: ; font-family: Courier;" |···{{color|#190dbf|'''<{{color|#660e7a|dt:}}subProductList {{color|Red|total=}}{{color|#007f15|"2"}} {{color|Red|offset=}}{{color|#007f15|"0"}} {{color|Red|count=}}{{color|#007f15|"2"}}>'''}} | ||
|[[SubProductList_v2.0|dt:SubProductList]] | |[[SubProductList_v2.0|dt:SubProductList]] | ||
|[1..1] | |[1..1] | ||
|Список видов продукции | |<div class="mw-collapsible mw-collapsed" data-expandtext=" ... " data-collapsetext="свернуть" style="font-weight: bold; width:52em;"> | ||
<span style="white-space:nowrap; font-weight: normal;">Список видов продукции. | |||
</span> | |||
<div class="mw-collapsible-content" style="font-weight: normal;"> | |||
* total - всего записей; | * total - всего записей; | ||
* offset - смещение относительно первого элемента; | * offset - смещение относительно первого элемента; | ||
* count - количество выводимых записей. | * count - количество выводимых записей.</div> | ||
</div> | |||
|- | |- | ||
| | |003 | ||
|style="font-weight: | |style="font-weight: ; font-family: Courier;" |······{{color|#190dbf|'''<{{color|#660e7a|dt:}}subProduct>'''}} | ||
|[[SubProduct_v2.0|dt:SubProduct]] | |[[SubProduct_v2.0|dt:SubProduct]] | ||
|[0..*] | |[0..*] | ||
|Вид продукции | |<div class="mw-collapsible mw-collapsed" data-expandtext=" ... " data-collapsetext="свернуть" style="font-weight: bold; width:52em;"> | ||
* третий уровень иерархического справочника продукции ИС Меркурий | <span style="white-space:nowrap; font-weight: normal;">Вид продукции. | ||
</span> | |||
<div class="mw-collapsible-content" style="font-weight: normal;"> | |||
* третий уровень иерархического справочника продукции ИС Меркурий</div> | |||
</div> | |||
|- | |- | ||
| | |004 | ||
|style="font-weight: | |style="font-weight: ; font-family: Courier;" |·········{{color|#190dbf|'''<{{color|#660e7a|bs:}}uuid>'''}}{{color|#131313|UUID}}{{color|#190dbf|'''</{{color|#660e7a|bs:}}uuid>'''}} | ||
|[[UUID|bs:UUID]] | |[[UUID|bs:UUID]] | ||
|[1..1] | |[1..1] | ||
| style="width:52em;"| Идентификатор версии вида продукции. | |||
|style=" | |||
|- | |- | ||
| | |005 | ||
|style="font-weight: | |style="font-weight: ; font-family: Courier;" |·········{{color|#190dbf|'''<{{color|#660e7a|bs:}}guid>'''}}{{color|#131313|GUID}}{{color|#190dbf|'''</{{color|#660e7a|bs:}}guid>'''}} | ||
|[[UUID|bs:UUID]] | |[[UUID|bs:UUID]] | ||
|[1..1] | |[1..1] | ||
| style="width:52em;"| Глобальный идентификатор вида продукции. | |||
|style=" | |||
|- | |- | ||
| | |006 | ||
|style="font-weight: | |style="font-weight: ; font-family: Courier;" |·········{{color|#190dbf|'''<{{color|#660e7a|bs:}}active>'''}}{{color|#131313|true}}{{color|#190dbf|'''</{{color|#660e7a|bs:}}active>'''}} | ||
|[http://www.w3.org/TR/xmlschema-2/#boolean xs:boolean] | |[http://www.w3.org/TR/xmlschema-2/#boolean xs:boolean] | ||
|[1..1] | |[1..1] | ||
| | |<div class="mw-collapsible mw-collapsed" data-expandtext=" ... " data-collapsetext="свернуть" style="font-weight: bold; width:52em;"> | ||
<span style="white-space:nowrap; font-weight: normal;">Описание, является ли запись активной. | |||
</span> | |||
<div class="mw-collapsible-content" style="font-weight: normal;"> | |||
* true - запись активна; | * true - запись активна; | ||
* false - запись не активна. | * false - запись не активна.</div> | ||
</div> | |||
|- | |- | ||
| | |007 | ||
|style="font-weight: | |style="font-weight: ; font-family: Courier;" |·········{{color|#190dbf|'''<{{color|#660e7a|bs:}}last>'''}}{{color|#131313|true}}{{color|#190dbf|'''</{{color|#660e7a|bs:}}last>'''}} | ||
|[http://www.w3.org/TR/xmlschema-2/#boolean xs:boolean] | |[http://www.w3.org/TR/xmlschema-2/#boolean xs:boolean] | ||
|[1..1] | |[1..1] | ||
| | |<div class="mw-collapsible mw-collapsed" data-expandtext=" ... " data-collapsetext="свернуть" style="font-weight: bold; width:52em;"> | ||
<span style="white-space:nowrap; font-weight: normal;">Описание, является ли версия записи последней. | |||
</span> | |||
<div class="mw-collapsible-content" style="font-weight: normal;"> | |||
* true - да; | * true - да; | ||
* false - нет. | * false - нет. </div> | ||
</div> | |||
|- | |- | ||
| | |008 | ||
|style="font-weight: | |style="font-weight: ; font-family: Courier;" |·········{{color|#190dbf|'''<{{color|#660e7a|bs:}}status>'''}}{{color|#131313|100}}{{color|#190dbf|'''</{{color|#660e7a|bs:}}status>'''}} | ||
|[[VersionStatus|bs:VersionStatus]] | |[[VersionStatus|bs:VersionStatus]] | ||
|[1..1] | |[1..1] | ||
| style="width:52em;"| Статус версии записи. | |||
|style=" | |||
|- | |- | ||
| | |009 | ||
|style="font-weight: | |style="font-weight: ; font-family: Courier;" |·········{{color|#190dbf|'''<{{color|#660e7a|bs:}}createDate>'''}}{{color|#131313|2017-07-07T12:00:00}}{{color|#190dbf|'''</{{color|#660e7a|bs:}}createDate>'''}} | ||
|[http://www.w3.org/TR/xmlschema-2/#DateTime xs:DateTime] | |[http://www.w3.org/TR/xmlschema-2/#DateTime xs:DateTime] | ||
|[1..1] | |[1..1] | ||
| style="width:52em;"| Дата создания записи. | |||
|style=" | |||
|- | |- | ||
| | |010 | ||
|style="font-weight: | |style="font-weight: ; font-family: Courier;" |·········{{color|#190dbf|'''<{{color|#660e7a|bs:}}updateDate>'''}}{{color|#131313|2017-07-07T12:00:00}}{{color|#190dbf|'''</{{color|#660e7a|bs:}}updateDate>'''}} | ||
|[http://www.w3.org/TR/xmlschema-2/#DateTime xs:DateTime] | |[http://www.w3.org/TR/xmlschema-2/#DateTime xs:DateTime] | ||
|[1..1] | |[1..1] | ||
| style="width:52em;"| Дата изменения записи. | |||
|style=" | |||
|- | |- | ||
| | |011 | ||
|style="font-weight: | |style="font-weight: ; font-family: Courier;" |·········{{color|#190dbf|'''<{{color|#660e7a|bs:}}previous>'''}}{{color|#131313|UUID}}{{color|#190dbf|'''</{{color|#660e7a|bs:}}previous>'''}} | ||
|[[UUID|bs:UUID]] | |[[UUID|bs:UUID]] | ||
|[0..1] | |[0..1] | ||
| style="width:52em;"| Идентификатор предыдущей версии записи. | |||
|style=" | |||
|- | |- | ||
| | |012 | ||
|style="font-weight: | |style="font-weight: ; font-family: Courier;" |·········{{color|#190dbf|'''<{{color|#660e7a|bs:}}next>'''}}{{color|#131313|UUID}}{{color|#190dbf|'''</{{color|#660e7a|bs:}}next>'''}} | ||
|[[UUID|bs:UUID]] | |[[UUID|bs:UUID]] | ||
|[0..1] | |[0..1] | ||
| style="width:52em;"| Идентификатор следующей версии записи. | |||
|style=" | |||
|- | |- | ||
| | |013 | ||
|style="font-weight: | |style="font-weight: ; font-family: Courier;" |·········{{color|#190dbf|'''<{{color|#660e7a|dt:}}name>'''}}{{color|#131313|мясо птицы}}{{color|#190dbf|'''</{{color|#660e7a|dt:}}name>'''}} | ||
|[[String255|bs:String255]] | |[[String255|bs:String255]] | ||
|[1..1] | |[1..1] | ||
| style="width:52em;"| Название вида продукции. | |||
|style=" | |||
|- | |- | ||
| | |014 | ||
|style="font-weight: | |style="font-weight: ; font-family: Courier;" |·········{{color|#190dbf|'''<{{color|#660e7a|dt:}}code>'''}}{{color|#131313|0207}}{{color|#190dbf|'''</{{color|#660e7a|dt:}}code>'''}} | ||
|[[String255|bs:String255]] | |[[String255|bs:String255]] | ||
|[1..1] | |[1..1] | ||
| style="width:52em;"| Код ТН ВЭД вида продукции. | |||
|style=" | |||
|- | |- | ||
| | |015 | ||
|style="font-weight: | |style="font-weight: ; font-family: Courier;" |·········{{color|#190dbf|'''<{{color|#660e7a|dt:}}productGuid>'''}}{{color|#131313|GUID}}{{color|#190dbf|'''</{{color|#660e7a|dt:}}productGuid>'''}} | ||
|[[UUID|bs:UUID]] | |[[UUID|bs:UUID]] | ||
|[1..1] | |[1..1] | ||
|Глобальный идентификатор продукции | |<div class="mw-collapsible mw-collapsed" data-expandtext=" ... " data-collapsetext="свернуть" style="font-weight: bold; width:52em;"> | ||
<span style="white-space:nowrap; font-weight: normal;">Глобальный идентификатор продукции. | |||
</span> | |||
<div class="mw-collapsible-content" style="font-weight: normal;"> | |||
* второй уровень иерархического справочника продукции ИС Меркурий</div> | |||
</div> | |||
|- | |- | ||
| | |016 | ||
|style="font-weight: | |style="font-weight: ; font-family: Courier;" |······{{color|#190dbf|'''</{{color|#660e7a|dt:}}subProduct>'''}} | ||
| | | | ||
| | | | ||
|style=" | | style="width:52em;"| | ||
|- | |- | ||
| | |017 | ||
|style="font-weight: | |style="font-weight: ; font-family: Courier;" |···{{color|#190dbf|'''</{{color|#660e7a|dt:}}subProductList>'''}} | ||
| | | | ||
| | | | ||
|style=" | | style="width:52em;"| | ||
|- | |- | ||
| | |018 | ||
|style="font-weight: | |style="font-weight: ; font-family: Courier;" |{{color|#190dbf|'''</ws:getSubProductChangeListResponse>'''}} | ||
| | | | ||
| | | | ||
|style=" | | style="width:52em;"| | ||
|- | |- | ||
|} | |} |
Текущая версия на 16:01, 27 сентября 2020
Общие сведения
Операция GetSubProductChangesList предназначена для получения списка изменённых видов продукции (3 уровень иерархического справочника). В список попадают записи, дата изменения которых попадает во временной интервал, указанный в запросе. Выполнение операции заканчивается либо возвращением списка всех версий видов продукции, последних и не последних (last=true, last=false), актуальных и не актуальных (active=true, active = false), либо ошибкой, в случае если параметры запроса не корректны, если запись по запросу не найдена или произошла иная ошибка выполнения запроса.
Входные данные
- параметры запрашиваемого списка;
- интервал дат, за которые нужно получить изменения.
Выходные данные
- список видов продукции, изменённых за указанный период времени.
Спецификация запроса
# | Название XML-элемента | Тип | Обязат. | Описание (нажмите [...] для отображения дополнительного описания) |
---|---|---|---|---|
001 | <ws:getSubProductChangeListRequest> | |||
002 | ···<bs:listOptions> | bs:ListOptions | [0..1] | Параметры запрашиваемого списка. |
003 | ······<bs:count>10</bs:count> | xs:nonNegativeInteger | [0..1] | Максимальное запрашиваемое количество объектов в списке.
|
004 | ······<bs:offset>2</bs:offset> | xs:nonNegativeInteger | [0..1] | Номер элемента, по которому осуществляется смещение первого элемента списка.
|
005 | ···</bs:listOptions> | |||
006 | ···<bs:updateDateInterval> | bs:DataInterval | [1..1] | Интервал времени обновления.
|
007 | ······<bs:beginDate>2017-07-07T00:00:00</bs:beginDate> | xs:dateTime | [1..1] | Начало временного интервала. |
008 | ······<bs:endDate>2017-07-25T00:00:00</bs:endDate> | xs:dateTime | [0..1] | Конец временного интервала. |
009 | ···</bs:updateDateInterval> | |||
010 | </ws:getSubProductChangeListRequest> |
Спецификация ответа
# | Название XML-элемента | Тип | Обязат. | Описание (нажмите [...] для отображения дополнительного описания) |
---|---|---|---|---|
001 | <ws:getSubProductChangeListResponse> | |||
002 | ···<dt:subProductList total="2" offset="0" count="2"> | dt:SubProductList | [1..1] | Список видов продукции.
|
003 | ······<dt:subProduct> | dt:SubProduct | [0..*] | Вид продукции.
|
004 | ·········<bs:uuid>UUID</bs:uuid> | bs:UUID | [1..1] | Идентификатор версии вида продукции. |
005 | ·········<bs:guid>GUID</bs:guid> | bs:UUID | [1..1] | Глобальный идентификатор вида продукции. |
006 | ·········<bs:active>true</bs:active> | xs:boolean | [1..1] | Описание, является ли запись активной.
|
007 | ·········<bs:last>true</bs:last> | xs:boolean | [1..1] | Описание, является ли версия записи последней.
|
008 | ·········<bs:status>100</bs:status> | bs:VersionStatus | [1..1] | Статус версии записи. |
009 | ·········<bs:createDate>2017-07-07T12:00:00</bs:createDate> | xs:DateTime | [1..1] | Дата создания записи. |
010 | ·········<bs:updateDate>2017-07-07T12:00:00</bs:updateDate> | xs:DateTime | [1..1] | Дата изменения записи. |
011 | ·········<bs:previous>UUID</bs:previous> | bs:UUID | [0..1] | Идентификатор предыдущей версии записи. |
012 | ·········<bs:next>UUID</bs:next> | bs:UUID | [0..1] | Идентификатор следующей версии записи. |
013 | ·········<dt:name>мясо птицы</dt:name> | bs:String255 | [1..1] | Название вида продукции. |
014 | ·········<dt:code>0207</dt:code> | bs:String255 | [1..1] | Код ТН ВЭД вида продукции. |
015 | ·········<dt:productGuid>GUID</dt:productGuid> | bs:UUID | [1..1] | Глобальный идентификатор продукции.
|
016 | ······</dt:subProduct> | |||
017 | ···</dt:subProductList> | |||
018 | </ws:getSubProductChangeListResponse> |
Описание ошибок
Ошибка | Описание |
---|---|
InternalServiceFault | Внутренняя ошибка сервиса. |
IncorrectRequestFault | Некорректный запрос. Происходит в случае, если запрос не соответствует требованиям указанным в xsd, то есть сообщение не проходит валидацию. |
OffsetOutOfRangeFault | Заданный в запросе отступ больше числа записей в результате запроса. |
Пример запроса
Запрос списка первых трех изменённых видов продукции с 20.10.2016 по текущий день без смещения.
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ws="http://api.vetrf.ru/schema/cdm/registry/ws-definitions/v2" xmlns:bs="http://api.vetrf.ru/schema/cdm/base">
<soapenv:Header/>
<soapenv:Body>
<ws:getSubProductChangesListRequest>
<bs:listOptions>
<bs:count>3</bs:count>
<bs:offset>0</bs:offset>
</bs:listOptions>
<bs:updateDateInterval>
<bs:beginDate>2016-10-20T00:00:00</bs:beginDate>
</bs:updateDateInterval>
</ws:getSubProductChangesListRequest>
</soapenv:Body>
</soapenv:Envelope>
Ответ на запрос.
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<v2:getSubProductChangesListResponse xmlns:bs="http://api.vetrf.ru/schema/cdm/base" xmlns:dt="http://api.vetrf.ru/schema/cdm/dictionary/v2" xmlns:v2="http://api.vetrf.ru/schema/cdm/registry/ws-definitions/v2">
<dt:subProductList count="3" total="946" offset="0">
<dt:subProduct>
<bs:uuid>c51f5855-ea43-116e-3a5b-f7dcd2766d8a</bs:uuid>
<bs:guid>2160cc9f-0380-6200-dce9-0f0b3c86a8aa</bs:guid>
<bs:active>false</bs:active>
<bs:last>false</bs:last>
<bs:status>100</bs:status>
<bs:createDate>2008-01-01T00:00:00+03:00</bs:createDate>
<bs:updateDate>2016-11-11T14:03:00+03:00</bs:updateDate>
<bs:next>619e5808-3262-4c19-aaa3-77ce377524ee</bs:next>
<dt:name>молочная паста</dt:name>
<dt:code>0405</dt:code>
<dt:productGuid>686b55f7-c199-9788-5ee5-a755eb2b8d2a</dt:productGuid>
</dt:subProduct>
<dt:subProduct>
<bs:uuid>6d71c9e1-3cf4-2afb-9d9a-75ea2ab95a12</bs:uuid>
<bs:guid>c847eca1-641f-24e7-a44a-c71c28fb377f</bs:guid>
<bs:active>false</bs:active>
<bs:last>false</bs:last>
<bs:status>100</bs:status>
<bs:createDate>2008-01-01T00:00:00+03:00</bs:createDate>
<bs:updateDate>2017-03-10T10:06:36+03:00</bs:updateDate>
<bs:next>4a6238db-dda6-4b51-8910-6d1cc6e63d69</bs:next>
<dt:name>икра лососевых пород рыб мороженая соленая</dt:name>
<dt:code>1604</dt:code>
<dt:productGuid>46fde18a-f6af-f7b0-de47-044281271112</dt:productGuid>
</dt:subProduct>
<dt:subProduct>
<bs:uuid>b694de27-45e0-ea26-c936-684f7db0dfd4</bs:uuid>
<bs:guid>799e561f-4228-9bd5-fa45-11a6db084dfc</bs:guid>
<bs:active>false</bs:active>
<bs:last>false</bs:last>
<bs:status>100</bs:status>
<bs:createDate>2009-11-17T14:45:40+03:00</bs:createDate>
<bs:updateDate>2016-11-11T14:03:00+03:00</bs:updateDate>
<bs:next>097c5951-aae6-4e1a-9152-cca3f9f8d295</bs:next>
<dt:name>белок молочный сухой</dt:name>
<dt:code>3504</dt:code>
<dt:productGuid>686b55f7-c199-9788-5ee5-a755eb2b8d2a</dt:productGuid>
</dt:subProduct>
</dt:subProductList>
</v2:getSubProductChangesListResponse>
</soap:Body>
</soapenv:Envelope>