<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: DJ  
    $Date: 2013-8-7 上午11:13:07  
    $Revision: 1.0  
    $Purpose: 
-->
<bm:model xmlns:o="leaf.database.local.oracle" xmlns:bm="http://www.leaf-framework.org/schema/bm" xmlns:f="leaf.database.features" alias="t1" baseTable="ZJ_WFL_WORKFLOW_END_NOTICER">
    <bm:fields>
        <bm:field name="workflow_noticer_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="WORKFLOW_NOTICER_ID" prompt="ZJ_WFL_WORKFLOW_END_NOTICER.WORKFLOW_NOTICER_ID"/>
        <bm:field name="workflow_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="WORKFLOW_ID" prompt="ZJ_WFL_WORKFLOW_END_NOTICER.WORKFLOW_ID"/>
        <bm:field name="workflow_status" databaseType="NUMBER" datatype="java.lang.Long" physicalName="WORKFLOW_STATUS" prompt="ZJ_WFL_WORKFLOW_END_NOTICER.WORKFLOW_STATUS"/>
        <bm:field name="workflow_status_desc" forInsert="false" forUpdate="false"/>
    </bm:fields>
    <bm:operations>
        <bm:operation name="query">
            <bm:query-sql><![CDATA[
    			select t1.workflow_noticer_id,
				       t1.workflow_id,
				       t1.workflow_status,
				       (select v.code_value_name
				          from sys_code_values_v v
				         where v.code = 'ZJ_WFL_WORKFLOW_STATUS'
				           and v.code_value = t1.workflow_status) as workflow_status_desc
				  from ZJ_WFL_WORKFLOW_END_NOTICER t1
				  #WHERE_CLAUSE#
				 order by t1.workflow_status
    		]]></bm:query-sql>
        </bm:operation>
    </bm:operations>
    <bm:data-filters>
        <bm:data-filter enforceOperations="query" expression="t1.workflow_id=${@workflow_id}"/>
    </bm:data-filters>
    <bm:features>
        <o:sequence-pk/>
        <f:standard-who/>
    </bm:features>
    <bm:primary-key>
        <bm:pk-field name="workflow_noticer_id"/>
    </bm:primary-key>
</bm:model>
