|
|
@@ -3,6 +3,7 @@ package com.ruoyi.project.listener.apply.valve;
|
|
|
import com.alibaba.fastjson.JSON;
|
|
|
import com.github.stuxuhai.jpinyin.PinyinFormat;
|
|
|
import com.github.stuxuhai.jpinyin.PinyinHelper;
|
|
|
+import com.ruoyi.common.jpush.JiGuangPushService;
|
|
|
import com.ruoyi.common.sendEmail.IMailService;
|
|
|
import com.ruoyi.common.utils.SpringContextUtils;
|
|
|
import com.ruoyi.project.apply.domain.TApplyOfflinevalve;
|
|
|
@@ -32,6 +33,7 @@ public class FlowListener implements Serializable, ExecutionListener {
|
|
|
}
|
|
|
String businessKey = execution.getProcessInstanceBusinessKey();
|
|
|
ITApplyOfflinevalveService tApplyOfflinevalveService = (ITApplyOfflinevalveService) SpringContextUtils.getBean("tApplyOfflinevalveService");
|
|
|
+ JiGuangPushService jiGuangPushService = (JiGuangPushService) SpringContextUtils.getBean("jiGuangPushService");
|
|
|
TApplyOfflinevalve tApplyOfflinevalve = tApplyOfflinevalveService.selectTApplyOfflinevalveById(Long.valueOf(businessKey));
|
|
|
ISysUserService sysUserService = (ISysUserService) SpringContextUtils.getBean("sysUserService");
|
|
|
IMailService mailService = (IMailService) SpringContextUtils.getBean("mailService");
|
|
|
@@ -58,7 +60,7 @@ public class FlowListener implements Serializable, ExecutionListener {
|
|
|
"亲爱的 username(loginName)</font><br><font style=\"line-height: 22px; \" size=\"4\">" +
|
|
|
"Dear usernameEN(loginName)</font></font></h2>" +
|
|
|
"<p><font style=\"line-height: 22px; \" size=\"5\"><b>您的申请已被驳回<br>" +
|
|
|
- "Your application has been rejected</b></font><br>"+
|
|
|
+ "Your application has been rejected</b></font><br>" +
|
|
|
"任务名:<b>安全阀离线/切出申请</b><br>" +
|
|
|
"Task Name: <b>Safety valve offline/cut-out application</b><br>" +
|
|
|
"任务编号:<b>apNo</b><br>" +
|
|
|
@@ -82,8 +84,10 @@ public class FlowListener implements Serializable, ExecutionListener {
|
|
|
String html = start + result + end;
|
|
|
logger.info("html:" + html);
|
|
|
mailService.sendHtmlMail(email, "安全阀离线/切出申请:您的申请已被驳回 Safety valve offline/cut-out application:Your application has been rejected (" + apNo + ")", html);
|
|
|
+ //极光推送
|
|
|
+ jiGuangPushService.send("锁开锁关申请单", "您有一个新的待办任务,请及时处理。", sysUser.getUserId().toString());
|
|
|
} catch (Exception e) {
|
|
|
- logger.error("邮件发送失败" + JSON.toJSONString(e));
|
|
|
+ logger.error("邮件发送/通知推送失败" + JSON.toJSONString(e));
|
|
|
}
|
|
|
}
|
|
|
}
|