Commit 28b7fd0d authored by congzhao's avatar congzhao

Merge remote-tracking branch 'origin/feature/建机电子合同开发' into 建机电子合同开发

parents 59416a53 d5bc8bb5
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
and rownum =1) cf_item, --项目 and rownum =1) cf_item, --项目
to_char(nvl(cc.due_amount, 0), to_char(nvl(cc.due_amount, 0),
'FM9,999,999,999,990.00') due_amount, --应付金额 'FM9,999,999,999,990.00') due_amount, --应付金额
to_char(nvl(cc.received_amount, 0), to_char(nvl(cc.due_amount, 0)-nvl(cc.received_amount, 0),
'FM9,999,999,999,990.00') received_amount, --已付金额 'FM9,999,999,999,990.00') received_amount, --已付金额
(case (case
when cc.write_off_flag = 'FULL' then when cc.write_off_flag = 'FULL' then
......
<?xml version="1.0" encoding="UTF-8"?>
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm">
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
select decode(v.con_num,0,'N','Y') statusFlag from (
select count(1) con_num from con_contract cc
where cc.data_class = 'NORMAL'
and cc.sign_type = 'ELE_SIGN'
and cc.sign_contract_status = 'SIGNING'
and cc.ec_sign_type in ('INITIATE', 'SIGNING')
and cc.contract_id in (
select distinct t.contract_id from CON_CONTRACT_ELE_SIGNER t
where t.bp_name = ${@bp_name}
and t.id_no = ${@id_no}
and t.id_type = 'IdCard')) v
]]></bm:query-sql>
</bm:operation>
</bm:operations>
<bm:fields>
<bm:field name="statusFlag"/>
</bm:fields>
</bm:model>
...@@ -9,30 +9,30 @@ ...@@ -9,30 +9,30 @@
var contract_list_map; var contract_list_map;
var inputData = $ctx.parameter.inputData; var inputData = $ctx.parameter.inputData;
var contractStatus = $ctx.parameter.contractStatus; var contractStatus = $ctx.parameter.contractStatus;
if (inputData == null){ if (inputData == null || inputData == ""){
if(contractStatus == null){ if(contractStatus == null || contractStatus == ""){
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 account_type:$ctx.parameter.accountType
}); });
}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, account_type:$ctx.parameter.accountType,
contract_status:contractStatus contract_status:contractStatus
}); });
} }
}else{ }else{
if(contractStatus == null){ if(contractStatus == null || contractStatus == ""){
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, account_type:$ctx.parameter.accountType,
contract_number:inputData contract_number:inputData
}); });
}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, account_type:$ctx.parameter.accountType,
contract_number:inputData, contract_number:inputData,
contract_status:contractStatus contract_status:contractStatus
}); });
...@@ -57,7 +57,6 @@ ...@@ -57,7 +57,6 @@
for (var i = 0;i < contract_list_details.length;i++) { for (var i = 0;i < contract_list_details.length;i++) {
var contract_list_detail = contract_list_details[i]; var contract_list_detail = contract_list_details[i];
var contract_id = contract_list_detail.contract_id; var contract_id = contract_list_detail.contract_id;
//if(ec_sign_type == 'NEW'||ec_sign_type == 'INITIATE' ||ec_sign_type == 'SIGNING') {
var cashflowList = []; var cashflowList = [];
//合同现金流信息查询 //合同现金流信息查询
var lease_items_bm = $bm('wx.WX100.con_cashflow_info'); var lease_items_bm = $bm('wx.WX100.con_cashflow_info');
...@@ -80,13 +79,15 @@ ...@@ -80,13 +79,15 @@
var docsList = []; var docsList = [];
var file_list_bm = $bm('wx.WX100.con_file_download'); var file_list_bm = $bm('wx.WX100.con_file_download');
var file_list_map = file_list_bm.queryAsMap({ var file_list_map = file_list_bm.queryAsMap({
contract_id: contract_id contract_id: contract_id,
id_no:$ctx.parameter.idNo
}); });
var file_list_details = file_list_map.getChildren(); var file_list_details = file_list_map.getChildren();
for (var j = 0; j < file_list_details.length; j++) { for (var j = 0; j < file_list_details.length; j++) {
docsList.push({ docsList.push({
fileName: file_list_details[j].file_name, fileName: file_list_details[j].file_name,
fileUrl: file_list_details[j].file_path fileUrl: file_list_details[j].file_path,
attachmentId: file_list_details[j].attachment_id
}); });
} }
Contracts.push({ Contracts.push({
...@@ -94,6 +95,7 @@ ...@@ -94,6 +95,7 @@
"flowId": contract_list_detail.ele_flow_id, "flowId": contract_list_detail.ele_flow_id,
"contractNumber": contract_list_detail.contract_number, "contractNumber": contract_list_detail.contract_number,
"telentName": contract_list_detail.bp_id_tenant_n, "telentName": contract_list_detail.bp_id_tenant_n,
"telentType":contract_list_detail.bp_id_tenant_type,
"agentName": contract_list_detail.bp_id_agent_level1_n, "agentName": contract_list_detail.bp_id_agent_level1_n,
"serialNo": contract_list_detail.machine_number, "serialNo": contract_list_detail.machine_number,
"contractStatus": contract_list_detail.contract_status_n, "contractStatus": contract_list_detail.contract_status_n,
...@@ -102,14 +104,13 @@ ...@@ -102,14 +104,13 @@
"endDay":contract_list_detail.lease_end_date, "endDay":contract_list_detail.lease_end_date,
"dueDay":contract_list_detail.due_day, "dueDay":contract_list_detail.due_day,
"signAmt": contract_list_detail.total_sign, "signAmt": contract_list_detail.total_sign,
"bank":contract_list_detail.dd_bank_branch_name, "bank":contract_list_detail.bank_full_name,
"bankName":contract_list_detail.dd_bank_account_name, "bankName":contract_list_detail.bank_account_name,
"bankNum":contract_list_detail.dd_bank_account_num, "bankNum":contract_list_detail.bank_branch_num,
"dueAmountAll":contract_list_detail.due_amount_all, "dueAmountAll":contract_list_detail.due_amount_all,
"cashflowList":cashflowList, "cashflowList":cashflowList,
"docsList": docsList "docsList": docsList
}); });
// }
} }
} }
$ctx.parameter.json = JSON.stringify(result); $ctx.parameter.json = JSON.stringify(result);
......
<?xml version="1.0" encoding="UTF-8"?>
<a:service xmlns:ns1="leaf.application.action" xmlns:p="uncertain.proc" xmlns:a="http://www.leaf-framework.org/application" xmlns:s="leaf.plugin.script" trace="true">
<a:init-procedure>
<s:server-script import="app/app_login_check.js"><![CDATA[
function con_bp_master_query() {
var statusFlag_map;
var statusFlag;
try {
var statusFlag_query = $bm('wx.WX100.con_contract_status_query');
statusFlag_map = statusFlag_query.queryAsMap({
bp_name:$ctx.parameter.name,
id_no:$ctx.parameter.idNo
});
var statusFlag_details = statusFlag_map.getChildren();
statusFlag = statusFlag_details[0].statusFlag;
$ctx.parameter.return_status = '0';
$ctx.parameter.return_message = '执行成功';
} catch (e) {
$ctx.success = "false";
$ctx.parameter.return_status = '1';
$ctx.parameter.return_message = String(e);
statusFlag = 'Y'
}
//返回结果
var result = {
code: $ctx.parameter.return_status,
message: $ctx.parameter.return_message,
statusFlag: statusFlag
};
$ctx.parameter.json = JSON.stringify(result);
}
if ($ctx.parameter.return_status != 'E' && $ctx.parameter.return_status != 'TIMEOUT') {
con_bp_master_query();
}
]]></s:server-script>
</a:init-procedure>
<a:service-output output="/parameter/@json"/>
</a:service>
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