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
9472f8ef
Commit
9472f8ef
authored
Sep 23, 2019
by
Spencer Chang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[feat] 提前結清功能
parent
9944cf9c
Changes
18
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
1743 additions
and
68 deletions
+1743
-68
.gitignore
.gitignore
+1
-0
INITIALIZE_SYS_FUNCTION_DYNAMIC.sql
src/main/database/Init/INITIALIZE_SYS_FUNCTION_DYNAMIC.sql
+12
-1
cus_con_contract_repo_pkg.pck
src/main/database/Package/cus_con_contract_repo_pkg.pck
+59
-64
cus_con_et_pkg.pck
src/main/database/Package/cus_con_et_pkg.pck
+451
-0
REGISTER_CON_ET001.sql
src/main/database/Register_function/REGISTER_CON_ET001.sql
+47
-0
REGISTER_CON_ET003.sql
src/main/database/Register_function/REGISTER_CON_ET003.sql
+46
-0
CON_CONTRACT_CHANGE_REQ.sql
src/main/database/Table/Alter/CON_CONTRACT_CHANGE_REQ.sql
+26
-1
CON_CONTRACT_REPO_MODIFY_LV.sql
src/main/database/View/CON_CONTRACT_REPO_MODIFY_LV.sql
+3
-2
con_contract_change_req_lv.sql
src/main/database/View/con_contract_change_req_lv.sql
+87
-0
calc_cashflow.lwm
...n/webapp/WEB-INF/classes/cont/CON_ET001/calc_cashflow.lwm
+13
-0
calc_et_date_amount.lwm
...pp/WEB-INF/classes/cont/CON_ET001/calc_et_date_amount.lwm
+34
-0
con_early_termination_query.lwm
...NF/classes/cont/CON_ET001/con_early_termination_query.lwm
+200
-0
create_change_req.lwm
...bapp/WEB-INF/classes/cont/CON_ET001/create_change_req.lwm
+20
-0
submit_change_req.lwm
...bapp/WEB-INF/classes/cont/CON_ET001/submit_change_req.lwm
+17
-0
con_early_termination_modify_query.lwm
...ses/cont/CON_ET003/con_early_termination_modify_query.lwm
+216
-0
con_early_termination_et_detail.lview
...ules/cont/CON_ET001/con_early_termination_et_detail.lview
+202
-0
con_early_termination_query.lview
.../modules/cont/CON_ET001/con_early_termination_query.lview
+156
-0
con_early_termination_modify_query.lview
...s/cont/CON_ET003/con_early_termination_modify_query.lview
+153
-0
No files found.
.gitignore
View file @
9472f8ef
...
...
@@ -20,6 +20,7 @@ overlays/
# sql
*~sql
*~pck
# common config rename
uncertain.local.xml
...
...
src/main/database/Init/INITIALIZE_SYS_FUNCTION_DYNAMIC.sql
View file @
9472f8ef
...
...
@@ -7,4 +7,15 @@ INSERT INTO SYS_FUNCTION_DYNAMIC
LAST_UPDATE_DATE
,
LAST_UPDATED_BY
)
VALUES
(
'CON_REPO001D'
,
'合同回购申请明细'
,
1
,
SYSDATE
,
-
1
,
SYSDATE
,
-
1
);
\ No newline at end of file
(
'CON_REPO001D'
,
'合同回购申请明细'
,
1
,
SYSDATE
,
-
1
,
SYSDATE
,
-
1
);
INSERT
INTO
SYS_FUNCTION_DYNAMIC
(
FUNCTION_CODE
,
FUNCTION_NAME
,
SEQUENCE
,
CREATION_DATE
,
CREATED_BY
,
LAST_UPDATE_DATE
,
LAST_UPDATED_BY
)
VALUES
(
'CON_ET002'
,
'提前结清申请明细'
,
1
,
SYSDATE
,
-
1
,
SYSDATE
,
-
1
);
\ No newline at end of file
src/main/database/Package/cus_con_contract_repo_pkg.pck
View file @
9472f8ef
create or replace package cus_con_contract_repo_pkg is
create or replace package cus_con_contract_repo_pkg is
-- Author : Spencer 3893
-- Created : 9/10/2019 2:21:13 PM
-- Purpose : 合同回购
--add by Spencer 3893 20190911 回购申请
--add by Spencer 3893 20190911 回购申请
procedure create_change_req_repo(p_contract_id in number,
p_req_type in varchar2,
p_user_id in number,
...
...
@@ -14,7 +14,7 @@ create or replace package cus_con_contract_repo_pkg is
--回购现金流计算
procedure calc_repo_cashflows(p_contract_id in number,
p_user_id in number);
--通过回购解约日获取回购相关信息
--通过回购解约日获取回购相关信息
procedure calc_repo_date_amount(p_contract_id in number,
p_repurchase_date date,
p_last_rent_due_date out date,
...
...
@@ -63,7 +63,7 @@ create or replace package body cus_con_contract_repo_pkg is
v_agent_bp_code varchar2(30);
v_price_ref_v05 varchar2(200);
v_product_code varchar2(2000);
e_product_code_err exception;
e_get_contract_number_err exception;
begin
...
...
@@ -80,7 +80,7 @@ create or replace package body cus_con_contract_repo_pkg is
when no_data_found then
null;
end;
begin
select l.ref_v05
into v_price_ref_v05
...
...
@@ -91,7 +91,7 @@ create or replace package body cus_con_contract_repo_pkg is
when no_data_found then
null;
end;
v_no := fnd_code_rule_pkg.get_rule_next_auto_num(p_document_category => 'CHANGE_REQUEST',
p_document_type => p_document_type,
p_company_id => p_company_id,
...
...
@@ -101,16 +101,16 @@ create or replace package body cus_con_contract_repo_pkg is
p_price_ref_v05 => v_price_ref_v05,
p_product_code => v_product_code,
p_created_by => p_user_id);
if v_no = fnd_code_rule_pkg.c_error then
raise e_get_contract_number_err;
end if;
return v_no;
exception
when e_get_contract_number_err then
sys_raise_app_error_pkg.raise_sys_others_error(p_message => '获取编码失败,请联系系统管理员!',
p_created_by => p_user_id,
p_package_name => 'cus_con_contract_repo_pkg',
...
...
@@ -138,34 +138,29 @@ create or replace package body cus_con_contract_repo_pkg is
raise_application_error(sys_raise_app_error_pkg.c_error_number,
sys_raise_app_error_pkg.g_err_line_id);
end;
--add by Spencer 3893 20190911 回购申请
--add by Spencer 3893 20190911 回购申请
procedure create_change_req_repo(p_contract_id in number,
p_req_type in varchar2,
p_user_id in number,
p_simulation_flag in varchar2 default 'N',
p_change_req_id out number) is
v_change_req_id number;
v_contract_rec con_contract%rowtype;
begin
select *
into v_contract_rec
from con_contract cc
where cc.contract_id = p_contract_id
for update nowait;
v_contract_rec := get_contract_rec(p_contract_id, p_user_id);
if v_contract_rec.contract_status <> 'INCEPT' and p_req_type = 'REPUR' then
sys_raise_app_error_pkg.raise_sys_others_error(p_message => '只有起租状态的合同才能进行回购申请!',
p_created_by => p_user_id,
p_package_name => 'cus_con_contract_repo_pkg',
p_procedure_function_name => 'create_change_req_repo');
raise_application_error(sys_raise_app_error_pkg.c_error_number,
sys_raise_app_error_pkg.g_err_line_id);
end if;
con_contract_history_pkg.create_change_req(p_contract_id => p_contract_id,
p_change_req_id => v_change_req_id,
p_req_date => sysdate,
...
...
@@ -178,7 +173,7 @@ create or replace package body cus_con_contract_repo_pkg is
p_simulation_flag => p_simulation_flag,
p_repo_change_flag => 'Y',
p_user_id => p_user_id);
--生成回购编号
--生成回购编号
v_contract_rec.repurchase_contract_number := get_contract_repo_number(p_document_type => p_req_type,
p_document_date => sysdate,
p_company_id => v_contract_rec.company_id,
...
...
@@ -214,7 +209,7 @@ create or replace package body cus_con_contract_repo_pkg is
v_principal := round(p_service_charges / 1.13, 2);
v_outstanding_principal := 0;
v_due_date := p_paymengt_deadlinedate;
v_cashflow_rec.cashflow_id := con_contract_cashflow_s.nextval;
v_cashflow_rec.contract_id := p_contract_id;
v_cashflow_rec.cf_item := 304;
...
...
@@ -246,7 +241,7 @@ create or replace package body cus_con_contract_repo_pkg is
v_cashflow_rec.overdue_status := 'NOT';
v_cashflow_rec.penalty_process_status := 'NORMAL';
v_cashflow_rec.billing_status := 'N';
v_cashflow_rec.generated_source := 'MANUAL';
v_cashflow_rec.created_by := p_user_id;
v_cashflow_rec.creation_date := sysdate;
...
...
@@ -254,7 +249,7 @@ create or replace package body cus_con_contract_repo_pkg is
v_cashflow_rec.last_update_date := sysdate;
insert into con_contract_cashflow values v_cashflow_rec;
end sc_cashflow_hander;
-- Refactored procedure fund_prossession_cost_hander
-- Refactored procedure fund_prossession_cost_hander
procedure fund_prossession_cost_hander(p_contract_id number,
p_fund_possession_cost number,
p_paymengt_deadlinedate date,
...
...
@@ -271,7 +266,7 @@ create or replace package body cus_con_contract_repo_pkg is
v_principal := round(p_fund_possession_cost / 1.13, 2);
v_outstanding_principal := 0;
v_due_date := p_paymengt_deadlinedate;
v_cashflow_rec.cashflow_id := con_contract_cashflow_s.nextval;
v_cashflow_rec.contract_id := p_contract_id;
v_cashflow_rec.cf_item := 14;
...
...
@@ -303,7 +298,7 @@ create or replace package body cus_con_contract_repo_pkg is
v_cashflow_rec.overdue_status := 'NOT';
v_cashflow_rec.penalty_process_status := 'NORMAL';
v_cashflow_rec.billing_status := 'N';
v_cashflow_rec.generated_source := 'MANUAL';
v_cashflow_rec.created_by := p_user_id;
v_cashflow_rec.creation_date := sysdate;
...
...
@@ -316,7 +311,7 @@ create or replace package body cus_con_contract_repo_pkg is
p_user_id in number) is
v_contract_rec con_contract%rowtype;
v_cashflow_rec con_contract_cashflow%rowtype;
v_due_amount number; --每期租金
v_outstanding_principal number; --剩余本金
v_principal number; --本金
...
...
@@ -325,7 +320,7 @@ create or replace package body cus_con_contract_repo_pkg is
v_calc_due_date date;
v_times number;
v_calc_days number;
e_due_amount_error exception;
e_repo_calc_amount_error exception;
begin
...
...
@@ -338,10 +333,10 @@ create or replace package body cus_con_contract_repo_pkg is
and f.cf_item = 1
and f.cf_type = 1
and f.contract_id = p_contract_id;
--计算前删除本次变更起始期及之后期,
delete_cashflow(p_contract_id, v_cashflow_rec.times);
-- 一次性回购
-- 一次性回购
if v_contract_rec.repurchase_types = 'ONE_TIME_REPURCHASE' then
v_times := v_cashflow_rec.times + 1;
v_cashflow_rec := null;
...
...
@@ -351,7 +346,7 @@ create or replace package body cus_con_contract_repo_pkg is
2);
v_outstanding_principal := 0;
v_due_date := v_contract_rec.paymengt_deadlinedate;
v_cashflow_rec.cashflow_id := con_contract_cashflow_s.nextval;
v_cashflow_rec.contract_id := v_contract_rec.contract_id;
v_cashflow_rec.cf_item := 1;
...
...
@@ -384,7 +379,7 @@ create or replace package body cus_con_contract_repo_pkg is
v_cashflow_rec.overdue_status := 'NOT';
v_cashflow_rec.penalty_process_status := 'NORMAL';
v_cashflow_rec.billing_status := 'N';
v_cashflow_rec.generated_source := 'MANUAL';
v_cashflow_rec.created_by := p_user_id;
v_cashflow_rec.creation_date := sysdate;
...
...
@@ -411,8 +406,8 @@ create or replace package body cus_con_contract_repo_pkg is
p_times => v_times,
p_user_id => p_user_id);
end if;
--分期回购
--分期回购
elsif v_contract_rec.repurchase_types = 'STAGE_REPURCHASE' then
v_outstanding_principal := v_contract_rec.repurchase_tatal_amount; --回购价款总额
if v_outstanding_principal > 0 then
...
...
@@ -426,7 +421,7 @@ create or replace package body cus_con_contract_repo_pkg is
2)
into v_due_amount
from dual;
if nvl(v_due_amount, 0) <= 0 then
hls_sys_log_pkg.log('回购合同计算租金异常,计算利率:' ||
v_contract_rec.repurchase_interest_rate ||
...
...
@@ -498,19 +493,19 @@ create or replace package body cus_con_contract_repo_pkg is
v_cashflow_rec.overdue_status := 'NOT';
v_cashflow_rec.penalty_process_status := 'NORMAL';
v_cashflow_rec.billing_status := 'N';
v_cashflow_rec.generated_source := 'MANUAL';
v_cashflow_rec.created_by := p_user_id;
v_cashflow_rec.creation_date := sysdate;
v_cashflow_rec.last_updated_by := p_user_id;
v_cashflow_rec.last_update_date := sysdate;
insert into con_contract_cashflow values v_cashflow_rec;
--最后期不需要校验剩余本金是否小于0
if cur < 6 then
v_due_date := add_months(v_due_date, 1);
v_times := v_times + 1;
if v_outstanding_principal < 0 then
raise e_repo_calc_amount_error;
end if;
...
...
@@ -540,14 +535,14 @@ create or replace package body cus_con_contract_repo_pkg is
raise e_repo_calc_amount_error;
end if;
end if;
exception
when e_repo_calc_amount_error then
sys_raise_app_error_pkg.raise_sys_others_error(p_message => '回购价款总额小于0,请检查!',
p_created_by => -1,
p_package_name => 'cus_con_contract_repo_pkg',
p_procedure_function_name => 'calc_repo_cashflows');
raise_application_error(sys_raise_app_error_pkg.c_error_number,
sys_raise_app_error_pkg.g_err_line_id);
when e_due_amount_error then
...
...
@@ -555,11 +550,11 @@ create or replace package body cus_con_contract_repo_pkg is
p_created_by => p_user_id,
p_package_name => 'cus_con_contract_repo_pkg',
p_procedure_function_name => 'calc_repo_cashflows');
raise_application_error(sys_raise_app_error_pkg.c_error_number,
sys_raise_app_error_pkg.g_err_line_id);
end calc_repo_cashflows;
--通过回购解约日获取回购相关信息
--通过回购解约日获取回购相关信息
procedure calc_repo_date_amount(p_contract_id in number,
p_repurchase_date date,
p_last_rent_due_date out date,
...
...
@@ -593,7 +588,7 @@ create or replace package body cus_con_contract_repo_pkg is
and a.cf_item in (1, 9)
and a.write_off_flag in ('PARTIAL', 'FULL')
and a.contract_id = p_contract_id;
if v_times >= 1 then
raise e_write_off_flagg_err;
end if;
...
...
@@ -601,16 +596,16 @@ create or replace package body cus_con_contract_repo_pkg is
select f.due_date, f.outstanding_rental_tax_incld
into v_last_rent_due_date, v_sum_unreceived_principal
from con_contract_cashflow f
where f.due_date < p_repurchase_date
and f.cf_item = 1
and f.cf_type = 1
and f.contract_id = p_contract_id
and f.times = (select max(f.times)
where f.times = (select max(f.times)
from con_contract_cashflow f
where f.due_date < p_repurchase_date
and f.cf_item = 1
and f.cf_type = 1
and f.contract_id = p_contract_id);
and f.contract_id = p_contract_id)
and f.due_date <= p_repurchase_date
and f.cf_item = 1
and f.cf_type = 1
and f.contract_id = p_contract_id;
p_last_rent_due_date := v_last_rent_due_date;
--已回收租金
select sum(nvl(F.RECEIVED_AMOUNT, 0))
...
...
@@ -657,12 +652,12 @@ create or replace package body cus_con_contract_repo_pkg is
'之后数据发起回购!',
p_created_by => p_user_id,
p_package_name => 'cus_con_contract_repo_pkg',
p_procedure_function_name => '
get_last_rent_due_date
');
p_procedure_function_name => '
calc_repo_date_amount
');
raise_application_error(sys_raise_app_error_pkg.c_error_number,
sys_raise_app_error_pkg.g_err_line_id);
when others then
null;
end calc_repo_date_amount;
...
...
@@ -672,30 +667,30 @@ create or replace package body cus_con_contract_repo_pkg is
p_user_id in number) is
r_change_req_rec con_contract_change_req%rowtype;
r_change_con_rec con_contract%rowtype;
v_approval_method hls_document_type.approval_method%type;
v_calc_hd_rec hls_fin_calculator_hd%rowtype;
v_success_flag varchar2(1);
e_change_req_status_error exception;
e_calc_error exception;
e_simulation_error exception;
e_calc_session_id_notfound exception;
e_is_calc_flag_err exception;
e_attachment_error exception;
begin
hls_document_compare_pkg.con_contract_compare(p_table_name => 'CON_CONTRACT',
p_change_req_id => p_change_req_id,
p_from_table_pk => '',
p_to_table_pk => p_change_req_id,
p_user_id => p_user_id);
r_change_req_rec := get_con_change_req_rec(p_change_req_id => p_change_req_id,
p_user_id => p_user_id);
/*add by Harry 9952 2017/1/19
purpose: verify the atttachment required property when submit the document
*/
...
...
@@ -720,14 +715,14 @@ create or replace package body cus_con_contract_repo_pkg is
if v_request_num > 0 then
raise e_attachment_error;
end if;*/
r_change_con_rec := con_contract_pkg.get_contract_rec(p_contract_id => p_change_req_id,
p_user_id => p_user_id);
if r_change_req_rec.req_status not in ('NEW', 'REJECT') then
raise e_change_req_status_error;
end if;
--当是罚息变更申请的时候,没有存contract_id,所以不需要走这一步
if r_change_req_rec.ccr_price_list is not null then
if r_change_req_rec.ccr_calc_session_id is null then
...
...
src/main/database/Package/cus_con_et_pkg.pck
0 → 100644
View file @
9472f8ef
create or replace package cus_con_et_pkg is
-- Author : Spencer 3893
-- Created : 9/19/2019 3:40:32 PM
-- Purpose : 提前结清
procedure create_change_req_et(p_contract_id number,
p_req_type varchar2,
p_user_id number,
p_simulation_flag varchar2,
p_change_req_id out number);
--通过结清日获取结清相关信息
procedure calc_et_date_amount(p_contract_id in number,
p_et_date date,
p_et_fee in out number,
p_et_interest_rate in number,
p_et_total_amount out number,
p_et_due_amount out number,
p_overdue_amount out number,
p_penalty out number,
p_fund_possession_time out number,
p_fund_possession_cost out number,
p_SUM_UNRECEIVED_PRINCIPAL out number,
p_user_id in number);
--结清现金流计算
procedure calc_et_cashflows(p_contract_id in number, p_user_id in number);
--结清提交
procedure submit_change_req_et(p_change_req_id number,
p_layout_code varchar2,
p_user_id number);
end cus_con_et_pkg;
/
create or replace package body cus_con_et_pkg is
e_lock_table exception;
pragma exception_init(e_lock_table, -54);
function get_contract_rec(p_contract_id number, p_user_id number)
return con_contract%rowtype is
v_con_contract_rec con_contract%rowtype;
begin
select *
into v_con_contract_rec
from con_contract t
where t.contract_id = p_contract_id
for update nowait;
return v_con_contract_rec;
exception
when e_lock_table then
sys_raise_app_error_pkg.raise_user_define_error(p_message_code => 'CON_CONTRACT_PKG.CONTRACT_LOCK_ERROR',
p_created_by => p_user_id,
p_package_name => 'cus_con_et_pkg',
p_procedure_function_name => 'get_contract_rec');
raise_application_error(sys_raise_app_error_pkg.c_error_number,
sys_raise_app_error_pkg.g_err_line_id);
end;
function get_con_change_req_rec(p_change_req_id con_contract_change_req.change_req_id%type,
p_user_id con_contract_change_req.created_by%type)
return con_contract_change_req%rowtype is
v_change_req_rec con_contract_change_req%rowtype;
begin
select *
into v_change_req_rec
from con_contract_change_req t
where t.change_req_id = p_change_req_id
for update nowait;
return v_change_req_rec;
exception
when e_lock_table then
sys_raise_app_error_pkg.raise_user_define_error(p_message_code => 'CON_CONTRACT_CHANGE_REQ_PKG.CON_CHANGE_REQ_LOCK',
p_created_by => p_user_id,
p_package_name => 'cus_con_et_pkg',
p_procedure_function_name => 'get_con_change_req_rec');
raise_application_error(sys_raise_app_error_pkg.c_error_number,
sys_raise_app_error_pkg.g_err_line_id);
end;
procedure create_change_req_et(p_contract_id number,
p_req_type varchar2,
p_user_id number,
p_simulation_flag varchar2,
p_change_req_id out number) is
v_change_req_id number;
v_contract_rec con_contract%rowtype;
begin
v_contract_rec := get_contract_rec(p_contract_id, p_user_id);
if v_contract_rec.contract_status <> 'INCEPT' and p_req_type = 'ET' then
sys_raise_app_error_pkg.raise_sys_others_error(p_message => '只有起租状态的合同才能进行提前结清申请!',
p_created_by => p_user_id,
p_package_name => 'cus_con_et_pkg',
p_procedure_function_name => 'create_change_req_et');
raise_application_error(sys_raise_app_error_pkg.c_error_number,
sys_raise_app_error_pkg.g_err_line_id);
end if;
con_contract_history_pkg.create_change_req(p_contract_id => p_contract_id,
p_change_req_id => v_change_req_id,
p_req_date => sysdate,
p_ref_v01 => null,
p_description => null,
p_change_quotation => null,
p_change_lease_item => null,
p_change_bp => null,
p_req_doc_type => p_req_type,
p_simulation_flag => p_simulation_flag,
p_et_flag => 'Y',
p_user_id => p_user_id);
p_change_req_id := v_change_req_id;
end create_change_req_et;
--通过结清日获取结清相关信息
procedure calc_et_date_amount(p_contract_id in number,
p_et_date date,
p_et_fee in out number,
p_et_interest_rate in number,
p_et_total_amount out number,
p_et_due_amount out number,
p_overdue_amount out number,
p_penalty out number,
p_fund_possession_time out number,
p_fund_possession_cost out number,
p_sum_unreceived_principal out number,
p_user_id in number) is
v_contract_rec con_contract%rowtype;
v_times number;
--剩余本金
v_sum_unreceived_principal number;
v_fund_possession_cost number;
v_fund_possession_time number;
v_sum_overdue_amount number;
v_penalty number;
v_et_due_amount number;
v_et_total_amount number;
v_overdue_max_days number;
e_write_off_flagg_err exception;
begin
select max(a.times)
into v_times
from con_contract_cashflow a
where a.due_date >= p_et_date
and a.cf_item in (1, 9)
and a.write_off_flag in ('PARTIAL', 'FULL')
and a.contract_id = p_contract_id;
if v_times >= 1 then
raise e_write_off_flagg_err;
end if;
v_contract_rec := get_contract_rec(p_contract_id, p_user_id);
--结清日最近的未核销现金流,获取剩余本金
select nvl(f.outstanding_prin_tax_incld, 0)
into v_sum_unreceived_principal
from con_contract_cashflow f
where f.times = (select max(f.times)
from con_contract_cashflow f
where f.due_date <= p_et_date
and f.cf_item = 1
and f.cf_type = 1
and f.contract_id = p_contract_id)
and f.due_date <= p_et_date
and f.write_off_flag = 'NOT'
and f.cf_item = 1
and f.cf_type = 1
and f.contract_id = p_contract_id;
--上一次完全核销现金流
/*select (p_et_date - cwo.write_off_date) fund_possession_time
into v_fund_possession_time
from con_contract_cashflow f, csh_write_off cwo
where cwo.reversed_flag = 'N'
and cwo.cashflow_id = f.cashflow_id
and cwo.contract_id = p_contract_id
and f.due_date > p_et_date
and f.write_off_flag != 'NOT'
and f.cf_item = 1
and f.cf_type = 1
and f.contract_id = p_contract_id;*/
v_fund_possession_time := 11;
v_fund_possession_cost := v_sum_unreceived_principal *
nvl(v_fund_possession_time, 1) *
NVL(p_et_interest_rate,
v_contract_rec.int_rate_display) / 360;
--逾期租金
select nvl(sum(f.overdue_amount), 0)
into v_sum_overdue_amount
from con_contract_cashflow f
where f.write_off_flag != 'FULL'
and f.overdue_status = 'Y'
and f.cf_item = 1
and f.cf_direction != 'NONCASH'
and f.contract_id = p_contract_id;
-- 逾期天数 overdue_max_days+现在至回购日天数
v_overdue_max_days := nvl(v_contract_rec.overdue_max_days, 0) +
trunc(p_et_date - sysdate);
-- v_penalty 逾期罚息,逾期罚息=逾期租金* 逾期天数 * 0.0004。回购总额中罚息由系统自动计算,可直接进行手动调整,不需要通过罚息减免流程;逾期罚息,计算到回购解约日为止
v_penalty := v_sum_overdue_amount * v_overdue_max_days * 0.0004;
v_et_due_amount := v_sum_unreceived_principal + v_sum_overdue_amount;
v_et_total_amount := v_sum_unreceived_principal + p_et_fee +
v_fund_possession_cost +
nvl(v_contract_rec.residual_value, 0) +
v_sum_overdue_amount;
--回写字段
p_et_total_amount := v_et_total_amount;
p_et_due_amount := v_et_due_amount;
p_overdue_amount := v_sum_overdue_amount;
p_penalty := v_penalty;
p_fund_possession_time := v_fund_possession_time;
p_fund_possession_cost := v_fund_possession_cost;
p_sum_unreceived_principal := v_sum_unreceived_principal;
exception
when e_write_off_flagg_err then
sys_raise_app_error_pkg.raise_sys_others_error(p_message => '第' ||
v_times ||
'期已有核销记录,请重新选择期数' ||
v_times ||
'之后数据发起结清!',
p_created_by => p_user_id,
p_package_name => 'cus_con_et_pkg',
p_procedure_function_name => 'calc_et_date_amount');
raise_application_error(sys_raise_app_error_pkg.c_error_number,
sys_raise_app_error_pkg.g_err_line_id);
end calc_et_date_amount;
procedure delete_cashflow(p_contract_id number, p_times number) is
begin
delete from con_contract_cashflow cf
where cf.times > p_times
and cf.cf_item in (1, 9)
and cf.contract_id = p_contract_id;
end;
--结清现金流计算
procedure calc_et_cashflows(p_contract_id in number, p_user_id in number) is
v_change_req_rec con_contract_change_req%rowtype;
v_cashflow_rec con_contract_cashflow%rowtype;
v_principal number; --本金
v_interest number; --利息
v_due_date date;
v_times number;
begin
v_change_req_rec := get_con_change_req_rec(p_contract_id, p_user_id);
select *
into v_cashflow_rec
from con_contract_cashflow f
where f.times = (select max(f.times)
from con_contract_cashflow f
where f.due_date <= v_change_req_rec.termination_date
and f.cf_item = 1
and f.cf_type = 1
and f.contract_id = p_contract_id)
and f.due_date <= v_change_req_rec.termination_date
and f.cf_item = 1
and f.cf_type = 1
and f.contract_id = p_contract_id;
v_times := v_cashflow_rec.times + 1;
--计算前删除本次变更起始期及之后期,
delete_cashflow(p_contract_id, v_cashflow_rec.times);
--创建提前结清款现金流
v_cashflow_rec := null;
v_interest := round(v_change_req_rec.et_total_amount * 0.13 / 1.13,
2);
v_principal := round(v_change_req_rec.et_total_amount / 1.13, 2);
v_due_date := v_change_req_rec.termination_date;
v_cashflow_rec.cashflow_id := con_contract_cashflow_s.nextval;
v_cashflow_rec.contract_id := p_contract_id;
v_cashflow_rec.cf_item := 200;
v_cashflow_rec.cf_type := 1;
v_cashflow_rec.cf_direction := 'INFLOW';
v_cashflow_rec.cf_status := 'RELEASE';
v_cashflow_rec.times := v_times;
v_cashflow_rec.calc_date := v_due_date;
v_cashflow_rec.due_date := v_due_date;
v_cashflow_rec.due_amount := v_change_req_rec.et_total_amount;
v_cashflow_rec.net_due_amount := round(v_change_req_rec.et_total_amount / 1.13,
2);
v_cashflow_rec.vat_due_amount := round(v_change_req_rec.et_total_amount * 0.13 / 1.13,
2);
v_cashflow_rec.principal := v_principal;
v_cashflow_rec.net_principal := round(v_principal / 1.13,
2);
v_cashflow_rec.vat_principal := round(v_principal * 0.13 / 1.13,
2);
v_cashflow_rec.interest := v_interest;
v_cashflow_rec.net_interest := round(v_interest / 1.13, 2);
v_cashflow_rec.vat_interest := round(v_interest * 0.13 / 1.13,
2);
v_cashflow_rec.received_amount := 0;
v_cashflow_rec.received_principal := 0;
v_cashflow_rec.received_interest := 0;
v_cashflow_rec.outstanding_prin_tax_incld := 0;
v_cashflow_rec.write_off_flag := 'NOT';
v_cashflow_rec.overdue_status := 'NOT';
v_cashflow_rec.penalty_process_status := 'NORMAL';
v_cashflow_rec.billing_status := 'N';
v_cashflow_rec.generated_source := 'MANUAL';
v_cashflow_rec.created_by := p_user_id;
v_cashflow_rec.creation_date := sysdate;
v_cashflow_rec.last_updated_by := p_user_id;
v_cashflow_rec.last_update_date := sysdate;
insert into con_contract_cashflow values v_cashflow_rec;
--创建提前结清手续费现金流
v_cashflow_rec := null;
v_interest := round(v_change_req_rec.et_fee * 0.13 / 1.13, 2);
v_principal := round(v_change_req_rec.et_fee / 1.13, 2);
v_due_date := v_change_req_rec.termination_date;
v_cashflow_rec.cashflow_id := con_contract_cashflow_s.nextval;
v_cashflow_rec.contract_id := p_contract_id;
v_cashflow_rec.cf_item := 11;
v_cashflow_rec.cf_type := 11;
v_cashflow_rec.cf_direction := 'INFLOW';
v_cashflow_rec.cf_status := 'RELEASE';
v_cashflow_rec.times := v_times;
v_cashflow_rec.calc_date := v_due_date;
v_cashflow_rec.due_date := v_due_date;
v_cashflow_rec.due_amount := v_change_req_rec.et_fee;
v_cashflow_rec.net_due_amount := round(v_change_req_rec.et_fee / 1.13,
2);
v_cashflow_rec.vat_due_amount := round(v_change_req_rec.et_fee * 0.13 / 1.13,
2);
v_cashflow_rec.principal := v_principal;
v_cashflow_rec.net_principal := round(v_principal / 1.13,
2);
v_cashflow_rec.vat_principal := round(v_principal * 0.13 / 1.13,
2);
v_cashflow_rec.interest := v_interest;
v_cashflow_rec.net_interest := round(v_interest / 1.13, 2);
v_cashflow_rec.vat_interest := round(v_interest * 0.13 / 1.13,
2);
v_cashflow_rec.received_amount := 0;
v_cashflow_rec.received_principal := 0;
v_cashflow_rec.received_interest := 0;
v_cashflow_rec.outstanding_prin_tax_incld := 0;
v_cashflow_rec.write_off_flag := 'NOT';
v_cashflow_rec.overdue_status := 'NOT';
v_cashflow_rec.penalty_process_status := 'NORMAL';
v_cashflow_rec.billing_status := 'N';
v_cashflow_rec.generated_source := 'MANUAL';
v_cashflow_rec.created_by := p_user_id;
v_cashflow_rec.creation_date := sysdate;
v_cashflow_rec.last_updated_by := p_user_id;
v_cashflow_rec.last_update_date := sysdate;
insert into con_contract_cashflow values v_cashflow_rec;
--创建提前结清资金占用费现金流
v_cashflow_rec := null;
v_interest := round(v_change_req_rec.fund_possession_cost * 0.13 / 1.13,
2);
v_principal := round(v_change_req_rec.fund_possession_cost / 1.13, 2);
v_due_date := v_change_req_rec.termination_date;
v_cashflow_rec.cashflow_id := con_contract_cashflow_s.nextval;
v_cashflow_rec.contract_id := p_contract_id;
v_cashflow_rec.cf_item := 14;
v_cashflow_rec.cf_type := 14;
v_cashflow_rec.cf_direction := 'INFLOW';
v_cashflow_rec.cf_status := 'RELEASE';
v_cashflow_rec.times := v_times;
v_cashflow_rec.calc_date := v_due_date;
v_cashflow_rec.due_date := v_due_date;
v_cashflow_rec.due_amount := v_change_req_rec.fund_possession_cost;
v_cashflow_rec.net_due_amount := round(v_change_req_rec.fund_possession_cost / 1.13,
2);
v_cashflow_rec.vat_due_amount := round(v_change_req_rec.fund_possession_cost * 0.13 / 1.13,
2);
v_cashflow_rec.principal := v_principal;
v_cashflow_rec.net_principal := round(v_principal / 1.13,
2);
v_cashflow_rec.vat_principal := round(v_principal * 0.13 / 1.13,
2);
v_cashflow_rec.interest := v_interest;
v_cashflow_rec.net_interest := round(v_interest / 1.13, 2);
v_cashflow_rec.vat_interest := round(v_interest * 0.13 / 1.13,
2);
v_cashflow_rec.received_amount := 0;
v_cashflow_rec.received_principal := 0;
v_cashflow_rec.received_interest := 0;
v_cashflow_rec.outstanding_prin_tax_incld := 0;
v_cashflow_rec.write_off_flag := 'NOT';
v_cashflow_rec.overdue_status := 'NOT';
v_cashflow_rec.penalty_process_status := 'NORMAL';
v_cashflow_rec.billing_status := 'N';
v_cashflow_rec.generated_source := 'MANUAL';
v_cashflow_rec.created_by := p_user_id;
v_cashflow_rec.creation_date := sysdate;
v_cashflow_rec.last_updated_by := p_user_id;
v_cashflow_rec.last_update_date := sysdate;
insert into con_contract_cashflow values v_cashflow_rec;
end calc_et_cashflows;
--结清提交
procedure submit_change_req_et(p_change_req_id number,
p_layout_code varchar2,
p_user_id number) is
r_change_req_rec con_contract_change_req%rowtype;
r_change_con_rec con_contract%rowtype;
v_approval_method hls_document_type.approval_method%type;
e_change_req_status_error exception;
begin
hls_document_compare_pkg.con_contract_compare(p_table_name => 'CON_CONTRACT',
p_change_req_id => p_change_req_id,
p_from_table_pk => '',
p_to_table_pk => p_change_req_id,
p_user_id => p_user_id);
r_change_req_rec := get_con_change_req_rec(p_change_req_id => p_change_req_id,
p_user_id => p_user_id);
r_change_con_rec := con_contract_pkg.get_contract_rec(p_contract_id => p_change_req_id,
p_user_id => p_user_id);
if r_change_req_rec.req_status not in ('NEW', 'REJECT') then
raise e_change_req_status_error;
end if;
con_change_req_custom_pkg.before_submit_change_req(p_change_req_id => p_change_req_id,
p_user_id => p_user_id);
con_contract_history_pkg.calc_change_history(p_change_req_id => p_change_req_id,
p_user_id => p_user_id);
select approval_method
into v_approval_method
from hls_document_type
where document_category = r_change_req_rec.document_category
and document_type = r_change_req_rec.document_type;
if v_approval_method = 'WORK_FLOW' then
con_contract_change_req_wf_pkg.workflow_start(p_change_req_rec => r_change_req_rec,
p_change_con_rec => r_change_con_rec,
p_layout_code => p_layout_code,
p_user_id => p_user_id);
else
update con_contract_change_req t
set t.req_status = 'APPROVING',
t.submit_date = sysdate,
last_updated_by = p_user_id,
last_update_date = sysdate
where t.change_req_id = p_change_req_id;
con_contract_change_req_pkg.change_req_confirm(p_change_req_id => p_change_req_id,
p_user_id => p_user_id);
end if;
end submit_change_req_et;
end cus_con_et_pkg;
/
src/main/database/Register_function/REGISTER_CON_ET001.sql
0 → 100644
View file @
9472f8ef
WHENEVER
SQLERROR
EXIT
FAILURE
ROLLBACK
;
WHENEVER
OSERROR
EXIT
FAILURE
ROLLBACK
;
spool
REGISTER_CON_ET001
.
log
set
feedback
off
set
define
off
begin
--页面注册
sys_function_assign_pkg
.
service_load
(
'modules/cont/CON_ET001/con_early_termination_query.lview'
,
'提前结清创建入口'
,
1
,
1
,
0
);
sys_function_assign_pkg
.
service_load
(
'modules/cont/CON_ET001/con_early_termination_et_detail.lview'
,
'提前结清申请明细'
,
1
,
1
,
0
);
--功能定义
SYS_LOAD_SYS_FUNCTION_PKG
.
SYS_FUNCTION_LOAD
(
'CON_ET001'
,
'提前结清创建'
,
'提前结清创建'
,
'100'
,
''
,
''
,
'modules/cont/CON_ET001/con_early_termination_query.lview'
,
'ZHS'
,
-
1
);
SYS_LOAD_SYS_FUNCTION_PKG
.
SYS_FUNCTION_LOAD
(
'CON_ET001'
,
'提前结清创建'
,
'提前结清创建'
,
'100'
,
''
,
''
,
'modules/cont/CON_ET001/con_early_termination_query.lview'
,
'US'
,
-
1
);
--分配页面
sys_function_assign_pkg
.
func_service_load
(
'CON_ET001'
,
'modules/cont/CON_ET001/con_early_termination_query.lview'
);
sys_function_assign_pkg
.
func_service_load
(
'CON_ET001'
,
'modules/cont/CON500/con_contract_authority_list_validate.lview'
);
sys_function_assign_pkg
.
func_service_load
(
'CON_ET001'
,
'modules/cont/CON500/con_contract_get_layout_code.lview'
);
sys_function_assign_pkg
.
func_service_load
(
'CON_ET001'
,
'modules/cont/CON_ET001/con_early_termination_et_detail.lview'
);
--分配bm
sys_function_assign_pkg
.
func_bm_load
(
'CON_ET001'
,
'cont.CON500.con_contract_get_layout_code'
);
sys_function_assign_pkg
.
func_bm_load
(
'CON_ET001'
,
'cont.CON_ET001.create_change_req'
);
sys_function_assign_pkg
.
func_bm_load
(
'CON_ET001'
,
'cont.CON_ET001.submit_change_req'
);
sys_function_assign_pkg
.
func_bm_load
(
'CON_ET001'
,
'cont.CON_ET001.con_early_termination_query'
);
sys_function_assign_pkg
.
func_bm_load
(
'CON_ET001'
,
'cont.CON731.cancel_change_req'
);
sys_function_assign_pkg
.
func_bm_load
(
'CON_ET001'
,
'cont.CON_ET001.calc_et_date_amount'
);
sys_function_assign_pkg
.
func_bm_load
(
'CON_ET001'
,
'cont.CON_ET001.calc_cashflow'
);
sys_function_assign_pkg
.
func_bm_load
(
'CON_ET001'
,
'cont.CON_ET001.submit_change_req'
);
--分配菜单
sys_load_sys_function_grp_pkg
.
sys_function_group_item_load
(
p_function_group_code
=>
'CON_CHANGE_REQ'
,
p_function_code
=>
'CON_ET001'
,
p_enabled_flag
=>
'Y'
,
P_USER_ID
=>-
1
);
end
;
/
commit
;
set
feedback
on
set
define
on
spool
off
exit
src/main/database/Register_function/REGISTER_CON_ET003.sql
0 → 100644
View file @
9472f8ef
WHENEVER
SQLERROR
EXIT
FAILURE
ROLLBACK
;
WHENEVER
OSERROR
EXIT
FAILURE
ROLLBACK
;
spool
REGISTER_CON_ET001
.
log
set
feedback
off
set
define
off
begin
--页面注册
sys_function_assign_pkg
.
service_load
(
'modules/cont/CON_ET003/con_early_termination_modify_query.lview'
,
'提前结清查询'
,
1
,
1
,
0
);
--功能定义
SYS_LOAD_SYS_FUNCTION_PKG
.
SYS_FUNCTION_LOAD
(
'CON_ET003'
,
'提前结清查询'
,
'提前结清查询'
,
'100'
,
''
,
''
,
'modules/cont/CON_ET003/con_early_termination_modify_query.lview'
,
'ZHS'
,
-
1
);
SYS_LOAD_SYS_FUNCTION_PKG
.
SYS_FUNCTION_LOAD
(
'CON_ET003'
,
'提前结清查询'
,
'提前结清查询'
,
'100'
,
''
,
''
,
'modules/cont/CON_ET003/con_early_termination_modify_query.lview'
,
'US'
,
-
1
);
--分配页面
sys_function_assign_pkg
.
func_service_load
(
'CON_ET003'
,
'modules/cont/CON_ET003/con_early_termination_modify_query.lview'
);
sys_function_assign_pkg
.
func_service_load
(
'CON_ET003'
,
'modules/cont/CON500/con_contract_authority_list_validate.lview'
);
sys_function_assign_pkg
.
func_service_load
(
'CON_ET003'
,
'modules/cont/CON500/con_contract_get_layout_code.lview'
);
sys_function_assign_pkg
.
func_service_load
(
'CON_ET003'
,
'modules/cont/CON_ET001/con_early_termination_et_detail.lview'
);
--分配bm
sys_function_assign_pkg
.
func_bm_load
(
'CON_ET003'
,
'cont.CON500.con_contract_get_layout_code'
);
sys_function_assign_pkg
.
func_bm_load
(
'CON_ET003'
,
'cont.CON_ET001.submit_change_req'
);
sys_function_assign_pkg
.
func_bm_load
(
'CON_ET003'
,
'cont.CON_ET003.con_early_termination_modify_query'
);
sys_function_assign_pkg
.
func_bm_load
(
'CON_ET003'
,
'cont.CON731.cancel_change_req'
);
sys_function_assign_pkg
.
func_bm_load
(
'CON_ET003'
,
'cont.CON_ET001.calc_et_date_amount'
);
sys_function_assign_pkg
.
func_bm_load
(
'CON_ET003'
,
'cont.CON_ET001.calc_cashflow'
);
sys_function_assign_pkg
.
func_bm_load
(
'CON_ET003'
,
'basic.hls_division_for_lov'
);
sys_function_assign_pkg
.
func_bm_load
(
'CON_ET003'
,
'cont.CON_ET001.submit_change_req'
);
--分配菜单
sys_load_sys_function_grp_pkg
.
sys_function_group_item_load
(
p_function_group_code
=>
'CON_CHANGE_REQ'
,
p_function_code
=>
'CON_ET003'
,
p_enabled_flag
=>
'Y'
,
P_USER_ID
=>-
1
);
end
;
/
commit
;
set
feedback
on
set
define
on
spool
off
exit
src/main/database/Table/Alter/CON_CONTRACT_CHANGE_REQ.sql
View file @
9472f8ef
alter
table
CON_CONTRACT_CHANGE_REQ
add
REPO_CHANGE_FLAG
varchar2
(
1
);
comment
on
column
CON_CONTRACT_CHANGE_REQ
.
REPO_CHANGE_FLAG
is
'是否回购'
;
\ No newline at end of file
is
'是否回购'
;
alter
table
CON_CONTRACT_CHANGE_REQ
add
FUND_POSSESSION_TIME
number
;
comment
on
column
CON_CONTRACT_CHANGE_REQ
.
FUND_POSSESSION_TIME
is
'资金占用天数'
;
alter
table
CON_CONTRACT_CHANGE_REQ
add
FUND_POSSESSION_COST
number
;
comment
on
column
CON_CONTRACT_CHANGE_REQ
.
FUND_POSSESSION_COST
is
'资金占用费'
;
alter
table
CON_CONTRACT_CHANGE_REQ
add
FUND_POSSESSION_RATE
number
;
comment
on
column
CON_CONTRACT_CHANGE_REQ
.
FUND_POSSESSION_RATE
is
'资金占用费利率'
;
alter
table
CON_CONTRACT_CHANGE_REQ
add
ET_DUE_AMOUNT
number
;
comment
on
column
CON_CONTRACT_CHANGE_REQ
.
ET_DUE_AMOUNT
is
'提前结清租金'
;
alter
table
CON_CONTRACT_CHANGE_REQ
add
SUM_UNRECEIVED_PRINCIPAL
number
;
comment
on
column
CON_CONTRACT_CHANGE_REQ
.
SUM_UNRECEIVED_PRINCIPAL
is
'剩余本金'
;
alter
table
CON_CONTRACT_CHANGE_REQ
add
ET_INTEREST_RATE
number
;
comment
on
column
CON_CONTRACT_CHANGE_REQ
.
ET_INTEREST_RATE
is
'提前结清利率'
;
src/main/database/View/CON_CONTRACT_REPO_MODIFY_LV.sql
View file @
9472f8ef
CREATE
OR
REPLACE
VIEW
CON_CONTRACT_REPO_MODIFY_LV
AS
CREATE
OR
REPLACE
VIEW
CON_CONTRACT_REPO_MODIFY_LV
AS
SELECT
t1
.
contract_id
,
t1
.
data_class
,
t1
.
calc_session_id
,
...
...
@@ -54,6 +54,7 @@ SELECT t1.contract_id,
cr
.
repo_change_flag
FROM
con_contract
t1
,
con_contract_change_req
cr
WHERE
t1
.
contract_id
=
cr
.
contract_id
WHERE
t1
.
contract_id
=
cr
.
change_req_id
AND
t1
.
data_class
=
'CHANGE_REQ'
AND
cr
.
repo_change_flag
=
'Y'
;
src/main/database/View/con_contract_change_req_lv.sql
0 → 100644
View file @
9472f8ef
CREATE
OR
REPLACE
VIEW
CON_CONTRACT_CHANGE_REQ_LV
AS
select
t
.
change_req_id
,
t
.
batch_id
,
t
.
change_quotation
,
t
.
change_lease_item
,
t
.
change_bp
,
t
.
change_req_number
,
t
.
document_type
,
(
select
t1
.
description
from
hls_document_type
t1
where
t1
.
document_type
=
t
.
document_type
)
as
document_type_n
,
t
.
document_category
,
t
.
business_type
,
t
.
company_id
,
t
.
contract_id
,
t
.
req_status
,
(
select
t1
.
code_value_name
from
sys_code_values_v
t1
where
t1
.
code
=
'CON_CHANGE_REQ_STATUS'
and
t1
.
code_value
=
t
.
req_status
)
as
req_status_n
,
t
.
req_date
,
t
.
description
,
t
.
wfl_instance_id
,
t
.
calc_session_id
,
t
.
owner_user_id
,
t
.
submit_date
,
t
.
approved_date
,
t
.
created_by
,
(
SELECT
su
.
user_name
FROM
sys_user
su
WHERE
su
.
user_id
=
t
.
created_by
)
created_by_n
,
t
.
creation_date
,
t
.
last_updated_by
,
t
.
last_update_date
,
t
.
ccr_price_list
,
t
.
ccr_calc_session_id
,
t
.
simulation_flag
,
decode
(
t
.
simulation_flag
,
'Y'
,
'Y'
,
''
)
as
simulation_flag_n
,
reschedule_flag
,
decode
(
t
.
reschedule_flag
,
'Y'
,
'Y'
,
''
)
as
reschedule_flag_n
,
t
.
et_flag
,
decode
(
t
.
et_flag
,
'Y'
,
'Y'
,
''
)
as
et_flag_n
,
t
.
tenant_change_flag
,
decode
(
t
.
tenant_change_flag
,
'Y'
,
'Y'
,
''
)
as
tenant_change_flag_n
,
t
.
bank_acc_change_flag
,
decode
(
t
.
bank_acc_change_flag
,
'Y'
,
'Y'
,
''
)
as
bank_acc_change_flag_n
,
t
.
lease_item_change_flag
,
decode
(
t
.
lease_item_change_flag
,
'Y'
,
'Y'
,
''
)
as
lease_item_change_flag_n
,
t
.
mortgage_change_flag
,
decode
(
t
.
mortgage_change_flag
,
'Y'
,
'Y'
,
''
)
as
mortgage_change_flag_n
,
t
.
guarantor_change_flag
,
decode
(
t
.
guarantor_change_flag
,
'Y'
,
'Y'
,
''
)
as
guarantor_change_flag_n
,
t
.
contract_cancel_flag
,
decode
(
t
.
contract_cancel_flag
,
'Y'
,
'Y'
,
''
)
as
contract_cancel_flag_n
,
t
.
cashflow_change_flag
,
decode
(
t
.
cashflow_change_flag
,
'Y'
,
'Y'
,
''
)
as
cashflow_change_flag_n
,
cc
.
contract_number
,
cc
.
contract_name
,
cc
.
bp_id_tenant
,
(
select
m
.
bp_name
from
hls_bp_master
m
where
m
.
bp_id
=
cc
.
bp_id_tenant
)
as
bp_id_tenant_n
,
cc
.
inception_of_lease
,
nvl
(
t
.
et_ins_derate_amount
,
0
)
et_ins_derate_amount
,
(
select
sum
(
cf
.
principal
)
-
sum
(
nvl
(
cf
.
received_principal
,
0
))
from
con_contract_cashflow
cf
where
cf
.
contract_id
=
t
.
change_req_id
and
cf
.
cf_item
=
1
and
cf
.
cf_direction
=
'INFLOW'
)
outstanding_principal
,
nvl
(
t
.
et_fee
,
500
)
et_fee
,
nvl
(
t
.
et_total_amount
,
0
)
et_total_amount
,
nvl
(
t
.
et_interest
,
0
)
et_interest
,
--提前结清 start
nvl
(
t
.
FUND_POSSESSION_TIME
,
0
)
FUND_POSSESSION_TIME
,
--资金占用天数
NVL
(
t
.
FUND_POSSESSION_COST
,
0
)
FUND_POSSESSION_COST
,
--资金占用费
NVL
(
t
.
FUND_POSSESSION_RATE
,
0
)
FUND_POSSESSION_RATE
,
--资金占用费利率
NVL
(
t
.
ET_DUE_AMOUNT
,
0
)
ET_DUE_AMOUNT
,
--提前结清租金
NVL
(
t
.
SUM_UNRECEIVED_PRINCIPAL
,
0
)
SUM_UNRECEIVED_PRINCIPAL
,
--剩余本金
NVL
(
t
.
ET_INTEREST_RATE
,
cc
.
int_rate_display
)
ET_INTEREST_RATE
,
--提前结清利率
cc
.
bp_id_agent_level1
,
(
SELECT
m
.
bp_name
FROM
hls_bp_master
m
WHERE
m
.
bp_id
=
cc
.
bp_id_agent_level1
)
AS
bp_id_agent_level1_n
,
nvl
(
t
.
residual_value
,
cc
.
residual_value
)
residual_value
,
t
.
ccr_reason
--提前结清 end
from
con_contract_change_req
t
,
con_contract
cc
where
t
.
contract_id
=
cc
.
contract_id
;
src/main/webapp/WEB-INF/classes/cont/CON_ET001/calc_cashflow.lwm
0 → 100644
View file @
9472f8ef
<?xml version="1.0" encoding="UTF-8"?>
<bm:model
xmlns:bm=
"http://www.leaf-framework.org/schema/bm"
>
<bm:operations>
<bm:operation
name=
"execute"
>
<bm:update-sql>
<![CDATA[
BEGIN
cus_con_et_pkg.calc_et_cashflows(p_contract_id=>
${@contract_id}, p_user_id=>${/session/@user_id});
END;
]]>
</bm:update-sql>
</bm:operation>
</bm:operations>
</bm:model>
src/main/webapp/WEB-INF/classes/cont/CON_ET001/calc_et_date_amount.lwm
0 → 100644
View file @
9472f8ef
<?xml version="1.0" encoding="UTF-8"?>
<bm:model
xmlns:bm=
"http://www.leaf-framework.org/schema/bm"
>
<bm:operations>
<bm:operation
name=
"execute"
>
<bm:parameters>
<bm:parameter
name=
"et_fee"
dataType=
"java.lang.Double"
input=
"true"
output=
"true"
outputPath=
"@et_fee"
/>
<bm:parameter
name=
"et_total_amount"
dataType=
"java.lang.Double"
input=
"false"
output=
"true"
outputPath=
"@et_total_amount"
/>
<bm:parameter
name=
"et_due_amount"
dataType=
"java.lang.Double"
input=
"false"
output=
"true"
outputPath=
"@et_due_amount"
/>
<bm:parameter
name=
"overdue_amount"
dataType=
"java.lang.Double"
input=
"false"
output=
"true"
outputPath=
"@overdue_amount"
/>
<bm:parameter
name=
"penalty"
dataType=
"java.lang.Double"
input=
"false"
output=
"true"
outputPath=
"@penalty"
/>
<bm:parameter
name=
"fund_possession_time"
dataType=
"java.lang.Double"
input=
"false"
output=
"true"
outputPath=
"@fund_possession_time"
/>
<bm:parameter
name=
"fund_possession_cost"
dataType=
"java.lang.Double"
input=
"false"
output=
"true"
outputPath=
"@fund_possession_cost"
/>
<bm:parameter
name=
"sum_unreceived_principal"
dataType=
"java.lang.Double"
input=
"false"
output=
"true"
outputPath=
"@sum_unreceived_principal"
/>
</bm:parameters>
<bm:update-sql>
<![CDATA[
BEGIN
cus_con_et_pkg.calc_et_date_amount(p_contract_id =>
${@contract_id},
p_et_date => TO_DATE(${@termination_date},'yyyy-mm-dd'),
p_ET_FEE => ${@et_fee},
p_et_interest_rate => ${@et_interest_rate},
p_et_total_amount => ${@et_total_amount},
p_et_due_amount => ${@et_due_amount},
p_overdue_amount => ${@overdue_amount},
p_penalty => ${@penalty},
p_fund_possession_time => ${@fund_possession_time},
p_fund_possession_cost => ${@fund_possession_cost},
p_sum_unreceived_principal => ${@sum_unreceived_principal},
p_user_id => ${/session/@user_id});
END;
]]>
</bm:update-sql>
</bm:operation>
</bm:operations>
</bm:model>
src/main/webapp/WEB-INF/classes/cont/CON_ET001/con_early_termination_query.lwm
0 → 100644
View file @
9472f8ef
<?xml version="1.0" encoding="UTF-8"?>
<bm:model
xmlns:bm=
"http://www.leaf-framework.org/schema/bm"
xmlns:s=
"leaf.plugin.script"
>
<bm:operations>
<bm:operation
name=
"query"
>
<bm:query-sql>
<![CDATA[
select * from
(SELECT
t.contract_id,
t.company_id,
t.business_type,
t.contract_number,
t.contract_name,
t.document_type,
dt.document_type_desc,
t.document_category,
dt.document_category_desc,
t.bp_id_tenant,
t.lease_execution_date,
(SELECT
scv.code_value_name
FROM
sys_code_values_v scv,
con_contract_lease_item ci,
hls_product_plan_definition hd
WHERE
scv.code = 'DISCOUNT_METHOD' AND
scv.code_value_enabled_flag = 'Y' AND
scv.code_value = hd.discount_method AND
hd.product_plan_id = ci.product_plan_id AND
ci.contract_id = t.contract_id
) discount_method_n,
b.bp_name,
b.bp_code,
--t.license_number,
TO_CHAR(t.lease_end_date, 'yyyy-mm-dd') lease_end_date,
(SELECT h.bp_name FROM hls_bp_master h WHERE h.bp_id = t.unit_id
) AS unit_id_n,
t.unit_id,
TO_CHAR(t.inception_of_lease, 'yyyy-mm-dd') inception_of_lease,
t.contract_status,
(SELECT
v.code_value_name
FROM
sys_code_values_v v
WHERE
v.code = 'CON500_CONTRACT_STATUS' AND
v.code_value = t.contract_status
) AS status_desc,
(SELECT
DECODE(COUNT(*), 0, 'N', 'Y')
FROM
con_contract_cashflow f
WHERE
f.contract_id = t.contract_id AND
f.overdue_status = 'Y'
) overdue_status,
'ET' et_type,
'提前结清' et_type_dis,
t.early_termination_profile,
(SELECT
v.code_value_name
FROM
sys_code_values_v v
WHERE
v.code = 'CON500_CONTRACT_STATUS' AND
v.code_value = t.contract_status
) AS contract_status_n,
t.spv_company_id,
(SELECT
a.company_code
FROM
fnd_companies a
WHERE
a.company_id = t.spv_company_id
) spv_company_code,
(SELECT
COUNT(*)
FROM
con_contract_cashflow h
WHERE
h.contract_id = t.contract_id AND
h.write_off_flag = 'FULL' AND
h.cf_item = 1 AND
h.times != 0 AND
h.cf_direction = 'INFLOW'
) received_times,
(SELECT su.description FROM sys_user su WHERE su.user_id = t.owner_user_id
) owner,
t.lease_times,
TRIM((TO_CHAR(ROUND(t.int_rate_display, 4) * 100, '90.00')
|| '%')) int_rate_display,
t.invoice_price,
t.finance_amount,
t.down_payment,
TRIM((TO_CHAR(ROUND(t.down_payment_ratio, 4) * 100, '90.00')
|| '%')) down_payment_ratio,
t.deposit,
TRIM((TO_CHAR(ROUND(t.deposit_ratio, 4) * 100, '90.00')
|| '%')) deposit_ratio,
t.lease_charge,
TRIM((TO_CHAR(ROUND(t.lease_charge_ratio, 4) * 100, '90.00')
|| '%')) lease_charge_ratio,
(SELECT
TO_CHAR(cc.due_date, 'yyyy-mm-dd')
FROM
con_contract_cashflow cc
WHERE
cc.contract_id = t.contract_id AND
cc.times = 1 AND
cc.cf_item = 1
) start_due_date,
t.bp_id_agent_level1,
(SELECT
hls.bp_name
FROM
hls_bp_master hls
WHERE
hls.bp_id = t.bp_id_agent_level1
) bp_agent,
t.owner_user_id,
(SELECT
hbt.description
FROM
hls_business_type hbt
WHERE
hbt.enabled_flag = 'Y' AND
hbt.business_type = t.business_type
) business_type_n,
(SELECT
hlc.description
FROM
hls_lease_channel hlc
WHERE
hlc.lease_channel = t.lease_channel AND
hlc.enabled_flag = 'Y'
) lease_channel_n,
t.division,
(SELECT
t2.description
FROM
hls_division t2
WHERE
t2.enabled_flag = 'Y' AND
t2.division = t.division
) division_n
FROM
con_contract t,
hls_bp_master b,
hls_document_type_v dt
WHERE
t.bp_id_tenant = b.bp_id(+) AND
t.contract_status = 'INCEPT' AND
t.data_class = 'NORMAL' AND
dt.document_type(+) = t.document_type
) t1 #WHERE_CLAUSE# #ORDER_BY_CLAUSE#
]]>
</bm:query-sql>
</bm:operation>
</bm:operations>
<bm:query-fields>
<bm:query-field
name=
"contract_id"
queryExpression=
"t1.contract_id = ${@contract_id}"
/>
<bm:query-field
name=
"unit_id"
queryExpression=
"t1.unit_id = ${@unit_id}"
/>
<bm:query-field
name=
"date_from"
datatype=
"java.lang.String"
queryexpression=
"t1.inception_of_lease >= ${@date_from}"
/>
<bm:query-field
name=
"date_to"
datatype=
"java.lang.String"
queryexpression=
"t1.inception_of_lease <= ${@date_to}"
/>
<bm:query-field
name=
"lease_end_date_from"
datatype=
"java.lang.String"
queryexpression=
"t1.lease_end_date >= ${@lease_end_date_from}"
/>
<bm:query-field
name=
"lease_end_date_to"
datatype=
"java.lang.String"
queryexpression=
"t1.lease_end_date <= ${@lease_end_date_to}"
/>
<bm:query-field
name=
"contract_number"
datatype=
"java.lang.String"
queryexpression=
"upper(t1.contract_number) like '%' || upper(${@contract_number}) || '%'"
/>
<!-- <bm:query-field name="license_number" datatype="java.lang.String" queryexpression="upper(t1.license_number) like '%' || upper(${@license_number}) || '%'"/> -->
<bm:query-field
name=
"contract_name"
datatype=
"java.lang.String"
queryexpression=
"t1.contract_name like '%' || ${@contract_name} || '%'"
/>
<bm:query-field
name=
"bp_id_tenant"
queryExpression=
"t1.bp_id_tenant = ${@bp_id_tenant}"
/>
<bm:query-field
name=
"bp_id_agent_level1"
queryExpression=
"t1.bp_id_agent_level1 = ${@bp_id_agent_level1}"
/>
<bm:query-field
name=
"bp_code"
datatype=
"java.lang.String"
queryexpression=
"t1.bp_code=${@bp_code}"
/>
<bm:query-field
name=
"document_category"
datatype=
"java.lang.String"
queryexpression=
"t1.document_category=${@document_category}"
/>
<bm:query-field
name=
"document_type"
datatype=
"java.lang.String"
queryexpression=
"t1.document_type=${@document_type}"
/>
<bm:query-field
name=
"overdue_status"
datatype=
"java.lang.String"
queryexpression=
"t1.overdue_status=${@overdue_status}"
/>
<bm:query-field
name=
"received_times"
queryExpression=
"t1.received_times = ${@received_times}"
/>
<bm:query-field
name=
"division"
queryExpression=
"t1.division = ${@division}"
/>
<bm:query-field
name=
"contract_status"
queryExpression=
"t1.contract_status = ${@contract_status}"
/>
<bm:query-field
name=
"lease_execution_date_from"
queryexpression=
"to_char(t1.lease_execution_date,'YYYY-MM-DD') >= ${@lease_execution_date_from}"
/>
<bm:query-field
name=
"lease_execution_date_to"
queryexpression=
"to_char(t1.lease_execution_date,'YYYY-MM-DD') <= ${@lease_execution_date_to}"
/>
</bm:query-fields>
<!-- <bm:features>-->
<!-- EXISTS-->
<!-- (SELECT-->
<!-- 1-->
<!-- FROM-->
<!-- sys_user u-->
<!-- WHERE-->
<!-- u.bp_category = 'AGENT' AND-->
<!-- u.user_id =${/session/@user_id}-->
<!-- ) AND-->
<!-- AND t.owner_user_id = ${/session/@user_id}-->
<!-- <s:bm-script><![CDATA[-->
<!-- var cx = Packages.leaf.javascript.Context.getCurrentContext();-->
<!-- Packages.leaf.plugin.script.engine.ScriptImportor.defineExternScript(cx, this, $ctx.getData(), "aut_authority_bm_validate.js");-->
<!-- ]]></s:bm-script>-->
<!-- </bm:features>-->
</bm:model>
src/main/webapp/WEB-INF/classes/cont/CON_ET001/create_change_req.lwm
0 → 100644
View file @
9472f8ef
<?xml version="1.0" encoding="UTF-8"?>
<bm:model
xmlns:bm=
"http://www.leaf-framework.org/schema/bm"
>
<bm:operations>
<bm:operation
name=
"execute"
>
<bm:parameters>
<bm:parameter
name=
"change_req_id"
dataType=
"java.lang.Long"
input=
"false"
output=
"true"
outputPath=
"@change_req_id"
/>
</bm:parameters>
<bm:update-sql>
<![CDATA[
BEGIN
cus_con_et_pkg.create_change_req_et(p_contract_id=>
${@contract_id},
p_req_type=>${@req_type},
p_user_id=>${/session/@user_id},
p_simulation_flag=>${@simulation_flag},
p_change_req_id=>${@change_req_id} );
END;
]]>
</bm:update-sql>
</bm:operation>
</bm:operations>
</bm:model>
src/main/webapp/WEB-INF/classes/cont/CON_ET001/submit_change_req.lwm
0 → 100644
View file @
9472f8ef
<?xml version="1.0" encoding="UTF-8"?>
<bm:model
xmlns:bm=
"http://www.leaf-framework.org/schema/bm"
>
<bm:operations>
<bm:operation
name=
"execute"
>
<bm:parameters>
<bm:parameter
name=
"change_req_id"
dataType=
"java.lang.Long"
input=
"true"
output=
"false"
/>
<bm:parameter
name=
"user_id"
dataType=
"java.lang.Long"
input=
"true"
output=
"false"
/>
</bm:parameters>
<bm:update-sql>
<![CDATA[
begin
cus_con_et_pkg.submit_change_req_et(p_change_req_id=>
${@change_req_id},
p_layout_code=>${@layout_code},
p_user_id=>${/session/@user_id});
end;]]>
</bm:update-sql>
</bm:operation>
</bm:operations>
</bm:model>
src/main/webapp/WEB-INF/classes/cont/CON_ET003/con_early_termination_modify_query.lwm
0 → 100644
View file @
9472f8ef
<?xml version="1.0" encoding="UTF-8"?>
<bm:model
xmlns:bm=
"http://www.leaf-framework.org/schema/bm"
xmlns:s=
"leaf.plugin.script"
>
<bm:operations>
<bm:operation
name=
"query"
>
<bm:query-sql>
<![CDATA[
select * from
(SELECT
t.contract_id,
t.company_id,
t.business_type,
t.contract_number,
t.contract_name,
t.document_type,
dt.document_type_desc,
t.document_category,
dt.document_category_desc,
t.bp_id_tenant,
t.lease_execution_date,
(SELECT
scv.code_value_name
FROM
sys_code_values_v scv,
con_contract_lease_item ci,
hls_product_plan_definition hd
WHERE
scv.code = 'DISCOUNT_METHOD' AND
scv.code_value_enabled_flag = 'Y' AND
scv.code_value = hd.discount_method AND
hd.product_plan_id = ci.product_plan_id AND
ci.contract_id = t.contract_id
) discount_method_n,
b.bp_name,
b.bp_code,
--t.license_number,
TO_CHAR(t.lease_end_date, 'yyyy-mm-dd') lease_end_date,
(SELECT h.bp_name FROM hls_bp_master h WHERE h.bp_id = t.unit_id
) AS unit_id_n,
t.unit_id,
TO_CHAR(t.inception_of_lease, 'yyyy-mm-dd') inception_of_lease,
t.contract_status,
(SELECT
v.code_value_name
FROM
sys_code_values_v v
WHERE
v.code = 'CON500_CONTRACT_STATUS' AND
v.code_value = t.contract_status
) AS status_desc,
(SELECT
DECODE(COUNT(*), 0, 'N', 'Y')
FROM
con_contract_cashflow f
WHERE
f.contract_id = t.contract_id AND
f.overdue_status = 'Y'
) overdue_status,
'ET' et_type,
'提前结清' et_type_dis,
t.early_termination_profile,
(SELECT
v.code_value_name
FROM
sys_code_values_v v
WHERE
v.code = 'CON500_CONTRACT_STATUS' AND
v.code_value = t.contract_status
) AS contract_status_n,
t.spv_company_id,
(SELECT
a.company_code
FROM
fnd_companies a
WHERE
a.company_id = t.spv_company_id
) spv_company_code,
(SELECT
COUNT(*)
FROM
con_contract_cashflow h
WHERE
h.contract_id = t.contract_id AND
h.write_off_flag = 'FULL' AND
h.cf_item = 1 AND
h.times != 0 AND
h.cf_direction = 'INFLOW'
) received_times,
(SELECT su.description FROM sys_user su WHERE su.user_id = t.owner_user_id
) owner,
t.lease_times,
TRIM((TO_CHAR(ROUND(t.int_rate_display, 4) * 100, '90.00')
|| '%')) int_rate_display,
t.invoice_price,
t.finance_amount,
t.down_payment,
TRIM((TO_CHAR(ROUND(t.down_payment_ratio, 4) * 100, '90.00')
|| '%')) down_payment_ratio,
t.deposit,
TRIM((TO_CHAR(ROUND(t.deposit_ratio, 4) * 100, '90.00')
|| '%')) deposit_ratio,
t.lease_charge,
TRIM((TO_CHAR(ROUND(t.lease_charge_ratio, 4) * 100, '90.00')
|| '%')) lease_charge_ratio,
(SELECT
TO_CHAR(cc.due_date, 'yyyy-mm-dd')
FROM
con_contract_cashflow cc
WHERE
cc.contract_id = t.contract_id AND
cc.times = 1 AND
cc.cf_item = 1
) start_due_date,
t.bp_id_agent_level1,
(SELECT
hls.bp_name
FROM
hls_bp_master hls
WHERE
hls.bp_id = t.bp_id_agent_level1
) bp_agent,
t.owner_user_id,
(SELECT
hbt.description
FROM
hls_business_type hbt
WHERE
hbt.enabled_flag = 'Y' AND
hbt.business_type = t.business_type
) business_type_n,
(SELECT
hlc.description
FROM
hls_lease_channel hlc
WHERE
hlc.lease_channel = t.lease_channel AND
hlc.enabled_flag = 'Y'
) lease_channel_n,
t.division,
(SELECT
t2.description
FROM
hls_division t2
WHERE
t2.enabled_flag = 'Y' AND
t2.division = t.division
) division_n,
r.change_req_number,
r.change_req_id,
r.req_status,
(SELECT
v.code_value_name
FROM
sys_code_values_v v
WHERE
v.code = 'CON_CHANGE_REQ_STATUS' AND
v.code_value = r.req_status
)req_status_n,
r.created_by,
(SELECT su.description FROM sys_user su WHERE su.user_id=r.created_by)req_employee_n
FROM
con_contract t,
hls_bp_master b,
hls_document_type_v dt,con_contract_change_req r
WHERE
r.req_status = 'NEW' AND
r.change_req_id = t.contract_id AND
r.et_flag='Y' AND
t.bp_id_tenant = b.bp_id(+) AND
dt.document_type(+) = t.document_type
order by r.change_req_number
) t1 #WHERE_CLAUSE# #ORDER_BY_CLAUSE#
]]>
</bm:query-sql>
</bm:operation>
</bm:operations>
<bm:query-fields>
<bm:query-field
name=
"contract_id"
queryExpression=
"t1.contract_id = ${@contract_id}"
/>
<bm:query-field
name=
"unit_id"
queryExpression=
"t1.unit_id = ${@unit_id}"
/>
<bm:query-field
name=
"date_from"
datatype=
"java.lang.String"
queryexpression=
"t1.inception_of_lease >= ${@date_from}"
/>
<bm:query-field
name=
"date_to"
datatype=
"java.lang.String"
queryexpression=
"t1.inception_of_lease <= ${@date_to}"
/>
<bm:query-field
name=
"lease_end_date_from"
datatype=
"java.lang.String"
queryexpression=
"t1.lease_end_date >= ${@lease_end_date_from}"
/>
<bm:query-field
name=
"lease_end_date_to"
datatype=
"java.lang.String"
queryexpression=
"t1.lease_end_date <= ${@lease_end_date_to}"
/>
<bm:query-field
name=
"contract_number"
datatype=
"java.lang.String"
queryexpression=
"upper(t1.contract_number) like '%' || upper(${@contract_number}) || '%'"
/>
<!-- <bm:query-field name="license_number" datatype="java.lang.String" queryexpression="upper(t1.license_number) like '%' || upper(${@license_number}) || '%'"/> -->
<bm:query-field
name=
"contract_name"
datatype=
"java.lang.String"
queryexpression=
"t1.contract_name like '%' || ${@contract_name} || '%'"
/>
<bm:query-field
name=
"bp_id_tenant"
queryExpression=
"t1.bp_id_tenant = ${@bp_id_tenant}"
/>
<bm:query-field
name=
"bp_id_agent_level1"
queryExpression=
"t1.bp_id_agent_level1 = ${@bp_id_agent_level1}"
/>
<bm:query-field
name=
"bp_code"
datatype=
"java.lang.String"
queryexpression=
"t1.bp_code=${@bp_code}"
/>
<bm:query-field
name=
"document_category"
datatype=
"java.lang.String"
queryexpression=
"t1.document_category=${@document_category}"
/>
<bm:query-field
name=
"document_type"
datatype=
"java.lang.String"
queryexpression=
"t1.document_type=${@document_type}"
/>
<bm:query-field
name=
"overdue_status"
datatype=
"java.lang.String"
queryexpression=
"t1.overdue_status=${@overdue_status}"
/>
<bm:query-field
name=
"received_times"
queryExpression=
"t1.received_times = ${@received_times}"
/>
<bm:query-field
name=
"division"
queryExpression=
"t1.division = ${@division}"
/>
<bm:query-field
name=
"contract_status"
queryExpression=
"t1.contract_status = ${@contract_status}"
/>
<bm:query-field
name=
"lease_execution_date_from"
queryexpression=
"to_char(t1.lease_execution_date,'YYYY-MM-DD') >= ${@lease_execution_date_from}"
/>
<bm:query-field
name=
"lease_execution_date_to"
queryexpression=
"to_char(t1.lease_execution_date,'YYYY-MM-DD') <= ${@lease_execution_date_to}"
/>
<bm:query-field
name=
"req_employee_n"
datatype=
"java.lang.String"
queryexpression=
"t1.req_employee_n like '%' || ${@req_employee_n} || '%'"
/>
<bm:query-field
name=
"req_status"
queryExpression=
"t1.req_status = ${@req_status}"
/>
</bm:query-fields>
<!-- <bm:features>-->
<!-- EXISTS-->
<!-- (SELECT-->
<!-- 1-->
<!-- FROM-->
<!-- sys_user u-->
<!-- WHERE-->
<!-- u.bp_category = 'AGENT' AND-->
<!-- u.user_id =${/session/@user_id}-->
<!-- ) AND-->
<!-- AND t.owner_user_id = ${/session/@user_id}-->
<!-- <s:bm-script><![CDATA[-->
<!-- var cx = Packages.leaf.javascript.Context.getCurrentContext();-->
<!-- Packages.leaf.plugin.script.engine.ScriptImportor.defineExternScript(cx, this, $ctx.getData(), "aut_authority_bm_validate.js");-->
<!-- ]]></s:bm-script>-->
<!-- </bm:features>-->
</bm:model>
src/main/webapp/modules/cont/CON_ET001/con_early_termination_et_detail.lview
0 → 100644
View file @
9472f8ef
<?xml version="1.0" encoding="UTF-8"?>
<!--
2019-9-6 Spencer 3893 合同提前结清申请创建明细
-->
<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_repo_detail_get_layout_code_link_id"
model=
"cont.CON500.con_contract_get_layout_code"
modelaction=
"update"
/>
<a:link
id=
"con_et002_submit_link"
model=
""
modelaction=
"execute"
/>
<a:link
id=
"con_et002_cancel_link"
model=
"cont.CON731.cancel_change_req"
modelaction=
"execute"
/>
<a:link
id=
"con_et001_calc_cashflow_link"
model=
"cont.CON_ET001.calc_cashflow"
modelaction=
"execute"
/>
<a:link
id=
"con_et001_calc_et_date_amount_link"
model=
"cont.CON_ET001.calc_et_date_amount"
modelaction=
"execute"
/>
<script
type=
"text/javascript"
>
<![CDATA[
Leaf.onReady(function() {
var ds_us_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'],'F_BASE_03', 'hls_document_use_seal');
if ($(ds_us_id)) {
$(ds_us_id).setQueryParameter('document_table','CON_CONTRACT');
$(ds_us_id).setQueryParameter('document_id','${/parameter/@contract_id}');
$(ds_us_id).query();
}
});
//新增和加载时调用form
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_form_add_and_load'] = function(ds, record, config_records, bp_seq) {
};
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_update'] = function(ds, record, name, value, old_value, bp_seq) {
var ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'],'F_BASE_01', 'con_contract_change_req');
if (ds == $(ds_id)) {
if (name == 'termination_date') {
// 根据结清日计算结清相关金额字段
Leaf.request({
url: $('con_et001_calc_et_date_amount_link').getUrl(),
para: {
contract_id: record.get('contract_id'),
termination_date: value,
et_fee:record.get('et_fee'),
et_interest_rate:record.get('et_interest_rate')
},
success: function (res) {
record.set('et_fee', res.result.et_fee);
record.set('et_total_amount', res.result.et_total_amount);
record.set('et_due_amount', res.result.et_due_amount);
record.set('overdue_amount', res.result.overdue_amount);
record.set('penalty', res.result.penalty);
record.set('fund_possession_time', res.result.fund_possession_time);
record.set('fund_possession_cost', res.result.fund_possession_cost);
record.set('sum_unreceived_principal', res.result.sum_unreceived_principal);
},
failure: function () {
},
error: function () {
},
scope: this
});
}
}
};
window['${/parameter/@layout_code}_submit_approval_layout_dynamic_click'] = function() {
var req_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'F_BASE_01', 'con_contract_change_req');
var req_record = $(req_ds_id).getAt(0);
var case_type = '';
var document_type = '${/parameter/@document_type}';
var calc_session_id = req_record.get('calc_session_id');
window['${/parameter/@bp_seq}${/parameter/@layout_code}_lock_layout_dynamic_window']();
if ($(req_ds_id).validate()) {
if (req_record.dirty) {
Leaf.showMessage('${l:HLS.PROMPT}', '${l:HLS.EXECUTE_AFTER_SAVE}');
window['${/parameter/@bp_seq}${/parameter/@layout_code}_unlock_layout_dynamic_window']();
return;
}
setTimeout(window['${/parameter/@layout_code}_SAVE_LAYOUT_DYNAMIC_CLICK'](con_repo001_submit), 2000);
} else {
window['${/parameter/@bp_seq}${/parameter/@layout_code}_unlock_layout_dynamic_window']();
}
};
function con_repo001_submit() {
var req_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'F_BASE_01', 'con_contract_change_req');
var req_record = $(req_ds_id).getAt(0);
window['${/parameter/@bp_seq}${/parameter/@layout_code}_lock_layout_dynamic_window']();
Leaf.request({
url: $('con_et002_submit_link').getUrl(),
para: {
change_req_id: ${/parameter/@change_req_id},
layout_code: '${/parameter/@layout_code}'
},
success: function(res) {
$('${/parameter/@winid}').close();
window['${/parameter/@bp_seq}${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
failure: function() {
window['${/parameter/@bp_seq}${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
error: function() {
window['${/parameter/@bp_seq}${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
scope: this
});
}
//保存submitsuccess调用
window['${/parameter/@layout_code}_on_layout_dynamic_submitsuccess'] = function(ds, record, res, bp_seq) {
var ca_ds_id_s = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'],'G_QUOTATION_03', 'con_contract_cashflow');
if (ca_ds_id_s) {
$(ca_ds_id_s).query();
}
var ca_ds_id_c = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'],'G_QUOTATION_04', 'con_contract_cashflow');
if (ca_ds_id_c) {
$(ca_ds_id_c).query();
}
};
//报价计算
window['${/parameter/@layout_code}_user_button1_layout_dynamic_click'] = function() {
$('${/parameter/@layout_code}_user_button1').disable(); //按钮不可用
window['${/parameter/@bp_seq}${/parameter/@layout_code}_lock_layout_dynamic_window']();
var con_contract_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'],'F_BASE_01', 'con_contract_change_req');
var con_record = $(con_contract_ds_id).getAt(0);
if ($(con_contract_ds_id).validate()) {
// if (con_record.dirty) {
// Leaf.showMessage('${l:HLS.PROMPT}', '${l:HLS.EXECUTE_AFTER_SAVE}');
// window['${/parameter/@bp_seq}${/parameter/@layout_code}_unlock_layout_dynamic_window']();
// return;
// }
setTimeout(window['${/parameter/@layout_code}_SAVE_LAYOUT_DYNAMIC_CLICK'](clac), 2000);
} else {
window['${/parameter/@bp_seq}${/parameter/@layout_code}_unlock_layout_dynamic_window']();
$('${/parameter/@layout_code}_user_button1').enable(); //按钮启用
}
};
function clac(){
Leaf.request({
url: $('con_et001_calc_cashflow_link').getUrl(),
para: {
contract_id: '${/parameter/@contract_id}',
},
success: function(res) {
Leaf.SideBar.enable = true;
Leaf.SideBar.show({msg: '计算成功!',duration: 2000});
//con_record.getField('ccr_start_times').setReadOnly(true);
var ca_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'],'G_QUOTATION_04', 'con_contract_cashflow');
if (ca_ds_id) {
$(ca_ds_id).query();
}
window['${/parameter/@bp_seq}${/parameter/@layout_code}_unlock_layout_dynamic_window']();
$('${/parameter/@layout_code}_user_button1').enable(); //按钮启用
},
failure: function() {
window['${/parameter/@bp_seq}${/parameter/@layout_code}_unlock_layout_dynamic_window']();
$('${/parameter/@layout_code}_user_button1').enable(); //按钮启用
},
error: function() {
window['${/parameter/@bp_seq}${/parameter/@layout_code}_unlock_layout_dynamic_window']();
$('${/parameter/@layout_code}_user_button1').enable(); //按钮启用
},
scope: this
});
}
//生成文本
window['${/parameter/@layout_code}_user_button2_layout_dynamic_click'] = function() {
//$('${/parameter/@layout_code}_user_button2').disable(); //按钮不可用
//$('${/parameter/@layout_code}_user_button2').enable(); //按钮启用
};
//取消变更
window['${/parameter/@layout_code}_user_button3_layout_dynamic_click'] = function() {
$('${/parameter/@layout_code}_user_button3').disable(); //按钮不可用
Leaf.showConfirm('${l:HLS.PROMPT}', '是否确认取消变更?', function() {
window['${/parameter/@bp_seq}${/parameter/@layout_code}_lock_layout_dynamic_window']();
Leaf.request({
url: $('con_et002_cancel_link').getUrl(),
para: {
change_req_id: ${/parameter/@change_req_id}
},
success: function(res) {
$('${/parameter/@layout_code}_user_button3').enable(); //按钮启用
window['${/parameter/@bp_seq}${/parameter/@layout_code}_unlock_layout_dynamic_window']();
$('${/parameter/@winid}').close();
},
failure: function() {
$('${/parameter/@layout_code}_user_button3').enable(); //按钮启用
window['${/parameter/@bp_seq}${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
error: function() {
$('${/parameter/@layout_code}_user_button3').enable(); //按钮启用
window['${/parameter/@bp_seq}${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
scope: this
});
});
};
window['${/parameter/@layout_code}_on_layout_dynamic_grid_load'] = function (ds, qpara, bp_seq) {
};
]]>
</script>
<a:screen-include
screen=
"modules/cont/CON500/con_contract_get_layout_code.lview"
/>
</a:view>
</a:screen>
\ No newline at end of file
src/main/webapp/modules/cont/CON_ET001/con_early_termination_query.lview
0 → 100644
View file @
9472f8ef
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: Spencer 3893
$Date: 2019-9-19
$Revision: 1.0
$Purpose: 提前结清创建入口
-->
<a:screen
xmlns:a=
"http://www.leaf-framework.org/application"
trace=
"true"
>
<a:init-procedure>
<a:model-query
fetchAll=
"true"
model=
"basic.hls_division_for_lov"
rootPath=
"hls_division_path"
/>
</a:init-procedure>
<a:view>
<a:link
id=
"con_et_get_layout_code_link_id"
model=
"cont.CON500.con_contract_get_layout_code"
modelaction=
"update"
/>
<a:link
id=
"con_et_change_link"
url=
"${/request/@context_path}/modules/cont/CON_ET001/con_early_termination_et_detail.lview"
/>
<a:link
id=
"con_et_create_change_link"
model=
"cont.CON_ET001.create_change_req"
modelaction=
"execute"
/>
<script
type=
"text/javascript"
>
<![CDATA[
function contractQueryScreen_query() {
$('contractQueryScreen_mainDs').query();
}
function contractQueryScreen_reset() {
$('contractQueryScreen_paraDs').reset();
}
function contractQueryScreen_add() {
$('et_create').disable(); //按钮不可用
var records = $('contractQueryScreen_mainDs').getSelected();
var record = records[0],
contract_id = record.get('contract_id');
Leaf.showConfirm('特别注意', '<span style="color: #ff0000; ">
该操作将导致合同在回购期间无法进行后续操作,请谨慎操作!!!如果需要取消提前结清,请一定点击取消按钮!!!
</span>
', function () {
var ccr_document_type = 'ET';
Leaf.Masker.mask(Ext.getBody());
Leaf.request({
url: $('con_et_create_change_link').getUrl(),
para: {
simulation_flag: 'N',
contract_id: contract_id,
req_type: ccr_document_type
},
success: function (res) {
$('et_create').enable(); //按钮启用
var param = record.data;
param['change_req_id'] = res.result.change_req_id;
param['contract_id'] = res.result.change_req_id;
param['source_contract_id'] = contract_id;
//param['layout_debugger_flag'] = 'Y';
param['function_code'] = 'CON_ET002';
param['url_title'] = '提前结清创建';
param['function_usage'] = 'MODIFY';
param['maintain_type'] = 'UPDATE';
param['document_type'] = ccr_document_type;
param['winid'] = 'con_et002_detail_winid';
hls_doc_get_layout_code('con_et_get_layout_code_link_id', param, 'con_et_change_link', 'contractQueryScreen_mainDs');
},
failure: function () {
Leaf.Masker.unmask(Ext.getBody());
$('et_create').enable(); //按钮启用
},
error: function () {
Leaf.Masker.unmask(Ext.getBody());
$('et_create').enable(); //按钮启用
},
scope: this
});
}, function () {
$('et_create').enable(); //按钮启用
}, 300, 150);
}
]]>
</script>
<a:screen-include
screen=
"modules/cont/CON500/con_contract_authority_list_validate.lview?document_category=CONTRACT&function_code=CON_ET001"
/>
<a:dataSets>
<a:dataSet
id=
"yes_or_no_ds"
lookupCode=
"YES_NO"
/>
<a:dataSet
id=
"contract_status_ds"
lookupCode=
"CON500_CONTRACT_STATUS"
/>
<a:dataSet
id=
"hls_division_ds"
>
<a:datas
dataSource=
"/model/hls_division_path"
/>
</a:dataSet>
<a:dataSet
id=
"contractQueryScreen_paraDs"
>
<a:fields>
<a:field
name=
"contract_number"
typeCase=
"upper"
/>
<a:field
name=
"contract_name"
/>
<a:field
name=
"date_from"
/>
<a:field
name=
"date_to"
/>
<a:field
name=
"bp_id_tenant"
/>
<a:field
name=
"bp_name"
lovGridHeight=
"330"
lovHeight=
"470"
lovLabelWidth=
"120"
lovService=
"cont.CON701.hls_bp_master_v_all_lov?bp_category=TENANT"
lovWidth=
"700"
title=
"承租人"
>
<a:mapping>
<a:map
from=
"bp_id"
to=
"bp_id_tenant"
/>
<a:map
from=
"bp_name"
to=
"bp_name"
/>
</a:mapping>
</a:field>
<!--代理商-->
<a:field
name=
"bp_id_agent_level1"
/>
<a:field
name=
"bp_agent"
lovGridHeight=
"330"
lovHeight=
"470"
lovLabelWidth=
"120"
lovService=
"cont.CON701.hls_bp_master_v_all_lov?bp_category=AGENT"
lovWidth=
"700"
title=
"代理商"
>
<a:mapping>
<a:map
from=
"bp_id"
to=
"bp_id_agent_level1"
/>
<a:map
from=
"bp_name"
to=
"bp_agent"
/>
</a:mapping>
</a:field>
<!--产品线-->
<a:field
name=
"division_n"
displayField=
"description"
options=
"hls_division_ds"
returnField=
"division"
valueField=
"division"
/>
<a:field
name=
"overdue_status"
/>
<a:field
name=
"overdue_status_desc"
displayField=
"code_value_name"
options=
"yes_or_no_ds"
returnField=
"overdue_status"
valueField=
"code_value"
/>
<a:field
name=
"contract_status"
/>
<a:field
name=
"contract_status_desc"
displayField=
"code_value_name"
options=
"contract_status_ds"
returnField=
"contract_status"
valueField=
"code_value"
/>
</a:fields>
</a:dataSet>
<a:dataSet
id=
"contractQueryScreen_mainDs"
autoQuery=
"true"
fetchAll=
"false"
model=
"cont.CON_ET001.con_early_termination_query"
pageSize=
"14"
queryDataSet=
"contractQueryScreen_paraDs"
selectable=
"true"
selectionModel=
"single"
>
<a:fields>
<a:field
name=
"et_type_dis"
autoComplete=
"true"
lovGridHeight=
"300"
lovHeight=
"450"
lovService=
"cont.CON701.hls_document_type_for_et_lov"
lovWidth=
"500"
prompt=
"提前结清类型"
readOnly=
"true"
required=
"true"
>
<a:mapping>
<a:map
from=
"document_type"
to=
"et_type"
/>
<a:map
from=
"document_type_desc"
to=
"et_type_dis"
/>
</a:mapping>
</a:field>
<a:field
name=
"termination_date"
datatype=
"date"
required=
"true"
/>
<a:field
name=
"overdue_status"
checkedValue=
"Y"
uncheckedValue=
"N"
/>
<a:field
name=
"trial"
checkedValue=
"Y"
uncheckedValue=
"N"
/>
<a:field
name=
"lease_execution_date"
datatype=
"date"
/>
</a:fields>
<a:events>
<a:event
name=
"query"
handler=
"aut_authority_list_validate_query"
/>
</a:events>
</a:dataSet>
</a:dataSets>
<a:screenBody>
<a:screenTopToolbar>
<a:screenTitle/>
<a:gridButton
click=
"contractQueryScreen_query"
text=
"HLS.QUERY"
/>
<a:gridButton
click=
"contractQueryScreen_reset"
text=
"HLS.RESET"
/>
<a:gridButton
id=
"et_create"
click=
"contractQueryScreen_add"
text=
"HLS.CREATE"
/>
</a:screenTopToolbar>
<a:form
column=
"4"
labelWidth=
"100"
marginWidth=
"40"
title=
"HLS.QUERY_TITLE"
>
<a:textField
name=
"contract_number"
bindTarget=
"contractQueryScreen_paraDs"
prompt=
"合同编号"
/>
<a:textField
name=
"contract_name"
bindTarget=
"contractQueryScreen_paraDs"
prompt=
"合同名称"
/>
<a:lov
name=
"bp_name"
bindTarget=
"contractQueryScreen_paraDs"
prompt=
"承租人名称"
/>
<a:lov
name=
"bp_agent"
bindTarget=
"contractQueryScreen_paraDs"
prompt=
"代理店"
/>
<a:comboBox
name=
"division_n"
bindTarget=
"contractQueryScreen_paraDs"
prompt=
"产品线"
/>
<!-- <a:textField name="received_times" bindTarget="contractQueryScreen_paraDs" prompt="已还款期数"/>-->
<!-- <a:comboBox name="contract_status_desc" bindTarget="contractQueryScreen_paraDs" prompt="合同状态"/>-->
<a:comboBox
name=
"overdue_status_desc"
bindTarget=
"contractQueryScreen_paraDs"
prompt=
"是否逾期"
/>
</a:form>
<a:grid
id=
"contractQueryScreen_mainDs_grid"
bindTarget=
"contractQueryScreen_mainDs"
marginHeight=
"230"
marginWidth=
"40"
navBar=
"true"
>
<a:columns>
<a:column
name=
"contract_number"
prompt=
"合同编号"
width=
"120"
align=
"left"
/>
<a:column
name=
"contract_name"
prompt=
"合同名称"
width=
"120"
align=
"left"
/>
<a:column
name=
"bp_name"
prompt=
"承租人名称"
width=
"200"
align=
"left"
/>
<a:column
name=
"bp_agent"
prompt=
"代理店"
width=
"200"
align=
"left"
/>
<a:column
name=
"division_n"
prompt=
"产品线"
width=
"120"
align=
"left"
/>
<a:column
name=
"received_times"
prompt=
"已还款期数"
width=
"80"
align=
"right"
/>
<a:column
name=
"status_desc"
prompt=
"合同状态"
width=
"120"
align=
"center"
/>
<a:column
name=
"overdue_status"
prompt=
"是否逾期"
width=
"100"
align=
"center"
/>
</a:columns>
</a:grid>
</a:screenBody>
<a:screen-include
screen=
"modules/cont/CON500/con_contract_get_layout_code.lview"
/>
</a:view>
</a:screen>
src/main/webapp/modules/cont/CON_ET003/con_early_termination_modify_query.lview
0 → 100644
View file @
9472f8ef
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: Spencer 3893
$Date: 2019-9-19
$Revision: 1.0
$Purpose: 提前结清维护入口
-->
<a:screen
xmlns:a=
"http://www.leaf-framework.org/application"
trace=
"true"
>
<a:init-procedure>
<a:model-query
fetchAll=
"true"
model=
"basic.hls_division_for_lov"
rootPath=
"hls_division_path"
/>
</a:init-procedure>
<a:view>
<a:link
id=
"con_et_get_layout_code_link_id"
model=
"cont.CON500.con_contract_get_layout_code"
modelaction=
"update"
/>
<a:link
id=
"con_et_change_link"
url=
"${/request/@context_path}/modules/cont/CON_ET001/con_early_termination_et_detail.lview"
/>
<a:link
id=
"con_et_create_change_link"
model=
"cont.CON_ET001.create_change_req"
modelaction=
"execute"
/>
<script
type=
"text/javascript"
>
<![CDATA[
function contractQueryScreen_query() {
$('contractQueryScreen_mainDs').query();
}
function contractQueryScreen_reset() {
$('contractQueryScreen_paraDs').reset();
}
function open_change_req(value,record,name){debugger
if(name=='change_req_number'){
var req_status = record.get('req_status');
var change_req_id = record.get('change_req_id');
var contract_id=record.get('contract_id');
if('NEW' == req_status || 'REJECT' == req_status){
return '<a href="javascript:open_change_req_detail(' + change_req_id + ',' + contract_id + ')">
'+value+'
</a>
';
}else{
return '
<a
href=
"javascript:open_change_req_readonly_detail(' + change_req_id + ',' + contract_id + ')"
>
'+value+'
</a>
';
}
}
return value;
}
function open_change_req_detail(change_req_id,contract_id) {debugger
var param = {};
param['change_req_id'] = change_req_id;
param['contract_id'] = change_req_id;
param['source_contract_id'] = contract_id;
//param['layout_debugger_flag'] = 'Y';
param['function_code'] = 'CON_ET002';
param['url_title'] = '提前结清维护';
param['function_usage'] = 'MODIFY';
param['maintain_type'] = 'UPDATE';
param['document_type'] = 'ET';
param['winid'] = 'con_et003_detail_winid';
hls_doc_get_layout_code('con_et_get_layout_code_link_id', param, 'con_et_change_link', 'contractQueryScreen_mainDs');
}
function open_change_req_readonly_detail(change_req_id,contract_id) {
var param = {};
param['change_req_id'] = change_req_id;
param['contract_id'] = change_req_id;
param['source_contract_id'] = contract_id;
//param['layout_debugger_flag'] = 'Y';
param['function_code'] = 'CON_ET002';
param['url_title'] = '提前结清明细';
param['function_usage'] = 'READONLY';
param['maintain_type'] = 'QUERY';
param['document_type'] = 'ET';
param['winid'] = 'con_et003_detail_winid';
hls_doc_get_layout_code('con_et_get_layout_code_link_id', param, 'con_et_change_link', 'contractQueryScreen_mainDs');
}
]]>
</script>
<a:screen-include
screen=
"modules/cont/CON500/con_contract_authority_list_validate.lview?document_category=CONTRACT&function_code=CON_ET001"
/>
<a:dataSets>
<a:dataSet
id=
"yes_or_no_ds"
lookupCode=
"YES_NO"
/>
<a:dataSet
id=
"contract_status_ds"
lookupCode=
"CON500_CONTRACT_STATUS"
/>
<a:dataSet
id=
"contract_chage_req_status_ds"
lookupCode=
"CON_CHANGE_REQ_STATUS"
/>
<a:dataSet
id=
"hls_division_ds"
>
<a:datas
dataSource=
"/model/hls_division_path"
/>
</a:dataSet>
<a:dataSet
id=
"contractQueryScreen_paraDs"
>
<a:fields>
<a:field
name=
"contract_number"
typeCase=
"upper"
/>
<a:field
name=
"contract_name"
/>
<a:field
name=
"date_from"
/>
<a:field
name=
"date_to"
/>
<a:field
name=
"bp_id_tenant"
/>
<a:field
name=
"bp_name"
lovGridHeight=
"330"
lovHeight=
"470"
lovLabelWidth=
"120"
lovService=
"cont.CON701.hls_bp_master_v_all_lov?bp_category=TENANT"
lovWidth=
"700"
title=
"承租人"
>
<a:mapping>
<a:map
from=
"bp_id"
to=
"bp_id_tenant"
/>
<a:map
from=
"bp_name"
to=
"bp_name"
/>
</a:mapping>
</a:field>
<!--代理商-->
<a:field
name=
"bp_id_agent_level1"
/>
<a:field
name=
"bp_agent"
lovGridHeight=
"330"
lovHeight=
"470"
lovLabelWidth=
"120"
lovService=
"cont.CON701.hls_bp_master_v_all_lov?bp_category=AGENT"
lovWidth=
"700"
title=
"代理商"
>
<a:mapping>
<a:map
from=
"bp_id"
to=
"bp_id_agent_level1"
/>
<a:map
from=
"bp_name"
to=
"bp_agent"
/>
</a:mapping>
</a:field>
<!--产品线-->
<a:field
name=
"division_n"
displayField=
"description"
options=
"hls_division_ds"
returnField=
"division"
valueField=
"division"
/>
<a:field
name=
"contract_status"
/>
<a:field
name=
"contract_status_desc"
displayField=
"code_value_name"
options=
"contract_status_ds"
returnField=
"contract_status"
valueField=
"code_value"
/>
<a:field
name=
"req_employee_n"
/>
<a:field
name=
"req_status"
/>
<a:field
name=
"req_status_n"
displayField=
"code_value_name"
options=
"contract_chage_req_status_ds"
returnField=
"contract_status"
valueField=
"code_value"
/>
</a:fields>
</a:dataSet>
<a:dataSet
id=
"contractQueryScreen_mainDs"
autoQuery=
"true"
fetchAll=
"false"
model=
"cont.CON_ET003.con_early_termination_modify_query"
pageSize=
"14"
queryDataSet=
"contractQueryScreen_paraDs"
selectable=
"true"
selectionModel=
"single"
>
<a:fields>
<a:field
name=
"et_type_dis"
autoComplete=
"true"
lovGridHeight=
"300"
lovHeight=
"450"
lovService=
"cont.CON701.hls_document_type_for_et_lov"
lovWidth=
"500"
prompt=
"提前结清类型"
readOnly=
"true"
required=
"true"
>
<a:mapping>
<a:map
from=
"document_type"
to=
"et_type"
/>
<a:map
from=
"document_type_desc"
to=
"et_type_dis"
/>
</a:mapping>
</a:field>
<a:field
name=
"termination_date"
datatype=
"date"
required=
"true"
/>
<a:field
name=
"overdue_status"
checkedValue=
"Y"
uncheckedValue=
"N"
/>
<a:field
name=
"trial"
checkedValue=
"Y"
uncheckedValue=
"N"
/>
<a:field
name=
"lease_execution_date"
datatype=
"date"
/>
</a:fields>
<a:events>
<a:event
name=
"query"
handler=
"aut_authority_list_validate_query"
/>
</a:events>
</a:dataSet>
</a:dataSets>
<a:screenBody>
<a:screenTopToolbar>
<a:screenTitle/>
<a:gridButton
click=
"contractQueryScreen_query"
text=
"HLS.QUERY"
/>
<a:gridButton
click=
"contractQueryScreen_reset"
text=
"HLS.RESET"
/>
</a:screenTopToolbar>
<a:form
column=
"4"
labelWidth=
"100"
marginWidth=
"40"
title=
"HLS.QUERY_TITLE"
>
<a:textField
name=
"change_req_number"
bindTarget=
"contractQueryScreen_paraDs"
prompt=
"合同变更编号"
/>
<a:textField
name=
"contract_number"
bindTarget=
"contractQueryScreen_paraDs"
prompt=
"合同编号"
/>
<a:textField
name=
"contract_name"
bindTarget=
"contractQueryScreen_paraDs"
prompt=
"合同名称"
/>
<a:lov
name=
"bp_name"
bindTarget=
"contractQueryScreen_paraDs"
prompt=
"承租人名称"
/>
<a:lov
name=
"bp_agent"
bindTarget=
"contractQueryScreen_paraDs"
prompt=
"代理店"
/>
<a:comboBox
name=
"division_n"
bindTarget=
"contractQueryScreen_paraDs"
prompt=
"产品线"
/>
<a:textField
name=
"req_employee_n"
bindTarget=
"contractQueryScreen_paraDs"
prompt=
"申请人"
/>
<a:comboBox
name=
"req_status_n"
bindTarget=
"contractQueryScreen_paraDs"
prompt=
"变更审批状态"
/>
</a:form>
<a:grid
id=
"contractQueryScreen_mainDs_grid"
bindTarget=
"contractQueryScreen_mainDs"
marginHeight=
"230"
marginWidth=
"40"
navBar=
"true"
>
<a:columns>
<a:column
name=
"change_req_number"
prompt=
"合同变更编号"
width=
"120"
align=
"left"
renderer=
"open_change_req"
/>
<a:column
name=
"contract_number"
prompt=
"合同编号"
width=
"120"
align=
"left"
/>
<a:column
name=
"contract_name"
prompt=
"合同名称"
width=
"120"
align=
"left"
/>
<a:column
name=
"bp_name"
prompt=
"承租人名称"
width=
"200"
align=
"left"
/>
<a:column
name=
"bp_agent"
prompt=
"代理店"
width=
"200"
align=
"left"
/>
<a:column
name=
"division_n"
prompt=
"产品线"
width=
"120"
align=
"left"
/>
<a:column
name=
"req_employee_n"
prompt=
"申请人"
width=
"80"
align=
"right"
/>
<a:column
name=
"req_status_n"
prompt=
"变更审批状态"
width=
"100"
align=
"center"
/>
</a:columns>
</a:grid>
</a:screenBody>
<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