Exemple #1
0
 public String delTransactorTree() throws Exception {
   StringBuilder tempTree = new StringBuilder();
   StringBuilder tree = new StringBuilder();
   tree.append("[");
   tree.append("{\"attr\":{")
       .append(JsTreeUtil1.treeAttrBefore)
       .append("company_company-company")
       .append(JsTreeUtil1.treeAttrMiddle)
       .append("company")
       .append(JsTreeUtil1.treeAttrAfter)
       .append("},\"state\":\"open\",\"data\":\"" + ContextUtils.getCompanyName() + "\"");
   // List<String[]> currentTransactors=taskService.getActivityTaskTransactors(workflowId);
   // List<String> currentPrincipals=taskService.getActivityTaskPrincipals(workflowId);
   taskList = taskService.getActivityTasks(workflowId, ContextUtils.getCompanyId());
   int transactNum = taskList.size();
   if (transactNum > 1) {
     tempTree.append(",\"children\":");
     tempTree.append("[");
     for (WorkflowTask t : taskList) {
       if (StringUtils.isEmpty(t.getTrustorName())) {
         tempTree
             .append(
                 JsTreeUtil1.generateJsTreeNodeNew(
                     "user_" + t.getTransactorName() + "-" + t.getTransactor(),
                     "",
                     t.getTransactorName(),
                     "user"))
             .append(",");
       } else {
         tempTree
             .append(
                 JsTreeUtil1.generateJsTreeNodeNew(
                     "user_" + t.getTransactorName() + "-" + t.getTransactor(),
                     "",
                     t.getTransactorName() + "(受托于" + t.getTrustorName() + ")",
                     "user"))
             .append(",");
       }
     }
     tree.append(delComma(tempTree.toString()));
     tree.append("]");
   }
   tree.append("}");
   tree.append("]");
   renderText(tree.toString());
   return null;
 }
Exemple #2
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());
     }
   }
 }
Exemple #3
0
 public void emailInform(WorkflowTask task) {
   if (StringUtils.isNotEmpty(task.getReminderNoticeUser())) {
     Set<String> informUserEmails = new HashSet<String>();
     User temp;
     for (String userLoginName : task.getReminderNoticeUser().split(",")) {
       temp = userManager.getUserByLoginName(userLoginName);
       if (temp != null) informUserEmails.add(temp.getEmail());
     }
     String msg =
         new StringBuilder("任务:")
             .append(task.getTitle())
             .append("的办理人")
             .append(task.getTransactorName())
             .append("被催办次数已经超过设置上限,请您核实情况。")
             .toString();
     AsyncMailUtils.sendMail(informUserEmails, "催办超期提醒", msg);
   }
 }
Exemple #4
0
 public void swingInform(WorkflowTask task) throws Exception {
   String msg =
       new StringBuilder("任务:")
           .append(task.getTitle())
           .append("的办理人")
           .append(task.getTransactorName())
           .append("被催办次数已经超过设置上限,请您核实情况。")
           .toString();
   if (StringUtils.isNotEmpty(task.getReminderNoticeUser())) {
     for (String userLoginName : task.getReminderNoticeUser().split(",")) {
       ApiFactory.getPortalService()
           .addMessage(
               "task",
               "系统管理员",
               ContextUtils.getLoginName(),
               userLoginName,
               "催办超期提醒",
               msg,
               "/task/message-task.htm?id=" + task.getId());
     }
   }
 }