From 086f14539db5645cbb10dcc55e6c04bbd78e2fec Mon Sep 17 00:00:00 2001 From: "Jonguk. Lim" Date: Mon, 5 Aug 2024 18:14:19 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20chuncheon,=20cheonan=20=ED=8C=A8?= =?UTF-8?q?=ED=82=A4=EC=A7=80=20=EC=A0=81=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../kr/xit/core/aop/TraceLoggerAspect.java | 28 +- .../mapper/biz/ens-chuncheon-mysql-mapper.xml | 28 -- .../resources/config/application-local.yml | 19 +- .../mapper/biz/ens-mysql-mapper.xml | 297 ++++-------------- 4 files changed, 88 insertions(+), 284 deletions(-) diff --git a/mens-api/src/main/java/kr/xit/core/aop/TraceLoggerAspect.java b/mens-api/src/main/java/kr/xit/core/aop/TraceLoggerAspect.java index 1efbaa3..3bb4d34 100644 --- a/mens-api/src/main/java/kr/xit/core/aop/TraceLoggerAspect.java +++ b/mens-api/src/main/java/kr/xit/core/aop/TraceLoggerAspect.java @@ -8,18 +8,9 @@ import java.util.UUID; import java.util.concurrent.CompletableFuture; import java.util.concurrent.ExecutionException; import java.util.concurrent.Future; + import javax.servlet.http.HttpServletRequest; -import kr.xit.core.biz.model.LoggingDTO; -import kr.xit.core.biz.service.IApiLoggingService; -import kr.xit.core.exception.BizRuntimeException; -import kr.xit.core.exception.ErrorParse; -import kr.xit.core.model.ApiResponseDTO; -import kr.xit.core.support.slack.SlackWebhookPush; -import kr.xit.core.support.utils.Checks; -import kr.xit.core.support.utils.JsonUtils; -import kr.xit.core.support.utils.LogUtils; -import lombok.Getter; -import lombok.extern.slf4j.Slf4j; + import org.apache.commons.lang3.StringUtils; import org.aspectj.lang.JoinPoint; import org.aspectj.lang.ProceedingJoinPoint; @@ -38,6 +29,18 @@ import org.springframework.stereotype.Component; import org.springframework.web.context.request.RequestContextHolder; import org.springframework.web.context.request.ServletRequestAttributes; +import kr.xit.core.biz.model.LoggingDTO; +import kr.xit.core.biz.service.IApiLoggingService; +import kr.xit.core.exception.BizRuntimeException; +import kr.xit.core.exception.ErrorParse; +import kr.xit.core.model.ApiResponseDTO; +import kr.xit.core.support.slack.SlackWebhookPush; +import kr.xit.core.support.utils.Checks; +import kr.xit.core.support.utils.JsonUtils; +import kr.xit.core.support.utils.LogUtils; +import lombok.Getter; +import lombok.extern.slf4j.Slf4j; + /** *
  * description : logging trace aspect
@@ -377,10 +380,7 @@ log.info("@@@@@@@@@@@@@@@@@로깅 start : [\n{}\n]",MDC.getCopyOfContextMap());
     private enum ApiSystemId {
         KAKAO("KAKAO", "카카오", "/kakao/"),
         KT_BC("KT-BC", "공공알림문자", "/kt/"),
-        PPLUS("POST-PLUS", "Post Plus", "/pplus/"),
         NICE("NICE", "NICE CI", "/nice/"),
-        EPOST("EPOST", "E-POST", "/ag/"),
-        SISUL("SISUL", "시설공단", "/sisul/"),
         BATCH("BATCH", "미정의", "/미정의/"),
         ;
 
diff --git a/mens-api/src/main/resources/egovframework/mapper/biz/ens-chuncheon-mysql-mapper.xml b/mens-api/src/main/resources/egovframework/mapper/biz/ens-chuncheon-mysql-mapper.xml
index 87eca3a..0941205 100644
--- a/mens-api/src/main/resources/egovframework/mapper/biz/ens-chuncheon-mysql-mapper.xml
+++ b/mens-api/src/main/resources/egovframework/mapper/biz/ens-chuncheon-mysql-mapper.xml
@@ -93,34 +93,6 @@
             , #{register}
           )
     
-    
-        /** ens-sysul-mysql-mapper|insertPostPlusJson-포스트 플러스 json 생성|seojh  */
-        INSERT
-          INTO tb_ens_post_plus_json(
-            unity_sndng_detail_id,
-            service_cd,
-            con_key,
-            sn,
-            master_cols,
-            master_rows,
-            detail_cols,
-            detail_rows,
-            regist_dt,
-            register
-          ) VALUES (
-              #{unitySndngDetailId}
-            , #{serviceCd}
-            , #{conKey}
-            , #{sn}
-            , #{masterCols}
-            , #{masterRows}
-            , #{detailCols}
-            , #{detailRows}
-            , now()
-            , #{register}
-          )
-    
-
 
   
 		/** ens-mysql-mapper|selectAcceptTgts-통합 발송 접수 대상 조회|julim  */
-		SELECT tcsm.unity_sndng_mastr_id
-		     , tcsm.tmplat_id
+		SELECT tcsm.elctrn_ntic_sndng_id AS unitySndngMastrId
+		     , tcsm.nht_tmplat_id AS tmplatId
 		     , tcsm.sndng_co
 		     , tcsm.sndng_process_sttus
-			   , tcsm.sndng_dt
+			 , tcsm.sndng_dt
 		     , tetm.try1
 		     , tetm.try2
 		     , tetm.try3
-			   , tetm.try2_minute
-			   , tetm.try3_minute
-		  FROM tb_cntc_sndng_mastr tcsm
+			 , tetm.try2_minute
+			 , tetm.try3_minute
+		  FROM tb_elctrn_ntic_sndng tcsm
 		  JOIN tb_ens_tmplat_manage tetm
-			  ON tcsm.tmplat_id = tetm.tmplat_id
+			ON tcsm.nht_tmplat_id = tetm.tmplat_id
 		 WHERE tcsm.sndng_process_sttus = #{sndngProcessSttus}
-		   AND tcsm.signgu_code = #{signguCode}
-		   AND tcsm.ffnlg_code = #{ffnlgCode}
+		   AND tetm.signgu_code = #{signguCode}
+		   AND tetm.ffnlg_code = #{ffnlgCode}
 	
 
 	
 		/** ens-mysql-mapper|insertUnitySndngMst-통합발송마스터 생성|julim  */
 		INSERT
 		  INTO tb_ens_unity_sndng_mastr (
-				unity_sndng_mastr_id,		/* 통합발송마스터 ID */
-				signgu_code,				/* 시군구 코드 */
-				ffnlg_code,				/* 과태료 코드 */
-				tmplat_id,				/* 템플릿 Id */
-				sndng_ty_code,			/* 발송유형 코드 */
-				sndng_co,					/* 발송건수 */
-				sndng_process_sttus,		/* 발송처리 상태 */
-				sndng_dt_1,				/* 발송 일시 */
-				sndng_dt_2,				/* 발송 일시2 */
-				sndng_dt_3,				/* 발송 일시3 */
-				try1,
-				try2,
-				try3,
-				try_cnt,
-				clos_dt,					/* 마감일시 */
-				regist_dt,
-				register
+			unity_sndng_mastr_id,		/* 통합발송마스터 ID */
+			signgu_code,				/* 시군구 코드 */
+			ffnlg_code,				/* 과태료 코드 */
+			tmplat_id,				/* 템플릿 Id */
+			sndng_ty_code,			/* 발송유형 코드 */
+			sndng_co,					/* 발송건수 */
+			sndng_process_sttus,		/* 발송처리 상태 */
+			sndng_dt_1,				/* 발송 일시 */
+			sndng_dt_2,				/* 발송 일시2 */
+			sndng_dt_3,				/* 발송 일시3 */
+			try1,
+			try2,
+			try3,
+			try_cnt,
+			clos_dt,					/* 마감일시 */
+			regist_dt,
+			register
 		)
-		SELECT tcsm.unity_sndng_mastr_id	/* 통합발송마스터 ID */
-				 , tcsm.signgu_code				/* 시군구 코드 */
-				 , tcsm.ffnlg_code				/* 과태료 코드 */
-				 , tcsm.tmplat_id				/* 템플릿 Id */
-				 , tetm.sndng_ty_code			/* 발송유형 코드 */
-				 , tcsm.sndng_co				/* 발송건수 */
+		SELECT tcsm.elctrn_ntic_sndng_id	/* 통합발송마스터 ID */
+			 , tetm.signgu_code				/* 시군구 코드 */
+			 , tetm.ffnlg_code				/* 과태료 코드 */
+			 , tcsm.nht_tmplat_id			/* 템플릿 Id */
+			 , tetm.sndng_ty_code			/* 발송유형 코드 */
+			 , tcsm.sndng_co				/* 발송건수 */
 		     , 'accept-ok'					/* 발송처리 상태 */
 		     , tcsm.sndng_dt
-				 , #{sndngDt2}
-				 , #{sndngDt3}
+			 , #{sndngDt2}
+			 , #{sndngDt3}
 		     , tetm.try1
 		     , tetm.try2
 		     , tetm.try3
@@ -65,13 +65,13 @@
 		            THEN 3
 		            ELSE IF(IFNULL(tetm.try2, '') != '', 2, 1)
 		       END							/* try3 값이 있으면 3, try2 값이 있으면 2, try1 */
-			 	 , clos_dt						/* 마감일시 */
+			 , clos_dt						/* 마감일시 */
 		     , now()
 		     , 'batch'
-		  FROM tb_cntc_sndng_mastr tcsm
+		  FROM tb_elctrn_ntic_sndng tcsm
 		  JOIN tb_ens_tmplat_manage tetm
-		    ON tcsm.tmplat_id = tetm.tmplat_id
-		 WHERE tcsm.unity_sndng_mastr_id = #{unitySndngMastrId}
+		    ON tcsm.nht_tmplat_id = tetm.tmplat_id
+		 WHERE tcsm.elctrn_ntic_sndng_id = #{unitySndngMastrId}
 		   AND tcsm.sndng_process_sttus = #{sndngProcessSttus}
 	
 
@@ -80,56 +80,46 @@
 		INSERT
 		  INTO tb_ens_unity_sndng_detail (
 		    unity_sndng_detail_id,  /* 통합발송상세 ID*/
-				unity_sndng_mastr_id,	/* 통합발송마스터 ID */
-				signgu_code,			/* 시군구 코드 */
-				ffnlg_code,				/* 과태료 코드 */
-				main_code,
-		    vhcle_no,				/* 차량번호 */
-				ihidnum,				/* 주민번호 */
-				moblphon_no,			/* 전화번호 */
-				nm,    					/* 이름 */
-				adres,					/* 주소 */
-				detail_adres,			/* 상세주소 */
-				zip,					/* 우편번호 */
-				tmplt_msg_data,			/* 템플릿메세지 데이타 */
-				mobile_page_cn,			/* 모바일페이지내용 */
-				use_instt_idntfc_id,    /* 이용기관식별Id*/
-				regist_dt,
-				register
+			unity_sndng_mastr_id,	/* 통합발송마스터 ID */
+			signgu_code,			/* 시군구 코드 */
+			ffnlg_code,				/* 과태료 코드 */
+			main_code,
+			ihidnum,				/* 주민번호 */
+			tmplt_msg_data,			/* 템플릿메세지 데이타 */
+			mobile_page_cn,			/* 모바일페이지내용 */
+			use_instt_idntfc_id,    /* 이용기관식별Id*/
+			regist_dt,
+			register
 		)
-		SELECT tcsd.unity_sndng_detail_id	/* 통합발송상세 ID*/
-		     , tcsd.unity_sndng_mastr_id	/* 통합발송마스터 ID */
-				 , tcsd.signgu_code				/* 시군구 코드 */
-				 , tcsd.ffnlg_code				/* 과태료 코드 */
+		SELECT tcsd.elctrn_ntic_sndng_detail_id	/* 통합발송상세 ID*/
+		     , tcsd.elctrn_ntic_sndng_id	/* 통합발송마스터 ID */
+			 , tetm.signgu_code				/* 시군구 코드 */
+			 , tetm.ffnlg_code				/* 과태료 코드 */
 		     , tcsd.main_code
-			 	 , tcsd.vhcle_no				/* 차량번호 */
 		     , tcsd.ihidnum					/* 주민번호 */
-		     , tcsd.moblphon_no				/* 전화번호 */
-			   , tcsd.nm    					/* 이름 */
-		     , tcsd.adres					/* 주소 */
-		     , tcsd.detail_adres			/* 상세주소 */
-		     , tcsd.zip						/* 우편번호 */
 		     , tcsd.tmplt_msg_data			/* 템플릿메세지 데이타 */
 		     , tcsd.mobile_page_cn			/* 모바일페이지내용 */
 		     , tcsd.use_instt_idntfc_id		/* 이용기관식별Id*/
-			   , now()
-			   , 'batch'
-		  FROM tb_cntc_sndng_mastr tcsm
-		  JOIN tb_cntc_sndng_detail tcsd
-		    ON tcsm.unity_sndng_mastr_id = tcsd.unity_sndng_mastr_id
-	   WHERE tcsm.unity_sndng_mastr_id = #{unitySndngMastrId}
+			 , now()
+			 , 'batch'
+		  FROM tb_elctrn_ntic_sndng tcsm
+		  JOIN tb_ens_tmplat_manage tetm
+		    ON tcsm.nht_tmplat_id = tetm.tmplat_id
+		  JOIN tb_elctrn_ntic_sndng_detail tcsd
+		    ON tcsm.elctrn_ntic_sndng_id = tcsd.elctrn_ntic_sndng_id
+	     WHERE tcsm.elctrn_ntic_sndng_id = #{unitySndngMastrId}
 		   AND tcsm.sndng_process_sttus = #{sndngProcessSttus}
 	
 
 	
 		/** ens-mysql-mapper|updateProcessSttusCntcSndngMst-연계발송마스터 상태 변경|julim  */
-		UPDATE tb_cntc_sndng_mastr
+		UPDATE tb_elctrn_ntic_sndng
 		   SET sndng_process_sttus = #{newSndngProcessSttus}
-			   , error_code = #{errorCode}
-		     , error_mssage = #{errorMssage}
+			 , error_cn = #{errorCode}
+		     , error_dtls = #{errorMssage}
 		     , updt_dt = now()
 		     , updusr = 'batch'
-		 WHERE unity_sndng_mastr_id = #{unitySndngMastrId}
+		 WHERE elctrn_ntic_sndng_id = #{unitySndngMastrId}
 	
 	
 	
@@ -497,49 +487,6 @@
 			   AND teusm.sndng_process_sttus = #{sndngProcessSttus}
 	
 
-	
-		/** ens-mysql-mapper|insertPplus Post plus 데이터 생성|julim  */
-		
-		INSERT
-		  INTO tb_ens_post_plus (
-				sndng_detail_id,				/* 발송상세 id */
-				unity_sndng_detail_id,	/* 통합발송상세 id */
-				sndng_mastr_id,					/* 발송마스터 id */
-				signgu_code,						/* 시군구 코드 */
-				ffnlg_code,							/* 과태료 코드 */
-		    service_cd,							/* 서비스 코드 */
-		    con_key,								/* 연계 식별키 */
-				post_dlvr_se,						/* 우편 배달 구분 */
-				addrse_co,						  /* 수취인 수 */
-				post_tmplat_code,				/* 우편 템플릿 코드 */
-				sn,											/* 순번 */
-				regist_dt,
-				register
-		)
-		SELECT LPAD(NEXTVAL(sndng_detail_id_seq), 20, '0')
-				 , teusd.unity_sndng_detail_id
-				 , #{sndngMastrId}
-				 , teusm.signgu_code
-				 , teusm.ffnlg_code
-		     , 'PST'
-		     , teusd.unity_sndng_mastr_id
-		     , tetm.post_dlvr_se
-		     , teusm.sndng_co
-		     , tetm.post_tmplat_code
-		     , teppj.sn
-				 , now()
-				 , 'batch'
-		  FROM tb_ens_unity_sndng_mastr teusm
-		  LEFT JOIN tb_ens_tmplat_manage tetm
-		    ON teusm.tmplat_id = tetm.tmplat_id
-		  LEFT JOIN tb_ens_unity_sndng_detail teusd
-		    ON teusm.unity_sndng_mastr_id = teusd.unity_sndng_mastr_id
-		  JOIN tb_ens_post_plus_json teppj
-		    ON teusd.unity_sndng_detail_id = teppj.unity_sndng_detail_id
-		 WHERE teusm.unity_sndng_mastr_id = #{unitySndngMastrId}
-		   AND teusm.sndng_process_sttus = #{sndngProcessSttus}
-	
-
 	
 		/** ens-mysql-mapper|updateProcessSttusUntySndngMst-통합발송마스터 상태 변경|julim  */
 		UPDATE tb_ens_unity_sndng_mastr
@@ -943,77 +890,6 @@
 										                 WHERE tekmd.document_binder_uuid = #{document_binder_uuid})
 	
 
-	
-
-	
-		/** ens-mysql-mapper|updatePplusSndStatus-Post plus 상태 변경|julim  */
-		UPDATE tb_ens_post_plus
-			 SET process_sttus = #{processSttus}
-			   , dlvr_sttus = #{dlvrSttus}
-			   , updt_dt = now()
-			   , updusr = 'batch'
-		 WHERE sndng_mastr_id = (SELECT tesm.sndng_mastr_id
-															 FROM tb_ens_sndng_mastr tesm
-															 JOIN tb_ens_post_plus tepp
-																 ON tesm.sndng_mastr_id = tepp.sndng_mastr_id
-															WHERE tesm.unity_sndng_mastr_id = #{unitySndngMastrId}
-															LIMIT 1)
-	
-
-	
-
-	
-		/** ens-mysql-mapper|updatePplusRgistNo-Post plus 등기번호 변경|julim  */
-		UPDATE tb_ens_post_plus
-			 SET rgist_no = #{rgistNo}
-				 , updt_dt = now()
-				 , updusr = 'batch'
-		 WHERE sndng_detail_id = (SELECT tepp.sndng_detail_id
-															 FROM tb_ens_sndng_mastr tesm
-															 JOIN tb_ens_post_plus tepp
-																 ON tesm.sndng_mastr_id = tepp.sndng_mastr_id
-															WHERE tesm.unity_sndng_mastr_id = #{unitySndngMastrId}
-															  AND tepp.sn = #{sn})
-	
-
-	
-
-	
-		/** ens-mysql-mapper|updatePplusDlvrStatusFromEPostByRgistNo-Post plus 우체국 종적 추적을 통한 배송상태 변경|julim  */
-		UPDATE tb_ens_post_plus
-			 SET dlvr_sttus = SUBSTR(#{dlvrSttus}, 1, 20)
-			   , dlvr_detail = #{dlvrDetail}
-			   , dlvr_de = REPLACE(#{receiveDate}, "-", "")
-			   , recevie_name = #{receiveName}
-		     , updt_dt = now()
-		     , updusr = 'batch'
-		WHERE rgist_no = #{rgistNo}
-	
 	
 	
 	
@@ -1066,51 +942,6 @@
 		                                  FROM tb_ens_kakao_my_doc tekmd
 		                                 WHERE tekmd.document_binder_uuid = #{documentBinderUuid})
 	
-
-	
-
-	
-		/** ens-mysql-mapper|savePplusCntcSndngResult-Post plus 연계발송결과반영|julim  */
-		INSERT
-			INTO tb_cntc_sndng_result (
-				unity_sndng_detail_id,		/* 통합 발송 상세 ID*/
-				sndng_se_code,						/* 발송구분코드 */
-				signgu_code,							/* 시군구코드 */
-				ffnlg_code,								/* 과태료코드 */
-				sndng_result_sttus,
-			  rgist_no,
-				requst_dt,								/* 송신(요청) 일시 */
-				inqire_dt,								/* 수신(조회) 일시 */
-				error_cn,									/* 에러내용 */
-				regist_dt,
-				register
-			) VALUES (
-				#{unitySndngDetailId}
-				, #{sndngSeCode}				/* 발송구분코드 - KAKAO-MY-DOC|KT-BC */
-				, #{signguCode}				    /* 시군구코드 */
-				, #{ffnlgCode}					/* 과태료코드 */
-				, #{dlvrSttus}
-			  , #{rgistNo}
-				, REPLACE(#{senderData}, "-", "")				  /* 송신(요청) 일시 */
-				, REPLACE(#{receiveDate}, "-", "")				/* 수신(조회) 일시 */
-				, #{errorCn}						/* 에러내용 */
-				, now()
-				, 'batch'
-			)
-			ON DUPLICATE KEY UPDATE
-				sndng_result_sttus = IFNULL(#{dlvrSttus}, sndng_result_sttus)
-			  , requst_dt = IFNULL(REPLACE(#{senderData}, "-", ""), requst_dt)   /* 송신(요청) 일시 */
-				, inqire_dt =	IFNULL(REPLACE(#{receiveDate}, "-", ""), inqire_dt)		/* 수신(조회) 일시 */
-				, updt_dt = now()
-				, updusr = 'batch'
-