<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="ru.nbch.indicsearchservice.repository.indic.IndicMapper">
    <select id="getTableColumnsByTableNames" resultType="java.util.LinkedHashMap" timeout="3600">
        SELECT TBNAME, NAME
        FROM SYSIBM.SYSCOLUMNS
        WHERE TBCREATOR = 'INDIC'
        AND TBNAME IN
        <foreach item="table" collection="tables" open="(" separator="," close=")">
            #{table}
        </foreach>
        WITH UR
    </select>

    <select id="findAllByFidsFromRuUid" resultType="java.util.LinkedHashMap" fetchSize="1000" timeout="3600">
        SELECT *
        FROM INDIC.RU_UID
        WHERE FID IN
        <foreach item="fid" collection="fids" open="(" separator="," close=")">
            #{fid}
        </foreach>
        ORDER BY SERIAL_NUM
        WITH UR
    </select>

    <select id="findAllByFidsFromRuApplication" resultType="java.util.LinkedHashMap" fetchSize="1000" timeout="3600">
        SELECT *
        FROM INDIC.RU_APPLICATION
        WHERE FID IN
        <foreach item="fid" collection="fids" open="(" separator="," close=")">
            #{fid}
        </foreach>
        ORDER BY SERIAL_NUM
        WITH UR
    </select>

    <select id="findAllByFidsFromRuObligPartTake" resultType="java.util.LinkedHashMap" fetchSize="1000" timeout="3600">
        SELECT *
        FROM INDIC.RU_OBLIGPARTTAKE
        WHERE FID IN
        <foreach item="fid" collection="fids" open="(" separator="," close=")">
            #{fid}
        </foreach>
        ORDER BY SERIAL_NUM
        WITH UR
    </select>

    <select id="findAllByFidsFromRuBankruptcy" resultType="java.util.LinkedHashMap" fetchSize="1000" timeout="3600">
        SELECT *
        FROM INDIC.RU_BANKRUPTCY
        WHERE FID IN
        <foreach item="fid" collection="fids" open="(" separator="," close=")">
            #{fid}
        </foreach>
        ORDER BY SERIAL_NUM
        WITH UR
    </select>

    <select id="findAllByFidsFromRuSettled" resultType="java.util.LinkedHashMap" fetchSize="1000" timeout="3600">
        SELECT *
        FROM INDIC.RU_SETTLED
        WHERE FID IN
        <foreach item="fid" collection="fids" open="(" separator="," close=")">
            #{fid}
        </foreach>
        ORDER BY SERIAL_NUM
        WITH UR
    </select>

    <select id="findAllByFidsFromRuOtherLegal" resultType="java.util.LinkedHashMap" fetchSize="1000" timeout="3600">
        SELECT *
        FROM INDIC.RU_OTHERLEGAL
        WHERE FID IN
        <foreach item="fid" collection="fids" open="(" separator="," close=")">
            #{fid}
        </foreach>
        ORDER BY SERIAL_NUM
        WITH UR
    </select>

    <select id="findAllByFidsFromRuCapability" resultType="java.util.LinkedHashMap" fetchSize="1000" timeout="3600">
        SELECT *
        FROM INDIC.RU_CAPABILITY
        WHERE FID IN
        <foreach item="fid" collection="fids" open="(" separator="," close=")">
            #{fid}
        </foreach>
        ORDER BY SERIAL_NUM
        WITH UR
    </select>

    <select id="findAllByFidsFromRuDebtBurdenInfo" resultType="java.util.LinkedHashMap" fetchSize="1000" timeout="3600">
        SELECT *
        FROM INDIC.RU_DEBT_BURDEN_INFO
        WHERE FID IN
        <foreach item="fid" collection="fids" open="(" separator="," close=")">
            #{fid}
        </foreach>
        ORDER BY SERIAL_NUM
        WITH UR
    </select>

    <select id="findAllByMemberCodeFromRuUid" resultType="java.util.LinkedHashMap" fetchSize="1000" timeout="3600">
        SELECT *
        FROM INDIC.RU_UID
        WHERE (MEMBER_CODE LIKE #{memberCode} || '%'
            OR REAL_MEMBERCODE LIKE #{memberCode} || '%')
        ORDER BY SERIAL_NUM, LAST_UPDATED_DT DESC
        WITH UR
    </select>

    <select id="findAllByMemberCodeFromRuApplication" resultType="java.util.LinkedHashMap" fetchSize="1000"
            timeout="3600">
        SELECT *
        FROM INDIC.RU_APPLICATION
        WHERE (MEMBER_CODE LIKE #{memberCode} || '%'
            OR REAL_MEMBERCODE LIKE #{memberCode} || '%')
          AND (CANCELLATION_FLAG != 'Y' OR CANCELLATION_FLAG IS NULL)
        ORDER BY LAST_UPDATED_DT DESC
        WITH UR
    </select>

    <select id="findFidsByOgrnFromId" resultType="java.util.LinkedHashMap" timeout="3600">
        SELECT FID
        FROM INDIC.ID
        WHERE CAST(ID_NORM AS VARCHAR(2000)) = #{idNorm}
          AND (ID_TYPE LIKE '34' OR ID_TYPE LIKE '35' OR ID_TYPE2 LIKE 'regnumUL')
        ORDER BY LAST_UPDATED_DT DESC
        WITH UR
    </select>

    <select id="findFidsByPassportFromId" resultType="java.util.LinkedHashMap" timeout="3600">
        SELECT FID
        FROM INDIC.ID
        WHERE CAST(ID_NORM AS VARCHAR(2000)) = #{idNorm}
          AND (ID_TYPE LIKE '21' OR ID_TYPE2 LIKE '21' OR ID_TYPE LIKE '10' OR ID_TYPE2 LIKE '31')
        ORDER BY LAST_UPDATED_DT DESC
        WITH UR
    </select>

    <select id="findAllByFidsFromRuTrade" resultType="java.util.LinkedHashMap" fetchSize="1000" timeout="3600">
        SELECT *
        FROM INDIC.RU_TRADE
        WHERE FID IN
        <foreach item="fid" collection="fids" open="(" separator="," close=")">
            #{fid}
        </foreach>
        ORDER BY ACC_SERIAL_NUM, SERIAL_NUM
        WITH UR
    </select>

    <select id="findAllByFidsFromRuAccountAmt" resultType="java.util.LinkedHashMap" fetchSize="1000" timeout="3600">
        SELECT *
        FROM INDIC.RU_ACCOUNT_AMT
        WHERE FID IN
        <foreach item="fid" collection="fids" open="(" separator="," close=")">
            #{fid}
        </foreach>
        ORDER BY ACC_SERIAL_NUM, SERIAL_NUM
        WITH UR
    </select>

    <select id="findAllByFidsFromRuAcquirerIndivid" resultType="java.util.LinkedHashMap" fetchSize="1000"
            timeout="3600">
        SELECT *
        FROM INDIC.RU_ACQUIRERINDIVID
        WHERE FID IN
        <foreach item="fid" collection="fids" open="(" separator="," close=")">
            #{fid}
        </foreach>
        ORDER BY ACC_SERIAL_NUM, SERIAL_NUM
        WITH UR
    </select>

    <select id="findAllByFidsFromRuAcquirerLegal" resultType="java.util.LinkedHashMap" fetchSize="1000" timeout="3600">
        SELECT *
        FROM INDIC.RU_ACQUIRERLEGAL
        WHERE FID IN
        <foreach item="fid" collection="fids" open="(" separator="," close=")">
            #{fid}
        </foreach>
        ORDER BY ACC_SERIAL_NUM, SERIAL_NUM
        WITH UR
    </select>

    <select id="findAllByFidsFromRuAllArrears" resultType="java.util.LinkedHashMap" fetchSize="1000" timeout="3600">
        SELECT *
        FROM INDIC.RU_ALL_ARREARS
        WHERE FID IN
        <foreach item="fid" collection="fids" open="(" separator="," close=")">
            #{fid}
        </foreach>
        ORDER BY ACC_SERIAL_NUM, SERIAL_NUM
        WITH UR
    </select>

    <select id="findAllByFidsFromRuAmendment" resultType="java.util.LinkedHashMap" fetchSize="1000" timeout="3600">
        SELECT *
        FROM INDIC.RU_AMENDMENT
        WHERE FID IN
        <foreach item="fid" collection="fids" open="(" separator="," close=")">
            #{fid}
        </foreach>
        ORDER BY ACC_SERIAL_NUM, SERIAL_NUM
        WITH UR
    </select>

    <select id="findAllByFidsFromRuAmountInfo" resultType="java.util.LinkedHashMap" fetchSize="1000" timeout="3600">
        SELECT *
        FROM INDIC.RU_AMOUNT_INFO
        WHERE FID IN
        <foreach item="fid" collection="fids" open="(" separator="," close=")">
            #{fid}
        </foreach>
        ORDER BY ACC_SERIAL_NUM, SERIAL_NUM
        WITH UR
    </select>

    <select id="findAllByFidsFromRuArrear" resultType="java.util.LinkedHashMap" fetchSize="1000" timeout="3600">
        SELECT *
        FROM INDIC.RU_ARREAR
        WHERE FID IN
        <foreach item="fid" collection="fids" open="(" separator="," close=")">
            #{fid}
        </foreach>
        ORDER BY ACC_SERIAL_NUM, SERIAL_NUM
        WITH UR
    </select>

    <select id="findAllByFidsFromRuBankruptcyBlocks" resultType="java.util.LinkedHashMap" fetchSize="1000"
            timeout="3600">
        SELECT *
        FROM INDIC.RU_BANKRUPTCY_BLOCKS
        WHERE FID IN
        <foreach item="fid" collection="fids" open="(" separator="," close=")">
            #{fid}
        </foreach>
        ORDER BY PARENT_SERIAL_NUM, SERIAL_NUM
        WITH UR
    </select>

    <select id="findAllByFidsFromRuCoborrower" resultType="java.util.LinkedHashMap" fetchSize="1000" timeout="3600">
        SELECT *
        FROM INDIC.RU_COBORROWER
        WHERE FID IN
        <foreach item="fid" collection="fids" open="(" separator="," close=")">
            #{fid}
        </foreach>
        ORDER BY ACC_SERIAL_NUM, SERIAL_NUM
        WITH UR
    </select>

    <select id="findAllByFidsFromRuCollateral" resultType="java.util.LinkedHashMap" fetchSize="1000" timeout="3600">
        SELECT *
        FROM INDIC.RU_COLLATERAL
        WHERE FID IN
        <foreach item="fid" collection="fids" open="(" separator="," close=")">
            #{fid}
        </foreach>
        ORDER BY ACC_SERIAL_NUM, SERIAL_NUM
        WITH UR
    </select>

    <select id="findAllByFidsFromRuCollateralBlocks" resultType="java.util.LinkedHashMap" fetchSize="1000"
            timeout="3600">
        SELECT *
        FROM INDIC.RU_COLLATERAL_BLOCKS
        WHERE FID IN
        <foreach item="fid" collection="fids" open="(" separator="," close=")">
            #{fid}
        </foreach>
        ORDER BY PARENT_SERIAL_NUM, SERIAL_NUM
        WITH UR
    </select>

    <select id="findAllByFidsFromRuCollatInsured" resultType="java.util.LinkedHashMap" fetchSize="1000" timeout="3600">
        SELECT *
        FROM INDIC.RU_COLLATINSURED
        WHERE FID IN
        <foreach item="fid" collection="fids" open="(" separator="," close=")">
            #{fid}
        </foreach>
        ORDER BY ACC_SERIAL_NUM, SERIAL_NUM
        WITH UR
    </select>

    <select id="findAllByFidsFromRuCollatRepay" resultType="java.util.LinkedHashMap" fetchSize="1000" timeout="3600">
        SELECT *
        FROM INDIC.RU_COLLATREPAY
        WHERE FID IN
        <foreach item="fid" collection="fids" open="(" separator="," close=")">
            #{fid}
        </foreach>
        ORDER BY ACC_SERIAL_NUM, SERIAL_NUM
        WITH UR
    </select>

    <select id="findAllByFidsFromRuContractTermsChanges" resultType="java.util.LinkedHashMap" fetchSize="1000"
            timeout="3600">
        SELECT *
        FROM INDIC.RU_CONTRACT_TERMS_CHANGES
        WHERE FID IN
        <foreach item="fid" collection="fids" open="(" separator="," close=")">
            #{fid}
        </foreach>
        ORDER BY ACC_SERIAL_NUM, SERIAL_NUM
        WITH UR
    </select>

    <select id="findAllByFidsFromRuDueArrear" resultType="java.util.LinkedHashMap" fetchSize="1000" timeout="3600">
        SELECT *
        FROM INDIC.RU_DUEARREAR
        WHERE FID IN
        <foreach item="fid" collection="fids" open="(" separator="," close=")">
            #{fid}
        </foreach>
        ORDER BY ACC_SERIAL_NUM, SERIAL_NUM
        WITH UR
    </select>

    <select id="findAllByFidsFromRuFundDate" resultType="java.util.LinkedHashMap" fetchSize="1000" timeout="3600">
        SELECT *
        FROM INDIC.RU_FUNDDATE
        WHERE FID IN
        <foreach item="fid" collection="fids" open="(" separator="," close=")">
            #{fid}
        </foreach>
        ORDER BY ACC_SERIAL_NUM, SERIAL_NUM
        WITH UR
    </select>

    <select id="findAllByFidsFromRuGuaranteeRepay" resultType="java.util.LinkedHashMap" fetchSize="1000" timeout="3600">
        SELECT *
        FROM INDIC.RU_GUARANTEEREPAY
        WHERE FID IN
        <foreach item="fid" collection="fids" open="(" separator="," close=")">
            #{fid}
        </foreach>
        ORDER BY ACC_SERIAL_NUM, SERIAL_NUM
        WITH UR
    </select>

    <select id="findAllByFidsFromRuGuarantor" resultType="java.util.LinkedHashMap" fetchSize="1000" timeout="3600">
        SELECT *
        FROM INDIC.RU_GUARANTOR
        WHERE FID IN
        <foreach item="fid" collection="fids" open="(" separator="," close=")">
            #{fid}
        </foreach>
        ORDER BY ACC_SERIAL_NUM, SERIAL_NUM
        WITH UR
    </select>

    <select id="findAllByFidsFromRuIndepGuarantor" resultType="java.util.LinkedHashMap" fetchSize="1000" timeout="3600">
        SELECT *
        FROM INDIC.RU_INDEPGUARANTOR
        WHERE FID IN
        <foreach item="fid" collection="fids" open="(" separator="," close=")">
            #{fid}
        </foreach>
        ORDER BY ACC_SERIAL_NUM, SERIAL_NUM
        WITH UR
    </select>

    <select id="findAllByFidsFromRuLegalRecord" resultType="java.util.LinkedHashMap" fetchSize="1000" timeout="3600">
        SELECT *
        FROM INDIC.RU_LEGALRECORD
        WHERE FID IN
        <foreach item="fid" collection="fids" open="(" separator="," close=")">
            #{fid}
        </foreach>
        ORDER BY ACC_SERIAL_NUM, SERIAL_NUM
        WITH UR
    </select>

    <select id="findAllByFidsFromRuMonthAverPaymt" resultType="java.util.LinkedHashMap" fetchSize="1000" timeout="3600">
        SELECT *
        FROM INDIC.RU_MONTHAVERPAYMT
        WHERE FID IN
        <foreach item="fid" collection="fids" open="(" separator="," close=")">
            #{fid}
        </foreach>
        ORDER BY ACC_SERIAL_NUM, SERIAL_NUM
        WITH UR
    </select>

    <select id="findAllByFidsFromRuObligAccount" resultType="java.util.LinkedHashMap" fetchSize="1000" timeout="3600">
        SELECT *
        FROM INDIC.RU_OBLIGACCOUNT
        WHERE FID IN
        <foreach item="fid" collection="fids" open="(" separator="," close=")">
            #{fid}
        </foreach>
        ORDER BY ACC_SERIAL_NUM, SERIAL_NUM
        WITH UR
    </select>

    <select id="findAllByFidsFromRuObligsRcBankrupt" resultType="java.util.LinkedHashMap" fetchSize="1000"
            timeout="3600">
        SELECT *
        FROM INDIC.RU_OBLIGSRCBANKRUPT
        WHERE FID IN
        <foreach item="fid" collection="fids" open="(" separator="," close=")">
            #{fid}
        </foreach>
        ORDER BY ACC_SERIAL_NUM, SERIAL_NUM
        WITH UR
    </select>

    <select id="findAllByFidsFromRuObligsRcLiquid" resultType="java.util.LinkedHashMap" fetchSize="1000" timeout="3600">
        SELECT *
        FROM INDIC.RU_OBLIGSRCLIQUID
        WHERE FID IN
        <foreach item="fid" collection="fids" open="(" separator="," close=")">
            #{fid}
        </foreach>
        ORDER BY ACC_SERIAL_NUM, SERIAL_NUM
        WITH UR
    </select>

    <select id="findAllByFidsFromRuObligTermination" resultType="java.util.LinkedHashMap" fetchSize="1000"
            timeout="3600">
        SELECT *
        FROM INDIC.RU_OBLIGTERMINATION
        WHERE FID IN
        <foreach item="fid" collection="fids" open="(" separator="," close=")">
            #{fid}
        </foreach>
        ORDER BY ACC_SERIAL_NUM, SERIAL_NUM
        WITH UR
    </select>

    <select id="findAllByFidsFromRuOverallval" resultType="java.util.LinkedHashMap" fetchSize="1000" timeout="3600">
        SELECT *
        FROM INDIC.RU_OVERALLVAL
        WHERE FID IN
        <foreach item="fid" collection="fids" open="(" separator="," close=")">
            #{fid}
        </foreach>
        ORDER BY ACC_SERIAL_NUM, SERIAL_NUM
        WITH UR
    </select>

    <select id="findAllByFidsFromRuPastDueArrear" resultType="java.util.LinkedHashMap" fetchSize="1000" timeout="3600">
        SELECT *
        FROM INDIC.RU_PASTDUEARREAR
        WHERE FID IN
        <foreach item="fid" collection="fids" open="(" separator="," close=")">
            #{fid}
        </foreach>
        ORDER BY ACC_SERIAL_NUM, SERIAL_NUM
        WITH UR
    </select>

    <select id="findAllByFidsFromRuPaymtCondition" resultType="java.util.LinkedHashMap" fetchSize="1000" timeout="3600">
        SELECT *
        FROM INDIC.RU_PAYMT_CONDITION
        WHERE FID IN
        <foreach item="fid" collection="fids" open="(" separator="," close=")">
            #{fid}
        </foreach>
        ORDER BY ACC_SERIAL_NUM, SERIAL_NUM
        WITH UR
    </select>

    <select id="findAllByFidsFromRuPaymt" resultType="java.util.LinkedHashMap" fetchSize="1000" timeout="3600">
        SELECT *
        FROM INDIC.RU_PAYMT
        WHERE FID IN
        <foreach item="fid" collection="fids" open="(" separator="," close=")">
            #{fid}
        </foreach>
        ORDER BY ACC_SERIAL_NUM, SERIAL_NUM
        WITH UR
    </select>

    <select id="findAllByFidsFromRuServiceCo" resultType="java.util.LinkedHashMap" fetchSize="1000" timeout="3600">
        SELECT *
        FROM INDIC.RU_SERVICECO
        WHERE FID IN
        <foreach item="fid" collection="fids" open="(" separator="," close=")">
            #{fid}
        </foreach>
        ORDER BY ACC_SERIAL_NUM, SERIAL_NUM
        WITH UR
    </select>

    <select id="findAllByFidsFromRuSourceNonMonetOblig" resultType="java.util.LinkedHashMap" fetchSize="1000"
            timeout="3600">
        SELECT *
        FROM INDIC.RU_SOURCENONMONETOBLIG
        WHERE FID IN
        <foreach item="fid" collection="fids" open="(" separator="," close=")">
            #{fid}
        </foreach>
        ORDER BY ACC_SERIAL_NUM, SERIAL_NUM
        WITH UR
    </select>

    <select id="findAllByFidsFromRuSubjectNonMonetOblig" resultType="java.util.LinkedHashMap" fetchSize="1000"
            timeout="3600">
        SELECT *
        FROM INDIC.RU_SUBJECTNONMONETOBLIG
        WHERE FID IN
        <foreach item="fid" collection="fids" open="(" separator="," close=")">
            #{fid}
        </foreach>
        ORDER BY ACC_SERIAL_NUM, SERIAL_NUM
        WITH UR
    </select>

    <select id="findAllByFidsFromRuSubmitHold" resultType="java.util.LinkedHashMap" fetchSize="1000" timeout="3600">
        SELECT *
        FROM INDIC.RU_SUBMITHOLD
        WHERE FID IN
        <foreach item="fid" collection="fids" open="(" separator="," close=")">
            #{fid}
        </foreach>
        ORDER BY ACC_SERIAL_NUM, SERIAL_NUM
        WITH UR
    </select>

    <select id="findAllByFidsFromAccount" resultType="java.util.LinkedHashMap" fetchSize="1000" timeout="3600">
        SELECT *
        FROM INDIC.ACCOUNT
        WHERE FID IN
        <foreach item="fid" collection="fids" open="(" separator="," close=")">
            #{fid}
        </foreach>
        ORDER BY SERIAL_NUM
        WITH UR
    </select>

    <select id="findAllByFidsFromInformation" resultType="java.util.LinkedHashMap" fetchSize="1000" timeout="3600">
        SELECT *
        FROM INDIC.INFORMATION
        WHERE FID IN
        <foreach item="fid" collection="fids" open="(" separator="," close=")">
            #{fid}
        </foreach>
        ORDER BY SERIAL_NUM
        WITH UR
    </select>

    <select id="findAllByFidsFromBankruptcy" resultType="java.util.LinkedHashMap" fetchSize="1000" timeout="3600">
        SELECT *
        FROM INDIC.BANKRUPTCY
        WHERE FID IN
        <foreach item="fid" collection="fids" open="(" separator="," close=")">
            #{fid}
        </foreach>
        ORDER BY SERIAL_NUM
        WITH UR
    </select>

    <select id="findAllByFidsFromConsumerBankruptcy" resultType="java.util.LinkedHashMap" fetchSize="1000"
            timeout="3600">
        SELECT *
        FROM INDIC.CONSUMER_BANKRUPTCY
        WHERE FID IN
        <foreach item="fid" collection="fids" open="(" separator="," close=")">
            #{fid}
        </foreach>
        ORDER BY SERIAL_NUM
        WITH UR
    </select>

    <select id="findAllByFidsFromLegal" resultType="java.util.LinkedHashMap" fetchSize="1000" timeout="3600">
        SELECT *
        FROM INDIC.LEGAL
        WHERE FID IN
        <foreach item="fid" collection="fids" open="(" separator="," close=")">
            #{fid}
        </foreach>
        ORDER BY SERIAL_NUM
        WITH UR
    </select>

    <select id="findAllByMemberCodeFromAccount" resultType="java.util.LinkedHashMap" fetchSize="1000" timeout="3600">
        SELECT *
        FROM INDIC.ACCOUNT
        WHERE MEMBER_CODE LIKE #{memberCode} || '%'
        ORDER BY SERIAL_NUM, LAST_UPDATED_DT DESC
        WITH UR
    </select>

    <select id="findAllByMemberCodeFromInformation" resultType="java.util.LinkedHashMap" fetchSize="1000"
            timeout="3600">
        SELECT *
        FROM INDIC.INFORMATION
        WHERE MEMBER_CODE LIKE #{memberCode} || '%'
          AND (CANCELLATION_FLAG != 'Y' OR CANCELLATION_FLAG IS NULL)
        ORDER BY LAST_UPDATED_DT DESC
        WITH UR
    </select>

    <select id="findFidsByOgrnFromIdForTutdf" resultType="java.util.LinkedHashMap" timeout="3600">
        SELECT FID
        FROM INDIC.ID
        WHERE CAST(ID_NORM AS VARCHAR(2000)) = #{idNorm}
          AND ID_TYPE in ('34')
        ORDER BY LAST_UPDATED_DT DESC
        WITH UR
    </select>

    <select id="findFidsByPassportFromIdForTutdf" resultType="java.util.LinkedHashMap" timeout="3600">
        SELECT FID
        FROM INDIC.ID
        WHERE CAST(ID_NORM AS VARCHAR(2000)) = #{idNorm}
          AND ID_TYPE in ('10', '21')
        ORDER BY LAST_UPDATED_DT DESC
        WITH UR
    </select>

    <select id="findAllByFidsFromAccountAmend" resultType="java.util.LinkedHashMap" fetchSize="1000" timeout="3600">
        SELECT *
        FROM INDIC.ACCOUNT_AMEND
        WHERE FID IN
        <foreach item="fid" collection="fids" open="(" separator="," close=")">
            #{fid}
        </foreach>
        ORDER BY ACC_SERIAL_NUM, SERIAL_NUM
        WITH UR
    </select>

    <select id="findAllByFidsFromPayment" resultType="java.util.LinkedHashMap" fetchSize="1000" timeout="3600">
        SELECT *
        FROM INDIC.PAYMENT
        WHERE FID IN
        <foreach item="fid" collection="fids" open="(" separator="," close=")">
            #{fid}
        </foreach>
        ORDER BY ACC_SERIAL_NUM, SERIAL_NUM
        WITH UR
    </select>

    <select id="findAllByFidsFromCollateral" resultType="java.util.LinkedHashMap" fetchSize="1000" timeout="3600">
        SELECT *
        FROM INDIC.COLLATERAL
        WHERE FID IN
        <foreach item="fid" collection="fids" open="(" separator="," close=")">
            #{fid}
        </foreach>
        ORDER BY ACC_SERIAL_NUM, SERIAL_NUM
        WITH UR
    </select>

    <select id="findAllByFidsFromGuarantor" resultType="java.util.LinkedHashMap" fetchSize="1000" timeout="3600">
        SELECT *
        FROM INDIC.GUARANTOR
        WHERE FID IN
        <foreach item="fid" collection="fids" open="(" separator="," close=")">
            #{fid}
        </foreach>
        ORDER BY ACC_SERIAL_NUM, SERIAL_NUM
        WITH UR
    </select>

    <select id="findAllByFidsFromBankGuarantee" resultType="java.util.LinkedHashMap" fetchSize="1000" timeout="3600">
        SELECT *
        FROM INDIC.BANK_GUARANTEE
        WHERE FID IN
        <foreach item="fid" collection="fids" open="(" separator="," close=")">
            #{fid}
        </foreach>
        ORDER BY ACC_SERIAL_NUM, SERIAL_NUM
        WITH UR
    </select>
</mapper>
