<?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="plate_vender" dataType="java.lang.String" input="true" output="false"/>
                <bm:parameter name="contract_lease_item_id" dataType="java.lang.Long" input="true" output="false"/>
                <bm:parameter name="serial_number" dataType="java.lang.String" input="true" output="false"/>
                <bm:parameter name="user_id" dataType="java.lang.Long" input="true" output="false"/>
            </bm:parameters>
            <bm:update-sql><![CDATA[
                begin
                   if ${@plate_vender} = 'TZ' then
                   	CUS_GPS_PKG.GPS_GET_REAL_TIME
                    (
                        p_contract_lease_item_id=>${@contract_lease_item_id},
                        p_serial_number=>${@serial_number},
                        p_user_id=>${/session/@user_id}
                    );
                    CUS_GPS_PKG.gps_get_real_status
                    (
                        p_contract_lease_item_id=>${@contract_lease_item_id},
                        p_serial_number=>${@serial_number},
                        p_user_id=>${/session/@user_id}
                    );
                   elsif ${@plate_vender} = 'TB' then
                   	CUS_GPS_PKG.gps_pl522_realtime
                   	   (p_contract_lease_item_id=>${@contract_lease_item_id},
                        p_serial_number=>${@serial_number},
                        p_user_id=>${/session/@user_id});
                   end if;
                    
                end;]]></bm:update-sql>
        </bm:operation>
    </bm:operations>
</bm:model>
