season_con_chart.lwm 2.43 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 51 52 53
<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: 王建文  
    $Date: 2017-3-6 下午7:49:17  
    $Revision: 1.0  
    $Purpose: 
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" needAccessControl="false">
    <bm:operations>
        <bm:operation name="query">
            <bm:query-sql><![CDATA[
                select (SELECT
                    COUNT(*) 
                FROM
                    con_contract t
                WHERE
                    TO_CHAR(creation_date,'yyyyq')=TO_CHAR(sysdate,'yyyyq') and t.data_class='NORMAL' and t.Overdue_Status='Y' and t.contract_status not in ('NEW','SIGN_APPROVING','INCEPT')) other_count,
        (SELECT
                    COUNT(*) 
                FROM
                    con_contract t
                WHERE
                    TO_CHAR(creation_date,'yyyyq')=TO_CHAR(sysdate,'yyyyq') and t.contract_status='NEW' and t.data_class='NORMAL') new_count,
          (SELECT
                    COUNT(*) 
                FROM
                    con_contract t
                WHERE
                    TO_CHAR(creation_date,'yyyyq')=TO_CHAR(sysdate,'yyyyq') and t.contract_status='SIGN_APPROVING' and t.data_class='NORMAL') sign_count,
           (SELECT
                    COUNT(*) 
                FROM
                    con_contract t
                WHERE
                    TO_CHAR(creation_date,'yyyyq')=TO_CHAR(sysdate,'yyyyq') and t.contract_status='INCEPT' and t.data_class='NORMAL') incept_count,
           (SELECT
                    COUNT(*) 
                FROM
                    con_contract t
                WHERE
                    TO_CHAR(creation_date,'yyyyq')=TO_CHAR(sysdate,'yyyyq') and t.Overdue_Status='Y' and t.data_class='NORMAL') overdue_count       
                    from dual
            ]]></bm:query-sql>
        </bm:operation>
    </bm:operations>
    <bm:fields>
        <bm:field name="other_count" databaseType="NUMBER" datatype="java.lang.Long" physicalName="OTHER_COUNT"/>
        <bm:field name="new_count" databaseType="NUMBER" datatype="java.lang.Long" physicalName="NEW_COUNT"/>
        <bm:field name="sign_count" databaseType="NUMBER" datatype="java.lang.Long" physicalName="SIGN_COUNT"/>
        <bm:field name="incept_count" databaseType="NUMBER" datatype="java.lang.Long" physicalName="INCEPT_COUNT"/>
        <bm:field name="overdue_count" databaseType="NUMBER" datatype="java.lang.Long" physicalName="OVERDUE_COUNT"/>
    </bm:fields>
</bm:model>