<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: zhangxing5129  
    $Date: 2014-1-20 上午10:04:52  
    $Revision: 1.0  
    $Purpose: 
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm">
    <bm:operations>
        <bm:operation name="query">
            <bm:query-sql><![CDATA[
            select prj601_save_pkg.get_approver_name(${@approval_id}) approver_all_name,
                   prj601_save_pkg.get_approver_total_count(${@approval_id}) total_count,
			       prj601_save_pkg.get_approver_approve_count(${@approval_id}, 'APPROVE') approve_count,
			       prj601_save_pkg.get_approver_approve_count(${@approval_id}, 'HALF_APPROVE') half_approve_count,
			       prj601_save_pkg.get_approver_approve_count(${@approval_id}, 'REJECT') reject_count,
			       prj601_save_pkg.get_approver_approve_rate(${@approval_id}) approve_rate
			  from dual
  ]]></bm:query-sql>
        </bm:operation>
    </bm:operations>
    <bm:fields>
        <bm:field name="approver_all_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="APPROVER_ALL_NAME"/>
        <bm:field name="total_count" databaseType="NUMBER" datatype="java.lang.Long" physicalName="TOTAL_COUNT"/>
        <bm:field name="approve_count" databaseType="NUMBER" datatype="java.lang.Long" physicalName="APPROVE_COUNT"/>
        <bm:field name="half_approve_count" databaseType="NUMBER" datatype="java.lang.Long" physicalName="HALF_APPROVE_COUNT"/>
        <bm:field name="reject_count" databaseType="NUMBER" datatype="java.lang.Long" physicalName="REJECT_COUNT"/>
        <bm:field name="approve_rate" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="APPROVE_RATE"/>
    </bm:fields>
</bm:model>
