<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: zhangxing5129  
    $Date: 2014-1-20 上午09:33:30  
    $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 change_number_to_cn(rownum)row_num, a.*
				  from (select t1.approval_id,
				               t1.approver_record_id,
				               t1.approver_user_id,
				               t1.approve_status,
				               (select v.code_value_name from sys_code_values_v v 
			       where v.code='PRJ_PROJECT_APPLY_RESULT' 
			       and v.code_value=t1.approve_status)approve_status_desc,
				               u.employee_id,
				               to_char(t1.last_update_date,'yyyy-mm-dd hh24:mi:ss')last_update_date,
				               t1.pm_confirm_status,
				               (select v.code_value_name from sys_code_values_v v 
			       where v.code='PRJ_PROJECT_APPLY_RESULT' 
			       and v.code_value=t1.pm_confirm_status)pm_confirm_status_desc,
                       		   t1.pm_confirm_comment,
                       	       to_char(t1.pm_confirm_date,'yyyy-mm-dd hh24:mi:ss')pm_confirm_date,
				               e.name,
				               t1.comment_quotation,
				               t1.comment_tenant_basic,
				               t1.comment_fin_info_tenant,
				               t1. comment_management_tenant,
				               t1.comment_guarantor_basic,
				               t1.comment_lease_item_info,
				               t1.comment_fesibility_info,
				               t1.comment_others_info,
				               t1.approve_comment
				          from prj_project_approver t1, exp_employees e, sys_user u
				         where t1.approver_user_id = u.user_id
				           and u.employee_id = e.employee_id
				           and t1.approval_id = ${@approval_id}
				         order by t1.last_update_date asc) a

 ]]></bm:query-sql>
        </bm:operation>
    </bm:operations>
    <bm:fields>
        <bm:field name="row_num"/>
        <bm:field name="approval_id"/>
        <bm:field name="approver_record_id"/>
        <bm:field name="approver_user_id"/>
        <bm:field name="approve_status"/>
        <bm:field name="approve_status_desc"/>
        <bm:field name="employee_id"/>
        <bm:field name="last_update_date"/>
        <bm:field name="pm_confirm_status"/>
        <bm:field name="pm_confirm_status_desc"/>
        <bm:field name="pm_confirm_comment"/>
        <bm:field name="pm_confirm_date"/>
        <bm:field name="name"/>
        <bm:field name="comment_quotation"/>
        <bm:field name="comment_tenant_basic"/>
        <bm:field name="comment_fin_info_tenant"/>
        <bm:field name="comment_management_tenant"/>
        <bm:field name="comment_guarantor_basic"/>
        <bm:field name="comment_lease_item_info"/>
        <bm:field name="comment_fesibility_info"/>
        <bm:field name="comment_others_info"/>
        <bm:field name="approve_comment"/>
    </bm:fields>
</bm:model>
