<?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="kr.gmtc.gw.eyegw.db1.EaiIfCheckMapper">

    <select id="selectAarsArr" resultType="hashMap">
        select count(*) as data_cnt from ueai.EAI_ELECSTRIPARRARTS_RCV where deal_stat = 'S'
    </select>
    
    <select id="selectAarsDep" resultType="hashMap">
        select count(*) as data_cnt from ueai.EAI_ELECSTRIPDEPARTS_RCV where deal_stat = 'S'
    </select>
    
    <select id="selectAcdmArr" resultType="hashMap">
        select count(*) as data_cnt from ueai.EAI_FLTACDMMLSTNARR_RCV where deal_stat = 'S'
    </select>
    
    <select id="selectAcdmDep" resultType="hashMap">
        select count(*) as data_cnt from ueai.EAI_FLTACDMMLSTNDEP_RCV where deal_stat = 'S'
    </select>
    
    <select id="selectGAM" resultType="hashMap">
        select count(*) as data_cnt from ueai.EAI_GRDACMVT_RCV where deal_stat = 'S'
    </select>

    <select id="selectAllFltSchdul" resultType="hashMap">
        select count(*) as data_cnt
        from (
            select DATEANDTIME from ueai.EAI_ELECSTRIPARRARTS_RCV where DEAL_STAT = 'S' union all
            select DATEANDTIME from ueai.EAI_ELECSTRIPDEPARTS_RCV where DEAL_STAT = 'S' union all
            select DATEANDTIME from ueai.EAI_FLTACDMMLSTNARR_RCV where DEAL_STAT = 'S' union all
            select DATEANDTIME from ueai.EAI_FLTACDMMLSTNDEP_RCV where DEAL_STAT = 'S' union all
            select DATEANDTIME from ueai.EAI_GRDACMVT_RCV where DEAL_STAT = 'S'
        ) 
    </select>
    
    <select id="selectAMOS" resultType="hashMap">
        select count(*) as data_cnt from ueai.EAI_AWOS_RCV where deal_stat = 'S' and dateandtime >= '20231001000000.000'
    </select>
    
    
    <select id="selectNOTAM" resultType="hashMap">
        select count(*) as data_cnt from UEAI.EAI_AFTNFLTINFO_RCV where deal_stat = 'S'
    </select>
    

    <select id="selectLogCode" resultType="hashMap">
        select cd_id as cd, CD_REF1 as cd_nm
        from ucm.SACP_CMMN_CD
        where CD_TY_ID = 'CT033'
        and UPPER_CD = 'EAI'
        order by cd_id
    </select>

     

</mapper>