<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: hsx
    $Date: 2018-8-14 下午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="update">
            <bm:update-sql><![CDATA[
                BEGIN
                    ${@calc_result} := con_contract_penalty_pkg.calc_data(p_company_id => ${/session/@company_id},
                                                               p_contract_id => ${@copy_contract_id},
                                                               p_calc_date => to_date(${@base_date},'yyyy-mm-dd'),
                                                               p_user_id => ${/session/@user_id});
                END;
            ]]></bm:update-sql>
            <bm:parameters>
                 <bm:parameter name="calc_result" input="false" output="true" outputPath="@calc_result"/>
            </bm:parameters>
        </bm:operation>
        <bm:operation name="execute">
            <bm:update-sql><![CDATA[
                BEGIN
                    ${@assign_calc_result} := con_contract_penalty_pkg.assign_penalty( p_contract_id => ${@copy_contract_id},
                                                                            p_user_id => ${/session/@user_id});
                END;
            ]]></bm:update-sql>
            <bm:parameters>
                 <bm:parameter name="assign_calc_result" input="false" output="true" outputPath="@assign_calc_result"/>
            </bm:parameters>
        </bm:operation>
    </bm:operations>
</bm:model>
