Commit f053a568 authored by congzhao's avatar congzhao

[建机]电子合同开发 电子签约查询修改

parent d7d5ee56
...@@ -84,6 +84,7 @@ select * ...@@ -84,6 +84,7 @@ select *
where t1.data_class in ('NORMAL','CHANGE_REQ') where t1.data_class in ('NORMAL','CHANGE_REQ')
and t1.ec_sign_type in ('INITIATE', 'SIGNING') and t1.ec_sign_type in ('INITIATE', 'SIGNING')
and t1.sign_type = 'ELE_SIGN' and t1.sign_type = 'ELE_SIGN'
and exists (select 1 from con_contract_ele_flow cf where cf.contract_id = t1.contract_id)
and ((${@account_type} = 'PE' and exists and ((${@account_type} = 'PE' and exists
(select 1 (select 1
from con_contract_bp ccb, hls_bp_master hb from con_contract_bp ccb, hls_bp_master hb
...@@ -97,6 +98,9 @@ select * ...@@ -97,6 +98,9 @@ select *
from hls_bp_master_signer hs from hls_bp_master_signer hs
where hs.hls_bp_signer_id = t1.signer where hs.hls_bp_signer_id = t1.signer
and hs.id_card = ${@id_no}) and hs.id_card = ${@id_no})
and exists (select 1 from hls_bp_master hbm
where hbm.bp_id = t1.bp_id_tenant
and hbm.social_code = ${@organization_id})
and exists (select 1 from con_contract_ele_signer cs and exists (select 1 from con_contract_ele_signer cs
where cs.id_no = ${@id_no} where cs.id_no = ${@id_no}
and cs.contract_id = t1.contract_id)) or and cs.contract_id = t1.contract_id)) or
...@@ -108,13 +112,16 @@ select * ...@@ -108,13 +112,16 @@ select *
and hs.id_card = ${@id_no}) and hs.id_card = ${@id_no})
and exists (select 1 from con_contract_ele_signer cs and exists (select 1 from con_contract_ele_signer cs
where cs.id_no = ${@id_no} where cs.id_no = ${@id_no}
and cs.contract_id = t1.contract_id)) or 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 from con_contract_bp cb,hls_bp_master hbm
where cb.contract_id = t1.contract_id where cb.contract_id = t1.contract_id
and cb.bp_category = 'GUARANTOR' and cb.bp_category = 'GUARANTOR'
and cb.bp_class = 'ORG' and cb.bp_class = 'ORG'
and cb.bp_id = hbm.bp_id
and hbm.social_code = ${@organization_id}
and cb.id_card_no_leg = ${@id_no})) or and cb.id_card_no_leg = ${@id_no})) or
(${@account_type} = 'LP' and exists (${@account_type} = 'LP' and exists
(select 1 (select 1
......
...@@ -48,27 +48,27 @@ select fa.file_name,fa.file_path,fa.attachment_id ...@@ -48,27 +48,27 @@ select fa.file_name,fa.file_path,fa.attachment_id
from con_ele_signer_file cf, con_contract_ele_signer cs from con_ele_signer_file cf, con_contract_ele_signer cs
where cf.con_ele_signer_id = cs.con_ele_signer_id where cf.con_ele_signer_id = cs.con_ele_signer_id
and cs.contract_id = ${@contract_id} and cs.contract_id = ${@contract_id}
and ((((select cb.bp_category and ((('AGENT' not in (select cb.bp_category
from con_contract_bp cb, hls_bp_master hm from con_contract_bp cb, hls_bp_master hm
where cb.bp_id = hm.bp_id where cb.bp_id = hm.bp_id
and hm.social_code = ${@id_no} and hm.social_code = ${@id_no}
and cb.contract_id = cs.contract_id) != 'AGENT' or and cb.contract_id = cs.contract_id) or
(select cb.bp_category not exists (select 1
from con_contract_bp cb, hls_bp_master hm from con_contract_bp cb, hls_bp_master hm
where cb.bp_id = hm.bp_id where cb.bp_id = hm.bp_id
and hm.social_code = ${@id_no} and hm.social_code = ${@id_no}
and cb.contract_id = cs.contract_id) is null) and cb.contract_id = cs.contract_id))
and exists (select 1 from hls_doc_file_templet_signer hs,con_clause_templet ct,hls_doc_file_templet ht and exists (select 1 from hls_doc_file_templet_signer hs,con_clause_templet ct,hls_doc_file_templet ht
where hs.templet_id = ht.templet_id where hs.templet_id = ht.templet_id
and ht.templet_code = ct.templet_code and ht.templet_code = ct.templet_code
and ct.templet_id = cf.templet_id and ct.templet_id = cf.templet_id
and hs.enable_flag = 'Y' and hs.enable_flag = 'Y'
and hs.signer_category not in ('AGENCY_STORE_SEAL','AGENCY_STORE_SIGN','HONGLING_SEAL','HONGLING_SIGN'))) and hs.signer_category not in ('AGENCY_STORE_SEAL','AGENCY_STORE_SIGN','HONGLING_SEAL','HONGLING_SIGN')))
or (select cb.bp_category or 'AGENT' in (select cb.bp_category
from con_contract_bp cb, hls_bp_master hm from con_contract_bp cb, hls_bp_master hm
where cb.bp_id = hm.bp_id where cb.bp_id = hm.bp_id
and hm.social_code = ${@id_no} and hm.social_code = ${@id_no}
and cb.contract_id = cs.contract_id) = 'AGENT')) and cb.contract_id = cs.contract_id)))
and pi.cdd_list_id = and pi.cdd_list_id =
(select cc.cdd_list_id (select cc.cdd_list_id
from con_contract cc from con_contract cc
......
...@@ -25,16 +25,16 @@ select fa.file_name, fa.file_path, fa.file_size, ct.order_seq ...@@ -25,16 +25,16 @@ select fa.file_name, fa.file_path, fa.file_size, ct.order_seq
from con_ele_signer_file cf, con_contract_ele_signer cs from con_ele_signer_file cf, con_contract_ele_signer cs
where cf.con_ele_signer_id = cs.con_ele_signer_id where cf.con_ele_signer_id = cs.con_ele_signer_id
and cs.contract_id = cc.contract_id and cs.contract_id = cc.contract_id
and ((((select cb.bp_category and ((('AGENT' not in(select cb.bp_category
from con_contract_bp cb, hls_bp_master hm from con_contract_bp cb, hls_bp_master hm
where cb.bp_id = hm.bp_id where cb.bp_id = hm.bp_id
and hm.social_code = ${@id_no} and hm.social_code = ${@id_no}
and cb.contract_id = cc.contract_id) != 'AGENT' or and cb.contract_id = cc.contract_id)or
(select cb.bp_category not exists(select 1
from con_contract_bp cb, hls_bp_master hm from con_contract_bp cb, hls_bp_master hm
where cb.bp_id = hm.bp_id where cb.bp_id = hm.bp_id
and hm.social_code = ${@id_no} and hm.social_code = ${@id_no}
and cb.contract_id = cc.contract_id) is null) and and cb.contract_id = cc.contract_id)) and
exists (select 1 exists (select 1
from hls_doc_file_templet_signer hs, from hls_doc_file_templet_signer hs,
con_clause_templet ct, con_clause_templet ct,
...@@ -48,11 +48,11 @@ select fa.file_name, fa.file_path, fa.file_size, ct.order_seq ...@@ -48,11 +48,11 @@ select fa.file_name, fa.file_path, fa.file_size, ct.order_seq
'AGENCY_STORE_SIGN', 'AGENCY_STORE_SIGN',
'HONGLING_SEAL', 'HONGLING_SEAL',
'HONGLING_SIGN'))) or 'HONGLING_SIGN'))) or
(select cb.bp_category 'AGENT' in (select cb.bp_category
from con_contract_bp cb, hls_bp_master hm from con_contract_bp cb, hls_bp_master hm
where cb.bp_id = hm.bp_id where cb.bp_id = hm.bp_id
and hm.social_code = ${@id_no} and hm.social_code = ${@id_no}
and cb.contract_id = cc.contract_id) = 'AGENT')) and cb.contract_id = cc.contract_id)))
order by ct.order_seq order by ct.order_seq
]]></bm:query-sql> ]]></bm:query-sql>
</bm:operation> </bm:operation>
......
...@@ -13,14 +13,16 @@ ...@@ -13,14 +13,16 @@
contract_list_map = contract_list_bm.queryAsMap({ contract_list_map = contract_list_bm.queryAsMap({
id_no:$ctx.parameter.idNo, id_no:$ctx.parameter.idNo,
id_type:$ctx.parameter.IdType, id_type:$ctx.parameter.IdType,
account_type: $ctx.parameter.accountType account_type: $ctx.parameter.accountType,
organization_id:$ctx.parameter.organizationId
}); });
}else{ }else{
contract_list_map = contract_list_bm.queryAsMap({ contract_list_map = contract_list_bm.queryAsMap({
id_no:$ctx.parameter.idNo, id_no:$ctx.parameter.idNo,
id_type:$ctx.parameter.IdType, id_type:$ctx.parameter.IdType,
account_type: $ctx.parameter.accountType, account_type: $ctx.parameter.accountType,
contract_number:inputData organization_id:$ctx.parameter.organizationId,
contract_number:inputData,
}); });
} }
contract_list_details = contract_list_map.getChildren(); contract_list_details = contract_list_map.getChildren();
......
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