Changeset 840 for trunk/grails-app/controllers
- Timestamp:
- Mar 3, 2011, 11:54:41 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/grails-app/controllers/TaskDetailedController.groovy
r838 r840 178 178 def associatedPropertyValues = [:] 179 179 def associatedPropertyMax = 10000 180 associatedPropertyValues.taskPriorityList = TaskPriority.findAllByIsActive(true, [max:associatedPropertyMax, sort:'name']) 180 def taskPriorityNameQuery = 'select distinct tp.name from TaskPriority tp where tp.isActive = ? order by tp.name' 181 associatedPropertyValues.taskPriorityList = TaskPriority.executeQuery(taskPriorityNameQuery, [true], [max:associatedPropertyMax]) 181 182 def lastNameQuery = 'select distinct p.lastName from Person p where p.isActive = ? order by p.lastName' 182 183 associatedPropertyValues.lastNameList = Person.executeQuery(lastNameQuery, [true], [max:associatedPropertyMax]) 183 184 def firstNameQuery = 'select distinct p.firstName from Person p where p.isActive = ? order by p.firstName' 184 185 associatedPropertyValues.firstNameList = Person.executeQuery(firstNameQuery, [true], [max:associatedPropertyMax]) 185 associatedPropertyValues.taskGroupList = TaskGroup.findAllByIsActive(true, [max:associatedPropertyMax, sort:'name']) 186 associatedPropertyValues.assetList = Asset.findAllByIsActive(true, [max:associatedPropertyMax, sort:'name']) 186 def taskGroupNameQuery = 'select distinct tg.name from TaskGroup tg where tg.isActive = ? order by tg.name' 187 associatedPropertyValues.taskGroupList = TaskGroup.executeQuery(taskGroupNameQuery, [true], [max:associatedPropertyMax]) 188 def assetNameQuery = 'select distinct a.name from Asset a where a.isActive = ? order by a.name' 189 associatedPropertyValues.assetList = Asset.executeQuery(assetNameQuery, [true], [max:associatedPropertyMax]) 187 190 def highestSeverityCodeQuery = 'select distinct cs.code from ConditionSeverity cs where cs.isActive = ? order by cs.code' 188 191 associatedPropertyValues.highestSeverityList = ConditionSeverity.executeQuery(highestSeverityCodeQuery, [true], [max:associatedPropertyMax]) 189 associatedPropertyValues.taskStatusList = TaskStatus.findAllByIsActive(true, [max:associatedPropertyMax, sort:'name']) 190 associatedPropertyValues.taskTypeList = TaskType.findAllByIsActive(true, [max:associatedPropertyMax, sort:'name']) 192 def taskStatusNameQuery = 'select a.name from TaskStatus a where a.isActive = ? order by a.id' 193 associatedPropertyValues.taskStatusList = TaskStatus.executeQuery(taskStatusNameQuery, [true], [max:associatedPropertyMax]) 194 def taskTypeNameQuery = 'select a.name from TaskType a where a.isActive = ? order by a.name' 195 associatedPropertyValues.taskTypeList = TaskType.executeQuery(taskTypeNameQuery, [true], [max:associatedPropertyMax]) 191 196 def startOfYearRange = dateUtilService.getYearFromDate(dateUtilService.plusYear(new Date(), -10)) 192 197 def endOfYearRange = dateUtilService.getYearFromDate(dateUtilService.plusYear(new Date(), 10)) … … 337 342 def associatedPropertyValues = [:] 338 343 def associatedPropertyMax = 10000 339 associatedPropertyValues.taskPriorityList = TaskPriority.findAllByIsActive(true, [max:associatedPropertyMax, sort:'name']) 344 def taskPriorityNameQuery = 'select distinct tp.name from TaskPriority tp where tp.isActive = ? order by tp.name' 345 associatedPropertyValues.taskPriorityList = TaskPriority.executeQuery(taskPriorityNameQuery, [true], [max:associatedPropertyMax]) 340 346 def lastNameQuery = 'select distinct p.lastName from Person p where p.isActive = ? order by p.lastName' 341 347 associatedPropertyValues.lastNameList = Person.executeQuery(lastNameQuery, [true], [max:associatedPropertyMax]) 342 348 def firstNameQuery = 'select distinct p.firstName from Person p where p.isActive = ? order by p.firstName' 343 349 associatedPropertyValues.firstNameList = Person.executeQuery(firstNameQuery, [true], [max:associatedPropertyMax]) 344 associatedPropertyValues.taskGroupList = TaskGroup.findAllByIsActive(true, [max:associatedPropertyMax, sort:'name']) 345 associatedPropertyValues.assetList = Asset.findAllByIsActive(true, [max:associatedPropertyMax, sort:'name']) 350 def taskGroupNameQuery = 'select distinct tg.name from TaskGroup tg where tg.isActive = ? order by tg.name' 351 associatedPropertyValues.taskGroupList = TaskGroup.executeQuery(taskGroupNameQuery, [true], [max:associatedPropertyMax]) 352 def assetNameQuery = 'select distinct a.name from Asset a where a.isActive = ? order by a.name' 353 associatedPropertyValues.assetList = Asset.executeQuery(assetNameQuery, [true], [max:associatedPropertyMax]) 346 354 def highestSeverityCodeQuery = 'select distinct cs.code from ConditionSeverity cs where cs.isActive = ? order by cs.code' 347 355 associatedPropertyValues.highestSeverityList = ConditionSeverity.executeQuery(highestSeverityCodeQuery, [true], [max:associatedPropertyMax]) 348 associatedPropertyValues.taskStatusList = TaskStatus.findAllByIsActive(true, [max:associatedPropertyMax, sort:'name']) 349 associatedPropertyValues.taskTypeList = TaskType.findAllByIsActive(true, [max:associatedPropertyMax, sort:'name']) 356 def taskStatusNameQuery = 'select a.name from TaskStatus a where a.isActive = ? order by a.id' 357 associatedPropertyValues.taskStatusList = TaskStatus.executeQuery(taskStatusNameQuery, [true], [max:associatedPropertyMax]) 358 def taskTypeNameQuery = 'select a.name from TaskType a where a.isActive = ? order by a.name' 359 associatedPropertyValues.taskTypeList = TaskType.executeQuery(taskTypeNameQuery, [true], [max:associatedPropertyMax]) 350 360 def startOfYearRange = dateUtilService.getYearFromDate(dateUtilService.plusYear(new Date(), -10)) 351 361 def endOfYearRange = dateUtilService.getYearFromDate(dateUtilService.plusYear(new Date(), 10))
Note: See TracChangeset
for help on using the changeset viewer.