Ejemplo n.º 1
0
  /**
   * 意见
   *
   * @return
   * @throws Exception
   */
  public String opinion() throws Exception {
    // workflowInstance = workflowInstanceManager.getWorkflowInstance(workflowId);

    // authority(workflowInstance.getProcessDefinitionId(),task.getName());

    // if(view){
    // opinions =
    // workflowInstanceManager.getOpinionsByInstanceId(workflowInstance.getProcessInstanceId(),companyId);
    // }
    if (taskId == null) {
      view = true;
    } else {
      task = taskService.getWorkflowTask(taskId);
      if (task.getActive() == 2) {
        edit = false;
      }
    }
    workflowInstance = workflowInstanceManager.getWorkflowInstance(workflowId);
    opinions = workflowInstanceManager.getOpinions(taskId, task.getCompanyId());
    if (workflowRightsManager.mustOpinionRight(BeanUtil.turnToModelTask(task))
        && (opinions == null || opinions.size() <= 0)) {
      must = true;
    } else {
      must = false;
    }
    companyId = ContextUtils.getCompanyId();
    ApiFactory.getBussinessLogService().log("流程汇编", "意见列表", ContextUtils.getSystemId("wf"));
    return "opinion";
  }
Ejemplo n.º 2
0
 /** 处理任务 */
 @Override
 public String input() throws Exception {
   log.debug("*** input 处理任务方法开始");
   log.debug(
       new StringBuilder("*** Received parameter:[")
           .append("task:")
           .append(task)
           .append("]")
           .toString());
   taskService.updateTaskIsRead(task);
   workflowId = task.getProcessInstanceId();
   workflowInstance = workflowInstanceManager.getWorkflowInstance(workflowId);
   opinions = workflowInstanceManager.getOpinions(taskId, task.getCompanyId());
   if (workflowRightsManager.mustOpinionRight(BeanUtil.turnToModelTask(task))
       && (opinions == null || opinions.size() <= 0)) {
     must = true;
   }
   StringBuilder builder = new StringBuilder();
   builder
       .append("<input type=\"hidden\" name=\"dataId\" value=\"")
       .append(workflowInstance.getDataId())
       .append("\"/>");
   formHtml =
       workflowInstanceManager.getHtml(
           workflowInstance.getProcessDefinitionId(),
           workflowInstance.getFormId(),
           workflowInstance.getDataId(),
           task.getName());
   formHtml = builder.toString() + formHtml;
   if (TaskState.COMPLETED.getIndex().equals(task.getActive())
       || TaskState.CANCELLED.getIndex().equals(task.getActive())) {
     // 列表控件控制
     formHtml =
         workflowInstanceManager.getFormHtml(
             workflowInstance, formHtml, workflowInstance.getDataId(), false, false);
     fieldPermission = workflowRightsManager.getFieldPermission(false);
   } else if (TaskState.WAIT_CHOICE_TACHE.getIndex().equals(task.getActive())) {
     canChoiceTaches = taskService.isNeedChoiceTache(task, workflowInstance).getCanChoiceTaches();
     return choiceTache();
   } else {
     // 列表控件控制
     formHtml =
         workflowInstanceManager.getFormHtml(
             workflowInstance, formHtml, workflowInstance.getDataId(), true, false);
     fieldPermission = ApiFactory.getFormService().getFieldPermission(task.getId());
   }
   ApiFactory.getBussinessLogService().log("工作流管理", "任务办理页面", ContextUtils.getSystemId("wf"));
   log.debug("*** input 处理任务方法结束");
   return INPUT;
 }
Ejemplo n.º 3
0
 public void RtxInform(WorkflowTask task) {
   String msg =
       new StringBuilder("任务:")
           .append(task.getTitle())
           .append("的办理人")
           .append(task.getTransactorName())
           .append("被催办次数已经超过设置上限,请您核实情况。")
           .toString();
   if (StringUtils.isNotEmpty(task.getReminderNoticeUser())) {
     for (String userLoginName : task.getReminderNoticeUser().split(",")) {
       rtx.RtxMsgSender.sendNotify(userLoginName, "催办超期提醒", "1", msg, "", task.getCompanyId());
     }
   }
 }