prj_project_bp.lwm 1.58 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
<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: chenlingfeng  
    $Date: 2017-12-14 下午6:04:14  
    $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
                    *
                FROM
                    (SELECT
                        t.prj_bp_id,
                        t.project_id,
                        t.bp_id,
                        t.bp_category,
                        t.bp_type,
                        (SELECT bt.description FROM hls_bp_type bt WHERE bt.bp_type = t.bp_type
                        ) AS bp_type_n,
                        (SELECT
                            bc.description
                        FROM
                            hls_bp_category bc
                        WHERE
                            bc.bp_category = t.bp_category
                        ) AS bp_category_n,
                        t2.bp_code,
                        t2.bp_name
                    FROM
                        prj_project_bp t,
                        hls_bp_master t2
                    WHERE
                        t.bp_id = t2.bp_id
                    ) t1 #WHERE_CLAUSE#
            ]]></bm:query-sql>
        </bm:operation>
    </bm:operations>
    <bm:query-fields>
        <bm:query-field name="bp_type" queryExpression="t1.bp_type=${@bp_type}"/>
    </bm:query-fields>
    <bm:data-filters>
        <bm:data-filter expression="t1.project_id = ${@project_id}"/>
    </bm:data-filters>
</bm:model>