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