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
d442a026
Commit
d442a026
authored
Sep 27, 2019
by
Spencer Chang
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature/con_change_feature_v2' into develop
parents
970285cd
6a1b4509
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
100 additions
and
96 deletions
+100
-96
INITIALIZE_LAYOUT_DB_OBJECT.sql
...ase/Init/Layout_db_object/INITIALIZE_LAYOUT_DB_OBJECT.sql
+3
-0
cus_con_change_req_wfl_pkg.pck
src/main/database/Package/cus_con_change_req_wfl_pkg.pck
+12
-5
cus_con_contract_repo_pkg.pck
src/main/database/Package/cus_con_contract_repo_pkg.pck
+10
-23
cus_con_et_pkg.pck
src/main/database/Package/cus_con_et_pkg.pck
+4
-22
CON_CONTRACT.sql
src/main/database/Table/Alter/CON_CONTRACT.sql
+5
-1
CON_CHANGE_CONTRACT_LV.sql
src/main/database/View/CON_CHANGE_CONTRACT_LV.sql
+6
-5
con_contract_change_req_lv.sql
src/main/database/View/con_contract_change_req_lv.sql
+1
-0
hls_con_contract_change_detail.lview
.../modules/cont/CON731/hls_con_contract_change_detail.lview
+46
-30
hls_ccr_modify_entrance.lview
.../webapp/modules/cont/CON732/hls_ccr_modify_entrance.lview
+2
-2
con_early_termination_et_detail.lview
...ules/cont/CON_ET001/con_early_termination_et_detail.lview
+1
-1
con_early_termination_modify_query.lview
...s/cont/CON_ET003/con_early_termination_modify_query.lview
+2
-2
con_contract_change_repo_detail.lview
...es/cont/CON_REPO001/con_contract_change_repo_detail.lview
+8
-5
No files found.
src/main/database/Init/Layout_db_object/INITIALIZE_LAYOUT_DB_OBJECT.sql
View file @
d442a026
...
...
@@ -19,6 +19,9 @@ values ('CONTRACT', 'CON_CONTRACT_REPO_LV', 'VIEW', -1, sysdate, -1, sysdate);
insert
into
HLS_DOC_CATEGORY_DB_OBJECT
(
DOCUMENT_CATEGORY
,
OBJECT_NAME
,
OBJECT_TYPE
,
CREATED_BY
,
CREATION_DATE
,
LAST_UPDATED_BY
,
LAST_UPDATE_DATE
)
values
(
'CONTRACT'
,
'CON_CONTRACT_REPO_MODIFY_LV'
,
'VIEW'
,
-
1
,
sysdate
,
-
1
,
sysdate
);
insert
into
HLS_DOC_CATEGORY_DB_OBJECT
(
DOCUMENT_CATEGORY
,
OBJECT_NAME
,
OBJECT_TYPE
,
CREATED_BY
,
CREATION_DATE
,
LAST_UPDATED_BY
,
LAST_UPDATE_DATE
)
values
(
'CONTRACT'
,
'CON_CONTRACT_CCR_Q_LV'
,
'VIEW'
,
-
1
,
sysdate
,
-
1
,
sysdate
);
end
;
/
commit
;
...
...
src/main/database/Package/cus_con_change_req_wfl_pkg.pck
View file @
d442a026
...
...
@@ -29,11 +29,18 @@ create or replace package body cus_con_change_req_wfl_pkg is
v_bp_name varchar2(300);
v_workflow_desc varchar2(2000);
begin
select lv.bp_name
into v_bp_name
from con_contract_bp_tenant_lv lv
where lv.contract_id = p_change_con_rec.contract_id;
--承租人已改变,此时con_contract_bp并没有新的承租人信息,会返回no_data_found例外
if p_layout_code = 'CON_TENANT_CHANGE_MODIFY' then
select lv.bp_name
into v_bp_name
from con_contract_bp_tenant_lv lv
where lv.contract_id = p_change_req_rec.contract_id;
else
select lv.bp_name
into v_bp_name
from con_contract_bp_tenant_lv lv
where lv.contract_id = p_change_con_rec.contract_id;
end if;
update con_contract_change_req t
set t.req_status = 'APPROVING',
t.submit_date = sysdate,
...
...
src/main/database/Package/cus_con_contract_repo_pkg.pck
View file @
d442a026
...
...
@@ -3,7 +3,12 @@
-- Author : Spencer 3893
-- Created : 9/10/2019 2:21:13 PM
-- Purpose : 合同回购
function get_contract_repo_number(p_document_type varchar2,
p_document_date date,
p_company_id number,
p_user_id number,
p_contract_id number default null)
return varchar2;
--add by Spencer 3893 20190911 回购申请
procedure create_change_req_repo(p_contract_id in number,
p_req_type in varchar2,
...
...
@@ -751,28 +756,10 @@ create or replace package body cus_con_contract_repo_pkg is
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;
cus_con_change_req_wfl_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);
exception
when e_attachment_error then
...
...
src/main/database/Package/cus_con_et_pkg.pck
View file @
d442a026
...
...
@@ -424,28 +424,10 @@ create or replace package body cus_con_et_pkg is
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;
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);
end submit_change_req_et;
end cus_con_et_pkg;
/
src/main/database/Table/Alter/CON_CONTRACT.sql
View file @
d442a026
...
...
@@ -56,4 +56,8 @@ is '是否展期';
alter
table
CON_CONTRACT
add
deflation_flag
varchar2
(
1
);
comment
on
column
CON_CONTRACT
.
deflation_flag
is
'是否缩期'
;
\ No newline at end of file
is
'是否缩期'
;
alter
table
CON_CONTRACT
add
ccr_lease_date
date
;
comment
on
column
CON_CONTRACT
.
ccr_lease_date
is
'承租人变更日'
;
\ No newline at end of file
src/main/database/View/CON_CHANGE_CONTRACT_LV.sql
View file @
d442a026
...
...
@@ -215,10 +215,10 @@ SELECT t1.contract_id,
FROM
con_contract_lease_item
cli
WHERE
cli
.
contract_id
=
t1
.
contract_id
AND
cli
.
equipment_type
=
'MAIN'
)
machine_number
,
--机号 --end
t1
.
ccr_leas
s
e_rental
,
t1
.
ccr_leas
s
e_interest
,
t1
.
ccr_leas
s
e_principal
,
t1
.
ccr_leas
s
e_penalty
,
t1
.
ccr_lease_rental
,
t1
.
ccr_lease_interest
,
t1
.
ccr_lease_principal
,
t1
.
ccr_lease_penalty
,
t1
.
ccr_reason
,
t1
.
ccr_opinion
,
nvl
(
t1
.
hd_user_col_v04
,
'DELAY'
)
hd_user_col_v04
,
--冬雨季延期方式
...
...
@@ -295,7 +295,8 @@ SELECT t1.contract_id,
and
v
.
code
=
'PAY_METHODS'
)
PAY_METHOD_N
,
--现支付方式
t1
.
BANK_BRANCH_NAME
,
--现扣款银行
t1
.
BANK_ACCOUNT_NAME
,
--现扣款账户名
t1
.
BANK_BRANCH_NUM
--现扣款账号
t1
.
BANK_BRANCH_NUM
,
--现扣款账号
t1
.
ccr_lease_date
--回款賬戶變更 end
FROM
con_contract
t1
;
src/main/database/View/con_contract_change_req_lv.sql
View file @
d442a026
...
...
@@ -56,6 +56,7 @@ select t.change_req_id,
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
,
(
select
m
.
bp_name
from
hls_bp_master
m
,
con_contract
cct
where
m
.
bp_id
=
cct
.
bp_id_tenant
AND
cct
.
contract_id
=
t
.
contract_id
)
as
s_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
))
...
...
src/main/webapp/modules/cont/CON731/hls_con_contract_change_detail.lview
View file @
d442a026
...
...
@@ -106,38 +106,34 @@
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_update'] = function(ds, record, name, value, old_value, bp_seq) {
var con_contract_change_req_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_contract_change_req');
if (ds.id == con_contract_change_req_ds_id) {
// 承租人变更
if ('${/parameter/@layout_code}' == 'CON_TENANT_CHANGE_MODIFY') {
// 承租人变更日計算應繳金額相關信息
if(name == 'ccr_lease_date'){
Leaf.request({
url: $('calc_tenant_amount_link').getUrl(),
para: {
change_req_id: ${/parameter/@change_req_id},
ccr_lease_date: record.get('ccr_lease_date')
},
success: function(res) {
record.set('ccr_lease_rental', res.result.ccr_lease_rental);
record.set('ccr_lease_principal', res.result.ccr_lease_principal);
record.set('ccr_lease_interest', res.result.ccr_lease_interest);
record.set('ccr_lease_penalty', res.result.ccr_lease_penalty);
},
error: function() {
},
failure: function() {
},
sync: true,
scope: this
});
}
}
}
var ds_con_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'],'F_QUOTATION_01', 'con_contract');
if (ds.id == ds_con_id) {
// 承租人变更
if ('${/parameter/@layout_code}' == 'CON_TENANT_CHANGE_MODIFY') {
// 承租人变更日計算應繳金額相關信息
if(name == 'ccr_lease_date'){
Leaf.request({
url: $('calc_tenant_amount_link').getUrl(),
para: {
change_req_id: ${/parameter/@change_req_id},
ccr_lease_date: record.get('ccr_lease_date')
},
success: function(res) {
record.set('ccr_lease_rental', res.result.ccr_lease_rental);
record.set('ccr_lease_principal', res.result.ccr_lease_principal);
record.set('ccr_lease_interest', res.result.ccr_lease_interest);
record.set('ccr_lease_penalty', res.result.ccr_lease_penalty);
},
error: function() {
},
failure: function() {
},
sync: true,
scope: this
});
}
}
// 回款賬戶變更
if('${/parameter/@layout_code}' == 'CON_ACCOUNT_CHANGE_MODIFY'){
if(name == 'BANK_BRANCH_NUM'){
...
...
@@ -148,6 +144,26 @@
}
}
}
// 租赁计划變更
if('${/parameter/@layout_code}' == 'CON_CHANGE_MODIFY'){debugger
var lease_times = record.get('lease_times')||0;
if(name == 'ccr_start_times'){
var ccr_outstanding_times = record.get('ccr_outstanding_times')||0;
var curr_times = minus(plus(value || 0,ccr_outstanding_times||0),1);
if(curr_times >
lease_times){
record.set('extend_flag','Y');
record.set('deflation_flag','N');
}
}
if(name == 'ccr_outstanding_times'){
var ccr_start_times = record.get('ccr_start_times')||0;
var curr_times = minus(plus(value || 0,ccr_start_times||0),1);
if(curr_times
< lease_times
){
record.set('extend_flag','N');
record.set('deflation_flag','Y');
}
}
}
}
};
...
...
src/main/webapp/modules/cont/CON732/hls_ccr_modify_entrance.lview
View file @
d442a026
...
...
@@ -98,10 +98,10 @@
}
if (record.get('ccr_document_type') == 'CUT_CHAG') {
param['function_code'] = 'CON733CF';
param['url_title'] = '变更申请-合同
回款账户
变更';
param['url_title'] = '变更申请-合同
租金计划
变更';
} else if (record.get('ccr_document_type') == 'LEASE_CHAG') {
param['function_code'] = 'CON733BPT';
param['url_title'] = '变更申请-合同
回款账户
变更';
param['url_title'] = '变更申请-合同
承租人
变更';
} else if (record.get('ccr_document_type') == 'ACC_CHAG') {
param['function_code'] = 'CON733BPB';
param['url_title'] = '变更申请-合同回款账户变更';
...
...
src/main/webapp/modules/cont/CON_ET001/con_early_termination_et_detail.lview
View file @
d442a026
...
...
@@ -6,7 +6,7 @@
<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_submit_link"
model=
"
cont.CON_ET001.submit_change_req
"
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"
/>
...
...
src/main/webapp/modules/cont/CON_ET003/con_early_termination_modify_query.lview
View file @
d442a026
...
...
@@ -21,7 +21,7 @@
function contractQueryScreen_reset() {
$('contractQueryScreen_paraDs').reset();
}
function open_change_req(value,record,name){
debugger
function open_change_req(value,record,name){
if(name=='change_req_number'){
var req_status = record.get('req_status');
var change_req_id = record.get('change_req_id');
...
...
@@ -34,7 +34,7 @@
}
return value;
}
function open_change_req_detail(change_req_id,contract_id) {
debugger
function open_change_req_detail(change_req_id,contract_id) {
var param = {};
param['change_req_id'] = change_req_id;
param['contract_id'] = change_req_id;
...
...
src/main/webapp/modules/cont/CON_REPO001/con_contract_change_repo_detail.lview
View file @
d442a026
...
...
@@ -46,6 +46,8 @@
record.getField('payment_frequency_n').setReadOnly(true);
record.getField('payment_period').setReadOnly(true);
record.set('payment_period', 1);
record.set('payment_frequency', null);
record.set('payment_frequency_n', null);
}
};
// window['${/parameter/@layout_code}_SAVE_LAYOUT_DYNAMIC_CLICK'] = function () {
...
...
@@ -83,7 +85,8 @@
record.getField('payment_frequency_n').setReadOnly(true);
record.getField('payment_period').setReadOnly(true);
record.set('payment_period', 1);
record.set('payment_frequency', '');
record.set('payment_frequency', null);
record.set('payment_frequency_n', null);
if (name == 'ccr_due_amount') {
var due_amount = record.get('due_amount') || 0;
if (due_amount < value) {
...
...
@@ -122,7 +125,7 @@
// sum_overdue_amount+ccr_due_amount+sum_unreceived_principal+residual_value+repurchase_service_charges+fund_possession_cost
// 回购价款计算基数 = 逾期租金 + 逾期罚息(调整后)+ 剩余本金 + 留购价
// 逾期罚息(调整后)
if(name == 'payment_period'){
debugger
if(name == 'payment_period'){
if(value <= 0 || value == NaN || value == undefined){
Leaf.showMessage('${l:HLS.PROMPT}', '支付期数请填写大于0的整数!');
return;
...
...
@@ -141,7 +144,7 @@
record.set('repurchase_count_amount', repurchase_count_amount);
}
// 手续费
if (name == 'repurchase_service_charges') {
debugger
if (name == 'repurchase_service_charges') {
var repurchase_count_amount = plus(plus(plus(record.get('sum_overdue_amount') || 0, record.get('ccr_due_amount') || 0), record.get('sum_unreceived_principal') || 0)
, record.get('residual_value') || 0);
var repurchase_tatal_amount = plus(plus(repurchase_count_amount, value || 0), record.get('fund_possession_cost') || 0);
...
...
@@ -165,7 +168,7 @@
record.set('repurchase_tatal_amount', repurchase_tatal_amount);
record.set('repurchase_count_amount', repurchase_count_amount);
}
if(name == 'sum_unreceived_principal'){
debugger
if(name == 'sum_unreceived_principal'){
var repurchase_count_amount = plus(plus(plus(record.get('sum_overdue_amount') || 0, record.get('ccr_due_amount') || 0), value || 0)
, record.get('residual_value') || 0);
var repurchase_tatal_amount = plus(plus(repurchase_count_amount, record.get('repurchase_service_charges') || 0), record.get('fund_possession_cost') || 0);
...
...
@@ -180,7 +183,7 @@
contract_id: record.get('contract_id'),
repurchase_date: value
},
success: function (res) {
debugger
success: function (res) {
record.set('last_rent_due_date', res.result.last_rent_due_date);
record.set('sum_received_rent_amount', res.result.sum_received_rent_amount);
record.set('sum_unreceived_rent_amount', res.result.sum_unreceived_rent_amount);
...
...
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