prj_project_detail.lwm 1.39 KB
Newer Older
Spencer Chang's avatar
Spencer Chang committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: jack  
    $Date: 2014-6-9 上午10:44:24  
    $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.* from(    
       SELECT a.project_name,
       a.project_id,
       b.company_full_name,
       c.name,
       to_char(a.creation_date,
               'yyyy') this_year,
       to_char(a.creation_date,
               'mm') this_month,
       to_char(a.creation_date,
               'dd') this_day,
       e.description_text chance_cource_name,
       a.description_lease_item,
       a.financing_purpose,
       a.lease_subject,
       a.ref_v07
  FROM prj_project   a,
       fnd_companies b,
       exp_employees c,
       prj_chance d  ,
       (
       SELECT b.code_value,
       c.description_text
  FROM sys_codes        a,
       sys_code_values  b,
       fnd_descriptions c
 WHERE a.code = 'LCH501_CHANCE_SOURCE'
       AND a.code_id = b.code_id
       AND c.description_id = b.code_value_name_id
       AND c.language = 'ZHS'
       ) e
 WHERE a.company_id = b.company_id
       AND a.employee_id = c.employee_id
       and a.chance_id=d.chance_id
       and d.chance_source=e.code_value(+)) t1 #WHERE_CLAUSE#
]]></bm:query-sql>
        </bm:operation>
    </bm:operations>
</bm:model>