Changeset 314
- Timestamp:
- Feb 3, 2010, 3:19:59 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/grails-app/services/CreateDataService.groovy
r298 r314 378 378 def siteInstance 379 379 380 siteInstance = new Site(name: "Creek Mill") 380 siteInstance = new Site(name: "Creek Mill", 381 description: "Creek Side Mill") 381 382 saveAndTest(siteInstance) 382 383 383 siteInstance = new Site(name: "Jasper Street Depot") 384 siteInstance = new Site(name: "Jasper Street Depot", 385 description: "Storage depot on Jasper Street.") 384 386 saveAndTest(siteInstance) 385 387 386 siteInstance = new Site(name: "River Press") 388 siteInstance = new Site(name: "River Press", 389 description: "Printing press site") 387 390 saveAndTest(siteInstance) 388 391 } … … 395 398 //Department #1 396 399 departmentInstance = new Department(name: "Print Centre", 397 site: Site.get(1)) 400 description: "Printing Department", 401 site: Site.get(1)) 398 402 saveAndTest(departmentInstance) 399 403 400 404 //Department #2 401 departmentInstance = new Department(name: "Pulp Mill 2", 402 site: Site.get(2)) 405 departmentInstance = new Department(name: "Pulp Mill 2",, 406 description: "Business department", 407 site: Site.get(2)) 403 408 saveAndTest(departmentInstance) 404 409 } … … 657 662 taskType:TaskType.get(1), 658 663 leadPerson:Person.get(5), 659 description:"A Sub Task can be created by setting the Parent Task value",664 description:"A Sub Task can be created from the Sub Task's tab.", 660 665 comment:"Some help required", 661 666 targetStartDate: dateUtilService.yesterday, … … 1102 1107 1103 1108 //Section #1 1104 sectionInstance = new Section(name: "Press Section", 1105 site: Site.get(3), 1106 department: Department.get(1)) 1109 sectionInstance = new Section(name: "Press", 1110 description: "Press Section", 1111 site: Site.get(3), 1112 department: Department.get(1)) 1107 1113 saveAndTest(sectionInstance) 1108 1114 1109 1115 //Section #2 1110 sectionInstance = new Section(name: "RO System", 1111 site: Site.get(1), 1112 department: Department.get(2)) 1116 sectionInstance = new Section(name: "Delignification", 1117 description: "Pulp Delignification", 1118 site: Site.get(1), 1119 department: Department.get(2)) 1113 1120 saveAndTest(sectionInstance) 1114 1121 1115 1122 //Section #3 1116 sectionInstance = new Section(name: "Auxiliary Section", 1117 site: Site.get(1), 1118 department: Department.get(1)) 1123 sectionInstance = new Section(name: "Auxiliary", 1124 description: "Auxilliary Section", 1125 site: Site.get(1), 1126 department: Department.get(1)) 1119 1127 saveAndTest(sectionInstance) 1120 1128 } … … 1127 1135 //Asset #1 1128 1136 def assetInstance1 = new Asset(name: "Print Tower 22", 1129 section: Section.get(1)) 1137 description: "Complete Printing Asset #22", 1138 section: Section.get(1)) 1130 1139 saveAndTest(assetInstance1) 1131 1140 // assetInstance.addToMaintenanceActions(MaintenanceAction.get(1)) … … 1133 1142 //Asset #2 1134 1143 def assetInstance2 = new Asset(name: "Print Tower 21", 1135 section: Section.get(1)) 1144 description: "Complete Printing Asset #21", 1145 section: Section.get(1)) 1136 1146 saveAndTest(assetInstance2) 1137 1147 1138 1148 //Asset #3 1139 1149 def assetInstance3 = new Asset(name: "Print Tower 23", 1140 section: Section.get(1)) 1150 description: "Complete Printing Asset #23", 1151 section: Section.get(1)) 1141 1152 saveAndTest(assetInstance3) 1142 1153 1143 1154 //Asset #4 1144 1155 def assetInstance4 = new Asset(name: "RO 1", 1145 section: Section.get(2)) 1156 description: "RO #1", 1157 section: Section.get(2)) 1146 1158 saveAndTest(assetInstance4) 1147 1159 … … 1150 1162 1151 1163 //AssetSubItem #1 Level1 1152 def assetSubItemInstance1 = new AssetSubItem(name: "Print Tower") 1164 def assetSubItemInstance1 = new AssetSubItem(name: "Print Tower", 1165 description: "Common sub asset.") 1153 1166 saveAndTest(assetSubItemInstance1) 1154 1167 … … 1159 1172 1160 1173 //AssetSubItem #2 Level1 1161 def assetSubItemInstance2 = new AssetSubItem(name: "Reactor Tower") 1174 def assetSubItemInstance2 = new AssetSubItem(name: "Reactor Tower", 1175 description: "Unique sub asset.") 1162 1176 saveAndTest(assetSubItemInstance2) 1163 1177 … … 1166 1180 1167 1181 //AssetSubItem #3 Level1 1168 def assetSubItemInstance3 = new AssetSubItem(name: "Blower Tower") 1182 def assetSubItemInstance3 = new AssetSubItem(name: "Blower Tower", 1183 description: "Unique sub asset.") 1169 1184 saveAndTest(assetSubItemInstance3) 1170 1185 … … 1173 1188 1174 1189 //AssetSubItem #4 Level2 1175 assetSubItemInstance = new AssetSubItem(name: "Print Unit Upper", 1176 parentItem: AssetSubItem.get(1)) 1190 assetSubItemInstance = new AssetSubItem(name: "Print Unit", 1191 description: "Print Unit - Common Level 2 sub item.", 1192 parentItem: AssetSubItem.get(1)) 1177 1193 saveAndTest(assetSubItemInstance) 1178 1194 1179 //AssetSubItem #5 Level 31195 //AssetSubItem #5 Level2 1180 1196 assetSubItemInstance = new AssetSubItem(name: "Agitator", 1181 parentItem: AssetSubItem.get(2)) 1197 description: "Agitator - Level 2 sub item", 1198 parentItem: AssetSubItem.get(2)) 1182 1199 saveAndTest(assetSubItemInstance) 1183 1200 1184 1201 //AssetSubItem #6 Level2 1185 1202 assetSubItemInstance = new AssetSubItem(name: "Scraper", 1186 parentItem: AssetSubItem.get(3)) 1203 description: "Scraper - Level 2 sub item.", 1204 parentItem: AssetSubItem.get(3)) 1187 1205 saveAndTest(assetSubItemInstance) 1188 1206 1189 1207 //AssetSubItem #7 Level3 1190 1208 assetSubItemInstance = new AssetSubItem(name: "Motor", 1191 parentItem: AssetSubItem.get(5)) 1209 description: "Motor - Level 3 sub item", 1210 parentItem: AssetSubItem.get(5)) 1192 1211 saveAndTest(assetSubItemInstance) 1193 1212 1194 1213 //AssetSubItem #8 Level3 1195 1214 assetSubItemInstance = new AssetSubItem(name: "Gearbox", 1196 parentItem: AssetSubItem.get(5)) 1215 description: "Gearbox - Level 3 sub item, gearbox", 1216 parentItem: AssetSubItem.get(5)) 1197 1217 saveAndTest(assetSubItemInstance) 1198 1218 1199 1219 //AssetSubItem #9 Level4 1200 1220 assetSubItemInstance = new AssetSubItem(name: "DS Bearing", 1201 parentItem: AssetSubItem.get(7)) 1221 description: "Drive Side Bearing", 1222 parentItem: AssetSubItem.get(7)) 1202 1223 saveAndTest(assetSubItemInstance) 1203 1224 1204 1225 //AssetSubItem #10 Level4 1205 1226 assetSubItemInstance = new AssetSubItem(name: "NDS Bearing", 1227 description: "Non Drive Side Bearing", 1206 1228 parentItem: AssetSubItem.get(7)) 1207 1229 saveAndTest(assetSubItemInstance)
Note: See TracChangeset
for help on using the changeset viewer.