Wiki-Quellcode von plan_sequence.php
Version 2.1 von Dominic Lippmann am 2025/01/20 15:36
Zeige letzte Bearbeiter
author | version | line-number | content |
---|---|---|---|
1 | (% class="box" %) | ||
2 | (((Inhaltsverzeichnis))) | ||
3 | {{toc/}} | ||
4 | |||
5 | Funktion zur Wegoptimierung (nur für Kunden mit PTV als Kartenanbieter bzw. Kunden welche die Multi Karten Option gebucht haben) | ||
6 | |||
7 | = Beschreibung = | ||
8 | **(% class="blue mark" %)POST(%%) plan_sequence.php?****company**=//COMPANY_RTIKEY//**&vehicle**=//VEHICLE_RTIKEY//**&profile=**truck**&points=points_json_array** | ||
9 | = Parameters = | ||
10 | |=Parameter|=Beschreibung|=Typ|=Hinweis|=Pflicht | ||
11 | |company|RTI Firmenschlüssel|string||ja | ||
12 | |vehicle|RTI Fahrzeugschlüssel|string|Es muss immer einer der Parameter vehicle, group oder import angegeben werden!|(ja) | ||
13 | |group|RTI Gruppenschlüssel|string|Es muss immer einer der Parameter vehicle, group oder import angegeben werden!|(ja) | ||
14 | |import|RTI Importschlüssel (alle Fahrzeuge)|string|Es muss immer einer der Parameter vehicle, group oder import angegeben werden!|(ja) | ||
15 | |profile|((( | ||
16 | * truck | ||
17 | * car | ||
18 | )))|string|Standard ist "car"|nein | ||
19 | |points|Die Aufträge/ Anfahrtsziele welche optimiert werden sollen|json-array|Beschreibung siehe points_json_array|ja | ||
20 | |||
21 | === **points_json_array** === | ||
22 | |=Parameter|=Beschreibung|=Typ|=Hinweis|=Pflicht | ||
23 | |id||int||ja | ||
24 | |lat|Latitude des punktes|double||ja | ||
25 | |lon|Longitude des punktes|double||ja | ||
26 | |meta||string||nein | ||
27 | |type|((( | ||
28 | * start | ||
29 | * end | ||
30 | )))|string|damit kann man den Start und/oder das Ende festlegen|nein | ||
31 | |||
32 | = Rückgabe = | ||
33 | Es wird ein **String** zurückgegeben. Bei Erfolg wird als Antwort "**OK**" zurückgegeben. Ansonsten wird ein "(% class="error" %)**ERROR:Beschreibung**(%%)" zurückgegeben | ||
34 | == JSON Format == | ||
35 | |=Parameter|=Beschreibung|=Typ | ||
36 | |id|übergebene id|int | ||
37 | |type|"start", "end" oder ""|string | ||
38 | |lat|Latitude|float | ||
39 | |lon|Longitude|float | ||
40 | |meta|übergeben Meta Beschreibung|string | ||
41 | |||
42 | **Beispiel** | ||
43 | {{code language="js"}}{ | ||
44 | [ | ||
45 | { | ||
46 | "id": 1, | ||
47 | "type": "start", | ||
48 | "lat": 51.0311742, | ||
49 | "lon": 13.6034718, | ||
50 | "meta": "YF" | ||
51 | }, | ||
52 | { | ||
53 | "id": 3, | ||
54 | "type": "", | ||
55 | "lat": 51.042972, | ||
56 | "lon": 13.794998, | ||
57 | "meta": "Dresden" | ||
58 | }, | ||
59 | { | ||
60 | "id": 2, | ||
61 | "type": "", | ||
62 | "lat": 51.268333, | ||
63 | "lon": 14.326741, | ||
64 | "meta": "Neschwitz" | ||
65 | }, | ||
66 | { | ||
67 | "id": 4, | ||
68 | "type": "", | ||
69 | "lat": 51.305518, | ||
70 | "lon": 13.295992, | ||
71 | "meta": "Riesa" | ||
72 | }, | ||
73 | { | ||
74 | "id": 5, | ||
75 | "type": "end", | ||
76 | "lat": 51.0311742, | ||
77 | "lon": 13.6034718, | ||
78 | "meta": "YF" | ||
79 | } | ||
80 | ] | ||
81 | }{{/code}} | ||
82 | |||
83 | = Beispiele = | ||
84 | **Mit festem Start und Ende** | ||
85 | {{code language="java"}}https://map.yellowfox.de/rti/plan_sequence.php?company=COMPANY_RTIKEY&vehicle=VEHICLE_RTIKEY&profile=truck&points=[{"id":1,"meta":"YF","lat":51.0311742,"lon":13.6034718,"type":"start"},{"id":2,"meta":"Neschwitz","lat":51.268333,"lon":14.326741},{"id":3,"meta":"Dresden","lat":51.042972,"lon":13.794998},{"id":4,"meta":"Riesa","lat":51.305518,"lon":13.295992},{"id":5,"meta":"YF","lat":51.0311742,"lon":13.6034718,"type":"end"}] | ||
86 | |||
87 | https://map.yellowfox.de/rti/plan_sequence.php?company=COMPANY_RTIKEY&vehicle={"type":"car_ident","groupKey":"GROUP_RTIKEY","ident":"VEHICLE_IDENT"}&profile=truck&points=[{"id":1,"meta":"YF","lat":51.0311742,"lon":13.6034718,"type":"start"},{"id":2,"meta":"Neschwitz","lat":51.268333,"lon":14.326741},{"id":3,"meta":"Dresden","lat":51.042972,"lon":13.794998},{"id":4,"meta":"Riesa","lat":51.305518,"lon":13.295992},{"id":5,"meta":"YF","lat":51.0311742,"lon":13.6034718,"type":"end"}]{{/code}} | ||
88 | |||
89 | **Ohne feste Punkte** | ||
90 | {{code language="java"}}https://map.yellowfox.de/rti/plan_sequence.php?company=COMPANY_RTIKEY&vehicle=VEHICLE_RTIKEY&profile=truck&points=[{"id":1,"meta":"YF","lat":51.0311742,"lon":13.6034718},{"id":2,"meta":"Neschwitz","lat":51.268333,"lon":14.326741},{"id":3,"meta":"Dresden","lat":51.042972,"lon":13.794998},{"id":4,"meta":"Riesa","lat":51.305518,"lon":13.295992},{"id":5,"meta":"YF","lat":51.0311742,"lon":13.6034718}] | ||
91 | |||
92 | https://map.yellowfox.de/rti/plan_sequence.php?company=COMPANY_RTIKEY&vehicle={"type":"car_ident","groupKey":"GROUP_RTIKEY","ident":"VEHICLE_IDENT"}&profile=truck&points=[{"id":1,"meta":"YF","lat":51.0311742,"lon":13.6034718},{"id":2,"meta":"Neschwitz","lat":51.268333,"lon":14.326741},{"id":3,"meta":"Dresden","lat":51.042972,"lon":13.794998},{"id":4,"meta":"Riesa","lat":51.305518,"lon":13.295992},{"id":5,"meta":"YF","lat":51.0311742,"lon":13.6034718}]{{/code}} | ||
93 | |||
94 | **Mit festem Startpunkt** | ||
95 | {{code language="java"}}https://map.yellowfox.de/rti/plan_sequence.php?company=COMPANY_RTIKEY&vehicle=VEHICLE_RTIKEY&profile=truck&points=[{"id":1,"meta":"YF","lat":51.0311742,"lon":13.6034718,"type":"start"},{"id":2,"meta":"Neschwitz","lat":51.268333,"lon":14.326741},{"id":3,"meta":"Dresden","lat":51.042972,"lon":13.794998},{"id":4,"meta":"Riesa","lat":51.305518,"lon":13.295992},{"id":5,"meta":"YF","lat":51.0311742,"lon":13.6034718}] | ||
96 | |||
97 | https://map.yellowfox.de/rti/plan_sequence.php?company=COMPANY_RTIKEY&vehicle={"type":"car_ident","groupKey":"GROUP_RTIKEY","ident":"VEHICLE_IDENT"}&profile=truck&points=[{"id":1,"meta":"YF","lat":51.0311742,"lon":13.6034718,"type":"start"},{"id":2,"meta":"Neschwitz","lat":51.268333,"lon":14.326741},{"id":3,"meta":"Dresden","lat":51.042972,"lon":13.794998},{"id":4,"meta":"Riesa","lat":51.305518,"lon":13.295992},{"id":5,"meta":"YF","lat":51.0311742,"lon":13.6034718}]{{/code}} | ||
98 | |||
99 | **Mit festem Endpunkt** | ||
100 | {{code language="java"}}https://map.yellowfox.de/rti/plan_sequence.php?company=COMPANY_RTIKEY&vehicle=VEHICLE_RTIKEY&profile=truck&points=[{"id":1,"meta":"YF","lat":51.0311742,"lon":13.6034718},{"id":2,"meta":"Neschwitz","lat":51.268333,"lon":14.326741},{"id":3,"meta":"Dresden","lat":51.042972,"lon":13.794998},{"id":4,"meta":"Riesa","lat":51.305518,"lon":13.295992},{"id":5,"meta":"YF","lat":51.0311742,"lon":13.6034718,"type":"end"}] | ||
101 | |||
102 | https://map.yellowfox.de/rti/plan_sequence.php?company=COMPANY_RTIKEY&vehicle={"type":"car_ident","groupKey":"GROUP_RTIKEY","ident":"VEHICLE_IDENT"}&profile=truck&points=[{"id":1,"meta":"YF","lat":51.0311742,"lon":13.6034718},{"id":2,"meta":"Neschwitz","lat":51.268333,"lon":14.326741},{"id":3,"meta":"Dresden","lat":51.042972,"lon":13.794998},{"id":4,"meta":"Riesa","lat":51.305518,"lon":13.295992},{"id":5,"meta":"YF","lat":51.0311742,"lon":13.6034718,"type":"end"}]{{/code}} | ||
103 | |||
104 | = Fehler = | ||
105 | |=Fehler|=Beschreibung | ||
106 | |ERROR:PTV_OR_MULTI_MAP_IS_REQUIRED|Sie brauchen PTV als Kartenanbieter bzw. die kostenpflichtige Option "Mulit Karte", bitte wenden Sie sich an unseren Vertrieb | ||
107 | |ERROR:NO_CAR_IN_MIN_BUSINESS_TARIFF|Es muss mind. 1 Fahrzeug einen Business Tarif oder höher haben | ||
108 | |ERROR:NOT_POINTS_GIVEN|Keine Punkte übergeben | ||
109 | |ERROR:INVALID_POINTS|Es ist kein Array an Punkten | ||
110 |