<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: wangwei  
    $Date: 2014-12-19 下午7:07:43  
    $Revision: 1.0  
    $Purpose: 
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm">
    <bm:operations>
        <bm:operation name="update">
            <bm:parameters>
                <bm:parameter name="cdd_list_id" dataType="java.lang.Long" input="true" output="true" outputPath="@cdd_list_id"/>
            </bm:parameters>
            <bm:update-sql><![CDATA[
                BEGIN
                    hls_bp_master_pkg.check_bp_master_role(p_bp_id =>${@bp_id}, p_user_id =>${/session/@user_id});
                    -- 校验组织机构代码，身份证号，配偶身份证号
                    hls_bp_master_pkg.check_bp_class(p_bp_id => ${@bp_id}, p_user_id => ${/session/@user_id});
                    -- Call the procedure
                    hls_bp_master_pkg.create_cdd(p_document_type =>${@document_type}, p_document_id =>${@bp_id}, p_company_id =>${/session/@company_id}, p_function_code =>${@function_code}, p_function_usage =>${@function_usage}, p_user_id =>${/session/@user_id}, p_cdd_list_id =>${@cdd_list_id});
                    hls_bp_master_pkg.bp_create_user_authority(p_bp_id => ${@bp_id}, p_user_id => ${/session/@user_id}, p_company_id => ${/session/@company_id});
                    --校验简称
                    hls_bp_master_pkg.check_extra_name(p_extra_nam => ${@extra_nam},p_bp_id => ${@bp_id}, p_user_id => ${/session/@user_id});
                    hls_bp_master_pkg.check_lease_item_agent(
            			p_bp_id =>${@bp_id},
            			p_division   =>${@division},
            			p_user_id =>${/session/@user_id}

        			);
                END;
            ]]></bm:update-sql>
        </bm:operation>
    </bm:operations>
</bm:model>
