Commit 2aa342ca authored by chenzhuo's avatar chenzhuo

合同查询接口调整

parent d5bc8bb5
......@@ -69,6 +69,7 @@
and cc.cf_status = 'RELEASE') due_amount_all --应还总额
from con_contract t1, con_contract_change_req cr
where t1.data_class = 'NORMAL'
and t1.sign_contract_status = decode(t1.contract_status,'NEW','SIGN',t1.sign_contract_status)
and t1.contract_id = cr.contract_id
and t1.contract_status in
(select v.code_value
......@@ -85,8 +86,7 @@
from con_contract_bp ccb, hls_bp_master hb
where ccb.bp_id = hb.bp_id
and ccb.contract_id = t1.contract_id
and (ccb.bp_category in ('TENANT', 'GUARANTOR'))
and (ccb.id_card_no = ${@id_no} or ccb.id_no_sp = ${@id_no}))))
and (ccb.bp_category in ('TENANT', 'GUARANTOR') and (ccb.id_card_no = ${@id_no} or ccb.id_no_sp = ${@id_no}))))
or (${@account_type} = 'AG' and exists
(select 1
from hls_bp_master_signer hs
......@@ -103,7 +103,8 @@
(select 1
from con_contract_bp cb, hls_bp_master hb
where cb.bp_id = hb.bp_id
and hb.social_code = ${@id_no}))
and cb.contract_id = t1.contract_id
and hb.social_code = ${@id_no})))
union all
......@@ -172,6 +173,7 @@ select t1.contract_id,
and cc.cf_status = 'RELEASE') due_amount_all --应还总额
from con_contract t1
where t1.data_class = 'NORMAL'
and t1.sign_contract_status = decode(t1.contract_status,'NEW','SIGN',t1.sign_contract_status)
and t1.contract_status in
(select v.code_value
from sys_code_values_v v
......@@ -205,6 +207,7 @@ select t1.contract_id,
(select 1
from con_contract_bp cb, hls_bp_master hb
where cb.bp_id = hb.bp_id
and cb.contract_id = t1.contract_id
and hb.social_code = ${@id_no})))
) v #WHERE_CLAUSE#
]]></bm:query-sql>
......@@ -233,6 +236,6 @@ select t1.contract_id,
</bm:fields>
<bm:query-fields>
<bm:query-field name="contract_number" queryExpression="v.contract_number like '%'||${@contract_number}||'%' "/>
<bm:query-field name="contract_status_n" queryExpression="v.contract_status_n = ${@contract_status}"/>
<bm:query-field name="contract_status" queryExpression="v.contract_status_n = ${@contract_status}"/>
</bm:query-fields>
</bm:model>
</bm:model>
\ No newline at end of file
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