Пример #1
0
 public void notify(DelegateTask delegateTask) {
   String processInstanceId = delegateTask.getProcessInstanceId();
   ProcessInstance processInstance =
       runtimeService
           .createProcessInstanceQuery()
           .processInstanceId(processInstanceId)
           .singleResult();
   Leave leave = new Leave(processInstance.getBusinessKey());
   leave.setLeaveType((String) delegateTask.getVariable("leaveType"));
   leave.setStartTime((Date) delegateTask.getVariable("startTime"));
   leave.setEndTime((Date) delegateTask.getVariable("endTime"));
   leave.setReason((String) delegateTask.getVariable("reason"));
   leave.preUpdate();
   leaveDao.update(leave);
 }
Пример #2
0
  public void contractHandle(DelegateTask delegateTask) throws Exception {

    setTaskInfo(delegateTask, SrOsStatus.STATUS_CONTRACT_HANDLE);

    String account = (String) delegateTask.getVariable("operatorAcc");
    delegateTask.setAssignee(account);
  }
Пример #3
0
  public void salesmanAudit(DelegateTask delegateTask) throws Exception {

    setTaskInfo(delegateTask, SrOsStatus.STATUS_SALESMAN_AUDIT);

    String account = (String) delegateTask.getVariable("saleAcc");
    delegateTask.setAssignee(account);
  }
Пример #4
0
  public void bidding(DelegateTask delegateTask) throws Exception {

    setTaskInfo(delegateTask, SrOsStatus.STATUS_BIDDING);

    String account = (String) delegateTask.getVariable("operatorAcc");
    delegateTask.setAssignee(account);
  }
Пример #5
0
 public String getDescription(DelegateTask delegateTask) throws Exception {
   String id = (String) delegateTask.getVariable("id");
   SrOutsource srOutsource = new SrOutsource();
   srOutsource.setId(id);
   srOutsource = (SrOutsource) getSrOutsourceService().list(srOutsource).get(0);
   return "[" + srOutsource.getProjName() + "] " + srOutsource.getName() + " ";
 }
Пример #6
0
  public void professionalManagerAssess(DelegateTask delegateTask) throws Exception {

    setTaskInfo(delegateTask, SrOsStatus.STATUS_PROFESSIONAL_MANAGER_ASSESS);

    String account = (String) delegateTask.getVariable("creatorAcc");
    delegateTask.setAssignee(account);
  }
Пример #7
0
  public void settlement(DelegateTask delegateTask) throws Exception {

    setTaskInfo(delegateTask, SrOsStatus.STATUS_SETTLEMENT);

    String account = (String) delegateTask.getVariable("operatorAcc");
    delegateTask.setAssignee(account);
  }
Пример #8
0
  public void inspect(DelegateTask delegateTask) throws Exception {

    setTaskInfo(delegateTask, SrOsStatus.STATUS_INSPECT);

    String account = (String) delegateTask.getVariable("qcAcc");
    delegateTask.setAssignee(account);
  }
Пример #9
0
  public void manufacture(DelegateTask delegateTask) throws Exception {

    setTaskInfo(delegateTask, SrOsStatus.STATUS_MANUFACTURE);

    String account = (String) delegateTask.getVariable("operatorAcc");
    delegateTask.setAssignee(account);
  }
Пример #10
0
  public void projectManagerApprove(DelegateTask delegateTask) throws Exception {

    setTaskInfo(delegateTask, SrOsStatus.STATUS_PROJECT_MANAGER_APPROVE);

    SrProjectManager srProjectMgr = new SrProjectManager();
    String projNo = (String) delegateTask.getVariable("projNo");
    srProjectMgr.setProjNo(projNo);
    List<SrProjectManager> list = getSrProjectManagerService().list(srProjectMgr);
    if (list == null || list.size() == 0) {
      throw new Exception("未找到此工程的总管,请联系修船事业部相关人员,在“工程结算-基础数据-修船总管”中定义");
    }
    delegateTask.addCandidateUsers(getSrProjectManagers(list));
  }
Пример #11
0
 @Override
 public void notify(DelegateTask delegateTask) {
   // get starter user name
   String initiator = (String) delegateTask.getVariable(Const.VAR_INITIATOR);
   delegateTask.addCandidateUser(initiator);
 }