Changeset 144 for trunk/grails-app/services
- Timestamp:
- Oct 3, 2009, 4:05:02 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/grails-app/services/TaskSearchService.groovy
r143 r144 41 41 } 42 42 } 43 44 def getInTheLastWeek(params) { 45 params.max = Math.min(params?.max?.toInteger() ?: 10, 100) 46 params.offset = params?.offset?.toInteger() ?: 0 47 params.sort = params?.sort ?: "id" 48 params.order = params?.order ?: "desc" 49 50 def taskInstanceList = Task.createCriteria().list( 51 max: params.max, 52 offset: params.offset, 53 sort: params.sort, 54 order: params.order) { 55 ge("targetStartDate", dateUtilService.getToday()-7) 56 lt("targetStartDate", dateUtilService.getTomorrow()) 57 eq("isActive", true) 58 } 59 } 60 61 def getMyInTheLastWeek(params) { 62 params.max = Math.min(params?.max?.toInteger() ?: 10, 100) 63 params.offset = params?.offset?.toInteger() ?: 0 64 params.sort = params?.sort ?: "id" 65 params.order = params?.order ?: "desc" 66 67 def taskInstanceList = Task.createCriteria().list( 68 max: params.max, 69 offset: params.offset, 70 sort: params.sort, 71 order: params.order) { 72 eq("leadPerson", Person.get(authenticateService.userDomain().id)) 73 ge("targetStartDate", dateUtilService.getToday()-7) 74 lt("targetStartDate", dateUtilService.getTomorrow()) 75 eq("isActive", true) 76 } 77 } 43 78 }
Note: See TracChangeset
for help on using the changeset viewer.