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