<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: gaoyang  
    $Date: 2015-11-13 下午03:23:39  
    $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[
            	declare
            	 v_batch_number varchar2(200);
            	begin
            		if ${@batch_number} is null then
	            		v_batch_number:=con_contract_change_req_pkg.get_con_change_req_number
				                        (p_document_type => ${@document_type},
				                         p_document_category => ${@document_category},
				                         p_company_id    => ${/session/@company_id},
				                         p_req_date      => ${@batch_date},
				                         p_user_id       => ${/session/@user_id}
				                        );
				        update con_flt_int_rate_req_batch t
				        set t.batch_number = v_batch_number
				        where t.batch_id = ${@batch_id};
				        ${@batch_number}:= v_batch_number;
			        end if;
            	end;
            ]]></bm:update-sql>
            <bm:parameters>
                <bm:parameter name="batch_number" dataType="java.lang.String" output="true" outputPath="@batch_number"/>
            </bm:parameters>
        </bm:operation>
    </bm:operations>
</bm:model>
