diff --git a/mens-batch/src/main/java/kr/xit/batch/ens/web/BatchJobWebController.java b/mens-batch/src/main/java/kr/xit/batch/ens/web/BatchJobWebController.java
index a48d0c7..802ba40 100644
--- a/mens-batch/src/main/java/kr/xit/batch/ens/web/BatchJobWebController.java
+++ b/mens-batch/src/main/java/kr/xit/batch/ens/web/BatchJobWebController.java
@@ -85,7 +85,7 @@ public class BatchJobWebController {
private static final String CCN = """
{
- "signguCode": "41220",
+ "signguCode": "51110",
"ffnlgCode": "11",
"profile": "local"
}
diff --git a/mens-batch/src/main/java/kr/xit/biz/ens/web/EnsBatchController.java b/mens-batch/src/main/java/kr/xit/biz/ens/web/EnsBatchController.java
index 4ef4b45..ca77862 100644
--- a/mens-batch/src/main/java/kr/xit/biz/ens/web/EnsBatchController.java
+++ b/mens-batch/src/main/java/kr/xit/biz/ens/web/EnsBatchController.java
@@ -59,7 +59,7 @@ public class EnsBatchController {
private static final String CCN = """
{
- "signguCode": "41220",
+ "signguCode": "51110",
"ffnlgCode": "11",
"profile": "local"
}
diff --git a/mens-batch/src/main/resources/egovframework/mapper/biz/ens-mysql-mapper.xml b/mens-batch/src/main/resources/egovframework/mapper/biz/ens-mysql-mapper.xml
index 56eb787..3d2bc73 100644
--- a/mens-batch/src/main/resources/egovframework/mapper/biz/ens-mysql-mapper.xml
+++ b/mens-batch/src/main/resources/egovframework/mapper/biz/ens-mysql-mapper.xml
@@ -932,16 +932,17 @@
INSERT
INTO tb_elctrn_ntic_sndng_result (
elctrn_ntic_sndng_detail_id, /* 통합 발송 상세 ID*/
- sndng_se, /* 발송구분코드 */
- sndng_result_sttus,
+ sndng_result_code,
requst_dt, /* 송신(요청) 일시 */
inqire_dt, /* 수신(조회) 일시 */
readng_dt, /* 최초열람일시 */
error_cn, /* 에러내용 */
regist_dt
) SELECT unity_sndng_detail_id/* 통합 발송 상세 ID*/
- , #{sndngSeCode} /* 발송구분코드 - KAKAO-MY-DOC */
- , #{sndngResultSttus}
+ , CASE WHEN #{sndngResultSttus} IN ('RECEIVED', 'EXPIRED') THEN '1'
+ WHEN #{sndngResultSttus} IN ('READ') THEN '2'
+ WHEN #{sndngResultSttus} IS NULL THEN NULL
+ ELSE '3' END
, DATE_FORMAT(#{requstDt}, '%Y%m%d%H%i%s') /* 송신(요청) 일시 */
, DATE_FORMAT(#{inqireDt}, '%Y%m%d%H%i%s') /* 수신(조회) 일시 */
, DATE_FORMAT(#{readngDt}, '%Y%m%d%H%i%s') /* 최초열람일시 */
@@ -954,21 +955,29 @@
/** ens-mysql-mapper|updateCntcSndngResultByKkopay-카카오페이 연계발송결과반영|julim */
UPDATE tb_elctrn_ntic_sndng_result
- SET sndng_result_sttus = #{sndngResultSttus}
+ SET sndng_result_code = CASE WHEN #{sndngResultSttus} IN ('RECEIVED', 'EXPIRED') THEN '1'
+ WHEN #{sndngResultSttus} IN ('READ') THEN '2'
+ WHEN #{sndngResultSttus} IS NULL THEN ''
+ ELSE '3' END
, requst_dt = from_unixtime(#{requstDt}, '%Y%m%d%H%i%s') /* 송신(요청) 일시 */
, inqire_dt = from_unixtime(#{inqireDt}, '%Y%m%d%H%i%s') /* 수신(조회) 일시 */
, readng_dt = from_unixtime(#{readngDt}, '%Y%m%d%H%i%s') /* 최초열람일시 */
, error_cn = #{errorCn}
, last_updt_dt = now()
- WHERE elctrn_ntic_sndng_detail_id = (SELECT tekmd.unity_sndng_detail_id
+ WHERE elctrn_ntic_sndng_detail_id = (SELECT tensd.elctrn_ntic_sndng_detail_id
FROM tb_ens_kakao_my_doc tekmd
- WHERE tekmd.document_binder_uuid = #{docKeyId})
+ JOIN tb_elctrn_ntic_sndng_detail tensd
+ ON tekmd.external_document_uuid = tensd.external_document_uuid
+ WHERE tekmd.document_binder_uuid = #{docKeyId})
/** ens-mysql-mapper|updateCntcSndngResultByKkotalk-카카오톡 연계발송결과반영|jhseo */
UPDATE tb_elctrn_ntic_sndng_result
- SET sndng_result_sttus = #{sndngResultSttus}
+ SET sndng_result_code = CASE WHEN #{sndngResultSttus} IN ('RECEIVED', 'EXPIRED') THEN '1'
+ WHEN #{sndngResultSttus} IN ('READ') THEN '2'
+ WHEN #{sndngResultSttus} IS NULL THEN ''
+ ELSE '3' END
, requst_dt = DATE_FORMAT(#{requstDt}, '%Y%m%d%H%i%s') /* 송신(요청) 일시 */
, inqire_dt = DATE_FORMAT(#{inqireDt}, '%Y%m%d%H%i%s') /* 수신(조회) 일시 */
, readng_dt = DATE_FORMAT(#{readngDt}, '%Y%m%d%H%i%s') /* 최초열람일시 */
@@ -1013,7 +1022,7 @@
, tcsm.clos_dt
, tcsd.elctrn_ntic_sndng_detail_id AS unitySndngDetailId
, tcsd.main_code
- , tcsd.ffnlg_code AS ffnlg_code_de
+ , NVL(tcsd.ffnlg_code, '11') AS ffnlg_code_de
, tcsd.signgu_code AS signgu_code_de
, ECL_DECRYPT(tcsd.ihidnum) AS ihidnum
, tcsd.ihidnum AS encIhidnum
@@ -1032,7 +1041,7 @@
ON tcsm.nht_tmplat_id = tetm.tmplat_id
JOIN tb_ens_rlaybsnm_manage term
ON (tcsm.signgu_code = term.signgu_code
- AND tcsm.ffnlg_code = term.ffnlg_code)
+ AND NVL(tcsm.ffnlg_code, '11') = term.ffnlg_code)
WHERE tcsm.elctrn_ntic_sndng_id = #{unitySndngMastrId}
AND tcsm.sndng_process_sttus = #{sndngProcessSttus}