Commit 9c59f5ea authored by Spencer Chang's avatar Spencer Chang

[feat] 合同变更功能二開

parent 6a9c2afa
...@@ -18,4 +18,37 @@ VALUES ...@@ -18,4 +18,37 @@ VALUES
LAST_UPDATE_DATE, LAST_UPDATE_DATE,
LAST_UPDATED_BY) LAST_UPDATED_BY)
VALUES VALUES
('CON_ET002', '提前结清申请明细', 1, SYSDATE, -1, SYSDATE, -1); ('CON_ET002', '提前结清申请明细', 1, SYSDATE, -1, SYSDATE, -1);
\ No newline at end of file
INSERT INTO SYS_FUNCTION_DYNAMIC
(FUNCTION_CODE,
FUNCTION_NAME,
SEQUENCE,
CREATION_DATE,
CREATED_BY,
LAST_UPDATE_DATE,
LAST_UPDATED_BY)
VALUES
('CON733CF', '合同租金计划变更申请明细', 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
('CON733BPT', '合同承租人变更申请明细', 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
('CON733BPB', '合同回款账户变更申请明细', 1, SYSDATE, -1, SYSDATE, -1);
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
WHENEVER SQLERROR EXIT FAILURE ROLLBACK;
WHENEVER OSERROR EXIT FAILURE ROLLBACK;
spool REGISTER_CON_ET001.log
set feedback off
set define off
begin
--分配bm
sys_function_assign_pkg.func_bm_load('CON733','cont.CON733.create_change_req');
sys_function_assign_pkg.func_bm_load('CON733','cont.CON733.calc_change_req');
sys_function_assign_pkg.func_bm_load('CON733','cont.CON733.calc_tenant_change_req');
end;
/
commit;
set feedback on
set define on
spool off
exit
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
CREATE OR REPLACE VIEW CON_CONTRACT_CHANGE_REQ_LV AS CREATE OR REPLACE VIEW CON_CONTRACT_CHANGE_REQ_LV AS
select t.change_req_id, select t.change_req_id,
t.batch_id, t.batch_id,
t.change_quotation, t.change_quotation,
...@@ -66,13 +66,13 @@ select t.change_req_id, ...@@ -66,13 +66,13 @@ select t.change_req_id,
nvl(t.et_fee,500) et_fee, nvl(t.et_fee,500) et_fee,
nvl(t.et_total_amount,0) et_total_amount, nvl(t.et_total_amount,0) et_total_amount,
nvl(t.et_interest,0) et_interest, nvl(t.et_interest,0) et_interest,
--提前结清 start --提前结清 start
nvl(t.FUND_POSSESSION_TIME,0)FUND_POSSESSION_TIME,--资金占用天数 nvl(t.FUND_POSSESSION_TIME,0)FUND_POSSESSION_TIME,--资金占用天数
NVL(t.FUND_POSSESSION_COST,0)FUND_POSSESSION_COST,--资金占用费 NVL(t.FUND_POSSESSION_COST,0)FUND_POSSESSION_COST,--资金占用费
NVL(t.FUND_POSSESSION_RATE,0)FUND_POSSESSION_RATE,--资金占用费利率 NVL(t.FUND_POSSESSION_RATE,0)FUND_POSSESSION_RATE,--资金占用费利率
NVL(t.ET_DUE_AMOUNT,0)ET_DUE_AMOUNT,--提前结清租金 NVL(t.ET_DUE_AMOUNT,0)ET_DUE_AMOUNT,--提前结清租金
NVL(t.SUM_UNRECEIVED_PRINCIPAL,0)SUM_UNRECEIVED_PRINCIPAL,--剩余本金 NVL(t.SUM_UNRECEIVED_PRINCIPAL,0)SUM_UNRECEIVED_PRINCIPAL,--剩余本金
NVL(t.ET_INTEREST_RATE,cc.int_rate_display)ET_INTEREST_RATE,--提前结清利率 NVL(t.ET_INTEREST_RATE,cc.int_rate_display)ET_INTEREST_RATE,--提前结清利率
cc.bp_id_agent_level1, cc.bp_id_agent_level1,
(SELECT m.bp_name (SELECT m.bp_name
FROM hls_bp_master m FROM hls_bp_master m
...@@ -80,8 +80,9 @@ select t.change_req_id, ...@@ -80,8 +80,9 @@ select t.change_req_id,
AS bp_id_agent_level1_n, AS bp_id_agent_level1_n,
nvl(t.residual_value,cc.residual_value)residual_value, nvl(t.residual_value,cc.residual_value)residual_value,
t.ccr_reason t.ccr_reason
--提前结清 end --提前结清 end
from con_contract_change_req t, from con_contract_change_req t,
con_contract cc con_contract cc
where t.contract_id = cc.contract_id where cc.contract_id = t.change_req_id
AND cc.data_class = 'CHANGE_REQ'
; ;
<?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="calc_session_id" dataType="java.lang.Long" input="false" output="true"/>
<bm:parameter name="calc_successful" dataType="java.lang.String" input="false" output="true"/>
<bm:parameter name="warning_message" dataType="java.lang.String" input="false" output="true"/>
</bm:parameters>
<bm:update-sql><![CDATA[
begin
cus_con_change_req_pkg.CALC_CHANGE_REQ
(
p_change_req_id=>${@change_req_id},
p_ccr_start_times =>${@ccr_start_times},
p_ccr_outstanding_times =>${@ccr_outstanding_times},
p_calc_session_id=>${@calc_session_id},
p_calc_successful=>${@calc_successful},
p_warning_message=>${@warning_message},
p_user_id=>${/session/@user_id}
);
end;]]></bm:update-sql>
</bm:operation>
</bm:operations>
</bm:model>
<?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="ccr_lease_rental" dataType="java.lang.Double" input="false" output="true" outputPath="@ccr_lease_rental"/>
<bm:parameter name="ccr_lease_principal" dataType="java.lang.Double" input="false" output="true" outputPath="@ccr_lease_principal"/>
<bm:parameter name="ccr_lease_interest" dataType="java.lang.Double" input="false" output="true" outputPath="@ccr_lease_interest"/>
<bm:parameter name="ccr_lease_penalty" dataType="java.lang.Double" input="false" output="true" outputPath="@ccr_lease_penalty"/>
</bm:parameters>
<bm:update-sql><![CDATA[
begin
cus_con_change_req_pkg.calc_tenant_change_req(p_change_req_id =>${@change_req_id},
p_ccr_lease_date =>to_date(${@ccr_lease_date},'yyyy-mm-dd'),
p_ccr_lease_rental =>${@ccr_lease_rental},
p_ccr_lease_principal =>${@ccr_lease_principal},
p_ccr_lease_interest =>${@ccr_lease_interest},
p_ccr_lease_penalty =>${@ccr_lease_penalty},
p_user_id =>${/session/@user_id}
);
end;]]></bm:update-sql>
</bm:operation>
</bm:operations>
</bm:model>
<?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"/>
</bm:parameters>
<bm:update-sql><![CDATA[
DECLARE
v_change_req_id NUMBER;
BEGIN
cus_con_change_req_pkg.create_change_req(p_contract_id=>${@contract_id},
p_req_date=>to_date(${@req_date},'YYYY-MM-DD'),
p_req_type=>${@req_type},
p_description=>${@description},
p_user_id=>${/session/@user_id},
p_simulation_flag=>${@simulation_flag},
p_ref_v01=>${@ref_v01},
p_change_req_id=>v_change_req_id );
${@change_req_id}:=v_change_req_id;
END;
]]>
</bm:update-sql>
</bm:operation>
</bm:operations>
</bm:model>
...@@ -6,6 +6,9 @@ var override_queryfields = [ ...@@ -6,6 +6,9 @@ var override_queryfields = [
{ {
name : 'bp_name', name : 'bp_name',
queryexpression : "exists (select 1 from hls_bp_master hr where hr.bp_id=t1.bp_id_tenant and hr.bp_name like ${@bp_name})" queryexpression : "exists (select 1 from hls_bp_master hr where hr.bp_id=t1.bp_id_tenant and hr.bp_name like ${@bp_name})"
},{
name : 'bp_id_agent_level1_n',
queryexpression : "exists (select 1 from hls_bp_master hr where hr.bp_id=t1.bp_id_agent_level1 and hr.bp_name like ${@bp_id_agent_level1_n})"
}, },
{ {
name : 'lease_start_date_from', name : 'lease_start_date_from',
...@@ -14,6 +17,14 @@ var override_queryfields = [ ...@@ -14,6 +17,14 @@ var override_queryfields = [
{ {
name : 'lease_start_date_to', name : 'lease_start_date_to',
queryexpression : "t1.lease_start_date between nvl(to_date(${@lease_start_date_from},'yyyy-mm-dd'),t1.lease_start_date) and to_date(${@lease_start_date_to},'yyyy-mm-dd')" queryexpression : "t1.lease_start_date between nvl(to_date(${@lease_start_date_from},'yyyy-mm-dd'),t1.lease_start_date) and to_date(${@lease_start_date_to},'yyyy-mm-dd')"
},
{
name : 'inception_of_lease_from',
queryexpression : "t1.inception_of_lease between to_date(${@inception_of_lease_from},'yyyy-mm-dd') and nvl(to_date(${@inception_of_lease_to},'yyyy-mm-dd'),t1.inception_of_lease)"
},
{
name : 'inception_of_lease_to',
queryexpression : "t1.inception_of_lease between nvl(to_date(${@inception_of_lease_from},'yyyy-mm-dd'),t1.inception_of_lease) and to_date(${@inception_of_lease_to},'yyyy-mm-dd')"
}, { }, {
field : 'project_id', field : 'project_id',
queryoperator : "=" queryoperator : "="
......
...@@ -85,36 +85,27 @@ ...@@ -85,36 +85,27 @@
var param = record.data; var param = record.data;
var req_status = record.get('req_status'); var req_status = record.get('req_status');
param['change_req_id'] = record.get('contract_id'); param['change_req_id'] = record.get('contract_id');
param['source_contract_id'] = record.get('source_contract_id');//變更前源合同id
param['contract_id'] = record.get('contract_id'); param['contract_id'] = record.get('contract_id');
param['function_code'] = 'CON732D';
param['function_usage'] = 'MODIFY';
param['req_status'] = req_status; param['req_status'] = req_status;
if (req_status == 'APPROVED' || req_status == 'APPROVING' || req_status == 'CANCEL') { if (req_status == 'APPROVED' || req_status == 'APPROVING' || req_status == 'CANCEL' || req_status == 'REJECT' ) {
param['maintain_type'] = 'READONLY'; param['maintain_type'] = 'READONLY';
param['function_usage'] = 'QUERY';
} else { } else {
param['maintain_type'] = 'UPDATE'; param['maintain_type'] = 'UPDATE';
param['function_usage'] = 'MODIFY';
} }
if (record.get('ccr_document_type') == 'CUT_CHAG') {
param['function_code'] = 'CON733CF';
if (record.get('ccr_document_type') == 'PAYCARD' && (req_status == 'REJECT' || req_status == 'CANCEL' || req_status == 'APPROVED' || req_status == 'APPROVING')) { param['url_title'] = '变更申请-合同回款账户变更';
param['function_code'] = 'CON732Q'; } else if (record.get('ccr_document_type') == 'LEASE_CHAG') {
param['function_usage'] = 'QUERY'; param['function_code'] = 'CON733BPT';
param['url_title'] = '变更申请-还款卡变更查询 '; param['url_title'] = '变更申请-合同回款账户变更';
} else if (record.get('ccr_document_type') == 'BASICHAG' && (req_status == 'REJECT' || req_status == 'CANCEL' || req_status == 'APPROVED' || req_status == 'APPROVING')) { } else if (record.get('ccr_document_type') == 'ACC_CHAG') {
param['function_code'] = 'CON702E'; param['function_code'] = 'CON733BPB';
param['function_usage'] = 'QUERY'; param['url_title'] = '变更申请-合同回款账户变更';
param['url_title'] = '变更申请-常规信息查询 ';
} else if (record.get('ccr_document_type') == 'CONEXTHAG' && (req_status == 'REJECT' || req_status == 'CANCEL' || req_status == 'APPROVED' || req_status == 'APPROVING')) {
param['function_code'] = 'CON732D';
param['function_usage'] = 'QUERY';
param['url_title'] = '变更申请-还款卡变更 ';
} else {
param['function_code'] = 'CON732D_BASIC';
param['url_title'] = '变更申请-常规信息调整 ';
} }
param['function_code'] = 'CON732D';
param['function_usage'] = 'MODIFY';
param['document_type'] = record.get('ccr_document_type'); param['document_type'] = record.get('ccr_document_type');
hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, 'con_contract_change_link', ds_id); hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, 'con_contract_change_link', ds_id);
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment