|
|
|
@ -2,96 +2,110 @@
|
|
|
|
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
|
|
<mapper namespace="cokr.xit.cp.dao.CleanParkingMapper">
|
|
|
|
|
|
|
|
|
|
<select id="selectList" parameterType="cokr.xit.cp.CleanParkingQuery" resultType="dataObject">
|
|
|
|
|
/* 클린파킹 단속자료 목록 조회(cleanParkingMapper.selectList) */
|
|
|
|
|
<include refid="utility.paging-prefix"/>
|
|
|
|
|
SELECT 'ECA' AS MM_TASKGB
|
|
|
|
|
, MAIN.MM_CODE AS MM_CODE
|
|
|
|
|
, MAIN.MM_SGGCODE AS MM_SGGCODE
|
|
|
|
|
, MAIN.MM_DLGB AS MM_DLGB
|
|
|
|
|
, MAIN.MM_INGB AS MM_INGB
|
|
|
|
|
, MAIN.MM_DATE AS MM_DATE
|
|
|
|
|
, MAIN.MM_TIME AS MM_TIME
|
|
|
|
|
, MAIN.MM_LAWGB AS MM_LAWGB
|
|
|
|
|
, MAIN.MM_SGNM AS MM_SGNM
|
|
|
|
|
, MAIN.MM_SGTEL AS MM_SGTEL
|
|
|
|
|
, MAIN.MM_SGCONT AS MM_SGCONT
|
|
|
|
|
, MAIN.MM_SGPOS AS MM_SGPOS
|
|
|
|
|
, MAIN.MM_BDCODE AS MM_BDCODE
|
|
|
|
|
, MAIN.MM_GPS_X AS MM_GPS_X
|
|
|
|
|
, MAIN.MM_GPS_Y AS MM_GPS_Y
|
|
|
|
|
, MAIN.MM_TRAC AS MM_TRAC
|
|
|
|
|
, MAIN.MM_SNO AS MM_SNO
|
|
|
|
|
, MAIN.MM_IMAGECNT AS MM_IMAGECNT
|
|
|
|
|
, MAIN.MM_IMAGEGB AS MM_IMAGEGB
|
|
|
|
|
, MAIN.MM_CARNO AS MM_CARNO
|
|
|
|
|
, MAIN.MM_VHMNO AS MM_VHMNO
|
|
|
|
|
, MAIN.MM_CARGB AS MM_CARGB
|
|
|
|
|
, MAIN.MM_CARKIND AS MM_CARKIND
|
|
|
|
|
, MAIN.MM_OMCODE AS MM_OMCODE
|
|
|
|
|
, MAIN.MM_SDATE AS MM_SDATE
|
|
|
|
|
, MAIN.MM_EDATE AS MM_EDATE
|
|
|
|
|
, MAIN.MM_KEUM1 AS MM_KEUM1
|
|
|
|
|
, MAIN.MM_KEUM2 AS MM_KEUM2
|
|
|
|
|
, MAIN.MM_SUKEUM AS MM_SUKEUM
|
|
|
|
|
, MAIN.MM_MINUS_KEUM AS MM_MINUS_KEUM
|
|
|
|
|
, MAIN.MM_ADD_KEUM AS MM_ADD_KEUM
|
|
|
|
|
, MAIN.MM_RECALL AS MM_RECALL
|
|
|
|
|
, MAIN.MM_INUSER AS MM_INUSER
|
|
|
|
|
, MAIN.MM_INDT AS MM_INDT
|
|
|
|
|
, MAIN.MM_STATE AS MM_STATE
|
|
|
|
|
, MAIN.MM_STATE_DT AS MM_STATE_DT
|
|
|
|
|
, MAIN.MM_CARCHECK AS MM_CARCHECK
|
|
|
|
|
, MAIN.MM_PRECODE AS MM_PRECODE
|
|
|
|
|
, MAIN.MM_ETC AS MM_ETC
|
|
|
|
|
, MAIN.MM_VIDEOFILENM AS MM_VIDEOFILENM
|
|
|
|
|
, MAIN.MM_SAFEZONE AS MM_SAFEZONE
|
|
|
|
|
, MAIN.MM_VIORCNT AS MM_VIORCNT
|
|
|
|
|
, MAIN.MM_TIME2 AS MM_TIME2
|
|
|
|
|
, MAIN.MM_CARNAME AS MM_CARNAME
|
|
|
|
|
, MAIN.MM_CARCOLOR AS MM_CARCOLOR
|
|
|
|
|
, MAIN.MM_CARFUEL AS MM_CARFUEL
|
|
|
|
|
, MAIN.MM_TRANSMIT_SGG AS MM_TRANSMIT_SGG
|
|
|
|
|
, MAIN.MM_TRANSMIT_TEAM AS MM_TRANSMIT_TEAM
|
|
|
|
|
, OWNE.OM_CODE AS OM_CODE
|
|
|
|
|
, OWNE.OM_SGGCODE AS OM_SGGCODE
|
|
|
|
|
, OWNE.OM_NAME AS OM_NAME
|
|
|
|
|
, OWNE.OM_NO1 AS OM_NO1
|
|
|
|
|
, OWNE.OM_JNO AS OM_JNO
|
|
|
|
|
, OWNE.OM_NOGB AS OM_NOGB
|
|
|
|
|
, OWNE.OM_JUSO AS OM_JUSO
|
|
|
|
|
, OWNE.OM_BUNJI AS OM_BUNJI
|
|
|
|
|
, OWNE.OM_ZIP AS OM_ZIP
|
|
|
|
|
, OWNE.OM_DORO_CODE AS OM_DORO_CODE
|
|
|
|
|
, OWNE.OM_BLD_POSITION AS OM_BLD_POSITION
|
|
|
|
|
, OWNE.OM_BLD_NO1 AS OM_BLD_NO1
|
|
|
|
|
, OWNE.OM_BLD_NO2 AS OM_BLD_NO2
|
|
|
|
|
, OWNE.OM_BLD_ADMNO AS OM_BLD_ADMNO
|
|
|
|
|
, OWNE.OM_INGB AS OM_INGB
|
|
|
|
|
, OWNE.OM_INDT AS OM_INDT
|
|
|
|
|
, OWNE.OM_BDCODE AS OM_BDCODE
|
|
|
|
|
, MATC.MC_CODE AS MC_CODE
|
|
|
|
|
, MATC.MC_LVY_KEY AS MC_LVY_KEY
|
|
|
|
|
, MATC.MC_ACC_YEAR AS MC_ACC_YEAR
|
|
|
|
|
, MATC.MC_LVY_NO AS MC_LVY_NO
|
|
|
|
|
FROM (
|
|
|
|
|
(
|
|
|
|
|
cp_main_pt_eca MAIN
|
|
|
|
|
JOIN cp_owner_pt_eca OWNE ON (MAIN.MM_OMCODE = OWNE.OM_CODE)
|
|
|
|
|
)
|
|
|
|
|
LEFT JOIN (
|
|
|
|
|
SELECT cp_match_pt_eca.MC_CODE AS MC_CODE
|
|
|
|
|
, cp_match_pt_eca.MC_MMCODE AS MC_MMCODE
|
|
|
|
|
, cp_match_pt_eca.MC_LVY_KEY AS MC_LVY_KEY
|
|
|
|
|
, cp_match_pt_eca.MC_ACC_YEAR AS MC_ACC_YEAR
|
|
|
|
|
, cp_match_pt_eca.MC_LVY_NO AS MC_LVY_NO
|
|
|
|
|
, ROW_NUMBER() OVER (PARTITION BY cp_match_pt_eca.MC_MMCODE ORDER BY cp_match_pt_eca.MC_INDT DESC) AS RN
|
|
|
|
|
FROM cp_match_pt_eca
|
|
|
|
|
) MATC ON (MATC.MC_MMCODE = MAIN.MM_CODE AND MATC.RN = 1)
|
|
|
|
|
)
|
|
|
|
|
WHERE 1=1
|
|
|
|
|
<include refid="utility.sortBy" />
|
|
|
|
|
<include refid="utility.paging-suffix"/>
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<select id="selectMainList" parameterType="map" resultType="dataobject">/* 연계뷰 단속 목록 조회(cleanParkingMapper.selectMainList) */
|
|
|
|
|
SELECT MM_CODE
|
|
|
|
|
, MM_SGGCODE
|
|
|
|
|
, MM_TASKGB
|
|
|
|
|
, MM_DLGB
|
|
|
|
|
, MM_INGB
|
|
|
|
|
, MM_DATE
|
|
|
|
|
, (CASE WHEN LENGTH(MM_TIME) = 4 THEN CONCAT(MM_TIME, '00') ELSE MM_TIME END) AS MM_TIME
|
|
|
|
|
, MM_LAWGB
|
|
|
|
|
, (SELECT VLTN_ID FROM TB_VLTN X
|
|
|
|
|
WHERE X.VLTN_CD = LPAD(MM_LAWGB, 2, '0')
|
|
|
|
|
AND X.SGG_CD = MM_SGGCODE
|
|
|
|
|
AND X.TASK_SE_CD = MM_TASKGB) AS VLTN_ID
|
|
|
|
|
, MM_SGNM
|
|
|
|
|
, MM_SGTEL
|
|
|
|
|
, MM_SGCONT
|
|
|
|
|
, MM_SGPOS
|
|
|
|
|
, MM_BDCODE
|
|
|
|
|
, (SELECT TRIM(CONCAT(X.EMD_NM, ' ', X.LI_NM)) FROM TB_STDG X
|
|
|
|
|
WHERE X.STDG_CD = MM_BDCODE) AS CRDN_STDG_NM
|
|
|
|
|
, MM_GPS_X
|
|
|
|
|
, MM_GPS_Y
|
|
|
|
|
, MM_TRAC
|
|
|
|
|
, MM_SNO
|
|
|
|
|
, MM_IMAGECNT
|
|
|
|
|
, MM_IMAGEGB
|
|
|
|
|
, MM_CARNO
|
|
|
|
|
, MM_VHMNO
|
|
|
|
|
, MM_CARGB
|
|
|
|
|
, MM_CARKIND
|
|
|
|
|
, MM_OMCODE
|
|
|
|
|
, MM_SDATE
|
|
|
|
|
, MM_EDATE
|
|
|
|
|
, MM_KEUM1
|
|
|
|
|
, MM_KEUM2
|
|
|
|
|
, MM_SUKEUM
|
|
|
|
|
, MM_MINUS_KEUM
|
|
|
|
|
, MM_ADD_KEUM
|
|
|
|
|
, MM_RECALL
|
|
|
|
|
, MM_INUSER
|
|
|
|
|
, MM_INDT
|
|
|
|
|
, MM_STATE
|
|
|
|
|
, MM_STATE_DT
|
|
|
|
|
, MM_CARCHECK
|
|
|
|
|
, MM_PRECODE
|
|
|
|
|
, MM_ETC
|
|
|
|
|
, MM_VIDEOFILENM
|
|
|
|
|
, MM_SAFEZONE
|
|
|
|
|
, MM_VIORCNT
|
|
|
|
|
, (CASE WHEN LENGTH(MM_TIME2) = 4 THEN CONCAT(MM_TIME2, '00') ELSE MM_TIME2 END) AS MM_TIME2
|
|
|
|
|
, MM_CARNAME
|
|
|
|
|
, MM_CARCOLOR
|
|
|
|
|
, MM_CARFUEL
|
|
|
|
|
, MM_TRANSMIT_SGG
|
|
|
|
|
, MM_TRANSMIT_TEAM
|
|
|
|
|
, OM_CODE
|
|
|
|
|
, OM_SGGCODE
|
|
|
|
|
, OM_NAME
|
|
|
|
|
, OM_NO1
|
|
|
|
|
, OM_JNO
|
|
|
|
|
, OM_NOGB
|
|
|
|
|
, OM_JUSO
|
|
|
|
|
, OM_BUNJI
|
|
|
|
|
, OM_ZIP
|
|
|
|
|
, OM_DORO_CODE
|
|
|
|
|
, OM_BLD_POSITION
|
|
|
|
|
, OM_BLD_NO1
|
|
|
|
|
, OM_BLD_NO2
|
|
|
|
|
, OM_BLD_ADMNO
|
|
|
|
|
, OM_INGB
|
|
|
|
|
, OM_INDT
|
|
|
|
|
, OM_BDCODE
|
|
|
|
|
, MC_LVY_KEY
|
|
|
|
|
, (CASE WHEN MC_LVY_KEY IS NOT NULL THEN 'Y' ELSE 'N' END) AS NIS_LINK_YN
|
|
|
|
|
FROM VW_CP_MAIN
|
|
|
|
|
<where>
|
|
|
|
|
<if test="schCrdnYmdFrom != null">
|
|
|
|
|
AND MM_DATE <![CDATA[>=]]> #{schCrdnYmdFrom} <!-- 단속 일자 시작 -->
|
|
|
|
|
</if>
|
|
|
|
|
<if test="schCrdnYmdTo != null">
|
|
|
|
|
AND MM_DATE <![CDATA[<=]]> #{schCrdnYmdTo} <!-- 단속 일자 종료 -->
|
|
|
|
|
</if>
|
|
|
|
|
<if test="schVhrno != null">
|
|
|
|
|
AND MM_CARNO = #{schVhrno} <!-- 차량번호 -->
|
|
|
|
|
</if>
|
|
|
|
|
<if test="omJnos != null">
|
|
|
|
|
AND OM_JNO IN ( <!-- 납부자 번호s -->
|
|
|
|
|
<foreach collection="omJnos" item="omJno" separator=","> #{omJno} </foreach>
|
|
|
|
|
)
|
|
|
|
|
</if>
|
|
|
|
|
<if test="omJno != null">
|
|
|
|
|
AND OM_JNO = #{omJno} <!-- 납부자 번호 -->
|
|
|
|
|
</if>
|
|
|
|
|
<if test="schEntNm != null">
|
|
|
|
|
AND OM_NAME = #{schEntNm} <!-- 납부자 명 -->
|
|
|
|
|
</if>
|
|
|
|
|
<if test="sggCd != null">
|
|
|
|
|
AND MM_SGGCODE = #{sggCd} <!-- 시군구 코드 -->
|
|
|
|
|
</if>
|
|
|
|
|
<if test="taskSeCd != null">
|
|
|
|
|
AND MM_TASKGB = #{taskSeCd} <!-- 업무 구분 코드 -->
|
|
|
|
|
</if>
|
|
|
|
|
</where>
|
|
|
|
|
<include refid="utility.orderBy" />
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
</mapper>
|