Valuekeep DevelopmentWork
DevelopmentWork
Work
Back | List of Articles

How to create a replacement-based preventive maintenance?

Last changed in 26/12/2024

This method allows to create a preventive maintenance based on a replacement criterion in a simplified manner.

The  method to be used when creating a preventive maintenance based on a replacement criterion:

POST  url/api/mytenant/myorganization/maintenance/preventivemaintenances

Json  example for creating a preventive maintenance:

 

1.       {

        "preventiveMaintenanceKey""PM-0001",

        "description""Preventiva planos de substituição",

        "remarks"null,

        "projectionEndDate""2021-12-18T00:00:00",

        "joinPlans"true,

        "timeZoneId""GMT Standard Time",

        "workOrderType""MP",

        "workshop""MN",

        "responsible""0006",

        "assetType"1,

        "parentLocation"null,

        "location""AUD",

        "equipment"null,

        "tool"null,

        "maintenanceRoute"null,

        "priorityLevel""N",

        "company""DEMO",

        "preventiveMaintenancePlans": [

            {

                "recurrenceConfig""{"timeZoneOffsetMinutes":60,"repeatType":"monthly","repeatEvery":1,"startHour":"2021-08-19T23:00:00.000Z","startDate":"2021-08-19T23:00:00.000Z","endType":"withoutenddate","endCount":0,"endDate":null,"week":{"repeatSun":false,"repeatMon":false,"repeatTue":false,"repeatWed":false,"repeatThu":false,"repeatFri":false,"repeatSat":false},"month":{"repeatMonthType":"onthe","repeatMonthDayNumber":0,"repeatMonthDayRule":"first","repeatMonthDay":"Mon"}}",

                "advanceTolerance"1,

                "delayTolerance"1,

                "events"0,

                "replacementStart"0,

                "interval"null,

                "startValue"null,

                "meterAverage"null,

                "meterStartValue"null,

                "maintenancePlan""MP-000001_1",

                "operatingState"null,

                "replacementCriteria"1,

                "mainMaintenancePlan"null,

                "meter"null,

                "expectedDuration"null

            },

            {

                "recurrenceConfig"null,

                "advanceTolerance"1,

                "delayTolerance"1,

                "events"4,

                "replacementStart"0,

                "interval"null,

                "startValue"null,

                "maintenancePlan""MP-000012_1",

                "operatingState"null,

                "replacementCriteria"3,

                "mainMaintenancePlan""MP-000001_1",

                "meter"null,<

This method allows to create a preventive maintenance according to the parameters filled in:

  1. PreventiveMaintenanceKey: Preventive maintenance key. This field is mandatory.
  2. description: Short description of the preventive maintenance. This field is mandatory.
  3. remarks: Remarks.
  4. projectionEndDate: the preventive maintenance projected end date.
  5. 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.
  6. timeZoneId: Time zone. If you don't edit this parameter, the standard time zone is selected by default.
  7. workOrderType: The work order type key. Mandatory field.
  8. workshop: The key of the workshop. Mandatory field.
  9. responsible: The key of the person in charge. Mandatory field.
  10. assetType: The asset type (1- location; 2- equipment; 3- tool; 4- route). Mandatory field.
  11. parentLocation: The key of the selected asset parent location. Mandatory field.
  12. location: The location's key.
  13. equipment: The equipment key.
  14. tool: The tool's key.
  15. maintenanceRoute: The route's key.
  16. priorityLevel: The key of the priority level. Mandatory field.
  17. company: The company's key. Mandatory field.
  18. preventiveMaintenancePlans: Scheduled worksheet.
    • recurrenceConfig: Recurrence configuration. Mandatory for preventive maintenances based in recurrence.
      • repeatType: daily for a daily recurrence; weekly for a weekly recurrence; monthly for a monthly recurrence.
      • repeatEvery: Happens every added number. For example, if monthly is selected and you insert a 2 here, this means that it will happen every 2 months.
      • startHour: Start date;
      • endType: Without end date (withoutenddate); ends after X (number) of occurrences (endCount); ends in the date X (endDate).
      • repeatSun: Sunday. Insert true or false.
      • repeatMon: Monday. Insert true or false.
      • repeatTue: Tuesday. Insert true or false.
      • repeatWed: Wednesday. Insert true or false.
      • repeatThu: Thursday. Insert true or false.
      • repeatFri: Friday. Insert true or false.
      • repeatSat: Saturday. Insert true or false.
      • repeatMonthDayNumber: Occurs every first day of the month.
      • repeatMonthDayRule: Occurs on the first, second, third,... or last day of the month.
      • repeatMonthDay: Occurs Sunday (Sun), Monday (Mon); Tuesday (Tue); Wednesday (Wed); Thursday (Thu); Friday (Fri); Saturday (Sat); Day; Week day; Weekend day.
    • advanceTolerance: advance tolerance number.
    • delayTolerance: delay tolerance number.
    • events: number of events.
    • replacementStart: Starts at. Defines the number of events being saved before starting to replace the main plan with another plan.
    • interval: Interval value. Mandatory field for preventive maintenances based on meters.
    • startValue: Start value. Mandatory field for preventive maintenances based on meters.
    • maintenanceplan: The maintenance plan key. Mandatory field.
    • operatingState: The key of the operating state.
    • replacementCriteria: Replacement criteria. (0 - none; 1- main (Multiplier); 3- replacement).
    • mainMaintenancePlan: The maintenance plan key.
    • meter: The meter's key. Mandatory field for preventive maintenances based on meters.
    • expectedDuration: Expected duration of the preventive plan. The format is the following: d.hh:mm:ss (d - days, hh - hours, mm - minutes, ss - seconds).
  19. customer: The customer's key.
  20. provider: The supplier's key.
  21. workOrderState: The key of the WO state.
  22. schedulingCriteria: Scheduling. (1- Fixed date; 2- Opening date; 3- Closing date). Mandatory field.
Bookmark or share this article
Esta página foi útil?
Obrigado pelo seu voto.
Related Articles
How to create or delete work orders? How to update a work order? How to change the status of the work order? How to create a monitoring? How to get the failure list?