<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: qianming  
    $Date: 2016-3-16 下午7:22:35  
    $Revision: 1.0  
    $Purpose:     
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" alias="t1" baseTable="RD_PROJECT_ANALYSE_TOTAL_V" defaultOrderBy="target_type,target">
    <bm:fields>
        <bm:field name="target_type" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="TARGET_TYPE" prompt="RD_PROJECT_ANALYSE_TOTAL_V.TARGET_TYPE"/>
        <bm:field name="target_type_desc" expression="decode(target_type,&apos;ID_CARD&apos;,&apos;身份证号&apos;,&apos;PHONE&apos;,&apos;手机号&apos;,&apos;VIN&apos;,&apos;VIN码&apos;,&apos;ITEM_FRAME_NUMBER&apos;,&apos;车架号&apos;)" prompt="维度"/>
        <bm:field name="target" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="TARGET" prompt="目标码"/>
        <bm:field name="approving_count" databaseType="NUMBER" datatype="java.lang.Long" physicalName="APPROVING_COUNT" prompt="审批中统计"/>
        <bm:field name="no_incept_count" databaseType="NUMBER" datatype="java.lang.Long" physicalName="NO_INCEPT_COUNT" prompt="通过未起租统计"/>
        <bm:field name="cancel_count" databaseType="NUMBER" datatype="java.lang.Long" physicalName="CANCEL_COUNT" prompt="取消统计"/>
        <bm:field name="reject_count" databaseType="NUMBER" datatype="java.lang.Long"/>
        <bm:field name="y_overdue" databaseType="NUMBER" datatype="java.lang.Long"/>
        <bm:field name="n_overdue" databaseType="NUMBER" datatype="java.lang.Long"/>
    </bm:fields>
    <bm:data-filters>
        <bm:data-filter enforceOperations="query" expression="exists (SELECT 1 FROM rd_project_analyse_detail_v WHERE project_id = ${@project_id} AND target_type = t1.target_type AND target = t1.target)"/>
    </bm:data-filters>
</bm:model>
