<?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="com.its.vms.dao.mapper.VmsSymbMapper">

    <select id="selectVmsSymbLib" resultType="com.its.vms.entity.TbVmsSymbLib">
    <![CDATA[
        select t1.symb_lib_nmbr  AS symbLibNmbr,
               t1.rgst_dt        AS rgstDt,
               t1.red_data       AS redData,
               t1.green_data     AS greenData,
               t1.symb_expl      AS symbExpl,
               t1.imag_data      AS imagData,
               t1.vms_type_cd    AS vmsTypeCd,
               t1.symb_imag_type AS symbImagType,
               t1.symb_file_nm   AS symbFileNm,
               t1.symb_type      AS symbType,
               t1.avi_data       AS aviData,
               t1.imag_size      AS imagSize,
               t1.play_tm        AS playTm,
               t1.del_yn         AS delYn,
               t1.updt_dt        AS updtDt,
               nvl(t2.posx, 0)   AS posX,
               nvl(t2.posy, 0)   AS posY
        from tb_vms_symb_lib t1
        left outer join tb_vms_symb_ifsc t2
        on t1.symb_lib_nmbr = t2.symb_lib_nmbr
        and t2.cell_id = 1
        ]]>
    </select>

    <select id="selectVmsSymbCellInfo" resultType="com.its.vms.entity.TbVmsSymbIfsc">
    <![CDATA[
        select t1.symb_lib_nmbr       AS symbLibNmbr,
               t1.cell_id             AS cellId,
               t1.posx                AS posX,
               t1.posy                AS posY,
               nvl(t1.vms_ifsc_id, 0) AS vmsIfscId,
               t2.updt_dt             AS updtDt
        from tb_vms_symb_ifsc t1
        inner join tb_vms_symb_lib t2
        on t1.symb_lib_nmbr = t2.symb_lib_nmbr
        order by t1.symb_lib_nmbr, t1.cell_id
        ]]>
    </select>

</mapper>
