<?xml version="1.0" encoding="UTF-8"?>
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm">
    <bm:operations>
        <bm:operation name="query">
            <bm:query-sql><![CDATA[
            select * from (
            select pp.project_id, pp.project_number, pp.project_name,
            decode(pp.data_class,'NORMAL','项目','合同') data_class_n
  from prj_project pp) t1 #WHERE_CLAUSE#
 ]]></bm:query-sql>
        </bm:operation>
    </bm:operations>
    <bm:fields>
        <bm:field name="project_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="PROJECT_ID"/>
        <bm:field name="project_number" databaseType="VARCHAR2" datatype="java.lang.String" displayWidth="120" forDisplay="true" forQuery="true" physicalName="PROJECT_NUMBER" prompt="项目编号"/>
        <bm:field name="project_name" databaseType="VARCHAR2" datatype="java.lang.String" displayWidth="260" forDisplay="true" forQuery="true" physicalName="PROJECT_NAME" prompt="项目名称"/>
        <bm:field name="data_class_n" displayWidth="80" forDisplay="true" prompt="单据类别"/>
    </bm:fields>
    <bm:query-fields>
        <bm:query-field name="project_number" queryExpression="t1.project_number like &apos;%&apos;||${@project_number}||&apos;%&apos;"/>
        <bm:query-field name="project_name" queryExpression="t1.project_name like &apos;%&apos;||${@project_name}||&apos;%&apos;"/>
    </bm:query-fields>
</bm:model>
