<?xml version="1.0" encoding="UTF-8"?>
<queryMap desc="COM_BASE_SUPP_BANK （生成工具：代码生成工具4.0   访问地址：http://172.16.2.128/tool/）">
    <query id="ComBaseSuppBankDAL.Query" desc="查询">
        <![CDATA[
 SELECT 
       T.SUPP_CODE SUPPCODE,
       T.SUPP_NAME SUPPNAME,
       T.SUPP_SHORT_NAME SUPPSHORTNAME,
       T.BANK_CODE BANKCODE,
       T.BANK_NAME BANKNAME,
       T.BANK_CITY BANKCITY,
       T.BANK_AREA BANKAREA,
       T.BANK_ACCOUNT BANKACCOUNT,
       T.ID
 FROM COM_BASE_SUPP_BANK T
 WHERE 1 = 1
        ]]>
    </query>
    <query id="ComBaseSuppBankDAL.QueryByPk" desc="通过主键查询">
        <![CDATA[
 SELECT 
       T.SUPP_CODE,
       T.SUPP_NAME,
       T.SUPP_SHORT_NAME,
       T.BANK_CODE,
       T.BANK_NAME,
       T.BANK_CITY,
       T.BANK_AREA,
       T.BANK_ACCOUNT,
       T.ID
 FROM COM_BASE_SUPP_BANK T
 WHERE
       T.SUPP_CODE = '#SUPP_CODE#'
       AND T.BANK_ACCOUNT = '#BANK_ACCOUNT#'
        ]]>
    </query>
    <query id="ComBaseSuppBankDAL.Insert" desc="新增">
        <![CDATA[
 INSERT INTO COM_BASE_SUPP_BANK(
        SUPP_CODE,
        SUPP_NAME,
        SUPP_SHORT_NAME,
        BANK_CODE,
        BANK_NAME,
        BANK_CITY,
        BANK_AREA,
        BANK_ACCOUNT,
        ID)
 VALUES( 
        '#SUPP_CODE#',
        '#SUPP_NAME#',
        '#SUPP_SHORT_NAME#',
        '#BANK_CODE#',
        '#BANK_NAME#',
        '#BANK_CITY#',
        '#BANK_AREA#',
        '#BANK_ACCOUNT#',
        '#ID#')
        ]]>
    </query>
    <query id="ComBaseSuppBankDAL.Update" desc="修改">
        <![CDATA[
 UPDATE COM_BASE_SUPP_BANK T
   SET 
        T.SUPP_CODE = '#SUPP_CODE#',
        T.SUPP_NAME = '#SUPP_NAME#',
        T.SUPP_SHORT_NAME = '#SUPP_SHORT_NAME#',
        T.BANK_CODE = '#BANK_CODE#',
        T.BANK_NAME = '#BANK_NAME#',
        T.BANK_CITY = '#BANK_CITY#',
        T.BANK_AREA = '#BANK_AREA#',
        T.BANK_ACCOUNT = '#BANK_ACCOUNT#'
 WHERE T.ID = '#ID#'
        ]]>
    </query>
    <query id="ComBaseSuppBankDAL.GetMaxPk" desc="获取最大主键">
        <![CDATA[
SELECT LPAD(NVL(MAX(ID), 0) + 1, 5, '0') MAX_VALUE FROM COM_BASE_SUPP_BANK T
        ]]>
    </query>
    <query id="ComBaseSuppBankDAL.Delete" desc="作废">
        <![CDATA[
DELETE FROM COM_BASE_SUPP_BANK T
 WHERE T.ID = '#ID#'
        ]]>
    </query>
    <query id="ComBaseSuppBankDAL.Resume" desc="恢复">
        <![CDATA[
UPDATE COM_BASE_SUPP_BANK T
   SET
       T.VALIDFLAG = '1',
       T.DELETE_NAME = NULL,
       T.DELETE_TIME = NULL,
       T.UPDATE_NAME = '#UPDATE_NAME#',
       T.UPDATE_TIME = SYSDATE
WHERE
       T.SUPP_CODE = '#SUPP_CODE#'
       AND T.BANK_ACCOUNT = '#BANK_ACCOUNT#'
        ]]>
    </query>
    <query id="ComBaseSuppBankDAL.IsRepeat" desc="是否重复">
        <![CDATA[
SELECT COUNT(1)
  FROM COM_BASE_SUPP_BANK T
 WHERE T.BANK_ACCOUNT = {0}
   AND T.Id <> {1}
        ]]>
    </query>
</queryMap>