Exemplo n.º 1
0
  // 根据当前任务号取得禀议详细信息
  @Transactional(readOnly = true)
  public WipeTask getWipeByTask(String taskId) {
    if (StringUtils.isEmpty(taskId)) return null;

    WipeTask wipeTask = new WipeTask();
    wipeTask.setTask(taskService.getTask(taskId));

    String wCode = (String) taskService.getVariable(taskId, "wCode");
    if (wCode != null)
      wipeTask.setWipe(
          wipeDao.findByProperty("wCode", wCode) == null
              ? null
              : wipeDao.findByProperty("wCode", wCode).get(0));
    return wipeTask;
  }
Exemplo n.º 2
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;
 }
Exemplo n.º 3
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;
  }