Commit ea2688bb authored by congzhao's avatar congzhao

[建机]电子合同开发 合同签约流程校验添加和调整

parent cc6e1098
...@@ -85,7 +85,7 @@ select * ...@@ -85,7 +85,7 @@ select *
and cs.id_type = ${@id_type} and cs.id_type = ${@id_type}
and rownum = 1) userSignStatus and rownum = 1) userSignStatus
from con_contract t1 from con_contract t1
where t1.data_class = 'NORMAL' 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 ((${@account_type} = 'PE' and exists and ((${@account_type} = 'PE' and exists
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: zc
$Date: 2020年11月9日 10点35分
$Revision: 1.0
$Purpose:
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm">
<bm:fields>
<bm:field name="contract_id"/>
<bm:field name="contract_number"/>
<bm:field name="bp_id"/>
<bm:field name="bp_name"/>
<bm:field name="id_type"/>
<bm:field name="id_no"/>
<bm:field name="mobile"/>
<bm:field name="signer_category"/>
<bm:field name="esign_type"/>
<bm:field name="legal_person"/>
<bm:field name="id_card_no_leg"/>
</bm:fields>
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
select distinct t.* from (select
cs.contract_id,
(select c.contract_number from con_contract c where c.contract_id = cs.contract_id) contract_number,
cs.bp_id,
cs.bp_name,
cs.id_type,
cs.id_no,
cs.mobile,
hs.signer_category,
cs.esign_type,
(select 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 cb.bp_category = 'TENANT'
and cb.bp_class = 'ORG') legal_person,
(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 cb.bp_category = 'TENANT'
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
where cs.templet_signer_id = hs.templet_signer_id
and ct.doc_template_id = hs.templet_id
and ct.templet_id = cc.templet_id
and cs.contract_id = cc.contract_id
and cc.clause_usage = 'AGENT_CONTRACT') t
#WHERE_CLAUSE#
]]></bm:query-sql>
</bm:operation>
</bm:operations>
<bm:query-fields>
<bm:query-field name="contract_id" queryExpression="t.contract_id= ${@contract_id}"/>
<bm:query-field name="signer_category" queryExpression="t.signer_category= ${@signer_category}"/>
<bm:query-field name="esign_type" queryExpression="t.esign_type= ${@esign_type}"/>
</bm:query-fields>
</bm:model>
...@@ -44,8 +44,12 @@ ...@@ -44,8 +44,12 @@
and cb.contract_id = cs.contract_id and cb.contract_id = cs.contract_id
and cb.bp_category = 'TENANT' and cb.bp_category = 'TENANT'
and cb.bp_class = 'ORG') id_card_no_leg and cb.bp_class = 'ORG') id_card_no_leg
from con_contract_ele_signer cs, hls_doc_file_templet_signer hs 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) t where cs.templet_signer_id = hs.templet_signer_id
and ct.doc_template_id = hs.templet_id
and ct.templet_id = cc.templet_id
and cs.contract_id = cc.contract_id
and cc.clause_usage != 'AGENT_CONTRACT') t
#WHERE_CLAUSE# #WHERE_CLAUSE#
]]></bm:query-sql> ]]></bm:query-sql>
</bm:operation> </bm:operation>
......
...@@ -5,13 +5,13 @@ ...@@ -5,13 +5,13 @@
</bm:fields> </bm:fields>
<bm:operations> <bm:operations>
<bm:operation name="query"> <bm:operation name="query">
<bm:query-sql> <bm:query-sql><![CDATA[
select count(cf.ele_flow_id) ce_num select count(cf.ele_flow_id) ce_num
from con_contract_ele_flow cf from con_contract_ele_flow cf
where cf.contract_id = ${@contract_id} where cf.contract_id = ${@contract_id}
and cf.ele_flow_type = 'CE' and cf.ele_flow_type = 'CE'
and cf.ele_flow_id is not null and cf.ele_flow_id is not null
</bm:query-sql> ]]></bm:query-sql>
</bm:operation> </bm:operation>
<bm:operation name="update"> <bm:operation name="update">
<bm:update-sql><![CDATA[ <bm:update-sql><![CDATA[
...@@ -38,16 +38,16 @@ ...@@ -38,16 +38,16 @@
]]></bm:update-sql> ]]></bm:update-sql>
</bm:operation> </bm:operation>
<bm:operation name="execute"> <bm:operation name="execute">
<bm:update-sql> <bm:update-sql><![CDATA[
BEGIN BEGIN
UPDATE CON_CONTRACT c UPDATE CON_CONTRACT c
SET c.ec_sign_type = 'INITIATE', SET c.ec_sign_type = 'INITIATE',
c.sign_contract_status = 'SIGNING', c.sign_type = 'ELE_SIGN',
c.last_updated_by = nvl(${/session/@user_id},1), c.last_updated_by = nvl(${/session/@user_id},1),
c.last_update_date = sysdate c.last_update_date = sysdate
WHERE c.contract_id = ${@contract_id}; WHERE c.contract_id = ${@contract_id};
end; end;
</bm:update-sql> ]]></bm:update-sql>
</bm:operation> </bm:operation>
</bm:operations> </bm:operations>
</bm:model> </bm:model>
...@@ -113,13 +113,13 @@ ...@@ -113,13 +113,13 @@
var con_ele_unsigned_file_data = con_ele_unsigned_file_map.getChildren(); var con_ele_unsigned_file_data = con_ele_unsigned_file_map.getChildren();
for (var n = 0; n < con_ele_unsigned_file_data.length; n++){ for (var n = 0; n < con_ele_unsigned_file_data.length; n++){
conFileList.push({ conFileList.push({
"fileUrl": con_ele_unsigned_file_data[n].file_path, "fileUrl": con_ele_unsigned_file_data[n].file_path.replace('X:','/mnt'),
"fileName": con_ele_unsigned_file_data[n].file_name, "fileName": con_ele_unsigned_file_data[n].file_name,
"fileSize": con_ele_unsigned_file_data[n].file_size "fileSize": con_ele_unsigned_file_data[n].file_size
}); });
} }
//合同签署人信息 //合同签署人信息
var ele_signer_bm = $bm('wx.WX100.con_ele_contract_signer_query'); var ele_signer_bm = $bm('wx.WX100.con_ele_agent_contract_signer_query');
var ele_signer_map = ele_signer_bm.queryAsMap({ var ele_signer_map = ele_signer_bm.queryAsMap({
contract_id: $ctx.parameter.contract_id, contract_id: $ctx.parameter.contract_id,
esign_type:'CE' esign_type:'CE'
...@@ -168,7 +168,7 @@ ...@@ -168,7 +168,7 @@
for (var h = 0; h < ele_signer_file_data.length; h++){ for (var h = 0; h < ele_signer_file_data.length; h++){
signerFileList.push({ signerFileList.push({
"fileName":ele_signer_file_data[h].file_name, "fileName":ele_signer_file_data[h].file_name,
"fileUrl":ele_signer_file_data[h].file_path, "fileUrl":ele_signer_file_data[h].file_path.replace('X:','/mnt'),
"fileSize":ele_signer_file_data[h].file_size "fileSize":ele_signer_file_data[h].file_size
}); });
} }
......
...@@ -156,7 +156,7 @@ ...@@ -156,7 +156,7 @@
var con_ele_unsigned_file_data = con_ele_unsigned_file_map.getChildren(); var con_ele_unsigned_file_data = con_ele_unsigned_file_map.getChildren();
for (var n = 0; n < con_ele_unsigned_file_data.length; n++) { for (var n = 0; n < con_ele_unsigned_file_data.length; n++) {
conFileList.push({ conFileList.push({
"fileUrl": con_ele_unsigned_file_data[n].file_path, "fileUrl": con_ele_unsigned_file_data[n].file_path.replace('X:','/mnt'),
"fileName": con_ele_unsigned_file_data[n].file_name, "fileName": con_ele_unsigned_file_data[n].file_name,
"fileSize": con_ele_unsigned_file_data[n].file_size "fileSize": con_ele_unsigned_file_data[n].file_size
}); });
...@@ -272,7 +272,7 @@ ...@@ -272,7 +272,7 @@
for (var h = 0; h < ele_signer_file_data.length; h++) { for (var h = 0; h < ele_signer_file_data.length; h++) {
signerFileList.push({ signerFileList.push({
"fileName": ele_signer_file_data[h].file_name, "fileName": ele_signer_file_data[h].file_name,
"fileUrl": ele_signer_file_data[h].file_path, "fileUrl": ele_signer_file_data[h].file_path.replace('X:','/mnt'),
"fileSize": ele_signer_file_data[h].file_size "fileSize": ele_signer_file_data[h].file_size
}); });
} }
......
...@@ -63,7 +63,7 @@ ...@@ -63,7 +63,7 @@
con_ele_file_dl_bm.update({ con_ele_file_dl_bm.update({
contract_id: con_ele_file_dl_data[i].contract_id, contract_id: con_ele_file_dl_data[i].contract_id,
file_name: docs_list[j].fileName, file_name: docs_list[j].fileName,
file_url: docs_list[j].fileUrl, file_url: docs_list[j].fileUrl.replace('/mnt','X:'),
file_size:docs_list[j].fileSize file_size:docs_list[j].fileSize
}) })
} }
......
...@@ -156,7 +156,7 @@ ...@@ -156,7 +156,7 @@
var con_ele_unsigned_file_data = con_ele_unsigned_file_map.getChildren(); var con_ele_unsigned_file_data = con_ele_unsigned_file_map.getChildren();
for (var n = 0; n < con_ele_unsigned_file_data.length; n++){ for (var n = 0; n < con_ele_unsigned_file_data.length; n++){
conFileList.push({ conFileList.push({
"fileUrl": con_ele_unsigned_file_data[n].file_path, "fileUrl": con_ele_unsigned_file_data[n].file_path.replace('X:','/mnt'),
"fileName": con_ele_unsigned_file_data[n].file_name, "fileName": con_ele_unsigned_file_data[n].file_name,
"fileSize": con_ele_unsigned_file_data[n].file_size "fileSize": con_ele_unsigned_file_data[n].file_size
}); });
...@@ -234,7 +234,7 @@ ...@@ -234,7 +234,7 @@
for (var h = 0; h < ele_signer_file_data.length; h++){ for (var h = 0; h < ele_signer_file_data.length; h++){
signerFileList.push({ signerFileList.push({
"fileName":ele_signer_file_data[h].file_name, "fileName":ele_signer_file_data[h].file_name,
"fileUrl":ele_signer_file_data[h].file_path, "fileUrl":ele_signer_file_data[h].file_path.replace('X:','/mnt'),
"fileSize":ele_signer_file_data[h].file_size "fileSize":ele_signer_file_data[h].file_size
}); });
} }
...@@ -290,6 +290,9 @@ ...@@ -290,6 +290,9 @@
flow_id: flow_id, flow_id: flow_id,
esign_type: 'ET' esign_type: 'ET'
}) })
flow_update_bm.execute({
contract_id: $ctx.parameter.contract_id
})
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');
for(var i = 0 ; i < sign_url_list.length; i++){ for(var i = 0 ; i < sign_url_list.length; i++){
......
...@@ -92,7 +92,7 @@ ...@@ -92,7 +92,7 @@
} }
} }
zos.close(); zos.close();
file_url = tranfer_file_path; file_url = tranfer_file_path.toString().replace('X:','/mnt');
file_name = zip_filename; file_name = zip_filename;
file_size = get_file_length(tranfer_file_path); file_size = get_file_length(tranfer_file_path);
} else if ($ctx.parameter.type == 'SIN' && $ctx.parameter.atmId) { } else if ($ctx.parameter.type == 'SIN' && $ctx.parameter.atmId) {
...@@ -101,7 +101,7 @@ ...@@ -101,7 +101,7 @@
attachment_id: $ctx.parameter.atmId attachment_id: $ctx.parameter.atmId
}); });
var result_data = result.getChildren()[0]; var result_data = result.getChildren()[0];
file_url = result_data.file_path; file_url = result_data.file_path.replace('X:','/mnt');
file_name = result_data.file_name; file_name = result_data.file_name;
file_size = result_data.file_size; file_size = result_data.file_size;
} }
......
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