Changes for page get_personnel.php

Last modified by YellowFox_RD on 2025/01/23 10:16

From version 2.1
edited by Dominic Lippmann
on 2025/01/23 10:14
Change comment: There is no comment for this version
To version 1.1
edited by YellowFox_RD
on 2024/12/19 10:11
Change comment: Imported from XAR

Summary

Details

Page properties
Author
... ... @@ -1,1 +1,1 @@
1 -XWiki.yf-dominic
1 +XWiki.YellowFox_RD
Content
... ... @@ -1,32 +1,28 @@
1 1  (% class="box" %)
2 -(((
3 -Table of Contents
4 -)))
5 -
2 +(((Table of Contents)))
6 6  {{toc/}}
7 7  
8 8  Getting data for personnel set in personnel administration
9 -
10 -= Description =
11 -
12 -(% class="green mark" %)//**GET**//(%%)//** get_personnel.php?company**=RTI_COMPANYKEY**&import**=RTI_VEHICLEKEY&**format=**csv//
13 -
6 +=== Description ===
7 +//**(% class="green mark" %)GET(%%) get_personnel.php?company**=RTI_COMPANYKEY**&import**=RTI_VEHICLEKEY&**format=**csv//
14 14  = Parameters =
15 -
16 16  |=Parameter|=Description|=Type|=Note|=Mandatory
17 -|company|RTI company key|string| |yes
18 -|import|RTI import key|string| |yes
19 -|format|export format for list|string|supported output formats:(((
10 +|company|RTI company key|string||yes
11 +|import|RTI import key|string||yes
12 +|format|export format for list|string|supported output formats:
13 +(((
20 20  * csv - export as csv formatted file
21 21  * json - export as json
22 22  * xml - export as xml
23 -)))default: csv|no
17 +)))
18 +default: csv|no
24 24  |history|show only latest personnel key for each person or all keys for each person|int|(((
25 25  * 0 - return only latest key
26 26  * 1 - return all keys(((
27 27  * will return one entry per key
28 28  )))
29 -)))default: 0|no
24 +)))
25 +default: 0|no
30 30  |id|limit exported persons list to given id|string|see //strict// parameter|no
31 31  |name|limit exported persons list to given name|string|see //strict// parameter|no
32 32  |pkey|limit exported persons list to given personnel key|string|see //strict// parameter|no
... ... @@ -34,30 +34,28 @@
34 34  |strict|switch search between finding the exact given value or return all results where the search string is part of the result|int|(((
35 35  * 0 - return all results containing the searched string
36 36  * 1 - return only results matching exactly the searched string
37 -)))default: 1
38 -this setting modifies the behaviour for parameters:// id, name, pkey, group|no
33 +)))
34 +default: 1
35 +this setting modifies the behaviour for parameters:// id, name, pkey, group//|no
39 39  
40 40  = Return =
41 -
42 -Returning a string in selected format. On error returning "(% class="error" %)**403 - Verboten: Zugriff verweigert.**(%%)" as HTTP-Header.
43 -
38 +Returning a string in selected format. On error returning "**(% class="error" %)403 - Verboten: Zugriff verweigert.(%%)**" as HTTP-Header.
44 44  == Column ==
45 -
46 -|=CSV Column name|=JSON/XML key name|=Name in personnel administration|=Description|=Note|=
47 -|ID|id|employee number|self defined employee number| |
48 -|NAME|name|Name|complete name of the person| |
49 -|KEY|key[id]|personnel key|personnel key (for bookings via YellowFox)| |
50 -|VALID_FROM|key[valid_from]|personnel key valid from|validity start for the personnel key| |format: YYYY-MM-DD HH:MM:SS
51 -|VALID_TO|key[valid_to]|personnel key valid to|validity end for the personnel key| |format: YYYY-MM-DD HH:MM:SS
52 -|GROUPS|groups[group]|personnel groups|comma separated list with all personnel groups assigned to the person| |
53 -|CARD_NR|card_nr|employee licence number|optional licence number to assign bookings to ReinerSCT| |
54 -|DRV_LICENCE_NR|drv_licence[id]|driver licence|driver licence number|only filled, if tacho archive active|
40 +|=CSV Column name|=JSON/XML key name|=Name in personnel administration|=Description|=Note|=
41 +|ID|id|employee number|self defined employee number||
42 +|NAME|name|Name|complete name of the person||
43 +|KEY|key[id]|personnel key|personnel key (for bookings via YellowFox)||
44 +|VALID_FROM|key[valid_from]|personnel key valid from|validity start for the personnel key||format: YYYY-MM-DD HH:MM:SS
45 +|VALID_TO|key[valid_to]|personnel key valid to|validity end for the personnel key||format: YYYY-MM-DD HH:MM:SS
46 +|GROUPS|groups[group]|personnel groups|comma separated list with all personnel groups assigned to the person||
47 +|CARD_NR|card_nr|employee licence number|optional licence number to assign bookings to ReinerSCT||
48 +|DRV_LICENCE_NR|drv_licence[id]|driver licence|driver licence number|only filled, if tacho archive active|
55 55  |DRV_LICENCE_VALID_TO|drv_licence[valid_to]|driver licence valid to|expiration date of driver licence|only filled, if tacho archive active|format: YYYY-MM-DD HH:MM:SS
56 -|IDENTITY_CARD_NR|identity_card[id]|identity card|identity card number|only filled, if tacho archive active|
50 +|IDENTITY_CARD_NR|identity_card[id]|identity card|identity card number|only filled, if tacho archive active|
57 57  |IDENTITY_CARD_VALID_TO|identity_card[valid_to]|identity card valid to|expiration date of identity card|only filled, if tacho archive active|format: YYYY-MM-DD HH:MM:SS
58 -|PASSPORT_NR|passport[id]|passport|passport number|only filled, if tacho archive active|
52 +|PASSPORT_NR|passport[id]|passport|passport number|only filled, if tacho archive active|
59 59  |PASSPORT_VALID_TO|passport[valid_to]|passport valid to|expiration date of passort|only filled, if tacho archive active|format: YYYY-MM-DD HH:MM:SS
60 -|ADR_CERTIFICATE_NR|adr_certificate[id]|ADR certificate|number of ADR certificate (carriage of dangerous goods by road)|only filled, if tacho archive active|
54 +|ADR_CERTIFICATE_NR|adr_certificate[id]|ADR certificate|number of ADR certificate (carriage of dangerous goods by road)|only filled, if tacho archive active|
61 61  |ADR_CERTICATE_VALID_TO|adr_certificate[valid_to]|ADR cetificate valid to|expiration date of ADR certificate|only filled, if tacho archive active|format: YYYY-MM-DD HH:MM:SS
62 62  |BKRFQG_VALID_TO|bkrfqg[valid_to]|qualification by keynumber 95 valid to|expiration date of german "**B**erufs**kr**aft**f**ahrer**q**ualifikations**g**esetz"|only filled, if tacho archive active|format: YYYY-MM-DD HH:MM:SS
63 63  |BIRTHDATE|birthdate|date of birth|date of birth of person|only filled, if tacho archive active
... ... @@ -64,19 +64,15 @@
64 64  If day and/or month are unknown, the birthdate is filled up with "XX" for the unknown values according to german passport law
65 65  
66 66  (example: 1980-06-XX or 1980-XX-XX)|format: YYYY-MM-DD HH:MM:SS
67 -
68 68  |JOB_START_DATE|job_start_date|employee since|start date of beeing an employee at this company|only filled, if tacho archive active|format: YYYY-MM-DD HH:MM:SS
69 -|DRV_LICENCE_CHECK_TAG_ID|drv_licence_check[tag_id]|NFC tag id|id of nfc tag for driver licence check| |
70 -|DRV_LICENCE_CHECK_LAST_CHECK|drv_licence_check[last_check]|last [driver licence] check|date of latest driver licence check| |format: YYYY-MM-DD HH:MM:SS
71 -|DRV_LICENCE_CHECK_NEXT_CHECK|drv_licence_check[next_check]|next [driver licence] check|date of next driver licence check| |format YYYY-MM-DD
72 -|DRV_LICENCE_CHECK_INTERVAL|drv_licence_check[interval]|[driver licence] check interval|timerange between 2 driver licence checks in seconds| |
62 +|DRV_LICENCE_CHECK_TAG_ID|drv_licence_check[tag_id]|NFC tag id|id of nfc tag for driver licence check||
63 +|DRV_LICENCE_CHECK_LAST_CHECK|drv_licence_check[last_check]|last [driver licence] check|date of latest driver licence check||format: YYYY-MM-DD HH:MM:SS
64 +|DRV_LICENCE_CHECK_NEXT_CHECK|drv_licence_check[next_check]|next [driver licence] check|date of next driver licence check||format YYYY-MM-DD
65 +|DRV_LICENCE_CHECK_INTERVAL|drv_licence_check[interval]|[driver licence] check interval|timerange between 2 driver licence checks in seconds||
73 73  
74 74  == CSV Format ==
75 -
76 76  Sending a correct request will return a csv formatted file with a headline as first line containing column names. The data itself will be returned in following rows.
77 -
78 78  === Meta informations ===
79 -
80 80  |=Separator|semicolon ( ; )
81 81  |=text limiter|double quote ( " )
82 82  |=line brak|0x0D 0x0A (CarriageReturn LineFeed)
... ... @@ -83,7 +83,6 @@
83 83  |=header|row 1
84 84  
85 85  === Header ===
86 -
87 87  **header informationen**
88 88  {{code language="java"}}"ID";"NAME";"KEY";"VALID_FROM";"VALID_TO";"GROUPS";"CARD_NR";"DRV_LICENCE_NR";"DRV_LICENCE_VALID_TO";"IDENTITY_CARD_NR";"IDENTITY_CARD_VALID_TO";"PASSPORT_NR";"PASSPORT_VALID_TO";"ADR_CERTIFICATE_NR";"ADR_CERTIFICATE_VALID_TO";"BKRFQG_VALID_TO";"BIRTHDATE";"JOB_START_DATE"{{/code}}
89 89  
... ... @@ -93,99 +93,93 @@
93 93  "0012";"Max Mustermann";"DF1234567890";"2018-01-01 06:43:00";"";"Fahrer,Dresden";"";"YFDD9876";"2021-11-10 23:59:59";"";"";"";"2023-04-30 23:59:59";"";"2020-07-31 23:59:59";"2021-11-30 23:59:59";"1990-02-19 00:00:00";"2014-09-01 00:00:00";""4729000A3341";"2020-03-01 10:43:00";"2020-03-15";"1209600"{{/code}}
94 94  
95 95  == JSON Format ==
96 -
97 97  Retrun a json formatted string with all the available data matching the request parameters. The entries will be returned as key - value relation. Some data such as personnel key or personnel groups are grouped in a sub object.
98 -
99 99  === Beispiel ===
100 -
101 101  **example**
102 102  {{code language="js"}}[
103 - {
104 - "id":"0013",
105 - "name":"Marion Musterfrau",
106 - "key":{
107 - "id":"DF9876543210",
108 - "valid_from":"2016-01-01 00:00:00",
109 - "valid_to":null
110 - },
111 - "card_nr":null,
112 - "groups":[
113 - "Fahrer",
114 - "Berlin"
115 - ],
116 - "deleted":null,
117 - "drv_licence":{
118 - "id":"asd09472845",
119 - "valid_to":"2017-02-24 23:59:59"
120 - },
121 - "identity_card":{
122 - "id":"hal2001",
123 - "valid_to":"2017-01-11 23:59:59"
124 - },
125 - "passport":{
126 - "id":null,
127 - "valid_to":null
128 - },
129 - "adr_certificate":{
130 - "id":null,
131 - "valid_to":"2019-05-23 23:59:59"
132 - },
133 - "bkfqg":{
134 - "valid_to":null
135 - },
136 - "birthdate":"1998-05-13 00:00:00",
137 - "job_start_date":"2016-09-01 00:00:00"
138 - },
139 - {
140 - "id":"0014",
141 - "name":"Patrick Berger",
142 - "key":{
143 - "id":"00047392",
144 - "valid_from":"2017-07-05 13:20:00",
145 - "valid_to":null
146 - },
147 - "card_nr":"7937102",
148 - "groups":[
149 - "B\u00fcro",
150 - "Berlin"
151 - ],
152 - "deleted":null,
153 - "drv_licence":{
154 - "id":jvg7820185",
155 - "valid_to":"2014-07-18 23:59:59"
156 - },
157 - "identity_card":{
158 - "id":"ppa4711",
159 - "valid_to":"2014-07-19 23:59:59"
160 - },
161 - "passport":{
162 - "id":null,
163 - "valid_to":null
164 - },
165 - "adr_certificate":{
166 - "id":null,
167 - "valid_to":null
168 - },
169 - "bkfqg":{
170 - "valid_to":"2019-07-18 25:59:59"
171 - },
172 - "birthdate":"1996-07-17 00:00:00",
173 - "job_start_date":"2014-07-17 00:00:00",
174 - "drv_licence_check": {
89 + {
90 + "id":"0013",
91 + "name":"Marion Musterfrau",
92 + "key":{
93 + "id":"DF9876543210",
94 + "valid_from":"2016-01-01 00:00:00",
95 + "valid_to":null
96 + },
97 + "card_nr":null,
98 + "groups":[
99 + "Fahrer",
100 + "Berlin"
101 + ],
102 + "deleted":null,
103 + "drv_licence":{
104 + "id":"asd09472845",
105 + "valid_to":"2017-02-24 23:59:59"
106 + },
107 + "identity_card":{
108 + "id":"hal2001",
109 + "valid_to":"2017-01-11 23:59:59"
110 + },
111 + "passport":{
112 + "id":null,
113 + "valid_to":null
114 + },
115 + "adr_certificate":{
116 + "id":null,
117 + "valid_to":"2019-05-23 23:59:59"
118 + },
119 + "bkfqg":{
120 + "valid_to":null
121 + },
122 + "birthdate":"1998-05-13 00:00:00",
123 + "job_start_date":"2016-09-01 00:00:00"
124 + },
125 + {
126 + "id":"0014",
127 + "name":"Patrick Berger",
128 + "key":{
129 + "id":"00047392",
130 + "valid_from":"2017-07-05 13:20:00",
131 + "valid_to":null
132 + },
133 + "card_nr":"7937102",
134 + "groups":[
135 + "B\u00fcro",
136 + "Berlin"
137 + ],
138 + "deleted":null,
139 + "drv_licence":{
140 + "id":jvg7820185",
141 + "valid_to":"2014-07-18 23:59:59"
142 + },
143 + "identity_card":{
144 + "id":"ppa4711",
145 + "valid_to":"2014-07-19 23:59:59"
146 + },
147 + "passport":{
148 + "id":null,
149 + "valid_to":null
150 + },
151 + "adr_certificate":{
152 + "id":null,
153 + "valid_to":null
154 + },
155 + "bkfqg":{
156 + "valid_to":"2019-07-18 25:59:59"
157 + },
158 + "birthdate":"1996-07-17 00:00:00",
159 + "job_start_date":"2014-07-17 00:00:00",
160 + "drv_licence_check": {
175 175   "tag_id": "4729000A3341",
176 176   "last_check": "2020-03-01 10:43:00",
177 177   "next_check": "2019-03-15",
178 178   "interval": 1209600
179 179   }
180 - }
166 + }
181 181  ]{{/code}}
182 182  
183 183  = XML Format =
184 -
185 185  Return an xml formatted string with main key "<persons>" and data for each single person then grouped in a "<person>" object. Some data such as personnel key or personnel groups are grouped in a sub object.
186 -
187 187  === Beispiel ===
188 -
189 189  **example**
190 190  {{code language="xml"}}<?xml version="1.0"?>
191 191  <persons>
... ... @@ -202,7 +202,7 @@
202 202   <group>Fahrer</group>
203 203   <group>Dresden</group>
204 204   </groups>
205 - <deleted/>
188 + <deleted/>
206 206   <drv_licence>
207 207   <id>asd09472845</id>
208 208   <valid_to>2020-04-23 23:59:59</valid_to>
... ... @@ -238,7 +238,7 @@
238 238   <group>Fahrer</group>
239 239   <group>Berlin</group>
240 240   </groups>
241 - <deleted/>
224 + <deleted/>
242 242   <drv_licence>
243 243   <id>asd09472845</id>
244 244   <valid_to>2020-04-23 23:59:59</valid_to>
... ... @@ -260,7 +260,7 @@
260 260   </bkfqg>
261 261   <birthdate/>
262 262   <job_start_date>2012-05-01 00:00:00</job_start_date>
263 - <drv_licence_check>
246 + <drv_licence_check>
264 264   <tag_id>4729000A3341</tag_id>
265 265   <last_check>2020-03-01 10:43:00</last_check>
266 266   <next_check>2020-03-15</next_check>
... ... @@ -270,7 +270,6 @@
270 270  </persons>{{/code}}
271 271  
272 272  == Examples ==
273 -
274 274  **Abfrage aller Personen im CSV Format**
275 275  {{code language="xml"}}https://map.yellowfox.de/rti/get_personnel.php?company=COMPANY_RTIKEY&import=IMPORT_RTIKEY&format=csv{{/code}}
276 276