From 78b1de9d64d2787bc974d87cb1a3f50d626b151c Mon Sep 17 00:00:00 2001 From: JoJH Date: Tue, 12 Nov 2024 11:26:07 +0900 Subject: [PATCH] =?UTF-8?q?=EB=8B=A8=EC=86=8D=EC=B2=98=EB=A6=AC=EC=83=81?= =?UTF-8?q?=ED=83=9C=EC=97=90=20=EB=94=B0=EB=A5=B8=20=EC=9E=84=EB=8C=80?= =?UTF-8?q?=EC=B0=A8=EA=B3=84=EC=95=BD=EC=84=9C=20=EB=93=B1=EB=A1=9D=20?= =?UTF-8?q?=EC=97=AC=EB=B6=80=20=EC=88=98=EC=A0=95.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../sql/mapper/fims/rent/lsctMpng-mapper.xml | 79 ++++++++++--------- 1 file changed, 41 insertions(+), 38 deletions(-) diff --git a/src/main/resources/sql/mapper/fims/rent/lsctMpng-mapper.xml b/src/main/resources/sql/mapper/fims/rent/lsctMpng-mapper.xml index cf126ceb..b754973d 100644 --- a/src/main/resources/sql/mapper/fims/rent/lsctMpng-mapper.xml +++ b/src/main/resources/sql/mapper/fims/rent/lsctMpng-mapper.xml @@ -666,12 +666,13 @@ , P.RTPYR_NO , P.RTPYR_NM , LM.LSCT_MPNG_ID - , (CASE WHEN LM.DMND_YN = 'Y' AND LM.CHG_APRV_STTS_CD = 'RQ' THEN '기타(요청중)' - WHEN LM.DMND_YN = 'Y' AND LM.CHG_APRV_STTS_CD = 'RT' THEN '기타(요청취소)' - WHEN LM.DMND_YN = 'Y' AND LM.CHG_APRV_STTS_CD = 'AP' THEN '기타(승인)' - WHEN LM.DMND_YN = 'Y' AND LM.CHG_APRV_STTS_CD = 'UA' THEN '기타(미승인)' - WHEN LM.DMND_YN = 'N' AND LM.LSCT_MPNG_ID IS NOT NULL THEN '계약서등록' - ELSE '대상' + , (CASE WHEN LM.LSCT_MPNG_ID IS NOT NULL AND LM.DMND_YN = 'Y' AND LM.CHG_APRV_STTS_CD = 'RQ' THEN '승인요청(요청중)' + WHEN LM.LSCT_MPNG_ID IS NOT NULL AND LM.DMND_YN = 'Y' AND LM.CHG_APRV_STTS_CD = 'RT' THEN '승인요청(요청취소)' + WHEN LM.LSCT_MPNG_ID IS NOT NULL AND LM.DMND_YN = 'Y' AND LM.CHG_APRV_STTS_CD = 'AP' THEN '승인요청(승인)' + WHEN LM.LSCT_MPNG_ID IS NOT NULL AND LM.DMND_YN = 'Y' AND LM.CHG_APRV_STTS_CD = 'UA' THEN '승인요청(미승인)' + WHEN LM.LSCT_MPNG_ID IS NOT NULL AND LM.DMND_YN = 'N' THEN '계약서등록' + WHEN LM.LSCT_MPNG_ID IS NULL AND C.CRDN_STTS_CD BETWEEN '11' AND '45' THEN '대상' + ELSE CONCAT('기타', '(', GET_CODE_NM('FIM010',C.CRDN_STTS_CD), ')') END) AS TRGT_STTS_NM , LM.LSCT_ID , (CASE WHEN LM.ENT_ID IS NULL THEN (SELECT RE.ENT_ID FROM TB_RENT_ENT RE WHERE RE.ENT_REG_NO = P.RTPYR_NO) @@ -730,16 +731,21 @@ + + AND C.CRDN_STTS_CD BETWEEN '11' AND '45' + AND LM.LSCT_MPNG_ID IS NULL + - AND LM.LSCT_MPNG_ID IS NOT NULL - AND LM.DMND_YN = 'N' + AND LM.LSCT_MPNG_ID IS NOT NULL + AND LM.DMND_YN = 'N' - - AND LM.LSCT_MPNG_ID IS NULL + + AND LM.LSCT_MPNG_ID IS NOT NULL + AND LM.DMND_YN = 'Y' - AND LM.LSCT_MPNG_ID IS NOT NULL - AND LM.DMND_YN = 'Y' + AND C.CRDN_STTS_CD NOT BETWEEN '11' AND '45' + AND LM.LSCT_MPNG_ID IS NULL @@ -823,13 +829,12 @@ , LM.MDFCN_DT , LM.MDFR , (SELECT USER_NM FROM TB_USER X WHERE X.USER_ID = LM.MDFR) AS MDFR_NM - , (CASE WHEN LM.DMND_YN = 'N' AND LM.CHG_APRV_STTS_CD IS NULL AND C.NXRP_CRDN_LINK_YN = 'N' THEN '대상' - WHEN LM.DMND_YN = 'N' AND LM.CHG_APRV_STTS_CD = 'RT' AND C.NXRP_CRDN_LINK_YN = 'N' THEN '요청취소' - WHEN LM.DMND_YN = 'Y' AND LM.CHG_APRV_STTS_CD = 'RQ' AND C.NXRP_CRDN_LINK_YN = 'N' THEN '요청중' - WHEN LM.DMND_YN = 'Y' AND LM.CHG_APRV_STTS_CD = 'AP' AND C.NXRP_CRDN_LINK_YN = 'N' THEN '승인' - WHEN LM.DMND_YN = 'Y' AND LM.CHG_APRV_STTS_CD = 'UA' AND C.NXRP_CRDN_LINK_YN = 'N' THEN '미승인' - WHEN C.NXRP_CRDN_LINK_YN = 'Y' THEN '기타(세외수입)' - ELSE '기타' + , (CASE WHEN LM.DMND_YN = 'Y' AND LM.CHG_APRV_STTS_CD = 'AP' THEN '승인' + WHEN LM.DMND_YN = 'Y' AND LM.CHG_APRV_STTS_CD = 'UA' THEN '미승인' + WHEN LM.DMND_YN = 'Y' AND LM.CHG_APRV_STTS_CD = 'RQ' AND C.CRDN_STTS_CD BETWEEN '11' AND '45' THEN '요청중' + WHEN LM.DMND_YN = 'N' AND LM.CHG_APRV_STTS_CD = 'RT' AND C.CRDN_STTS_CD BETWEEN '11' AND '45' THEN '요청취소' + WHEN LM.DMND_YN = 'N' AND LM.CHG_APRV_STTS_CD IS NULL AND C.CRDN_STTS_CD BETWEEN '11' AND '45' THEN '대상' + ELSE CONCAT('기타', '(', GET_CODE_NM('FIM010',C.CRDN_STTS_CD), ')') END) AS TRGT_STTS_NM , RE.ENT_SE_CD , (GET_CODE_NM('FIM088', RE.ENT_SE_CD)) AS ENT_SE_NM @@ -912,33 +917,31 @@ - - AND LM.DMND_YN = 'N' - AND LM.CHG_APRV_STTS_CD IS NULL - AND C.NXRP_CRDN_LINK_YN = 'N' + + AND LM.DMND_YN = 'Y' + AND LM.CHG_APRV_STTS_CD = 'AP' - - AND LM.DMND_YN = 'N' - AND LM.CHG_APRV_STTS_CD = 'RT' - AND C.NXRP_CRDN_LINK_YN = 'N' + + AND LM.DMND_YN = 'Y' + AND LM.CHG_APRV_STTS_CD = 'UA' - AND LM.DMND_YN = 'Y' + AND LM.DMND_YN = 'Y' AND LM.CHG_APRV_STTS_CD = 'RQ' - AND C.NXRP_CRDN_LINK_YN = 'N' + AND C.CRDN_STTS_CD BETWEEN '11' AND '45' - - AND LM.DMND_YN = 'Y' - AND LM.CHG_APRV_STTS_CD = 'AP' - AND C.NXRP_CRDN_LINK_YN = 'N' + + AND LM.DMND_YN = 'N' + AND LM.CHG_APRV_STTS_CD = 'RT' + AND C.CRDN_STTS_CD BETWEEN '11' AND '45' - - AND LM.DMND_YN = 'Y' - AND LM.CHG_APRV_STTS_CD = 'UA' - AND C.NXRP_CRDN_LINK_YN = 'N' + + AND LM.DMND_YN = 'N' + AND LM.CHG_APRV_STTS_CD IS NULL + AND C.CRDN_STTS_CD BETWEEN '11' AND '45' - AND C.NXRP_CRDN_LINK_YN = 'Y' + AND C.CRDN_STTS_CD NOT BETWEEN '11' AND '45'