Commit c2070064 authored by taoruidan18083's avatar taoruidan18083

I-23138【建机】机易查小程序还款结束逻辑修改

parent 94bf092c
...@@ -32,7 +32,24 @@ ...@@ -32,7 +32,24 @@
from con_contract cc, prj_project_lease_item li from con_contract cc, prj_project_lease_item li
where cc.project_id = li.project_id where cc.project_id = li.project_id
and cc.data_class = 'NORMAL' and cc.data_class = 'NORMAL'
and cc.contract_status not in ('TERMINATE','ET','REPUR','CANCEL','TERMINATING') and cc.contract_status not in ('TERMINATE','ET','REPUR','CANCEL')
and ((cc.contract_status in
('INCEPT',
'REPURING',
'TERMINATING',
'ETING',
'CANCELING',
'PENDING') and exists
(select 1
from con_contract_cashflow ccc
where cc.contract_id = ccc.contract_id
and ccc.cf_status = 'RELEASE'
and ccc.cf_direction = 'INFLOW'
and nvl(ccc.due_amount, 0) -
nvl(ccc.received_amount, 0) > 0
and ccc.cf_item in (1, 2, 8, 9, 11, 200, 250))) or
cc.contract_status in
('NEW', 'INCEPTING', 'INCEPT_RETURN'))
and cc.sign_contract_status not in ('NEW','SIGN_RETURN') and cc.sign_contract_status not in ('NEW','SIGN_RETURN')
and cc.division != '95' and cc.division != '95'
and (li.machine_number=#{machineNumber} or li.machine_number_70=#{machineNumber}) and (li.machine_number=#{machineNumber} or li.machine_number_70=#{machineNumber})
...@@ -54,7 +71,24 @@ ...@@ -54,7 +71,24 @@
prj_project_lease_item_list lil prj_project_lease_item_list lil
where cc.project_id = li.project_id where cc.project_id = li.project_id
and cc.data_class = 'NORMAL' and cc.data_class = 'NORMAL'
and cc.contract_status not in ('TERMINATE','ET','REPUR','CANCEL','TERMINATING') and cc.contract_status not in ('TERMINATE','ET','REPUR','CANCEL')
and ((cc.contract_status in
('INCEPT',
'REPURING',
'TERMINATING',
'ETING',
'CANCELING',
'PENDING') and exists
(select 1
from con_contract_cashflow ccc
where cc.contract_id = ccc.contract_id
and ccc.cf_status = 'RELEASE'
and ccc.cf_direction = 'INFLOW'
and nvl(ccc.due_amount, 0) -
nvl(ccc.received_amount, 0) > 0
and ccc.cf_item in (1, 2, 8, 9, 11, 200, 250))) or
cc.contract_status in
('NEW', 'INCEPTING', 'INCEPT_RETURN'))
and cc.sign_contract_status not in ('NEW','SIGN_RETURN') and cc.sign_contract_status not in ('NEW','SIGN_RETURN')
and li.project_lease_item_id = lil.project_lease_item_id and li.project_lease_item_id = lil.project_lease_item_id
and cc.division != '95' and cc.division != '95'
......
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