- Timestamp:
- Apr 15, 2009, 5:53:28 PM (16 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/grails-app/conf/BootStrap.groovy
r116 r117 349 349 def siteInstance 350 350 351 siteInstance = new Site(name: "Commercial Site") 351 siteInstance = new Site(name: "Creek Mill") 352 BootStrapSaveAndTest(siteInstance) 353 354 siteInstance = new Site(name: "Jasper Street Depot") 352 355 BootStrapSaveAndTest(siteInstance) 353 356 … … 360 363 361 364 //InventoryStore 362 def inventoryStoreInstance = new InventoryStore(site: Site.get(1), 363 name: "Store #1") 365 def inventoryStoreInstance 366 367 inventoryStoreInstance = new InventoryStore(site: Site.get(1), name: "Store #1") 364 368 BootStrapSaveAndTest(inventoryStoreInstance) 365 369 370 inventoryStoreInstance = new InventoryStore(site: Site.get(2), name: "Store #2") 371 BootStrapSaveAndTest(inventoryStoreInstance) 372 366 373 //StoreLocation 367 def storeLocation = new StoreLocation(inventoryStore: InventoryStore.get(1), 368 bin: "A1-2") 374 def storeLocation 375 376 storeLocation = new StoreLocation(inventoryStore: InventoryStore.get(1), bin: "A1-2") 377 BootStrapSaveAndTest(storeLocation) 378 379 storeLocation = new StoreLocation(inventoryStore: InventoryStore.get(1), bin: "C55") 369 380 BootStrapSaveAndTest(storeLocation) 370 381 … … 372 383 def unitOfMeasureInstance 373 384 385 //UnitOfMeasure #1 374 386 unitOfMeasureInstance = new UnitOfMeasure(name: "each") 375 387 BootStrapSaveAndTest(unitOfMeasureInstance) 376 388 389 //UnitOfMeasure #2 377 390 unitOfMeasureInstance = new UnitOfMeasure(name: "meter(s)") 378 391 BootStrapSaveAndTest(unitOfMeasureInstance) 379 392 393 //UnitOfMeasure #3 380 394 unitOfMeasureInstance = new UnitOfMeasure(name: "box(es)") 381 395 BootStrapSaveAndTest(unitOfMeasureInstance) 382 396 397 //UnitOfMeasure #4 383 398 unitOfMeasureInstance = new UnitOfMeasure(name: "litre(s)") 384 399 BootStrapSaveAndTest(unitOfMeasureInstance) 385 400 401 //UnitOfMeasure #5 386 402 unitOfMeasureInstance = new UnitOfMeasure(name: "kilogram(s)") 387 403 BootStrapSaveAndTest(unitOfMeasureInstance) … … 390 406 def inventoryGroupInstance 391 407 408 //InventoryGroup #1 392 409 inventoryGroupInstance = new InventoryGroup(name: "Misc") 393 410 BootStrapSaveAndTest(inventoryGroupInstance) 394 411 412 //InventoryGroup #2 413 inventoryGroupInstance = new InventoryGroup(name: "Electrical") 414 BootStrapSaveAndTest(inventoryGroupInstance) 415 416 //InventoryGroup #3 417 inventoryGroupInstance = new InventoryGroup(name: "Mechanical") 418 BootStrapSaveAndTest(inventoryGroupInstance) 419 420 //InventoryGroup #4 421 inventoryGroupInstance = new InventoryGroup(name: "Production") 422 BootStrapSaveAndTest(inventoryGroupInstance) 423 395 424 //InventoryType 396 425 def inventoryTypeInstance … … 405 434 def inventoryItemInstance 406 435 436 //InventoryItem #1 407 437 inventoryItemInstance = new InventoryItem(inventoryGroup: InventoryGroup.get(1), 408 438 inventoryType: InventoryType.get(1), 409 unitOfMeasure: UnitOfMeasure.get(1), 410 name: "1051 Bearing", 439 unitOfMeasure: UnitOfMeasure.get(2), 440 name: "J-Rope", 441 description: "Twine wound J-Rope", 411 442 reorderPoint: 0) 412 443 BootStrapSaveAndTest(inventoryItemInstance) 413 444 445 //InventoryItem #2 446 inventoryItemInstance = new InventoryItem(inventoryGroup: InventoryGroup.get(1), 447 inventoryType: InventoryType.get(1), 448 unitOfMeasure: UnitOfMeasure.get(2), 449 name: "L-Rope", 450 description: "Twine wound L-Rope", 451 alternateItems: InventoryItem.get(1), 452 reorderPoint: 0) 453 BootStrapSaveAndTest(inventoryItemInstance) 454 455 //InventoryItem #3 456 inventoryItemInstance = new InventoryItem(inventoryGroup: InventoryGroup.get(3), 457 inventoryType: InventoryType.get(1), 458 unitOfMeasure: UnitOfMeasure.get(1), 459 name: "2305-2RS", 460 description: "Bearing 25x62x24mm double row self aligning ball", 461 reorderPoint: 2) 462 BootStrapSaveAndTest(inventoryItemInstance) 463 464 //InventoryItem #4 465 inventoryItemInstance = new InventoryItem(inventoryGroup: InventoryGroup.get(2), 466 inventoryType: InventoryType.get(1), 467 unitOfMeasure: UnitOfMeasure.get(1), 468 name: "L1592-K10", 469 description: "10kW contactor", 470 reorderPoint: 0) 471 BootStrapSaveAndTest(inventoryItemInstance) 472 473 //InventoryItem #5 474 inventoryItemInstance = new InventoryItem(inventoryGroup: InventoryGroup.get(3), 475 inventoryType: InventoryType.get(1), 476 unitOfMeasure: UnitOfMeasure.get(1), 477 name: "6205-ZZ", 478 description: "Bearing 25x52x15mm single row ball shielded", 479 reorderPoint: 2) 480 BootStrapSaveAndTest(inventoryItemInstance) 481 414 482 //StoredItem 415 483 def storedItemInstance 416 484 485 //StoredItem #1 417 486 storedItemInstance = new StoredItem(inventoryItem: InventoryItem.get(1), 418 487 storeLocation: StoreLocation.get(1), 419 488 quantity: 8) 489 BootStrapSaveAndTest(storedItemInstance) 490 491 //StoredItem #2 492 storedItemInstance = new StoredItem(inventoryItem: InventoryItem.get(1), 493 storeLocation: StoreLocation.get(2), 494 quantity: 4) 495 BootStrapSaveAndTest(storedItemInstance) 496 497 //StoredItem #3 498 storedItemInstance = new StoredItem(inventoryItem: InventoryItem.get(2), 499 storeLocation: StoreLocation.get(1), 500 quantity: 2) 501 BootStrapSaveAndTest(storedItemInstance) 502 503 //StoredItem #4 504 storedItemInstance = new StoredItem(inventoryItem: InventoryItem.get(3), 505 storeLocation: StoreLocation.get(1), 506 quantity: 2) 507 BootStrapSaveAndTest(storedItemInstance) 508 509 //StoredItem #5 510 storedItemInstance = new StoredItem(inventoryItem: InventoryItem.get(4), 511 storeLocation: StoreLocation.get(1), 512 quantity: 30) 420 513 BootStrapSaveAndTest(storedItemInstance) 421 514
Note: See TracChangeset
for help on using the changeset viewer.