<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: WangYu  
    $Date: 2014-11-20 下午04:19:48  
    $Revision: 1.0  
    $Purpose: 
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" xmlns:f="leaf.database.features" alias="t1" baseTable="kingdee_interface_logs" defaultOrderBy="t1.interface_date desc">
    <bm:fields>
        <bm:field name="interface_log_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="INTERFACE_LOG_ID" prompt="kingdee_interface_logs.INTERFACE_LOG_ID"/>
        <bm:field name="interface_type" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="INTERFACE_TYPE" prompt="kingdee_interface_logs.INTERFACE_TYPE"/>
        <bm:field name="source_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="SOURCE_ID" prompt="kingdee_interface_logs.SOURCE_ID"/>
        <bm:field name="source_table" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="SOURCE_TABLE" prompt="kingdee_interface_logs.SOURCE_TABLE"/>
        <bm:field name="interface_deal_message" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="INTERFACE_DEAL_MESSAGE" prompt="kingdee_interface_logs.INTERFACE_DEAL_MESSAGE"/>
        <bm:field name="itfc_exception" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="ITFC_EXCEPTION" prompt="kingdee_interface_logs.ITFC_EXCEPTION"/>
        <bm:field name="external_itfc_num" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="EXTERNAL_ITFC_NUM" prompt="kingdee_interface_logs.EXTERNAL_ITFC_NUM"/>
        <bm:field name="interface_date"/>
        <bm:field name="journal_num" expression="(select a.journal_num from hls_journal_header a where a.journal_header_id=t1.source_id)"/>
    </bm:fields>
    <bm:features>
        <f:standard-who/>
    </bm:features>
    <bm:primary-key>
        <bm:pk-field name="interface_log_id"/>
    </bm:primary-key>
    <bm:query-fields>
        <bm:query-field name="journal_num" queryExpression="exists (select 1 from hls_journal_header a where a.journal_header_id=t1.source_id and a.journal_num=${@journal_num} )"/>
        <bm:query-field field="external_itfc_num" queryOperator="like"/>
        <bm:query-field name="start_date" queryExpression="trunc(t1.interface_date)&gt;=to_date(${@start_date},&apos;yyyy-mm-dd&apos;)"/>
        <bm:query-field name="end_date" queryExpression="trunc(t1.interface_date)&lt;=to_date(${@end_date},&apos;yyyy-mm-dd&apos;)"/>
    </bm:query-fields>
</bm:model>
