<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: qianming  
    $Date: 2015-7-15 下午1:47:05  
    $Revision: 1.0  
    $Purpose: 国资-付款先决条件
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" alias="t1" baseTable="BGFL_CSH_PAYMENT_CONDITIONS" defaultOrderBy="condition_code">
    <bm:fields>
        <bm:field name="condition_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="CONDITION_ID"/>
        <bm:field name="project_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="PROJECT_ID"/>
        <bm:field name="description" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="DESCRIPTION" prompt="描述"/>
        <bm:field name="attachment_number" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="ATTACHMENT_NUMBER" prompt="附件数量"/>
        <bm:field name="confirm_flag" databaseType="VARCHAR2" datatype="java.lang.String" lookupCode="YES_NO" lookupField="confirm_flag_desc" physicalName="CONFIRM_FLAG"/>
        <bm:field name="confirm_flag_desc" prompt="是否落实"/>
        <bm:field name="confirm_user_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="CONFIRM_USER_ID"/>
        <bm:field name="confirm_user_name" expression="(select description from sys_user where user_id = t1.confirm_user_id)" prompt="落实人"/>
        <bm:field name="confirm_date" expression="to_char(confirm_date,&apos;yyyy-mm-dd&apos;)" prompt="落实时间"/>
        <bm:field name="note" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="NOTE" prompt="备注"/>
        <bm:field name="condition_code" expression="(select h.condition_code from hn_csh_payment_cond_define h where h.record_id=t1.record_id)"/>
        <bm:field name="file_name" expression="(select bgfl_special_parameter_pkg.get_condition_file_names(t1.condition_id) from dual)"/>
    </bm:fields>
    <bm:data-filters>
        <bm:data-filter name="1" enforceOperations="query" expression="t1.project_id = (select pnj.project_id  from  prj_project pvj,prj_project pnj,con_contract ct  where ct.contract_id=${@contract_id}  and ct.project_id=pvj.project_id and pvj.data_class=&apos;VIRTUAL_CON&apos; and  pnj.data_class=&apos;NORMAL&apos; and pnj.project_number=pvj.project_number )"/>
    </bm:data-filters>
</bm:model>
