<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: weiwuzhen  
    $Date: 2016-5-22 下午9:54:29  
    $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 p.project_id, pm.meeting_location,to_char(pm.meeting_date,'yyyy')||'年'||to_char(pm.meeting_date,'mm')||'月'||to_char(pm.meeting_date,'dd')||'日' meeting_date,
            to_char(substr(pa.approver_comment_summary,1,4000)) approver_comment_summary,
            pa.approval_seq,--会议序号
       --hn_project_report_pkg.translate_date_to_zhs(pm.meeting_date) meeting_date_n
       hn_project_report_pkg.translate_date_to_zhs(trunc(sysdate)) meeting_date_n
      
  from PRJ_PROJECT_MEETING pm, prj_project_approval pa, prj_project p
 where p.project_id = pa.project_id
   and pa.meeting_id = pm.meeting_id
   and pa.approval_count=(
   select max(to_number(pa.approval_count)) from prj_project_approval pa, prj_project p
    where p.project_id = pa.project_id
     and p.project_id=${/parameter/@project_id}
   )
   and p.project_id=${/parameter/@project_id}
]]></bm:query-sql>
        </bm:operation>
    </bm:operations>
</bm:model>
