<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: gaoyang  
    $Date: 2013-9-27 上午09:52:30  
    $Revision: 1.0  
    $Purpose: 
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm">
    <bm:operations>

        <bm:operation name="execute">
            <bm:parameters>
                <bm:parameter name="document_category" dataType="java.lang.String" input="true" output="false"/>
                <bm:parameter name="document_type" dataType="java.lang.String" input="true" output="false"/>
                <bm:parameter name="company_id" dataType="java.lang.Long" input="true" output="false"/>
                <bm:parameter name="user_id" dataType="java.lang.Long" input="true" output="false"/>
                <bm:parameter name="document_number" dataType="java.lang.String" input="false" output="true"/>
            </bm:parameters>
            <bm:update-sql><![CDATA[
                begin

                  HLS_DOCUMENT_SAVE_PKG.GET_NEW_LEND_NUMBER(
                        p_document_category=>${@document_category},
                        p_document_type=>${@document_type},
                        p_company_id=>${/session/@company_id},
                        p_user_id=>${/session/@user_id},
                        p_document_number=>${@document_number});

                end;]]></bm:update-sql>
        </bm:operation>

        <bm:operation name="update">
            <bm:update-sql><![CDATA[
                BEGIN
                       con_contract_pkg.document_lend_record_submit(
                        p_lend_header_id=>${@lend_header_id},
                        p_user_id=>${/session/@user_id});

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