Webservice Tagesinformationen: Unterschied zwischen den Versionen

Markierung: 2017-Quelltext-Bearbeitung
 
(46 dazwischenliegende Versionen von 2 Benutzern werden nicht angezeigt)
Zeile 62: Zeile 62:
     "description": "format for the EmployeeDayIntervals-Webservice",
     "description": "format for the EmployeeDayIntervals-Webservice",
     "type": "object",
     "type": "object",
     "properties": {
     "$defs": {
         "Employees": {
         "planSymbolObjectType": {
             "type": "array",
             "type": "object",
             "description": "Array der Personen für die Daten gefunden wurden",
             "description": "Plansymbol",
             "items": {
             "properties": {
                 "type": "object",
                 "PlanSymbolCode": {
                 "properties": {
                    "type": "string",
                     "EmployeeID": {
                    "description": "Kurzcode des Planungscodes"
                        "type": "string",
                },
                        "description": "Personalnummer"
                 "PlanSymbolCodeExt": {
                     },
                     "type": "string",
                    "Surname": {
                    "description": "Externer Kurzcode des Planungscodes"
                        "type": "string",
                },
                        "description": "Zuname"
                "PlanSymbolType": {
                    },
                    "type": "string",
                    "Forename": {
                    "description": "Typ des Planungscodes 'Anwesend' oder 'Abwesend'"
                        "type": "string",
                },
                        "description": "Vorname"
                "Label": {
                    },
                    "type": "string",
                    "EmployeeTitleBeforeName": {
                     "description": "Bezeichnung des Planungscodes"
                        "type": "string",
                }
                        "description": "Titel vor Name"
            }
                    },
        },
                    "EmployeeTitleAfterName": {
        "shiftObjectType": {
                        "type": "string",
            "type": "object",
                        "description": "Titel nach Name"
            "description": "Dienst",
                    },
            "properties": {
                    "MasterAllocation": {
                "Label": {
                        "type": "string",
                    "type": "string",
                        "description": "Stammplanungseinheit"
                    "description": "Bezeichnung des Dienstes"
                    },
                },
                    "EmployeeJobGroup": {
                "ShiftAnnotation": {
                        "type": "string",
                    "type": "string",
                        "description": "Berufsgruppe"
                    "description": "Anmerkungen"
                    },
                }
                    "Days": {
            }
                        "type": "array",
        },
                        "description": "Array aller Tage für die Daten gefunden wurden",
        "extraObjectType": {
                         "items": {
            "type": "object",
                             "type": "object",
            "properties": {
                             "properties": {
                "Key": {
                                "ForDate": {
                    "type": "string",
                                    "type": "string",
                    "description": "Name der Sonderabrechnung"
                                    "description": "Datum des Tages"
                },
                                },
                "Label": {
                                "ForState": {
                    "type": "string",
                                    "type": "string",
                    "description": "Bezeichnung der Sonderabrechnung"
                                    "description": "Status des Tages"
                },
                                },
                "Value": {
                                "TextCategory": {
                    "type": "string",
                                    "type": "string",
                    "description": "Wert der Sonderabrechnung"
                                    "description": "Textkategorie des Tages"
                }
                                },
            }
                                "InfoText": {
        },
                                    "type": "string",
        "planObjectType": {
                                    "description": "Tagtext"
            "type": "object",
                                },
            "description": "Plan",
                                "DayPlanSymbol": {
            "properties": {
                                    "type": "string",
                "PlanCode": {
                                    "description": "Abwesenheit auf Tag (nur Planungscodes mit Typ 'Abwesend')"
                    "type": "string",
                                 },
                    "description": "Kurzcode des Plans"
                                 "DayPlanSymbolObject": {
                }
                                     "type": "object",
            }
                                    "description": "Plansymbol auf Tag",
        },
                                     "properties": {
        "properties": {
                                         "PlanSymbolCode": {
            "Employees": {
                                            "type": "string",
                "type": "array",
                                            "description": "Kurzcode des Planungscodes"
                "description": "Array der Personen für die Daten gefunden wurden",
                                        },
                "items": {
                                        "PlanSymbolCodeExt": {
                    "type": "object",
                                            "type": "string",
                    "properties": {
                                            "description": "Externer Kurzcode des Planungscodes"
                         "EmployeeID": {
                                        },
                             "type": "string",
                                        "PlanSymbolType": {
                             "description": "Personalnummer"
                                            "type": "string",
                        },
                                            "description": "Typ des Planungscodes 'Anwesend' oder 'Abwesend'"
                        "Surname": {
                                        }
                            "type": "string",
                                     }
                            "description": "Zuname"
                                },
                        },
                                "DayShift1": {
                        "Forename": {
                                    "type": "string",
                            "type": "string",
                                    "description": "1. Dienst am Tag"
                            "description": "Vorname"
                                },
                        },
                                "DayShift2": {
                        "EmployeeTitleBeforeName": {
                                    "type": "string",
                            "type": "string",
                                    "description": "2. Dienst am Tag"
                            "description": "Titel vor Name"
                                },
                        },
                                "DayRequestKind": {
                        "EmployeeTitleAfterName": {
                                    "type": "string",
                            "type": "string",
                                    "description": "Aufgabe am Tag"
                            "description": "Titel nach Name"
                                },
                        },
                                "DayEvents": {
                        "MasterAllocation": {
                                    "type": "array",
                            "type": "string",
                                    "description": "zusätzliche Aufgaben am Tag",
                            "description": "Stammplanungseinheit"
                                    "items" : {
                        },
                                        "type": "object",
                        "MasterAllocationObject": {
                                        "properties": {
                            "$ref": "#/$defs/planObjectType"
                                            "Label": {
                        },
                                                "type": "string",
                        "EmployeeJobGroup": {
                                                "description": "Bezeichnung der Aufgabe"
                            "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": {
                                "ForeignShift1": {
                                        "type": "string",
                                    "type": "string",
                                        "description": "1. Dienst auf anderer Planungseinheit: Bezeichnung von Planungseinheit"
                                    "description": "1. Dienst auf anderer Planungseinheit: Bezeichnung von Planungseinheit"
                                    },
                                },
                                    "ForeignShift2": {
                                "ForeignShift2": {
                                        "type": "string",
                                    "type": "string",
                                        "description": "2. Dienst auf anderer Planungseinheit: Bezeichnung von Planungseinheit"
                                    "description": "2. Dienst auf anderer Planungseinheit: Bezeichnung von Planungseinheit"
                                     },
                                },
                                     "DayTotalMinutesComputed": {
                                "DayTotalMinutesComputed": {
                                     "type": "string",
                                    "description": "Total in Minuten aus Status"
                                },
                                "DayPoolAllocations": {
                                     "type": "array",
                                    "description": "Array aller Poolzuteilungen an diesem Tag",
                                    "items": {
                                         "type": "string",
                                         "type": "string",
                                         "description": "Bezeichnung von Planungseinheit"
                                         "description": "Total in Minuten aus Status"
                                     }
                                     },
                                },
                                    "DayPoolAllocations": {
                                "AssignedExtra": {
                                        "type": "array",
                                    "type": "array",
                                        "description": "Array aller Poolzuteilungen an diesem Tag",
                                    "description": "Array aller Sonderabrechnung am Tag",
                                        "items": {
                                    "items": {
                                             "type": "string",
                                        "type": "object",
                                             "description": "Bezeichnung von Planungseinheit"
                                        "properties": {
                                             "Key": {
                                                "type": "string",
                                                "description": "Name der Sonderabrechnung"
                                            },
                                             "Label": {
                                                "type": "string",
                                                "description": "Bezeichnung der Sonderabrechnung"
                                            },
                                            "Value": {
                                                "type": "string",
                                                "description": "Wert der Sonderabrechnung"
                                            }
                                         }
                                         }
                                     }
                                     },
                                },
                                    "AssignedExtra": {
                                "DayIntervals": {
                                        "type": "array",
                                    "type": "array",
                                        "description": "Array aller Sonderabrechnung am Tag",
                                    "description": "Array aller Kommt/Geht-Paare am Tag",
                                        "items": {
                                    "items": {
                                            "$ref": "#/$defs/extraObjectType"
                                        "type": "object",
                                         },
                                         "properties": {
                                        "DayIntervals": {
                                            "From": {
                                            "type": "array",
                                                "type": "string",
                                             "description": "Array aller Kommt/Geht-Paare am Tag",
                                                "description": "Kommt-Zeitpunkt"
                                             "items": {
                                            },
                                            "To": {
                                                "type": "string",
                                                "description": "Geht-Zeitpunkt"
                                            },
                                             "DayIntervalPlanSymbol": {
                                                "type": "string",
                                                "description": "Abwesenheit auf Kommt/Geht-Paar (nur Planungscodes mit Typ 'Abwesend')"
                                            },
                                             "DayIntervalPlanSymbolObject": {
                                                 "type": "object",
                                                 "type": "object",
                                                "description": "Plansymbol auf Kommt/Geht-Paar",
                                                 "properties": {
                                                 "properties": {
                                                     "PlanSymbolCode": {
                                                     "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",
                                                         "type": "string",
                                                         "description": "Kurzcode des Planungscodes"
                                                         "description": "Textkategorie auf Kommt/Geht-Paar"
                                                     },
                                                     },
                                                     "PlanSymbolCodeExt": {
                                                     "DayIntervalInfoText": {
                                                         "type": "string",
                                                         "type": "string",
                                                         "description": "Externer Kurzcode des Planungscodes"
                                                         "description": "Text auf Kommt/Geht-Paar"
                                                     },
                                                     },
                                                     "PlanSymbolType": {
                                                     "DayIntervalShift": {
                                                         "type": "string",
                                                         "type": "string",
                                                         "description": "Typ des Planungscodes 'Anwesend' oder 'Abwesend'"
                                                         "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"
                                                        }
                                                     }
                                                     }
                                                }
                                            },
                                            "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"
                                            },
                                            "DayIntervalAssignedEvents": {
                                                "type": "array",
                                                "description": "Array von Aufgaben auf Kommt/Geht-Paar",
                                                "items": {
                                                    "type": "string",
                                                    "description": "Bezeichnung von Aufgabe"
                                                 }
                                                 }
                                             }
                                             }
Zeile 277: Zeile 310:


== Beispiele ==
== Beispiele ==
=== Beispiel gesamtes Personal ===
=== Beispiel 1: gesamtes Personal ===


==== Ausgangssituation ====
==== Ausgangssituation ====
Zeile 301: Zeile 334:


<code>
<code>
[http://localhost:4401/EmployeeDayIntervals?allEmployees=true&begin=01.03.2023&end=02.03.2023]http://localhost:4401/EmployeeDayIntervals?allEmployees=true&begin=01.03.2023&end=01.03.2023
[http://localhost:4401/EmployeeDayIntervals?allEmployees=true&begin=01.03.2023&end=02.03.2023 http://localhost:4401/EmployeeDayIntervals?allEmployees=true&begin=01.03.2023&end=01.03.2023]
</code>
</code>


==== Ergebnis ====
==== Ergebnis ====
Nach dem Aufruf der URL erhaltet man die Tagesinformationen für das gesamte Personal vom 01.03.2023.
<div class=" mw-collapsible mw-collapsed" overflow:auto;">
<div class=" mw-collapsible mw-collapsed" overflow:auto;">
<div>'''JSON Datei'''</div>
<div>'''JSON Datei'''</div>
Zeile 554: Zeile 585:
[https://drive.google.com/open?id=1YYa8Ne8M6ToACGVUdor8DH0tTe0PpQWK&authuser=alex%40bitfactory.at&usp=drive_fs DokuDB Bsp 1]
[https://drive.google.com/open?id=1YYa8Ne8M6ToACGVUdor8DH0tTe0PpQWK&authuser=alex%40bitfactory.at&usp=drive_fs DokuDB Bsp 1]


=== Beispiel 2 ===
=== Beispiel 2: Personal mit Personalnummer ===
=== Beispiel Personal mit Personalnummer ===


==== Ausgangssituation ====
==== Ausgangssituation ====
Der Dienstplan A hat in diesem Beispiel 4 Mitarbeiter. Folgende Personalnummer sind erfasst:
Der Dienstplan A hat in diesem Beispiel 4 Mitarbeiter. Folgende Personalnummer sind erfasst:


* Weitblick
* Weitblick: 4711
**Personalnummer: 4711
* Rentier: 8812
* Rentier
* Imglück: 5412
** Personalnummer: 8812
* Bauer: 4
* Imglück
** Personalnummer: 5412
* Bauer
** Personalnummer: 4


{{AlexBild|Mitarbeiter mit der Personalnummer|[[Datei:Webservice Tagesinformationen 1676555414985.png|300px]]}}
{{AlexBild|Mitarbeiter mit der Personalnummer|[[Datei:Webservice Tagesinformationen 1676555414985.png|300px]]}}
Zeile 574: Zeile 600:
Ein Alex-Server muss auf die unten angehängte Datenbank gestartet werden.
Ein Alex-Server muss auf die unten angehängte Datenbank gestartet werden.


Danach können die Personalinformationen und Tagesinformationen mit der Personalnummer: 4 von 01.03.2021 abgerufen werden, wenn folgende URL in einem Webbrowser am selben PC eingegeben wird:
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:


<code>
<code>
[http://localhost:4401/EmployeeDayIntervals?id=1&begin=01.03.2023&end=01.03.2023]http://localhost:4401/EmployeeDayIntervals?id=4&begin=01.03.2023&end=01.03.2023
[http://localhost:4401/EmployeeDayIntervals?id=1&begin=01.03.2023&end=01.03.2023 http://localhost:4401/EmployeeDayIntervals?id=4&begin=01.03.2023&end=01.03.2023]
</code>
</code>


==== Ergebnis ====
==== Ergebnis ====
Nach dem Aufruf der URL erhaltet man die Mitarbeiterinformationen und Tagesinformationen von 01.03.2023
<div class=" mw-collapsible mw-collapsed" overflow:auto;">
<div class=" mw-collapsible mw-collapsed" overflow:auto;">
<div>'''JSON Datei'''</div>
<div>'''JSON Datei'''</div>
Zeile 641: Zeile 665:
</div></div>
</div></div>


=== Beispiel 3 ===
==== Datenbank für Beispiel ====
=== Beispiel Personal auf Plan X ===
[https://drive.google.com/open?id=1-2vlHff6JM1L1ly-Elq0GGKRYWpu4u-x&authuser=alex%40bitfactory.at&usp=drive_fs DokuDB Bsp 2]
 
=== Beispiel 3: Personal auf Plan ===


==== Ausgangssituation ====
==== Ausgangssituation ====
Zeile 648: Zeile 674:


'''Dienstplan A'''
'''Dienstplan A'''
Kurzzeichen: PA
Kurzzeichen: PA
* Weitblick
* Weitblick
Zeile 659: Zeile 684:
==== Aufruf der Funktion ====
==== Aufruf der Funktion ====
Ein Alex-Server muss auf die unten angehängte Datenbank gestartet werden.
Ein Alex-Server muss auf die unten angehängte Datenbank gestartet werden.
Danach kann man das gesamte Personal und die Tagesinformationen auf dem gewünschten Dienstplan mit dem Kurzzeichen: PA von einem Zeitraum von 01.03.2023 abgerufen werden, wenn folgende URL in einem Webbrowser am selben PC eingegeben wird:
 
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:


<code>
<code>
[http://localhost:4401/EmployeeDayIntervals?planCode=PA&begin=01.03.2023&end=01.03.2023](http://localhost:4401/EmployeeDayIntervals?planCode=PA&begin=01.03.2023&end=01.03.2023)
[http://localhost:4401/EmployeeDayIntervals?planCode=PA&begin=01.03.2023&end=01.03.2023 http://localhost:4401/EmployeeDayIntervals?planCode=PA&begin=01.03.2023&end=01.03.2023]
</code>
</code>


==== Ergebnis ====
==== Ergebnis ====
Nach dem Aufruf der URL erhaltet man die Mitarbeiterinformationen und Tagesinformationen von 01.03.2023
<div class=" mw-collapsible mw-collapsed" overflow:auto;">
<div class=" mw-collapsible mw-collapsed" overflow:auto;">
<div>'''JSON Datei'''</div>
<div>'''JSON Datei'''</div>
Zeile 882: Zeile 906:
</div></div>
</div></div>


=== Beispiel 4 ===
==== Datenbank für Beispiel ====
=== Beispiel Personal auf Plan X mit der Personalnummer X ===
[https://drive.google.com/open?id=1-HgZmWL_VQRX4rfH5wWFrACZIBP-CGY_&authuser=alex%40bitfactory.at&usp=drive_fs DokuDB Bsp 3]
 
=== Beispiel 4: Beispiel Personal auf Plan und Personal mit Personalnummer ===


==== Ausgangssituation ====
==== Ausgangssituation ====
In diesem Beispiel sind jeweils 2 Dienstpläne mit jeweils 2 Mitarbeiter erfasst:
In diesem Beispiel sind jeweils zwei Dienstpläne mit jeweils zwei Mitarbeiter erfasst:


'''Dienstplan A'''
'''Dienstplan A'''


Kurzzeichen: PA
Kurzzeichen: PA
* Weitblick
* Weitblick: 4711
** Personalnummer: 4711
* Rentier: 8812
* Rentier
 
** Personalnummer: 8812
{{AlexBild|Dienstplan A|[[Datei:Webservice Tagesinformationen 1676630030389.png|300px]]}}


'''Dienstplan C'''
'''Dienstplan C'''


Kurzzeichen: PC
Kurzzeichen: PC
* Imglück
* Imglück: 5412
** Personalnummer: 5412
* Bauer: 4
* Bauer
** Personalnummer: 4
 
{{AlexBild|Dienstplan A|[[Datei:Webservice Tagesinformationen 1676630030389.png|300px]]}}


{{AlexBild|Dienstplan C|[[Datei:Webservice Tagesinformationen 1676630095000.png|300px]]}}
{{AlexBild|Dienstplan C|[[Datei:Webservice Tagesinformationen 1676630095000.png|300px]]}}
Zeile 910: Zeile 932:
==== Aufruf der Funktion ====
==== Aufruf der Funktion ====
Ein Alex-Server muss auf die unten angehängte Datenbank gestartet werden.
Ein Alex-Server muss auf die unten angehängte Datenbank gestartet werden.
Danach kann man das Personal mit der Personalnummer und mit dem Kurzzeichen vom Dienstplan A und Dienstplan C von 01.03.2023 abgerufen werden, wenn folgende URL in einem Webbrowser am selben PC eingegeben wird:
 
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:


<code>
<code>
[http://localhost:4401/EmployeeDayIntervals?begin=01.03.2023&end=01.03.2023&resourcesBson=](http://localhost:4401/EmployeeDayIntervals?begin=01.03.2023&end=01.03.2023&resourcesBson=){"employeeIDs":["4", "4711", "8812", "5412"],"planCodes":["PA","PC"]}
[http://localhost:4401/EmployeeDayIntervals?begin=01.03.2023&end=01.03.2023&resourcesBson=%7B%22employeeIDs%22%3A%5B%224%22%5D%2C%22planCodes%22%3A%5B%22PA%22%5D%7D <nowiki>http://localhost:4401/EmployeeDayIntervals?begin=01.03.2023&end=01.03.2023&resourcesBson={"employeeIDs":["4"],"planCodes":["PA"]}</nowiki>]
</code>
</code>


Zeile 979: Zeile 1.002:
             "EmployeeTitleAfterName": "",
             "EmployeeTitleAfterName": "",
             "MasterAllocation": "Plan A",
             "MasterAllocation": "Plan A",
             "EmployeeJobGroup": "Häuptling",
             "EmployeeJobGroup": "Häuptling",
             "Days": [
             "Days": [
                 {
                 {
Zeile 1.066: Zeile 1.089:
                         }
                         }
                     ]
                     ]
                }
            ]
        },
        {
            "EmployeeID": "5412",
            "Surname": "Imglück",
            "Forename": "Hans",
            "Nickname": "Lucky",
            "EmployeeTitleBeforeName": "",
            "EmployeeTitleAfterName": "",
            "MasterAllocation": "Plan C",
            "EmployeeJobGroup": "Arbeitstier",
            "Days": [
                {
                    "ForDate": "01.03.2023",
                    "ForState": "Ist",
                    "TextCategory": "",
                    "InfoText": "",
                    "DayPlanSymbol": "K",
                    "DayPlanSymbolObject": {
                        "PlanSymbolCode": "K",
                        "PlanSymbolType": "Abwesend"
                    },
                    "DayShift1": "",
                    "DayShift2": "",
                    "DayRequestKind": "",
                    "DayEvents": [],
                    "DayTotalMinutesComputed": 0.0,
                    "DayPoolAllocations": [],
                    "AssignedExtra": [],
                    "DayIntervals": []
                 }
                 }
             ]
             ]
Zeile 1.104: Zeile 1.096:
</div></div>
</div></div>


=== Beispiel 5 ===
==== Datenbank für Beispiel ====
=== Beispiel Personal mit Personalnummer X ===
[https://drive.google.com/open?id=1ON9bF4V_JR4jmWIlnCigWqNQhopvE2VF&authuser=alex%40bitfactory.at&usp=drive_fs DokuDB Bsp 4]
 
=== Beispiel 5: Alle Status ===


==== Ausgangssituation ====
==== Ausgangssituation ====
Zeile 1.119: Zeile 1.113:
==== Aufruf der Funktion ====
==== Aufruf der Funktion ====
Ein Alex-Server muss auf die unten angehängte Datenbank gestartet werden.
Ein Alex-Server muss auf die unten angehängte Datenbank gestartet werden.
Danach können die Personalinformationen und die Tagesinformationen von gesamten Dienstplan-Status mit der Personalnummer: 4711 von 01.03.2021 abgerufen werden, wenn folgende URL in einem Webbrowser am selben PC eingegeben wird:  
 
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:  


<code>
<code>
[http://localhost:4401/EmployeeDayIntervals?id=4711&begin=01.03.2023&end=01.03.2023&allstates=true](http://localhost:4401/EmployeeDayIntervals?id=4711&begin=01.03.2023&end=01.03.2023&allstates=true)
[http://localhost:4401/EmployeeDayIntervals?id=4711&begin=01.03.2023&end=01.03.2023&allstates=true http://localhost:4401/EmployeeDayIntervals?id=4711&begin=01.03.2023&end=01.03.2023&allstates=true]
</code>
</code>


==== Ergebnis ====
==== Ergebnis ====
Nach dem Aufruf der URL erhaltet man die Personalinformationen und Tagesinformationen vom gewünschten Personal von 01.03.2023.
<div class=" mw-collapsible mw-collapsed" overflow:auto;">
<div class=" mw-collapsible mw-collapsed" overflow:auto;">
<div>'''JSON Datei'''</div>
<div>'''JSON Datei'''</div>
Zeile 1.222: Zeile 1.215:
  }
  }
</div></div>
</div></div>
==== Datenbank für Beispiel ====
[https://drive.google.com/open?id=1ON9bF4V_JR4jmWIlnCigWqNQhopvE2VF&authuser=alex%40bitfactory.at&usp=drive_fs DokuDB Bsp 5]


== Beispielanfragen ==
== Beispielanfragen ==

Aktuelle Version vom 15. März 2024, 12:13 Uhr


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:

JSON-Schema Datei
{
   "$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
Webservice Tagesinformationen 1676549453058.png

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

JSON Datei
{
   "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

DokuDB Bsp 1

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
Webservice Tagesinformationen 1676555414985.png

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

JSON Datei
{
   "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

DokuDB Bsp 2

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
Webservice Tagesinformationen 1676555414985.png

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

JSON Datei
{
   "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

DokuDB Bsp 3

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
Webservice Tagesinformationen 1676630030389.png

Dienstplan C

Kurzzeichen: PC

  • Imglück: 5412
  • Bauer: 4
Dienstplan C
Webservice Tagesinformationen 1676630095000.png

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:

http://localhost:4401/EmployeeDayIntervals?begin=01.03.2023&end=01.03.2023&resourcesBson={"employeeIDs":["4"],"planCodes":["PA"]}

Ergebnis

JSON Datei
{
   "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

DokuDB Bsp 4

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
Webservice Tagesinformationen 1676630030389.png

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

JSON Datei
{
   "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

DokuDB Bsp 5

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

JSON-Datei einer Ausgabe
{
 "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": []
           }
         ]
       }
     ]
   }
 ]
}

Fußnoten

Diskussionen