Commit 55047458 authored by congzhao's avatar congzhao

电子合同开发 11.19

parent ffc37692
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author:zc
$Date: 2020年11月19日 09点37分
$Revision: 1.0
$Purpose:
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm">
<bm:operations>
<bm:operation name="update">
<bm:update-sql><![CDATA[
begin
hl_con_contract_content_pkg.contract_et_content_create(
p_contract_id =>${@contract_id},
p_content_id =>${@content_id},
p_user_id =>${/session/@user_id},
p_templet_usage =>${@templet_usage},
p_content_type =>${@content_type},
p_ccr_document_type => ${@ccr_document_type}
);
end;
]]></bm:update-sql>
</bm:operation>
</bm:operations>
</bm:model>
......@@ -7,6 +7,7 @@
wx_ele_contract_pkg.update_ele_con_info(p_contract_id => ${@contract_id},
p_id_no => ${@id_no},
p_sign_url => ${@sign_url},
p_esign_type => ${@esign_type},
p_user_id => nvl(${/session/@user_id},1)
);
END;
......
......@@ -14,6 +14,7 @@
<bm:field name="id_no"/>
<bm:field name="mobile"/>
<bm:field name="signer_category"/>
<bm:field name="esign_type"/>
</bm:fields>
<bm:operations>
<bm:operation name="query">
......@@ -25,7 +26,8 @@
cs.id_type,
cs.id_no,
cs.mobile,
hs.signer_category
hs.signer_category,
cs.esign_type
from con_contract_ele_signer cs, hls_doc_file_templet_signer hs
where cs.templet_signer_id = hs.templet_signer_id) t
#WHERE_CLAUSE#
......@@ -35,5 +37,6 @@
<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>
......@@ -42,7 +42,8 @@
hs.sign_type,
hs.signer_category
from con_contract_ele_signer cs, hls_doc_file_templet_signer hs
where cs.templet_signer_id = hs.templet_signer_id) t
where cs.templet_signer_id = hs.templet_signer_id
and cs.esign_type = 'CE') t
#WHERE_CLAUSE#
]]></bm:query-sql>
</bm:operation>
......
......@@ -23,7 +23,8 @@
from con_contract_content t,con_ele_signer_file cf
where t.contract_id = ${@contract_id}
and t.templet_id = cf.templet_id
and cf.con_ele_signer_id = ${@con_ele_signer_id})
and cf.con_ele_signer_id = ${@con_ele_signer_id}
and cf.templet_code != 'SETTLE_ADVANCE_OEC')
]]></bm:query-sql>
</bm:operation>
</bm:operations>
......
......@@ -6,20 +6,17 @@
BEGIN
UPDATE con_contract_ele_signer cs
SET cs.ec_sign_status = 'Y',
cs.sign_time = to_date(${sign_time},'yyyy-mm-dd HH:mm:ss'),
cs.sign_result = ${sign_result},
cs.sign_time = to_date(${@sign_time},'yyyy-mm-dd HH24:MI:SS'),
cs.sign_result = ${@sign_result},
cs.last_update_date = sysdate
WHERE cs.contract_id =
(select c.contract_id
from con_contract c
where c.ele_flow_id = ${flow_id}
and c.data_class = 'NORMAL')
AND cs.id_no = ${id_no};
WHERE cs.contract_id = ${@contract_id}
AND cs.id_no = ${@id_no}
AND cs.esign_type = 'ET';
update con_contract cc
set cc.ec_sign_type = 'SIGNING',
cc.last_update_date = sysdate
where cc.ele_flow_id = ${flow_id};
where cc.ele_flow_id = ${@flow_id};
END;
]]></bm:update-sql>
</bm:operation>
......@@ -29,32 +26,11 @@
update con_contract cc
set cc.ec_sign_type = 'SIGNED',
cc.sign_contract_status = 'SIGN',
cc.flow_status = ${flow_status},
cc.end_time = to_date(${end_time},'yyyy-mm-dd HH:mm:ss'),
cc.flow_status = ${@flow_status},
cc.end_time = to_date(${@end_time},'yyyy-mm-dd HH24:MI:SS'),
cc.last_update_date = sysdate
where cc.ele_flow_id = ${flow_id};
insert into con_ele_signed_file_list
(signed_file_list_id,
flow_id,
file_id,
file_name,
file_download_url,
creation_date,
created_by,
last_updated_by,
last_update_date)
values
(CON_ELE_SIGNED_FILE_LIST_S.NEXTVAL,
${@flow_id},
${@file_id},
${@file_name},
${@file_download_url},
sysdate,
nvl(${/session/@user_id},1),
nvl(${/session/@user_id},1),
sysdate
);
where cc.ele_flow_id = ${@flow_id}
and cc.contract_id = ${@contract_id};
END;
]]></bm:update-sql>
</bm:operation>
......
......@@ -22,7 +22,8 @@
(select t.content_id
from con_contract_content t,con_ele_signer_file cf
where t.contract_id = ${@contract_id}
and t.templet_id = cf.templet_id)
and t.templet_id = cf.templet_id
and cf.templet_code != 'SETTLE_ADVANCE_OEC')
]]></bm:query-sql>
</bm:operation>
</bm:operations>
......
<?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="con_ele_signer_id"/>
<bm:field name="contract_id"/>
<bm:field name="bp_id"/>
<bm:field name="bp_name"/>
<bm:field name="id_type"/>
<bm:field name="id_no"/>
<bm:field name="templet_signer_id"/>
<bm:field name="ec_sign_status"/>
<bm:field name="templet_id"/>
<bm:field name="indentity_type"/>
<bm:field name="key_word"/>
<bm:field name="auto_sign"/>
<bm:field name="sign_order"/>
<bm:field name="sign_type"/>
<bm:field name="signer_category"/>
</bm:fields>
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
select * from (select cs.con_ele_signer_id,
cs.contract_id,
cs.bp_id,
cs.bp_name,
cs.id_type,
cs.id_no,
cs.templet_signer_id,
cs.ec_sign_status,
hs.templet_id,
hs.indentity_type,
hs.key_word,
nvl(hs.auto_sign,'N') auto_sign,
hs.sign_order,
hs.sign_type,
hs.signer_category
from con_contract_ele_signer cs, hls_doc_file_templet_signer hs
where cs.templet_signer_id = hs.templet_signer_id
and cs.esign_type = 'ET') t
#WHERE_CLAUSE#
]]></bm:query-sql>
</bm:operation>
<bm:operation name="update">
<bm:update-sql><![CDATA[
begin
wx_ele_contract_pkg.et_contract_signer_save(
p_contract_id =>${@contract_id},
p_user_id =>nvl(${/session/@user_id},1)
);
end;
]]></bm:update-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-fields>
</bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm">
<bm:operations>
<bm:operation name="update">
<bm:update-sql><![CDATA[
BEGIN
UPDATE con_contract_change_req c
SET c.ele_flow_id = ${@flow_id},
c.ec_sign_type = 'INITIATE',
c.sign_type = 'ELE_SIGN',
c.last_updated_by = nvl(${/session/@user_id},1),
c.last_update_date = sysdate
WHERE c.contract_id = ${@contract_id};
END;
]]></bm:update-sql>
</bm:operation>
</bm:operations>
</bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: zc
$Date: 2020年11月9日
$Revision: 1.0
$Purpose:
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm">
<bm:fields>
<bm:field name="file_name"/>
<bm:field name="file_path"/>
<bm:field name="file_size"/>
</bm:fields>
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
select fa.file_name,fa.file_path,fa.file_size
from fnd_atm_attachment fa, fnd_atm_attachment_multi fm
where fa.attachment_id = fm.attachment_id
and fm.table_name = 'CON_CONTRACT_CONTENT'
and fm.table_pk_value in
(select t.content_id
from con_contract_content t,con_ele_signer_file cf
where t.contract_id = ${@contract_id}
and t.templet_id = cf.templet_id
and cf.con_ele_signer_id = ${@con_ele_signer_id}
and cf.templet_code = 'SETTLE_ADVANCE_OEC')
]]></bm:query-sql>
</bm:operation>
</bm:operations>
</bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm">
<bm:operations>
<bm:operation name="update">
<bm:update-sql><![CDATA[
BEGIN
UPDATE con_contract_ele_signer cs
SET cs.ec_sign_status = 'Y',
cs.sign_time = to_date(${@sign_time},'yyyy-mm-dd HH24:MI:SS'),
cs.sign_result = ${@sign_result},
cs.last_update_date = sysdate
WHERE cs.contract_id = ${@contract_id}
AND cs.id_no = ${@id_no}
AND cs.esign_type = 'ET';
update con_contract_change_req cc
set cc.ec_sign_type = 'SIGNING',
cc.last_update_date = sysdate
where cc.ele_flow_id = ${@flow_id};
END;
]]></bm:update-sql>
</bm:operation>
<bm:operation name="insert">
<bm:update-sql><![CDATA[
BEGIN
update con_contract_change_req cc
set cc.ec_sign_type = 'SIGNED',
cc.flow_status = ${@flow_status},
cc.end_time = to_date(${@end_time},'yyyy-mm-dd HH24:MI:SS'),
cc.last_update_date = sysdate
where cc.ele_flow_id = ${@flow_id}
and cc.contract_id = ${@contract_id};
END;
]]></bm:update-sql>
</bm:operation>
</bm:operations>
</bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: zc
$Date: 2020年11月11日
$Revision: 1.0
$Purpose:
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm">
<bm:fields>
<bm:field name="file_name"/>
<bm:field name="file_path"/>
<bm:field name="file_size"/>
</bm:fields>
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
select fa.file_name,fa.file_path,fa.file_size
from fnd_atm_attachment fa, fnd_atm_attachment_multi fm
where fa.attachment_id = fm.attachment_id
and fm.table_name = 'CON_CONTRACT_CONTENT'
and fm.table_pk_value in
(select t.content_id
from con_contract_content t,con_ele_signer_file cf
where t.contract_id = ${@contract_id}
and t.templet_id = cf.templet_id
and cf.templet_code = 'SETTLE_ADVANCE_OEC')
]]></bm:query-sql>
</bm:operation>
</bm:operations>
</bm:model>
......@@ -16,6 +16,8 @@
url="${/request/@context_path}/uploadFile.lview"/>
<a:link id="${/parameter/@layout_code}_prj500_cdd_downloadFile_id"
url="${/request/@context_path}/downloadFile.lview"/>
<a:link id="${/parameter/@layout_code}_con_ele_terminate_create_link_id"
url="${/request/@context_path}/modules/wx/WX100/con_ele_terminate_create.lsc"/>
<script src="${/request/@context_path}/javascripts/lightbox.js" type="text/javascript"/>
<link href="${/request/@context_path}/css/lightbox.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript"><![CDATA[
......@@ -293,6 +295,39 @@
});
});
};
//提前结清发起电子签署 add by 24976
window['${/parameter/@layout_code}_user_button4_layout_dynamic_click'] = function() {
var req_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'F_BASE_01', 'con_contract_change_req');
var req_record = $(req_ds_id).getAt(0);
var req_status = req_record.get('req_status');
var contact_id = req_record.get('contact_id');
if (req_status != 'NEW') {
Leaf.showMessage('${l:PROMPT}', '只有新建状态的才能发起电子签约');
return;
}
Leaf.showConfirm('${l:HLS.PROMPT}', '是否确认发起电子签约?', function () {
$('${/parameter/@layout_code}_user_button3').disable();
window['${/parameter/@bp_seq}${/parameter/@layout_code}_lock_layout_dynamic_window']();
Leaf.request({
url: $('${/parameter/@layout_code}_con_ele_terminate_create_link_id').getUrl(),
para: {
contract_id: contact_id
},
success: function(res) {
window['${/parameter/@bp_seq}${/parameter/@layout_code}_unlock_layout_dynamic_window']();
$('${/parameter/@winid}').close();
},
failure: function() {
window['${/parameter/@bp_seq}${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
error: function() {
window['${/parameter/@bp_seq}${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
scope: this
});
});
}
window['${/parameter/@layout_code}_on_layout_dynamic_grid_load'] = function (ds, qpara, bp_seq) {
};
......
......@@ -160,7 +160,8 @@
//合同签署人信息
var ele_signer_bm = $bm('wx.WX100.con_ele_contract_signer_query');
var ele_signer_map = ele_signer_bm.queryAsMap({
contract_id: $ctx.parameter.contract_id
contract_id: $ctx.parameter.contract_id,
esign_type:'CE'
});
var ele_signer_data = ele_signer_map.getChildren();
var userInfoList = [];
......@@ -270,6 +271,7 @@
var httpUrl = info.code_value;
var signParam = {
contractNo:$ctx.parameter.contract_id,
esignType:"CE",
userInfo:userInfoList,
conFileList:conFileList,
signer:signer
......@@ -310,7 +312,8 @@
ele_con_info_bm.update({
contract_id:$ctx.parameter.contract_id,
id_no:sign_url_list[i].idNo,
sign_url:sign_url_list[i].signUrl
sign_url:sign_url_list[i].signUrl,
esign_type:'CE'
})
}
}
......
......@@ -6,10 +6,30 @@
importPackage(Packages.java.util);
function con_sign_status_update() {
try {
var signer_status_update_bm = $bm('wx.WX100.con_ele_signer_status_update');
//获取传输过来的数据
/* var data = $ctx.parameter.requestData;
var data_ob=JSON.parse(data);*/
var contract_no= $ctx.parameter.contractNo;
var data = "action:" + $ctx.parameter.action + ",contractNO:" + $ctx.parameter.idNo + ",flowId:" + $ctx.parameter.flowId;
var logs_bm = $bm('wx.WX100.con_ele_savelogs');
logs_bm.insert({
contract_id:contract_no,
httpurl:'回调接口',
jsonPut:null,
jsonResult:data.toString(),
tokenResult:null
});
var signer_status_update_bm;
if ($ctx.parameter.esignType == 'CE'){
signer_status_update_bm= $bm('wx.WX100.con_ele_signer_status_update');
}else if ($ctx.parameter.esignType == 'ET') {
signer_status_update_bm = $bm('wx.WX100.con_et_signer_status_update');
}
//个人签署完成
if ($ctx.parameter.action == 'SIGN_FLOW_UPDATE'){
signer_status_update_bm.update({
contract_id:contract_no,
flow_id:$ctx.parameter.flowId,
id_no:$ctx.parameter.idNo,
sign_time:$ctx.parameter.signTime,
......@@ -21,14 +41,12 @@
//合同签署完成
else if($ctx.parameter.action == 'SIGN_FLOW_FINISH'){
var docsList = $ctx.parameter.docsList;
for (var i = 0; i < conFileList.length ; i++){
for (var i = 0; i < docsList.length ; i++){
signer_status_update_bm.insert({
contract_id:contract_no,
flow_id:$ctx.parameter.flowId,
flow_status:$ctx.parameter.flowStatus,
end_time:$ctx.parameter.endTime,
file_id:docsList[i].fileId,
file_name:docsList[i].fileName,
file_download_url:docsList[i].fileUrl
end_time:$ctx.parameter.endTime
});
}
$ctx.parameter.return_status = '0';
......
This diff is collapsed.
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