В ответах запросов после тэга Table теперь идет дополнительный тэг ExternalProps, который отвечает за свойства внешних заказов и выглядит следующим образом:
<ExternalProps>
<Prop name="101" value="уникальный номер заказа"/>
</ExternalProps>
<?xml version="1.0" encoding="windows-1251"?><RK7Query><RK7CMD CMD="GetSystemInfo"/></RK7Query>
Ответ
<?xml version="1.0" encoding="UTF-8"?>
<XML>
<Result>Ok</Result>
<Error />
<Remark />
<Data>
<RK7 TheatreID="76">
<RK7QueryResult ServerVersion="7.5.6.55" XmlVersion="225" NetName="MID_PREMIERA" Status="Ok" CMD="GetSystemInfo" ErrorText="" DateTime="2016-10-11T15:02:06" WorkTime="0" Processed="1">
<SystemInfo SystemTime="3685359726617" ReqSysVer="2" NetName="MID_PREMIERA" ProcessID="4008" CashServerVersion="7.5.6.55" ShiftDate="20161010" RestCode="199999999">
<BusinessPeriod id="0" code="0" />
<CashGroup id="15001" name="MID_PREMIERA" />
<Restaurant id="1" code="9999" name="TEST_PREMIERA" />
</SystemInfo>
</RK7QueryResult>
</RK7>
</Data>
</XML>
<RK7Query><RK7CMD CMD="GetRefData" RefName="CASHES" OnlyActive="1"/></RK7Query>
Ищем MainParentIdent="<CashGroup id>" (из предыдущего запроса) для поиска станций кассиров, относящихся к этому ресторану. (Здесь по "CashGroup id = 15018" в MainParentIdent находим "Item Ident = 15005")
Ответ
<?xml version="1.0" encoding="UTF-8"?>
<XML>
<Result>Ok</Result>
<Error />
<Remark />
<Data>
<RK7 TheatreID="76">
<RK7QueryResult ServerVersion="7.5.6.55" XmlVersion="225" NetName="MID_PREMIERA" Status="Ok" CMD="GetRefData" ErrorText="" DateTime="2016-10-11T15:48:49" WorkTime="0" Processed="1">
<RK7Reference DataVersion="63" ClassName="TCashesList" Name="CASHES" MinIdent="1" MaxIdent="0" ViewRight="0" UpdateRight="62" ChildRight="62" DeleteRight="62" XMLExport="true" XMLMask="*" LeafCollectionCount="1">
<Items>
<Item Ident="15002" ItemIdent="15002" SourceIdent="0" GUIDString="{1BB682B8-67F1-4DE8-BFE1-300D32D366F9}" AssignChildsOnServer="false" ActiveHierarchy="true" Name="Универсальная Касса" AltName="" Code="1" MainParentIdent="15001" Status="rsActive" NetName="ST01" Resolution="5" Colors="cdTrueColor" RightLvl="0" OSType="ostWindows" STType="sttCash" DefHallPlanID="0" FileManagerPath="" WaitDataSended="false" AfterShiftClosure="ascContinue" SyncStatesFlags="[ssfAutoSelfUpdate, ssfSyncReferences, ssfWorkModulesDBs, ssfSendShiftsData, ssfSendOnLineData]" DataSendTimeout="0" AutoSelfUpdate="true" GraphicParameters="[]">
<ConfigList ClassName="TCashConfList">
<Items>
<Item Ident="0" FileName="CinemaSw.dll" ModIdent="0" Number="0" HostName="" HostNum="0" ModClass="2120" Flags="392">
<Params ClassName="TCashParamList">
<Items>
<Item Ident="1" ValInt="444" ValStr="" ValBlb="" />
</Items>
</Params>
</Item>
<Item Ident="0" FileName="ComWin.dll" ModIdent="0" Number="0" HostName="" HostNum="0" ModClass="1110" Flags="131462">
<Params ClassName="TCashParamList">
<Items>
<Item Ident="2" ValInt="1" ValStr="" ValBlb="" />
</Items>
</Params>
</Item>
<Item Ident="0" FileName="cvSBplt.dll" ModIdent="1" Number="0" HostName="" HostNum="0" ModClass="2130" Flags="9088">
<Params ClassName="TCashParamList">
<Items>
<Item Ident="0" ValInt="5" ValStr="" ValBlb="" />
<Item Ident="2" ValInt="0" ValStr="D:\personal\RK7\Cash\SBRF" ValBlb="" />
</Items>
</Params>
</Item>
<Item Ident="0" FileName="graphwin.dll" ModIdent="0" Number="0" HostName="" HostNum="0" ModClass="1100" Flags="404">
<Params ClassName="TCashParamList">
<Items />
</Params>
</Item>
<Item Ident="0" FileName="iTCPXML.dll" ModIdent="1" Number="0" HostName="" HostNum="0" ModClass="2120" Flags="384">
<Params ClassName="TCashParamList">
<Items>
<Item Ident="0" ValInt="2244" ValStr="" ValBlb="" />
<Item Ident="4" ValInt="1000" ValStr="" ValBlb="" />
<Item Ident="5" ValInt="0" ValStr="DeliveryGetOrderList;GetRefData;GetSystemInfo" ValBlb="" />
</Items>
</Params>
</Item>
<Item Ident="0" FileName="KbdEmuw.dll" ModIdent="0" Number="0" HostName="" HostNum="0" ModClass="1110" Flags="65930">
<Params ClassName="TCashParamList">
<Items />
</Params>
</Item>
<Item Ident="0" FileName="MC_KBD.dll" ModIdent="0" Number="0" HostName="KbdEmuw.dll" HostNum="0" ModClass="1150" Flags="138">
<Params ClassName="TCashParamList">
<Items />
</Params>
</Item>
<Item Ident="0" FileName="smint.dll" ModIdent="0" Number="0" HostName="" HostNum="0" ModClass="1210" Flags="908">
<Params ClassName="TCashParamList">
<Items>
<Item Ident="5" ValInt="0" ValStr="" ValBlb="" />
<Item Ident="7" ValInt="0" ValStr="" ValBlb="" />
<Item Ident="8" ValInt="0" ValStr="" ValBlb="" />
<Item Ident="9" ValInt="0" ValStr="" ValBlb="" />
<Item Ident="10" ValInt="0" ValStr="" ValBlb="" />
<Item Ident="12" ValInt="1798" ValStr="" ValBlb="" />
<Item Ident="13" ValInt="200" ValStr="" ValBlb="" />
<Item Ident="14" ValInt="250" ValStr="" ValBlb="" />
<Item Ident="15" ValInt="668" ValStr="" ValBlb="" />
<Item Ident="21" ValInt="200" ValStr="" ValBlb="" />
<Item Ident="22" ValInt="40" ValStr="" ValBlb="" />
</Items>
</Params>
</Item>
</Items>
</ConfigList>
<Rights>
<Data BinaryCoding="Base64Text">////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
////////////////////</Data>
</Rights>
<PrinterAssigns ClassName="TPrinterAssigns">
<Items>
<Item Ident="1" Printer="107" />
<Item Ident="2" Printer="107" />
<Item Ident="3" Printer="107" />
<Item Ident="8" Printer="1000125" />
</Items>
</PrinterAssigns>
<Childs ClassName="tChildCollection">
<Child ChildIdent="1000119" IsTerminal="1" />
<Child ChildIdent="1000120" IsTerminal="1" />
<Child ChildIdent="1000125" IsTerminal="1" />
</Childs>
</Item>
<Item Ident="15004" ItemIdent="15004" SourceIdent="0" GUIDString="{B64A7AE5-9AAB-40E2-B010-879939BB2EC9}" AssignChildsOnServer="false" ActiveHierarchy="true" Name="Выдача Заказа" AltName="" Code="2" MainParentIdent="15003" Status="rsActive" NetName="ST02" Resolution="5" Colors="cdTrueColor" RightLvl="0" OSType="ostWindows" STType="sttCash" DefHallPlanID="0" FileManagerPath="" WaitDataSended="false" AfterShiftClosure="ascContinue" SyncStatesFlags="[ssfAutoSelfUpdate, ssfSyncReferences, ssfWorkModulesDBs, ssfSendShiftsData, ssfSendOnLineData]" DataSendTimeout="0" AutoSelfUpdate="true" GraphicParameters="[]">
<ConfigList ClassName="TCashConfList">
<Items>
<Item Ident="0" FileName="graphwin.dll" ModIdent="0" Number="0" HostName="" HostNum="0" ModClass="1100" Flags="404">
<Params ClassName="TCashParamList">
<Items />
</Params>
</Item>
</Items>
</ConfigList>
<Rights>
<Data BinaryCoding="Base64Text">////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
////////////////////</Data>
</Rights>
<PrinterAssigns ClassName="TPrinterAssigns">
<Items>
<Item Ident="1" Printer="107" />
<Item Ident="2" Printer="107" />
<Item Ident="3" Printer="107" />
</Items>
</PrinterAssigns>
<Childs ClassName="tChildCollection" />
</Item>
</Items>
</RK7Reference>
</RK7QueryResult>
</RK7>
</Data>
</XML>
<RK7Query><RK7CMD CMD="GetRefData" RefName="HALLPLANS" OnlyActive="1"/></RK7Query>
Ищем MainParentIdent="<Restaurant id>" (из запроса "GetSystemInfo") для поиска залов, относящихся к этому ресторану. (Здесь "Restaurant id = 1" в MainParentIdent находим нужный Ident, например "Item Ident = 1034812")
Ответ
<?xml version="1.0" encoding="UTF-8"?>
<XML>
<Result>Ok</Result>
<Error />
<Remark />
<Data>
<RK7 TheatreID="76">
<RK7QueryResult ServerVersion="7.5.6.55" XmlVersion="225" NetName="MID_PREMIERA" Status="Ok" CMD="GetRefData" ErrorText="" DateTime="2016-10-11T15:50:44" WorkTime="0" Processed="1">
<RK7Reference BlobNames="Dfm,OrdImg04,OrdImg24,ServImg" DataVersion="8" ClassName="THallPlans" Name="HALLPLANS" MinIdent="1" MaxIdent="0" ViewRight="0" UpdateRight="52" ChildRight="53" DeleteRight="52" XMLExport="true" XMLMask="*" LeafCollectionCount="1">
<Items>
<Item Ident="1000011" ItemIdent="1000011" SourceIdent="0" GUIDString="{946D72DD-8407-4690-BDC7-D17651B501B4}" AssignChildsOnServer="false" ActiveHierarchy="true" Code="9999" Name="Тест План" AltName="" MainParentIdent="1" Status="rsActive" VisualType_Image="0" VisualType_BColor="536870911" VisualType_TextColor="536870911" VisualType_Flags="bsPictureTop" EditRight="0" RightLvl="0" ServingPosition="0" VisualType_TZColor="536870911" ServedAtCashServer="0">
<Items ClassName="THallPlanItems">
<Items />
</Items>
<Childs ClassName="tChildCollection">
<Child ChildIdent="1000012" IsTerminal="1" />
<Child ChildIdent="1000013" IsTerminal="1" />
</Childs>
</Item>
</Items>
</RK7Reference>
</RK7QueryResult>
</RK7>
</Data>
</XML>
<RK7Query><RK7CMD CMD="GetRefData" RefName="TABLES" OnlyActive="1"/></RK7Query>
Ищем MainParentIdent="<Item Ident>" (из запроса "HALLPLANS") для поиска столов, относящихся к этому залу. (Здесь "Item Ident = 1034812" в MainParentIdent находим нужный Ident, например "Item Ident = 1038421")
Ответ
<?xml version="1.0" encoding="UTF-8"?>
<XML>
<Result>Ok</Result>
<Error />
<Remark />
<Data>
<RK7 TheatreID="76">
<RK7QueryResult ServerVersion="7.5.6.55" XmlVersion="225" NetName="MID_PREMIERA" Status="Ok" CMD="GetRefData" ErrorText="" DateTime="2016-10-11T15:51:43" WorkTime="0" Processed="1">
<RK7Reference DataVersion="3" ClassName="Trk7Tables" Name="TABLES" MinIdent="1" MaxIdent="0" ViewRight="0" UpdateRight="53" ChildRight="53" DeleteRight="53" XMLExport="true" XMLMask="*">
<Items>
<Item Ident="1000012" ItemIdent="1000012" SourceIdent="0" GUIDString="{24AB0C90-7D1C-4F2D-A144-70F04F7669AC}" AssignChildsOnServer="false" ActiveHierarchy="true" Code="9999" Name="1" MainParentIdent="1000011" Status="rsActive" VisualType_Image="41" VisualType_BColor="536870911" VisualType_TextColor="536870911" VisualType_Flags="bsPictureTop" ServingPosition="0" TableGroup="0" Hall="1000011" RightLvl="0" DoserDevice="0" HallPlanItemKind="pikTable" TableUseKind="tukNone" MaxGuests="99" ButtonNum="1" PagerMsgNum="1" DeviceFlags="[rdfShutDownOnLimitExceeded]" LogDevice="0" Tariff="0" MaxDeviceTime="0" OnOffInterval="0" Lane="0" UserAttribute1="" UserAttribute2="" UserAttribute3="" ShutDownOnLimitExceeded="true" UseDeviceAsTable="false" AllowReservation="true">
<TableAttributes ClassName="TTableAttributesAssigns">
<Items />
</TableAttributes>
<Childs ClassName="tChildCollection" />
</Item>
<Item Ident="1000013" ItemIdent="1000013" SourceIdent="0" GUIDString="{7001DACC-1224-46FA-ADFC-AC488610DF2A}" AssignChildsOnServer="false" ActiveHierarchy="true" Code="10000" Name="2" MainParentIdent="1000011" Status="rsActive" VisualType_Image="41" VisualType_BColor="536870911" VisualType_TextColor="536870911" VisualType_Flags="bsPictureTop" ServingPosition="0" TableGroup="0" Hall="1000011" RightLvl="0" DoserDevice="0" HallPlanItemKind="pikTable" TableUseKind="tukNone" MaxGuests="99" ButtonNum="2" PagerMsgNum="2" DeviceFlags="[rdfShutDownOnLimitExceeded]" LogDevice="0" Tariff="0" MaxDeviceTime="0" OnOffInterval="0" Lane="0" UserAttribute1="" UserAttribute2="" UserAttribute3="" ShutDownOnLimitExceeded="true" UseDeviceAsTable="false" AllowReservation="true">
<TableAttributes ClassName="TTableAttributesAssigns">
<Items />
</TableAttributes>
<Childs ClassName="tChildCollection" />
</Item>
</Items>
</RK7Reference>
</RK7QueryResult>
</RK7>
</Data>
</XML>
<RK7Query><RK7CMD CMD="GetRefData" RefName="ROLES" OnlyActive="1"/></RK7Query>
Ищем MainParentIdent="<Restaurant id>" (из запроса "GetSystemInfo") для поиска ролей, относящихся к этому ресторану. (Здесь "Restaurant id = 1" в MainParentIdent находим нужный Ident, например "Item Ident = 100004")
Ответ в GetRKQuery_ROLES.xml
<RK7Query><RK7CMD CMD="GetRefData" RefName="EMPLOYEES" OnlyActive="1"/></RK7Query>
Ищем MainParentIdent="<ROLE id>" (из запроса "GetSystemInfo") для поиска ролей, относящихся к этому ресторану. (Здесь "Item Ident = 100004" в MainParentIdent находим нужный Ident, например "Item Ident = 1000006")
Ответ в GetRKQuery_EMPLOYEES.xml
<RK7Query><RK7CMD CMD="GetRefData" RefName="MenuItems" OnlyActive="1" WithMacroProp="1" PropMask="Items.GUIDString,Items.Ident,Items.Name,Items.SaleObjectType" /></RK7Query>
Ответ в GetRKQuery_MENU.xml
<RK7Query><RK7CMD CMD="GETORDERMENU" OnlyActive="1"><Station id="15005"/><Waiter id="1000006"/><Table id="1038421"/></RK7CMD></RK7Query>
Ответ в GetRKQuery_GETORDERMENU.xml
<RK7Query><RK7CMD CMD="CREATEORDER"><Order persistentComment="Test Comment"><ExtSource source="101" extID="уникальный номер заказа"/><Station id="15005"/><Waiter id="1000006"/><Table id="1038421"/></Order></RK7CMD></RK7Query>
Ответ в GetRKQuery_CREATEORDER.xml
<RK7Query><RK7CMD CMD="SAVEORDER"><Order guid="{745C4215-79A0-45BF-AABF-AB0C376E972D}"/><Session><Station id="15005"/><Dish id="1166885" quantity="1000"/><Dish id="1166894" quantity="1000" price="30000"/></Session></RK7CMD></RK7Query>
Ответ в GetRKQuery_SAVEORDER.xml
<RK7Query><RK7CMD CMD="GetRefData" RefName="CURRENCIES" OnlyActive="1"/></RK7Query>
Ответ в GetRKQuery_CURRENCIES.xml
<RK7Query><RK7CMD CMD="GetRefData" RefName="DEPOSITCOLLECTREASONS" /></RK7Query>
Ответ в GetRKQuery_DEPOSITCOLLECTREASONS.xml
<RK7Query><RK7CMD CMD="SAVEORDER"> <Order guid="{745C4215-79A0-45BF-AABF-AB0C376E972D}"/><Session><Station id="15005"/><Prepay id="1" amount="100"><Reason id="1038423"/></Prepay></Session></RK7CMD></RK7Query>
Ответ в GetRKQuery_PREPAY.xml
<RK7Query><RK7CMD CMD="GetRefData" RefName="ORDERVOIDS" OnlyActive="1"/></RK7Query>
Ответ в GetRKQuery_ORDERVOIDS.xml
<RK7Query><RK7Command CMD="GETORDER"><Order guid="{745C4215-79A0-45BF-AABF-AB0C376E972D}"/></RK7Command></RK7Query>
Ответ в GetRKQuery_GETORDER.xml
<RK7Query><RK7CMD CMD="SAVEORDER"><Order guid="{745C4215-79A0-45BF-AABF-AB0C376E972D}" /><Session uni="1"><Station id="15005"/><Dish uni="2"><Void id="1" quantity="1000"/></Dish><Dish uni="3"><Void id="1" quantity="2000"/></Dish></Session></RK7CMD></RK7Query>
Ответ в GetRKQuery_DELETEFROMORDER.xml
<RK7Query><RK7CMD CMD="SAVEORDER"><Order guid="{745C4215-79A0-45BF-AABF-AB0C376E972D}" /><Session uni="101"><Station id="15005"/><Prepay uni="302" deleted="1" Code="1"><Void id="1" quantity="1000"/></Prepay></Session></RK7CMD></RK7Query>
Ответ в GetRKQuery_DELETEPREPAY.xml
<RK7Query><RK7CMD CMD="CLOSEVISIT" VisitID="401606888"/></RK7Query>
Ответ в GetRKQuery_CLOSEVISIT.xml
ServiceID=1&QueryCode=GetRKQuery&Theatres=2&Encoding=Windows-1251&Version=3&RKQuery=<RK7Query><RK7CMD
CMD="GETORDERMENU" OnlyActive="1"><Station
id="15018"/><Waiter id="9002"/><Table
id="1012278"/></RK7CMD></RK7Query>
GetRKQuery_DEPOSITCOLLECTREASONS.xml