<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: qianming  
    $Date: 2015-6-29 下午1:55:14  
    $Revision: 1.0  
    $Purpose: 北京国资租赁-用友财务接口-基础数据
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" alias="t1" baseTable="BGFL_YONGYOU_BASIC_DATA" defaultOrderBy="source_table,source_pk">
    <bm:fields>
        <bm:field name="data_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="DATA_ID"/>
        <bm:field name="data_type" databaseType="VARCHAR2" datatype="java.lang.String"/>
        <bm:field name="data_type_desc" expression="(select description from bgfl_yongyou_data_type_dtl where data_type = t1.data_type)" prompt="数据类型"/>
        <bm:field name="system_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="SYSTEM_FLAG" prompt="是否系统生成"/>
        <bm:field name="source_table" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="SOURCE_TABLE" prompt="来源表"/>
        <bm:field name="source_pk" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="SOURCE_PK" prompt="来源表PK"/>
        <bm:field name="update_times" databaseType="NUMBER" datatype="java.lang.Long" physicalName="UPDATE_TIMES" prompt="更新次数"/>
        <bm:field name="attr01" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="ATTR01" prompt="属性01"/>
        <bm:field name="attr02" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="ATTR02" prompt="属性02"/>
        <bm:field name="attr03" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="ATTR03" prompt="属性03"/>
        <bm:field name="attr04" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="ATTR04" prompt="属性04"/>
        <bm:field name="attr05" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="ATTR05" prompt="属性05"/>
        <bm:field name="attr06" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="ATTR06" prompt="属性06"/>
        <bm:field name="attr07" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="ATTR07" prompt="属性07"/>
        <bm:field name="attr08" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="ATTR08" prompt="属性08"/>
        <bm:field name="attr09" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="ATTR09" prompt="属性09"/>
        <bm:field name="attr10" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="ATTR10" prompt="属性10"/>
        <bm:field name="attr11" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="ATTR11" prompt="属性11"/>
        <bm:field name="attr12" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="ATTR12" prompt="属性12"/>
        <bm:field name="attr13" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="ATTR13" prompt="属性13"/>
        <bm:field name="attr14" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="ATTR14" prompt="属性14"/>
        <bm:field name="attr15" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="ATTR15" prompt="属性15"/>
        <bm:field name="attr16" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="ATTR16" prompt="属性16"/>
        <bm:field name="attr17" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="ATTR17" prompt="属性17"/>
        <bm:field name="attr18" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="ATTR18" prompt="属性18"/>
        <bm:field name="attr19" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="ATTR19" prompt="属性19"/>
        <bm:field name="attr20" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="ATTR20" prompt="属性20"/>
        <bm:field name="discard_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="DISCARD_FLAG" prompt="是否丢弃"/>
        <bm:field name="import_flag" databaseType="VARCHAR2" datatype="java.lang.String" lookupCode="YONGYOU_IMPORT_FLAG" lookupField="import_flag_desc" physicalName="IMPORT_FLAG"/>
        <bm:field name="import_flag_desc" databaseType="VARCHAR2" datatype="java.lang.String"/>
        <bm:field name="import_date" databaseType="DATE" datatype="java.util.Date" physicalName="IMPORT_DATE" prompt="导入日期"/>
        <bm:field name="import_user_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="IMPORT_USER_ID"/>
        <bm:field name="import_user" expression="(select description from sys_user where user_id = t1.import_user_id)" prompt="导入用户"/>
        <bm:field name="error_message" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="ERROR_MESSAGE" prompt="错误信息"/>
    </bm:fields>
    <bm:query-fields>
        <bm:query-field field="data_id" queryOperator="="/>
        <bm:query-field field="data_type" queryOperator="="/>
        <bm:query-field field="system_flag" queryOperator="="/>
        <bm:query-field field="source_table" queryExpression="upper(t1.source_table) like &apos;%&apos; || upper(${@source_table}) || &apos;%&apos;"/>
        <bm:query-field field="error_message" queryExpression="upper(t1.error_message) like &apos;%&apos; || upper(${@error_message}) || &apos;%&apos;"/>
        <bm:query-field field="discard_flag" queryOperator="="/>
        <bm:query-field field="import_flag" queryOperator="="/>
        <bm:query-field field="import_user_id" queryOperator="="/>
        <bm:query-field name="update_times_from" queryExpression="t1.update_times &gt;= ${@update_times_from}"/>
        <bm:query-field name="update_times_to" queryExpression="t1.update_times &lt;= ${@update_times_to}"/>
        <bm:query-field name="import_date_from" queryExpression="trunc(t1.import_date) &gt;= to_date(${@import_date_from},&apos;YYYY-MM-DD&apos;)"/>
        <bm:query-field name="import_date_to" queryExpression="trunc(t1.import_date) &lt;= to_date${@import_date_to},&apos;YYYY-MM-DD&apos;)"/>
    </bm:query-fields>
</bm:model>
