단속민원 JOIN조건 변경

main
이범준 1 year ago
parent 2e1ad53e8a
commit bbc21392c4

@ -107,7 +107,7 @@ SELECT C.CRDN_ID <!-- 단속 ID -->
, C.DEL_DT
, C.DEL_RSN
FROM TB_CRDN C
INNER JOIN TB_CRDN_CVLCPT CC ON (C.CRDN_ID = CC.CRDN_ID)
INNER JOIN TB_CRDN_CVLCPT CC ON (C.LINK_TBL_NM IN ('TB_ESB_INTERFACE','TB_SAEOL') AND C.LINK_ID = CC.CVLCPT_LINK_ID)
LEFT OUTER JOIN TB_TEAM_INFO TI ON (C.TEAM_ID = TI.TEAM_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)
@ -162,7 +162,7 @@ SELECT C.CRDN_ID <!-- 단속 ID -->
, C.VHRNO <!-- 차량번호 -->
, C.CRDN_PLC
FROM TB_CRDN C
INNER JOIN TB_CRDN_CVLCPT CC ON (C.CRDN_ID = CC.CRDN_ID)
INNER JOIN TB_CRDN_CVLCPT CC ON (C.LINK_TBL_NM IN ('TB_ESB_INTERFACE','TB_SAEOL') AND C.LINK_ID = CC.CVLCPT_LINK_ID)
WHERE C.DEL_YN = 'N'
AND C.TASK_SE_CD = #{taskSeCd}
AND C.CRDN_STTS_CD = '01'
@ -219,7 +219,7 @@ SELECT C.CRDN_ID <!-- 단속 ID -->
, LE.LEVY_EXCL_RSN_CD
, C.ETC_CN
FROM TB_CRDN C
INNER JOIN TB_CRDN_CVLCPT CC ON (C.CRDN_ID = CC.CRDN_ID)
INNER JOIN TB_CRDN_CVLCPT CC ON (C.LINK_TBL_NM IN ('TB_ESB_INTERFACE','TB_SAEOL') AND C.LINK_ID = CC.CVLCPT_LINK_ID)
LEFT OUTER JOIN TB_LEVY_EXCL LE ON (C.CRDN_ID = LE.CRDN_ID)
WHERE C.DEL_YN = 'N'
AND C.TASK_SE_CD = #{taskSeCd}
@ -283,7 +283,7 @@ SELECT C.CRDN_ID <!-- 단속 ID -->
, CC.CVLCPT_APLY_CN <!-- 민원 신청 내용 -->
, CC.CVLCPT_APLY_SE_CD <!-- 민원 신청 구분코드 -->
FROM TB_CRDN C
INNER JOIN TB_CRDN_CVLCPT CC ON (C.CRDN_ID = CC.CRDN_ID)
INNER JOIN TB_CRDN_CVLCPT CC ON (C.LINK_TBL_NM IN ('TB_ESB_INTERFACE','TB_SAEOL') AND C.LINK_ID = CC.CVLCPT_LINK_ID)
WHERE C.DEL_YN = 'N' AND CC.DEL_YN = 'N'
AND C.CRDN_ID = #{crdnId}
</select>
@ -299,7 +299,7 @@ SELECT C.CRDN_ID <!-- 단속 ID -->
, C.LINK_TBL_NM <!-- 연계 테이블 명 -->
, C.LINK_ID <!-- 연계 ID -->
FROM TB_CRDN C
INNER JOIN TB_CRDN_CVLCPT CC ON (C.CRDN_ID = CC.CRDN_ID)
INNER JOIN TB_CRDN_CVLCPT CC ON (C.LINK_TBL_NM IN ('TB_ESB_INTERFACE','TB_SAEOL') AND C.LINK_ID = CC.CVLCPT_LINK_ID)
WHERE C.DEL_YN = 'N' AND CC.DEL_YN = 'N'
AND C.CRDN_ID = #{crdnId}
</select>
@ -310,7 +310,7 @@ SELECT C.CRDN_ID <!-- 단속 ID -->
, CC.CVLCPT_APLY_CN <!-- 민원 신청 내용 -->
, CC.CVLCPT_PRCS_RSLT_CN
FROM TB_CRDN C
INNER JOIN TB_CRDN_CVLCPT CC ON (C.CRDN_ID = CC.CRDN_ID AND CC.DEL_YN = 'N')
INNER JOIN TB_CRDN_CVLCPT CC ON (C.LINK_TBL_NM IN ('TB_ESB_INTERFACE','TB_SAEOL') AND C.LINK_ID = CC.CVLCPT_LINK_ID)
WHERE C.DEL_YN = 'N'
AND C.CRDN_ID = #{crdnId}
</select>
@ -349,7 +349,7 @@ SELECT C.CRDN_ID <!-- 단속 ID -->
, C.LINK_TBL_NM <!-- 연계 테이블 명 -->
, C.LINK_ID <!-- 연계 아이디 -->
FROM TB_CRDN C
INNER JOIN TB_CRDN_CVLCPT CC ON (C.CRDN_ID = CC.CRDN_ID AND CC.DEL_YN = 'N')
INNER JOIN TB_CRDN_CVLCPT CC ON (C.LINK_TBL_NM IN ('TB_ESB_INTERFACE','TB_SAEOL') AND C.LINK_ID = CC.CVLCPT_LINK_ID)
LEFT OUTER JOIN TB_PAYER P ON (C.RTPYR_ID = P.RTPYR_ID)
WHERE C.DEL_YN = 'N'
AND C.CRDN_ID = #{crdnId}

@ -197,7 +197,7 @@ SELECT C.CRDN_ID <!-- 단속 ID -->
, C.DEL_DT
, C.DEL_RSN
FROM TB_CRDN C
LEFT OUTER JOIN TB_CRDN_CVLCPT CC ON (C.CRDN_ID = CC.CRDN_ID)
LEFT OUTER JOIN TB_CRDN_CVLCPT CC ON (C.LINK_TBL_NM IN ('TB_ESB_INTERFACE','TB_SAEOL') AND C.LINK_ID = CC.CVLCPT_LINK_ID)
LEFT OUTER JOIN TB_TEAM_INFO TI ON (C.TEAM_ID = TI.TEAM_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)
@ -398,7 +398,7 @@ SELECT C.CRDN_ID <!-- 단속 ID -->
, C.ATCH_FILE_CNT <!-- 사진건수 -->
, C.CRDN_SN <!-- 단속 일련번호 -->
FROM TB_CRDN C
LEFT OUTER JOIN TB_CRDN_CVLCPT CC ON (C.CRDN_ID = CC.CRDN_ID)
LEFT OUTER JOIN TB_CRDN_CVLCPT CC ON (C.LINK_TBL_NM IN ('TB_ESB_INTERFACE','TB_SAEOL') AND C.LINK_ID = CC.CVLCPT_LINK_ID)
LEFT OUTER JOIN TB_TEAM_INFO TI ON (C.TEAM_ID = TI.TEAM_ID)
WHERE C.DEL_YN = 'N'
AND C.TASK_SE_CD = 'DPV'

Loading…
Cancel
Save