Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
leaf-hlcm
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hlcm
leaf-hlcm
Commits
3147f583
Commit
3147f583
authored
May 15, 2020
by
stone
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
【feat】财务收支一览表功能
parent
86c9e2cb
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
145 additions
and
125 deletions
+145
-125
DelHtmlScript.java
src/main/java/com/hand/hls/hlcm/util/DelHtmlScript.java
+1
-5
MailSend.java
src/main/java/com/hand/hls/hlcm/util/MailSend.java
+5
-5
atm_update.lwm
src/main/webapp/WEB-INF/classes/rpt/RPT5090/atm_update.lwm
+5
-1
atm_update_month.lwm
...n/webapp/WEB-INF/classes/rpt/RPT5090/atm_update_month.lwm
+130
-112
report-task.config
...webapp/WEB-INF/leaf.plugin.export.task/report-task.config
+1
-1
export_excel_sheets.lsc
src/main/webapp/modules/rpt/RPT5090/export_excel_sheets.lsc
+1
-1
sys_mail_send_by_java.lsc
src/main/webapp/modules/sys/SYS405/sys_mail_send_by_java.lsc
+2
-0
No files found.
src/main/java/com/hand/hls/hlcm/util/DelHtmlScript.java
View file @
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的正则表达式
*/
...
...
src/main/java/com/hand/hls/hlcm/util/MailSend.java
View file @
3147f583
...
...
@@ -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
){
...
...
src/main/webapp/WEB-INF/classes/rpt/RPT5090/atm_update.lwm
View file @
3147f583
...
...
@@ -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')
<
>
...
...
src/main/webapp/WEB-INF/classes/rpt/RPT5090/atm_update_month.lwm
View file @
3147f583
...
...
@@ -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
...
...
src/main/webapp/WEB-INF/leaf.plugin.export.task/report-task.config
View file @
3147f583
<?
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"
/>
...
...
src/main/webapp/modules/rpt/RPT5090/export_excel_sheets.lsc
View file @
3147f583
...
...
@@ -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>
...
...
src/main/webapp/modules/sys/SYS405/sys_mail_send_by_java.lsc
View file @
3147f583
...
...
@@ -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字符串解析成对象
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment