From d06588480e6e7bbe6d72267b55295f321a8a19a1 Mon Sep 17 00:00:00 2001 From: shilei Date: Wed, 26 Oct 2022 19:49:19 +0800 Subject: [PATCH] =?UTF-8?q?#EC-HJ-16#=20=E9=82=AE=E4=BB=B6=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E6=8F=90=E9=86=92=E6=A0=87=E9=A2=98=E5=8F=8A=E5=86=85?= =?UTF-8?q?=E5=AE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../sendtodo/SendPortalTodoUtil.java | 27 +++++++++++++------ src/weaver/interfaces/comInfo/PropBean.java | 2 +- 2 files changed, 20 insertions(+), 9 deletions(-) diff --git a/src/com/customization/sendtodo/SendPortalTodoUtil.java b/src/com/customization/sendtodo/SendPortalTodoUtil.java index a829da1c..9327fc24 100644 --- a/src/com/customization/sendtodo/SendPortalTodoUtil.java +++ b/src/com/customization/sendtodo/SendPortalTodoUtil.java @@ -136,8 +136,10 @@ public class SendPortalTodoUtil { if("0".equals(resultCode)){ System.out.println(emailArray.toJSONString()); - String notificationSubject = ""+requestname; - String notificationContent = ""+requestname ; + + 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); }else{ @@ -280,8 +282,10 @@ public class SendPortalTodoUtil { if("0".equals(resultCode)){ System.out.println(emailArray.toJSONString()); - String notificationSubject = ""+requestname; - String notificationContent = ""+requestname ; + + 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); }else{ sendPortalErrorUtil.doCreateSendPortalTodoErrorInfo(); @@ -317,6 +321,7 @@ public class SendPortalTodoUtil { String terminal = "1" ; String taskType = "0"; String objectId = "" ; + String requestname = "" ; JSONArray emailArray = new JSONArray(); Pattern regex = Pattern.compile(EMAIL_REGEX_DEFAULT); @@ -360,6 +365,7 @@ public class SendPortalTodoUtil { rs.executeQuery(sql); if (rs.next()){ String title = Util.null2String(rs.getString("requestname")) ; + requestname = title; String creator = Util.null2String(rs.getString("loginid")) ; String taskCode = Util.null2String(rs.getString("taskcode")) ; String nodeId = Util.null2String(rs.getString("nodeid")) ; @@ -413,6 +419,7 @@ public class SendPortalTodoUtil { if (rs.next()){ String title = Util.null2String(rs.getString("requestname")) ; + requestname = title; String creator = Util.null2String(rs.getString("loginid")) ; String taskCode = Util.null2String(rs.getString("taskcode")) ; String nodeId = Util.null2String(rs.getString("nodeid")) ; @@ -491,8 +498,8 @@ public class SendPortalTodoUtil { if("0".equals(resultCode)){ System.out.println(emailArray.toJSONString()); - String notificationSubject = ""; - String notificationContent = "" ; + 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); }else{ @@ -532,6 +539,7 @@ public class SendPortalTodoUtil { String objectAction = "0" ; String objectType = "0"; String objectId = "" ; + String requestname = ""; try { String actionType = "2" ; @@ -550,6 +558,7 @@ public class SendPortalTodoUtil { if (rs.next()){ String title = Util.null2String(rs.getString("requestname")) ; + requestname = title ; String creator = Util.null2String(rs.getString("loginid")) ; String taskCode = Util.null2String(rs.getString("taskcode")) ; String nodeId = Util.null2String(rs.getString("nodeid")) ; @@ -632,8 +641,10 @@ public class SendPortalTodoUtil { if("0".equals(resultCode)){ System.out.println(emailArray.toJSONString()); - String notificationSubject = ""; - String notificationContent = "" ; + + 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); }else{ diff --git a/src/weaver/interfaces/comInfo/PropBean.java b/src/weaver/interfaces/comInfo/PropBean.java index 3da915a5..06443d53 100644 --- a/src/weaver/interfaces/comInfo/PropBean.java +++ b/src/weaver/interfaces/comInfo/PropBean.java @@ -10,7 +10,7 @@ public class PropBean { public static BaseBean bb = new BaseBean(); public static String active = Util.null2String(bb.getPropValue("developProp","active")); - public static String getPropName(String pkey) + public static String getPropValue(String pkey) { if(StringUtils.isEmpty(active)){ return "";