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

    <select id="selectVmsParkInfo" resultType="com.its.vms.entity.TbVmsPark">
    <![CDATA[
        select a.prk_plce_nmbr                     AS prkPlceNmbr,
               a.prk_plce_manage_no                AS prkPlceManageNo,
               a.prk_plce_nm                       AS prkPlceNm,
               a.vms_dspl_nm                       AS vmsDsplNm,
               nvl(b.cmnc_stts_cd, 'CMS1')         AS cmncSttsCd,
               a.prk_cmprt_co                      AS regPrkCmprtCo,
               nvl(c.prk_cmprt_co, a.prk_cmprt_co) AS runPrkCmprtCo,
               nvl(c.parking_cgs_sttus, 9)         AS parkingCgsStts,
               nvl(c.remndr_prk_cmprt_co, 0)       AS remndrPrkCmprtCo
        from tb_prk_plce a, tb_prk_plce_stts b, tb_prk_plce_rt c
        where a.del_yn    = 'N'
          and a.pis_type != 'N'
          and a.prk_plce_nmbr = b.prk_plce_nmbr(+)
          and a.prk_plce_nmbr = c.prk_plce_nmbr(+)
        ]]>
    </select>

</mapper>
