This method allows to create a preventive maintenance based on a meter in a simplified manner.
The method to be used when creating a preventive maintenance based on a meter:
POST url/api/mytenant/myorganization/maintenance/preventivemaintenances
Json example for creating a preventive maintenance:
1. {
"preventiveMaintenanceKey": "0001",
"description": "Preventiva contador",
"remarks": null,
"projectionEndDate": "2021-12-31T00:00:00",
"joinPlans": true,
"timeZoneId": "GMT Standard Time",
"workOrderType": "MP",
"workshop": "MN",
"responsible": "001",
"assetType": 2,
"parentLocation": "ATC01",
"location": null,
"equipment": "ATC02",
"tool": null,
"maintenanceRoute": null,
"priorityLevel": "N",
"company": "DEMO",
"preventiveMaintenancePlans": [
{
"advanceTolerance": 1,
"delayTolerance": 1,
"events": 0,
"replacementStart": 0,
"interval": 250.000000,
"startValue": 120.000000,
"maintenancePlan": "MP-000001_1",
"operatingState": null,
"replacementCriteria": 0,
"mainMaintenancePlan": null,
"meter": "0001",
"expectedDuration": "00:30:00"
}
],
"customer": null,
"provider": null,
"workOrderState": "OT01",
"schedulingCriteria": 3
}
This method allows to create a preventive maintenance according to the parameters filled in:
i.PreventiveMaintenanceKey: Preventive maintenance key. This field is mandatory.
ii.description: Short description of the preventive maintenance. This field is mandatory.
iii.remarks: Remarks.
iv.projectionEndDate: the preventive maintenance projected end date.
v.joinPlans: Join plans. Fill in this field with true or false. If this parameter is not sent, it is filled in as true by default, that is, active.
vi.timeZoneId: Time zone. If you don't edit this parameter, the standard time zone is selected by default.
vii.workOrderType: The work order type key. Mandatory field.
viii.workshop: The key of the workshop. Mandatory field.
ix.responsible: The key of the person in charge. Mandatory field.
x.assetType: The asset type (1- location; 2- equipment; 3- tool; 4- route). Mandatory field.
xi.parentLocation: The key of the selected asset parent location. Mandatory field.
xii.location: The location's key.
xiii.equipment: The equipment key.
xiv.tool: The tool's key.
xv.maintenanceRoute: The route's key.
xvi.priorityLevel: The key of the priority level. Mandatory field.
xvii.company: The company's key. Mandatory field.
xviii.preventiveMaintenancePlans: Scheduled worksheet.
xix.customer: The customer's key.
xx.provider: The supplier's key.
xxi.workOrderState: The key of the WO state.
xxii.schedulingCriteria: Scheduling. (1- Fixed date; 2- Opening date; 3- Closing date). Mandatory field.
When
this method is executed successfully, it returns HttpStatusCode.201Created.