Ignore:
Timestamp:
May 8, 2009, 1:01:56 AM (15 years ago)
Author:
gav
Message:

Reconfigure Planned Maintenance again, now Preventative Maintenance, TaskProcedure? and MaintenanceAction?

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/grails-app/conf/BootStrap.groovy

    r127 r131  
    216216
    217217        taskGroupInstance = new TaskGroup(name:"Engineering Activites",
    218                       description:"Engineering daily activities")
     218                                                                            description:"Engineering daily activities")
    219219        BootStrapSaveAndTest(taskGroupInstance)
    220220
    221221        taskGroupInstance = new TaskGroup(name:"Production Activites",
    222                       description:"Production daily activities")
     222                                                                            description:"Production daily activities")
    223223        BootStrapSaveAndTest(taskGroupInstance)
    224224
    225225        taskGroupInstance = new TaskGroup(name:"New Projects",
    226                       description:" ")
     226                                                                            description:" ")
    227227        BootStrapSaveAndTest(taskGroupInstance)
    228228
     
    260260        BootStrapSaveAndTest(taskTypeInstance)
    261261
    262         taskTypeInstance = new TaskType(name:"Planned Maintenance")
     262        taskTypeInstance = new TaskType(name:"Preventative Maintenance")
    263263        BootStrapSaveAndTest(taskTypeInstance)
    264264
     
    409409        BootStrapSaveAndTest(assignedPersonInstance)
    410410
    411 //RecurringSchedule
    412         def recurringScheduleInstance
    413 
    414         //RecurringSchedule #1
    415         recurringScheduleInstance = new RecurringSchedule(recurEvery: 1,
     411//TaskRecurringSchedule
     412        def taskRecurringScheduleInstance
     413
     414        //TaskRecurringSchedule #1
     415        taskRecurringScheduleInstance = new TaskRecurringSchedule(task: Task.get(1),
     416                                                                                                    recurEvery: 1,
    416417                                                                                                    period: Period.get(1),
    417418                                                                                                    task: Task.get(1),
    418419                                                                                                    nextDueDate: new Date())
    419         BootStrapSaveAndTest(recurringScheduleInstance)
    420 
    421         //RecurringSchedule #2
    422         recurringScheduleInstance = new RecurringSchedule(recurEvery: 1,
    423                                                                                                     period: Period.get(2),
     420        BootStrapSaveAndTest(taskRecurringScheduleInstance)
     421
     422        //TaskRecurringSchedule #2
     423        taskRecurringScheduleInstance = new TaskRecurringSchedule(task: Task.get(2),
     424                                                                                                    recurEvery: 1,
     425                                                                                                    period: Period.get(1),
    424426                                                                                                    task: Task.get(2),
    425427                                                                                                    nextDueDate: new Date())
    426         BootStrapSaveAndTest(recurringScheduleInstance)
     428        BootStrapSaveAndTest(taskRecurringScheduleInstance)
    427429
    428430/*************************
     
    591593        BootStrapSaveAndTest(maintenancePolicyInstance)
    592594
    593 //PlannedMaintenance
    594         def plannedMaintenanceInstance
    595 
    596         //PM #1
    597         plannedMaintenanceInstance = new PlannedMaintenance(name: "PM1",
    598                                                                                                             recurringSchedule: RecurringSchedule.get(1))
    599         BootStrapSaveAndTest(plannedMaintenanceInstance)
    600 
    601         //PM #2
    602         plannedMaintenanceInstance = new PlannedMaintenance(name: "PM2",
    603                                                                                                             recurringSchedule: RecurringSchedule.get(1))
    604         BootStrapSaveAndTest(plannedMaintenanceInstance)
     595//TaskProcedure
     596        def taskProcedureInstance
     597
     598        taskProcedureInstance = new TaskProcedure(name: "Daily check")
     599        BootStrapSaveAndTest(taskProcedureInstance)
     600        taskProcedureInstance.addToTasks(Task.get(1))
    605601
    606602//MaintenanceAction
     
    608604
    609605        //MaintenanceAction #1
    610         maintenanceActionInstance = new MaintenanceAction(maintenanceAction: "Check all E-stops, active E-stop S1-S12 and ensure machine cannot run",
    611                                                                                                         pmStepNumber: 1,
     606        maintenanceActionInstance = new MaintenanceAction(description: "Check all E-stops, active E-stop S1-S12 and ensure machine cannot run",
     607                                                                                                        procedureStepNumber: 1,
    612608                                                                                                        maintenancePolicy: MaintenancePolicy.get(1),
    613                                                                                                         plannedMaintenance: PlannedMaintenance.get(1))
     609                                                                                                        taskProcedure: TaskProcedure.get(1))
    614610        BootStrapSaveAndTest(maintenanceActionInstance)
    615611
    616612        //MaintenanceAction #2
    617         maintenanceActionInstance = new MaintenanceAction(maintenanceAction: "Do more pushups",
    618                                                                                                         pmStepNumber: 2,
     613        maintenanceActionInstance = new MaintenanceAction(description: "Do more pushups",
     614                                                                                                        procedureStepNumber: 2,
    619615                                                                                                        maintenancePolicy: MaintenancePolicy.get(1),
    620                                                                                                         plannedMaintenance: PlannedMaintenance.get(1))
     616                                                                                                        taskProcedure: TaskProcedure.get(1))
    621617        BootStrapSaveAndTest(maintenanceActionInstance)
    622618
    623619        //MaintenanceAction #3
    624         maintenanceActionInstance = new MaintenanceAction(maintenanceAction: "Ok just one more pushup",
    625                                                                                                         pmStepNumber: 3,
     620        maintenanceActionInstance = new MaintenanceAction(description: "Ok just one more pushup",
     621                                                                                                        procedureStepNumber: 3,
    626622                                                                                                        maintenancePolicy: MaintenancePolicy.get(1),
    627                                                                                                         plannedMaintenance: PlannedMaintenance.get(1))
     623                                                                                                        taskProcedure: TaskProcedure.get(1))
    628624        BootStrapSaveAndTest(maintenanceActionInstance)
    629625                                                                                                   
     
    661657
    662658        //Assembly #1
    663         assemblyInstance = new Assembly(name: "Print Couple")
     659        assemblyInstance = new Assembly(name: "Print Couple",
     660                                                                        assetType: AssetType.get(1))
    664661        BootStrapSaveAndTest(assemblyInstance)
    665662//        assemblyInstance.addToMaintenanceActions(MaintenanceAction.get(1))
     
    667664        //Assembly #2
    668665        assemblyInstance = new Assembly(name: "Agitator",
    669                         lifeplan: LifePlan.get(1))
     666                                                                        assetType: AssetType.get(2))
    670667        BootStrapSaveAndTest(assemblyInstance)
    671668
     
    674671
    675672        //SubAssembly #1
    676         subAssemblyInstance = new SubAssembly(name: "Cylinder")
     673        subAssemblyInstance = new SubAssembly(name: "Cylinder",
     674                                                                                    assembly: Assembly.get(1))
    677675        BootStrapSaveAndTest(subAssemblyInstance)
    678676 
    679677         //SubAssembly #2
    680         subAssemblyInstance = new SubAssembly(name: "Gearmotor")
     678        subAssemblyInstance = new SubAssembly(name: "Gearmotor",
     679                                                                                    assembly: Assembly.get(2))
    681680        BootStrapSaveAndTest(subAssemblyInstance)
    682681
     
    685684   
    686685        //ComponentItem #1
    687         componentItemInstance = new ComponentItem(name: "Centre Pulley")
     686        componentItemInstance = new ComponentItem(name: "Bearing",
     687                                                                                            subAssembly: SubAssembly.get(1))
    688688        BootStrapSaveAndTest(componentItemInstance)
    689689
    690690         //ComponentItem #2
    691         componentItemInstance = new ComponentItem(name: "Bearing")
     691        componentItemInstance = new ComponentItem(name: "Drive shaft oil seal",
     692                                                                                            subAssembly: SubAssembly.get(2))
    692693        BootStrapSaveAndTest(componentItemInstance)
    693694
Note: See TracChangeset for help on using the changeset viewer.