Exemplo n.º 1
0
 public void emailReminder(WorkflowTask task) {
   User user = userManager.getUserByLoginName(task.getTransactor());
   String msg =
       new StringBuilder("任务:")
           .append(task.getTitle())
           .append("已经生成")
           .append(((System.currentTimeMillis() - task.getCreatedTime().getTime()) / MILLI_SECOND))
           .append("天了。请尽快办理!")
           .toString();
   AsyncMailUtils.sendMail(user.getEmail(), "催办超期提醒", msg);
 }
Exemplo n.º 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());
     }
   }
 }
Exemplo n.º 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);
   }
 }
Exemplo n.º 4
0
 public void rtxReminder(WorkflowTask task) {
   String msg =
       new StringBuilder("(")
           .append(new SimpleDateFormat("yyyy-MM-dd").format(new Date(System.currentTimeMillis())))
           .append(")任务:")
           .append(task.getTitle())
           .append("已经生成")
           .append(((System.currentTimeMillis() - task.getCreatedTime().getTime()) / MILLI_SECOND))
           .append("天了。请尽快办理!")
           .toString();
   String url =
       SystemUrls.getSystemUrl(StringUtils.substring(task.getUrl(), 0, task.getUrl().indexOf('/')))
           + StringUtils.substring(task.getUrl(), task.getUrl().indexOf('/'));
   if (url.contains("?")) {
     url = url + task.getId();
   } else {
     url = url + "?taskId=" + task.getId();
   }
   User user = userManager.getUserByLoginName(task.getTransactor());
   rtx.RtxMsgSender.sendNotify(task.getTransactor(), "任务办理提醒", "1", msg, url, user.getCompanyId());
 }
Exemplo n.º 5
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());
     }
   }
 }
Exemplo n.º 6
0
 public void swingReminder(WorkflowTask task) throws Exception {
   if (StringUtils.isNotEmpty(task.getTransactor())) {
     String msg =
         new StringBuilder("(")
             .append(
                 new SimpleDateFormat("yyyy-MM-dd").format(new Date(System.currentTimeMillis())))
             .append(")任务:")
             .append(task.getTitle())
             .append("已经生成")
             .append(
                 ((System.currentTimeMillis() - task.getCreatedTime().getTime()) / MILLI_SECOND))
             .append("天了。请尽快办理!")
             .toString();
     ApiFactory.getPortalService()
         .addMessage(
             "task",
             "系统管理员",
             ContextUtils.getLoginName(),
             task.getTransactor(),
             "待办任务催办提醒",
             msg,
             "/task/message-task.htm?id=" + task.getId());
   }
 }