<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: hand  
    $Date: 2016-5-17 下午3:56:18  
    $Revision: 1.0  
    $Purpose: 
-->
<bm:model xmlns:f="leaf.database.features" xmlns:bm="http://www.leaf-framework.org/schema/bm">
    <bm:operations>
        <bm:operation name="update">
            <bm:update-sql><![CDATA[
                BEGIN
                    IF ${@storage_flag}='Y' THEN
                        UPDATE
                            con_contract_location c
                        SET
                            c.storage_flag='N'
                        WHERE
                            c.location_id=${@location_id};
                    ELSE
                        UPDATE
                            con_contract_location c
                        SET
                            c.storage_flag='Y'
                        WHERE
                            c.location_id=${@location_id};
                    END IF;
                END;
            ]]></bm:update-sql>
        </bm:operation>
        <bm:operation name="execute">
            <bm:update-sql><![CDATA[
                BEGIN
                    UPDATE
                        con_contract_location c
                    SET
                        c.express_out_flag='Y',
                        c.express_out_time=sysdate
                    WHERE
                        c.location_id=${@location_id};
                END;
            ]]></bm:update-sql>
        </bm:operation>
    </bm:operations>
</bm:model>
