Commit 9b1d55fe authored by 18083's avatar 18083

新增法人担保经办人电子签约

parent 8b1a21e9
...@@ -83,7 +83,16 @@ select * ...@@ -83,7 +83,16 @@ select *
from hls_bp_master hm, hls_bp_master_signer hs from hls_bp_master hm, hls_bp_master_signer hs
where hm.bp_id = hs.bp_id where hm.bp_id = hs.bp_id
and hm.bp_id = t1.bp_id_tenant and hm.bp_id = t1.bp_id_tenant
and hs.id_card = ${@id_no}))) or and hs.id_card = ${@id_no})
or cs.id_no=(select hm.social_code
from con_contract_bp cb,
hls_bp_master hm,
hls_bp_master_signer hs
where cb.bp_id = hm.bp_id
and cb.gua_signer = hs.hls_bp_signer_id
and cb.contract_id = t1.contract_id
and hs.id_card = ${@id_no}
and cb.bp_class = 'ORG'))) or
(${@account_type} != 'AG' and cs.id_no = ${@id_no})) (${@account_type} != 'AG' and cs.id_no = ${@id_no}))
and rownum = 1) sign_url, and rownum = 1) sign_url,
(SELECT nvl(cs.ec_sign_status, 'N') (SELECT nvl(cs.ec_sign_status, 'N')
...@@ -132,6 +141,33 @@ select * ...@@ -132,6 +141,33 @@ select *
where cs.id_no = ${@id_no} where cs.id_no = ${@id_no}
and cs.contract_id = t1.contract_id) and cs.contract_id = t1.contract_id)
) or ) or
(${@account_type} = 'AG' and exists
(select 1
from hls_bp_master_signer hs,con_contract_bp bp,hls_bp_master hm
where hs.hls_bp_signer_id = bp.gua_signer
and bp.bp_id = hm.bp_id
and bp.contract_id = t1.contract_id
and bp.bp_category = 'GUARANTOR'
and bp.bp_class = 'ORG'
and hm.social_code = ${@organization_id}
and hs.id_card = ${@id_no})
and exists (select 1 from con_contract_ele_signer cs
where cs.id_no = ${@id_no}
and cs.contract_id = t1.contract_id)) or
(${@account_type} = 'AG' and exists
(select 1
from hls_bp_master_signer hs,con_contract_change_req cr,con_contract_bp bp,hls_bp_master hm
where hs.hls_bp_signer_id = bp.gua_signer
and cr.change_req_id = t1.contract_id
and bp.bp_id = hm.bp_id
and bp.bp_category = 'GUARANTOR'
and bp.bp_class = 'ORG'
and hm.social_code = ${@organization_id}
and hs.id_card = ${@id_no})
and exists (select 1 from con_contract_ele_signer cs
where cs.id_no = ${@id_no}
and cs.contract_id = t1.contract_id)
) or
(${@account_type} = 'AG' and exists (${@account_type} = 'AG' and exists
(select 1 (select 1
from con_contract_bp cb,hls_bp_master hbm from con_contract_bp cb,hls_bp_master hbm
......
...@@ -32,18 +32,40 @@ ...@@ -32,18 +32,40 @@
cs.mobile, cs.mobile,
hs.signer_category, hs.signer_category,
cs.esign_type, cs.esign_type,
(select nvl(hm.bp_name_leg,hm.legal_person) decode(hs.signer_category,
from con_contract_bp cb, hls_bp_master hm 'GUARANTOR_ORG_SEAL',
where cb.bp_id = hm.bp_id (select hs.name
and cb.contract_id = cs.contract_id from con_contract_bp cb,
and hm.social_code = cs.id_no hls_bp_master hm,
and cb.bp_class = 'ORG') legal_person, hls_bp_master_signer hs
(select hm.id_card_no_leg where cb.bp_id = hm.bp_id
from con_contract_bp cb, hls_bp_master hm and cb.gua_signer = hs.hls_bp_signer_id
where cb.bp_id = hm.bp_id and cb.contract_id = cs.contract_id
and cb.contract_id = cs.contract_id and hm.social_code = cs.id_no
and hm.social_code = cs.id_no and cb.bp_class = 'ORG'),
and cb.bp_class = 'ORG') id_card_no_leg (select nvl(hm.bp_name_leg, hm.legal_person)
from con_contract_bp cb, hls_bp_master hm
where cb.bp_id = hm.bp_id
and cb.contract_id = cs.contract_id
and hm.social_code = cs.id_no
and cb.bp_class = 'ORG')) legal_person,
decode(hs.signer_category,
'GUARANTOR_ORG_SEAL',
(select hs.id_card
from con_contract_bp cb,
hls_bp_master hm,
hls_bp_master_signer hs
where cb.bp_id = hm.bp_id
and cb.gua_signer = hs.hls_bp_signer_id
and cb.contract_id = cs.contract_id
and hm.social_code = cs.id_no
and cb.bp_class = 'ORG'),
(select hm.id_card_no_leg
from con_contract_bp cb, hls_bp_master hm
where cb.bp_id = hm.bp_id
and cb.contract_id = cs.contract_id
and hm.social_code = cs.id_no
and cb.bp_class = 'ORG')) id_card_no_leg
from con_contract_ele_signer cs, hls_doc_file_templet_signer hs,con_contract_content cc,con_clause_templet ct from con_contract_ele_signer cs, hls_doc_file_templet_signer hs,con_contract_content cc,con_clause_templet ct
where cs.templet_signer_id = hs.templet_signer_id where cs.templet_signer_id = hs.templet_signer_id
and ct.doc_template_id = hs.templet_id and ct.doc_template_id = hs.templet_id
...@@ -55,7 +77,11 @@ ...@@ -55,7 +77,11 @@
where cb.contract_id = cc.contract_id where cb.contract_id = cc.contract_id
and hs.signer_category = (cb.bp_category || '_SP') and hs.signer_category = (cb.bp_category || '_SP')
and cb.sp_sign_flag = 'N' and cb.sp_sign_flag = 'N'
and cb.id_no_sp = cs.id_no)) t and cb.id_no_sp = cs.id_no)
and not exists (select 1
from sign_auth_exc sa
where sa.id_no = cs.id_no
and sa.is_auth_flag = 'Y')) t
#WHERE_CLAUSE# #WHERE_CLAUSE#
]]></bm:query-sql> ]]></bm:query-sql>
</bm:operation> </bm:operation>
......
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