민원 JOIN 수정

main
이범준 1 year ago
parent 0bbaf016e3
commit 9ba4c7b31a

@ -109,7 +109,7 @@ SELECT C.CRDN_ID <!-- 단속 ID -->
FROM TB_CRDN C FROM TB_CRDN C
INNER JOIN TB_CRDN_ADI CA ON (C.CRDN_ID = CA.CRDN_ID) INNER JOIN TB_CRDN_ADI CA ON (C.CRDN_ID = CA.CRDN_ID)
LEFT OUTER JOIN TB_TEAM_INFO TI ON (CA.TEAM_ID = TI.TEAM_ID) LEFT OUTER JOIN TB_TEAM_INFO TI ON (CA.TEAM_ID = TI.TEAM_ID)
INNER JOIN TB_CRDN_CVLCPT CC ON (C.LINK_NM IN ('TB_ESB_INTERFACE','TB_SAEOL') AND C.LINK_ID = CC.CVLCPT_LINK_ID) INNER JOIN TB_CRDN_CVLCPT CC ON (C.CVLCPT_LINK_YN = 'Y' AND C.LINK_ID = CC.CVLCPT_LINK_ID)
LEFT OUTER JOIN TB_LEVY_EXCL LE ON (C.CRDN_ID = LE.CRDN_ID) LEFT OUTER JOIN TB_LEVY_EXCL LE ON (C.CRDN_ID = LE.CRDN_ID)
LEFT OUTER JOIN TB_LEVY L ON (C.LEVY_ID = L.LEVY_ID) LEFT OUTER JOIN TB_LEVY L ON (C.LEVY_ID = L.LEVY_ID)
WHERE C.DEL_YN = 'N' WHERE C.DEL_YN = 'N'
@ -163,7 +163,7 @@ SELECT C.CRDN_ID <!-- 단속 ID -->
, C.VHRNO <!-- 차량번호 --> , C.VHRNO <!-- 차량번호 -->
, C.CRDN_PLC , C.CRDN_PLC
FROM TB_CRDN C FROM TB_CRDN C
INNER JOIN TB_CRDN_CVLCPT CC ON (C.LINK_NM IN ('TB_ESB_INTERFACE','TB_SAEOL') AND C.LINK_ID = CC.CVLCPT_LINK_ID) INNER JOIN TB_CRDN_CVLCPT CC ON (C.CVLCPT_LINK_YN = 'Y' AND C.LINK_ID = CC.CVLCPT_LINK_ID)
WHERE C.DEL_YN = 'N' WHERE C.DEL_YN = 'N'
AND C.TASK_SE_CD = #{taskSeCd} AND C.TASK_SE_CD = #{taskSeCd}
AND C.CRDN_STTS_CD = '01' AND C.CRDN_STTS_CD = '01'
@ -220,7 +220,7 @@ SELECT C.CRDN_ID <!-- 단속 ID -->
, LE.LEVY_EXCL_RSN_CD , LE.LEVY_EXCL_RSN_CD
, C.ETC_CN , C.ETC_CN
FROM TB_CRDN C FROM TB_CRDN C
INNER JOIN TB_CRDN_CVLCPT CC ON (C.LINK_NM IN ('TB_ESB_INTERFACE','TB_SAEOL') AND C.LINK_ID = CC.CVLCPT_LINK_ID) INNER JOIN TB_CRDN_CVLCPT CC ON (C.CVLCPT_LINK_YN = 'Y' AND C.LINK_ID = CC.CVLCPT_LINK_ID)
LEFT OUTER JOIN TB_LEVY_EXCL LE ON (C.CRDN_ID = LE.CRDN_ID) LEFT OUTER JOIN TB_LEVY_EXCL LE ON (C.CRDN_ID = LE.CRDN_ID)
WHERE C.DEL_YN = 'N' WHERE C.DEL_YN = 'N'
AND C.TASK_SE_CD = #{taskSeCd} AND C.TASK_SE_CD = #{taskSeCd}
@ -284,7 +284,7 @@ SELECT C.CRDN_ID <!-- 단속 ID -->
, CC.CVLCPT_APLY_CN <!-- 민원 신청 내용 --> , CC.CVLCPT_APLY_CN <!-- 민원 신청 내용 -->
, CC.CVLCPT_APLY_SE_CD <!-- 민원 신청 구분코드 --> , CC.CVLCPT_APLY_SE_CD <!-- 민원 신청 구분코드 -->
FROM TB_CRDN C FROM TB_CRDN C
INNER JOIN TB_CRDN_CVLCPT CC ON (C.LINK_NM IN ('TB_ESB_INTERFACE','TB_SAEOL') AND C.LINK_ID = CC.CVLCPT_LINK_ID) INNER JOIN TB_CRDN_CVLCPT CC ON (C.CVLCPT_LINK_YN = 'Y' AND C.LINK_ID = CC.CVLCPT_LINK_ID)
WHERE C.DEL_YN = 'N' AND CC.DEL_YN = 'N' WHERE C.DEL_YN = 'N' AND CC.DEL_YN = 'N'
AND C.CRDN_ID = #{crdnId} AND C.CRDN_ID = #{crdnId}
</select> </select>
@ -300,7 +300,7 @@ SELECT C.CRDN_ID <!-- 단속 ID -->
, C.LINK_NM <!-- 연계 테이블 명 --> , C.LINK_NM <!-- 연계 테이블 명 -->
, C.LINK_ID <!-- 연계 ID --> , C.LINK_ID <!-- 연계 ID -->
FROM TB_CRDN C FROM TB_CRDN C
INNER JOIN TB_CRDN_CVLCPT CC ON (C.LINK_NM IN ('TB_ESB_INTERFACE','TB_SAEOL') AND C.LINK_ID = CC.CVLCPT_LINK_ID) INNER JOIN TB_CRDN_CVLCPT CC ON (C.CVLCPT_LINK_YN = 'Y' AND C.LINK_ID = CC.CVLCPT_LINK_ID)
WHERE C.DEL_YN = 'N' AND CC.DEL_YN = 'N' WHERE C.DEL_YN = 'N' AND CC.DEL_YN = 'N'
AND C.CRDN_ID = #{crdnId} AND C.CRDN_ID = #{crdnId}
</select> </select>
@ -311,7 +311,7 @@ SELECT C.CRDN_ID <!-- 단속 ID -->
, CC.CVLCPT_APLY_CN <!-- 민원 신청 내용 --> , CC.CVLCPT_APLY_CN <!-- 민원 신청 내용 -->
, CC.CVLCPT_PRCS_RSLT_CN , CC.CVLCPT_PRCS_RSLT_CN
FROM TB_CRDN C FROM TB_CRDN C
INNER JOIN TB_CRDN_CVLCPT CC ON (C.LINK_NM IN ('TB_ESB_INTERFACE','TB_SAEOL') AND C.LINK_ID = CC.CVLCPT_LINK_ID) INNER JOIN TB_CRDN_CVLCPT CC ON (C.CVLCPT_LINK_YN = 'Y' AND C.LINK_ID = CC.CVLCPT_LINK_ID)
WHERE C.DEL_YN = 'N' WHERE C.DEL_YN = 'N'
AND C.CRDN_ID = #{crdnId} AND C.CRDN_ID = #{crdnId}
</select> </select>
@ -351,7 +351,7 @@ SELECT C.CRDN_ID <!-- 단속 ID -->
, P.ZIP <!-- 납부자 우편번호 --> , P.ZIP <!-- 납부자 우편번호 -->
FROM TB_CRDN C FROM TB_CRDN C
INNER JOIN TB_CRDN_ADI CA ON (C.CRDN_ID = CA.CRDN_ID) INNER JOIN TB_CRDN_ADI CA ON (C.CRDN_ID = CA.CRDN_ID)
INNER JOIN TB_CRDN_CVLCPT CC ON (C.LINK_NM IN ('TB_ESB_INTERFACE','TB_SAEOL') AND C.LINK_ID = CC.CVLCPT_LINK_ID) INNER JOIN TB_CRDN_CVLCPT CC ON (C.CVLCPT_LINK_YN = 'Y' AND C.LINK_ID = CC.CVLCPT_LINK_ID)
LEFT OUTER JOIN TB_PAYER P ON (C.RTPYR_ID = P.RTPYR_ID) LEFT OUTER JOIN TB_PAYER P ON (C.RTPYR_ID = P.RTPYR_ID)
WHERE C.DEL_YN = 'N' WHERE C.DEL_YN = 'N'
AND C.CRDN_ID = #{crdnId} AND C.CRDN_ID = #{crdnId}

@ -199,7 +199,7 @@ SELECT C.CRDN_ID <!-- 단속 ID -->
FROM TB_CRDN C FROM TB_CRDN C
INNRT JOIN TB_CRDN_ADI CA ON (C.CRDN_ID = CA.CRDN_ID) INNRT JOIN TB_CRDN_ADI CA ON (C.CRDN_ID = CA.CRDN_ID)
LEFT OUTER JOIN TB_TEAM_INFO TI ON (CA.TEAM_ID = TI.TEAM_ID) LEFT OUTER JOIN TB_TEAM_INFO TI ON (CA.TEAM_ID = TI.TEAM_ID)
LEFT OUTER JOIN TB_CRDN_CVLCPT CC ON (C.LINK_NM IN ('TB_ESB_INTERFACE','TB_SAEOL') AND C.LINK_ID = CC.CVLCPT_LINK_ID) LEFT OUTER JOIN TB_CRDN_CVLCPT CC ON (C.CVLCPT_LINK_YN = 'Y' AND C.LINK_ID = CC.CVLCPT_LINK_ID)
LEFT OUTER JOIN TB_LEVY_EXCL LE ON (C.CRDN_ID = LE.CRDN_ID) LEFT OUTER JOIN TB_LEVY_EXCL LE ON (C.CRDN_ID = LE.CRDN_ID)
LEFT OUTER JOIN TB_LEVY L ON (C.LEVY_ID = L.LEVY_ID) LEFT OUTER JOIN TB_LEVY L ON (C.LEVY_ID = L.LEVY_ID)
WHERE C.DEL_YN = 'N' WHERE C.DEL_YN = 'N'
@ -403,7 +403,7 @@ SELECT C.CRDN_ID <!-- 단속 ID -->
FROM TB_CRDN C FROM TB_CRDN C
INNER JOIN TB_CRDN_ADI CA ON (C.CRDN_ID = CA.CRDN_ID) INNER JOIN TB_CRDN_ADI CA ON (C.CRDN_ID = CA.CRDN_ID)
LEFT OUTER JOIN TB_TEAM_INFO TI ON (CA.TEAM_ID = TI.TEAM_ID) LEFT OUTER JOIN TB_TEAM_INFO TI ON (CA.TEAM_ID = TI.TEAM_ID)
LEFT OUTER JOIN TB_CRDN_CVLCPT CC ON (C.LINK_NM IN ('TB_ESB_INTERFACE','TB_SAEOL') AND C.LINK_ID = CC.CVLCPT_LINK_ID) LEFT OUTER JOIN TB_CRDN_CVLCPT CC ON (C.CVLCPT_LINK_YN = 'Y' AND C.LINK_ID = CC.CVLCPT_LINK_ID)
WHERE C.DEL_YN = 'N' WHERE C.DEL_YN = 'N'
AND C.TASK_SE_CD = 'DPV' AND C.TASK_SE_CD = 'DPV'
AND CA.PARKNG_PSBLTY_RSLT_CD = '0' AND CA.PARKNG_PSBLTY_RSLT_CD = '0'

Loading…
Cancel
Save