Commit 2f295d1b authored by stone's avatar stone

Merge branch 'feature/bug_fix' into develop

parents 4fe97a23 3147f583
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;
......@@ -13,8 +10,7 @@ import java.util.regex.Pattern;
* @description
*/
public class DelHtmlScript {
@Autowired
private IBusinessContactService service;
/**
* 定义script的正则表达式
*/
......
......@@ -93,10 +93,10 @@ public class MailSend {
// 创建多重消息
// 设置文本消息部分
//判断是html格式还是文本格式
if (CONTENT_TYPE_HTML.equals(jsonObject.optString("content_type"))) {
//删除html标签
body=DelHtmlScript.delHtmlTag(body);
}
// if (CONTENT_TYPE_HTML.equals(jsonObject.optString("content_type"))) {
// //删除html标签
// body=DelHtmlScript.delHtmlTag(body);
// }
messageBodyPart.setText(body);
multipart.addBodyPart(messageBodyPart);
......@@ -140,7 +140,7 @@ public class MailSend {
jb.put("content_type", "text/html");
jb.put("attch_flag", "Y");
jb.put("attch_file_name", "财务收支一览表.xlsx");
jb.put("attch_file_path", "d:/222.txt");
jb.put("attch_file_path", "D:/u01/hls_file/task_excel/excel1589481201751.xlsx");
try{
mailSend.sendMain(jb.toString());
}catch(Exception e){
......
......@@ -65,6 +65,7 @@
NVL((SELECT SUM(nvl(c.lease_item_amount, 0))
FROM con_contract c
WHERE c.contract_status <> 'CANCEL'
AND c.data_class='NORMAL'
AND to_char(add_months(c.lease_start_date, 1),
'yyyymm') = to_char(SYSDATE, 'yyyymm')
AND nvl(c.payment_deduction, 'NO_DEDUCTION') =
......@@ -73,6 +74,7 @@
nvl(c.down_payment, 0))
FROM con_contract c
WHERE c.contract_status <> 'CANCEL'
AND c.data_class='NORMAL'
AND to_char(add_months(c.lease_start_date, 1),
'yyyymm') = to_char(SYSDATE, 'yyyymm')
AND nvl(c.payment_deduction, 'NO_DEDUCTION') <>
......@@ -83,6 +85,7 @@
NVL((SELECT SUM(nvl(c.lease_item_amount, 0))
FROM con_contract c
WHERE c.contract_status <> 'CANCEL'
AND c.data_class='NORMAL'
AND to_char(c.lease_start_date, 'yyyymm') =
to_char(SYSDATE, 'yyyymm')
AND nvl(c.payment_deduction, 'NO_DEDUCTION') =
......@@ -91,6 +94,7 @@
nvl(c.down_payment, 0))
FROM con_contract c
WHERE c.contract_status <> 'CANCEL'
AND c.data_class='NORMAL'
AND to_char(c.lease_start_date, 'yyyymm') =
to_char(SYSDATE, 'yyyymm')
AND nvl(c.payment_deduction, 'NO_DEDUCTION') <>
......
......@@ -4,13 +4,13 @@
<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,
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,
......@@ -35,7 +35,7 @@
(SELECT 1
FROM con_contract ct
WHERE ct.contract_status IN
('INCEPT', 'PENDING','ETING', 'REPURING')
('INCEPT', 'PENDING', 'ETING', 'REPURING')
AND ct.contract_id = contract_id)) purchase_amount, --留购金
(SELECT SUM(due_amount - nvl(received_amount, 0))
FROM con_contract_cashflow
......@@ -45,7 +45,7 @@
(SELECT 1
FROM con_contract ct
WHERE ct.contract_status IN
('INCEPT', 'PENDING','ETING', 'REPURING')
('INCEPT', 'PENDING', 'ETING', 'REPURING')
AND ct.contract_id = contract_id)) down_payment, --首付款
(SELECT SUM(due_amount)
FROM con_contract_cashflow ccc
......@@ -55,7 +55,7 @@
(SELECT 1
FROM con_contract ct
WHERE ct.contract_status IN
('INCEPT', 'PENDING','ETING', 'REPURING')
('INCEPT', 'PENDING', 'ETING', 'REPURING')
AND ct.contract_id = contract_id)) lease_amount, --租金
(CASE
WHEN to_char(SYSDATE, 'dd') <= 20 AND
......@@ -65,42 +65,57 @@
NVL((SELECT SUM(nvl(c.lease_item_amount, 0))
FROM con_contract c
WHERE c.contract_status <> 'CANCEL'
AND c.data_class = 'NORMAL'
AND to_char(add_months(c.lease_start_date, 1),
'yyyymm') = to_char(SYSDATE, 'yyyymm')
'yyyymm') =
to_char(SYSDATE,
'yyyymm')
AND nvl(c.payment_deduction, 'NO_DEDUCTION') =
'NO_DEDUCTION'),0) +
'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 c.data_class = 'NORMAL'
AND to_char(add_months(c.lease_start_date, 1),
'yyyymm') = to_char(SYSDATE, 'yyyymm')
'yyyymm') =
to_char(SYSDATE,
'yyyymm')
AND nvl(c.payment_deduction, 'NO_DEDUCTION') <>
'NO_DEDUCTION'),0)
'NO_DEDUCTION'),
0)
WHEN to_char(SYSDATE, 'dd') > 20 AND
to_char(add_months(t.calendar_date, -1), 'yyyymm') =
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 c.data_class = 'NORMAL'
AND to_char(c.lease_start_date, 'yyyymm') =
to_char(SYSDATE,
'yyyymm')
AND nvl(c.payment_deduction, 'NO_DEDUCTION') =
'NO_DEDUCTION'),0) +
'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 c.data_class = 'NORMAL'
AND to_char(c.lease_start_date, 'yyyymm') =
to_char(SYSDATE,
'yyyymm')
AND nvl(c.payment_deduction, 'NO_DEDUCTION') <>
'NO_DEDUCTION'),0)
'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)
WHERE trunc(s.calendar_date) >=
trunc(SYSDATE)
AND trunc(s.calendar_date) <= ANY
(SELECT trunc(due_date)
FROM con_contract_cashflow ccc
......@@ -109,7 +124,10 @@
(SELECT 1
FROM con_contract t
WHERE t.contract_status IN
('INCEPT', 'PENDING','ETING', 'REPURING')
('INCEPT',
'PENDING',
'ETING',
'REPURING')
AND t.contract_id = ccc.contract_id
AND t.data_class = 'NORMAL'))
ORDER BY s.calendar_date) t) v
......
<?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="/u01/hls_file/task_excel/">
<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="D:/u01/hls_file/task_excel">
<!--下载报表的权限校验-->
<p:procedure name="pre-service">
<p:set field="@success" value="true"/>
......
......@@ -7,7 +7,7 @@
<!-- var para = $ctx.current_parameter || $ctx.parameter;-->
<!-- println(para.toXML());-->
$ctx.parameter.file_name='财务收支一览表.xlsx';
$ctx.parameter.file_path = '/u01/hls_file/task_excel/';
$ctx.parameter.file_path = 'D:/u01/hls_file/task_excel';
]]></s:server-script>
<dr:excel-report enableTask="true" fileName="${/parameter/@file_name}">
<dr:styles>
......
......@@ -29,6 +29,8 @@
attch_file_path:mail_list_result[i].attch_file_path,
attch_flag:mail_list_result[i].attch_flag //附件标志
};
println('1111');
println(mail_list_result[i].attch_file_path);
var sm = new MailSend();
var stringResult = sm.sendMain(JSON.stringify(jsonString));//调用接口
var ob = JSON.parse(stringResult);//将接口返回的string字符串解析成对象
......
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