<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: hp  
    $Date: 2015-2-4 下午6:29:21  
    $Revision: 1.0  
    $Purpose: 
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" needAccessControl="false">
    <bm:operations>
        <bm:operation name="execute">
                <bm:update-sql><![CDATA[
                    BEGIN
                       ${@header_result}:= con_contract_penalty_pkg.insert_header_data( p_penalty_reduce_id  =>${@penalty_reduce_id},
                                                                                      p_base_date            =>to_date(${@base_date},'yyyy-mm-dd'),
                                                                                      p_penalty_reduction    =>${@penalty_reduction},
                                                                                      p_reduce_amount_total  =>${@reduce_amount_total},
                                                                                      p_reduce_amount_total_ratio  =>${@reduce_amount_total_ratio},
                                                                                      p_user_id              =>${/session/@user_id});
                    END;
                ]]></bm:update-sql>
                <bm:parameters>
                    <bm:parameter name="header_result" databaseType="VARCHAR2" datatype="java.lang.String" output="true" outputPath="@header_result"/>
                </bm:parameters>
            </bm:operation>
        <bm:operation name="update">
            <bm:update-sql><![CDATA[
                BEGIN
                   ${@line_result}:= con_contract_penalty_pkg.insert_data( p_penalty_info_id =>${@penalty_info_id},
                        p_penalty_reduce_amount  =>${@penalty_reduce_amount},
                        p_user_id                =>${/session/@user_id});
                END;
            ]]></bm:update-sql>
            <bm:parameters>
                <bm:parameter name="line_result" databaseType="VARCHAR2" datatype="java.lang.String" output="true" outputPath="@line_result"/>
            </bm:parameters>
        </bm:operation>
    </bm:operations>
</bm:model>
