Maintenance Order creation
Endpoint: POST {{host}}/maintenance/orders - bude zrušen
Input Parameters: Maintenance Order object parameters

Endpoint: POST {{host}}/maintenance/orders/actions/create
Input Parameters: Maintenance Order object parameters + selfAssign a Assigned by user

Steps:
Maintenance Order is created with input parameters + following logic is used:
MO number is generated based on notification sequence.
Status Created is used
If Equipment is provided and equipment has associated user and Setting parameters Automatic assignment to responsible team/user is allowed → Assigned status is used for MO and user is assigned to MO
If Equipment is provided and equipment has associated team and Setting parameters Automatic assignment to responsible team/user + Allow maintenance planning mode by teams are allowed → AssignedToTeam status is used for MO and team is assigned to MO
If Self Assignment is requested → Time scheduled finish is set to current time
Notification for created MO is issued
If self assignment is requested → MO is assigned to current user, Maintenance Order Staff relation is created, Order Status is set to assigned, Assignment time is set. If team is provided, MO is assigned to team
If parameter idInstruction is provided, selected instructions are connected with the Maintenance Order. Otherwise if equipment is provided and equipment is connected with instructions, these instructions are connected with MO.
If equipment is provided statistics MTTR, MTBF and Average reaction time are recalculated
Empty Completition confirmation is assigned to MO