Commit 4b4826c5 authored by stone's avatar stone

【fix】财务收支一览表开发

parent a17302a7
package com.hand.hls.hlcm.util;
import com.hand.hls.hlcm.contact.service.IBusinessContactService;
import org.springframework.beans.factory.annotation.Autowired;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
/**
* @author stone shen
* @version 1.0
* @date 2020/4/21 9:33
* @description
*/
public class DelHtmlScript {
@Autowired
private IBusinessContactService service;
/**
* 定义script的正则表达式
*/
public static final String regEx_script="<script[^>]*?>[\\s\\S]*?<\\/script>";
/**
* 定义style的正则表达式
*/
public static final String regEx_style="<style[^>]*?>[\\s\\S]*?<\\/style>";
/**
* 定义HTML标签的正则表达式
*/
public static final String regEx_html="<[^>]+>";
public static String delHtmlTag(String htmlStr){
Pattern p_script=Pattern.compile(regEx_script,Pattern.CASE_INSENSITIVE);
Matcher m_script=p_script.matcher(htmlStr);
//过滤script标签
htmlStr=m_script.replaceAll("");
Pattern p_style=Pattern.compile(regEx_style,Pattern.CASE_INSENSITIVE);
Matcher m_style=p_style.matcher(htmlStr);
//过滤style标签
htmlStr=m_style.replaceAll("");
Pattern p_html=Pattern.compile(regEx_html,Pattern.CASE_INSENSITIVE);
Matcher m_html=p_html.matcher(htmlStr);
//过滤html标签
htmlStr=m_html.replaceAll("");
//返回文本字符串
return htmlStr.trim();
}
}
......@@ -4,27 +4,36 @@ import net.sf.json.JSONObject;
import org.junit.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import sun.applet.Main;
import javax.activation.DataHandler;
import javax.activation.DataSource;
import javax.activation.FileDataSource;
import javax.mail.*;
import javax.mail.internet.InternetAddress;
import javax.mail.internet.MimeBodyPart;
import javax.mail.internet.MimeMessage;
import javax.mail.internet.MimeMultipart;
import javax.mail.internet.*;
import java.io.File;
import java.util.Properties;
/**
* @purpose java 邮件发送
* @author stone
*/
public class MailSend {
private static final Logger logger = LoggerFactory.getLogger(MailSend.class);
private static boolean ATTACHMENT_FLAG = false;
private static final String CONTENT_TYPE_HTML = "text/html";
private static final String YES = "Y";
public static boolean isEmpty(String str) {
return str == null || "".equals(str.trim());
}
public static boolean isNotEmpty(String str) {
return !isEmpty(str);
}
public String sendMain(String jsonData) {
public String sendMain(String jsonData) {
JSONObject jsonObject = JSONObject.fromObject(jsonData);
JSONObject js=new JSONObject();
JSONObject js = new JSONObject();
// 发件人电子邮箱
String from = jsonObject.optString("serverAddress");
//获取系统属性,主要用于设置邮件相关的参数。
......@@ -53,6 +62,10 @@ public class MailSend {
//如果含有分号则去掉
//收件人可能有多个
String[] toParams = jsonObject.optString("toAddress").split(";");
String attchFlag=jsonObject.optString("attch_flag");
if(isNotEmpty(attchFlag)&&YES.equals(attchFlag)){
ATTACHMENT_FLAG=true;
}
if (toParams.length > 0) {
InternetAddress[] sendTo = new InternetAddress[toParams.length];
for (int i = 0; i < toParams.length; i++) {
......@@ -61,60 +74,78 @@ public class MailSend {
message.addRecipients(Message.RecipientType.TO, sendTo);
}
if (isNotEmpty(jsonObject.optString("toCcAddress"))){
if (isNotEmpty(jsonObject.optString("toCcAddress"))) {
String[] params = jsonObject.optString("toCcAddress").split(";");
if (params.length > 0) {
InternetAddress[] sendCc = new InternetAddress[params.length];
for (int i = 0; i < params.length; i++) {
sendCc[i] = new InternetAddress(params[i]);
if (params.length > 0) {
InternetAddress[] sendCc = new InternetAddress[params.length];
for (int i = 0; i < params.length; i++) {
sendCc[i] = new InternetAddress(params[i]);
}
message.addRecipients(MimeMessage.RecipientType.CC, sendCc);
}
message.addRecipients(MimeMessage.RecipientType.CC, sendCc);
}}
}
message.setSubject(jsonObject.optString("toSubject"));
Multipart multipart = new MimeMultipart();
// 创建消息部分
BodyPart messageBodyPart = new MimeBodyPart();
// 消息
String body=jsonObject.optString("toBody");
// 创建多重消息
// 设置文本消息部分
//判断是html格式还是文本格式
if(jsonObject.optString("content_type").equals("text/html")){
BodyPart html = new MimeBodyPart();
Multipart mainPart = new MimeMultipart();
// 设置HTML内容
html.setContent(jsonObject.optString("toBody"), "text/html; charset=utf-8");
mainPart.addBodyPart(html);
// 将MiniMultipart对象设置为邮件内容
message.setContent(mainPart);
}else {
message.setText(jsonObject.optString("toBody"));
if (CONTENT_TYPE_HTML.equals(jsonObject.optString("content_type"))) {
//删除html标签
body=DelHtmlScript.delHtmlTag(body);
}
messageBodyPart.setText(body);
multipart.addBodyPart(messageBodyPart);
if(ATTACHMENT_FLAG){
String fileName=jsonObject.optString("attch_file_name");
String filePath=jsonObject.optString("attch_file_path");
// 附件部分
BodyPart attachmentBodyPart = new MimeBodyPart();
// 设置要发送附件的文件路径
DataSource source = new FileDataSource(new File(filePath));
attachmentBodyPart.setDataHandler(new DataHandler(source));
// 处理附件名称中文(附带文件路径)乱码问题
attachmentBodyPart.setFileName(MimeUtility.encodeText(fileName));
multipart.addBodyPart(attachmentBodyPart);
}
message.setContent(multipart);
Transport.send(message);
logger.info("send Success!");
js.put("status",'S');
} catch (MessagingException e) {
js.put("status", 'S');
} catch (Exception e) {
logger.error("send Error!", e);
js.put("status",'E');
js.put("errorMsg",e.getMessage());
js.put("status", 'E');
js.put("errorMsg", e.getMessage());
}
return js.toString();
return js.toString();
}
/**
* 测试邮件是否能正常发送
*/
@Test
@Test
public void test() {
MailSend mailSend=new MailSend();
JSONObject jb=new JSONObject();
jb.put("serverHost","smtp.partner.outlook.cn");
jb.put("serverPort","587");
jb.put("serverName","kenki_system@hongling.sh.cn");
jb.put("serverPassWord","KenkiSYS2019");
jb.put("serverAddress","kenki_system@hongling.sh.cn");
jb.put("toAddress","1174795617@qq.com");
jb.put("toCcAddress","");
jb.put("toSubject","123");
jb.put("toBody","<span style=\"white-space:nowrap;\">复制测试最后一百年</span>");
jb.put("content_type","text/html");
mailSend.sendMain(jb.toString());
MailSend mailSend = new MailSend();
JSONObject jb = new JSONObject();
jb.put("serverHost", "smtp.partner.outlook.cn");
jb.put("serverPort", "587");
jb.put("serverName", "kenki_system@hongling.sh.cn");
jb.put("serverPassWord", "KenkiSYS2019");
jb.put("serverAddress", "kenki_system@hongling.sh.cn");
jb.put("toAddress", "1174795617@qq.com");
jb.put("toCcAddress", "");
jb.put("toSubject", "123");
jb.put("toBody", "<span style=\"white-space:nowrap;\">复制测试最后一百年</span>");
jb.put("content_type", "text/plain");
jb.put("attch_flag", "Y");
jb.put("attch_file_name", "财务收支一览表.xlsx");
jb.put("attch_file_path", "/u01/hls_file/excel/excel1587545458258.xlsx");
try{
mailSend.sendMain(jb.toString());
}catch(Exception e){
e.printStackTrace();
}
}
}
<?xml version="1.0" encoding="UTF-8"?>
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" needAccessControl="false">
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
SELECT to_char(v.calendar_date,'yyyy/mm/dd')calendar_date,
v.named_day,
v.purchase_amount,
v.down_payment,
v.lease_amount,
nvl(v.purchase_amount, 0) + nvl(down_payment, 0) +
nvl(lease_amount, 0) total_amount,
outflow_amount
FROM (SELECT t.calendar_date,
decode(to_char(t.calendar_date, 'd'),
1,
'日',
2,
'月',
3,
'火',
4,
'水',
5,
'木',
6,
'金',
7,
'土') named_day,
(SELECT SUM(due_amount - nvl(received_amount, 0))
FROM con_contract_cashflow
WHERE cf_item = 8
AND due_date = t.calendar_date
AND EXISTS
(SELECT 1
FROM con_contract ct
WHERE ct.contract_status IN
('INCEPT', 'ETING', 'REPURING')
AND ct.contract_id = contract_id)) purchase_amount, --留购金
(SELECT SUM(due_amount - nvl(received_amount, 0))
FROM con_contract_cashflow
WHERE cf_item = 2
AND due_date = t.calendar_date
AND EXISTS
(SELECT 1
FROM con_contract ct
WHERE ct.contract_status IN
('INCEPT', 'ETING', 'REPURING')
AND ct.contract_id = contract_id)) down_payment, --首付款
(SELECT SUM(due_amount)
FROM con_contract_cashflow ccc
WHERE cf_item = 1
AND due_date = t.calendar_date
AND EXISTS
(SELECT 1
FROM con_contract ct
WHERE ct.contract_status IN
('INCEPT', 'ETING', 'REPURING')
AND ct.contract_id = contract_id)) lease_amount, --租金
(CASE
WHEN to_char(SYSDATE, 'dd') <= 20 AND
to_char(t.calendar_date, 'yyyymmdd') =
to_char(SYSDATE, 'yyyymm') || 20 THEN
--当月的二十号统计数据
NVL((SELECT SUM(nvl(c.lease_item_amount, 0))
FROM con_contract c
WHERE c.contract_status <> 'CANCEL'
AND to_char(add_months(c.lease_start_date, 1),
'yyyymmdd') = to_char(SYSDATE, 'yyyymmdd')
AND nvl(c.payment_deduction, 'NO_DEDUCTION') =
'NO_DEDUCTION'),0) +
NVL((SELECT SUM(nvl(c.lease_item_amount, 0) -
nvl(c.down_payment, 0))
FROM con_contract c
WHERE c.contract_status <> 'CANCEL'
AND to_char(add_months(c.lease_start_date, 1),
'yyyymmdd') = to_char(SYSDATE, 'yyyymmdd')
AND nvl(c.payment_deduction, 'NO_DEDUCTION') <>
'NO_DEDUCTION'),0)
WHEN to_char(SYSDATE, 'dd') > 20 AND
to_char(add_months(t.calendar_date, -1), 'yyyymmdd') =
to_char(SYSDATE, 'yyyymm') || 20 THEN
NVL((SELECT SUM(nvl(c.lease_item_amount, 0))
FROM con_contract c
WHERE c.contract_status <> 'CANCEL'
AND to_char(c.lease_start_date, 'yyyymmdd') =
to_char(SYSDATE, 'yyyymmdd')
AND nvl(c.payment_deduction, 'NO_DEDUCTION') =
'NO_DEDUCTION'),0)+
NVL((SELECT SUM(nvl(c.lease_item_amount, 0) -
nvl(c.down_payment, 0))
FROM con_contract c
WHERE c.contract_status <> 'CANCEL'
AND to_char(c.lease_start_date, 'yyyymmdd') =
to_char(SYSDATE, 'yyyymmdd')
AND nvl(c.payment_deduction, 'NO_DEDUCTION') <>
'NO_DEDUCTION'),0)
ELSE
0
END) outflow_amount
FROM (SELECT s.calendar_date
FROM fnd_calendar_details s
WHERE trunc(s.calendar_date) >= trunc(SYSDATE)
AND trunc(s.calendar_date) <= ANY
(SELECT trunc(due_date)
FROM con_contract_cashflow ccc
WHERE ccc.cf_status = 'RELEASE'
AND EXISTS
(SELECT 1
FROM con_contract t
WHERE t.contract_status IN
('INCEPT', 'ETING', 'REPURING')
AND t.contract_id = ccc.contract_id
AND t.data_class = 'NORMAL'))
ORDER BY s.calendar_date) t) v
]]></bm:query-sql>
</bm:operation>
<bm:operation name="update">
<bm:update-sql><![CDATA[
begin
contract_item_query_pkg.send_excel_mail(p_file_name => ${@file_name},
p_file_path => ${@file_path} ,
p_file_size => ${@file_size},
p_user_id => -1
);
end;
]]></bm:update-sql>
</bm:operation>
</bm:operations>
</bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" needAccessControl="false">
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
SELECT v.monthly,
SUM(NVL(purchase_amount,0)) total_purchase_amount,
SUM(NVL(down_payment,0)) total_down_payment,
SUM(NVL(lease_amount,0)) total_lease_amount,
(SUM(NVL(purchase_amount,0))+ SUM(NVL(down_payment,0))+SUM(NVL(lease_amount,0))) total_amount,
SUM(NVL(outflow_amount,0)) total_outflow_amount
FROM (SELECT
to_char(t.calendar_date,'yyyy/mm') monthly,
t.calendar_date,
decode(to_char(t.calendar_date, 'd'),
1,
'日',
2,
'月',
3,
'火',
4,
'水',
5,
'木',
6,
'金',
7,
'土') named_day,
(SELECT SUM(due_amount - nvl(received_amount, 0))
FROM con_contract_cashflow
WHERE cf_item = 8
AND due_date = t.calendar_date
AND EXISTS
(SELECT 1
FROM con_contract ct
WHERE ct.contract_status IN
('INCEPT', 'ETING', 'REPURING')
AND ct.contract_id = contract_id)) purchase_amount, --留购金
(SELECT SUM(due_amount - nvl(received_amount, 0))
FROM con_contract_cashflow
WHERE cf_item = 2
AND due_date = t.calendar_date
AND EXISTS
(SELECT 1
FROM con_contract ct
WHERE ct.contract_status IN
('INCEPT', 'ETING', 'REPURING')
AND ct.contract_id = contract_id)) down_payment, --首付款
(SELECT SUM(due_amount)
FROM con_contract_cashflow ccc
WHERE cf_item = 1
AND due_date = t.calendar_date
AND EXISTS
(SELECT 1
FROM con_contract ct
WHERE ct.contract_status IN
('INCEPT', 'ETING', 'REPURING')
AND ct.contract_id = contract_id)) lease_amount, --租金
(CASE
WHEN to_char(SYSDATE, 'dd') <= 20 AND
to_char(t.calendar_date, 'yyyymmdd') =
to_char(SYSDATE, 'yyyymm') || 20 THEN
--当月的二十号统计数据
NVL((SELECT SUM(nvl(c.lease_item_amount, 0))
FROM con_contract c
WHERE c.contract_status <> 'CANCEL'
AND to_char(add_months(c.lease_start_date, 1),
'yyyymmdd') = to_char(SYSDATE, 'yyyymmdd')
AND nvl(c.payment_deduction, 'NO_DEDUCTION') =
'NO_DEDUCTION'),0) +
NVL((SELECT SUM(nvl(c.lease_item_amount, 0) -
nvl(c.down_payment, 0))
FROM con_contract c
WHERE c.contract_status <> 'CANCEL'
AND to_char(add_months(c.lease_start_date, 1),
'yyyymmdd') = to_char(SYSDATE, 'yyyymmdd')
AND nvl(c.payment_deduction, 'NO_DEDUCTION') <>
'NO_DEDUCTION'),0)
WHEN to_char(SYSDATE, 'dd') > 20 AND
to_char(add_months(t.calendar_date, -1), 'yyyymmdd') =
to_char(SYSDATE, 'yyyymm') || 20 THEN
NVL((SELECT SUM(nvl(c.lease_item_amount, 0))
FROM con_contract c
WHERE c.contract_status <> 'CANCEL'
AND to_char(c.lease_start_date, 'yyyymmdd') =
to_char(SYSDATE, 'yyyymmdd')
AND nvl(c.payment_deduction, 'NO_DEDUCTION') =
'NO_DEDUCTION'),0) +
NVL((SELECT SUM(nvl(c.lease_item_amount, 0) -
nvl(c.down_payment, 0))
FROM con_contract c
WHERE c.contract_status <> 'CANCEL'
AND to_char(c.lease_start_date, 'yyyymmdd') =
to_char(SYSDATE, 'yyyymmdd')
AND nvl(c.payment_deduction, 'NO_DEDUCTION') <>
'NO_DEDUCTION'),0)
ELSE
0
END) outflow_amount
FROM (SELECT s.calendar_date
FROM fnd_calendar_details s
WHERE trunc(s.calendar_date) >= trunc(SYSDATE)
AND trunc(s.calendar_date) <= ANY
(SELECT trunc(due_date)
FROM con_contract_cashflow ccc
WHERE ccc.cf_status = 'RELEASE'
AND EXISTS
(SELECT 1
FROM con_contract t
WHERE t.contract_status IN
('INCEPT', 'ETING', 'REPURING')
AND t.contract_id = ccc.contract_id
AND t.data_class = 'NORMAL'))
ORDER BY s.calendar_date) t) v
GROUP BY v.monthly
ORDER BY monthly
]]></bm:query-sql>
</bm:operation>
</bm:operations>
</bm:model>
......@@ -15,7 +15,10 @@
mail_cc,
subject,
body,
content_type
content_type,
attch_file_name,
attch_file_path,
attch_flag
FROM
zj_sys_mailing_list
WHERE
......@@ -140,5 +143,8 @@
<bm:field name="subject"/>
<bm:field name="body"/>
<bm:field name="content_type"/>
<bm:field name="attch_file_name"/>
<bm:field name="attch_file_path"/>
<bm:field name="attch_flag"/>
</bm:fields>
</bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<et:ReportTask xmlns:t="leaf.application.action" xmlns:a="http://www.leaf-framework.org/application" xmlns:et="leaf.plugin.export.task" xmlns:p="uncertain.proc" reportDir="E:\hls_files\geely_hls\report_task_file">
<et:ReportTask xmlns:t="leaf.application.action" xmlns:a="http://www.leaf-framework.org/application" xmlns:et="leaf.plugin.export.task" xmlns:p="uncertain.proc" reportDir="/u01/hls_file/task_excel/">
<!--下载报表的权限校验-->
<p:procedure name="pre-service">
<p:set field="@success" value="true"/>
......
<?xml version="1.0" encoding="UTF-8"?>
<a:service xmlns:a="http://www.leaf-framework.org/application" xmlns:dr="leaf.plugin.excelreport" xmlns:s="leaf.plugin.script" trace="true">
<a:init-procedure>
<a:model-query fetchAll="true" model="rpt.RPT5090.atm_update" rootPath="/model/day"/>
<a:model-query fetchAll="true" model="rpt.RPT5090.atm_update_month" rootPath="/model/month"/>
<s:server-script><![CDATA[
var para = $ctx.current_parameter || $ctx.parameter;
println(para.toXML());
$ctx.parameter.file_name='财务收支一览表.xlsx';
$ctx.parameter.file_path = '/u01/hls_file/task_excel/';
]]></s:server-script>
<dr:excel-report enableTask="true" fileName="${/parameter/@file_name}">
<dr:styles>
<dr:cell-style name="cell1" align="ALIGN_LEFT" vertical="VERTICAL_CENTER">
<dr:font bold="true" fontName="宋体" height="10"/>
</dr:cell-style>
<dr:cell-style name="cell2" align="ALIGN_RIGHT" vertical="VERTICAL_CENTER">
<dr:font bold="false" fontName="Calibri" height="11"/>
</dr:cell-style>
<dr:cell-style name="cell3" align="ALIGN_CENTER" vertical="VERTICAL_CENTER">
<dr:font bold="false" fontName="Arial" height="9"/>
</dr:cell-style>
<dr:cell-style name="header" cell_style_id="2" foregroundcolor="BLACK">
<dr:font cell_style_id="2" fontname="微软雅黑" height="10" bold="true"/>
</dr:cell-style>
</dr:styles>
<dr:sheets>
<dr:sheet name="日次" autoSizeColumns="0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119" displayGridlines="true">
<dr:dynamic-content cell="A" dataModel="/model/day" row="1">
<dr:columns>
<dr:table-column cellStyle="cell2" field="calendar_date" title="daily" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="named_day" title="曜日" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="purchase_amount" title="留购金" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="down_payment" title="首付款" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="lease_amount" title="租金" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="total_amount" title="合计" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="outflow_amount" title="cash-out" titlestyle="header" type="content"/>
</dr:columns>
</dr:dynamic-content>
</dr:sheet>
<dr:sheet name="月次" autoSizeColumns="0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119" displayGridlines="true">
<dr:dynamic-content cell="A" dataModel="/model/month" row="1">
<dr:columns>
<dr:table-column cellStyle="cell2" field="monthly" title="monthly" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="total_purchase_amount" title="留购金" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="total_down_payment" title="首付款" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="total_lease_amount" title="租金" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="total_amount" title="合计" titlestyle="header" type="content"/>
<dr:table-column cellStyle="cell2" field="total_outflow_amount" title="cash-out" titlestyle="header" type="content"/>
</dr:columns>
</dr:dynamic-content>
</dr:sheet>
</dr:sheets>
</dr:excel-report>
<s:server-script><![CDATA[
importPackage(java.util.zip);
importPackage(java.io);
try {
var file = new File($ctx.parameter.file_path);
var file_size = 0;
if(file.exists()){
file_size = file.length();
}
// 往邮箱插入待发送的数据,插附件表
var atm_bm = $bm('rpt.RPT5090.atm_update');
atm_bm.update({
file_name: $ctx.parameter.file_name,//附件需要关联到记录ID
file_path: $ctx.parameter.file_path,//文件名
file_size: file_size
});
$ctx.success = "true";
$ctx.parameter.return_status = 'S';
$ctx.parameter.return_message = '执行成功';
} catch (e) {
$ctx.success = "true";
$ctx.parameter.return_status = 'E';
$ctx.parameter.return_message = $ctx.get('/error/@message') || String(e);
//$bm('rollback').update({});
}
var result = {
result: $ctx.parameter.return_status,
message: $ctx.parameter.return_message
};
println(result);
]]></s:server-script>
</a:init-procedure>
<a:service-output output="/parameter"/>
</a:service>
......@@ -24,7 +24,10 @@
toCcAddress:mail_list_result[i].mail_cc,//设置抄送人的邮箱
toSubject:mail_list_result[i].subject,// 设置邮件的主题
toBody:mail_list_result[i].body, // 设置邮件的正文
content_type:mail_list_result[i].content_type
content_type:mail_list_result[i].content_type,
attch_file_name:mail_list_result[i].attch_file_name,
attch_file_path:mail_list_result[i].attch_file_path,
attch_flag:mail_list_result[i].attch_flag //附件标志
};
var sm = new MailSend();
var stringResult = sm.sendMain(JSON.stringify(jsonString));//调用接口
......
......@@ -131,7 +131,7 @@
<a:column name="note" autoAdjust="false" prompt="错误信息" showTitle="true" width="150"/>
<a:column name="re_submit" align="center" prompt="重发" renderer="render_mailQueryDs_grid"/>
<a:column name="mail_body" align="center" prompt="邮件正文" renderer="render_mailQueryDs_grid" width="80"/>
<!-- <a:column name="attach_file" align="center" prompt="附件查看" renderer="attach_file_renderer" width="50"/> -->
<a:column name="attach_file" align="center" prompt="附件查看" renderer="attach_file_renderer" width="80"/>
</a:columns>
<a:editors/>
</a:grid>
......@@ -145,7 +145,7 @@
<a:column name="mail_cc" autoAdjust="false" prompt="抄送" showTitle="true" width="250"/>
<a:column name="subject" autoAdjust="false" prompt="主题" showTitle="true" width="300"/>
<a:column name="mail_body" align="center" prompt="邮件正文" renderer="render_mailHistoryQueryDs_grid" width="80"/>
<!-- <a:column name="attach_file" align="center" prompt="附件查看" renderer="attach_file_renderer_hd" width="50"/> -->
<a:column name="attach_file" align="center" prompt="附件查看" renderer="attach_file_renderer_hd" width="50"/>
</a:columns>
<a:editors/>
</a:grid>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment