and ((${@account_type} = 'PE' and exists (select 1 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})))
or (${@account_type} = 'AG' and exists (select 1 from hls_bp_master_signer hs where hs.hls_bp_signer_id = t1.signer and hs.id_card = ${@id_no}))
or (${@account_type} = 'AG' and exists (select 1 from con_contract_bp cb where cb.contract_id = t1.contract_id and cb.bp_category = 'GUARANTOR' and cb.bp_class = 'ORG' and cb.id_card_no_leg = ${@id_no}))
or (${@account_type} = 'LP' and exists
(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}))
)
UNION ALL
select t1.contract_id,
t1.contract_number,
t1.contract_number,
t1.contract_status,
t1.contract_status,
t1.bp_id_tenant,
t1.bp_id_tenant,
...
@@ -155,12 +64,19 @@ select *
...
@@ -155,12 +64,19 @@ select *
from con_contract_ele_signer cs
from con_contract_ele_signer cs
where cs.contract_id = t1.contract_id
where cs.contract_id = t1.contract_id
and ((${@account_type} = 'AG' and
and ((${@account_type} = 'AG' and
(cs.id_no =
(select hm.social_code
from hls_bp_master hm, con_contract_bp cb
where hm.bp_id = cb.bp_id
and cb.contract_id = t1.contract_id
and cb.id_card_no_leg = ${@id_no}) or
cs.id_no =
cs.id_no =
(select hm.social_code
(select hm.social_code
from hls_bp_master hm
from hls_bp_master hm, hls_bp_master_signer hs
where t1.bp_id_tenant = hm.bp_id)) or
where hm.bp_id = hs.bp_id
(${@account_type} != 'AG' and
and hm.bp_id = t1.bp_id_tenant
cs.id_no = ${@id_no}))
and hs.id_card = ${@id_no}))) or
(${@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')
from con_contract_ele_signer cs
from con_contract_ele_signer cs
...
@@ -172,20 +88,32 @@ select *
...
@@ -172,20 +88,32 @@ select *
where t1.data_class = 'NORMAL'
where t1.data_class = 'NORMAL'
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 ((${@account_type} = 'PE' and exists (select 1 from con_contract_bp ccb ,hls_bp_master hb
and ((${@account_type} = 'PE' and exists
(select 1
from con_contract_bp ccb, hls_bp_master hb
where ccb.bp_id = hb.bp_id
where ccb.bp_id = hb.bp_id
and ccb.contract_id = t1.contract_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')
or (${@account_type} = 'AG' and exists (select 1 from hls_bp_master_signer hs where hs.hls_bp_signer_id = t1.signer and hs.id_card = ${@id_no}))
and (ccb.id_card_no = ${@id_no} or
or (${@account_type} = 'AG' and exists (select 1 from con_contract_bp cb where cb.contract_id = t1.contract_id and cb.bp_category = 'GUARANTOR' and cb.bp_class = 'ORG' and cb.id_card_no_leg = ${@id_no}))
var up_file_token_url = 'http://hlsapp.hand-china.com/hl_dr_dev/oauth/token?client_id=client2&client_secret=secret&grant_type=password&username=admin&password=admin'; //文件上传获取token的地址
var up_file_token_url = info_query('UP_FILE_TOKEN_URL').code_value;
//系统参数获取
//系统参数获取
function info_query(parameter_code) {
function info_query(parameter_code) {
var info = new Object();
var info = new Object();
...
@@ -23,9 +23,15 @@
...
@@ -23,9 +23,15 @@
var sign_cancel_map = sign_cancel_bm.queryAsMap({
var sign_cancel_map = sign_cancel_bm.queryAsMap({
contract_id:$ctx.parameter.contract_id
contract_id:$ctx.parameter.contract_id
});
});
var flow_Id = sign_cancel_map.getChildren()[0].ele_flow_id;
var sign_cancel_data = sign_cancel_map.getChildren();
var revoke_flows = [];
for (var i = 0; i < sign_cancel_data.length;i++){
revoke_flows.push({
"flowId":sign_cancel_data[i].ele_flow_id
});
}
var revokeParam = {
var revokeParam = {
flowId:flow_Id
revokeFlows:revoke_flows
}
}
//调用中台取消流程
//调用中台取消流程
var info = info_query('HL_SIGN_FLOW_CANCEL');
var info = info_query('HL_SIGN_FLOW_CANCEL');
...
@@ -47,14 +53,31 @@
...
@@ -47,14 +53,31 @@
tokenResult:token_sign_result
tokenResult:token_sign_result
});
});
var result_ob = JSON.parse(result); //根据返回参数形式再定
var result_ob = JSON.parse(result); //根据返回参数形式再定
var revoke_flag_update_bm = $bm('cont.CON505.contract_revoke_flag_update');
var up_file_token_url = 'http://hlsapp.hand-china.com/hl_dr_dev/oauth/token?client_id=client2&client_secret=secret&grant_type=password&username=admin&password=admin'; //文件上传获取token的地址
function copyFile(fOld, fNew) {
function copyFile(fOld, fNew) {
var fis = new java.io.FileInputStream(fOld);
var fis = new java.io.FileInputStream(fOld);
var fos = new java.io.FileOutputStream(fNew);
var fos = new java.io.FileOutputStream(fNew);
...
@@ -82,12 +80,16 @@
...
@@ -82,12 +80,16 @@
info.code_value = data[0].code_value;
info.code_value = data[0].code_value;
return info;
return info;
}
}
var up_file_token_url = info_query('UP_FILE_TOKEN_URL').code_value;
var flow_count_bm = $bm('wx.WX100.con_ele_flow_update');
var flow_count_map = flow_count_bm.queryAsMap({
contract_id: $ctx.parameter.contract_id
});
var flow_count_data = flow_count_map.getChildren();
if(flow_count_data[0].ce_num == 0) {
//依据合同文本签署人定义存储签署人信息
//依据合同文本签署人定义存储签署人信息
var ele_contract_signer_bm = $bm('wx.WX100.con_ele_contract_signer_save');
var ele_contract_signer_bm = $bm('wx.WX100.con_ele_contract_signer_save');
var up_file_token_url = 'http://hlsapp.hand-china.com/hl_dr_dev/oauth/token?client_id=client2&client_secret=secret&grant_type=password&username=admin&password=admin'; //文件上传获取token的地址
var up_file_token_url = info_query('UP_FILE_TOKEN_URL').code_value;
var up_file_token_url = 'http://hlsapp.hand-china.com/hl_dr_dev/oauth/token?client_id=client2&client_secret=secret&grant_type=password&username=admin&password=admin'; //文件上传获取token的地址
var up_file_token_url = info_query('UP_FILE_TOKEN_URL').code_value;
function copyFile(fOld, fNew) {
function copyFile(fOld, fNew) {
var fis = new java.io.FileInputStream(fOld);
var fis = new java.io.FileInputStream(fOld);
...
@@ -284,10 +284,11 @@
...
@@ -284,10 +284,11 @@
raise_app_error(result_ob.message.toString());
raise_app_error(result_ob.message.toString());
}else if(result_ob.code == 0){
}else if(result_ob.code == 0){
var flow_id = result_ob.flowId;
var flow_id = result_ob.flowId;
var flow_update_bm = $bm('wx.WX100.con_et_flow_update');
var flow_update_bm = $bm('wx.WX100.con_ele_flow_update');
flow_update_bm.update({
flow_update_bm.update({
contract_id:$ctx.parameter.contract_id,
contract_id: $ctx.parameter.contract_id,
flow_id:flow_id
flow_id: flow_id,
esign_type: 'ET'
})
})
var sign_url_list = result_ob.signUrlList;
var sign_url_list = result_ob.signUrlList;
var ele_con_info_bm = $bm('wx.WX100.con_ele_con_info_update');
var ele_con_info_bm = $bm('wx.WX100.con_ele_con_info_update');
var up_file_token_url = 'http://hlsapp.hand-china.com/hl_dr_dev/oauth/token?client_id=client2&client_secret=secret&grant_type=password&username=admin&password=admin'; //文件上传获取token的地址
var up_file_token_url = info_query('UP_FILE_TOKEN_URL').code_value;