<?xml version="1.0" encoding="UTF-8"?>
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm">
    <bm:operations>
        <bm:operation name="execute">
            <bm:parameters>
                <bm:parameter name="check_id" output="true" outputPath="@check_id"/>
            </bm:parameters>
            <bm:update-sql><![CDATA[
                BEGIN
                    hn_prj_check_pkg.hn_prj_check_actual_save(p_check_id  =>${@check_id},
                                     p_plan_id             =>${@plan_id},
                                     p_actual_check_person =>${@actual_check_person},
                                     p_actual_check_date   =>to_date(${@actual_check_date},'YYYY-MM-DD'),
                                     p_actual_check_method =>${@actual_check_method},
                                     p_check_description   =>${@check_description},
                                     p_company_id          =>${/session/@company_id},
                                     p_user_id             =>${/session/@user_id});
                END;
            ]]></bm:update-sql>
        </bm:operation>
        <bm:operation name="delete">
            <bm:update-sql><![CDATA[
                BEGIN
                    hn_prj_check_pkg.hn_prj_check_actual_del(p_check_id =>${@check_id}, p_user_id =>${/session/@user_id});
                END;
            ]]></bm:update-sql>
        </bm:operation>
        <bm:operation name="update">
            <bm:update-sql><![CDATA[
                BEGIN
                    hn_prj_check_pkg.hn_prj_check_actual_submit(p_check_id =>${@check_id},
                                       p_company_id =>${/session/@company_id},
                                       p_user_id    =>${/session/@user_id});
                END;
            ]]></bm:update-sql>
        </bm:operation>
        <bm:operation name="insert">
            <bm:update-sql><![CDATA[
                BEGIN
                    hn_prj_check_pkg.update_risk_info(p_check_id =>${@check_id},
                             p_tenant_operate_risk     =>${@tenant_operate_risk},
                             p_tenant_sec_operate_risk =>${@tenant_sec_operate_risk},
                             p_guarantor_operate_risk  =>${@guarantor_operate_risk},
                             p_user_id                 =>${/session/@user_id});
                END;
            ]]></bm:update-sql>
        </bm:operation>
    </bm:operations>
</bm:model>
