<?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.VmsFormMapper">

    <select id="selectVmsFormInfo" resultType="com.its.vms.entity.TbVmsForm">
    <![CDATA[
        select t1.vms_form_id                   AS vmsFormId,
               t1.vms_type_cd                   AS vmsTypeCd,
               t1.vms_form_type_cd              AS vmsFormTypeCd,
               t1.vms_form_colr_cd              AS vmsFormColrCd,
               nvl(trim(t1.vms_form_nm), '')    AS vmsFormNm,
               nvl(trim(t1.vms_form_expl), '')  AS vmsFormExpl,
               t1.vms_form_dspl_drct_cd         AS vmsFormDsplDrctCd,
               t1.symb_lib_nmbr                 AS symbLibNmbr,
               t1.vms_form_imag                 AS vmsFormImag,
               t1.vms_form_dspl_mthd_cd         AS vmsFormDsplMthdCd,
               t1.cctv_mngm_nmbr                AS cctvMngmNmbr,
               t1.updt_dt                       AS updtDt,
               t1.valid_yn                      AS validYn
        from tb_vms_form t1
        ]]>
    </select>

    <select id="selectVmsFormObjectInfo" resultType="com.its.vms.entity.TbVmsFormObject">
    <![CDATA[
        select t1.vms_form_id             AS vmsFormId,
               t1.vms_form_object_id      AS vmsFormObjectId,
               t1.vms_form_dspl_row       AS vmsFormDsplRow,
               t1.vms_form_dspl_clmn      AS vmsFormDsplClmn,
               t1.vms_form_object_type_cd AS vmsFormObjectTypeCd,
               t1.vms_font_name_cd        AS vmsFontNameCd,
               t1.vms_font_colr_cd        AS vmsFontColrCd,
               t1.vms_font_bold           AS vmsFontBold,
               t1.vms_font_size           AS vmsFontSize,
               t1.vms_font_align          AS vmsFontAlign,
               t1.vms_dspl_txt            AS vmsDsplTxt,
               t1.vms_dspl_xcrdn          AS vmsDsplXcrdn,
               t1.vms_dspl_ycrdn          AS vmsDsplYcrdn,
               t1.vms_dspl_width          AS vmsDsplWidth,
               t1.vms_dspl_height         AS vmsDsplHeight,
               t1.vms_dspl_blinking       AS vmsDsplBlinking,
               t1.vms_dspl_bkcolor        AS vmsDsplBkColor,
               t1.vms_dspl_size           AS vmsDsplSize,
               nvl(t1.trfc_fill_cd, 'N')  AS trfcFillCd,
               nvl(t1.symb_lib_nmbr, 0)   AS symbLibNmbr,
               nvl(t1.vms_ifsc_id, 0)     AS vmsIfscId
        from tb_vms_form_object t1, tb_vms_form t2, tb_vms_symb_lib t3
        where t1.vms_form_id = t2.vms_form_id
          and t1.symb_lib_nmbr = t3.symb_lib_nmbr(+)
        order by t1.vms_form_id, t1.vms_form_object_id
        ]]>
    </select>

    <select id="selectVmsFormColorInfo" resultType="com.its.vms.entity.TbVmsFormColr">
    <![CDATA[
        select t1.vms_form_colr_cd  AS vmsFormColrCd,
               t1.vms_form_colr_nm  AS vmsFormColrNm,
               t1.vms_form_colr_val AS vmsFormColrVal
        from tb_vms_form_colr t1
        ]]>
    </select>

</mapper>
