<?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
                con_dff_car_displace_pkg.save_car_info(
                p_contract_lease_item_id => ${@contract_lease_item_id},
                p_contract_id => ${@contract_id},
                p_brand_id => ${/parameter/@brand_id},
                p_series_id => ${/parameter/@series_id},
                p_model_id => ${/parameter/{@model_id},
                p_manufacturer_name => ${/parameter/@manufacturer_name},
                p_color_of_apprearance => ${/parameter/@color_of_apprearance},
                p_configure => ${/parameter/@configure},
                p_factory_date => to_date(${/@factory_date},'yyyy-mm-dd'),
                p_item_frame_number =>  ${/parameter/@item_frame_number},
                p_item_engine_number => ${/parameter/@item_engine_number},
                p_guide_price => ${/parameter/@guide_price},
                p_finance_amount => ${/parameter/@finance_amount},
                p_car_status => ${/parameter/@car_status},
                p_invoice_date =>  to_date(${/@invoice_date},'yyyy-mm-dd'),
                p_invoice_price   => ${/parameter/@invoice_price},
                p_mortgage_flag => ${/parameter/@mortgage_flag},
                p_finance_ratio => ${/parameter/@finance_ratio},
                p_user_id=>${/session/@user_id} ,
                p_car_price => ${/parameter/@car_price});
                end;
            ]]></bm:update-sql>
        </bm:operation>
        <bm:operation name="update">
            <bm:update-sql><![CDATA[
                BEGIN
                    con_dff_car_displace_pkg.submit_car_displace_wfl( p_contract_id => ${@contract_id}, p_user_id=>${/session/@user_id} );
                END;
            ]]></bm:update-sql>
        </bm:operation>
    </bm:operations>
    <bm:fields>
        <bm:field name="1" databaseType="NUMBER" datatype="java.lang.Long" physicalName="1"/>
    </bm:fields>
</bm:model>
