<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: wangwei  
    $Date: 2015-11-12 下午2:15:58  
    $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
            		hls_bp_master_pkg.check_bp_id_card(
            											p_bp_id =>${@bp_id}, 
            											p_user_id =>${/session/@user_id});
                    hls_bp_master_pkg.hn_bp_authorize(p_bp_id =>${@bp_id}, 
                                                      p_company_id =>${/session/@company_id},
            										  p_user_id =>${/session/@user_id});                                         								
            		hls_layout_master_data_pkg.update_master_field(
            			p_document_category =>${@document_category},
                        p_document_id       =>${@bp_id},
                        p_master_id         =>${@bp_id},
                        p_master_type       =>'BP_MASTER',
                        p_company_id        =>${/session/@company_id},
                        p_function_code     =>${@function_code},
                        p_function_usage    =>${@function_usage},
                        p_user_id           =>${/session/@user_id},
                        p_bp_code           =>${@bp_code},
                        p_lease_item_code   =>${@lease_item_code},
                        p_mortgage_code     =>${@mortgage_code}
            		);
            		select cdd_list_id into ${@cdd_list_id} from hls_bp_master bm where bm.bp_id=${@bp_id};
            	end;
            ]]></bm:update-sql>
            <bm:parameters>
                <bm:parameter name="bp_code" dataType="java.lang.String" input="true" inputPath="@bp_code" output="true" outputPath="@bp_code"/>
                <bm:parameter name="lease_item_code" dataType="java.lang.String" input="true" inputPath="@lease_item_code" output="true" outputPath="@lease_item_code"/>
                <bm:parameter name="mortgage_code" dataType="java.lang.String" input="true" inputPath="@mortgage_code" output="true" outputPath="@mortgage_code"/>
                <bm:parameter name="cdd_list_id" output="true" outputPath="@cdd_list_id"/>
            </bm:parameters>
        </bm:operation>
    </bm:operations>
</bm:model>
