Das Webservice - Tagesinformationen ist eine Programmfunktion zur Abfrage von Tagesinformationen pro Personal und Zeitbereich.
Es kann dazu verwendet werden die Tagesinformationen für einen Zeitbereich und Personal Fremdsystemen zur maschinellen Weiterverarbeitung zur Verfügung zu stellen.
Ausgangssituation
Voraussetzungen
Neben den Voraussetzungen für den Betrieb eines Webservice muss das richtige Plugin konfiguriert sein.
Das Webservice stellt dann folgende Zugriffspfade zur Verfügung:
/EmployeeDayIntervals
Formatierung der Anfrage
Die Daten werden dem Webservice in der URL kodiert als GET-Argumentübertragung übergeben.
Ein Datum wird immer als DD.MM.YYYY
übertragen.
Schema für URL-Kodierung
Der Prozent-Encodierte Query-String der URL muss folgendes Format haben. Parameter in eckigen Klammern sind optional:
/EmployeeDayIntervals [?allEmployees=] [&id=] [&planCode=] [&resourcesBson=] [&begin=] [&end=] [&allstates=]
Parameter | Wertebereich | Beschreibung |
---|---|---|
allEmployees |
true oder false |
Wenn true , gesamtes Personal im Zeitbereich
|
id |
Zeichenkette | Eine Personalnummer |
planCode |
Zeichenkette | Kurzcode eines Plans |
resourcesBson |
Zeichenkette | JSON-String: eine Zusammenfassung von Plan Kurzzeichen und Personalnummern zum Beispiel: resourcesBson={"employeeIDs":["E1","E2","E3"],"planCodes":["P1","P2","P3"]}
|
begin |
Datum | Beginn des abzufragenden Zeitbereichs, falls nicht angegeben Heute |
end |
Datum | Ende des abzufragenden Zeitbereichs, falls nicht angegeben Morgen |
allstates |
true oder false |
Wenn true , Statusdaten für alle aktuellen Status: Planung -> Planung, Ist -> Planung und Ist
|
Formatierung der Ausgabe
Tagesinformation im JSON-Format UTF8 codiert. Das JSON-Objekt hat folgendes JSON-Schema:
{ "$schema": "https://json-schema.org/draft/2020-12/schema", "title": "EmployeeDayIntervals", "description": "format for the EmployeeDayIntervals-Webservice", "type": "object", "$defs": { "planSymbolObjectType": { "type": "object", "description": "Plansymbol", "properties": { "PlanSymbolCode": { "type": "string", "description": "Kurzcode des Planungscodes" }, "PlanSymbolCodeExt": { "type": "string", "description": "Externer Kurzcode des Planungscodes" }, "PlanSymbolType": { "type": "string", "description": "Typ des Planungscodes 'Anwesend' oder 'Abwesend'" }, "Label": { "type": "string", "description": "Bezeichnung des Planungscodes" } } }, "shiftObjectType": { "type": "object", "description": "Dienst", "properties": { "Label": { "type": "string", "description": "Bezeichnung des Dienstes" }, "ShiftAnnotation": { "type": "string", "description": "Anmerkungen" } } }, "extraObjectType": { "type": "object", "properties": { "Key": { "type": "string", "description": "Name der Sonderabrechnung" }, "Label": { "type": "string", "description": "Bezeichnung der Sonderabrechnung" }, "Value": { "type": "string", "description": "Wert der Sonderabrechnung" } } }, "planObjectType": { "type": "object", "description": "Plan", "properties": { "PlanCode": { "type": "string", "description": "Kurzcode des Plans" } } }, "properties": { "Employees": { "type": "array", "description": "Array der Personen für die Daten gefunden wurden", "items": { "type": "object", "properties": { "EmployeeID": { "type": "string", "description": "Personalnummer" }, "Surname": { "type": "string", "description": "Zuname" }, "Forename": { "type": "string", "description": "Vorname" }, "EmployeeTitleBeforeName": { "type": "string", "description": "Titel vor Name" }, "EmployeeTitleAfterName": { "type": "string", "description": "Titel nach Name" }, "MasterAllocation": { "type": "string", "description": "Stammplanungseinheit" }, "MasterAllocationObject": { "$ref": "#/$defs/planObjectType" }, "EmployeeJobGroup": { "type": "string", "description": "Berufsgruppe" }, "Days": { "type": "array", "description": "Array aller Tage für die Daten gefunden wurden", "items": { "type": "object", "properties": { "ForDate": { "type": "string", "description": "Datum des Tages" }, "ForState": { "type": "string", "description": "Status des Tages" }, "TextCategory": { "type": "string", "description": "Textkategorie des Tages" }, "InfoText": { "type": "string", "description": "Tagtext" }, "DayPlanSymbol": { "type": "string", "description": "Abwesenheit auf Tag (nur Planungscodes mit Typ 'Abwesend')" }, "DayPlanSymbolObject": { "$ref": "#/$defs/planSymbolObjectType" }, "DayShift1": { "type": "string", "description": "1. Dienst am Tag" }, "DayShift1Object": { "$ref": "#/$defs/shiftObjectType" }, "DayShift2": { "type": "string", "description": "2. Dienst am Tag" }, "DayShift2Object": { "$ref": "#/$defs/shiftObjectType" }, "DayRequestKind": { "type": "string", "description": "Aufgabe am Tag" }, "DayEvents": { "type": "array", "description": "zusätzliche Aufgaben am Tag", "items" : { "type": "object", "properties": { "Label": { "type": "string", "description": "Bezeichnung der Aufgabe" } } } }, "ForeignShift1": { "type": "string", "description": "1. Dienst auf anderer Planungseinheit: Bezeichnung von Planungseinheit" }, "ForeignShift2": { "type": "string", "description": "2. Dienst auf anderer Planungseinheit: Bezeichnung von Planungseinheit" }, "DayTotalMinutesComputed": { "type": "string", "description": "Total in Minuten aus Status" }, "DayPoolAllocations": { "type": "array", "description": "Array aller Poolzuteilungen an diesem Tag", "items": { "type": "string", "description": "Bezeichnung von Planungseinheit" } }, "AssignedExtra": { "type": "array", "description": "Array aller Sonderabrechnung am Tag", "items": { "$ref": "#/$defs/extraObjectType" }, "DayIntervals": { "type": "array", "description": "Array aller Kommt/Geht-Paare am Tag", "items": { "type": "object", "properties": { "From": { "type": "string", "description": "Kommt-Zeitpunkt" }, "To": { "type": "string", "description": "Geht-Zeitpunkt" }, "DayIntervalPlanSymbol": { "type": "string", "description": "Abwesenheit auf Kommt/Geht-Paar (nur Planungscodes mit Typ 'Abwesend')" }, "DayIntervalPlanSymbolObject": { "$ref": "#/$defs/planSymbolObjectType" }, "DayIntervalInfoTextCategory": { "type": "string", "description": "Textkategorie auf Kommt/Geht-Paar" }, "DayIntervalInfoText": { "type": "string", "description": "Text auf Kommt/Geht-Paar" }, "DayIntervalShift": { "type": "string", "description": "Dienst, welcher diesem Kommt/Geht-Paar zugewiesen ist" }, "DayIntervalShiftObject": { "$ref": "#/$defs/shiftObjectType" }, "DayIntervalAssignedEvents": { "type": "array", "description": "Array von Aufgaben auf Kommt/Geht-Paar", "items": { "type": "string", "description": "Bezeichnung von Aufgabe" } } } } } } } } } } } } } } }
Beispiele
Beispiel 1: gesamtes Personal
Ausgangssituation
Der Dienstplan A hat in diesem Beispiel 4 Mitarbeiter. Folgende Änderungen wurden beim Personal erfasst.
- Weitblick
- 01.03.2023 Dienst: "8", Vormittags auswärts.
- 01.03.2023 Tagestext: Termin BitFactoy GmbH Supervisorenschulung 09:00 Uhr
- Rentier
- 01.03.2023 Planungscode Schulung "SU"
- Imglück
- 01.03.2023 Krankenstand "K"
- 01.03.2023 Textkategorie: „MG“ Tagestext: Mitarbeitergespräch
- Bauer
- 01.03.2023 Dienst "8", Homeoffice "HO"
Dienstplan A |
Aufruf der Funktion
Ein Alex-Server muss auf die unten angehängte Datenbank gestartet werden.
Danach können die Tagesinformationen des gesamten Personals vom 01.03.2023 abgerufen werden, wenn folgende URL in einem Webbrowser am selben PC eingegeben wird:
http://localhost:4401/EmployeeDayIntervals?allEmployees=true&begin=01.03.2023&end=01.03.2023
Ergebnis
{ "Employees": [ { "EmployeeID": "1", "Surname": "Bauer", "Forename": "Berta", "Nickname": "", "EmployeeTitleBeforeName": "", "EmployeeTitleAfterName": "", "EmployeeJobGroup": "Arbeitstier", "Days": [] }, { "EmployeeID": "2", "Surname": "Auer", "Forename": "Anna", "Nickname": "", "EmployeeTitleBeforeName": "", "EmployeeTitleAfterName": "", "EmployeeJobGroup": "Arbeitstier", "Days": [] }, { "EmployeeID": "3", "Surname": "Eder", "Forename": "Ernst", "Nickname": "", "EmployeeTitleBeforeName": "", "EmployeeTitleAfterName": "", "EmployeeJobGroup": "Arbeitstier", "Days": [] }, { "EmployeeID": "4", "Surname": "Bauer", "Forename": "Birgit", "Nickname": "BBauer", "EmployeeTitleBeforeName": "Diplom-Ingenieurin", "EmployeeTitleAfterName": "BA", "MasterAllocation": "Plan A", "EmployeeJobGroup": "Arbeitstier", "Days": [ { "ForDate": "01.03.2023", "ForState": "Ist", "TextCategory": "", "InfoText": "", "DayPlanSymbol": "", "DayPlanSymbolObject": {}, "DayShift1": "8", "DayShift2": "", "DayRequestKind": "HO", "DayEvents": [], "DayTotalMinutesComputed": 480.0, "DayPoolAllocations": [], "AssignedExtra": [], "DayIntervals": [ { "From": "01.03.2023 8:00", "To": "01.03.2023 12:00", "DayIntervalPlanSymbol": "", "DayIntervalPlanSymbolObject": {}, "DayIntervalInfoTextCategory": "", "DayIntervalInfoText": "", "DayIntervalShift": "8", "DayIntervalAssignedEvents": [] }, { "From": "01.03.2023 13:00", "To": "01.03.2023 17:00", "DayIntervalPlanSymbol": "", "DayIntervalPlanSymbolObject": {}, "DayIntervalInfoTextCategory": "", "DayIntervalInfoText": "", "DayIntervalShift": "8", "DayIntervalAssignedEvents": [] } ] } ] }, { "EmployeeID": "5412", "Surname": "Imglück", "Forename": "Hans", "Nickname": "Lucky", "EmployeeTitleBeforeName": "", "EmployeeTitleAfterName": "", "MasterAllocation": "Plan A", "EmployeeJobGroup": "Arbeitstier", "Days": [ { "ForDate": "01.03.2023", "ForState": "Ist", "TextCategory": "MG", "InfoText": "Mitarbeitergespräch", "DayPlanSymbol": "K", "DayPlanSymbolObject": { "PlanSymbolCode": "K", "PlanSymbolType": "Abwesend" }, "DayShift1": "8", "DayShift2": "", "DayRequestKind": "", "DayEvents": [], "DayTotalMinutesComputed": 480.0, "DayPoolAllocations": [], "AssignedExtra": [], "DayIntervals": [ { "From": "01.03.2023 8:00", "To": "01.03.2023 12:00", "DayIntervalPlanSymbol": "K", "DayIntervalPlanSymbolObject": { "PlanSymbolCode": "K", "PlanSymbolType": "Abwesend" }, "DayIntervalInfoTextCategory": "", "DayIntervalInfoText": "", "DayIntervalShift": "", "DayIntervalAssignedEvents": [] }, { "From": "01.03.2023 13:00", "To": "01.03.2023 17:00", "DayIntervalPlanSymbol": "K", "DayIntervalPlanSymbolObject": { "PlanSymbolCode": "K", "PlanSymbolType": "Abwesend" }, "DayIntervalInfoTextCategory": "", "DayIntervalInfoText": "", "DayIntervalShift": "", "DayIntervalAssignedEvents": [] } ] } ] }, { "EmployeeID": "8812", "Surname": "Rentier", "Forename": "Rudolf", "Nickname": "Rudi", "EmployeeTitleBeforeName": "", "EmployeeTitleAfterName": "", "MasterAllocation": "Plan A", "EmployeeJobGroup": "Arbeitstier", "Days": [ { "ForDate": "01.03.2023", "ForState": "Ist", "TextCategory": "", "InfoText": "", "DayPlanSymbol": "", "DayPlanSymbolObject": {}, "DayShift1": "8", "DayShift2": "", "DayRequestKind": "SU", "DayEvents": [], "DayTotalMinutesComputed": 480.0, "DayPoolAllocations": [], "AssignedExtra": [], "DayIntervals": [ { "From": "01.03.2023 8:00", "To": "01.03.2023 12:00", "DayIntervalPlanSymbol": "", "DayIntervalPlanSymbolObject": {}, "DayIntervalInfoTextCategory": "", "DayIntervalInfoText": "", "DayIntervalShift": "8", "DayIntervalAssignedEvents": [] }, { "From": "01.03.2023 13:00", "To": "01.03.2023 17:00", "DayIntervalPlanSymbol": "", "DayIntervalPlanSymbolObject": {}, "DayIntervalInfoTextCategory": "", "DayIntervalInfoText": "", "DayIntervalShift": "8", "DayIntervalAssignedEvents": [] } ] } ] }, { "EmployeeID": "4711", "Surname": "Weitblick", "Forename": "Susanne", "Nickname": "Susi", "EmployeeTitleBeforeName": "", "EmployeeTitleAfterName": "", "MasterAllocation": "Plan A", "EmployeeJobGroup": "Häuptling", "Days": [ { "ForDate": "01.03.2023", "ForState": "Ist", "TextCategory": "", "InfoText": "Termin: BitFactoy GmbH Supervisorenschulung 09:00 Uhr", "DayPlanSymbol": "", "DayPlanSymbolObject": {}, "DayShift1": "8", "DayShift2": "A", "DayRequestKind": "", "DayEvents": [], "DayTotalMinutesComputed": 480.0, "DayPoolAllocations": [], "AssignedExtra": [], "DayIntervals": [ { "From": "01.03.2023 8:00", "To": "01.03.2023 12:00", "DayIntervalPlanSymbol": "", "DayIntervalPlanSymbolObject": {}, "DayIntervalInfoTextCategory": "", "DayIntervalInfoText": "", "DayIntervalShift": "8", "DayIntervalAssignedEvents": [] }, { "From": "01.03.2023 13:00", "To": "01.03.2023 17:00", "DayIntervalPlanSymbol": "", "DayIntervalPlanSymbolObject": {}, "DayIntervalInfoTextCategory": "", "DayIntervalInfoText": "", "DayIntervalShift": "8", "DayIntervalAssignedEvents": [] } ] } ] } ] }
Datenbank für Beispiel
Beispiel 2: Personal mit Personalnummer
Ausgangssituation
Der Dienstplan A hat in diesem Beispiel 4 Mitarbeiter. Folgende Personalnummer sind erfasst:
- Weitblick: 4711
- Rentier: 8812
- Imglück: 5412
- Bauer: 4
Mitarbeiter mit der Personalnummer |
Aufruf der Funktion
Ein Alex-Server muss auf die unten angehängte Datenbank gestartet werden.
Danach Tagesinformationen vom Personal Bauer mit der Personalnummer 4 vom 01.03.2023 abgerufen werden, wenn folgende URL in einem Webbrowser am selben PC eingegeben wird:
http://localhost:4401/EmployeeDayIntervals?id=4&begin=01.03.2023&end=01.03.2023
Ergebnis
{ "Employees": [ { "EmployeeID": "4", "Surname": "Bauer", "Forename": "Birgit", "Nickname": "BBauer", "EmployeeTitleBeforeName": "Diplom-Ingenieurin", "EmployeeTitleAfterName": "BA", "MasterAllocation": "Plan A", "EmployeeJobGroup": "Arbeitstier", "Days": [ { "ForDate": "01.03.2023", "ForState": "Ist", "TextCategory": "", "InfoText": "", "DayPlanSymbol": "", "DayPlanSymbolObject": {}, "DayShift1": "8", "DayShift2": "", "DayRequestKind": "HO", "DayEvents": [], "DayTotalMinutesComputed": 480.0, "DayPoolAllocations": [], "AssignedExtra": [], "DayIntervals": [ { "From": "01.03.2023 8:00", "To": "01.03.2023 12:00", "DayIntervalPlanSymbol": "", "DayIntervalPlanSymbolObject": {}, "DayIntervalInfoTextCategory": "", "DayIntervalInfoText": "", "DayIntervalShift": "8", "DayIntervalAssignedEvents": [] }, { "From": "01.03.2023 13:00", "To": "01.03.2023 17:00", "DayIntervalPlanSymbol": "", "DayIntervalPlanSymbolObject": {}, "DayIntervalInfoTextCategory": "", "DayIntervalInfoText": "", "DayIntervalShift": "8", "DayIntervalAssignedEvents": [] } ] } ] } ] }
Datenbank für Beispiel
Beispiel 3: Personal auf Plan
Ausgangssituation
Der Dienstplan A hat in diesem Beispiel 4 Mitarbeiter.
Dienstplan A Kurzzeichen: PA
- Weitblick
- Rentier
- Imglück
- Bauer
Mitarbeiter |
Aufruf der Funktion
Ein Alex-Server muss auf die unten angehängte Datenbank gestartet werden.
Danach kann man die Tagesinformationen für die Planungseinheit mit dem Kurzzeichen PA vom 01.03.2023 abgerufen werden, wenn folgende URL in einem Webbrowser am selben PC eingegeben wird:
http://localhost:4401/EmployeeDayIntervals?planCode=PA&begin=01.03.2023&end=01.03.2023
Ergebnis
{ "Employees": [ { "EmployeeID": "4711", "Surname": "Weitblick", "Forename": "Susanne", "Nickname": "Susi", "EmployeeTitleBeforeName": "", "EmployeeTitleAfterName": "", "MasterAllocation": "Plan A", "EmployeeJobGroup": "Häuptling", "Days": [ { "ForDate": "01.03.2023", "ForState": "Ist", "TextCategory": "", "InfoText": "Termin: BitFactoy GmbH Supervisorenschulung 09:00 Uhr", "DayPlanSymbol": "", "DayPlanSymbolObject": {}, "DayShift1": "8", "DayShift2": "A", "DayRequestKind": "", "DayEvents": [], "DayTotalMinutesComputed": 480.0, "DayPoolAllocations": [], "AssignedExtra": [], "DayIntervals": [ { "From": "01.03.2023 8:00", "To": "01.03.2023 12:00", "DayIntervalPlanSymbol": "", "DayIntervalPlanSymbolObject": {}, "DayIntervalInfoTextCategory": "", "DayIntervalInfoText": "", "DayIntervalShift": "8", "DayIntervalAssignedEvents": [] }, { "From": "01.03.2023 13:00", "To": "01.03.2023 17:00", "DayIntervalPlanSymbol": "", "DayIntervalPlanSymbolObject": {}, "DayIntervalInfoTextCategory": "", "DayIntervalInfoText": "", "DayIntervalShift": "8", "DayIntervalAssignedEvents": [] } ] } ] }, { "EmployeeID": "8812", "Surname": "Rentier", "Forename": "Rudolf", "Nickname": "Rudi", "EmployeeTitleBeforeName": "", "EmployeeTitleAfterName": "", "MasterAllocation": "Plan A", "EmployeeJobGroup": "Arbeitstier", "Days": [ { "ForDate": "01.03.2023", "ForState": "Ist", "TextCategory": "", "InfoText": "", "DayPlanSymbol": "", "DayPlanSymbolObject": {}, "DayShift1": "8", "DayShift2": "", "DayRequestKind": "SU", "DayEvents": [], "DayTotalMinutesComputed": 480.0, "DayPoolAllocations": [], "AssignedExtra": [], "DayIntervals": [ { "From": "01.03.2023 8:00", "To": "01.03.2023 12:00", "DayIntervalPlanSymbol": "", "DayIntervalPlanSymbolObject": {}, "DayIntervalInfoTextCategory": "", "DayIntervalInfoText": "", "DayIntervalShift": "8", "DayIntervalAssignedEvents": [] }, { "From": "01.03.2023 13:00", "To": "01.03.2023 17:00", "DayIntervalPlanSymbol": "", "DayIntervalPlanSymbolObject": {}, "DayIntervalInfoTextCategory": "", "DayIntervalInfoText": "", "DayIntervalShift": "8", "DayIntervalAssignedEvents": [] } ] } ] }, { "EmployeeID": "5412", "Surname": "Imglück", "Forename": "Hans", "Nickname": "Lucky", "EmployeeTitleBeforeName": "", "EmployeeTitleAfterName": "", "MasterAllocation": "Plan A", "EmployeeJobGroup": "Arbeitstier", "Days": [ { "ForDate": "01.03.2023", "ForState": "Ist", "TextCategory": "MG", "InfoText": "Mitarbeitergespräch", "DayPlanSymbol": "K", "DayPlanSymbolObject": { "PlanSymbolCode": "K", "PlanSymbolType": "Abwesend" }, "DayShift1": "8", "DayShift2": "", "DayRequestKind": "", "DayEvents": [], "DayTotalMinutesComputed": 480.0, "DayPoolAllocations": [], "AssignedExtra": [], "DayIntervals": [ { "From": "01.03.2023 8:00", "To": "01.03.2023 12:00", "DayIntervalPlanSymbol": "K", "DayIntervalPlanSymbolObject": { "PlanSymbolCode": "K", "PlanSymbolType": "Abwesend" }, "DayIntervalInfoTextCategory": "", "DayIntervalInfoText": "", "DayIntervalShift": "", "DayIntervalAssignedEvents": [] }, { "From": "01.03.2023 13:00", "To": "01.03.2023 17:00", "DayIntervalPlanSymbol": "K", "DayIntervalPlanSymbolObject": { "PlanSymbolCode": "K", "PlanSymbolType": "Abwesend" }, "DayIntervalInfoTextCategory": "", "DayIntervalInfoText": "", "DayIntervalShift": "", "DayIntervalAssignedEvents": [] } ] } ] }, { "EmployeeID": "4", "Surname": "Bauer", "Forename": "Birgit", "Nickname": "BBauer", "EmployeeTitleBeforeName": "Diplom-Ingenieurin", "EmployeeTitleAfterName": "BA", "MasterAllocation": "Plan A", "EmployeeJobGroup": "Arbeitstier", "Days": [ { "ForDate": "01.03.2023", "ForState": "Ist", "TextCategory": "", "InfoText": "", "DayPlanSymbol": "", "DayPlanSymbolObject": {}, "DayShift1": "8", "DayShift2": "", "DayRequestKind": "HO", "DayEvents": [], "DayTotalMinutesComputed": 480.0, "DayPoolAllocations": [], "AssignedExtra": [], "DayIntervals": [ { "From": "01.03.2023 8:00", "To": "01.03.2023 12:00", "DayIntervalPlanSymbol": "", "DayIntervalPlanSymbolObject": {}, "DayIntervalInfoTextCategory": "", "DayIntervalInfoText": "", "DayIntervalShift": "8", "DayIntervalAssignedEvents": [] }, { "From": "01.03.2023 13:00", "To": "01.03.2023 17:00", "DayIntervalPlanSymbol": "", "DayIntervalPlanSymbolObject": {}, "DayIntervalInfoTextCategory": "", "DayIntervalInfoText": "", "DayIntervalShift": "8", "DayIntervalAssignedEvents": [] } ] } ] } ]
}
Datenbank für Beispiel
Beispiel 4: Beispiel Personal auf Plan und Personal mit Personalnummer
Ausgangssituation
In diesem Beispiel sind jeweils zwei Dienstpläne mit jeweils zwei Mitarbeiter erfasst:
Dienstplan A
Kurzzeichen: PA
- Weitblick: 4711
- Rentier: 8812
Dienstplan A |
Dienstplan C
Kurzzeichen: PC
- Imglück: 5412
- Bauer: 4
Dienstplan C |
Aufruf der Funktion
Ein Alex-Server muss auf die unten angehängte Datenbank gestartet werden.
Danach kann das Personal mit der Personalnummer 4 und das gesamte Personal von Dienstplan A vom 01.03.2023 abgerufen werden, wenn folgende URL in einem Webbrowser am selben PC eingegeben wird:
Ergebnis
{ "Employees": [ { "EmployeeID": "4", "Surname": "Bauer", "Forename": "Birgit", "Nickname": "BBauer", "EmployeeTitleBeforeName": "Diplom-Ingenieurin", "EmployeeTitleAfterName": "BA", "MasterAllocation": "Plan C", "EmployeeJobGroup": "Arbeitstier", "Days": [ { "ForDate": "01.03.2023", "ForState": "Ist", "TextCategory": "", "InfoText": "", "DayPlanSymbol": "", "DayPlanSymbolObject": {}, "DayShift1": "8", "DayShift2": "", "DayRequestKind": "", "DayEvents": [], "DayTotalMinutesComputed": 480.0, "DayPoolAllocations": [], "AssignedExtra": [], "DayIntervals": [ { "From": "01.03.2023 8:00", "To": "01.03.2023 12:00", "DayIntervalPlanSymbol": "", "DayIntervalPlanSymbolObject": {}, "DayIntervalInfoTextCategory": "", "DayIntervalInfoText": "", "DayIntervalShift": "8", "DayIntervalAssignedEvents": [] }, { "From": "01.03.2023 13:00", "To": "01.03.2023 17:00", "DayIntervalPlanSymbol": "", "DayIntervalPlanSymbolObject": {}, "DayIntervalInfoTextCategory": "", "DayIntervalInfoText": "", "DayIntervalShift": "8", "DayIntervalAssignedEvents": [] } ] } ] }, { "EmployeeID": "4711", "Surname": "Weitblick", "Forename": "Susanne", "Nickname": "Susi", "EmployeeTitleBeforeName": "", "EmployeeTitleAfterName": "", "MasterAllocation": "Plan A", "EmployeeJobGroup": "Häuptling", "Days": [ { "ForDate": "01.03.2023", "ForState": "Ist", "TextCategory": "", "InfoText": "Termin: BitFactoy GmbH Supervisorenschulung 09:00 Uhr", "DayPlanSymbol": "", "DayPlanSymbolObject": {}, "DayShift1": "8", "DayShift2": "A", "DayRequestKind": "", "DayEvents": [], "DayTotalMinutesComputed": 480.0, "DayPoolAllocations": [], "AssignedExtra": [], "DayIntervals": [ { "From": "01.03.2023 8:00", "To": "01.03.2023 12:00", "DayIntervalPlanSymbol": "", "DayIntervalPlanSymbolObject": {}, "DayIntervalInfoTextCategory": "", "DayIntervalInfoText": "", "DayIntervalShift": "8", "DayIntervalAssignedEvents": [] }, { "From": "01.03.2023 13:00", "To": "01.03.2023 17:00", "DayIntervalPlanSymbol": "", "DayIntervalPlanSymbolObject": {}, "DayIntervalInfoTextCategory": "", "DayIntervalInfoText": "", "DayIntervalShift": "8", "DayIntervalAssignedEvents": [] } ] } ] }, { "EmployeeID": "8812", "Surname": "Rentier", "Forename": "Rudolf", "Nickname": "Rudi", "EmployeeTitleBeforeName": "", "EmployeeTitleAfterName": "", "MasterAllocation": "Plan A", "EmployeeJobGroup": "Arbeitstier", "Days": [ { "ForDate": "01.03.2023", "ForState": "Ist", "TextCategory": "", "InfoText": "", "DayPlanSymbol": "", "DayPlanSymbolObject": {}, "DayShift1": "8", "DayShift2": "", "DayRequestKind": "SU", "DayEvents": [], "DayTotalMinutesComputed": 480.0, "DayPoolAllocations": [], "AssignedExtra": [], "DayIntervals": [ { "From": "01.03.2023 8:00", "To": "01.03.2023 12:00", "DayIntervalPlanSymbol": "", "DayIntervalPlanSymbolObject": {}, "DayIntervalInfoTextCategory": "", "DayIntervalInfoText": "", "DayIntervalShift": "8", "DayIntervalAssignedEvents": [] }, { "From": "01.03.2023 13:00", "To": "01.03.2023 17:00", "DayIntervalPlanSymbol": "", "DayIntervalPlanSymbolObject": {}, "DayIntervalInfoTextCategory": "", "DayIntervalInfoText": "", "DayIntervalShift": "8", "DayIntervalAssignedEvents": [] } ] } ] } ] }
Datenbank für Beispiel
Beispiel 5: Alle Status
Ausgangssituation
Der Dienstplan A hat in diesem Beispiel 2 Mitarbeiter. Folgende Personalnummer sind erfasst:
- Weitblick
- Personalnummer: 4711
- Rentier
- Personalnummer: 8812
Dienstplan A |
Aufruf der Funktion
Ein Alex-Server muss auf die unten angehängte Datenbank gestartet werden.
Danach können die Tagesinformationen der Dienstplan-Status Planung und Ist der Personalnummer 4711 vom 01.03.2021 abgerufen werden, wenn folgende URL in einem Webbrowser am selben PC eingegeben wird:
http://localhost:4401/EmployeeDayIntervals?id=4711&begin=01.03.2023&end=01.03.2023&allstates=true
Ergebnis
{ "Employees": [ { "EmployeeID": "4", "Surname": "Bauer", "Forename": "Birgit", "Nickname": "BBauer", "EmployeeTitleBeforeName": "Diplom-Ingenieurin", "EmployeeTitleAfterName": "BA", "MasterAllocation": "Plan C", "EmployeeJobGroup": "Arbeitstier", "Days": [ { "ForDate": "01.03.2023", "ForState": "Planung", "TextCategory": "", "InfoText": "", "DayPlanSymbol": "", "DayPlanSymbolObject": {}, "DayShift1": "8", "DayShift2": "", "DayRequestKind": "", "DayEvents": [], "DayTotalMinutesComputed": 480.0, "DayPoolAllocations": [], "AssignedExtra": [], "DayIntervals": [ { "From": "01.03.2023 8:00", "To": "01.03.2023 12:00", "DayIntervalPlanSymbol": "", "DayIntervalPlanSymbolObject": {}, "DayIntervalInfoTextCategory": "", "DayIntervalInfoText": "", "DayIntervalShift": "8", "DayIntervalAssignedEvents": [] }, { "From": "01.03.2023 13:00", "To": "01.03.2023 17:00", "DayIntervalPlanSymbol": "", "DayIntervalPlanSymbolObject": {}, "DayIntervalInfoTextCategory": "", "DayIntervalInfoText": "", "DayIntervalShift": "8", "DayIntervalAssignedEvents": [] } ] }, { "ForDate": "01.03.2023", "ForState": "Ist", "TextCategory": "", "InfoText": "", "DayPlanSymbol": "", "DayPlanSymbolObject": {}, "DayShift1": "8", "DayShift2": "", "DayRequestKind": "", "DayEvents": [], "DayTotalMinutesComputed": 480.0, "DayPoolAllocations": [], "AssignedExtra": [], "DayIntervals": [ { "From": "01.03.2023 8:00", "To": "01.03.2023 12:00", "DayIntervalPlanSymbol": "", "DayIntervalPlanSymbolObject": {}, "DayIntervalInfoTextCategory": "", "DayIntervalInfoText": "", "DayIntervalShift": "8", "DayIntervalAssignedEvents": [] }, { "From": "01.03.2023 13:00", "To": "01.03.2023 17:00", "DayIntervalPlanSymbol": "", "DayIntervalPlanSymbolObject": {}, "DayIntervalInfoTextCategory": "", "DayIntervalInfoText": "", "DayIntervalShift": "8", "DayIntervalAssignedEvents": [] } ] } ] } ] }
Datenbank für Beispiel
Beispielanfragen
Tage von | URL |
---|---|
gesamtem Personal von 05.12.2017 bis einschließlich 07.12.2017 | /EmployeeDayIntervals?allEmployees=true&begin=05.12.2017&end=07.12.2017
|
Personal mit Personalnummer 20 von 05.12.2017 bis einschließlich 07.12.2017 [1] | /EmployeeDayIntervals?id=20&begin=05.12.2017&end=07.12.2017
|
Personal auf Plan X von 01.12.2017 bis einschließlich 31.12.2017 | /EmployeeDayIntervals?planCode=X&begin=01.12.2017&end=31.12.2017
|
Personal E1, E2, E3 und Personal auf Plänen P1, P2, P3 von 01.12.2017 bis einschließlich 31.12.2017 | /EmployeeDayIntervals?begin=01.12.2017&end=31.12.2017&resourcesBson={"employeeIDs":["E1","E2","E3"],"planCodes":["P1","P2","P3"]}
|
Personal mit Personalnummer 20 von 05.12.2017 bis einschließlich 07.12.2017, alle Status | /EmployeeDayIntervals?id=20&begin=05.12.2017&end=07.12.2017&allstates=true
|
Beispielausgabe
{ "Employees": [ { "EmployeeID": "20", "Surname": "Muster", "Forename": "Max", "EmployeeTitleBeforeName": "DI", "EmployeeTitleAfterName": "M.A", "MasterAllocation": "Plan S", "EmployeeJobGroup": "SW-Entwicklung", "Days": [ { "ForDate": "05.12.2017", "ForState": "Ist", "TextCategory": "Korrektur am Tag", "InfoText": "Pause verlängert, Auto kaputt", "DayPlanSymbol": "", "DayPlanSymbolObject": {}, "DayShift1": "8", "DayShift2": "", "DayRequestKind": "", "DayEvents": [], "DayTotalMinutesComputed": 480.0, "ForeignShift1": "Projektmanagment", "DayPoolAllocations": [], "AssignedExtra": [ { "Key": "9010", "Label": "Diensttausch", "Value": 0.0 } ], "DayIntervals": [ { "From": "05.12.2017 8:00", "To": "05.12.2017 12:00", "DayIntervalPlanSymbol": "", "DayIntervalPlanSymbolObject": {}, "DayIntervalInfoTextCategory": "", "DayIntervalInfoText": "", "DayIntervalShift": "8", "DayIntervalAssignedEvents": [] }, { "From": "05.12.2017 13:00", "To": "05.12.2017 17:00", "DayIntervalPlanSymbol": "", "DayIntervalPlanSymbolObject": {}, "DayIntervalInfoTextCategory": "", "DayIntervalInfoText": "", "DayIntervalShift": "8", "DayIntervalAssignedEvents": [] } ] }, { "ForDate": "06.12.2017", "ForState": "Ist", "TextCategory": "", "InfoText": "", "DayPlanSymbol": "", "DayPlanSymbolObject": { "PlanSymbolCode": "S", "PlanSymbolCodeExt": "ext", "PlanSymbolType": "Anwesend" }, "DayShift1": "8", "DayShift2": "", "DayRequestKind": "", "DayEvents": [], "DayTotalMinutesComputed": 360.0, "DayPoolAllocations": [ "Plan A", "Plan B" ], "AssignedExtra": [], "DayIntervals": [ { "From": "06.12.2017 8:00", "To": "06.12.2017 12:00", "DayIntervalPlanSymbol": "", "DayIntervalPlanSymbolObject": {}, "DayIntervalInfoTextCategory": "", "DayIntervalInfoText": "", "DayIntervalShift": "8", "DayIntervalAssignedEvents": [] }, { "From": "06.12.2017 13:00", "To": "06.12.2017 15:00", "DayIntervalPlanSymbol": "", "DayIntervalPlanSymbolObject": {}, "DayIntervalInfoTextCategory": "", "DayIntervalInfoText": "", "DayIntervalShift": "8", "DayIntervalAssignedEvents": [] }, { "From": "06.12.2017 15:00", "To": "06.12.2017 17:00", "DayIntervalPlanSymbol": "Z", "DayIntervalPlanSymbolObject": { "PlanSymbolCode": "Z", "PlanSymbolCodeExt": "Zext", "PlanSymbolType": "Abwesend" }, "DayIntervalInfoTextCategory": "", "DayIntervalInfoText": "", "DayIntervalShift": "8", "DayIntervalAssignedEvents": [] } ] }, { "ForDate": "07.12.2017", "ForState": "Ist", "TextCategory": "", "InfoText": "", "DayPlanSymbol": "", "DayPlanSymbolObject": {}, "DayShift1": "VM", "DayShift2": "NM", "DayRequestKind": "", "DayEvents": [], "DayTotalMinutesComputed": 480.0, "DayPoolAllocations": [ "Plan B" ], "AssignedExtra": [], "DayIntervals": [ { "From": "07.12.2017 8:00", "To": "07.12.2017 12:00", "DayIntervalPlanSymbol": "", "DayIntervalPlanSymbolObject": { "PlanSymbolCode": "B", "PlanSymbolCodeExt": "Bext", "PlanSymbolType": "Anwesend" }, "DayIntervalInfoTextCategory": "", "DayIntervalInfoText": "", "DayIntervalShift": "VM", "DayIntervalAssignedEvents": [] }, { "From": "07.12.2017 13:00", "To": "07.12.2017 17:00", "DayIntervalPlanSymbol": "", "DayIntervalPlanSymbolObject": {}, "DayIntervalInfoTextCategory": "", "DayIntervalInfoText": "", "DayIntervalShift": "NM", "DayIntervalAssignedEvents": [] } ] } ] } ] }