<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: hp  
    $Date: 2014-7-16 下午2:55:07  
    $Revision: 1.0  
    $Purpose: 
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" alias="t1" needAccessControl="false">
    <bm:operations>
        <bm:operation name="query">
            <bm:query-sql><![CDATA[
                 select l.batch_id,l.line_id,l.message from cus_con_contract_log l
                
                 #WHERE_CLAUSE#
            ]]></bm:query-sql>
        </bm:operation>
        <bm:operation name="delete">
            <bm:update-sql><![CDATA[
        
                 begin
				  cus_collector_import_pkg.delete_interface(p_batch_id => ${@batch_id});
				end; 
               ]]></bm:update-sql>
        </bm:operation>
        <bm:operation name="insert">
            <bm:parameters>
                <bm:parameter name="err_count" output="true" outputPath="/parameter/@err_count"/>
            </bm:parameters>
            <bm:update-sql><![CDATA[
                BEGIN
                    cus_collector_import_pkg.import_interface(p_batch_id => ${@batch_id},
										                       p_header_id => ${@header_id},
										                       p_user_id => ${/session/@user_id},
										                       p_company_id => ${/session/@company_id}, 
										                       p_err_count => ${@err_count});
                END;
            ]]></bm:update-sql>
        </bm:operation>
    </bm:operations>
    <bm:fields>
        <bm:field name="batch_id"/>
        <bm:field name="line_id"/>
        <bm:field name="message"/>
    </bm:fields>
    <bm:query-fields>
        <bm:query-field field="batch_id" queryOperator="="/>
    </bm:query-fields>
</bm:model>
