Exemple #1
0
 // 禀议撤销
 @Transactional
 public void delete(String taskId) {
   Task task = taskService.getTask(taskId);
   Execution execution = executionService.findExecutionById(task.getExecutionId());
   if (execution.getProcessInstance().isActive("填写经费报销")) {
     String wCode = (String) taskService.getVariable(taskId, "wCode");
     this.delete(wipeDao.getWipe(wCode));
     taskService.completeTask(taskId, "cancel");
   }
 }
Exemple #2
0
  // 查询某个人的待办任务。
  public List<WipeTask> weiShenPiList() throws Exception {
    taskList = taskService.findPersonalTasks(String.valueOf(ActionUtil.getCurLoginInfo().getId()));
    List<WipeTask> list = null;
    if (taskList != null && !taskList.isEmpty()) {
      String wCode = null;
      list = new ArrayList<WipeTask>(taskList.size());
      WipeTask wipeTask = null;
      for (Task task : taskList) {

        if (task.getName().equalsIgnoreCase("填写经费报销")) continue;

        wipeTask = new WipeTask();
        wipeTask.setTask(task);
        wCode = (String) taskService.getVariable(task.getId(), "wCode");
        if (wCode != null) {
          if (wipeDao.getWipe(wCode) != null) {
            wipeTask.setWipe(wipeDao.getWipe(wCode));
            list.add(wipeTask);
          }
        }
      }
    }
    return list;
  }
Exemple #3
0
 // 根据当前用户取得驳回报销列表
 @Transactional(readOnly = true)
 public List<WipeTask> getRejectTasks(Long userId) {
   taskList = taskService.findPersonalTasks(String.valueOf(ActionUtil.getCurLoginInfo().getId()));
   List<WipeTask> list = null;
   if (taskList != null && !taskList.isEmpty()) {
     String wCode = null;
     list = new ArrayList<WipeTask>(taskList.size());
     WipeTask wipeTask = null;
     for (Task task : taskList) {
       if (task.getName().equalsIgnoreCase("填写经费报销")) {
         wipeTask = new WipeTask();
         wipeTask.setTask(task);
         wCode = (String) taskService.getVariable(task.getId(), "wCode");
         if (wCode != null) {
           wipeTask.setWipe(wipeDao.getWipe(wCode));
           list.add(wipeTask);
         }
       }
     }
   }
   return list;
 }