From 0bbaf016e394fa7f104071101345ade289ab1202 Mon Sep 17 00:00:00 2001 From: leebeomjun Date: Thu, 10 Aug 2023 09:37:20 +0900 Subject: [PATCH] =?UTF-8?q?=EB=8B=A8=EC=86=8D=EB=B6=80=EA=B0=80=20?= =?UTF-8?q?=ED=85=8C=EC=9D=B4=EB=B8=94=20JOIN=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../sql/mapper/fims/crdn/crdn01-mapper.xml | 64 ++++++++++--------- .../sql/mapper/fims/crdn/crdn06-mapper.xml | 50 ++++++++------- 2 files changed, 60 insertions(+), 54 deletions(-) diff --git a/src/main/resources/sql/mapper/fims/crdn/crdn01-mapper.xml b/src/main/resources/sql/mapper/fims/crdn/crdn01-mapper.xml index 815efc42..56c5b322 100644 --- a/src/main/resources/sql/mapper/fims/crdn/crdn01-mapper.xml +++ b/src/main/resources/sql/mapper/fims/crdn/crdn01-mapper.xml @@ -16,7 +16,6 @@ SELECT C.CRDN_ID , C.CRDN_INPT_SE_CD , C.LINK_NM , C.LINK_ID - , C.CRDN_SE_CD , C.RTPYR_ID , C.CRDN_YMD , C.CRDN_TM @@ -26,23 +25,13 @@ SELECT C.CRDN_ID , C.CRDN_STDG_NM , C.CRDN_ROAD_NM , C.CRDN_PLC - , C.DTL_CRDN_PLC - , C.TEAM_ID , C.VLTN_ID - , C.CRDN_SPAREA_CD - , C.CRDN_BGNG_TM - , C.CRDN_END_HR - , C.CRDN_SN , C.GPS_X , C.GPS_Y - , C.MOSC_X - , C.MOSC_Y - , C.TOWNG_YN , C.ATCH_FILE_CNT , C.VIN , C.VHCL_NM , C.VHCL_COLOR - , C.USE_FUEL_CD , C.USG_SE_CD , C.MXMM_LOAD_QY , C.TKCAR_PSNCPA_CNT @@ -50,10 +39,6 @@ SELECT C.CRDN_ID , C.CARMDL_TYPE_NM , C.CARMDL_CLSF_NM , C.ERSR_YMD - , C.FFNLG_CARMDL_CD - , C.PARKNG_PSBLTY_RSLT_CD - , C.VLTN_NMTM - , C.OVTIME_YN , C.RVW_SE_CD , C.RVW_PRCS_SCRN_NM , C.RVW_DT @@ -73,6 +58,21 @@ SELECT C.CRDN_ID , C.MINUS_AMT , C.RCVMT_AMT , C.BFR_CRDN_ID + , CA.CRDN_SE_CD + , CA.DTL_CRDN_PLC + , CA.TEAM_ID + , CA.CRDN_SPAREA_CD + , CA.CRDN_BGNG_TM + , CA.CRDN_END_HR + , CA.CRDN_SN + , CA.MOSC_X + , CA.MOSC_Y + , CA.TOWNG_YN + , CA.USE_FUEL_CD + , CA.FFNLG_CARMDL_CD + , CA.PARKNG_PSBLTY_RSLT_CD + , CA.VLTN_NMTM + , CA.OVTIME_YN , CC.CVLCPT_LINK_ID , CC.CVLCPT_INPT_SE_CD , CC.CVLCPT_RCPT_YMD @@ -107,8 +107,9 @@ SELECT C.CRDN_ID , C.DEL_DT , C.DEL_RSN FROM TB_CRDN C +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) INNER 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_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) WHERE C.DEL_YN = 'N' @@ -318,37 +319,38 @@ SELECT C.CRDN_ID