/**
  * @param taskQueryForm
  * @param userId
  * @return
  */
 @Override
 public List<TaskVo> queryToDoTaskFiltered(TaskQueryForm taskQueryForm, String userId) {
   DataTablesInfo dataTablesInfo = taskQueryForm.getDataTablesInfo();
   int start = dataTablesInfo.getStart();
   int length = dataTablesInfo.getLength();
   TaskQuery taskQuery =
       taskService
           .createTaskQuery()
           .taskCandidateOrAssigned(userId)
           .orderByTaskCreateTime()
           .desc();
   List<Task> tasks = taskQuery.listPage(start, start + length);
   List<TaskVo> taskRtn = buildTaskVos(tasks);
   return taskRtn;
 }
 /**
  * 查询用户的待办任务总数
  *
  * @param userId
  * @return
  */
 @Override
 public long queryTaskTotal(String userId) {
   TaskQuery taskQuery = taskService.createTaskQuery().taskCandidateOrAssigned(userId);
   long totals = taskQuery.count();
   return totals;
 }
 @Override
 public long listFilteredPantoneInfosCounts(TaskQueryForm taskQueryForm, String userId) {
   TaskQuery taskQuery = taskService.createTaskQuery().taskCandidateOrAssigned(userId);
   List<Task> tasks = taskQuery.list();
   return tasks.size();
 }