<?xml version="1.0" encoding="UTF-8"?>
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm">
    <bm:operations>
        <bm:operation name="insert">
            <bm:update-sql><![CDATA[
		        begin
		            select hlcm_deposit_calc_batch_s.nextval into ${@batch_id} from dual;
		        end;
        ]]></bm:update-sql>
            <bm:parameters>
                <bm:parameter name="batch_id" dataType="java.lang.Long" input="false" output="true" outputPath="/parameter/@batch_id"/>
            </bm:parameters>
        </bm:operation>
        <bm:operation name="execute">
            <bm:update-sql><![CDATA[
		        begin
		           hlcm_deposit_value_pkg.insert_deposit_apply(p_document_id       => ${@document_id},
                                                             p_apply_calc_type     =>${@apply_calc_type},
                                                             p_inter_period_num    =>${@inter_period_num},
                                                             p_batch_id            => ${../@batch_id},
                                                             p_user_id             =>${/session/@user_id});
		        end;
        ]]></bm:update-sql>
        </bm:operation>
        <bm:operation name="update">
            <bm:update-sql><![CDATA[
		        begin
		           hlcm_deposit_value_pkg.deposit_calc_apply_submit(p_batch_id  => ${@batch_id},
                                                                    p_company_id   => ${/session/@company_id},
		                                                            p_role_id   => ${/session/@role_id},
		                                                            p_user_id   => ${/session/@user_id});
		        end;
        ]]></bm:update-sql>
        </bm:operation>
    </bm:operations>
</bm:model>
