litzvi / avc-beta

trying to build first demo for avc
0 stars 0 forks source link

getTaskRows #566

Closed litzvi closed 3 years ago

litzvi commented 3 years ago

I added com.avc.mis.beta.service.ProcessInfoReader.getTaskRows(ProcessStatus[], Instant, Instant)

The processStatus is for choosing what task you want to see. I think we should show only for ones that the processes are Pending. example in you're method:

@RequestMapping("/getUserTasks")
public List<TaskRow> getUserTasks(@QueryParam("begin")@DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) Instant begin, 
        @QueryParam("end")@DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) Instant end) {
    return processDao.getTaskRows(new ProcessStatus[]{ProcessStatus.PENDING}, begin, end);
}
litzvi commented 3 years ago

You need to use this one because I changed the structure.

litzvi commented 3 years ago

I still need to fix the counts of the approvals

mei309 commented 3 years ago

I added com.avc.mis.beta.service.ProcessInfoReader.getTaskRows(ProcessStatus[], Instant, Instant)

The processStatus is for choosing what task you want to see. I think we should show only for ones that the processes are Pending. example in you're method:

@RequestMapping("/getUserTasks")
public List<TaskRow> getUserTasks(@QueryParam("begin")@DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) Instant begin, 
      @QueryParam("end")@DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) Instant end) {
  return processDao.getTaskRows(new ProcessStatus[]{ProcessStatus.PENDING}, begin, end);
}

it was in the beginning that way and we changed it.

mei309 commented 3 years ago

so you changing it from DecisionType to ProcessStatus?

litzvi commented 3 years ago

this is for the counts. com.avc.mis.beta.service.ProcessInfoReader.getUserTasksNumber(ProcessStatus[], DecisionType[])

you can use it like this @RequestMapping("/getUserTasksNumber") public int getUserTasksNumber() { return processDao.getUserTasksNumber(new ProcessStatus[] {ProcessStatus.PENDING}, new DecisionType[] {DecisionType.EDIT_NOT_ATTENDED, DecisionType.NOT_ATTENDED}); }

mei309 commented 3 years ago

ok done