|
@@ -140,7 +140,7 @@ public class PlantproglistBYXTask extends BaseController {
|
|
for (TPlantproglist t : plantproglists) {
|
|
for (TPlantproglist t : plantproglists) {
|
|
if (t.getNextreviewdate() != null) {
|
|
if (t.getNextreviewdate() != null) {
|
|
long now = System.currentTimeMillis();
|
|
long now = System.currentTimeMillis();
|
|
- if (t.getNexteditdate() == null) {//回顾日期为空的情况
|
|
|
|
|
|
+ if (t.getNextreviewdate() == null) {//回顾日期为空的情况
|
|
continue;
|
|
continue;
|
|
}
|
|
}
|
|
long diff = t.getNextreviewdate().getTime() - now;
|
|
long diff = t.getNextreviewdate().getTime() - now;
|
|
@@ -233,6 +233,7 @@ public class PlantproglistBYXTask extends BaseController {
|
|
String firstwarningContent = "";
|
|
String firstwarningContent = "";
|
|
String secondwarningContent = "";
|
|
String secondwarningContent = "";
|
|
String thirdwarningContent = "";
|
|
String thirdwarningContent = "";
|
|
|
|
+ String ids = "";
|
|
for (TPlantproglist t : plantproglists) {
|
|
for (TPlantproglist t : plantproglists) {
|
|
if (t.getNexteditdate() != null) {
|
|
if (t.getNexteditdate() != null) {
|
|
long now = System.currentTimeMillis();
|
|
long now = System.currentTimeMillis();
|
|
@@ -271,6 +272,7 @@ public class PlantproglistBYXTask extends BaseController {
|
|
return alarmContent;
|
|
return alarmContent;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* 分级预警
|
|
* 分级预警
|
|
*/
|
|
*/
|
|
@@ -303,7 +305,7 @@ public class PlantproglistBYXTask extends BaseController {
|
|
username = user.getNickName();
|
|
username = user.getNickName();
|
|
email = user.getEmail();
|
|
email = user.getEmail();
|
|
String emailCc = alarmPrincipal.getPrincipalEmail();
|
|
String emailCc = alarmPrincipal.getPrincipalEmail();
|
|
-// email = "924846500@qq.com";
|
|
|
|
|
|
+// email = "735032128@qq.com";
|
|
//表html中间内容
|
|
//表html中间内容
|
|
String prime = "";
|
|
String prime = "";
|
|
String firstcenter = "<tr><td><div style=\"padding:25px 35px 40px; background-color:#fff;\"><h2 style=\"margin: 5px 0px; \">" +
|
|
String firstcenter = "<tr><td><div style=\"padding:25px 35px 40px; background-color:#fff;\"><h2 style=\"margin: 5px 0px; \">" +
|
|
@@ -324,7 +326,7 @@ public class PlantproglistBYXTask extends BaseController {
|
|
String three = two.replaceFirst("warningLevel", warningLevel);
|
|
String three = two.replaceFirst("warningLevel", warningLevel);
|
|
String four = three.replaceFirst("contenFormat", contenFormat);
|
|
String four = three.replaceFirst("contenFormat", contenFormat);
|
|
String five = four.replaceFirst("warningContent", warningContent);
|
|
String five = four.replaceFirst("warningContent", warningContent);
|
|
- String six = five.replaceFirst("alarmTypeEn", alarmTypeEn);
|
|
|
|
|
|
+ String six = five.replaceFirst("alarmTypeEn", alarmTypeEn + "?responsibility=" + username);
|
|
String seven = six.replaceFirst("alarmType", alarmType);
|
|
String seven = six.replaceFirst("alarmType", alarmType);
|
|
String eight = seven.replace("requestJumpPath", this.ruoyiConfig.getRequestJumpPath());
|
|
String eight = seven.replace("requestJumpPath", this.ruoyiConfig.getRequestJumpPath());
|
|
String result = eight.replaceFirst("date", String.valueOf(new Date()));
|
|
String result = eight.replaceFirst("date", String.valueOf(new Date()));
|
|
@@ -332,6 +334,7 @@ public class PlantproglistBYXTask extends BaseController {
|
|
//拼接html
|
|
//拼接html
|
|
String html = start + prime + end;
|
|
String html = start + prime + end;
|
|
mailService.sendHtmlMail(email, "CPMS:您有一条预警信息", html, emailCc);
|
|
mailService.sendHtmlMail(email, "CPMS:您有一条预警信息", html, emailCc);
|
|
|
|
+// mailService.sendHtmlMail("735032128@qq.com", "CPMS:您有一条预警信息", html, "ly@seashoreept.com");
|
|
String level = warningLevel.substring(0, 1);
|
|
String level = warningLevel.substring(0, 1);
|
|
insertHistory(alarmPrincipal, level, warningContent, typeId, alarmType);
|
|
insertHistory(alarmPrincipal, level, warningContent, typeId, alarmType);
|
|
|
|
|