<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: zhangxing5129  
    $Date: 2014-1-20 上午11:41:51  
    $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 t1.approval_id,
			       t1.project_id,
			       t1.status,
			       t1.approval_count,
			       to_char(t1.director_approval_date,'yyyy-mm-dd hh24:mi:ss'),
			       t1.director_approval_result,
			       (select v.code_value_name from sys_code_values_v v 
			       where v.code='PRJ_PROJECT_APPLY_RESULT' 
			       and v.code_value=t1.director_approval_result)director_approval_result_desc,
			       t1.director_approval_comment,
			       t1.project_manager_replay,
			       prj601_save_pkg.get_manager_name(${/session/@company_id}) manager_name
			  from prj_project_approval t1
			 where t1.approval_id =${@approval_id}
 ]]></bm:query-sql>
        </bm:operation>
    </bm:operations>
    <bm:fields>
        <bm:field name="approval_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="APPROVAL_ID"/>
        <bm:field name="project_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="PROJECT_ID"/>
        <bm:field name="status" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="STATUS"/>
        <!-- <bm:field name="director_approval_date" databaseType="DATETIME" datatype="java.util.Date" physicalName="DIRECTOR_APPROVAL_DATE"/> -->
        <bm:field name="director_approval_date" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="DIRECTOR_APPROVAL_DATE"/>
        <bm:field name="director_approval_result" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="DIRECTOR_APPROVAL_RESULT"/>
        <bm:field name="director_approval_comment" databaseType="CLOB" datatype="java.lang.String" physicalName="DIRECTOR_APPROVAL_COMMENT"/>
        <bm:field name="project_manager_replay" databaseType="CLOB" datatype="java.lang.String" physicalName="PROJECT_MANAGER_REPLAYFROM"/>
        <bm:field name="manager_name"/>
        <bm:field name="approval_count"/>
        <bm:field name="director_approval_result_desc"/>
    </bm:fields>
</bm:model>
