Commit 80dd9ee9 authored by chenzhuo's avatar chenzhuo

注册时机构及经办人信息校验

parent 434d5031
<?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.bp_count,0,'1','0') existsFlag
from (select count(1) bp_count from hls_bp_master h,
hls_bp_master_signer hb
where h.social_code = ${@social_code}
and h.bp_name = ${@bp_name}
and hb.id_card = ${@agent_id_no}
and hb.name = ${@agent_name}
and h.bp_id = hb.bp_id
and h.enabled_flag = 'Y'
and h.bp_class = 'ORG') v
]]></bm:query-sql>
</bm:operation>
</bm:operations>
<bm:fields>
<bm:field name="existsFlag"/>
</bm:fields>
</bm:model>
<?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 existsFlag_map;
var existsFlag;
try {
var existsFlag_query = $bm('wx.WX100.con_contract_query');
existsFlag_map = existsFlag_query.queryAsMap({
social_code:$ctx.parameter.idNo,
bp_name:$ctx.parameter.name,
agent_id_no:$ctx.parameter.agentIdNo,
agent_name:$ctx.parameter.agentName
});
var existsFlag_details = existsFlag_map.getChildren();
existsFlag = existsFlag_details[0].existsFlag;
$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);
existsFlag = '1'
}
//返回结果
var result = {
code: $ctx.parameter.return_status,
message: $ctx.parameter.return_message,
existsFlag: existsFlag
};
$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