<?xml version="1.0" encoding="UTF-8"?>
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm">
    <bm:fields>
        <bm:field name="id" datatype="java.lang.Long" physicalName="WORKFLOW_TYPE_PARA_ID"/>
        <bm:field name="code" datatype="java.lang.String" forDisplay="true" forQuery="true" physicalName="PARAMETER_CODE" prompt="参数代码"/>
        <bm:field name="description" datatype="java.lang.String" forDisplay="true" forQuery="true" physicalName="PARAMETER_DESC" prompt="参数描述"/>
    </bm:fields>
    <bm:operations>
        <bm:operation name="query">
            <bm:query-sql><![CDATA[
            select * from (
            	select tp.workflow_type_para_id id,
				       tp.parameter_code as code,
				       tp.parameter_desc as description,
				       w.workflow_type_id,
				       w.workflow_id,
				       tp.sequence_num
				  from zj_wfl_workflow_type_parameter tp,
				       zj_wfl_workflow w   
				       where w.workflow_type_id = tp.workflow_type_id) t1 
				 #WHERE_CLAUSE# 
				 order by t1.sequence_num
		    ]]></bm:query-sql>
        </bm:operation>
    </bm:operations>
    <bm:query-fields>
        <bm:query-field name="code" queryExpression="t1.code like ${@code}"/>
        <bm:query-field name="description" queryExpression="t1.description like ${@description}"/>
    </bm:query-fields>
    <bm:data-filters>
        <bm:data-filter enforceOperations="query" expression="t1.workflow_id = ${/parameter/@workflow_id}"/>
    </bm:data-filters>
</bm:model>
