From 9f5d361b8816ce6f8e4b5aed39ee221ed082afb2 Mon Sep 17 00:00:00 2001 From: limju Date: Thu, 2 Nov 2023 12:24:44 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20post=20plus=20=EC=A0=81=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../xit/biz/cmm/mapper/ICmmEnsFileMapper.java | 4 +- .../biz/cmm/service/CmmEnsFileService.java | 13 +- .../xit/ens/pplus/service/PplusService.java | 11 +- .../java/kr/xit/ens/pplus/web/ApiExample.java | 253 ------------------ .../kr/xit/ens/pplus/web/PplusController.java | 24 -- .../mapper/biz/ens-cmm-file-mysql-mapper.xml | 2 +- .../xit/biz/ens/mapper/IEnsBatchMapper.java | 3 +- .../java/kr/xit/biz/ens/model/EnsDTO.java | 70 ----- .../mapper/biz/ens-mysql-mapper.xml | 4 +- .../biz/ens/model/cmm/CmmEnsFileInfDTO.java | 5 +- .../biz/ens/model/cmm/CmmEnsRequestDTO.java | 14 - .../xit/biz/ens/model/cmm/TmplatManage.java | 81 ++++++ 12 files changed, 100 insertions(+), 384 deletions(-) delete mode 100644 mens-api/src/main/java/kr/xit/ens/pplus/web/ApiExample.java create mode 100644 mens-core/src/main/java/kr/xit/biz/ens/model/cmm/TmplatManage.java diff --git a/mens-api/src/main/java/kr/xit/biz/cmm/mapper/ICmmEnsFileMapper.java b/mens-api/src/main/java/kr/xit/biz/cmm/mapper/ICmmEnsFileMapper.java index 6c81460..b3587e7 100644 --- a/mens-api/src/main/java/kr/xit/biz/cmm/mapper/ICmmEnsFileMapper.java +++ b/mens-api/src/main/java/kr/xit/biz/cmm/mapper/ICmmEnsFileMapper.java @@ -2,7 +2,7 @@ package kr.xit.biz.cmm.mapper; import java.util.Optional; import kr.xit.biz.ens.model.cmm.CmmEnsFileInfDTO; -import kr.xit.biz.ens.model.cmm.CmmEnsRequestDTO; +import kr.xit.biz.ens.model.cmm.TmplatManage; import kr.xit.biz.ens.model.cntc.CntcDTO; import org.egovframe.rte.psl.dataaccess.mapper.Mapper; @@ -23,7 +23,7 @@ import org.egovframe.rte.psl.dataaccess.mapper.Mapper; */ @Mapper public interface ICmmEnsFileMapper { - Optional findDeptInfoByTmplId(final String tmplatId); + Optional findDeptInfoByTmplId(final String tmplatId); int insertCntcSndngMst(CntcDTO.SndngMst dto); int insertCntcSndngDtl(CntcDTO.SndngDtl dto); int insertCi(CmmEnsFileInfDTO.FmcInfExcelRslt dto); diff --git a/mens-api/src/main/java/kr/xit/biz/cmm/service/CmmEnsFileService.java b/mens-api/src/main/java/kr/xit/biz/cmm/service/CmmEnsFileService.java index b1fb277..b44def2 100644 --- a/mens-api/src/main/java/kr/xit/biz/cmm/service/CmmEnsFileService.java +++ b/mens-api/src/main/java/kr/xit/biz/cmm/service/CmmEnsFileService.java @@ -9,7 +9,6 @@ import java.util.Iterator; import java.util.List; import java.util.Set; import java.util.UUID; -import java.util.stream.Collectors; import javax.transaction.Transactional; import javax.validation.ConstraintViolation; import javax.validation.Validation; @@ -20,7 +19,7 @@ import kr.xit.biz.common.ApiConstants.NiceCiWrkDiv; import kr.xit.biz.ens.model.cmm.CmmEnsFileInfDTO.FmcExcelUpload; import kr.xit.biz.ens.model.cmm.CmmEnsFileInfDTO.FmcInfExcel; import kr.xit.biz.ens.model.cmm.CmmEnsFileInfDTO.FmcInfExcelRslt; -import kr.xit.biz.ens.model.cmm.CmmEnsRequestDTO; +import kr.xit.biz.ens.model.cmm.TmplatManage; import kr.xit.biz.ens.model.cntc.CntcDTO; import kr.xit.biz.ens.model.nice.NiceCiDTO.IpinCiResDataBody; import kr.xit.biz.ens.model.nice.NiceCiDTO.IpinCiResEncData; @@ -84,7 +83,7 @@ public class CmmEnsFileService extends EgovAbstractServiceImpl implements ICmmEn // 템플릿 정보 조회 final List fmcExcels = parsingFmcExcel(fileReq.getFiles()[0]); - CmmEnsRequestDTO tmpDTO = mapper.findDeptInfoByTmplId( + TmplatManage tmpDTO = mapper.findDeptInfoByTmplId( fmcExcels.get(0).getTmplatId()) .orElseThrow(() -> BizRuntimeException.create("템플릿 정보를 찾을 수 없습니다.")); @@ -92,8 +91,8 @@ public class CmmEnsFileService extends EgovAbstractServiceImpl implements ICmmEn fileReq.setSignguCode(tmpDTO.getSignguCode()); fileReq.setFfnlgCode(tmpDTO.getFfnlgCode()); fileReq.setTry1(tmpDTO.getTry1()); - fileReq.setPost_dlvr_se(tmpDTO.getPost_dlvr_se()); - fileReq.setPost_tmplat_code(tmpDTO.getPost_tmplat_code()); + fileReq.setPostDlvrSe(tmpDTO.getPostDlvrSe()); + fileReq.setPostTmplatCode(tmpDTO.getPostTmplatCode()); List rslts = getConvertCis(fileReq, fmcExcels); // CNTC 테이블 insert @@ -812,8 +811,8 @@ public class CmmEnsFileService extends EgovAbstractServiceImpl implements ICmmEn + "\"이중창\"," + "\"칼라\"," + "\"단면\"," - + "\""+ Checks.checkVal(fileReq.getPost_dlvr_se(),"") +"\"," - + "\""+ Checks.checkVal(fileReq.getPost_tmplat_code(),"") +"\"," + + "\""+ Checks.checkVal(fileReq.getPostDlvrSe(),"") +"\"," + + "\""+ Checks.checkVal(fileReq.getPostTmplatCode(),"") +"\"," + "\"Y\"," + Checks.checkVal(String.valueOf(excelCnt),"") + "," + "\"N\"," diff --git a/mens-api/src/main/java/kr/xit/ens/pplus/service/PplusService.java b/mens-api/src/main/java/kr/xit/ens/pplus/service/PplusService.java index 3aada11..ce99343 100644 --- a/mens-api/src/main/java/kr/xit/ens/pplus/service/PplusService.java +++ b/mens-api/src/main/java/kr/xit/ens/pplus/service/PplusService.java @@ -111,18 +111,15 @@ public class PplusService extends EgovAbstractServiceImpl implements IPplusServi public PpStatusResponse statusBulks(PpStatusRequest reqDTO) { final CmmEnsRlaybsnmDTO ktMnsInfo = CmmKtMmsUtils.getRlaybsnmInfo(reqDTO.getSignguCode(), reqDTO.getFfnlgCode()); reqDTO.setApiKey(ktMnsInfo.getPplusApiKey()); + reqDTO.setSignguCode(null); + reqDTO.setFfnlgCode(null); + reqDTO.setProfile(null); + reqDTO.setTry1(null); CmmEnsUtils.validate(reqDTO); final Map headerMap = new HashMap<>(); headerMap.put(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON_VALUE); -// headerMap.put(HttpHeaders.AUTHORIZATION, String.format("%s %s", AUTH_TYPE_BEARER, "access-token")); -// headerMap.put(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_FORM_URLENCODED_VALUE); -// headerMap.put("client-id", "client-id"); -// headerMap.put("client-tp", "10"); - reqDTO.setSignguCode(null); - reqDTO.setFfnlgCode(null); - reqDTO.setProfile(null); return webClient.exchange( HOST + STATUS, HttpMethod.POST, diff --git a/mens-api/src/main/java/kr/xit/ens/pplus/web/ApiExample.java b/mens-api/src/main/java/kr/xit/ens/pplus/web/ApiExample.java deleted file mode 100644 index f89c450..0000000 --- a/mens-api/src/main/java/kr/xit/ens/pplus/web/ApiExample.java +++ /dev/null @@ -1,253 +0,0 @@ -package kr.xit.ens.pplus.web; - -import io.swagger.v3.oas.annotations.Operation; -import io.swagger.v3.oas.annotations.tags.Tag; -import java.io.BufferedReader; -import java.io.File; -import java.io.FileInputStream; -import java.io.IOException; -import java.io.InputStreamReader; -import java.io.OutputStream; -import java.io.OutputStreamWriter; -import java.io.PrintWriter; -import java.net.HttpURLConnection; -import java.net.MalformedURLException; -import java.net.URL; -import java.net.URLConnection; -import kr.xit.core.exception.BizRuntimeException; -import kr.xit.core.model.ApiResponseDTO; -import kr.xit.core.model.IApiResponse; -import org.springframework.http.MediaType; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; - -@Tag(name = "ApiExample", description = "Postplus(포스토피아) sample API") -@RestController -@RequestMapping("/api/ens/pplus/v1") -public class ApiExample { - - private String charset = "utf-8"; - private final String boundary = "===" + System.currentTimeMillis() + "==="; - private static final String LINE_FEED = "\r\n"; - - - @Operation(summary = "우편제작접수 샘플", description = "우편제작접수 샘플") - @PostMapping(value = "/apiExample", produces = MediaType.APPLICATION_JSON_VALUE) - public IApiResponse apiExample() { - -// // master -// JSONArray masterCols = new JSONArray(); -// masterCols.add("버전"); -// masterCols.add("테스트여부"); -// masterCols.add("서비스"); -// masterCols.add("연계식별키"); -// masterCols.add("봉투"); -// masterCols.add("봉투창"); -// masterCols.add("흑백칼라"); -// masterCols.add("단면양면"); -// masterCols.add("배달"); -// masterCols.add("템플릿코드"); -// masterCols.add("템플릿출력여부"); -// masterCols.add("수취인수"); -// masterCols.add("여백생성유무"); -// masterCols.add("주소페이지유무"); -// masterCols.add("맞춤자제유무"); -// masterCols.add("메일머지유무"); -// masterCols.add("동봉물유무"); -// masterCols.add("반송여부"); -// masterCols.add("스테이플러유무"); -// masterCols.add("로고파일"); -// masterCols.add("발송인명"); -// masterCols.add("발송인우편번호"); -// masterCols.add("발송인주소"); -// masterCols.add("발송인상세주소"); -// masterCols.add("발송인전화번호"); -// -// JSONArray masterRows = new JSONArray(); -// masterRows.add("v1.10"); // 버전 -// masterRows.add("Y"); // 테스트여부 -// masterRows.add("PST"); // 서비스 -// masterRows.add("POST20230428_000001"); // 연계식별키 -// masterRows.add("소봉투"); // 봉투 -// masterRows.add("이중창"); // 봉투창 -// masterRows.add("흑백"); // 흑백칼라 -// masterRows.add("단면"); // 단면양면 -// masterRows.add("일반"); // 배달 -// masterRows.add(""); // 템플릿코드 -// masterRows.add("N"); // 템플릿출력여부 -// masterRows.add(2); // 수취인수 -// masterRows.add("N"); // 여백생성유무 -// masterRows.add("N"); // 주소페이지유무 -// masterRows.add("N"); // 맞춤자제유무 -// masterRows.add("N"); // 메일머지유무 -// masterRows.add("N"); // 동봉물유무 -// masterRows.add("N"); // 반송여부 -// masterRows.add("N"); // 스테이플러유무 -// masterRows.add("N"); // 로고파일 -// masterRows.add("포스토피아"); // 발송인명 -// masterRows.add("05048"); // 발송인우편번호 -// masterRows.add("서울특별시 광진구 강변역로2"); // 발송인주소 -// masterRows.add("서울광진우체국 B동 4층"); // 발송인상세주소 -// masterRows.add("1577-8114"); // 발송인전화번호 -// -// JSONObject master = new JSONObject(); -// master.put("cols", masterCols); -// master.put("rows", masterRows); -// -// -// // detail -// JSONArray detailCols = new JSONArray(); -// detailCols.add("순번"); -// detailCols.add("이름"); -// detailCols.add("우편번호"); -// detailCols.add("주소"); -// detailCols.add("상세주소"); -// detailCols.add("전화번호"); -// detailCols.add("첨부파일"); -// detailCols.add("가변1"); -// detailCols.add("가변2"); -// detailCols.add("가변3"); -// detailCols.add("가변4"); -// -// JSONArray detailRows1 = new JSONArray(); -// detailRows1.add("1"); -// detailRows1.add("홍길동1"); -// detailRows1.add("31010"); -// detailRows1.add("서울특별시 광진구 강변역로2"); -// detailRows1.add("서울광진우체국 B동 1층"); -// detailRows1.add("01012341234"); -// detailRows1.add("pstFile.pdf"); -// detailRows1.add("24926737"); -// detailRows1.add("2021-09-02"); -// detailRows1.add("대출(고정)"); -// detailRows1.add("31,000,000"); -// -// JSONArray detailRows2 = new JSONArray(); -// detailRows2.add("2"); -// detailRows2.add("홍길동2"); -// detailRows2.add("08394"); -// detailRows2.add("서울특별시 광진구 강변역로2"); -// detailRows2.add("서울광진우체국 B동 2층"); -// detailRows2.add("01012341234"); -// detailRows2.add("pstFile.pdf"); -// detailRows2.add("25685047"); -// detailRows2.add("2021-09-02"); -// detailRows2.add("대출B(변동)"); -// detailRows2.add("421,000,000"); -// -// JSONArray detailRows = new JSONArray(); -// detailRows.add(detailRows1); -// detailRows.add(detailRows2); -// -// JSONObject detail = new JSONObject(); -// detail.put("cols", detailCols); -// detail.put("rows", detailRows); -// -// JSONObject pst = new JSONObject(); -// pst.put("master", master); -// pst.put("detail", detail); -// -// // 파일생성 & 저장 -// try { -// FileWriter pstFile = new FileWriter("d:/data/temp/pstFile2.json"); -// pstFile.write(pst.toJSONString()); -// pstFile.flush(); -// pstFile.close(); -// } catch (IOException e) { -// e.printStackTrace(); -// } - - // API 전송 - URL url = null; - HttpURLConnection conn; - try { - url = new URL("https://t.postplus.co.kr/po/api/postplusPstMsrApi.do"); - //url = new URL("http://localhost:8081/api/ens/pplus/v1/accept2"); - //url = new URL("http://localhost:8081/api/ens/pplus/v1/accept3"); - conn = (HttpURLConnection) url.openConnection(); - conn.setUseCaches(false); - conn.setDoOutput(true); - conn.setDoInput(true); - conn.setRequestProperty("Content-Type", "multipart/form-data; boundary=" + boundary); - conn.setRequestProperty("User-Agent", "CodeJava Agent"); - } catch (MalformedURLException e) { - throw new RuntimeException(e); - } catch (IOException e) { - throw new RuntimeException(e); - } - - - - try (OutputStream ops = conn.getOutputStream(); - PrintWriter writer = new PrintWriter(new OutputStreamWriter(ops, charset), true)) { - //File pstFile = new File("c:/Temp/pstFile.json"); - File pstFile = new File("d:/data/temp/pstFile2.json"); - //File attchFile = new File("c:/Temp/pstFile.pdf"); - - addParam(writer, "apiKey", "00197D16F7FE4A84E9C97F55033339FBE07FB374D7C8C94EE4C96BA7D997297AC1E9CB5F1FC50CC3C63F5285923FDAB73679A011D40CA00CE589C98858AEFFE7F64E8E0FCF59EF0DC52B548C13D16FC2BB4"); - addFile(writer, ops, "pstFile", pstFile); - //addFile(writer, ops, "pstFile", attchFile); - - writer.append("--" + boundary + "--").append(LINE_FEED); - writer.append(LINE_FEED).flush(); - } catch (Exception e){ - throw BizRuntimeException.create(e); - } - - StringBuffer response = new StringBuffer(); - try { - int status = conn.getResponseCode(); - if (status == HttpURLConnection.HTTP_OK) { - try (BufferedReader reader = new BufferedReader( - new InputStreamReader(conn.getInputStream()))) { - String line; - while((line = reader.readLine()) != null) { - response.append(line); - } - } catch (IOException e) { - throw BizRuntimeException.create(e); - } - conn.disconnect(); - } else { - throw BizRuntimeException.create("Server returned non-OK status: " + status); - } - } catch (IOException e) { - throw BizRuntimeException.create(e); - } - return ApiResponseDTO.success(response.toString()); - } - - private void addParam(PrintWriter writer, String name, String value) { - writer.append("--" + boundary).append(LINE_FEED); - writer.append("Content-Disposition: form-data; name=\"" + name + "\"").append(LINE_FEED); - writer.append("Content-Type: text/plain; charset=" + charset).append(LINE_FEED); - writer.append(LINE_FEED); - writer.append(value).append(LINE_FEED); - writer.flush(); - } - - private void addFile(PrintWriter writer, OutputStream ops, String name, File uploadFile) { - String fileName = uploadFile.getName(); - writer.append("--" + boundary).append(LINE_FEED); - writer.append("Content-Disposition: form-data; name=\"" + name+ "\"; filename=\"" + fileName + "\"").append(LINE_FEED); - writer.append("Content-Type: "+ URLConnection.guessContentTypeFromName(fileName)).append(LINE_FEED); - writer.append("Content-Transfer-Encoding: binary").append(LINE_FEED); - writer.append(LINE_FEED); - writer.flush(); - - try (FileInputStream is = new FileInputStream(uploadFile)) { - byte[] buffer = new byte[4096]; - int bytesRead = -1; - while((bytesRead = is.read(buffer)) != -1) { - ops.write(buffer, 0, bytesRead); - } - ops.flush(); - } catch (IOException e){ - throw BizRuntimeException.create(e.getMessage()); - } - writer.append(LINE_FEED); - writer.flush(); - } -} - diff --git a/mens-api/src/main/java/kr/xit/ens/pplus/web/PplusController.java b/mens-api/src/main/java/kr/xit/ens/pplus/web/PplusController.java index 27e84da..09cd95a 100644 --- a/mens-api/src/main/java/kr/xit/ens/pplus/web/PplusController.java +++ b/mens-api/src/main/java/kr/xit/ens/pplus/web/PplusController.java @@ -14,7 +14,6 @@ import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; -import org.springframework.web.servlet.ModelAndView; /** *
@@ -72,27 +71,4 @@ public class PplusController {
     public IApiResponse status(@RequestBody final PpStatusRequest paramDTO) {
         return ApiResponseDTO.success(service.statusBulks(paramDTO));
     }
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-    @PostMapping(value = "/accept2")
-    public IApiResponse accept2() {
-        return ApiResponseDTO.success();
-    }
-
-    @PostMapping(value = "/accept3")
-    public ModelAndView accept3() {
-        return new ModelAndView("/index.html");
-    }
 }
diff --git a/mens-api/src/main/resources/egovframework/mapper/biz/ens-cmm-file-mysql-mapper.xml b/mens-api/src/main/resources/egovframework/mapper/biz/ens-cmm-file-mysql-mapper.xml
index 7f56ba6..4ab485e 100644
--- a/mens-api/src/main/resources/egovframework/mapper/biz/ens-cmm-file-mysql-mapper.xml
+++ b/mens-api/src/main/resources/egovframework/mapper/biz/ens-cmm-file-mysql-mapper.xml
@@ -2,7 +2,7 @@
 
 
-    
       /** ens-cmm-file-mysql-mapper|findDeptInfoByTmplId-템플릿ID로 부서정보 조회|seojh  */
       SELECT tetm.signgu_code
            , tetm.ffnlg_code
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 b1dddfe..8b4082b 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
@@ -5,6 +5,7 @@ import java.util.Optional;
 import kr.xit.biz.ens.model.EnsDTO;
 import kr.xit.biz.ens.model.EnsKtBcDTO;
 import kr.xit.biz.ens.model.cmm.SndngMssageParam;
+import kr.xit.biz.ens.model.cmm.TmplatManage;
 import kr.xit.biz.ens.model.cntc.CntcDTO;
 import kr.xit.biz.ens.model.kakao.KkopayDocBulkDTO.BulkStatus;
 import kr.xit.biz.ens.model.kakao.KkopayDocDTO.OneTimeToken;
@@ -394,7 +395,7 @@ public interface IEnsBatchMapper {
      * @return Optional
      * 
*/ - Optional selectTmplat(final String tmplatId); + Optional selectTmplat(final String tmplatId); /** *
diff --git a/mens-batch/src/main/java/kr/xit/biz/ens/model/EnsDTO.java b/mens-batch/src/main/java/kr/xit/biz/ens/model/EnsDTO.java
index c64af95..2610b06 100644
--- a/mens-batch/src/main/java/kr/xit/biz/ens/model/EnsDTO.java
+++ b/mens-batch/src/main/java/kr/xit/biz/ens/model/EnsDTO.java
@@ -252,76 +252,6 @@ public class EnsDTO {
          */
         private String externalDocumentUuid;
     }
-
-    @Data
-    @NoArgsConstructor
-    @AllArgsConstructor
-    @SuperBuilder
-    @EqualsAndHashCode(callSuper = false)
-    public static class TmplatManage extends AuditFields implements Serializable {
-
-        /**
-         * 템플릿 ID
-         */
-        private String tmplatId;
-        /**
-         * 시군구 코드
-         */
-        private String signguCode;
-        /**
-         * 과태료 코드
-         */
-        private String ffnlgCode;
-        /**
-         * 발송 유형 코드
-         */
-        private String sndngTyCode;
-        /**
-         * 템플릿 명
-         */
-        private String tmplatNm;
-        /**
-         * 템플릿 제목
-         */
-        private String tmplatSj;
-        /**
-         * 템플릿 내용
-         */
-        private String tmplatCn;
-        /**
-         * 고객 센터 전화 번호
-         */
-        private String cstmrCnterTlphonNo;
-        /**
-         * REDIRECT URL
-         */
-        private String redirectUrl;
-        /**
-         * try1
-         */
-        private String try1;
-        /**
-         * try2
-         */
-        private String try2;
-        /**
-         * try3
-         */
-        private String try3;
-        /**
-         * try2_minute
-         */
-        private int try2Minute;
-        /**
-         * try3_minute
-         */
-        private int try3Minute;
-        /**
-         * 사용 여부
-         */
-        private String useAt;
-    }
-
     @Data
     @NoArgsConstructor
     @AllArgsConstructor
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 cbc0aff..10db757 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
@@ -1012,9 +1012,7 @@
 		   AND tekmd.document_binder_uuid = #{document_binder_uuid}
 	
 
-
-
-	
 		/** ens-mysql-mapper|selectTmplat-템플릿정보조회|julim  */
 		SELECT tmplat_id				/* 템플릿 아이디 */
 				 , signgu_code				/* 시군구 코드 */
diff --git a/mens-core/src/main/java/kr/xit/biz/ens/model/cmm/CmmEnsFileInfDTO.java b/mens-core/src/main/java/kr/xit/biz/ens/model/cmm/CmmEnsFileInfDTO.java
index 98a0706..5f33720 100644
--- a/mens-core/src/main/java/kr/xit/biz/ens/model/cmm/CmmEnsFileInfDTO.java
+++ b/mens-core/src/main/java/kr/xit/biz/ens/model/cmm/CmmEnsFileInfDTO.java
@@ -7,6 +7,7 @@ import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
 import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateDeserializer;
 import io.swagger.v3.oas.annotations.media.Schema;
 import io.swagger.v3.oas.annotations.media.Schema.RequiredMode;
+import java.time.LocalDateTime;
 import javax.validation.constraints.Size;
 import kr.xit.biz.ens.model.nice.NiceCiDTO.IpinCiResEncData;
 import lombok.AllArgsConstructor;
@@ -17,8 +18,6 @@ import lombok.experimental.SuperBuilder;
 import org.hibernate.validator.constraints.NotEmpty;
 import org.springframework.web.multipart.MultipartFile;
 
-import java.time.LocalDateTime;
-
 /**
  * 
  * description : 전자고지 파일 연계 DTO
@@ -82,6 +81,8 @@ public class CmmEnsFileInfDTO {
         @Schema(requiredMode = RequiredMode.AUTO, title = "통합발송마스터ID", example = "0", description = "통합발송마스터ID")
         private String unitySndngMastrId;
 
+        private String postDlvrSe;
+        private String postTmplatCode;
     }
 
     @Schema(name = "FmcInfExcel", description = "시설관리공단 전자문서 발송대상 엑셀 파일 interface DTO")
diff --git a/mens-core/src/main/java/kr/xit/biz/ens/model/cmm/CmmEnsRequestDTO.java b/mens-core/src/main/java/kr/xit/biz/ens/model/cmm/CmmEnsRequestDTO.java
index 2892755..b2fbf5a 100644
--- a/mens-core/src/main/java/kr/xit/biz/ens/model/cmm/CmmEnsRequestDTO.java
+++ b/mens-core/src/main/java/kr/xit/biz/ens/model/cmm/CmmEnsRequestDTO.java
@@ -62,18 +62,4 @@ public class CmmEnsRequestDTO {
     @Schema(requiredMode = RequiredMode.AUTO, title = "1차 발송", example = "KKO-MY-DOC")
     @JsonProperty("try1")
     private String try1;
-
-    /**
-     * 우편 배달 구분
-     */
-    @Schema(requiredMode = RequiredMode.AUTO, title = "우편 배달 구분", example = "일반")
-    @JsonProperty("post_dlvr_se")
-    private String post_dlvr_se;
-
-    /**
-     * 우편 템플릿 코드
-     */
-    @Schema(requiredMode = RequiredMode.AUTO, title = "우편 템플릿 코드", example = "SISUL_TRAFFIC")
-    @JsonProperty("post_tmplat_code")
-    private String post_tmplat_code;
 }
diff --git a/mens-core/src/main/java/kr/xit/biz/ens/model/cmm/TmplatManage.java b/mens-core/src/main/java/kr/xit/biz/ens/model/cmm/TmplatManage.java
new file mode 100644
index 0000000..9e6c16d
--- /dev/null
+++ b/mens-core/src/main/java/kr/xit/biz/ens/model/cmm/TmplatManage.java
@@ -0,0 +1,81 @@
+package kr.xit.biz.ens.model.cmm;
+
+import java.io.Serializable;
+import kr.xit.biz.common.AuditFields;
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.NoArgsConstructor;
+import lombok.experimental.SuperBuilder;
+
+@Data
+@NoArgsConstructor
+@AllArgsConstructor
+@SuperBuilder
+@EqualsAndHashCode(callSuper = false)
+public class TmplatManage extends AuditFields implements Serializable {
+
+    /**
+     * 템플릿 ID
+     */
+    private String tmplatId;
+    /**
+     * 시군구 코드
+     */
+    private String signguCode;
+    /**
+     * 과태료 코드
+     */
+    private String ffnlgCode;
+    /**
+     * 발송 유형 코드
+     */
+    private String sndngTyCode;
+    /**
+     * 템플릿 명
+     */
+    private String tmplatNm;
+    /**
+     * 템플릿 제목
+     */
+    private String tmplatSj;
+    /**
+     * 템플릿 내용
+     */
+    private String tmplatCn;
+    /**
+     * 고객 센터 전화 번호
+     */
+    private String cstmrCnterTlphonNo;
+    /**
+     * REDIRECT URL
+     */
+    private String redirectUrl;
+    /**
+     * try1
+     */
+    private String try1;
+    /**
+     * try2
+     */
+    private String try2;
+    /**
+     * try3
+     */
+    private String try3;
+    /**
+     * try2_minute
+     */
+    private int try2Minute;
+    /**
+     * try3_minute
+     */
+    private int try3Minute;
+    /**
+     * 사용 여부
+     */
+    private String useAt;
+
+    private String postDlvrSe;
+    private String postTmplatCode;
+}