Changeset 321 for trunk/grails-app/services
- Timestamp:
- Feb 5, 2010, 11:15:04 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/grails-app/services/CreateDataService.groovy
r314 r321 378 378 def siteInstance 379 379 380 siteInstance = new Site(name: "C reek Mill",380 siteInstance = new Site(name: "CSM", 381 381 description: "Creek Side Mill") 382 382 saveAndTest(siteInstance) … … 403 403 404 404 //Department #2 405 departmentInstance = new Department(name: "Pulp Mill 2",,406 description: "Business department",405 departmentInstance = new Department(name: "Pulp Mill", 406 description: "Business Department", 407 407 site: Site.get(2)) 408 408 saveAndTest(departmentInstance) … … 1114 1114 1115 1115 //Section #2 1116 sectionInstance = new Section(name: " Delignification",1116 sectionInstance = new Section(name: "CSM-Delig", 1117 1117 description: "Pulp Delignification", 1118 1118 site: Site.get(1), … … 1121 1121 1122 1122 //Section #3 1123 sectionInstance = new Section(name: " Auxiliary",1123 sectionInstance = new Section(name: "CSM-Aux", 1124 1124 description: "Auxilliary Section", 1125 1125 site: Site.get(1), … … 1153 1153 1154 1154 //Asset #4 1155 def assetInstance4 = new Asset(name: " RO 1",1155 def assetInstance4 = new Asset(name: "C579", 1156 1156 description: "RO #1", 1157 1157 section: Section.get(2)) … … 1172 1172 1173 1173 //AssetSubItem #2 Level1 1174 def assetSubItemInstance2 = new AssetSubItem(name: " Reactor Tower",1175 description: " Unique sub asset.")1174 def assetSubItemInstance2 = new AssetSubItem(name: "C579-44", 1175 description: "Tanks and towers") 1176 1176 saveAndTest(assetSubItemInstance2) 1177 1177 … … 1180 1180 1181 1181 //AssetSubItem #3 Level1 1182 def assetSubItemInstance3 = new AssetSubItem(name: " Blower Tower",1183 description: " Unique sub asset.")1182 def assetSubItemInstance3 = new AssetSubItem(name: "C579-20", 1183 description: "Control Loops") 1184 1184 saveAndTest(assetSubItemInstance3) 1185 1185 … … 1188 1188 1189 1189 //AssetSubItem #4 Level2 1190 assetSubItemInstance = new AssetSubItem(name: "C579-TK-0022", 1191 description: "Blow Tank", 1192 parentItem: AssetSubItem.get(2)) 1193 saveAndTest(assetSubItemInstance) 1194 1195 //AssetSubItem #5 Level2 1196 assetSubItemInstance = new AssetSubItem(name: "C579-TK-0023", 1197 description: "Reactor Tower", 1198 parentItem: AssetSubItem.get(2)) 1199 saveAndTest(assetSubItemInstance) 1200 1201 //AssetSubItem #6 Level2 1190 1202 assetSubItemInstance = new AssetSubItem(name: "Print Unit", 1191 1203 description: "Print Unit - Common Level 2 sub item.", … … 1193 1205 saveAndTest(assetSubItemInstance) 1194 1206 1195 //AssetSubItem # 5Level21196 assetSubItemInstance = new AssetSubItem(name: " Agitator",1197 description: "Agitator - Level 2 sub item",1198 parentItem: AssetSubItem.get( 2))1207 //AssetSubItem #7 Level2 1208 assetSubItemInstance = new AssetSubItem(name: "1925365", 1209 description: "Agitator", 1210 parentItem: AssetSubItem.get(4)) 1199 1211 saveAndTest(assetSubItemInstance) 1200 1212 1201 //AssetSubItem #6 Level2 1202 assetSubItemInstance = new AssetSubItem(name: "Scraper", 1203 description: "Scraper - Level 2 sub item.", 1213 //AssetSubItem #8 Level2 1214 assetSubItemInstance = new AssetSubItem(name: "1925366", 1215 description: "Scraper", 1216 parentItem: AssetSubItem.get(4)) 1217 saveAndTest(assetSubItemInstance) 1218 1219 //AssetSubItem #9 Level3 1220 assetSubItemInstance = new AssetSubItem(name: "Motor", 1221 description: "Motor - Level 3 sub item", 1222 parentItem: AssetSubItem.get(6)) 1223 saveAndTest(assetSubItemInstance) 1224 1225 //AssetSubItem #10 Level3 1226 assetSubItemInstance = new AssetSubItem(name: "Gearbox", 1227 description: "Gearbox - Level 3 sub item, gearbox", 1228 parentItem: AssetSubItem.get(6)) 1229 saveAndTest(assetSubItemInstance) 1230 1231 //AssetSubItem #11 Level4 1232 assetSubItemInstance = new AssetSubItem(name: "DS Bearing", 1233 description: "Drive Side Bearing", 1234 parentItem: AssetSubItem.get(9)) 1235 saveAndTest(assetSubItemInstance) 1236 1237 //AssetSubItem #12 Level4 1238 assetSubItemInstance = new AssetSubItem(name: "NDS Bearing", 1239 description: "Non Drive Side Bearing", 1240 parentItem: AssetSubItem.get(9)) 1241 saveAndTest(assetSubItemInstance) 1242 1243 //AssetSubItem #13 Level2 1244 assetSubItemInstance = new AssetSubItem(name: "C579-F-0001", 1245 description: "Weak Caustic Flow", 1204 1246 parentItem: AssetSubItem.get(3)) 1205 1247 saveAndTest(assetSubItemInstance) 1206 1248 1207 //AssetSubItem # 7Level31208 assetSubItemInstance = new AssetSubItem(name: " Motor",1209 description: " Motor - Level 3 sub item",1210 parentItem: AssetSubItem.get( 5))1249 //AssetSubItem #14 Level3 1250 assetSubItemInstance = new AssetSubItem(name: "C579-FT-0002", 1251 description: "Weak Caustic Flow Transmitter", 1252 parentItem: AssetSubItem.get(13)) 1211 1253 saveAndTest(assetSubItemInstance) 1212 1254 1213 //AssetSubItem #8 Level3 1214 assetSubItemInstance = new AssetSubItem(name: "Gearbox", 1215 description: "Gearbox - Level 3 sub item, gearbox", 1216 parentItem: AssetSubItem.get(5)) 1217 saveAndTest(assetSubItemInstance) 1218 1219 //AssetSubItem #9 Level4 1220 assetSubItemInstance = new AssetSubItem(name: "DS Bearing", 1221 description: "Drive Side Bearing", 1222 parentItem: AssetSubItem.get(7)) 1223 saveAndTest(assetSubItemInstance) 1224 1225 //AssetSubItem #10 Level4 1226 assetSubItemInstance = new AssetSubItem(name: "NDS Bearing", 1227 description: "Non Drive Side Bearing", 1228 parentItem: AssetSubItem.get(7)) 1255 //AssetSubItem #15 Level3 1256 assetSubItemInstance = new AssetSubItem(name: "C579-PT-0003", 1257 description: "Weak Caustic Pressure Transmitter", 1258 parentItem: AssetSubItem.get(13)) 1229 1259 saveAndTest(assetSubItemInstance) 1230 1260 } // createDemoAssetTree()
Note: See TracChangeset
for help on using the changeset viewer.