diff --git a/mens-batch/src/main/java/kr/xit/biz/ens/mapper/IEnsBatchMapper.java b/mens-batch/src/main/java/kr/xit/biz/ens/mapper/IEnsBatchMapper.java index 943e2dc..161413e 100644 --- a/mens-batch/src/main/java/kr/xit/biz/ens/mapper/IEnsBatchMapper.java +++ b/mens-batch/src/main/java/kr/xit/biz/ens/mapper/IEnsBatchMapper.java @@ -158,6 +158,28 @@ public interface IEnsBatchMapper { */ int insertPostSndng(final T t); + /** + *
+     * Kt 공공알림문자 데이터 생성
+     * - tb_ens_kt_bc
+     * @param t T
+     * @return int
+     * 
+ */ + int insertKtBc(final T t); + + + /** + *
+     * Post plus 데이터 생성
+     * -
+     * @param t T
+     * @return int
+     * 
+ */ + int insertPplus(final T t); + + /** *
      * 통합발송마스터 상태 변경
diff --git a/mens-batch/src/main/java/kr/xit/biz/ens/service/EnsBatchService.java b/mens-batch/src/main/java/kr/xit/biz/ens/service/EnsBatchService.java
index 6ab18e3..aebf8e8 100644
--- a/mens-batch/src/main/java/kr/xit/biz/ens/service/EnsBatchService.java
+++ b/mens-batch/src/main/java/kr/xit/biz/ens/service/EnsBatchService.java
@@ -639,6 +639,10 @@ public class EnsBatchService extends EgovAbstractServiceImpl implements IEnsBatc
      *         - tb_ens_post_sndng
      * SMS     - {@link IEnsBatchMapper#insertSmsSndng(Object) insertSmsSndng}
      *         - tb_ens_sms_sndng
+     * KT_BC   - {@link IEnsBatchMapper#insertKtBc(Object) insertKtBc}
+     *         - tb_ens_kt_bc FIXME::처리 필요
+     * PPLUS   - {@link IEnsBatchMapper#insertPplus(Object) insertPplus}
+     *         - tb_ens_ FIXME::처리 필요
      * @param dto SndngMssageParam
      * @return int
      * 
@@ -650,18 +654,17 @@ public class EnsBatchService extends EgovAbstractServiceImpl implements IEnsBatc Checks.checkVal(dto.getTry3(), "") }; switch (SndngSeCode.compare(tryVal[dto.getTrySeq() - 1])) { - case KAKAO: - return mapper.insertKakaoMyDocs(dto); - - case E_GREEN: - return mapper.insertPostSndng(dto); - - case SMS: - return mapper.insertSmsSndng(dto); - - default: - return 1; - } + case KAKAO -> mapper.insertKakaoMyDocs(dto); + case E_GREEN -> mapper.insertPostSndng(dto); + case SMS -> mapper.insertSmsSndng(dto); + // FIXME::처리 필요 + case KT_BC -> mapper.insertKtBc(dto); + // FIXME::처리 필요 + case PPLUS -> mapper.insertPplus(dto); + } + throw BizRuntimeException.create( + String.format("정의 되지 않은 문서 중개자[%s] 입니다", tryVal[dto.getTrySeq() - 1]) + ); } //----------------------------------------------------------------------------------------------------------------- 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 d0c9790..1c02390 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 @@ -314,6 +314,7 @@ + /** ens-mysql-mapper|insertPostSndng-e_green 데이터 생성|julim */ INSERT INTO tb_ens_post_sndng ( sndng_detail_id, /* 발송 상세 id */ @@ -367,16 +368,142 @@ LEFT JOIN tb_ens_rlaybsnm_manage term ON teusm.signgu_code = term.signgu_code AND teusm.ffnlg_code = term.ffnlg_code LEFT JOIN tb_ens_cntc_data tecd - ON teusd.unity_sndng_detail_id=tecd.unity_sndng_detail_id + ON teusd.unity_sndng_detail_id = tecd.unity_sndng_detail_id - INNER JOIN tb_ens_kakao_my_doc tekmd - ON teusd.unity_sndng_detail_id = tekmd.unity_sndng_detail_id + INNER JOIN tb_ens_kakao_my_doc tekmd + ON teusd.unity_sndng_detail_id = tekmd.unity_sndng_detail_id AND (NOT (tekmd.doc_box_status = 'READ' AND tekmd.error_code IS NULL) OR (tekmd.doc_box_status IS NULL and tekmd.error_code IS NULL)) WHERE teusm.unity_sndng_mastr_id = #{unitySndngMastrId} AND teusm.sndng_process_sttus = #{sndngProcessSttus} + + /** ens-mysql-mapper|insertKtBc-KT 공공 알림문자 데이터 생성|julim */ + INSERT + INTO tb_ens_kt_bc ( + sndng_detail_id, /* 발송상세 id */ + unity_sndng_detail_id, /* 통합발송상세 id */ + sndng_mastr_id, /* 발송마스터 id */ + signgu_code, /* 시군구 코드 */ + ffnlg_code, /* 과태료 코드 */ + service_cd, /* 서비스 코드 */ + service_key, /* 서비스 인증키 */ + + regist_dt, + register + ) + SELECT LPAD(NEXTVAL(sndng_detail_id_seq), 20, '0') + , teusd.unity_sndng_detail_id + , #{sndngMastrId} + , teusm.signgu_code + , teusm.ffnlg_code + , term.kt_service_code + , IF(#{profile} = 'prod', term.kt_prod_service_cerf_key, term.kt_dev_service_cerf_key) + + , 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 + LEFT JOIN tb_ens_rlaybsnm_manage term + ON teusm.signgu_code = term.signgu_code AND teusm.ffnlg_code = term.ffnlg_code + LEFT JOIN tb_ens_cntc_data tecd + ON teusd.unity_sndng_detail_id = tecd.unity_sndng_detail_id + WHERE teusm.unity_sndng_mastr_id = #{unitySndngMastrId} + AND teusm.sndng_process_sttus = #{sndngProcessSttus} + + + + /** ens-mysql-mapper|insertPplus Post plus 데이터 생성|julim */ + + INSERT + INTO tb_ens_kt_bc ( + sndng_detail_id, /* 발송상세 id */ + unity_sndng_detail_id, /* 통합발송상세 id */ + sndng_mastr_id, /* 발송마스터 id */ + signgu_code, /* 시군구 코드 */ + ffnlg_code, /* 과태료 코드 */ + regist_dt, + register + ) + SELECT LPAD(NEXTVAL(sndng_detail_id_seq), 20, '0') + , teusd.unity_sndng_detail_id + , #{sndngMastrId} + , teusm.signgu_code + , teusm.ffnlg_code + + , 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 + LEFT JOIN tb_ens_rlaybsnm_manage term + ON teusm.signgu_code = term.signgu_code AND teusm.ffnlg_code = term.ffnlg_code + LEFT JOIN tb_ens_cntc_data tecd + ON teusd.unity_sndng_detail_id = tecd.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