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
ce2823a7
Commit
ce2823a7
authored
May 01, 2020
by
stone
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
【feat】业务冲销查询
parent
d10eb32c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
143 additions
and
1 deletion
+143
-1
business_write_detail.sql
src/main/database/Table/business_write_detail.sql
+50
-0
business_write_detail_report.lwm
...NF/classes/cont/CON3100N/business_write_detail_report.lwm
+64
-0
csh_write_off_report_query.lview
...pp/modules/cont/CON3100N/csh_write_off_report_query.lview
+29
-1
No files found.
src/main/database/Table/business_write_detail.sql
0 → 100644
View file @
ce2823a7
WHENEVER
SQLERROR
EXIT
FAILURE
ROLLBACK
;
WHENEVER
OSERROR
EXIT
FAILURE
ROLLBACK
;
spool
ACP_INVOICE_LN
.
log
PROMPT
PROMPT
CREATING
TABLE
TRAIN_CONFIG
PROMPT
============================
PROMPT
CREATE
TABLE
business_write_detail
(
business_detail_id
NUMBER
,
write_off_id
NUMBER
,
cashflow_id
NUMBER
,
contract_id
NUMBER
,
transaction_id
NUMBER
,
transaction_number
VARCHAR2
(
100
),
transaction_type
VARCHAR2
(
100
),
times
NUMBER
,
cf_item_n
VARCHAR2
(
100
),
extra_name
VARCHAR2
(
1000
),
contract_number
VARCHAR2
(
1000
),
machine_number
VARCHAR2
(
100
),
bp_code_tenant
VARCHAR2
(
100
),
bp_name
VARCHAR2
(
100
),
id_card_no
VARCHAR2
(
100
),
contract_amount
NUMBER
,
due_date
DATE
,
due_amount
NUMBER
,
due_amount_penalty
NUMBER
,
transaction_date
DATE
,
write_off_date
DATE
,
received_amount
NUMBER
,
unreceived_amount
NUMBER
,
received_amount_penalty
NUMBER
);
CREATE
SEQUENCE
business_write_detail_s
;
ALTER
TABLE
business_write_detail
ADD
(
write_off_amount
NUMBER
);
ALTER
TABLE
business_write_detail
ADD
(
session_id
NUMBER
);
ALTER
TABLE
business_write_detail
ADD
(
rest_due_amount
NUMBER
);
CREATE
SEQUENCE
business_write_detail_s
;
create
index
index_cashflowid
on
business_write_detail
(
cashflow_id
);
drop
index
index_cashflowid
;
select
t
.
business_detail_id
,
write_off_id
,
cashflow_id
,
contract_id
,
transaction_id
,
transaction_number
,
transaction_type
,
times
,
cf_item_n
,
extra_name
,
contract_number
,
machine_number
,
bp_code_tenant
,
bp_name
,
id_card_no
,
contract_amount
,
due_date
,
due_amount
,
due_amount_penalty
,
transaction_date
,
write_off_date
,
received_amount
,
unreceived_amount
,
received_amount_penalty
,
write_off_amount
,
session_id
,
rest_due_amount
from
business_write_detail
t
;
SPOOL
OFF
EXIT
\ No newline at end of file
src/main/webapp/WEB-INF/classes/cont/CON3100N/business_write_detail_report.lwm
0 → 100644
View file @
ce2823a7
<?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 t.cashflow_id,
t.transaction_number transaction_num,
t.transaction_type,
t.times,
t.session_id,
t.contract_id,
t.cf_item_n,
t.extra_name extra_nam,
t.contract_number,
t.machine_number,
t.bp_code_tenant bp_id_tenant,
t.bp_name,
t.id_card_no,
t.contract_amount total_amount,
t.due_date,
t.due_amount -
(nvl((SELECT SUM(v.write_off_amount)
FROM business_write_detail v
WHERE v.cashflow_id = t.cashflow_id
and v.session_id=${/session/@session_id}
AND v.business_detail_id<t.business_detail_id),
0)) due_amount,
t.transaction_date,
t.write_off_date,
t.received_amount,
(t.due_amount- (nvl((SELECT SUM(v.write_off_amount)
FROM business_write_detail v
WHERE v.cashflow_id = t.cashflow_id
and v.session_id=${/session/@session_id}
AND v.business_detail_id<t.business_detail_id),
0))-t.write_off_amount)unreceived_amount,
t.write_off_amount received_amount
FROM business_write_detail t
#WHERE_CLAUSE#
]]>
</bm:query-sql>
</bm:operation>
<bm:operation
name=
"execute"
>
<bm:update-sql>
<![CDATA[
begin
contract_item_query_pkg.calc_business_write_report(p_user_id =>
${/session/@user_id},
p_session_id => ${/session/@session_id});
end;]]>
</bm:update-sql>
</bm:operation>
</bm:operations>
<bm:query-fields>
<bm:query-field
name=
"contract_number"
queryExpression=
"t.contract_number like '%' || ${@contract_number} || '%'"
/>
<bm:query-field
name=
"bp_name"
queryExpression=
"t.bp_name like '%' || ${@bp_name} || '%'"
/>
<bm:query-field
name=
"transaction_date_from"
queryExpression=
"trunc(t.transaction_date) >= trunc(to_date(${@transaction_date_from},'yyyy-mm-dd'))"
/>
<bm:query-field
name=
"transaction_date_to"
queryExpression=
"trunc(t.transaction_date) <= trunc(to_date(${@transaction_date_to},'yyyy-mm-dd'))"
/>
<bm:query-field
name=
"journal_date_from"
queryExpression=
"trunc(t.write_off_date) >= trunc(to_date(${@journal_date_from},'yyyy-mm-dd'))"
/>
<bm:query-field
name=
"journal_date_to"
queryExpression=
"trunc(t.write_off_date) <= trunc(to_date(${@journal_date_to},'yyyy-mm-dd'))"
/>
<bm:query-field
name=
"transaction_num"
queryExpression=
"t.transaction_number like '%' || ${@transaction_num} || '%'"
/>
<bm:query-field
name=
"cf_item_n"
queryExpression=
"t.cf_item_n like '%' || ${@cf_item_n} || '%'"
/>
</bm:query-fields>
<bm:data-filters>
<bm:data-filter
enforceOperations=
"query"
expression=
"t.session_id=${/session/@session_id}"
/>
</bm:data-filters>
</bm:model>
src/main/webapp/modules/cont/CON3100N/csh_write_off_report_query.lview
View file @
ce2823a7
...
@@ -6,9 +6,11 @@
...
@@ -6,9 +6,11 @@
<a:link
id=
"con_contract_get_layout_code_link_id"
model=
"cont.CON500.con_contract_get_layout_code"
<a:link
id=
"con_contract_get_layout_code_link_id"
model=
"cont.CON500.con_contract_get_layout_code"
modelaction=
"update"
/>
modelaction=
"update"
/>
<a:link
id=
"business_write_detail_link"
model=
"cont.CON3100N.business_write_detail_report"
modelaction=
"execute"
/>
<script
src=
"${/request/@context_path}/javascripts/hap/dynamicStopAutoQuery.js"
type=
"text/javascript"
/>
<script
type=
"text/javascript"
>
<![CDATA[
<script
type=
"text/javascript"
>
<![CDATA[
// stopDymanicAutoQuery('${/parameter/@layout_code}', 'G_CONTRACT_RESULT', 'con_contract');
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_update'] = function(ds, record, name, value, old_value, bp_seq) {
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_update'] = function(ds, record, name, value, old_value, bp_seq) {
if(name=='transaction_date_from' &&value){
if(name=='transaction_date_from' &&value){
...
@@ -22,6 +24,32 @@
...
@@ -22,6 +24,32 @@
}
}
}
}
}
}
window['${/parameter/@layout_code}_user_button1_layout_dynamic_click'] = function() {
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_contract_cashflow');
var form_ds_id = '${/parameter/@layout_code}_F_QUERY__ds';
Leaf.Masker.mask(Ext.getBody(), '${l:HLS.EXECUTING}'); Leaf.request({
url: $('business_write_detail_link').getUrl(),
para: {},
success: function() {
$(ds_id).setQueryUrl('${/request/@context_path}/autocrud/cont.CON3100N.business_write_detail_report/query');
$(ds_id).setQueryDataSet($(form_ds_id));
Leaf.Masker.unmask(Ext.getBody());
$(ds_id).query();
},
failure: function() {
Leaf.Masker.unmask(detail_mask);
},
error: function() {
Leaf.Masker.unmask(detail_mask);
},
scope: this
});
}
// stopDymanicAutoQuery('${/parameter/@layout_code}', 'F_WRITE_OFF_LIST', 'con_contract_cashflow');
]]>
</script>
]]>
</script>
<a:screen-include
screen=
"modules/cont/CON500/con_contract_get_layout_code.lview"
/>
<a:screen-include
screen=
"modules/cont/CON500/con_contract_get_layout_code.lview"
/>
</a:view>
</a:view>
...
...
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