<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: leaf Generator  
    $Date: Thu Oct 10 13:51:22 CST 2019  
    $Revision: 1.0  
    $Purpose: 
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" xmlns:e="leaf.service.exception" xmlns:o="leaf.database.local.oracle" xmlns:f="leaf.database.features" alias="t1" baseTable="HLS_EBANK_BATCH_GROUP">
    <bm:fields>
        <bm:field name="group_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="GROUP_ID" prompt="HLS_EBANK_BATCH_GROUP.GROUP_ID"/>
        <bm:field name="hd_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="HD_ID" prompt="HLS_EBANK_BATCH_GROUP.HD_ID"/>
        <bm:field name="batch_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="BATCH_ID" prompt="HLS_EBANK_BATCH_GROUP.BATCH_ID"/>
        <bm:field name="contract_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="CONTRACT_ID" prompt="HLS_EBANK_BATCH_GROUP.CONTRACT_ID"/>
        <bm:field name="apply_amount" databaseType="NUMBER" datatype="java.lang.Long" physicalName="APPLY_AMOUNT" prompt="HLS_EBANK_BATCH_GROUP.APPLY_AMOUNT"/>
        <bm:field name="actual_amount" databaseType="NUMBER" datatype="java.lang.Long" physicalName="ACTUAL_AMOUNT" prompt="HLS_EBANK_BATCH_GROUP.ACTUAL_AMOUNT"/>
        <bm:field name="status" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="STATUS" prompt="HLS_EBANK_BATCH_GROUP.STATUS"/>
        <bm:field name="real_amount" databaseType="NUMBER" datatype="java.lang.Long" physicalName="REAL_AMOUNT" prompt="HLS_EBANK_BATCH_GROUP.REAL_AMOUNT"/>
        <bm:field name="res_code" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="RES_CODE" prompt="HLS_EBANK_BATCH_GROUP.RES_CODE"/>
        <bm:field name="res_msg" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="RES_MSG" prompt="HLS_EBANK_BATCH_GROUP.RES_MSG"/>
        <bm:field name="interface_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="INTERFACE_ID" prompt="HLS_EBANK_BATCH_GROUP.INTERFACE_ID"/>
        <bm:field name="receive_date" databaseType="DATE" datatype="java.util.Date" physicalName="RECEIVE_DATE" prompt="HLS_EBANK_BATCH_GROUP.RECEIVE_DATE"/>
        <bm:field name="deal_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="DEAL_FLAG" prompt="HLS_EBANK_BATCH_GROUP.DEAL_FLAG"/>
        <bm:field name="bank_account_num" expression="(select bank_branch_num from con_contract where contract_id = t1.contract_id)" forInsert="false" forceUpdate="false"/>
        <bm:field name="bank_account_name" expression="(select bank_account_name from con_contract where contract_id = t1.contract_id)" forInsert="false" forceUpdate="false"/>
        <bm:field name="sequence_num" expression="(rownum)" forInsert="false" forceUpdate="false"/>
        <bm:field name="abc_sequence_num" expression="(lpad(ROWNUM,'4','0'))" forceUpdate="false" forInsert="false"/>
        <bm:field name="csh_bank_account_num" expression="(select bank_account_num from csh_bank_account cba,hls_ebank_batch heb where cba.bank_account_id = heb.bank_account_id and heb.batch_id = t1.batch_id)" forInsert="false" forceUpdate="false"/>
        <bm:field name="csh_bank_account_name" expression="(select bank_account_name from csh_bank_account cba,hls_ebank_batch heb where cba.bank_account_id = heb.bank_account_id and heb.batch_id = t1.batch_id)" forInsert="false" forceUpdate="false"/>
        <bm:field name="abc_pay_type" expression="7" defaultValue="7"/>
        <bm:field name="abc_transaction_type" expression="1" defaultValue="1"/>
        <bm:field name="abc_usage" expression="'代收用途'" defaultValue="代收用途"/>
        <bm:field name="abc_fen_code" expression="'01'" defaultValue="01"/>
        <bm:field name="abc_curr_flag" expression="0" defaultValue="0"/>
    </bm:fields>
    <bm:query-fields>
        <bm:query-field name="batch_id" queryExpression="t1.batch_id = ${@batch_id}"/>
    </bm:query-fields>
    <bm:features>
        <f:standard-who xmlns:f="leaf.database.features"/>
    </bm:features>
</bm:model>