From 3705d65e0a796a3b72108d3d2f7aa49ec1020534 Mon Sep 17 00:00:00 2001 From: zhouyahui Date: Wed, 5 Dec 2018 17:33:28 +0800 Subject: [PATCH] =?UTF-8?q?=E9=82=AE=E4=BB=B6=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../App/Interface/Email/EmailSendInfo.jsp | 41 +++++++++++++++++++ .../App/Interface/Email/EmailSendList.jsp | 41 +++++++++++++++++++ src_core/com/tenwa/sendemail/SendEmail.java | 34 +++++++++++++++ 3 files changed, 116 insertions(+) create mode 100644 WebContent/Tenwa/Lease/App/Interface/Email/EmailSendInfo.jsp create mode 100644 WebContent/Tenwa/Lease/App/Interface/Email/EmailSendList.jsp create mode 100644 src_core/com/tenwa/sendemail/SendEmail.java diff --git a/WebContent/Tenwa/Lease/App/Interface/Email/EmailSendInfo.jsp b/WebContent/Tenwa/Lease/App/Interface/Email/EmailSendInfo.jsp new file mode 100644 index 000000000..2cf2d78a5 --- /dev/null +++ b/WebContent/Tenwa/Lease/App/Interface/Email/EmailSendInfo.jsp @@ -0,0 +1,41 @@ +<%@ page contentType="text/html; charset=GBK"%> +<%@ include file="/Frame/resources/include/include_begin_info.jspf"%><% + /* + Author: undefined 2018-06-08 + Content: 示例详情页面 + History Log: + */ + String sPrevUrl = CurPage.getParameter("PrevUrl"); + if(sPrevUrl == null) sPrevUrl = "/Tenwa/Lease/App/Interface/Email/EmailSendList.jsp"; + + String sTempletNo = "EmailSendInfo";//--模板号-- + ASObjectModel doTemp = new ASObjectModel(sTempletNo); + ASObjectWindow dwTemp = new ASObjectWindow(CurPage, doTemp,request); + dwTemp.Style = "2";//freeform + //dwTemp.ReadOnly = "-2";//只读模式 + dwTemp.genHTMLObjectWindow(CurPage.getParameter("ID")); + + String sButtons[][] = { + {"true","All","Button","保存","保存所有修改","as_save(0,'sendEmail()')","","","",""}, + {String.valueOf(!com.amarsoft.are.lang.StringX.isSpace(sPrevUrl)),"All","Button","返回","返回列表","returnList()","","","",""} + }; + sButtonPosition = "south"; +%><%@ include file="/Frame/resources/include/ui/include_info.jspf"%> + +<%@ include file="/Frame/resources/include/include_end.jspf"%> \ No newline at end of file diff --git a/WebContent/Tenwa/Lease/App/Interface/Email/EmailSendList.jsp b/WebContent/Tenwa/Lease/App/Interface/Email/EmailSendList.jsp new file mode 100644 index 000000000..acd0d9178 --- /dev/null +++ b/WebContent/Tenwa/Lease/App/Interface/Email/EmailSendList.jsp @@ -0,0 +1,41 @@ +<%@ page contentType="text/html; charset=GBK"%> +<%@ include file="/Frame/resources/include/include_begin_list.jspf"%><% + /* + Author: undefined 2018-06-08 + Content: + History Log: + */ + ASObjectModel doTemp = new ASObjectModel("EmailSendList"); + ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request); + dwTemp.Style="1"; //--设置为Grid风格-- + dwTemp.ReadOnly = "1"; //只读模式 + dwTemp.setPageSize(10); + dwTemp.genHTMLObjectWindow(""); + + //0、是否展示 1、 权限控制 2、 展示类型 3、按钮显示名称 4、按钮解释文字 5、按钮触发事件代码 6、 7、 8、 9、图标,CSS层叠样式 10、风格 + String sButtons[][] = { + {"true","All","Button","新增","新增","newRecord()","","","","btn_icon_add",""}, + {"true","","Button","详情","详情","viewAndEdit()","","","","btn_icon_detail",""}, + {"true","","Button","删除","删除","if(confirm('确实要删除吗?'))as_delete(0)","","","","btn_icon_delete",""}, + }; +%><%@include file="/Frame/resources/include/ui/include_list.jspf"%> + +<%@ include file="/Frame/resources/include/include_end.jspf"%> \ No newline at end of file diff --git a/src_core/com/tenwa/sendemail/SendEmail.java b/src_core/com/tenwa/sendemail/SendEmail.java new file mode 100644 index 000000000..a42c4955b --- /dev/null +++ b/src_core/com/tenwa/sendemail/SendEmail.java @@ -0,0 +1,34 @@ +package com.tenwa.sendemail; + +import java.util.HashMap; +import java.util.Map; +import java.util.concurrent.ConcurrentHashMap; + + +import com.amarsoft.are.jbo.BizObject; +import com.amarsoft.are.jbo.JBOFactory; +import com.amarsoft.are.jbo.JBOTransaction; +import com.amarsoft.are.lang.DataElement; +import com.tenwa.util.SendEmailUtil; + +import jbo.app.tenwa.customer.BT_EMAIL_SEND; + +public class SendEmail { + private String id; + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + public String send(JBOTransaction tx)throws Exception { + BizObject bo= JBOFactory.getBizObjectManager(BT_EMAIL_SEND.CLASS_NAME,tx).createQuery("ID=:ID").setParameter("ID",id).getSingleResult(false); + String toUser =bo.getAttribute("TOEMAIL").toString(); + String title = bo.getAttribute("EMAIL_HEADLINE").toString(); + String content =bo.getAttribute("EMAIL_CONTENT").toString(); + SendEmailUtil.sendMessage(tx,toUser,title,content,true,null); + return "邮件发送成功!"; + } +}