<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: qwm  
    $Date: 2013-7-18 下午7:01:56  
    $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="et_agreement_id" dataType="java.lang.Long" input="true" output="false" required="true"/>
                <bm:parameter name="user_id" dataType="java.lang.Long" input="true" output="false"/>
                <bm:parameter name="recovered_amount" dataType="java.lang.Double" input="true" output="false"/>
                <bm:parameter name="loss_assets_amount" dataType="java.lang.Double" input="true" output="false"/>
                <bm:parameter name="dealers_amount" dataType="java.lang.Double" input="true" output="false"/>
                <bm:parameter name="risk_amount" dataType="java.lang.Double" input="true" output="false"/>
                <bm:parameter name="sum_due_amount" dataType="java.lang.Double" input="true" output="false"/>
                <bm:parameter name="sum_principal" dataType="java.lang.Double" input="true" output="false"/>
                <bm:parameter name="sum_interest" dataType="java.lang.Double" input="true" output="false"/>
                <bm:parameter name="et_agreement_number" input="true" output="true"/>
            </bm:parameters>
            <bm:update-sql><![CDATA[
                begin
                    CON_CONTRACT_ET_PKG.AD_SAVE
                    (
                        p_et_agreement_id=>${@et_agreement_id},
                        p_user_id=>${/session/@user_id},
                        p_recovered_amount=>${@recovered_amount},
                        p_loss_assets_amount =>${@loss_assets_amount},
                        p_dealers_amount =>${@dealers_amount},
                        p_risk_amount =>${@risk_amount},
                        p_loss_due_amount =>${@sum_due_amount},
                        p_loss_principal_amount =>${@sum_principal},
                        p_loss_interest_amount =>${@sum_interest},
                        p_write_off_desc_loss =>${@write_off_desc_loss},
                        p_et_agreement_number=>${@et_agreement_number}
                    );
                end;]]></bm:update-sql>
        </bm:operation>
        <bm:operation name="update">
            <bm:parameters>
                <bm:parameter name="et_agreement_id" dataType="java.lang.Long" input="true" output="false" required="true"/>
                <bm:parameter name="user_id" dataType="java.lang.Long" input="true" output="false"/>
                <bm:parameter name="recovered_amount" dataType="java.lang.Double" input="true" output="false"/>
                <bm:parameter name="loss_assets_amount" dataType="java.lang.Double" input="true" output="false"/>
                <bm:parameter name="dealers_amount" dataType="java.lang.Double" input="true" output="false"/>
            </bm:parameters>
            <bm:update-sql><![CDATA[
                begin
                    CON_CONTRACT_ET_PKG.AD_SAVE_WFL
                    (
                        p_et_agreement_id=>${@et_agreement_id},
                        p_user_id=>${/session/@user_id},
                        p_recovered_amount=>${@recovered_amount},
                        p_loss_assets_amount =>${@loss_assets_amount},
                        p_dealers_amount =>${@dealers_amount},
                        p_write_off_desc_loss =>${@write_off_desc_loss}
                    );
                end;]]></bm:update-sql>
        </bm:operation>
    </bm:operations>
</bm:model>
