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
ee4761f6
Commit
ee4761f6
authored
Jan 13, 2020
by
stone
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
【feat】合同事项明细报表的开发
parent
b3c06d82
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
225 additions
and
0 deletions
+225
-0
contract_item_report_query.lwm
...B-INF/classes/cont/CON3300/contract_item_report_query.lwm
+176
-0
contract_item_query_report.lview
...app/modules/cont/CON3300/contract_item_query_report.lview
+49
-0
No files found.
src/main/webapp/WEB-INF/classes/cont/CON3300/contract_item_report_query.lwm
0 → 100644
View file @
ee4761f6
<?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 h.bp_code,
h.bp_name bp_id_tenant_n,
--合同编号
t.contract_number,
t.contract_id,
to_char(nvl(((SELECT SUM(nvl(ccc.principal, 0))
FROM con_contract_cashflow ccc
WHERE ccc.contract_id = t.contract_id
AND ccc.cf_item = 1) +
(SELECT nvl(ccc.due_amount, 0)
FROM con_contract_cashflow ccc
WHERE ccc.contract_id = t.contract_id
AND ccc.cf_item = 2)),
0),
'FM999,999,999,999,990.00') total_principal,
to_char(nvl(((SELECT SUM(nvl(ccc.interest, 0))
FROM con_contract_cashflow ccc
WHERE ccc.contract_id = t.contract_id
AND ccc.cf_item = 1) +
(SELECT nvl(ccc.due_amount, 0)
FROM con_contract_cashflow ccc
WHERE ccc.contract_id = t.contract_id
AND ccc.cf_item = 8)),
0),
'FM999,999,999,999,990.00') total_interest,
'0.00' total_other,
to_char(nvl(((SELECT SUM(nvl(ccc.principal, 0))
FROM con_contract_cashflow ccc
WHERE ccc.contract_id = t.contract_id
AND ccc.cf_item = 1) +
(SELECT nvl(ccc.due_amount, 0)
FROM con_contract_cashflow ccc
WHERE ccc.contract_id = t.contract_id
AND ccc.cf_item = 2) +
(SELECT SUM(nvl(ccc.interest, 0))
FROM con_contract_cashflow ccc
WHERE ccc.contract_id = t.contract_id
AND ccc.cf_item = 1) +
(SELECT nvl(ccc.due_amount, 0)
FROM con_contract_cashflow ccc
WHERE ccc.contract_id = t.contract_id
AND ccc.cf_item = 8)),
0),
'FM999,999,999,999,990.00') total_amount,
--合同开始日
t.lease_start_date,
(SELECT ccc.due_date
FROM con_contract_cashflow ccc
WHERE ccc.times = t.lease_times
AND cf_item = 1
AND ccc.contract_id = t.contract_id) lease_end_date,
--当期利息
to_char(nvl((SELECT SUM(nvl(ccc.interest, 0))
FROM con_contract_cashflow ccc
WHERE ccc.contract_id = t.contract_id
AND cf_item = 1
AND to_char(ccc.due_date, 'yyyymmdd') BETWEEN
${@due_date_from} AND ${@due_date_to}),
0),
'FM999,999,999,999,990.00') this_interest,
--当次累计利息
to_char(nvl((SELECT SUM(nvl(ccc.interest, 0))
FROM con_contract_cashflow ccc
WHERE ccc.contract_id = t.contract_id
AND cf_item = 1
AND to_char(ccc.due_date, 'yyyy-mm-dd') BETWEEN
to_char(t.lease_start_date, 'yyyy-mm-dd') AND
${@due_date_to}),
0),
'FM999,999,999,999,990.00') this_add_interest,
--设备本金
to_char(nvl((SELECT SUM(nvl(ccc.principal, 0))
FROM con_contract_cashflow ccc
WHERE ccc.contract_id = t.contract_id
AND cf_item = 1
AND to_char(ccc.due_date, 'yyyy-mm-dd') BETWEEN
${@due_date_from} AND ${@due_date_to}),
0),
'FM999,999,999,999,990.00') this_principal,
--累计本金
to_char(nvl((SELECT SUM(nvl(ccc.principal, 0))
FROM con_contract_cashflow ccc
WHERE ccc.contract_id = t.contract_id
AND cf_item = 1
AND to_char(ccc.due_date, 'yyyy-mm-dd') BETWEEN
to_char(t.lease_start_date, 'yyyy-mm-dd') AND
${@due_date_to}),
0),
'FM999,999,999,999,990.00') this_add_principal,
--当次违约金
to_char(nvl((SELECT SUM(nvl(ccc.due_amount, 0))
FROM con_contract_cashflow ccc
WHERE ccc.contract_id = t.contract_id
AND cf_item = 9
AND to_char(ccc.due_date, 'yyyy-mm-dd') BETWEEN
${@due_date_from} AND ${@due_date_to}),
0),
'FM999,999,999,999,990.00') this_penalty,
--累计违约金
to_char(nvl((SELECT SUM(nvl(ccc.due_amount, 0))
FROM con_contract_cashflow ccc
WHERE ccc.contract_id = t.contract_id
AND cf_item = 9
AND to_char(ccc.due_date, 'yyyy-mm-dd') BETWEEN
to_char(t.lease_start_date, 'yyyy-mm-dd') AND
${@due_date_to}),
0),
'FM999,999,999,999,990.00') this_add_penalty,
--当期累计
to_char(nvl((SELECT SUM(nvl(ccc.due_amount, 0))
FROM con_contract_cashflow ccc
WHERE ccc.contract_id = t.contract_id
AND cf_item IN (1, 9)
AND to_char(ccc.due_date, 'yyyy-mm-dd') BETWEEN
${@due_date_from} AND ${@due_date_to}),
0),
'FM999,999,999,999,990.00') this_total,
--累计之和
to_char(nvl((SELECT SUM(nvl(ccc.due_amount, 0))
FROM con_contract_cashflow ccc
WHERE ccc.contract_id = t.contract_id
AND cf_item IN (1, 9)
AND to_char(ccc.due_date, 'yyyy-mm-dd') BETWEEN
to_char(t.lease_start_date, 'yyyy-mm-dd') AND
${@due_date_to}),
0),
'FM999,999,999,999,990.00') this_add_total,
--未执行利息
'0.00' unexecute_interest,
--未来应收利息
to_char(nvl((SELECT SUM(nvl(ccc.interest, 0))
FROM con_contract_cashflow ccc
WHERE ccc.contract_id = t.contract_id
AND cf_item = 1
AND to_char(ccc.due_date, 'yyyy-mm-dd') >
${@due_date_to}),
0),
'FM999,999,999,999,990.00') future_interest,
--未执行本金
'0.00' unexecute_principal,
--未来本金
to_char(nvl((SELECT SUM(nvl(ccc.principal, 0))
FROM con_contract_cashflow ccc
WHERE ccc.contract_id = t.contract_id
AND cf_item = 1
AND to_char(ccc.due_date, 'yyyy-mm-dd') >
${@due_date_to}),
0),
'FM999,999,999,999,990.00') future_principal,
'0.00' unexecute_total,
--未来应收
'0.00' this_due_amount,
to_char(nvl((SELECT SUM(nvl(ccc.due_amount, 0))
FROM con_contract_cashflow ccc
WHERE ccc.contract_id = t.contract_id
AND cf_item = 1
AND to_char(ccc.due_date, 'yyyy-mm-dd') >
${@due_date_to}),
0),
'FM999,999,999,999,990.00') future_due_amount
FROM con_contract t, hls_bp_master h
WHERE t.data_class = 'NORMAL'
AND h.bp_id = t.bp_id_tenant
]]>
</bm:query-sql>
</bm:operation>
</bm:operations>
</bm:model>
src/main/webapp/modules/cont/CON3300/contract_item_query_report.lview
0 → 100644
View file @
ee4761f6
<?xml version="1.0" encoding="UTF-8"?>
<a:screen
xmlns:a=
"http://www.leaf-framework.org/application"
customizationEnabled=
"true"
dynamiccreateenabled=
"true"
trace=
"true"
>
<a:init-procedure/>
<a:view>
<a:link
id=
"con_contract_get_layout_code_link_id"
model=
"cont.CON500.con_contract_get_layout_code"
modelaction=
"update"
/>
<a:link
id=
"${/parameter/@layout_code}con_contract_query_link"
url=
"${/request/@context_path}/modules/cont/CON505/con_contract_modify.lview"
/>
<script
src=
"${/request/@context_path}/javascripts/hap/dynamicStopAutoQuery.js"
type=
"text/javascript"
/>
<script
type=
"text/javascript"
>
<![CDATA[
window['${/parameter/@layout_code}_dynamic_link_renderer'] = function(value, record, name, config_record) {
if (name == 'contract_number' && value) {
return '<a href="javascript:open_contract_win(\'' + record.ds.id + '\',\'' + record.id + '\')">
' + value + '
</a>
';
}
return value;
};
function open_contract_win(ds_id, record_id) {
var record = $(ds_id).findById(record_id);
var param = record.data;
param['function_code'] = 'CON301';
param['function_usage'] = 'QUERY';
param['winid'] = 'con_contract_modify_win_id';
param['url_title'] = '${l:CON301.CONTRACT_DETAIL}';
hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, '${/parameter/@layout_code}con_contract_query_link', ds_id);
}
window['${/parameter/@layout_code}_user_button1_layout_dynamic_click'] = function() {
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'GENERAL');
var record=$(ds_id).getAt(0);
if(record.get('due_date_from')
&&
record.get('due_date_to')){
var ds = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_contract');
$(ds).setQueryUrl("${/request/@context_path}/autocrud/cont.CON3300.contract_item_report_query/query");
$(ds).setQueryParameter('due_date_from',record.get('due_date_from'));
$(ds).setQueryParameter('due_date_to',record.get('due_date_to'));
$(ds).query();
}else{
$L.showInfoMessage("提示",'请输入字段:预定收款日从、预定收款日到!');
}
}
]]>
</script>
<a:screen-include
screen=
"modules/cont/CON500/con_contract_get_layout_code.lview"
/>
</a:view>
</a:screen>
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