fix: chuncheon, cheonan 패키지 적용

main
Jonguk. Lim 3 months ago
parent 3adeba87a0
commit 086f14539d

@ -8,18 +8,9 @@ import java.util.UUID;
import java.util.concurrent.CompletableFuture; import java.util.concurrent.CompletableFuture;
import java.util.concurrent.ExecutionException; import java.util.concurrent.ExecutionException;
import java.util.concurrent.Future; import java.util.concurrent.Future;
import javax.servlet.http.HttpServletRequest; 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.apache.commons.lang3.StringUtils;
import org.aspectj.lang.JoinPoint; import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.ProceedingJoinPoint; 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.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes; 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;
/** /**
* <pre> * <pre>
* description : logging trace aspect * description : logging trace aspect
@ -377,10 +380,7 @@ log.info("@@@@@@@@@@@@@@@@@로깅 start : [\n{}\n]",MDC.getCopyOfContextMap());
private enum ApiSystemId { private enum ApiSystemId {
KAKAO("KAKAO", "카카오", "/kakao/"), KAKAO("KAKAO", "카카오", "/kakao/"),
KT_BC("KT-BC", "공공알림문자", "/kt/"), KT_BC("KT-BC", "공공알림문자", "/kt/"),
PPLUS("POST-PLUS", "Post Plus", "/pplus/"),
NICE("NICE", "NICE CI", "/nice/"), NICE("NICE", "NICE CI", "/nice/"),
EPOST("EPOST", "E-POST", "/ag/"),
SISUL("SISUL", "시설공단", "/sisul/"),
BATCH("BATCH", "미정의", "/미정의/"), BATCH("BATCH", "미정의", "/미정의/"),
; ;

@ -93,34 +93,6 @@
, #{register} , #{register}
) )
</insert> </insert>
<insert id="insertPostPlusJson">
/** 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}
)
</insert>
<select id="selectSndngResultMaster" resultType="kr.xit.biz.chuncheon.model.ChuncheonSndngResultDTO$RsltChuncheonResMstData"> <select id="selectSndngResultMaster" resultType="kr.xit.biz.chuncheon.model.ChuncheonSndngResultDTO$RsltChuncheonResMstData">
/** ens-sysul-mysql-mapper|selectSndngResultMaster-발송결과정보 마스터 조회|julim */ /** ens-sysul-mysql-mapper|selectSndngResultMaster-발송결과정보 마스터 조회|julim */

@ -14,10 +14,11 @@ spring:
# 9 server # 9 server
primary: primary:
database: mysql database: mysql
pool-name: xit-maria-pool
driver-class-name: org.mariadb.jdbc.Driver driver-class-name: org.mariadb.jdbc.Driver
jdbc-url: jdbc:mariadb://211.119.124.9:4407/mens?useUnicode=true&characterEncoding=utf-8&rewriteBatchedStatements=true&autoReconnect=true jdbc-url: jdbc:mariadb://211.119.124.117:53306/ens?useUnicode=true&characterEncoding=utf-8&rewriteBatchedStatements=true&autoReconnect=true
username: root username: ens
password: xit1807 password: xit5811807
read-only: false read-only: false
# multi-database # multi-database

@ -8,8 +8,8 @@
<!-- =================================================================================== --> <!-- =================================================================================== -->
<select id="selectAcceptTgts" resultType="kr.xit.biz.ens.model.cmm.SndngMssageParam"> <select id="selectAcceptTgts" resultType="kr.xit.biz.ens.model.cmm.SndngMssageParam">
/** ens-mysql-mapper|selectAcceptTgts-통합 발송 접수 대상 조회|julim */ /** ens-mysql-mapper|selectAcceptTgts-통합 발송 접수 대상 조회|julim */
SELECT tcsm.unity_sndng_mastr_id SELECT tcsm.elctrn_ntic_sndng_id AS unitySndngMastrId
, tcsm.tmplat_id , tcsm.nht_tmplat_id AS tmplatId
, tcsm.sndng_co , tcsm.sndng_co
, tcsm.sndng_process_sttus , tcsm.sndng_process_sttus
, tcsm.sndng_dt , tcsm.sndng_dt
@ -18,12 +18,12 @@
, tetm.try3 , tetm.try3
, tetm.try2_minute , tetm.try2_minute
, tetm.try3_minute , tetm.try3_minute
FROM tb_cntc_sndng_mastr tcsm FROM tb_elctrn_ntic_sndng tcsm
JOIN tb_ens_tmplat_manage tetm 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} WHERE tcsm.sndng_process_sttus = #{sndngProcessSttus}
AND tcsm.signgu_code = #{signguCode} AND tetm.signgu_code = #{signguCode}
AND tcsm.ffnlg_code = #{ffnlgCode} AND tetm.ffnlg_code = #{ffnlgCode}
</select> </select>
<insert id="insertUnitySndngMst"> <insert id="insertUnitySndngMst">
@ -48,10 +48,10 @@
regist_dt, regist_dt,
register register
) )
SELECT tcsm.unity_sndng_mastr_id /* 통합발송마스터 ID */ SELECT tcsm.elctrn_ntic_sndng_id /* 통합발송마스터 ID */
, tcsm.signgu_code /* 시군구 코드 */ , tetm.signgu_code /* 시군구 코드 */
, tcsm.ffnlg_code /* 과태료 코드 */ , tetm.ffnlg_code /* 과태료 코드 */
, tcsm.tmplat_id /* 템플릿 Id */ , tcsm.nht_tmplat_id /* 템플릿 Id */
, tetm.sndng_ty_code /* 발송유형 코드 */ , tetm.sndng_ty_code /* 발송유형 코드 */
, tcsm.sndng_co /* 발송건수 */ , tcsm.sndng_co /* 발송건수 */
, 'accept-ok' /* 발송처리 상태 */ , 'accept-ok' /* 발송처리 상태 */
@ -68,10 +68,10 @@
, clos_dt /* 마감일시 */ , clos_dt /* 마감일시 */
, now() , now()
, 'batch' , 'batch'
FROM tb_cntc_sndng_mastr tcsm FROM tb_elctrn_ntic_sndng tcsm
JOIN tb_ens_tmplat_manage tetm JOIN tb_ens_tmplat_manage tetm
ON tcsm.tmplat_id = tetm.tmplat_id ON tcsm.nht_tmplat_id = tetm.tmplat_id
WHERE tcsm.unity_sndng_mastr_id = #{unitySndngMastrId} WHERE tcsm.elctrn_ntic_sndng_id = #{unitySndngMastrId}
AND tcsm.sndng_process_sttus = #{sndngProcessSttus} AND tcsm.sndng_process_sttus = #{sndngProcessSttus}
</insert> </insert>
@ -84,52 +84,42 @@
signgu_code, /* 시군구 코드 */ signgu_code, /* 시군구 코드 */
ffnlg_code, /* 과태료 코드 */ ffnlg_code, /* 과태료 코드 */
main_code, main_code,
vhcle_no, /* 차량번호 */
ihidnum, /* 주민번호 */ ihidnum, /* 주민번호 */
moblphon_no, /* 전화번호 */
nm, /* 이름 */
adres, /* 주소 */
detail_adres, /* 상세주소 */
zip, /* 우편번호 */
tmplt_msg_data, /* 템플릿메세지 데이타 */ tmplt_msg_data, /* 템플릿메세지 데이타 */
mobile_page_cn, /* 모바일페이지내용 */ mobile_page_cn, /* 모바일페이지내용 */
use_instt_idntfc_id, /* 이용기관식별Id*/ use_instt_idntfc_id, /* 이용기관식별Id*/
regist_dt, regist_dt,
register register
) )
SELECT tcsd.unity_sndng_detail_id /* 통합발송상세 ID*/ SELECT tcsd.elctrn_ntic_sndng_detail_id /* 통합발송상세 ID*/
, tcsd.unity_sndng_mastr_id /* 통합발송마스터 ID */ , tcsd.elctrn_ntic_sndng_id /* 통합발송마스터 ID */
, tcsd.signgu_code /* 시군구 코드 */ , tetm.signgu_code /* 시군구 코드 */
, tcsd.ffnlg_code /* 과태료 코드 */ , tetm.ffnlg_code /* 과태료 코드 */
, tcsd.main_code , tcsd.main_code
, tcsd.vhcle_no /* 차량번호 */
, tcsd.ihidnum /* 주민번호 */ , tcsd.ihidnum /* 주민번호 */
, tcsd.moblphon_no /* 전화번호 */
, tcsd.nm /* 이름 */
, tcsd.adres /* 주소 */
, tcsd.detail_adres /* 상세주소 */
, tcsd.zip /* 우편번호 */
, tcsd.tmplt_msg_data /* 템플릿메세지 데이타 */ , tcsd.tmplt_msg_data /* 템플릿메세지 데이타 */
, tcsd.mobile_page_cn /* 모바일페이지내용 */ , tcsd.mobile_page_cn /* 모바일페이지내용 */
, tcsd.use_instt_idntfc_id /* 이용기관식별Id*/ , tcsd.use_instt_idntfc_id /* 이용기관식별Id*/
, now() , now()
, 'batch' , 'batch'
FROM tb_cntc_sndng_mastr tcsm FROM tb_elctrn_ntic_sndng tcsm
JOIN tb_cntc_sndng_detail tcsd JOIN tb_ens_tmplat_manage tetm
ON tcsm.unity_sndng_mastr_id = tcsd.unity_sndng_mastr_id ON tcsm.nht_tmplat_id = tetm.tmplat_id
WHERE tcsm.unity_sndng_mastr_id = #{unitySndngMastrId} 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} AND tcsm.sndng_process_sttus = #{sndngProcessSttus}
</insert> </insert>
<update id="updateProcessSttusCntcSndngMst"> <update id="updateProcessSttusCntcSndngMst">
/** ens-mysql-mapper|updateProcessSttusCntcSndngMst-연계발송마스터 상태 변경|julim */ /** ens-mysql-mapper|updateProcessSttusCntcSndngMst-연계발송마스터 상태 변경|julim */
UPDATE tb_cntc_sndng_mastr UPDATE tb_elctrn_ntic_sndng
SET sndng_process_sttus = #{newSndngProcessSttus} SET sndng_process_sttus = #{newSndngProcessSttus}
, error_code = #{errorCode} , error_cn = #{errorCode}
, error_mssage = #{errorMssage} , error_dtls = #{errorMssage}
, updt_dt = now() , updt_dt = now()
, updusr = 'batch' , updusr = 'batch'
WHERE unity_sndng_mastr_id = #{unitySndngMastrId} WHERE elctrn_ntic_sndng_id = #{unitySndngMastrId}
</update> </update>
<!-- =================================================================================== --> <!-- =================================================================================== -->
<!-- ================================ accept =========================================== --> <!-- ================================ accept =========================================== -->
@ -497,49 +487,6 @@
AND teusm.sndng_process_sttus = #{sndngProcessSttus} AND teusm.sndng_process_sttus = #{sndngProcessSttus}
</insert> </insert>
<insert id="insertPplus">
/** ens-mysql-mapper|insertPplus Post plus 데이터 생성|julim */
<!-- FIXME::확인 적용 필요-->
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}
</insert>
<update id="updateProcessSttusUnitySndngMst"> <update id="updateProcessSttusUnitySndngMst">
/** ens-mysql-mapper|updateProcessSttusUntySndngMst-통합발송마스터 상태 변경|julim */ /** ens-mysql-mapper|updateProcessSttusUntySndngMst-통합발송마스터 상태 변경|julim */
UPDATE tb_ens_unity_sndng_mastr UPDATE tb_ens_unity_sndng_mastr
@ -943,77 +890,6 @@
WHERE tekmd.document_binder_uuid = #{document_binder_uuid}) WHERE tekmd.document_binder_uuid = #{document_binder_uuid})
</update> </update>
<select id="selectPplusSndProcessStatus" resultType="kr.xit.biz.ens.model.cmm.SndngMssageParam">
/** ens-mysql-mapper|selectPplusSndProcessStatus-Post plus 발송 상태 조회|julim */
SELECT tesm.sndng_mastr_id
, tesm.unity_sndng_mastr_id
, tesm.try_cnt
, tesm.try_seq
, '' AS newSndngProcessSttus
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
</select>
<update id="updatePplusSndStatus" parameterType="kr.xit.biz.ens.model.pplus.PplusDTO$PpStatusResMapping">
/** 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)
</update>
<select id="selectCountRgistNo" resultType="int">
/** ens-mysql-mapper|selectCountRgistNo-Post plus 등기번호 조회|julim */
Select count(sndng_detail_id)
FROM tb_ens_post_plus
WHERE rgist_no &gt;= #{startRgistNo}
AND rgist_no &lt;= #{endRgistNo}
</select>
<update id="updatePplusRgistNo" parameterType="kr.xit.biz.ens.model.pplus.PplusDTO$PpStatusResMapping">
/** 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})
</update>
<select id="selectPplusUnitySndngDetailIdsByRgistNo" resultType="kr.xit.biz.ens.model.pplus.PplusDTO$PplusResult">
/** ens-mysql-mapper|selectPplusUnitySndngDetailIdsByRgistNo-Post plus 통합발송상세ID 목록 조회|julim */
SELECT tepp.unity_sndng_detail_id
, tepp.rgist_no
FROM tb_ens_post_plus tepp
WHERE rgist_no &gt;= #{startRgistNo}
AND rgist_no &lt;= #{endRgistNo}
</select>
<update id="updatePplusDlvrStatusFromEPostByRgistNo" parameterType="kr.xit.biz.ens.model.pplus.PplusDTO$PplusResult">
/** 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}
</update>
<!-- =================================================================================== --> <!-- =================================================================================== -->
<!-- ================================ status ============================================= --> <!-- ================================ status ============================================= -->
<!-- =================================================================================== --> <!-- =================================================================================== -->
@ -1066,51 +942,6 @@
FROM tb_ens_kakao_my_doc tekmd FROM tb_ens_kakao_my_doc tekmd
WHERE tekmd.document_binder_uuid = #{documentBinderUuid}) WHERE tekmd.document_binder_uuid = #{documentBinderUuid})
</update> </update>
<select id="selectPplusResultTgtsByUnitySndngMstId" parameterType="string" resultType="string">
/** ens-mysql-mapper|selectPplusResultTgtsByUnitySndngMstId-post plus 연계발송결과반영 대상 조회|julim */
SELECT tepp.unity_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 = #{unitySndngMstId}
</select>
<insert id="savePplusCntcSndngResult">
/** 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'
</insert>
<!-- =================================================================================== --> <!-- =================================================================================== -->
<!-- ================================ result ============================================= --> <!-- ================================ result ============================================= -->
<!-- =================================================================================== --> <!-- =================================================================================== -->

Loading…
Cancel
Save