| Zeile 116: | Zeile 116: | ||
= Beispiel = | = Beispiel = | ||
{ | |||
"Employees": [ | |||
{ | |||
"EmployeeID": "20", | |||
"Surname": "Quatember", | |||
"Forename": "Marcus", | |||
"MasterAllocation": "Steyr", | |||
"EmployeeJobGroup": "SW-Entwicklung", | |||
"Days": [ | |||
{ | |||
"ForDate": "05.12.2017", | |||
"ForState": "Ist", | |||
"InfoText": "", | |||
"DayPlanSymbol": "", | |||
"DayShift1": "8", | |||
"DayShift2": "", | |||
"DayRequestKind": "", | |||
"DayTotalMinutesComputed": 480.0, | |||
"DayPoolAllocations": [], | |||
"AssignedExtra": [ | |||
{ | |||
"Key": "9010", | |||
"Value": 0.0 | |||
} | |||
], | |||
"DayIntervals": [ | |||
{ | |||
"From": "05.12.2017 8:00", | |||
"To": "05.12.2017 12:00", | |||
"DayIntervalPlanSymbol": "", | |||
"DayIntervalInfoTextCategory": "", | |||
"DayIntervalInfoText": "", | |||
"DayIntervalAssignedEvents": [] | |||
}, | |||
{ | |||
"From": "05.12.2017 13:00", | |||
"To": "05.12.2017 17:00", | |||
"DayIntervalPlanSymbol": "", | |||
"DayIntervalInfoTextCategory": "", | |||
"DayIntervalInfoText": "", | |||
"DayIntervalAssignedEvents": [] | |||
} | |||
] | |||
}, | |||
{ | |||
"ForDate": "06.12.2017", | |||
"ForState": "Ist", | |||
"InfoText": "", | |||
"DayPlanSymbol": "", | |||
"DayShift1": "8", | |||
"DayShift2": "", | |||
"DayRequestKind": "", | |||
"DayTotalMinutesComputed": 360.0, | |||
"DayPoolAllocations": [ "Plan A", "Plan B" ], | |||
"AssignedExtra": [], | |||
"DayIntervals": [ | |||
{ | |||
"From": "06.12.2017 8:00", | |||
"To": "06.12.2017 12:00", | |||
"DayIntervalPlanSymbol": "", | |||
"DayIntervalInfoTextCategory": "", | |||
"DayIntervalInfoText": "", | |||
"DayIntervalAssignedEvents": [] | |||
}, | |||
{ | |||
"From": "06.12.2017 13:00", | |||
"To": "06.12.2017 15:00", | |||
"DayIntervalPlanSymbol": "", | |||
"DayIntervalInfoTextCategory": "", | |||
"DayIntervalInfoText": "", | |||
"DayIntervalAssignedEvents": [] | |||
}, | |||
{ | |||
"From": "06.12.2017 15:00", | |||
"To": "06.12.2017 17:00", | |||
"DayIntervalPlanSymbol": "Z", | |||
"DayIntervalInfoTextCategory": "", | |||
"DayIntervalInfoText": "", | |||
"DayIntervalAssignedEvents": [] | |||
} | |||
] | |||
}, | |||
{ | |||
"ForDate": "07.12.2017", | |||
"ForState": "Ist", | |||
"InfoText": "", | |||
"DayPlanSymbol": "", | |||
"DayShift1": "8", | |||
"DayShift2": "", | |||
"DayRequestKind": "", | |||
"DayTotalMinutesComputed": 480.0, | |||
"DayPoolAllocations": [ "Plan B" ], | |||
"AssignedExtra": [], | |||
"DayIntervals": [ | |||
{ | |||
"From": "07.12.2017 8:00", | |||
"To": "07.12.2017 12:00", | |||
"DayIntervalPlanSymbol": "", | |||
"DayIntervalInfoTextCategory": "", | |||
"DayIntervalInfoText": "", | |||
"DayIntervalAssignedEvents": [] | |||
}, | |||
{ | |||
"From": "07.12.2017 13:00", | |||
"To": "07.12.2017 17:00", | |||
"DayIntervalPlanSymbol": "", | |||
"DayIntervalInfoTextCategory": "", | |||
"DayIntervalInfoText": "", | |||
"DayIntervalAssignedEvents": [] | |||
} | |||
] | |||
} | |||
] | |||
} | |||
] | |||
} | |||
[[Kategorie:Neu ab Version 2018.04]] | [[Kategorie:Neu ab Version 2018.04]] | ||
Version vom 12. November 2020, 07:46 Uhr
Es gibt auch eine Variante als Export-Schnittstelle.
Konfiguration für Config-File:
, "httpServicePlugins" :
{ "0" : "Bfx.Alex.AccountsReport.DayInterval.Model.dll"
}
, "serverDaemonPlugins" :
{ "0" : "Bfx.HTTP.Server.dll"
}
Aufruf
http://IP:PORT/EmployeeDayIntervals?PARAMETER
- IP: Wie im ALEX-Config-File eingestellt
- HTTP-Server-PORT: Wie im ALEX-Config-File eingestellt
- PARAMETER:
- Ressourcen können folgendermaßen angegeben werden
- "allEmployees": gesamtes Personal
- "id": Personalnummer
- "planCode": Kurzzeichen von Plan
- "resourcesBson": eine Zusammenfassung von Plan Kurzzeichen und Personalnummer zum Beispiel: "?resourcesBson={"employeeIDs":["E1","E2","E3"],"planCodes":["P1","P2","P3"]}"
- "begin": Begin-Datum des Datenauszuges Format "DD.MM.YYYY"
- "end": Ende-Datum des Datenauszuges Format "DD.MM.YYYY"
- "allstates": Statusdaten für alle aktuellen Status: Planung -> Planung, Ist -> Planung und Ist
- Ressourcen können folgendermaßen angegeben werden
Sicherer Link-Aufruf
In den Systemeinstellungen kann unter den "WebApiServer Einstellungen" ein Key generiert werden. Dieser Key muss dann bei jedem Aufruf beim HTTP-Server mit `?WebApiServerKey=<generierter Key>` mitgegeben werden. Der Key kann nicht mehr verändert werden.
Parameter auf "ja" setzen und "Ausführen" klicken, dann wird Key hinterlegt.
Beispiel:
http://localhost:4480/EmployeeDayIntervals?id=20&begin=05.12.2017&end=07.12.2017&WebApiServerKey=xxxx-xxxx-xxxx-xxxx-xxxx
Beispiele
Alle Tagesinformationen von gesamten Personal von 05.12.2017 bis einschließlich 07.12.2017:
http://localhost:4480/EmployeeDayIntervals?allEmployees=true&begin=05.12.2017&end=07.12.2017
Alle Tagesinformationen von Personal mit Personalnummer "20" von 05.12.2017 bis einschließlich 07.12.2017:
http://localhost:4480/EmployeeDayIntervals?id=20&begin=05.12.2017&end=07.12.2017
Alle Tagesinformationen von Personal auf Plan "X" von 01.12.2017 bis einschließlich 31.12.2017:
http://localhost:4480/EmployeeDayIntervals?planCode=X&begin=01.12.2017&end=31.12.2017
Alle Tagesinformationen von Personal "E1", "E2", "E3" und Personal auf Plänen "P1", "P2", "P3" von 01.12.2017 bis einschließlich 31.12.2017:
http://localhost:4480/EmployeeDayIntervals?begin=01.12.2017&end=31.12.2017&resourcesBson={"employeeIDs":["E1","E2","E3"],"planCodes":["P1","P2","P3"]}
Alle Tagesinformationen von Personal mit Personalnummer "20" von 05.12.2017 bis einschließlich 07.12.2017, alle Status:
http://localhost:4480/EmployeeDayIntervals?id=20&begin=05.12.2017&end=07.12.2017&allstates=true
Ergebnis
Tagesinformation im JSON-Format UTF8 codiert in der Form:
{ "Employees" : [
{ "EmployeeID" : "string"
, "Surname" : "string"
, "Forename" : "string"
, "MasterAllocation" : "string"
, "EmployeeJobGroup" : "string"
, "Days" : [
{ "ForDate" : "string"
, "ForState" : "string"
, "TextCategory" : "string"
, "InfoText" : "string"
, "DayPlanSymbol" : "string"
, "DayShift1" : "string"
, "DayShift2" : "string"
, "DayRequestKind" : "string"
, "DayTotalMinutesComputed" : "float"
, "DayPoolAllocations" : [ "string" ]
, "AssignedExtra" : [ { "Key" : "string", "Value" : float } ]
, "DayIntervals" : [
{ "From" : "string"
, "To" : "string"
, "DayIntervalPlanSymbol" : "string"
, "DayIntervalInfoTextCategory" : "string"
, "DayIntervalInfoText" : "string"
, "DayIntervalAssignedEvents" : [ "string" ]
}
]}
]}
]}
Glossar:
- Employees: Array aller Personen
- EmployeeID: Personalnummer
- Surname: Zuname
- Forename: Vorname
- MasterAllocation: Stammplanungseinheit
- EmployeeJobGroup: Berufsgruppe
- Days: Array aller Tage
- ForDate: Datum von Tag
- ForState: Status von Tag
- InfoText: Text auf Tag
- DayPlanSymbol: Abwesenheit auf Tag (nur Planungscodes mit Typ "Abwesenheit")
- DayShift1: Dienst 1 auf Tag
- DayShift2: Dienst 2 auf Tag
- DayRequestKind: Aufgabe auf Tag
- DayTotalMinutesComputed: Total in Minuten aus Status
- DayPoolAllocations: Array aller Poolzuteilungen an diesem Tag
- AssignedExtra: Array aller Sonderabrechnung/Wert-Paare an diesem Tag
- DayIntervals: Array aller Kommt/Geht-Zeiten
- From: Komme
- To: Gehe
- DayIntervalPlanSymbol: Abwesenheit auf Kommt/Geht (nur Planungscodes mit Typ "Abwesenheit")
- DayIntervalInfoText: Text auf Kommt/Geht
- DayIntervalAssignedEvents: Array von Aufgaben
Beispiel
{
"Employees": [
{
"EmployeeID": "20",
"Surname": "Quatember",
"Forename": "Marcus",
"MasterAllocation": "Steyr",
"EmployeeJobGroup": "SW-Entwicklung",
"Days": [
{
"ForDate": "05.12.2017",
"ForState": "Ist",
"InfoText": "",
"DayPlanSymbol": "",
"DayShift1": "8",
"DayShift2": "",
"DayRequestKind": "",
"DayTotalMinutesComputed": 480.0,
"DayPoolAllocations": [],
"AssignedExtra": [
{
"Key": "9010",
"Value": 0.0
}
],
"DayIntervals": [
{
"From": "05.12.2017 8:00",
"To": "05.12.2017 12:00",
"DayIntervalPlanSymbol": "",
"DayIntervalInfoTextCategory": "",
"DayIntervalInfoText": "",
"DayIntervalAssignedEvents": []
},
{
"From": "05.12.2017 13:00",
"To": "05.12.2017 17:00",
"DayIntervalPlanSymbol": "",
"DayIntervalInfoTextCategory": "",
"DayIntervalInfoText": "",
"DayIntervalAssignedEvents": []
}
]
},
{
"ForDate": "06.12.2017",
"ForState": "Ist",
"InfoText": "",
"DayPlanSymbol": "",
"DayShift1": "8",
"DayShift2": "",
"DayRequestKind": "",
"DayTotalMinutesComputed": 360.0,
"DayPoolAllocations": [ "Plan A", "Plan B" ],
"AssignedExtra": [],
"DayIntervals": [
{
"From": "06.12.2017 8:00",
"To": "06.12.2017 12:00",
"DayIntervalPlanSymbol": "",
"DayIntervalInfoTextCategory": "",
"DayIntervalInfoText": "",
"DayIntervalAssignedEvents": []
},
{
"From": "06.12.2017 13:00",
"To": "06.12.2017 15:00",
"DayIntervalPlanSymbol": "",
"DayIntervalInfoTextCategory": "",
"DayIntervalInfoText": "",
"DayIntervalAssignedEvents": []
},
{
"From": "06.12.2017 15:00",
"To": "06.12.2017 17:00",
"DayIntervalPlanSymbol": "Z",
"DayIntervalInfoTextCategory": "",
"DayIntervalInfoText": "",
"DayIntervalAssignedEvents": []
}
]
},
{
"ForDate": "07.12.2017",
"ForState": "Ist",
"InfoText": "",
"DayPlanSymbol": "",
"DayShift1": "8",
"DayShift2": "",
"DayRequestKind": "",
"DayTotalMinutesComputed": 480.0,
"DayPoolAllocations": [ "Plan B" ],
"AssignedExtra": [],
"DayIntervals": [
{
"From": "07.12.2017 8:00",
"To": "07.12.2017 12:00",
"DayIntervalPlanSymbol": "",
"DayIntervalInfoTextCategory": "",
"DayIntervalInfoText": "",
"DayIntervalAssignedEvents": []
},
{
"From": "07.12.2017 13:00",
"To": "07.12.2017 17:00",
"DayIntervalPlanSymbol": "",
"DayIntervalInfoTextCategory": "",
"DayIntervalInfoText": "",
"DayIntervalAssignedEvents": []
}
]
}
]
}
]
}