Changeset 721 for trunk/grails-app
- Timestamp:
- Nov 25, 2010, 10:51:14 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/grails-app/services/InventoryCsvService.groovy
r720 r721 13 13 14 14 def dateUtilService 15 def createDataService 15 16 16 17 def g = new org.codehaus.groovy.grails.plugins.web.taglib.ApplicationTagLib() … … 37 38 CSVReader reader = new CSVReader(sr) 38 39 40 // Turn off index mirroring. 41 createDataService.stopSearchableIndex() 42 39 43 def fail = { Map m -> 40 44 status.setRollbackOnly() 45 createDataService.startSearchableIndex() // Start mirroring again and rebuild index. 41 46 reader.close() 42 47 result.error = [ code: m.code, args: m.args ] … … 52 57 def line = [] 53 58 def lineNumber = 0 54 def maxNumberOfColumns = 2059 def maxNumberOfColumns = 19 55 60 def inventoryParams = [:] 56 61 def inventoryProperties = ["name", "description", "comment", "unitsInStock", "reorderPoint", "reorderQuantity", … … 351 356 // Success. 352 357 log.info "End of file." 358 createDataService.startSearchableIndex() // Start mirroring again and rebuild index. 353 359 reader.close() 354 360 return result … … 409 415 "123", "Multi Supplier@Local", 410 416 "Multi Distributors1@OEM; Multi Distributors2@Local", 411 " 2204E-2RS", ""417 "" 412 418 ] as String[]) 413 419 … … 422 428 "456KL", "Multi Supplier", 423 429 "Multi Distributors1; Multi Distributors2", 424 "" , ""430 "" 425 431 ] as String[]) 426 432 … … 688 694 "Estimated Unit Price", "Currency", "Enable Reorder", "Location*", "Store*", "Site*", "Group*", "Type*", 689 695 "Supplier's Part Number", "Preferred Supplier", "Alternate Suppliers", 690 " Alternate Item", "Spare For"]696 "Spare For"] 691 697 } 692 698
Note: See TracChangeset
for help on using the changeset viewer.