|
|
|
@ -31,7 +31,7 @@ public class SendPortalTodoUtil {
|
|
|
|
|
BaseBean bb = new BaseBean();
|
|
|
|
|
RecordSet rs = new RecordSet();
|
|
|
|
|
|
|
|
|
|
JSONArray emailArray = new JSONArray();
|
|
|
|
|
String emailArray = "";
|
|
|
|
|
|
|
|
|
|
String requestname = "";
|
|
|
|
|
String requestremark = "" ;
|
|
|
|
@ -128,7 +128,7 @@ public class SendPortalTodoUtil {
|
|
|
|
|
bb.writeLog("email1:"+email);
|
|
|
|
|
Matcher matcher = regex.matcher(email);
|
|
|
|
|
if(matcher.matches()){
|
|
|
|
|
emailArray.add(email);
|
|
|
|
|
emailArray += StringUtils.isEmpty(emailArray) ? email : ","+email ;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -146,12 +146,12 @@ public class SendPortalTodoUtil {
|
|
|
|
|
String resultCode = msgObject.getString("resultCode");
|
|
|
|
|
if("0".equals(resultCode)){
|
|
|
|
|
|
|
|
|
|
bb.writeLog("emailArray:"+emailArray.toJSONString());
|
|
|
|
|
if(emailArray.size() > 0)
|
|
|
|
|
bb.writeLog("emailArray:"+emailArray);
|
|
|
|
|
if(StringUtils.isNotEmpty(emailArray))
|
|
|
|
|
{
|
|
|
|
|
String notificationSubject = "You have a new to-do list:"+requestname+",Please handle it in time";
|
|
|
|
|
String notificationContent = "You have a new to-do list:"+requestname+",Please handle it in time";
|
|
|
|
|
sendMailUtil.sendMail(requestId,emailArray.toJSONString(),notificationSubject,notificationContent);
|
|
|
|
|
sendMailUtil.sendMail(requestId,emailArray,notificationSubject,notificationContent);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}else{
|
|
|
|
@ -183,7 +183,7 @@ public class SendPortalTodoUtil {
|
|
|
|
|
String requestremark = "" ;
|
|
|
|
|
|
|
|
|
|
JSONObject requestObject = new JSONObject();
|
|
|
|
|
JSONArray emailArray = new JSONArray();
|
|
|
|
|
String emailArray = "";
|
|
|
|
|
Pattern regex = Pattern.compile(EMAIL_REGEX_DEFAULT);
|
|
|
|
|
|
|
|
|
|
BaseBean bb = new BaseBean();
|
|
|
|
@ -282,7 +282,7 @@ public class SendPortalTodoUtil {
|
|
|
|
|
bb.writeLog("email2:"+email);
|
|
|
|
|
Matcher matcher = regex.matcher(email);
|
|
|
|
|
if(matcher.matches()){
|
|
|
|
|
emailArray.add(email);
|
|
|
|
|
emailArray += StringUtils.isEmpty(emailArray) ? email : ","+email ;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -299,12 +299,12 @@ public class SendPortalTodoUtil {
|
|
|
|
|
String resultCode = msgObject.getString("resultCode");
|
|
|
|
|
if("0".equals(resultCode)){
|
|
|
|
|
|
|
|
|
|
bb.writeLog("emailArray:"+emailArray.toJSONString());
|
|
|
|
|
if(emailArray.size() > 0)
|
|
|
|
|
bb.writeLog("emailArray:"+emailArray);
|
|
|
|
|
if(StringUtils.isNotEmpty(emailArray))
|
|
|
|
|
{
|
|
|
|
|
String notificationSubject = "You have a new to-do list:"+requestname+",Please handle it in time";
|
|
|
|
|
String notificationContent = "You have a new to-do list:"+requestname+",Please handle it in time";
|
|
|
|
|
sendMailUtil.sendMail(requestid,emailArray.toJSONString(),notificationSubject,notificationContent);
|
|
|
|
|
sendMailUtil.sendMail(requestid,emailArray,notificationSubject,notificationContent);
|
|
|
|
|
}
|
|
|
|
|
}else{
|
|
|
|
|
sendPortalErrorUtil.doCreateSendPortalTodoErrorInfo();
|
|
|
|
@ -342,7 +342,7 @@ public class SendPortalTodoUtil {
|
|
|
|
|
String objectId = "" ;
|
|
|
|
|
String requestname = "" ;
|
|
|
|
|
|
|
|
|
|
JSONArray emailArray = new JSONArray();
|
|
|
|
|
String emailArray = "";
|
|
|
|
|
Pattern regex = Pattern.compile(EMAIL_REGEX_DEFAULT);
|
|
|
|
|
try {
|
|
|
|
|
|
|
|
|
@ -509,7 +509,7 @@ public class SendPortalTodoUtil {
|
|
|
|
|
bb.writeLog("email3:"+email);
|
|
|
|
|
Matcher matcher = regex.matcher(email);
|
|
|
|
|
if(matcher.matches()){
|
|
|
|
|
emailArray.add(email);
|
|
|
|
|
emailArray += StringUtils.isEmpty(emailArray) ? email : ","+email ;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
requestObject.put("taskObjectList",taskObjectList);
|
|
|
|
@ -526,15 +526,14 @@ public class SendPortalTodoUtil {
|
|
|
|
|
String resultCode = msgObject.getString("resultCode");
|
|
|
|
|
if("0".equals(resultCode)){
|
|
|
|
|
|
|
|
|
|
bb.writeLog("emailArray:"+emailArray.toJSONString());
|
|
|
|
|
if(emailArray.size() > 0)
|
|
|
|
|
bb.writeLog("emailArray:"+emailArray);
|
|
|
|
|
if(StringUtils.isNotEmpty(emailArray))
|
|
|
|
|
{
|
|
|
|
|
String notificationSubject = "You have a new to-do list:"+requestname+",Please handle it in time";
|
|
|
|
|
String notificationContent = "You have a new to-do list:"+requestname+",Please handle it in time";
|
|
|
|
|
sendMailUtil.sendMail(requestid,emailArray.toJSONString(),notificationSubject,notificationContent);
|
|
|
|
|
sendMailUtil.sendMail(requestid,emailArray,notificationSubject,notificationContent);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}else{
|
|
|
|
|
sendPortalErrorUtil.doCreateSendPortalTodoErrorInfo();
|
|
|
|
|
}
|
|
|
|
@ -560,7 +559,7 @@ public class SendPortalTodoUtil {
|
|
|
|
|
SendPortalErrorUtil sendPortalErrorUtil = new SendPortalErrorUtil();
|
|
|
|
|
|
|
|
|
|
JSONObject requestObject = new JSONObject();
|
|
|
|
|
JSONArray emailArray = new JSONArray();
|
|
|
|
|
String emailArray = "";
|
|
|
|
|
Pattern regex = Pattern.compile(EMAIL_REGEX_DEFAULT);
|
|
|
|
|
|
|
|
|
|
BaseBean bb = new BaseBean();
|
|
|
|
@ -659,9 +658,8 @@ public class SendPortalTodoUtil {
|
|
|
|
|
bb.writeLog("email4:"+email);
|
|
|
|
|
Matcher matcher = regex.matcher(email);
|
|
|
|
|
if(matcher.matches()){
|
|
|
|
|
emailArray.add(email);
|
|
|
|
|
emailArray += StringUtils.isEmpty(emailArray) ? email : ","+email ;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
requestObject.put("taskObjectList",taskObjectList);
|
|
|
|
@ -677,12 +675,12 @@ public class SendPortalTodoUtil {
|
|
|
|
|
String resultCode = msgObject.getString("resultCode");
|
|
|
|
|
if("0".equals(resultCode)){
|
|
|
|
|
|
|
|
|
|
bb.writeLog("emailArray:"+emailArray.toJSONString());
|
|
|
|
|
if(emailArray.size() > 0)
|
|
|
|
|
bb.writeLog("emailArray:"+emailArray);
|
|
|
|
|
if(StringUtils.isNotEmpty(emailArray))
|
|
|
|
|
{
|
|
|
|
|
String notificationSubject = "You have a new to-do list:"+requestname+",Please handle it in time";
|
|
|
|
|
String notificationContent = "You have a new to-do list:"+requestname+",Please handle it in time";
|
|
|
|
|
sendMailUtil.sendMail(requestid,emailArray.toJSONString(),notificationSubject,notificationContent);
|
|
|
|
|
sendMailUtil.sendMail(requestid,emailArray,notificationSubject,notificationContent);
|
|
|
|
|
}
|
|
|
|
|
}else{
|
|
|
|
|
sendPortalErrorUtil.doCreateSendPortalTodoErrorInfo();
|
|
|
|
|