- Timestamp:
- Oct 6, 2010, 12:56:51 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/grails-app/services/CreateDataService.groovy
r678 r685 128 128 createDemoSections() 129 129 createDemoAssetTree() 130 createDemoAssetExtenedAttributes() 130 createDemoAssetExtendedAttributes() 131 createDemoAssetSubItemExtendedAttributes() 131 132 132 133 // Inventory … … 1408 1409 extendedAttributeTypeInstance = new ExtendedAttributeType(name: "Registration Expiry Date") 1409 1410 saveAndTest(extendedAttributeTypeInstance) 1411 1412 //ExtendedAttributeType #16 1413 extendedAttributeTypeInstance = new ExtendedAttributeType(name: "Asset Condition") 1414 saveAndTest(extendedAttributeTypeInstance) 1415 1416 //ExtendedAttributeType #17 1417 extendedAttributeTypeInstance = new ExtendedAttributeType(name: "Asset Number") 1418 saveAndTest(extendedAttributeTypeInstance) 1410 1419 } 1411 1420 … … 1570 1579 } // createDemoAssetTree() 1571 1580 1572 def createDemoAssetExtenedAttributes() { 1581 def createDemoAssetSubItemExtendedAttributes() { 1582 1583 //AssetSubItemExtendedAttribute 1584 def assetSubItemExtendedAttributeInstance 1585 1586 //AssetSubItemExtendedAttribute #1 1587 assetSubItemExtendedAttributeInstance = new AssetSubItemExtendedAttribute(value: "United Press", 1588 assetSubItem: AssetSubItem.get(1), 1589 extendedAttributeType: ExtendedAttributeType.get(8)) // Manufacturer. 1590 saveAndTest(assetSubItemExtendedAttributeInstance) 1591 1592 //AssetSubItemExtendedAttribute #2 1593 assetSubItemExtendedAttributeInstance = new AssetSubItemExtendedAttribute(value: "PU Mark 2", 1594 assetSubItem: AssetSubItem.get(1), 1595 extendedAttributeType: ExtendedAttributeType.get(1)) // Model Number. 1596 saveAndTest(assetSubItemExtendedAttributeInstance) 1597 1598 //AssetSubItemExtendedAttribute #3 1599 assetSubItemExtendedAttributeInstance = new AssetSubItemExtendedAttribute(value: "765895", 1600 assetSubItem: AssetSubItem.get(1), 1601 extendedAttributeType: ExtendedAttributeType.get(3)) // Serial Number. 1602 saveAndTest(assetSubItemExtendedAttributeInstance) 1603 1604 //AssetSubItemExtendedAttribute #4 1605 assetSubItemExtendedAttributeInstance = new AssetSubItemExtendedAttribute(value: "Jan-2003", 1606 assetSubItem: AssetSubItem.get(1), 1607 extendedAttributeType: ExtendedAttributeType.get(4)) // Manufactured Date. 1608 saveAndTest(assetSubItemExtendedAttributeInstance) 1609 1610 } 1611 1612 def createDemoAssetExtendedAttributes() { 1573 1613 1574 1614 //AssetExtendedAttribute … … 1576 1616 1577 1617 //AssetExtendedAttribute #1 1578 assetExtendedAttributeInstance = new AssetExtendedAttribute(value: " United Press",1579 1580 extendedAttributeType: ExtendedAttributeType.get(8))1618 assetExtendedAttributeInstance = new AssetExtendedAttribute(value: "On the far side of Tank 5", 1619 asset: Asset.get(1), 1620 extendedAttributeType: ExtendedAttributeType.get(5)) // Location Description. 1581 1621 saveAndTest(assetExtendedAttributeInstance) 1582 1622 1583 1623 //AssetExtendedAttribute #2 1584 assetExtendedAttributeInstance = new AssetExtendedAttribute(value: " PU Mark 2",1585 1586 extendedAttributeType: ExtendedAttributeType.get(1))1624 assetExtendedAttributeInstance = new AssetExtendedAttribute(value: "3", 1625 asset: Asset.get(1), 1626 extendedAttributeType: ExtendedAttributeType.get(9)) // ecr. 1587 1627 saveAndTest(assetExtendedAttributeInstance) 1588 1628 1589 1629 //AssetExtendedAttribute #3 1590 assetExtendedAttributeInstance = new AssetExtendedAttribute(value: " On the far side of Tank 5",1591 1592 extendedAttributeType: ExtendedAttributeType.get(5))1630 assetExtendedAttributeInstance = new AssetExtendedAttribute(value: "RP-001", 1631 asset: Asset.get(1), 1632 extendedAttributeType: ExtendedAttributeType.get(17)) // Asset Number. 1593 1633 saveAndTest(assetExtendedAttributeInstance) 1594 1634 1595 1635 //AssetExtendedAttribute #4 1596 assetExtendedAttributeInstance = new AssetExtendedAttribute(value: " 765895",1597 1598 extendedAttributeType: ExtendedAttributeType.get(3))1636 assetExtendedAttributeInstance = new AssetExtendedAttribute(value: "Good", 1637 asset: Asset.get(1), 1638 extendedAttributeType: ExtendedAttributeType.get(16)) // Asset Condition. 1599 1639 saveAndTest(assetExtendedAttributeInstance) 1600 1640 1601 1641 //AssetExtendedAttribute #5 1602 assetExtendedAttributeInstance = new AssetExtendedAttribute(value: "3", 1603 asset: Asset.get(1), 1604 extendedAttributeType: ExtendedAttributeType.get(9)) 1642 assetExtendedAttributeInstance = new AssetExtendedAttribute(value: "TBA", 1643 asset: Asset.get(1), 1644 extendedAttributeType: ExtendedAttributeType.get(13)) // Maintenance % Completion. 1645 saveAndTest(assetExtendedAttributeInstance) 1646 1647 //AssetExtendedAttribute #6 1648 assetExtendedAttributeInstance = new AssetExtendedAttribute(value: "Y", 1649 asset: Asset.get(1), 1650 extendedAttributeType: ExtendedAttributeType.get(14)) // Registration Required. 1651 saveAndTest(assetExtendedAttributeInstance) 1652 1653 //AssetExtendedAttribute #7 1654 assetExtendedAttributeInstance = new AssetExtendedAttribute(value: "Feb-2009", 1655 asset: Asset.get(1), 1656 extendedAttributeType: ExtendedAttributeType.get(15)) // Registration Expiry Date. 1657 saveAndTest(assetExtendedAttributeInstance) 1658 1659 //AssetExtendedAttribute #8 1660 assetExtendedAttributeInstance = new AssetExtendedAttribute(value: "N", 1661 asset: Asset.get(1), 1662 extendedAttributeType: ExtendedAttributeType.get(12)) // Regulatory Requirement. 1663 saveAndTest(assetExtendedAttributeInstance) 1664 1665 //AssetExtendedAttribute #9 1666 assetExtendedAttributeInstance = new AssetExtendedAttribute(value: "Med", 1667 asset: Asset.get(1), 1668 extendedAttributeType: ExtendedAttributeType.get(10)) // Risk Level. 1669 saveAndTest(assetExtendedAttributeInstance) 1670 1671 //AssetExtendedAttribute #10 1672 assetExtendedAttributeInstance = new AssetExtendedAttribute(value: "WP-003", 1673 asset: Asset.get(1), 1674 extendedAttributeType: ExtendedAttributeType.get(11)) // Safe Work Procedure. 1605 1675 saveAndTest(assetExtendedAttributeInstance) 1606 1676 }
Note: See TracChangeset
for help on using the changeset viewer.