GetPurposeChangesList v2.0: различия между версиями
Строка 118: | Строка 118: | ||
! Тип | ! Тип | ||
! Обязат. | ! Обязат. | ||
! Описание | ! Описание (нажмите [...] для отображения дополнительного описания) | ||
|- | |- | ||
| | |001 | ||
|style="font-weight: | |style="font-weight: ; font-family: Courier;" |{{color|#190dbf|'''<ws:getPurposeChangesListResponse>'''}} | ||
| | | | ||
| | | | ||
| style="width:52em;"| | |||
|style=" | |||
|- | |- | ||
| | |002 | ||
|style="font-weight: | |style="font-weight: ; font-family: Courier;" |···{{color|#190dbf|'''<{{color|#660e7a|dt:}}purposeList {{color|Red|total=}}{{color|#007f15|"2"}} {{color|Red|offset=}}{{color|#007f15|"0"}} {{color|Red|count=}}{{color|#007f15|"2"}}>'''}} | ||
|[[PurposeList_v2.0|dt:PurposeList]] | |[[PurposeList_v2.0|dt:PurposeList]] | ||
|[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:}}purpose>'''}} | ||
|[[Purpose_v2.0|dt:Purpose]] | |[[Purpose_v2.0|dt:Purpose]] | ||
|[0..*] | |[0..*] | ||
| style="width:52em;"| Назначение груза. | |||
|style=" | |||
|- | |- | ||
| | |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:}}purpose>'''}} | ||
| | | | ||
| | | | ||
|style=" | | style="width:52em;"| | ||
|- | |- | ||
| | |015 | ||
|style="font-weight: | |style="font-weight: ; font-family: Courier;" |···{{color|#190dbf|'''</{{color|#660e7a|dt:}}purposeList>'''}} | ||
| | | | ||
| | | | ||
|style=" | | style="width:52em;"| | ||
|- | |- | ||
| | |016 | ||
|style="font-weight: | |style="font-weight: ; font-family: Courier;" |{{color|#190dbf|'''</ws:getPurposeChangesListResponse>'''}} | ||
| | | | ||
| | | | ||
|style=" | | style="width:52em;"| | ||
|- | |- | ||
|} | |} |
Текущая версия на 22:59, 10 октября 2020
Общие сведения
Операция GetPurposeChangesList предназначена для получения списка изменённых записей о назначениях груза за период времени. В список попадают записи, дата изменения которых попадает в интервал, указанный в запросе. Записи в списке могут быть не последними и/или не актуальными (last=false, active=false). Выполнение операции заканчивается либо возвратом списка назначений груза, либо ошибкой, в случае если параметры запроса не корректны или произошла иная ошибка выполнения запроса.
Входные данные
- параметры выводимого списка;
- интервал дат, за за который запрашиваются изменения.
Выходные данные
- список назначений груза за указанный период времени.
Спецификация запроса
# | Название XML-элемента | Тип | Обязат. | Описание (нажмите [...] для отображения дополнительного описания) |
---|---|---|---|---|
001 | <ws:getPurposeChangesListRequest> | |||
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 | [1..1] | Конец временного интервала. |
009 | ···</bs:updateDateInterval> | |||
010 | </ws:getPurposeChangesListRequest> |
Спецификация ответа
# | Название XML-элемента | Тип | Обязат. | Описание (нажмите [...] для отображения дополнительного описания) |
---|---|---|---|---|
001 | <ws:getPurposeChangesListResponse> | |||
002 | ···<dt:purposeList total="2" offset="0" count="2"> | dt:PurposeList | [1..1] | Список назначений груза.
|
003 | ······<dt:purpose> | dt:Purpose | [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:purpose> | |||
015 | ···</dt:purposeList> | |||
016 | </ws:getPurposeChangesListResponse> |
Описание ошибок
Ошибка | Описание |
---|---|
InternalServiceFault | Внутренняя ошибка сервиса. |
IncorrectRequestFault | Некорректный запрос. Происходит в случае, если запрос не соответствует требованиям указанным в xsd. |
OffsetOutOfRangeFault | Заданный в запросе отступ больше числа записей в результате запроса. |
Пример запроса
Запрос списка назначений груза, измененных за период с 01.01.2017 по текущий день. Вывод первых трёх элементов без смещения.
<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:getPurposeChangesListRequest>
<bs:listOptions>
<bs:count>3</bs:count>
<bs:offset>0</bs:offset>
</bs:listOptions>
<bs:updateDateInterval>
<bs:beginDate>2017-01-01T00:00:00</bs:beginDate>
</bs:updateDateInterval>
</ws:getPurposeChangesListRequest>
</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:getPurposeChangesListResponse 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:purposeList count="3" total="6" offset="0">
<dt:purpose>
<bs:uuid>0323de5e-93b8-4fc0-9f15-4d527a3def84</bs:uuid>
<bs:guid>f42993b3-7957-4150-8460-513d4ce9868f</bs:guid>
<bs:active>true</bs:active>
<bs:last>true</bs:last>
<bs:status>100</bs:status>
<bs:createDate>2017-01-27T16:00:00+03:00</bs:createDate>
<bs:updateDate>2017-01-27T16:00:00+03:00</bs:updateDate>
<dt:name>для реализации в корм животным</dt:name>
</dt:purpose>
<dt:purpose>
<bs:uuid>37053e69-1ccf-4f9a-bba8-772c0b00372b</bs:uuid>
<bs:guid>96de622d-2cb2-424a-888b-7ced5225ce17</bs:guid>
<bs:active>true</bs:active>
<bs:last>true</bs:last>
<bs:status>100</bs:status>
<bs:createDate>2017-01-27T16:00:00+03:00</bs:createDate>
<bs:updateDate>2017-01-27T16:00:00+03:00</bs:updateDate>
<dt:name>для реализации в пищу людям</dt:name>
</dt:purpose>
<dt:purpose>
<bs:uuid>ff937126-0b6f-4791-9250-1d952c3edff9</bs:uuid>
<bs:guid>48537f9f-5976-4a1d-823d-609deb0aa051</bs:guid>
<bs:active>true</bs:active>
<bs:last>true</bs:last>
<bs:status>100</bs:status>
<bs:createDate>2017-01-27T16:00:00+03:00</bs:createDate>
<bs:updateDate>2017-01-27T16:00:00+03:00</bs:updateDate>
<dt:name>переработка в корм животным</dt:name>
</dt:purpose>
</dt:purposeList>
</v2:getPurposeChangesListResponse>
</soap:Body>
</soapenv:Envelope>