From 767c6576ff1c394b50c1e8872fe6016a87ef2e59 Mon Sep 17 00:00:00 2001 From: "Jonguk. Lim" Date: Mon, 5 Aug 2024 16:46:20 +0900 Subject: [PATCH] =?UTF-8?q?refactor:=20=EB=AF=B8=EC=82=AC=EC=9A=A9=20?= =?UTF-8?q?=ED=81=B4=EB=9E=98=EC=8A=A4=20=EC=A0=9C=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mens-api/pom.xml | 7 + .../xit/ens/epost/service/EpostService.java | 70 -- .../xit/ens/epost/service/IEpostService.java | 23 - .../kr/xit/ens/epost/web/EpostController.java | 43 - .../kr/xit/ens/pplus/mapper/IPplusMapper.java | 26 - .../xit/ens/pplus/service/IPplusService.java | 26 - .../xit/ens/pplus/service/PplusService.java | 145 ---- .../kr/xit/ens/pplus/web/PplusController.java | 55 -- .../kr/xit/other/mapper/IOtherMapper.java | 27 - .../kr/xit/other/model/ElecnoticeDTO.java | 138 --- .../kr/xit/other/service/IOtherService.java | 23 - .../kr/xit/other/service/OtherService.java | 66 -- .../kr/xit/other/web/OtherController.java | 42 - .../xit/biz/ens/mapper/IEnsBatchMapper.java | 34 +- .../kr/xit/biz/ens/model/EnsPostPlusDTO.java | 128 --- .../ens/service/EnsBatchAcceptService.java | 41 +- .../ens/service/EnsBatchExtractService.java | 79 +- .../biz/ens/service/EnsBatchMakeService.java | 15 +- .../biz/ens/service/EnsBatchSendService.java | 68 +- .../ens/service/EnsBatchStatusService.java | 217 +---- .../ens/service/IEnsBatchExtractService.java | 3 +- .../xit/biz/sms/mapper/ISmsMessageMapper.java | 29 - .../biz/sms/service/ISmsMessageService.java | 24 - .../biz/sms/service/SmsMessageService.java | 41 - .../xit/biz/sms/web/SmsMessageController.java | 55 -- .../main/resources/config/application-ens.yml | 7 - .../mapper/biz/ens-oracle-mapper.xml | 36 - .../java/kr/xit/biz/common/ApiConstants.java | 4 +- .../kr/xit/biz/ens/model/epost/EPostDTO.java | 308 ------- .../kr/xit/biz/ens/model/pplus/PplusDTO.java | 820 ------------------ 30 files changed, 61 insertions(+), 2539 deletions(-) delete mode 100644 mens-api/src/main/java/kr/xit/ens/epost/service/EpostService.java delete mode 100644 mens-api/src/main/java/kr/xit/ens/epost/service/IEpostService.java delete mode 100644 mens-api/src/main/java/kr/xit/ens/epost/web/EpostController.java delete mode 100644 mens-api/src/main/java/kr/xit/ens/pplus/mapper/IPplusMapper.java delete mode 100644 mens-api/src/main/java/kr/xit/ens/pplus/service/IPplusService.java delete mode 100644 mens-api/src/main/java/kr/xit/ens/pplus/service/PplusService.java delete mode 100644 mens-api/src/main/java/kr/xit/ens/pplus/web/PplusController.java delete mode 100644 mens-api/src/main/java/kr/xit/other/mapper/IOtherMapper.java delete mode 100644 mens-api/src/main/java/kr/xit/other/model/ElecnoticeDTO.java delete mode 100644 mens-api/src/main/java/kr/xit/other/service/IOtherService.java delete mode 100644 mens-api/src/main/java/kr/xit/other/service/OtherService.java delete mode 100644 mens-api/src/main/java/kr/xit/other/web/OtherController.java delete mode 100644 mens-batch/src/main/java/kr/xit/biz/ens/model/EnsPostPlusDTO.java delete mode 100644 mens-batch/src/main/java/kr/xit/biz/sms/mapper/ISmsMessageMapper.java delete mode 100644 mens-batch/src/main/java/kr/xit/biz/sms/service/ISmsMessageService.java delete mode 100644 mens-batch/src/main/java/kr/xit/biz/sms/service/SmsMessageService.java delete mode 100644 mens-batch/src/main/java/kr/xit/biz/sms/web/SmsMessageController.java delete mode 100644 mens-batch/src/main/resources/egovframework/mapper/biz/ens-oracle-mapper.xml delete mode 100644 mens-core/src/main/java/kr/xit/biz/ens/model/epost/EPostDTO.java delete mode 100644 mens-core/src/main/java/kr/xit/biz/ens/model/pplus/PplusDTO.java diff --git a/mens-api/pom.xml b/mens-api/pom.xml index 9322e7e..61a54f4 100644 --- a/mens-api/pom.xml +++ b/mens-api/pom.xml @@ -58,6 +58,13 @@ ${basedir}/lib/ojdbc6.jar + + external + nicedici + 1.0 + system + ${basedir}/lib/VNOInterop.jar + diff --git a/mens-api/src/main/java/kr/xit/ens/epost/service/EpostService.java b/mens-api/src/main/java/kr/xit/ens/epost/service/EpostService.java deleted file mode 100644 index 0a3ac23..0000000 --- a/mens-api/src/main/java/kr/xit/ens/epost/service/EpostService.java +++ /dev/null @@ -1,70 +0,0 @@ -package kr.xit.ens.epost.service; - -import java.util.HashMap; -import java.util.Map; -import kr.xit.biz.common.ApiConstants.SndngSeCode; -import kr.xit.biz.ens.model.cmm.CmmEnsRlaybsnmDTO; -import kr.xit.biz.ens.model.epost.EPostDTO.EpostTraceRequest; -import kr.xit.biz.ens.model.epost.EPostDTO.EpostTraceResponse; -import kr.xit.core.service.AbstractService; -import kr.xit.core.spring.annotation.TraceLogging; -import kr.xit.core.spring.util.ApiWebClientUtil; -import kr.xit.ens.cmm.CmmEnsUtils; -import lombok.RequiredArgsConstructor; -import lombok.extern.slf4j.Slf4j; -import org.springframework.beans.factory.annotation.Value; -import org.springframework.http.HttpHeaders; -import org.springframework.http.HttpMethod; -import org.springframework.http.MediaType; -import org.springframework.stereotype.Service; - -/** - *
- * description :
- *
- * packageName : kr.xit.ens.epost.service
- * fileName    : EpostService
- * author      : limju
- * date        : 2023-10-04
- * ======================================================================
- * 변경일         변경자        변경 내용
- * ----------------------------------------------------------------------
- * 2023-10-04    limju       최초 생성
- *
- * 
- */ -@Slf4j -@RequiredArgsConstructor -@Service -public class EpostService extends AbstractService implements IEpostService { - @Value("${app.contract.epost.host}") - private String HOST; - - @Value("${app.contract.epost.api.postTrackInfo}") - private String POST_TRACK_INFO; - - private final ApiWebClientUtil webClient; - - @Override - @TraceLogging - public EpostTraceResponse postTrackInfo(final EpostTraceRequest reqDTO) { - final CmmEnsRlaybsnmDTO ktMnsInfo = CmmEnsUtils.getRlaybsnmInfo(reqDTO.getSignguCode(), reqDTO.getFfnlgCode(), - SndngSeCode.PPLUS);reqDTO.setServiceKey(ktMnsInfo.getEpostServiceKey()); - - final Map headerMap = new HashMap<>(); - headerMap.put(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON_VALUE); - - reqDTO.setSignguCode(null); - reqDTO.setFfnlgCode(null); - reqDTO.setProfile(null); - CmmEnsUtils.validate(reqDTO); - - return webClient.exchange( - HOST + POST_TRACK_INFO + String.format("?serviceKey=%s&rgist=%s",reqDTO.getServiceKey(), reqDTO.getRgist()), - HttpMethod.GET, - reqDTO, - EpostTraceResponse.class, - headerMap - ); - } -} diff --git a/mens-api/src/main/java/kr/xit/ens/epost/service/IEpostService.java b/mens-api/src/main/java/kr/xit/ens/epost/service/IEpostService.java deleted file mode 100644 index c79e0a5..0000000 --- a/mens-api/src/main/java/kr/xit/ens/epost/service/IEpostService.java +++ /dev/null @@ -1,23 +0,0 @@ -package kr.xit.ens.epost.service; - -import kr.xit.biz.ens.model.epost.EPostDTO.EpostTraceRequest; -import kr.xit.biz.ens.model.epost.EPostDTO.EpostTraceResponse; - -/** - *
- * description :
- *
- * packageName : kr.xit.ens.pplus.service
- * fileName    : IPplusService
- * author      : limju
- * date        : 2023-10-04
- * ======================================================================
- * 변경일         변경자        변경 내용
- * ----------------------------------------------------------------------
- * 2023-10-04    limju       최초 생성
- *
- * 
- */ -public interface IEpostService { - EpostTraceResponse postTrackInfo(final EpostTraceRequest reqDTO); -} diff --git a/mens-api/src/main/java/kr/xit/ens/epost/web/EpostController.java b/mens-api/src/main/java/kr/xit/ens/epost/web/EpostController.java deleted file mode 100644 index cffb3f1..0000000 --- a/mens-api/src/main/java/kr/xit/ens/epost/web/EpostController.java +++ /dev/null @@ -1,43 +0,0 @@ -package kr.xit.ens.epost.web; - -import io.swagger.v3.oas.annotations.Operation; -import io.swagger.v3.oas.annotations.tags.Tag; -import kr.xit.biz.ens.model.epost.EPostDTO.EpostTraceRequest; -import kr.xit.core.model.ApiResponseDTO; -import kr.xit.core.model.IApiResponse; -import kr.xit.ens.epost.service.IEpostService; -import lombok.RequiredArgsConstructor; -import org.springframework.http.MediaType; -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; - -/** - *
- * description :
- *
- * packageName : kr.xit.ens.epost.web
- * fileName    : EpostController
- * author      : limju
- * date        : 2023-10-04
- * ======================================================================
- * 변경일         변경자        변경 내용
- * ----------------------------------------------------------------------
- * 2023-10-04    limju       최초 생성
- *
- * 
- */ -@Tag(name = "EpostController", description = "EPost API") -@RequiredArgsConstructor -@RestController -@RequestMapping("/api/ens/epost/v1") -public class EpostController { - private final IEpostService service; - - @Operation(summary = "우편물 종적추적", description = "우편물 종적 추적") - @PostMapping(value = "/trace", produces = MediaType.APPLICATION_JSON_VALUE) - public IApiResponse postTrackInfo(@RequestBody final EpostTraceRequest paramDTO) { - return ApiResponseDTO.success(service.postTrackInfo(paramDTO)); - } -} diff --git a/mens-api/src/main/java/kr/xit/ens/pplus/mapper/IPplusMapper.java b/mens-api/src/main/java/kr/xit/ens/pplus/mapper/IPplusMapper.java deleted file mode 100644 index ef4d0d7..0000000 --- a/mens-api/src/main/java/kr/xit/ens/pplus/mapper/IPplusMapper.java +++ /dev/null @@ -1,26 +0,0 @@ -package kr.xit.ens.pplus.mapper; - -import java.util.List; -import kr.xit.biz.ens.model.cmm.SndngMssageParam; -import kr.xit.biz.ens.model.pplus.PplusDTO.BatchAcceptRequest; -import org.egovframe.rte.psl.dataaccess.mapper.Mapper; - -/** - *
- * description :
- *
- * packageName : kr.xit.ens.pplus.mapper
- * fileName    : IPplusMapper
- * author      : limju
- * date        : 2023-11-01
- * ======================================================================
- * 변경일         변경자        변경 내용
- * ----------------------------------------------------------------------
- * 2023-11-01    limju       최초 생성
- *
- * 
- */ -@Mapper -public interface IPplusMapper { - List selectPostPlusSendTgts(final SndngMssageParam dto); -} diff --git a/mens-api/src/main/java/kr/xit/ens/pplus/service/IPplusService.java b/mens-api/src/main/java/kr/xit/ens/pplus/service/IPplusService.java deleted file mode 100644 index 298c9d6..0000000 --- a/mens-api/src/main/java/kr/xit/ens/pplus/service/IPplusService.java +++ /dev/null @@ -1,26 +0,0 @@ -package kr.xit.ens.pplus.service; - -import kr.xit.biz.ens.model.cmm.SndngMssageParam; -import kr.xit.biz.ens.model.pplus.PplusDTO.PpCommonResponse; -import kr.xit.biz.ens.model.pplus.PplusDTO.PpStatusRequest; -import kr.xit.biz.ens.model.pplus.PplusDTO.PpStatusResponse; - -/** - *
- * description :
- *
- * packageName : kr.xit.ens.pplus.service
- * fileName    : IPplusService
- * author      : limju
- * date        : 2023-10-04
- * ======================================================================
- * 변경일         변경자        변경 내용
- * ----------------------------------------------------------------------
- * 2023-10-04    limju       최초 생성
- *
- * 
- */ -public interface IPplusService { - PpCommonResponse sendBulks(final SndngMssageParam reqDTO); - PpStatusResponse statusBulks(final PpStatusRequest reqDTO); -} 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 deleted file mode 100644 index 910412d..0000000 --- a/mens-api/src/main/java/kr/xit/ens/pplus/service/PplusService.java +++ /dev/null @@ -1,145 +0,0 @@ -package kr.xit.ens.pplus.service; - -import java.io.File; -import java.nio.charset.StandardCharsets; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import kr.xit.biz.common.ApiConstants.SndngSeCode; -import kr.xit.biz.ens.model.cmm.CmmEnsRlaybsnmDTO; -import kr.xit.biz.ens.model.cmm.SndngMssageParam; -import kr.xit.biz.ens.model.pplus.PplusDTO.BatchAcceptRequest; -import kr.xit.biz.ens.model.pplus.PplusDTO.PpCommonResponse; -import kr.xit.biz.ens.model.pplus.PplusDTO.PpStatusRequest; -import kr.xit.biz.ens.model.pplus.PplusDTO.PpStatusResponse; -import kr.xit.core.service.AbstractService; -import kr.xit.core.spring.annotation.TraceLogging; -import kr.xit.core.spring.util.ApiWebClientUtil; -import kr.xit.core.support.utils.FileUtil; -import kr.xit.core.support.utils.JsonUtils; -import kr.xit.ens.cmm.CmmEnsUtils; -import kr.xit.ens.pplus.mapper.IPplusMapper; -import lombok.RequiredArgsConstructor; -import lombok.extern.slf4j.Slf4j; -import org.jasypt.encryption.StringEncryptor; -import org.json.simple.JSONObject; -import org.springframework.beans.factory.annotation.Value; -import org.springframework.http.HttpHeaders; -import org.springframework.http.HttpMethod; -import org.springframework.http.MediaType; -import org.springframework.stereotype.Service; -import org.springframework.web.multipart.MultipartFile; - -/** - *
- * description :
- *
- * packageName : kr.xit.ens.pplus.service
- * fileName    : PplusService
- * author      : limju
- * date        : 2023-10-04
- * ======================================================================
- * 변경일         변경자        변경 내용
- * ----------------------------------------------------------------------
- * 2023-10-04    limju       최초 생성
- *
- * 
- */ -@Slf4j -@RequiredArgsConstructor -@Service -public class PplusService extends AbstractService implements IPplusService { - @Value("${app.file.cmm.temp-path}") - private String FILE_TEMP_PATH; - - @Value("${app.contract.pplus.host}") - private String HOST; - - @Value("${app.contract.pplus.api.accept}") - private String ACCEPT; - - @Value("${app.contract.pplus.api.status}") - private String STATUS; - - private final StringEncryptor jasyptStringEncryptor; - private final ApiWebClientUtil webClient; - private final IPplusMapper mapper; - - @SuppressWarnings("unchecked") - @Override - @TraceLogging - public PpCommonResponse sendBulks(final SndngMssageParam reqDTO) { - final List tgtList = mapper.selectPostPlusSendTgts(reqDTO); - - if(!tgtList.isEmpty()){ - JSONObject master = new JSONObject(); - master.put("cols", JsonUtils.toObject(tgtList.get(0).getMasterCols(), ArrayList.class)); - master.put("rows", JsonUtils.toObject(tgtList.get(0).getMasterRows(), ArrayList.class)); - - JSONObject detail = new JSONObject(); - detail.put("cols", JsonUtils.toObject(tgtList.get(0).getDetailCols(), ArrayList.class)); - detail.put("rows", tgtList.stream() - .map(d -> jasyptStringEncryptor.decrypt(d.getDetailRows())) - .map(d -> JsonUtils.toObject(d, ArrayList.class)) - .toList()); - - JSONObject pstJson = new JSONObject(); - pstJson.put("master", master); - pstJson.put("detail", detail); - - final String unitySndngMstId = tgtList.get(0).getUnitySndngMastrId(); - FileUtil.saveFile(FILE_TEMP_PATH,unitySndngMstId+".json", pstJson.toJSONString().getBytes( - StandardCharsets.UTF_8)); - return accept(reqDTO, unitySndngMstId); - } - return null; - } - - public PpCommonResponse accept(final SndngMssageParam paramDTO, final String unitySndngMstId) { - final CmmEnsRlaybsnmDTO ktMnsInfo = CmmEnsUtils.getRlaybsnmInfo(paramDTO.getSignguCode(), paramDTO.getFfnlgCode(), SndngSeCode.PPLUS); - - MultipartFile pstFile = FileUtil.createMutipartFile(unitySndngMstId + ".json", FILE_TEMP_PATH); - - List pstFiles = new ArrayList<>(); - pstFiles.add(pstFile); - - PpCommonResponse resDTO = webClient.exchangeFileData( - HOST + ACCEPT + String.format("?apiKey=%s", ktMnsInfo.getPplusApiKey()), - HttpMethod.POST, - pstFiles, - "pstFile", - PpCommonResponse.class - ); - resDTO.setUnitySndngMastrId(unitySndngMstId); - - File file = new File(FILE_TEMP_PATH + "/" +unitySndngMstId + ".json"); - if(file.exists()) { - file.delete(); - } - - return resDTO; - } - - @Override - public PpStatusResponse statusBulks(PpStatusRequest reqDTO) { - final CmmEnsRlaybsnmDTO ktMnsInfo = CmmEnsUtils.getRlaybsnmInfo(reqDTO.getSignguCode(), reqDTO.getFfnlgCode(), SndngSeCode.PPLUS); - 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.MULTIPART_FORM_DATA_VALUE); - - return webClient.exchangeFormData( - HOST + STATUS, - HttpMethod.POST, - reqDTO, - PpStatusResponse.class, - headerMap - ); - } -} 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 deleted file mode 100644 index c2746d5..0000000 --- a/mens-api/src/main/java/kr/xit/ens/pplus/web/PplusController.java +++ /dev/null @@ -1,55 +0,0 @@ -package kr.xit.ens.pplus.web; - -import io.swagger.v3.oas.annotations.Operation; -import io.swagger.v3.oas.annotations.tags.Tag; -import kr.xit.biz.ens.model.cmm.SndngMssageParam; -import kr.xit.biz.ens.model.pplus.PplusDTO.PpCommonResponse; -import kr.xit.biz.ens.model.pplus.PplusDTO.PpStatusRequest; -import kr.xit.biz.ens.model.pplus.PplusDTO.PpStatusResponse; -import kr.xit.core.model.ApiResponseDTO; -import kr.xit.core.model.IApiResponse; -import kr.xit.ens.pplus.service.IPplusService; -import lombok.RequiredArgsConstructor; -import org.springframework.http.MediaType; -import org.springframework.web.bind.annotation.ModelAttribute; -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; - -/** - *
- * description :
- *
- * packageName : kr.xit.ens.pplus.web
- * fileName    : PplusController
- * author      : limju
- * date        : 2023-10-04
- * ======================================================================
- * 변경일         변경자        변경 내용
- * ----------------------------------------------------------------------
- * 2023-10-04    limju       최초 생성
- *
- * 
- */ -@Tag(name = "PplusController", description = "Postplus(포스토피아) API") -@RequiredArgsConstructor -@RestController -@RequestMapping("/api/ens/pplus/v1") -public class PplusController { - private final IPplusService service; - - @Operation(summary = "우편제작접수", description = "우편제작접수 요청
우편제작접수") - @PostMapping(value = "/accept", produces = MediaType.APPLICATION_JSON_VALUE) - public IApiResponse send(@ModelAttribute final SndngMssageParam paramDTO) { - PpCommonResponse resDTO = service.sendBulks(paramDTO); - return ApiResponseDTO.success(resDTO); - } - - @Operation(summary = "우편제작 상태 조회", description = "우편제작상태조회") - @PostMapping(value = "/status", produces = MediaType.APPLICATION_JSON_VALUE) - public IApiResponse status(@RequestBody final PpStatusRequest paramDTO) { - PpStatusResponse resDTO = service.statusBulks(paramDTO); - return ApiResponseDTO.success(resDTO); - } -} diff --git a/mens-api/src/main/java/kr/xit/other/mapper/IOtherMapper.java b/mens-api/src/main/java/kr/xit/other/mapper/IOtherMapper.java deleted file mode 100644 index 399700f..0000000 --- a/mens-api/src/main/java/kr/xit/other/mapper/IOtherMapper.java +++ /dev/null @@ -1,27 +0,0 @@ -package kr.xit.other.mapper; - -import kr.xit.other.model.ElecnoticeDTO.Elecnoticedtl; -import org.egovframe.rte.psl.dataaccess.mapper.Mapper; - -/** - *
- * description : 전자고지 파일 외부연계 mapper
- *
- * packageName : kr.xit.biz.other.mapper
- * fileName    : IOtherMapper
- * author      : seojh
- * date        : 2024-01-03
- * ======================================================================
- * 변경일         변경자        변경 내용
- * ----------------------------------------------------------------------
- * 2024-01-03    seojh       최초 생성
- *
- * 
- */ -@Mapper -public interface IOtherMapper { - - Elecnoticedtl selectElecnotice(final Elecnoticedtl dto); - int saveElecnoticemst(final Elecnoticedtl dto); - int saveElecnoticedtl(final Elecnoticedtl dto); -} diff --git a/mens-api/src/main/java/kr/xit/other/model/ElecnoticeDTO.java b/mens-api/src/main/java/kr/xit/other/model/ElecnoticeDTO.java deleted file mode 100644 index f7fd122..0000000 --- a/mens-api/src/main/java/kr/xit/other/model/ElecnoticeDTO.java +++ /dev/null @@ -1,138 +0,0 @@ -package kr.xit.other.model; - -import lombok.AllArgsConstructor; -import lombok.Data; -import lombok.NoArgsConstructor; -import lombok.experimental.SuperBuilder; - -/** - *
- * description : 전자고지 파일 외부연계 DTO
- *
- * packageName : kr.xit.biz.other.model
- * fileName    : ElecnoticeDTO
- * author      : seojh
- * date        : 2024-01-03
- * ======================================================================
- * 변경일         변경자        변경 내용
- * ----------------------------------------------------------------------
- * 2024-01-03    seojh       최초 생성
- *
- * 
- */ -public class ElecnoticeDTO { - @Data - @NoArgsConstructor - @AllArgsConstructor - @SuperBuilder - public static class Elecnoticemst { - - /** - * 파일 일련번호 - */ - private String unitysndngmastrid; - /** - * 우편물 발송건수 - */ - private String sndngco; - /** - * 발송처리상태 - */ - private String sndngprocesssttus; - /** - * 등록자 - */ - private String insuser; - /** - * 등록일자 - */ - private String insdate; - /** - * 수정자 - */ - private String upduser; - /** - * 수정일자 - */ - private String upddate; - /** - * 발송일시 - */ - private String sndngdt; - /** - * 발송구분 - */ - private String sndngsecode; - /** - * 고지서명 - */ - private String tmplatid; - /** - * 결과조회일시 - */ - private String searchdate; - /** - * 성공여부 - */ - private String success; - /** - * 메시지 - */ - private String message; - - } - - - @Data - @NoArgsConstructor - @AllArgsConstructor - @SuperBuilder - public static class Elecnoticedtl extends Elecnoticemst { - /** - * 우편물 일련번호 - */ - private String unitysndngdetailid; - /** - * 고지차수 - */ - private String gojidepth; - /** - * 기관번호 - */ - private String taxnum1; - /** - * 세목 - */ - private String taxnum2; - /** - * 납세년월기 - */ - private String taxnum3; - /** - * 과세번호 - */ - private String taxnum4; - /** - * 담당자 - */ - private String worker; - /** - * 가상계좌 일련번호 - */ - private String serialno; - /** - * 수신일자 - */ - private String recvdt; - /** - * 열람일자 - */ - private String readdt; - /** - * 발송결과코드 - */ - private String resultcode; - - } - -} \ No newline at end of file diff --git a/mens-api/src/main/java/kr/xit/other/service/IOtherService.java b/mens-api/src/main/java/kr/xit/other/service/IOtherService.java deleted file mode 100644 index 3a66da3..0000000 --- a/mens-api/src/main/java/kr/xit/other/service/IOtherService.java +++ /dev/null @@ -1,23 +0,0 @@ -package kr.xit.other.service; - -/** - *
- * description :
- *
- * packageName : kr.xit.other.service
- * fileName    : IOtherService
- * author      : seojh
- * date        : 2024-01-04
- * ======================================================================
- * 변경일         변경자        변경 내용
- * ----------------------------------------------------------------------
- * 2024-01-04    seojh       최초 생성
- *
- * 
- */ -public interface IOtherService { - //-------------------------------------------------------------------------------- - // merge save oracle - //-------------------------------------------------------------------------------- - String mergeData(); -} diff --git a/mens-api/src/main/java/kr/xit/other/service/OtherService.java b/mens-api/src/main/java/kr/xit/other/service/OtherService.java deleted file mode 100644 index 2f201a4..0000000 --- a/mens-api/src/main/java/kr/xit/other/service/OtherService.java +++ /dev/null @@ -1,66 +0,0 @@ -package kr.xit.other.service; - -import kr.xit.biz.sisul.mapper.IBizSisulMapper; -import kr.xit.core.service.AbstractService; -import kr.xit.core.spring.annotation.TraceLogging; -import kr.xit.core.support.utils.Checks; -import kr.xit.other.mapper.IOtherMapper; -import kr.xit.other.model.ElecnoticeDTO.Elecnoticedtl; -import lombok.RequiredArgsConstructor; -import lombok.extern.slf4j.Slf4j; -import org.springframework.stereotype.Service; - -import java.util.List; - -/** - *
- * description :
- *
- * packageName : kr.xit.other.service
- * fileName    : OtherService
- * author      : seojh
- * date        : 2024-01-04
- * ======================================================================
- * 변경일         변경자        변경 내용
- * ----------------------------------------------------------------------
- * 2024-01-04    seojh       최초 생성
- *
- * 
- */ -@Slf4j -@RequiredArgsConstructor -@Service -public class OtherService extends AbstractService implements IOtherService { - - private final IOtherMapper mapper; - private final IBizSisulMapper mapper2; - - /** - * - * @return String - */ - @Override - public String mergeData(){ - List ohterResult = mapper2.selectOhterResult(); - - for(Elecnoticedtl dto: ohterResult){ - Elecnoticedtl elecnoticedtl = mapper.selectElecnotice(dto); - - if((Checks.isEmpty(elecnoticedtl)) - || (Checks.isEmpty(elecnoticedtl.getSndngprocesssttus())) - || (Checks.isNotEmpty(elecnoticedtl) && !Checks.checkVal(dto.getSndngprocesssttus(),"").equals(Checks.checkVal(elecnoticedtl.getSndngprocesssttus(),""))) - || (Checks.isNotEmpty(elecnoticedtl) && !Checks.checkVal(dto.getSndngco(),"").equals(Checks.checkVal(elecnoticedtl.getSndngco(),""))) - || (Checks.isNotEmpty(elecnoticedtl) && !Checks.checkVal(dto.getSndngdt(),"").equals(Checks.checkVal(elecnoticedtl.getSndngdt(),""))) - || (Checks.isNotEmpty(elecnoticedtl) && !Checks.checkVal(dto.getTmplatid(),"").equals(Checks.checkVal(elecnoticedtl.getTmplatid(),""))) - || (Checks.isNotEmpty(elecnoticedtl) && !Checks.checkVal(dto.getMessage(),"").equals(Checks.checkVal(elecnoticedtl.getMessage(),""))) - ){ - mapper.saveElecnoticemst(dto); - mapper.saveElecnoticedtl(dto); - } else if ((Checks.isEmpty(elecnoticedtl.getResultcode())) || (!Checks.checkVal(dto.getResultcode(),""). equals(Checks.checkVal(elecnoticedtl.getResultcode(),"")))) { - mapper.saveElecnoticedtl(dto); - } - } - - return "success"; - } -} diff --git a/mens-api/src/main/java/kr/xit/other/web/OtherController.java b/mens-api/src/main/java/kr/xit/other/web/OtherController.java deleted file mode 100644 index 9836a18..0000000 --- a/mens-api/src/main/java/kr/xit/other/web/OtherController.java +++ /dev/null @@ -1,42 +0,0 @@ -package kr.xit.other.web; - -import io.swagger.v3.oas.annotations.Operation; -import io.swagger.v3.oas.annotations.tags.Tag; -import kr.xit.core.model.ApiResponseDTO; -import kr.xit.core.model.IApiResponse; -import kr.xit.other.service.IOtherService; -import lombok.RequiredArgsConstructor; -import org.springframework.http.MediaType; -import org.springframework.web.bind.annotation.*; - -/** - *
- * description :
- *
- * packageName : kr.xit.other.web
- * fileName    : OtherController
- * author      : jhseo
- * date        : 2024-01-09
- * ======================================================================
- * 변경일         변경자        변경 내용
- * ----------------------------------------------------------------------
- * 2024-01-09    jhseo       최초 생성
- *
- * 
- */ -@Tag(name = "OtherController", description = "외부 Oracle 연계 API") -@RequiredArgsConstructor -@RestController -@RequestMapping("/api/other/v1") -public class OtherController { - private final IOtherService service; - - @Operation(summary = "외부 Oracle 연계 요청", description = "외부 Oracle 연계 요청") - @PostMapping(value = "/merge", produces = MediaType.APPLICATION_JSON_VALUE) - public IApiResponse merge() { - String msg = service.mergeData(); - String errMsg = ""; - if("success".equals(msg)) errMsg = service.mergeData(); - return ApiResponseDTO.success(msg, errMsg); - } -} 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 e79aa7b..0ed8245 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 @@ -2,18 +2,17 @@ package kr.xit.biz.ens.mapper; import java.util.List; import java.util.Optional; + +import org.egovframe.rte.psl.dataaccess.mapper.Mapper; + 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.epost.EPostDTO.EpostTraceResTrackInfo; import kr.xit.biz.ens.model.kakao.KkopayDocBulkDTO.BulkStatus; import kr.xit.biz.ens.model.kakao.KkopayDocDTO.OneTimeToken; import kr.xit.biz.ens.model.kt.KtMmsSendDTO.KtMainSendReqData; -import kr.xit.biz.ens.model.pplus.PplusDTO.PpStatusResMapping; -import kr.xit.biz.ens.model.pplus.PplusDTO.PplusResult; -import org.egovframe.rte.psl.dataaccess.mapper.Mapper; /** *
@@ -363,26 +362,6 @@ public interface IEnsBatchMapper {
      * 
*/ int updateKakaoStatusInfo(final BulkStatus dto); - - - Optional selectPplusSndProcessStatus(final String unitySndngMastrId); - int updatePplusSndStatus(final PpStatusResMapping dto); - - /** - * 등기번호 존재 여부 체크 - * @param t T - * @return int - */ - int selectCountRgistNo(final T t); - int updatePplusRgistNo(final PpStatusResMapping dto); - - /** - * 통합발송상세 ID 목록 조회 - 시작 ~ 종료 등기번호로 - * @param t T - * @return List - */ - List selectPplusUnitySndngDetailIdsByRgistNo(final T t); - int updatePplusDlvrStatusFromEPostByRgistNo(final PplusResult dto); //---------------------------------------------------------------------- // status //---------------------------------------------------------------------- @@ -416,13 +395,6 @@ public interface IEnsBatchMapper { * @return List */ List selectPplusResultTgtsByUnitySndngMstId(final String unitySndngMstId); - - /** - * Post plus 상태 조회 결과 반영 - * @param dto PplusResult - * @return int - */ - int savePplusCntcSndngResult(final PplusResult dto); //---------------------------------------------------------------------- // result //---------------------------------------------------------------------- diff --git a/mens-batch/src/main/java/kr/xit/biz/ens/model/EnsPostPlusDTO.java b/mens-batch/src/main/java/kr/xit/biz/ens/model/EnsPostPlusDTO.java deleted file mode 100644 index 1dddd47..0000000 --- a/mens-batch/src/main/java/kr/xit/biz/ens/model/EnsPostPlusDTO.java +++ /dev/null @@ -1,128 +0,0 @@ -package kr.xit.biz.ens.model; - -import java.io.Serializable; -import lombok.AllArgsConstructor; -import lombok.Data; -import lombok.NoArgsConstructor; -import lombok.experimental.SuperBuilder; - -/** - *
- * description : tb_ens_ Entity DTO
- *
- * packageName : kr.xit.biz.ens.model
- * fileName    : EnsDTO
- * author      : limju
- * date        : 2023-08-31
- * ======================================================================
- * 변경일         변경자        변경 내용
- * ----------------------------------------------------------------------
- * 2023-08-31    limju       최초 생성
- *
- * 
- */ -@Data -@NoArgsConstructor -@AllArgsConstructor -@SuperBuilder -public class EnsPostPlusDTO implements Serializable { - /** - * 통합 발송 마스터 id - */ - private String unitySndngMastrId; - /** - * 통합 발송 상세 id - */ - private String unitySndngDetailId; - /** - * 발송 마스터 id - */ - private String sndngMastrId; - /** - * 발송 상세 id - */ - private String sndngDetailId; - /** - * 시군구 코드 - */ - private String signguCode; - /** - * 과태료 코드 - */ - private String ffnlgCode; - /** - * 서비스 코드 - */ - private String serviceCd; - /** - * 연계 식별 키 - */ - private String conKey; - /** - * 발송 처리 상태 - */ - private String sndngProcessSttus; - - private String masterCols; - private String masterRows; - private String detailCols; - private String detailRows; - - - - - - - - /** - * 발송인 명 - */ - private String senderNm; - /** - * 발송인 우편번호 - */ - private String senderZipNo; - /** - * 발송인 주소 - */ - private String senderAddr; - /** - * 발송인 상세 주소 - */ - private String senderDetailAddr; - /** - * 수취인 일련 번호 - */ - private String receiverSendNo; - /** - * 수취인 명 - */ - private String receiverNm; - /** - * 수취인 우편번호 - */ - private String receiverZipNo; - /** - * 수취인 주소 - */ - private String receiverAddr; - /** - * 수취인 상세 주소 - */ - private String receiverDetailAddr; - /** - * 가변 1 - */ - private String sschnge1; - /** - * 가변 2 - */ - private String sschnge2; - /** - * 가변 3 - */ - private String sschnge3; - - - -} diff --git a/mens-batch/src/main/java/kr/xit/biz/ens/service/EnsBatchAcceptService.java b/mens-batch/src/main/java/kr/xit/biz/ens/service/EnsBatchAcceptService.java index c298ddd..ae002d1 100644 --- a/mens-batch/src/main/java/kr/xit/biz/ens/service/EnsBatchAcceptService.java +++ b/mens-batch/src/main/java/kr/xit/biz/ens/service/EnsBatchAcceptService.java @@ -1,14 +1,22 @@ package kr.xit.biz.ens.service; -import egovframework.com.cmm.util.EgovDateUtil; -import egovframework.com.cmm.util.EgovStringUtil; import java.util.ArrayList; import java.util.List; import java.util.Objects; import java.util.Set; + import javax.validation.ConstraintViolation; import javax.validation.Validation; import javax.validation.Validator; + +import org.apache.commons.lang3.StringUtils; +import org.slf4j.MDC; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Propagation; +import org.springframework.transaction.annotation.Transactional; + +import egovframework.com.cmm.util.EgovDateUtil; +import egovframework.com.cmm.util.EgovStringUtil; import kr.xit.biz.common.ApiConstants; import kr.xit.biz.common.ApiConstants.SndngSeCode; import kr.xit.biz.ens.mapper.IEnsBatchMapper; @@ -19,11 +27,6 @@ import kr.xit.core.service.AbstractService; import kr.xit.core.support.utils.Checks; import kr.xit.core.support.utils.DateUtils; import lombok.RequiredArgsConstructor; -import org.apache.commons.lang3.StringUtils; -import org.slf4j.MDC; -import org.springframework.stereotype.Service; -import org.springframework.transaction.annotation.Propagation; -import org.springframework.transaction.annotation.Transactional; /** *
@@ -212,34 +215,10 @@ public class EnsBatchAcceptService extends AbstractService implements IEnsBatchA
                     }
                     break;
 
-                case E_GREEN:
-                    if(Checks.isEmpty(dto.getAdres())) {
-                        errors.add(String.format("주소는 필수입니다(dto.getAdres[%d] 번째 오류)", idx + 1));
-                    }
-                    if(Checks.isEmpty(dto.getDetailAdres())) {
-                        errors.add(String.format("상세 주소는 필수입니다(dto.getDetailAdres[%d] 번째 오류)",
-                            idx + 1));
-                    }
-                    if(Checks.isEmpty(dto.getZip())) {
-                        errors.add(String.format("우편번호는 필수입니다(dto.getZip[%d] 번째 오류)", idx + 1));
-                    }
-                    break;
-
-                case SMS:
-                    if(Checks.isEmpty(dto.getMoblphonNo())) {
-                        errors.add(String.format("핸드폰 번호는 필수입니다(dto.getMoblphonNo[%d] 번째 오류)",
-                            idx + 1));
-                    }
-                    break;
-
                 //FIXME : KT 데이타 적합성 체크
                 case KT_BC:
                     break;
 
-                //FIXME : Post plus 데이타 적합성 체크
-                case PPLUS:
-                    break;
-
                 default:
                     break;
             }
diff --git a/mens-batch/src/main/java/kr/xit/biz/ens/service/EnsBatchExtractService.java b/mens-batch/src/main/java/kr/xit/biz/ens/service/EnsBatchExtractService.java
index c0e7bc9..b00462d 100644
--- a/mens-batch/src/main/java/kr/xit/biz/ens/service/EnsBatchExtractService.java
+++ b/mens-batch/src/main/java/kr/xit/biz/ens/service/EnsBatchExtractService.java
@@ -5,6 +5,13 @@ import java.io.File;
 import java.io.FileWriter;
 import java.io.IOException;
 import java.util.List;
+
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Propagation;
+import org.springframework.transaction.annotation.Transactional;
+
 import kr.xit.batch.ens.task.cmm.TaskCmmUtils;
 import kr.xit.biz.common.ApiConstants;
 import kr.xit.biz.common.ApiConstants.SndngSeCode;
@@ -14,16 +21,10 @@ import kr.xit.biz.ens.model.cmm.SndngMssageParam;
 import kr.xit.biz.ens.model.cntc.CntcDTO;
 import kr.xit.biz.ens.model.kakao.KkopayDocBulkDTO.BulkSendResponses;
 import kr.xit.biz.ens.model.kt.KtMmsSendDTO.KtMainSendReqData;
-import kr.xit.biz.sms.service.ISmsMessageService;
 import kr.xit.core.exception.BizRuntimeException;
 import kr.xit.core.service.AbstractService;
 import kr.xit.core.support.utils.Checks;
 import lombok.RequiredArgsConstructor;
-import org.apache.commons.lang3.StringUtils;
-import org.springframework.beans.factory.annotation.Value;
-import org.springframework.stereotype.Service;
-import org.springframework.transaction.annotation.Propagation;
-import org.springframework.transaction.annotation.Transactional;
 
 /**
  * 
@@ -51,7 +52,6 @@ public class EnsBatchExtractService extends AbstractService implements
     private String filePost;
 
     private final IEnsBatchMapper mapper;
-    private final ISmsMessageService smsService;
 
     //-----------------------------------------------------------------------------------------------------------------
     // REQUIRES_NEW service method
@@ -95,52 +95,6 @@ public class EnsBatchExtractService extends AbstractService implements
         updateSendSndngMstStatus(mstId, unitySndMstId, SndngSeCode.KAKAO, "카카오 문서 발송요청 실패(발송마스터 데이타 오류)");
     }
 
-    /**
-     * E-GREEN 우편 발송요청 파일 처리
-     *
-     * @param dto EnsDTO.SndngMssageParam
-     */
-    @Override
-    @Transactional(propagation = Propagation.REQUIRES_NEW)
-    public void sendEgreen(final SndngMssageParam dto) {
-        final List list = mapper.selectPostTgts(dto);
-        final String filePath = fileRoot + filePost;
-        final String fileName = list.get(0).getConKey() + ".txt";
-
-        if (!egreenFileWrite(filePath, fileName, list)) {
-            throw BizRuntimeException.create("우편 파일 생성 실패");
-        }
-
-        SndngMssageParam paramDTO = SndngMssageParam.builder()
-            .unitySndngMastrId(list.get(0).getUnitySndngMastrId())
-            .sndngMastrId(list.get(0).getSndngMastrId())
-            .newSndngProcessSttus(list.get(0).getSndngProcessSttus())
-            .build();
-        updateMstTable(paramDTO, SndngSeCode.E_GREEN);
-    }
-
-    /**
-     * SMS 전송 처리 - xit SMS : 별도 서비스 call
-     *
-     * @param dto EnsDTO.SndngMssageParam
-     * @see kr.xit.biz.sms.service.SmsMessageService#sendSmsList(List)
-     */
-    @Override
-    @Transactional(propagation = Propagation.REQUIRES_NEW)
-    public void sendSms(final SndngMssageParam dto) {
-        final List list = mapper.selectSmsSendTgts(dto);
-
-        // Orcale DB - 서비스 분리
-        smsService.sendSmsList(list);
-
-        SndngMssageParam paramDTO = SndngMssageParam.builder()
-            .unitySndngMastrId(list.get(0).getUnitySndngMastrId())
-            .sndngMastrId(list.get(0).getSndngMastrId())
-            .newSndngProcessSttus(list.get(0).getSndngProcessSttus())
-            .build();
-        updateMstTable(paramDTO, SndngSeCode.SMS);
-    }
-
     @Override
     @Transactional(propagation = Propagation.REQUIRES_NEW)
     public void saveKtBcResult(final SndngMssageParam dto, final List sendReqs) {
@@ -185,24 +139,6 @@ public class EnsBatchExtractService extends AbstractService implements
         updateMstTable(paramDTO, seCode);
     }
 
-    /**
-     * Post plus 발송상태 fail 처리
-     * @param unitySndngMastrId
-     * @param status
-     * @param errCode
-     * @param errMsg
-     * @param stsErrMsg
-     */
-    @Transactional(propagation = Propagation.REQUIRES_NEW)
-    public void updatePplusSndngMstFailStatus(final String unitySndngMastrId, final String status, final String errCode, final String errMsg, final String stsErrMsg) {
-        final SndngMssageParam dto = mapper.selectPplusSndProcessStatus(unitySndngMastrId)
-            .orElseThrow(() -> BizRuntimeException.create(stsErrMsg));
-        dto.setNewSndngProcessSttus(StringUtils.defaultString(status, "send-fail"));
-        dto.setErrorCode(errCode);
-        dto.setErrorMssage(errMsg);
-
-        updateMstTable(dto, SndngSeCode.PPLUS);
-    }
     //-----------------------------------------------------------------------------------------------------------------
     // REQUIRES_NEW service method
     //-----------------------------------------------------------------------------------------------------------------
@@ -337,4 +273,5 @@ public class EnsBatchExtractService extends AbstractService implements
         }
         return true;
     }
+
 }
diff --git a/mens-batch/src/main/java/kr/xit/biz/ens/service/EnsBatchMakeService.java b/mens-batch/src/main/java/kr/xit/biz/ens/service/EnsBatchMakeService.java
index 67d5f9a..fb1eb78 100644
--- a/mens-batch/src/main/java/kr/xit/biz/ens/service/EnsBatchMakeService.java
+++ b/mens-batch/src/main/java/kr/xit/biz/ens/service/EnsBatchMakeService.java
@@ -3,6 +3,13 @@ package kr.xit.biz.ens.service;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
+
+import org.slf4j.MDC;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Propagation;
+import org.springframework.transaction.annotation.Transactional;
+
 import kr.xit.biz.common.ApiConstants;
 import kr.xit.biz.common.ApiConstants.SignguCode;
 import kr.xit.biz.common.ApiConstants.SndngSeCode;
@@ -13,11 +20,6 @@ import kr.xit.core.exception.BizRuntimeException;
 import kr.xit.core.service.AbstractService;
 import kr.xit.core.support.utils.Checks;
 import lombok.RequiredArgsConstructor;
-import org.slf4j.MDC;
-import org.springframework.beans.factory.annotation.Value;
-import org.springframework.stereotype.Service;
-import org.springframework.transaction.annotation.Propagation;
-import org.springframework.transaction.annotation.Transactional;
 
 /**
  * 
@@ -197,8 +199,6 @@ public class EnsBatchMakeService extends AbstractService implements IEnsBatchMak
 
         return  switch (SndngSeCode.compare(seCode)) {
             case KAKAO -> mapper.insertKakaoMyDocs(dto);
-            case E_GREEN -> mapper.insertPostSndng(dto);
-            case SMS -> mapper.insertSmsSndng(dto);
             case KT_BC -> {
                 if(SignguCode.TRAFFIC.getCode().equals(dto.getSignguCode())){
                     dto.setUrl(DP_CALLBACK_URL);
@@ -209,7 +209,6 @@ public class EnsBatchMakeService extends AbstractService implements IEnsBatchMak
                 mapper.insertKtBcMastr(dto);
                 yield mapper.insertKtBcDetail(dto);
             }
-            case PPLUS -> mapper.insertPplus(dto);
             default -> throw BizRuntimeException.create(String.format("정의 되지 않은 문서 중개자[%s] 입니다", seCode));
         };
     }
diff --git a/mens-batch/src/main/java/kr/xit/biz/ens/service/EnsBatchSendService.java b/mens-batch/src/main/java/kr/xit/biz/ens/service/EnsBatchSendService.java
index f485a1c..1504c09 100644
--- a/mens-batch/src/main/java/kr/xit/biz/ens/service/EnsBatchSendService.java
+++ b/mens-batch/src/main/java/kr/xit/biz/ens/service/EnsBatchSendService.java
@@ -1,15 +1,27 @@
 package kr.xit.biz.ens.service;
 
-import static kr.xit.core.support.utils.JsonUtils.toObjByObj;
+import static kr.xit.core.support.utils.JsonUtils.*;
 
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.List;
 import java.util.Set;
 import java.util.stream.Collectors;
+
 import javax.validation.ConstraintViolation;
 import javax.validation.Validation;
 import javax.validation.Validator;
+
+import org.apache.commons.collections4.ListUtils;
+import org.apache.commons.lang3.ObjectUtils;
+import org.apache.commons.lang3.StringUtils;
+import org.slf4j.MDC;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.http.HttpMethod;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Propagation;
+import org.springframework.transaction.annotation.Transactional;
+
 import kr.xit.biz.common.ApiConstants;
 import kr.xit.biz.common.ApiConstants.SndngSeCode;
 import kr.xit.biz.ens.cmm.CmmEnsBizUtils;
@@ -26,7 +38,6 @@ import kr.xit.biz.ens.model.kakao.KkopayDocBulkDTO.PropertyBulk;
 import kr.xit.biz.ens.model.kt.KtCommonDTO.ErrorMsg;
 import kr.xit.biz.ens.model.kt.KtCommonDTO.KtCommonResponse;
 import kr.xit.biz.ens.model.kt.KtMmsSendDTO.KtMainSendReqData;
-import kr.xit.biz.ens.model.pplus.PplusDTO.PpCommonResponse;
 import kr.xit.core.exception.BizRuntimeException;
 import kr.xit.core.model.ApiResponseDTO;
 import kr.xit.core.service.AbstractService;
@@ -35,15 +46,6 @@ import kr.xit.core.support.utils.Checks;
 import kr.xit.core.support.utils.DateUtils;
 import lombok.RequiredArgsConstructor;
 import lombok.extern.slf4j.Slf4j;
-import org.apache.commons.collections4.ListUtils;
-import org.apache.commons.lang3.ObjectUtils;
-import org.apache.commons.lang3.StringUtils;
-import org.slf4j.MDC;
-import org.springframework.beans.factory.annotation.Value;
-import org.springframework.http.HttpMethod;
-import org.springframework.stereotype.Service;
-import org.springframework.transaction.annotation.Propagation;
-import org.springframework.transaction.annotation.Transactional;
 
 /**
  * 
@@ -71,8 +73,6 @@ public class EnsBatchSendService extends AbstractService implements IEnsBatchSen
     private String apiKkoBulkSend;
     @Value("${app.contract.kt.api.bulksend}")
     private String apiKtBcBulkSend;
-    @Value("${app.contract.pplus.api.bulksend}")
-    private String apiPplusBulkSend;
 
     @Value("${app.contract.kakao.bulk-max-cnt}")
     private int bulkKkoMaxCnt;
@@ -149,9 +149,6 @@ public class EnsBatchSendService extends AbstractService implements IEnsBatchSen
              */
             case KAKAO -> sendBulkKakaoMyDocs(dto);
             case KT_BC -> sendBulkKtBc(dto);
-            case PPLUS -> sendBulkPplus(dto);
-            case E_GREEN -> extractService.sendEgreen(dto);
-            case SMS -> extractService.sendSms(dto);
             default -> throw BizRuntimeException.create(String.format("정의 되지 않은 문서 중개자[%s] 입니다", seCode));
         }
     }
@@ -447,44 +444,5 @@ public class EnsBatchSendService extends AbstractService implements IEnsBatchSen
             throw BizRuntimeException.create(errors.toString());
         }
     }
-
-
-    /**
-     * 
-     * Post plus 문서 send
-     * @param dto SndngMssageParam
-     * 
- */ - private void sendBulkPplus(final SndngMssageParam dto) { - final String url = apiHost + apiPplusBulkSend; - - //noinspection rawtypes - ApiResponseDTO apiResult = apiWebClient.exchange( - url, - HttpMethod.POST, - dto, - ApiResponseDTO.class, - CmmEnsBizUtils.getHeadeMap()); - - final String mstId = dto.getSndngMastrId(); - - if(ObjectUtils.isNotEmpty(apiResult.getData())) { - PpCommonResponse resDTO = toObjByObj(apiResult.getData(), PpCommonResponse.class); - assert resDTO != null; - - - if(ObjectUtils.isNotEmpty(resDTO) && "OK".equals(resDTO.get결과())){ - extractService.updateSendSndngMstStatus(mstId, resDTO.getUnitySndngMastrId(), SndngSeCode.PPLUS, "[send] Post Plus 실패(발송마스터 데이타 오류)"); - return; - } - extractService.updateSndngMstFailStatus(mstId, SndngSeCode.PPLUS, resDTO.get결과(), resDTO.get비고(), "[send] Post Plus 발송(Accept)요청 실패"); - - - }else{ - //extractService.updateSndngMstFailStatus(mstId, SndngSeCode.PPLUS, "[send] Post Plus 발송(Accept)요청 실패"); - log.error("\n\n\n\n\n#################~~~ ??? 발생할 수 없는 경우 인데 ??? ~~~######################################################"); - throw BizRuntimeException.create("~~~ ??? 발생할 수 없는 경우 인데 ??? ~~~"); - } - } //----------------------------------------------------------------------------------------------------------------- } diff --git a/mens-batch/src/main/java/kr/xit/biz/ens/service/EnsBatchStatusService.java b/mens-batch/src/main/java/kr/xit/biz/ens/service/EnsBatchStatusService.java index a858737..de6843d 100644 --- a/mens-batch/src/main/java/kr/xit/biz/ens/service/EnsBatchStatusService.java +++ b/mens-batch/src/main/java/kr/xit/biz/ens/service/EnsBatchStatusService.java @@ -1,12 +1,19 @@ package kr.xit.biz.ens.service; -import static kr.xit.core.support.utils.JsonUtils.toObjByObj; +import static kr.xit.core.support.utils.JsonUtils.*; import java.util.ArrayList; -import java.util.Arrays; -import java.util.HashMap; import java.util.List; -import java.util.Map; + +import org.apache.commons.collections4.ListUtils; +import org.apache.commons.lang3.StringUtils; +import org.slf4j.MDC; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.http.HttpMethod; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Propagation; +import org.springframework.transaction.annotation.Transactional; + import kr.xit.biz.common.ApiConstants; import kr.xit.biz.common.ApiConstants.SndngSeCode; import kr.xit.biz.ens.cmm.CmmEnsBizUtils; @@ -14,31 +21,15 @@ import kr.xit.biz.ens.mapper.IEnsBatchMapper; import kr.xit.biz.ens.model.EnsDTO; import kr.xit.biz.ens.model.cmm.SndngMssageParam; import kr.xit.biz.ens.model.cntc.CntcDTO; -import kr.xit.biz.ens.model.epost.EPostDTO.EpostTraceRequest; -import kr.xit.biz.ens.model.epost.EPostDTO.EpostTraceResTrackInfo; -import kr.xit.biz.ens.model.epost.EPostDTO.EpostTraceResponse; import kr.xit.biz.ens.model.kakao.KkopayDocAttrDTO.DocStatus; import kr.xit.biz.ens.model.kakao.KkopayDocBulkDTO.BulkStatusRequests; import kr.xit.biz.ens.model.kakao.KkopayDocBulkDTO.BulkStatusResponses; -import kr.xit.biz.ens.model.pplus.PplusDTO.PpStatusRequest; -import kr.xit.biz.ens.model.pplus.PplusDTO.PpStatusResMapping; -import kr.xit.biz.ens.model.pplus.PplusDTO.PpStatusResponse; -import kr.xit.biz.ens.model.pplus.PplusDTO.PplusResult; import kr.xit.core.exception.BizRuntimeException; import kr.xit.core.model.ApiResponseDTO; import kr.xit.core.service.AbstractService; import kr.xit.core.spring.util.ApiWebClientUtil; import kr.xit.core.support.utils.Checks; -import kr.xit.core.support.utils.JsonUtils; import lombok.RequiredArgsConstructor; -import org.apache.commons.collections4.ListUtils; -import org.apache.commons.lang3.StringUtils; -import org.slf4j.MDC; -import org.springframework.beans.factory.annotation.Value; -import org.springframework.http.HttpMethod; -import org.springframework.stereotype.Service; -import org.springframework.transaction.annotation.Propagation; -import org.springframework.transaction.annotation.Transactional; /** *
@@ -63,10 +54,6 @@ public class EnsBatchStatusService extends AbstractService implements IEnsBatchS
     private String apiHost;
     @Value("${app.contract.kakao.api.bulkstatus}")
     private String apiKkoBulkStatus;
-    @Value("${app.contract.pplus.api.bulkstatus}")
-    private String apiPplusBulkStatus;
-    @Value("${app.contract.epost.api.trace}")
-    private String apiEpostTrace;
 
     @Value("${app.contract.kakao.bulk-max-cnt}")
     private int bulkKkoMaxCnt;
@@ -118,12 +105,7 @@ public class EnsBatchStatusService extends AbstractService implements IEnsBatchS
                 case KAKAO:
                     statusKakao(dto);
                     break;
-                case PPLUS:
-                    statusBulkPplus(dto);
-                    break;
                 case KT_BC:
-                case SMS:
-                case E_GREEN:
                     break;
 
                 default:
@@ -200,181 +182,4 @@ public class EnsBatchStatusService extends AbstractService implements IEnsBatchS
             })
         );
     }
-
-    /**
-     * 
-     * 문서중개자 전송후 상태 조회
-     *
-     * @param reqDTO BatchEnsRequest
-     * 
- */ - private void statusBulkPplus(final SndngMssageParam reqDTO) { - final String url = apiHost + apiPplusBulkStatus; - - ApiResponseDTO apiResult = apiWebClient.exchange( - url, - HttpMethod.POST, - PpStatusRequest.builder() - .signguCode(reqDTO.getSignguCode()) - .ffnlgCode(reqDTO.getFfnlgCode()) - .inputCode(reqDTO.getUnitySndngMastrId()) - .build(), - ApiResponseDTO.class, - CmmEnsBizUtils.getHeadeMap()); - - if(apiResult.getData() != null) { - final PpStatusResponse resDTO = JsonUtils.toObjByObj(apiResult.getData(), PpStatusResponse.class); - final String unitySndngMstId = resDTO.get연계식별키(); - // 확인불가 -> 일반 오류상태 msg - //출력대기 -> 제작 전단계 - //출력/봉입/우체국접수중 -> 제작 중 - //제작발송완료 -> 제작 후 우체국접수, 후불결제시 과금대상 - //접수취소 -> 제작 취소 - final String processSttus = resDTO.get상태(); - // 일반|등기|준등기|익일특급|선택등기 - final String dlvr = resDTO.get배달(); - - if("OK".equals(resDTO.get결과())){ - - // 실패 처리 - if(Arrays.asList("확인불가","접수취소").contains(processSttus)){ - extractService.updatePplusSndngMstFailStatus(unitySndngMstId, "send-fail", resDTO.get결과(), processSttus, "[send] Post Plus 발송(Accept)요청 실패"); - return; - } - - PpStatusResMapping resMapDTO = PpStatusResMapping.builder() - .unitySndngMastrId(unitySndngMstId) - .processSttus(processSttus) - .build(); - - // 일반우편 - if("일반".equals(dlvr)){ - if("제작발송완료".equals(processSttus)) resMapDTO.setDlvrSttus("배달완료"); - mapper.updatePplusSndStatus(resMapDTO); - - List rsltTgts = mapper.selectPplusResultTgtsByUnitySndngMstId(unitySndngMstId); - rsltTgts.forEach( unitySndngDetailId -> mapper.savePplusCntcSndngResult( - PplusResult.builder() - .unitySndngDetailId(unitySndngDetailId) - .signguCode(reqDTO.getSignguCode()) - .ffnlgCode(reqDTO.getFfnlgCode()) - .sndngSeCode(SndngSeCode.PPLUS.getCode()) - .dlvrSttus(resMapDTO.getDlvrSttus()) - .rgistNo(null) - .senderData(resDTO.get신청일자()) - .receiveDate(null) - .build() - ) - ); - } - - if(Arrays.asList("등기","준등기","익일특급", "선택등기").contains(dlvr)){ - - // 등기번호 set - setPostPlusRgistNo(resDTO, unitySndngMstId); - // post plus 상태 변경 - mapper.updatePplusSndStatus(resMapDTO); - - // 제작발송완료 -> 종적추적 - if("제작발송완료".equals(processSttus)){ - epostTrace(reqDTO, resDTO); - } - } - - }else{ - extractService.updatePplusSndngMstFailStatus(unitySndngMstId, "send-fail", resDTO.get결과(), resDTO.get비고(), "[send] Post Plus 발송(Accept)요청 실패"); - } - } - } - - /** - * Post plus 등기번호 set - * 등기번호가 없는 경우만 - * -> 반복 호출시 최초에만 등록 하도록 - * @param resDTO - * @param unitySndngMstId - */ - private void setPostPlusRgistNo(PpStatusResponse resDTO, String unitySndngMstId) { - int dlvCnt = Integer.valueOf(resDTO.get발송건수()); - Map pMap = new HashMap<>(); - pMap.put("startRgistNo", resDTO.get시작등기번호()); - pMap.put("endRgistNo", resDTO.get종료등기번호()); - - if(mapper.selectCountRgistNo(pMap) != dlvCnt) { - long startRgistNo = Long.parseLong(resDTO.get시작등기번호()); - long endRgistNo = Long.parseLong(resDTO.get종료등기번호()); - - if(endRgistNo != (startRgistNo + dlvCnt - 1)) { - throw BizRuntimeException.create( - String.format("등기번호 오류(시작등기번호[%s]~종료등기번호[%s] 발송건수[%s])", - startRgistNo, endRgistNo, dlvCnt) - ); - } - - // 등기번호 update - for(int idx = 1; idx <= dlvCnt; idx++) { - mapper.updatePplusRgistNo( - PpStatusResMapping.builder() - .unitySndngMastrId(unitySndngMstId) - .rgistNo(String.valueOf(startRgistNo++)) - .sn(idx) - .build()); - } - } - } - - private void epostTrace(final SndngMssageParam reqDTO, final PpStatusResponse resDTO){ - Map pMap = new HashMap<>(); - pMap.put("startRgistNo", resDTO.get시작등기번호()); - pMap.put("endRgistNo", resDTO.get종료등기번호()); - final List lists = mapper.selectPplusUnitySndngDetailIdsByRgistNo(pMap); - - final String url = apiHost + apiEpostTrace; - lists.forEach( dto -> { - if(Checks.isEmpty(dto.getRgistNo())) return; - ApiResponseDTO apiResult = apiWebClient.exchange( - url, - HttpMethod.POST, - EpostTraceRequest.builder() - .signguCode(reqDTO.getSignguCode()) - .ffnlgCode(reqDTO.getFfnlgCode()) - .rgist(dto.getRgistNo()) - .build(), - ApiResponseDTO.class, - CmmEnsBizUtils.getHeadeMap()); - - if(apiResult.getData() != null) { - final EpostTraceResponse epostResDTO = JsonUtils.toObjByObj(apiResult.getData(), - EpostTraceResponse.class); - - dto.setSndngSeCode(SndngSeCode.PPLUS.getCode()); - dto.setSignguCode(reqDTO.getSignguCode()); - dto.setFfnlgCode(reqDTO.getFfnlgCode()); - - try{ - assert epostResDTO != null; - // 종적추적 결과 set : 실패시 BizRuntimeException - // 배달완료시 시간 set - EpostTraceResTrackInfo traceDTO = epostResDTO.result(); - String statue = traceDTO.getDetaileTrackList().get(traceDTO.getDetaileTrackList().size()-1).getStatue().replace("\n", ""); - - dto.setDlvrSttus(traceDTO.getTrackState()); - dto.setDlvrDetail(statue); - dto.setSenderData(Checks.isNotEmpty(traceDTO.getSenderData()) ? traceDTO.getSenderData() + "0000" : null); - dto.setReceiveDate(traceDTO.getReceiveDate()); - dto.setReceiveName(traceDTO.getReceiveName()); - - mapper.updatePplusDlvrStatusFromEPostByRgistNo(dto); - }catch (BizRuntimeException e){ - //TODO :: error 처리 확인 필요 - dto.setDlvrSttus(e.getMessage()); - dto.setErrorCn(e.getMessage()); - - mapper.updatePplusDlvrStatusFromEPostByRgistNo(dto); - } - mapper.savePplusCntcSndngResult(dto); - } - }); - - } } diff --git a/mens-batch/src/main/java/kr/xit/biz/ens/service/IEnsBatchExtractService.java b/mens-batch/src/main/java/kr/xit/biz/ens/service/IEnsBatchExtractService.java index 5b2c9c5..14a10f9 100644 --- a/mens-batch/src/main/java/kr/xit/biz/ens/service/IEnsBatchExtractService.java +++ b/mens-batch/src/main/java/kr/xit/biz/ens/service/IEnsBatchExtractService.java @@ -1,6 +1,7 @@ package kr.xit.biz.ens.service; import java.util.List; + import kr.xit.biz.common.ApiConstants.SndngSeCode; import kr.xit.biz.ens.model.cmm.SndngMssageParam; import kr.xit.biz.ens.model.kakao.KkopayDocBulkDTO.BulkSendResponses; @@ -29,8 +30,6 @@ public interface IEnsBatchExtractService { // REQUIRES_NEW service method //----------------------------------------------------------------------------------------------------------------- void saveKkoSendResult(final String mstId, String unitySndMstId, final List resList); - void sendEgreen(final SndngMssageParam dto); - void sendSms(final SndngMssageParam dto); void saveKtBcResult(final SndngMssageParam dto, final List sendReqs); diff --git a/mens-batch/src/main/java/kr/xit/biz/sms/mapper/ISmsMessageMapper.java b/mens-batch/src/main/java/kr/xit/biz/sms/mapper/ISmsMessageMapper.java deleted file mode 100644 index 265e7f5..0000000 --- a/mens-batch/src/main/java/kr/xit/biz/sms/mapper/ISmsMessageMapper.java +++ /dev/null @@ -1,29 +0,0 @@ -package kr.xit.biz.sms.mapper; - -import org.egovframe.rte.psl.dataaccess.mapper.Mapper; - -/** - *
- * description : SMS 발송(oracle DB)
- *
- * packageName : kr.xit.biz.sms.mapper
- * fileName    : ISmsMessageMapper
- * author      : limju
- * date        : 2023-06-26
- * ======================================================================
- * 변경일         변경자        변경 내용
- * ----------------------------------------------------------------------
- * 2023-06-26    limju       최초 생성
- *
- * 
- */ -@Mapper -public interface ISmsMessageMapper { - - /** - * sms 발송 데이타 생성 - * @param t status - * @return int - */ - int insertScTran(final T t); -} diff --git a/mens-batch/src/main/java/kr/xit/biz/sms/service/ISmsMessageService.java b/mens-batch/src/main/java/kr/xit/biz/sms/service/ISmsMessageService.java deleted file mode 100644 index 4989bf4..0000000 --- a/mens-batch/src/main/java/kr/xit/biz/sms/service/ISmsMessageService.java +++ /dev/null @@ -1,24 +0,0 @@ -package kr.xit.biz.sms.service; - -import kr.xit.biz.ens.model.EnsDTO; - -import java.util.List; - -/** - *
- * description :
- *
- * packageName : kr.xit.biz.sms.service
- * fileName    : ISmsMessageService
- * author      : limju
- * date        : 2023-06-26
- * ======================================================================
- * 변경일         변경자        변경 내용
- * ----------------------------------------------------------------------
- * 2023-06-26    limju       최초 생성
- *
- * 
- */ -public interface ISmsMessageService { - void sendSmsList(final List list); -} diff --git a/mens-batch/src/main/java/kr/xit/biz/sms/service/SmsMessageService.java b/mens-batch/src/main/java/kr/xit/biz/sms/service/SmsMessageService.java deleted file mode 100644 index 20537ff..0000000 --- a/mens-batch/src/main/java/kr/xit/biz/sms/service/SmsMessageService.java +++ /dev/null @@ -1,41 +0,0 @@ -package kr.xit.biz.sms.service; - -import java.util.List; -import kr.xit.biz.ens.model.EnsDTO; -import kr.xit.biz.sms.mapper.ISmsMessageMapper; -import kr.xit.core.service.AbstractService; -import lombok.RequiredArgsConstructor; -import org.springframework.stereotype.Service; -import org.springframework.transaction.annotation.Transactional; - -/** - *
- * description : xit SMS 발송 서비스 - Oracle 11
- *
- * packageName : kr.xit.biz.sms.service
- * fileName    : SmsMessageService
- * author      : limju
- * date        : 2023-06-26
- * ======================================================================
- * 변경일         변경자        변경 내용
- * ----------------------------------------------------------------------
- * 2023-06-26    limju       최초 생성
- *
- * 
- */ -@RequiredArgsConstructor -@Service -public class SmsMessageService extends AbstractService implements ISmsMessageService { - - private final ISmsMessageMapper mapper; - - /** - * SMS 발송 - xit SMS 발송 테이블 데이타 생성 - * @param list List SMS 발송 목록 - */ - @Override - @Transactional//(propagation = Propagation.REQUIRES_NEW) - public void sendSmsList(List list) { - for(EnsDTO.SmsSndng dto : list) mapper.insertScTran(dto); - } -} diff --git a/mens-batch/src/main/java/kr/xit/biz/sms/web/SmsMessageController.java b/mens-batch/src/main/java/kr/xit/biz/sms/web/SmsMessageController.java deleted file mode 100644 index e08c2be..0000000 --- a/mens-batch/src/main/java/kr/xit/biz/sms/web/SmsMessageController.java +++ /dev/null @@ -1,55 +0,0 @@ -package kr.xit.biz.sms.web; - -import io.swagger.v3.oas.annotations.Operation; -import io.swagger.v3.oas.annotations.tags.Tag; -import java.util.List; -import kr.xit.biz.ens.model.EnsDTO.SmsSndng; -import kr.xit.biz.ens.model.cmm.SndngMssageParam; -import kr.xit.biz.ens.service.EnsBatchExtractService; -import kr.xit.biz.sms.service.ISmsMessageService; -import kr.xit.core.model.ApiResponseDTO; -import kr.xit.core.model.IApiResponse; -import lombok.RequiredArgsConstructor; -import org.springframework.http.MediaType; -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; - -/** - *
- * description :
- *
- * packageName : kr.xit.biz.sms.web
- * fileName    : SmsMessageController
- * author      : limju
- * date        : 2023-10-30
- * ======================================================================
- * 변경일         변경자        변경 내용
- * ----------------------------------------------------------------------
- * 2023-10-30    limju       최초 생성
- *
- * 
- */ -@Tag(name = " SmsMessageController", description = "SMS(xit) 연계 서비스") -@RequiredArgsConstructor -@RestController -@RequestMapping("/batch/ens/sms/v1") -public class SmsMessageController { - private final ISmsMessageService service; - private final EnsBatchExtractService extractService; - - @Operation(summary = "SMS 메세지 연계", description = "SMS 메세지 연계") - @PostMapping(value = "/sendMessages", produces = MediaType.APPLICATION_JSON_VALUE) - public IApiResponse sendMessages(@RequestBody final List lists) { - service.sendSmsList(lists); - return ApiResponseDTO.success(); - } - - @Operation(summary = "SMS 메세지 연계", description = "SMS 메세지 연계") - @PostMapping(value = "/sendMessages2", produces = MediaType.APPLICATION_JSON_VALUE) - public IApiResponse sendMessages2(@RequestBody final SndngMssageParam reqDTO) { - extractService.sendSms(reqDTO); - return ApiResponseDTO.success(); - } -} diff --git a/mens-batch/src/main/resources/config/application-ens.yml b/mens-batch/src/main/resources/config/application-ens.yml index e98bc48..3d6bb2f 100644 --- a/mens-batch/src/main/resources/config/application-ens.yml +++ b/mens-batch/src/main/resources/config/application-ens.yml @@ -23,13 +23,6 @@ app: api: bulksend: /api/ens/kt/v1/mainSend bulkstatus: /api/ens/kt/v1/messageResult - pplus: - api: - bulksend: /api/ens/pplus/v1/accept - bulkstatus: /api/ens/pplus/v1/status - epost: - api: - trace: /api/ens/epost/v1/trace other: api: merge: /api/other/v1/merge diff --git a/mens-batch/src/main/resources/egovframework/mapper/biz/ens-oracle-mapper.xml b/mens-batch/src/main/resources/egovframework/mapper/biz/ens-oracle-mapper.xml deleted file mode 100644 index b3fc167..0000000 --- a/mens-batch/src/main/resources/egovframework/mapper/biz/ens-oracle-mapper.xml +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - /** ens-oracle-mapper|insertScTran-sms 발송 데이타 생성|julim */ - INSERT - INTO sc_tran ( - tr_num, - tr_senddate, - tr_sendstat, - tr_msgtype, - tr_phone, - tr_callback, - tr_msg, - tr_etc1 - ) VALUES ( - sc_tran_seq.nextval, - sysdate, - '0', /* 문자 발송 상태 */ - '0', /* 문자 전송 형태 */ - #{smsRecptnTlphonNo}, /* 문자 수신 전화 번호 */ - #{smsTrnsmitTlphonNo}, /* 문자 송신 전화 번호 */ - #{smsMssage}, /* 문자 메세지 */ - #{sndngDetailId} /* 발송 상세 ID */ - ) - - - - - - diff --git a/mens-core/src/main/java/kr/xit/biz/common/ApiConstants.java b/mens-core/src/main/java/kr/xit/biz/common/ApiConstants.java index c2bc728..ccf22e8 100644 --- a/mens-core/src/main/java/kr/xit/biz/common/ApiConstants.java +++ b/mens-core/src/main/java/kr/xit/biz/common/ApiConstants.java @@ -1,6 +1,7 @@ package kr.xit.biz.common; import java.util.Arrays; + import kr.xit.core.exception.BizRuntimeException; import lombok.Getter; @@ -160,11 +161,8 @@ public class ApiConstants { */ @Getter public enum SndngSeCode { - SMS("SMS", "SMS"), KAKAO("KKO-MY-DOC", "카카오"), - E_GREEN("E-GREEN", "E그린"), KT_BC("KT-BC", "공공알림문자"), - PPLUS("POST-PLUS", "Post Plus") ; private final String code; diff --git a/mens-core/src/main/java/kr/xit/biz/ens/model/epost/EPostDTO.java b/mens-core/src/main/java/kr/xit/biz/ens/model/epost/EPostDTO.java deleted file mode 100644 index d7edc0a..0000000 --- a/mens-core/src/main/java/kr/xit/biz/ens/model/epost/EPostDTO.java +++ /dev/null @@ -1,308 +0,0 @@ -package kr.xit.biz.ens.model.epost; - -import com.fasterxml.jackson.annotation.JsonInclude; -import io.swagger.v3.oas.annotations.media.Schema; -import io.swagger.v3.oas.annotations.media.Schema.RequiredMode; -import java.util.List; -import javax.validation.constraints.Size; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; -import kr.xit.biz.ens.model.cmm.CmmEnsRequestDTO; -import kr.xit.core.exception.BizRuntimeException; -import kr.xit.core.model.IApiResponse; -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Data; -import lombok.EqualsAndHashCode; -import lombok.NoArgsConstructor; -import lombok.experimental.SuperBuilder; -import org.apache.commons.lang3.ObjectUtils; - -/** - *
- * description : EPost DTO
- *               - 우편물 종적 추적
- *                 Request : {@link EpostTraceRequest}
- *                 Response : {@link EpostTraceResponse}
- * packageName : kr.xit.biz.ens.model.epost
- * fileName    : EPostDTO
- * author      : limju
- * date        : 2023-10-04
- * ======================================================================
- * 변경일         변경자        변경 내용
- * ----------------------------------------------------------------------
- * 2023-10-04    limju       최초 생성
- *
- * 
- */ -public class EPostDTO { - /** - *
-     * EPost 우편물 종적 추적 DTO
-     * Request: EpostTraceRequest
-     * Response: EpostTraceResponse
-     * 
- */ - @Schema(name = "EpostTraceRequest", description = "EPost 종적추적 요청 DTO") - @Data - @NoArgsConstructor - @AllArgsConstructor - @SuperBuilder - @JsonInclude(JsonInclude.Include.NON_NULL) - @EqualsAndHashCode(callSuper = false) - public static class EpostTraceRequest extends CmmEnsRequestDTO { - - /** - *
-         * 공인데이터포털에서 발급받은 인증키(URL Encode)
-         * 
- */ - @Schema(requiredMode = RequiredMode.REQUIRED, title = "인증키", example = " ") - @Size(min = 30, max = 100, message = "apiKey는 필수 입니다.") - private String serviceKey; - - /** - *
-         * 등기번호 - 13자리
-         * 
- */ - @Schema(requiredMode = RequiredMode.REQUIRED, title = "등기번호", example = "1900472677718|1900472677695") - @Size(min = 13, max = 13, message = "등기번호는 필수 입니다(13자리)") - private String rgist; - } - - /** - *
-     * EPost 우편물 종적 추적 결과 DTO
-     * 
- */ - @Schema(name = "EpostTraceResponse", description = "EPost 종적추적 요청 결과 DTO") - @Data - @NoArgsConstructor - @AllArgsConstructor - @XmlAccessorType(XmlAccessType.FIELD) - @XmlRootElement(name = "response") - @Builder - public static class EpostTraceResponse implements IApiResponse { - - @Schema(requiredMode = RequiredMode.REQUIRED) - @XmlElement(name = "header") - private EpostTraceResHeader header; - - @Schema(requiredMode = RequiredMode.REQUIRED) - @XmlElement(name = "trackInfo") - private EpostTraceResTrackInfo trackInfo; - - public EpostTraceResTrackInfo result(){ - if("N".equals(this.header.successYN)){ - throw BizRuntimeException.create(this.header.errorMessage); - } - - String date = trackInfo.getDetaileTrackList().get(trackInfo.getDetaileTrackList().size()-1).getDate(); - String time = trackInfo.getDetaileTrackList().get(trackInfo.getDetaileTrackList().size()-1).getTime(); - - // 배달 완료시 배달시간 set - if(ObjectUtils.isNotEmpty(date)){ - this.trackInfo.setReceiveDate(date.replace("-", "") + time.replace(":", "")); - } - return this.trackInfo; - } - } - - /** - *
-     * EPost 우편물 종적 추적 결과 header DTO
-     * 
- */ - @Schema(name = "EpostTraceResHeader", description = "EPost 종적추적 요청 결과 header DTO") - @Data - @NoArgsConstructor - @AllArgsConstructor - @XmlAccessorType(XmlAccessType.FIELD) - @XmlRootElement(name = "header") - public static class EpostTraceResHeader { - - /** - *
-         * API 요청 등기 번호 : 필수 - 13자리
-         * 
- */ - @Schema(requiredMode = RequiredMode.REQUIRED, title = "등기번호") - private String requestRegiNo; - - /** - *
-         * 응답시간 : 필수 - 20 자리
-         * yyyy-mm-dd HH:mi:ss
-         * 
- */ - @Schema(requiredMode = RequiredMode.REQUIRED, title = "응답시간") - private String responseTime; - - /** - *
-         * 성공여부 : 필수 - Y|N
-         * 
- */ - @Schema(requiredMode = RequiredMode.REQUIRED, title = "성공여부") - private String successYN; - - /** - *
-         * 에러메세지 : max 100
-         * 
- */ - @Schema(requiredMode = RequiredMode.AUTO, title = "에러메세지") - private String errorMessage; - } - - /** - *
-     * EPost 우편물 종적 추적 결과 trackInfo DTO
-     * 
- */ - @Schema(name = "EpostTraceResTrackInfo", description = "EPost 종적추적 요청 결과 trackInfo DTO") - @Data - @NoArgsConstructor - @AllArgsConstructor - @XmlAccessorType(XmlAccessType.FIELD) - @XmlRootElement(name = "trackInfo") - @Builder - public static class EpostTraceResTrackInfo { - - /** - *
-         * 등기번호 : 필수 - 13자리
-         * 조회된 등기번호
-         * 
- */ - @Schema(requiredMode = RequiredMode.REQUIRED, title = "등기번호") - private String regiNo; - - /** - *
-         * 보낸 사람 : 필수 - max 50
-         * 발신인 명
-         * 
- */ - @Schema(requiredMode = RequiredMode.REQUIRED, title = "보낸 사람") - private String senderName; - - /** - *
-         * 보낸 날자 : 필수 - 10자리
-         * 발신일자 yyyy-mm-dd
-         * 
- */ - @Schema(requiredMode = RequiredMode.REQUIRED, title = "보낸 날자") - private String senderData; - - /** - *
-         * 받는 사람 : 필수 - max 50
-         * 
- */ - @Schema(requiredMode = RequiredMode.REQUIRED, title = "받는 사람") - private String receiveName; - - /** - *
-         * 받은 날자 : 필수 - 10자리
-         * 수신일자 yyyy-mm-dd
-         * 
- */ - @Schema(requiredMode = RequiredMode.REQUIRED, title = "받은 날자") - private String receiveDate; - - /** - *
-         * 배달상태: 필수 - max 10
-         * 배달완로|미배달
-         * 
- */ - @Schema(requiredMode = RequiredMode.REQUIRED, title = "배달 상태") - private String trackState; - - /** - *
-         * 서비스 종류: 필수 - max 10
-         * 국제우편인 경우에 해당 서비스 종류가 표기 : EMS
-         * 
- */ - @Schema(requiredMode = RequiredMode.REQUIRED, title = "서비스 종류") - private String expressType; - - @Schema(requiredMode = RequiredMode.REQUIRED) - private List detaileTrackList; - - /** - *
-         * EPost 우편물 종적 추적 결과 detaileTrackList DTO
-         * 
- */ - @Schema(name = "EpostTraceResDtlTrack", description = "EPost 종적추적 요청 결과 detaileTrackList DTO") - @Data - @NoArgsConstructor - @AllArgsConstructor - @XmlAccessorType(XmlAccessType.FIELD) - @XmlRootElement(name = "detaileTrackList") - public static class EpostTraceResDtlTrack { - /** - *
-             * 정렬순서 : 필수 - 1자리
-             * 배송 진행 사항에 대한 정렬 순서
-             * 
- */ - @Schema(requiredMode = RequiredMode.REQUIRED, title = "정렬 순서") - private String sortNo; - - /** - *
-             * 처리일 : 필수 - 10자리
-             * 배송진행 처리일 yyyy-mm-dd
-             * 
- */ - @Schema(requiredMode = RequiredMode.REQUIRED, title = "처리일") - private String date; - - /** - *
-             * 처리시간 : 필수 - 5자리
-             * 배송진행 처리시간 mi:ss
-             * 
- */ - @Schema(requiredMode = RequiredMode.REQUIRED, title = "처리 시간") - private String time; - - /** - *
-             * 처리상태 : 필수 - max 10
-             * 배송진행 처리상태 접수
-             * 
- */ - @Schema(requiredMode = RequiredMode.REQUIRED, title = "처리 상태") - private String statue; - - /** - *
-             * 처리장소 : 필수
-             * 배송진행 처리장소 접수
-             * 
- */ - @Schema(requiredMode = RequiredMode.REQUIRED, title = "처리 장소") - private String location; - - /** - *
-             * 상세설명 : 필수 - max 500
-             * 배송진행  상세설명 - 국제우편인 경우 상세한 설명 표기
-             * 
- */ - @Schema(requiredMode = RequiredMode.REQUIRED, title = "상세 설명") - private String remark; - - } - } -} diff --git a/mens-core/src/main/java/kr/xit/biz/ens/model/pplus/PplusDTO.java b/mens-core/src/main/java/kr/xit/biz/ens/model/pplus/PplusDTO.java deleted file mode 100644 index 373ffcb..0000000 --- a/mens-core/src/main/java/kr/xit/biz/ens/model/pplus/PplusDTO.java +++ /dev/null @@ -1,820 +0,0 @@ -package kr.xit.biz.ens.model.pplus; - -import com.fasterxml.jackson.annotation.JsonInclude; -import io.swagger.v3.oas.annotations.media.Schema; -import io.swagger.v3.oas.annotations.media.Schema.RequiredMode; -import java.io.Serializable; -import javax.validation.constraints.Size; -import kr.xit.biz.ens.model.cmm.CmmEnsRequestDTO; -import kr.xit.core.model.IApiResponse; -import lombok.AllArgsConstructor; -import lombok.Data; -import lombok.EqualsAndHashCode; -import lombok.Getter; -import lombok.NoArgsConstructor; -import lombok.Setter; -import lombok.experimental.SuperBuilder; -import org.apache.commons.lang3.StringUtils; -import org.hibernate.validator.constraints.NotEmpty; - -/** - *
- * description : Postopia(Postplus) DTO
- *               - 우편제작 접수 요청
- *                 Request :
- *                 Response : {@link PpCommonResponse}
- *               - 우편제작 상태 조회
- *                 Request : {@link PpStatusRequest}
- *                 Response : {@link PpStatusResponse}
- * packageName : kr.xit.biz.ens.model.pplus
- * fileName    : PplusDTO
- * author      : limju
- * date        : 2023-10-04
- * ======================================================================
- * 변경일         변경자        변경 내용
- * ----------------------------------------------------------------------
- * 2023-10-04    limju       최초 생성
- *
- * 
- */ -public class PplusDTO { - /** - *
-     * Postplus 우편제작 접수 요청 결과 DTO
-     * 성공 : 결과 - "OK"
-     * 
- */ - @Schema(name = "PpAcceptResponse", description = "Postplus 우편제작 접수 요청 결과 DTO") - @Getter - @NoArgsConstructor - @AllArgsConstructor - @SuperBuilder - @JsonInclude(JsonInclude.Include.NON_NULL) - public static class PpCommonResponse implements IApiResponse { - - /** - *
-         * 결과
-         * 처리결과 코드 OK 또는 ERROR
-         * 
- */ - @Schema(requiredMode = RequiredMode.REQUIRED) - private String 결과; - - /** - *
-         * 비고
-         * 처리결과 실패인 경우 에러 메시지
-         * 
- */ - @Schema(requiredMode = RequiredMode.REQUIRED) - private String 비고; - - @Setter - private String unitySndngMastrId; - } - - /** - *
-     * Postplus 우편제작 접수 요청 Data Master DTO
-     * 
- */ - @Schema(name = "PpAcceptReqDataMst", description = "Postplus 우편제작 접수 요청 Data master DTO") - @Data - @NoArgsConstructor - @AllArgsConstructor - @SuperBuilder - @JsonInclude(JsonInclude.Include.NON_NULL) - public static class PpAcceptReqDataMst { - //----------------------------------------------------------------------- - // 필수 - //----------------------------------------------------------------------- - /** - *
-         * 버전 : v1.10
-         * 
- */ - @Schema(requiredMode = RequiredMode.REQUIRED, title = "버전", example = "v1.10") - @NotEmpty(message = "버전은 필수 입니다") - private final String 버전 = "v1.10"; - - /** - *
-         * 테스트여부 : default "N" - 인쇄 직전 단계까지 진행
-         * 
- */ - @Schema(requiredMode = RequiredMode.REQUIRED, title = "테스트여부", example = "N") - @NotEmpty(message = "테스트여부는 필수 입니다(Y|N)") - private final String 테스트여부 = "N"; - - /** - *
-         * 서비스 : PST - 우편, SMS - 문자, KKO - 카카오톡
-         * 
- */ - @Schema(requiredMode = RequiredMode.REQUIRED, title = "서비스", example = "PST") - @NotEmpty(message = "서비스 코드는 필수 입니다(PST)") - private final String 서비스 = "PST"; - - /** - *
-         * 연계식별키 : 사용자 지정 unique key
-         * max : 40byte
-         * 
- */ - @Schema(requiredMode = RequiredMode.REQUIRED, title = "연계식별키", example = " ") - @Size(min = 5, max = 40, message = "연계식별키는 필수입니다(max:40)") - private String 연계식별키; - - /** - *
-         * 봉투 : 소봉투|대봉투|접착시|엽서
-         * 소봉투/대봉투는 A4(210*297) 기준
-         * 접착식이 첨부파일의 경우 주소가 포함되어야 하며 '주소페이지유무' 항목이 'Y여야 합니다.
-         * 접착식이 템플릿의 경우는 data에 주소가 명시되어야 합니다.
-         * 
- */ - @Schema(requiredMode = RequiredMode.REQUIRED, title = "봉투", example = "소봉투") - @NotEmpty(message = "봉투는 필수입니다(소봉투|대봉투|접착시|엽서)") - private String 봉투; - - /** - *
-         * 봉투창 : 이중창|단창|무창
-         * 소봉투(이중창,무창) 대봉투(단창,무창) 접착식(공백), 엽서(공백)
-         * 무창은 사전협의가 필요합니다.
-         * 
- */ - @Schema(requiredMode = RequiredMode.REQUIRED, title = "봉투창", example = "이중창") - @NotEmpty(message = "봉투창은 필수입니다(이중창|단창|무창)") - private String 봉투창; - - /** - *
-         * 흑백칼라 : 흑백|칼라
-         * 
- */ - @Schema(requiredMode = RequiredMode.REQUIRED, title = "흑백칼라", example = "흑백") - @NotEmpty(message = "흑백칼라는 필수입니다(흑백|칼라)") - private String 흑백칼라; - - /** - *
-         * 단면양면 : 단면|양면
-         * 접착식 경우 페이지수가 2매인 경우는 양면인쇄 됩니다.
-         * 
- */ - @Schema(requiredMode = RequiredMode.REQUIRED, title = "단면양면", example = "단면") - @NotEmpty(message = "단면양면은 필수입니다(단면|양면)") - private String 단면양면; - - /** - *
-         * 배달 : 일반|등기|준등기|악일특급|선택등기
-         * 
- */ - @Schema(requiredMode = RequiredMode.REQUIRED, title = "배달", example = "일반") - @NotEmpty(message = "배달은 필수입니다(일반|등기|준등기|악일특급|선택등기)") - private String 배달; - - /** - *
-         * 템플릿출력여부 : 템플릿코드 존재시 Y
-         * 
- */ - @Schema(requiredMode = RequiredMode.REQUIRED, title = "템플릿코드", example = "N") - @NotEmpty(message = "템플릿출력여부는 필수입니다(Y|N)") - private final String 템플릿출력여부 = StringUtils.isEmpty(this.템플릿코드) ? "N" : "Y"; - - /** - *
-         * 여백생성유무
-         * Y: 첨부파일 내용문을 자동으로 축소
-         * 소봉투는 봉입 바코드 추가위해 왼쪽 여백 필요
-         * 프린터기를 이용하여 출력하므로 상하좌우의 margin이 필요
-         *  - 대봉투의 경우 상 8mm, 하좌우 5mm의 margin이 필요
-         *  - 소봉투의 경우 상 8mm, 하우 5mm, 좌 17mm의 margin이 필요
-         * 
- */ - @Schema(requiredMode = RequiredMode.REQUIRED, title = "여백생성유무", example = "N") - @NotEmpty(message = "여백생성유무는 필수입니다(Y|N)") - private final String 여백생성유무 = "N"; - - /** - *
-         * 주소페이지유무
-         * 주소페이지가 첨부파일에 포함 되어있으면 Y
-         * 주소페이지 생성이 필요하면 N
-         * 
- */ - @Schema(requiredMode = RequiredMode.REQUIRED, title = "여백생성유무", example = "N") - @NotEmpty(message = "주소페이지유무는 필수입니다(Y|N)") - private final String 주소페이지유무 = "N"; - - /** - *
-         * 맞춤자제유무
-         * 
- */ - @Schema(requiredMode = RequiredMode.REQUIRED, title = "맞춤자제유무", example = "N") - @NotEmpty(message = "맞춤자제유무는 필수입니다(Y|N)") - private final String 맞춤자제유무 = "N"; - - /** - *
-         * 메일머지유무
-         * Y 일경우 템플릿코드 필수
-         * 
- */ - @Schema(requiredMode = RequiredMode.REQUIRED, title = "메일머지유무", example = "N") - @NotEmpty(message = "메일머지유무는 필수입니다(Y|N)") - private final String 메일머지유무 = "N"; - - /** - *
-         * 동봉물유무
-         * Y 일경우 템플릿코드 필수
-         * 
- */ - @Schema(requiredMode = RequiredMode.REQUIRED, title = "동봉물유무", example = "N") - @NotEmpty(message = "동봉물유무는 필수입니다(Y|N)") - private final String 동봉물유무 = "N"; - - /** - *
-         * 반송여부
-         * 반송불필요: N
-         * 반송필요: Y (반송요금 별도 협의후 이용)
-         * 
- */ - @Schema(requiredMode = RequiredMode.REQUIRED, title = "반송여부유무", example = "N") - @NotEmpty(message = "반송여부는 필수입니다(Y|N)") - //private final String 반송여부 = "N"; - private final String[] 반송여부 = new String[]{"Y", "N"}; - - /** - *
-         * 스테이플러유무
-         * 협의 후 사용 가능합니다.
-         * 
- */ - @Schema(requiredMode = RequiredMode.REQUIRED, title = "스테이플러유무", example = "N") - @NotEmpty(message = "스테이플러유무는 필수입니다(Y|N)") - private final String 스테이플러유무 = "N"; - - /** - *
-         * 발송인명
-         * 
- */ - @Schema(requiredMode = RequiredMode.REQUIRED, title = "발송인명", example = "포스토피아") - @NotEmpty(message = "발송인명은 필수입니다") - private String 발송인명; - - /** - *
-         * 발송인우편번호
-         * 
- */ - @Schema(requiredMode = RequiredMode.REQUIRED, title = "발송인우편번호", example = "05048") - @NotEmpty(message = "발송인우편번호는 필수입니다") - private String 발송인우편번호; - - /** - *
-         * 발송인주소
-         * 
- */ - @Schema(requiredMode = RequiredMode.REQUIRED, title = "발송인주소", example = "서울특별시 광진구 강변로역2") - @NotEmpty(message = "발송인주소는 필수입니다") - private String 발송인주소; - - /** - *
-         * 발송인상세주소
-         * 
- */ - @Schema(requiredMode = RequiredMode.REQUIRED, title = "발송인상세주소", example = "구의동, 서울광진우체국") - @NotEmpty(message = "발송인상세주소는 필수입니다") - private String 발송인상세주소; - //----------------------------------------------------------------------- - - /** - *
-         * 템플릿코드 : 고객협의 후 포스토피아에서 템플릿 설정, 발급
-         * 
- */ - @Schema(requiredMode = RequiredMode.AUTO, title = "템플릿코드", example = " ") - private String 템플릿코드; - - /** - *
-         * 수취인수
-         * 미입력시 주소록개수 참조
-         * 입력시 주소록개수와 같을시만 발송
-         * 
- */ - @Schema(requiredMode = RequiredMode.AUTO, title = "수취인수", example = " ") - private Integer 수취인수; - - /** - *
-         * 동봉물페이지수
-         * 동봉물 존재시 동봉물의 페이지수 기재
-         * 
- */ - @Schema(requiredMode = RequiredMode.AUTO, title = "동봉물페이지수", example = " ") - private Integer 동봉물페이지수; - - /** - *
-         * 로고 파일
-         * 미입력시 로고가 없거나 템플릿에 포함되어 있음
-         * 협의 후 사용 가능합니다.
-         * 
- */ - @Schema(requiredMode = RequiredMode.AUTO, title = "로고파일", example = " ") - private String 로고파일; - - /** - *
-         * 발송인전화번호
-         * 준등기/등기/익일특급/선택등기 발송시 필수
-         * 
- */ - @Schema(requiredMode = RequiredMode.AUTO, title = "발송인전화번호", example = "010-XXXX-XXXX") - private String 발송인전화번호; - } - - /** - *
-     * Postplus 우편제작 접수 요청 Data Detail DTO
-     * 
- */ - @Schema(name = "PpAcceptReqDataDtl", description = "Postplus 우편제작 접수 요청 Data detail DTO") - @Data - @NoArgsConstructor - @AllArgsConstructor - @SuperBuilder - @JsonInclude(JsonInclude.Include.NON_NULL) - public static class PpAcceptReqDataDtl { - //----------------------------------------------------------------------- - // 필수 - //----------------------------------------------------------------------- - /** - *
-         * 순번 : "1" 부터 시작
-         * 
- */ - @Schema(requiredMode = RequiredMode.REQUIRED, title = "순번", example = "1") - @NotEmpty(message = "순번은 필수입니다") - private String 순번; - - /** - *
-         * 이름 : 수취인명
-         * 
- */ - @Schema(requiredMode = RequiredMode.REQUIRED, title = "이름", example = "홍길동") - @NotEmpty(message = "이름은 필수입니다") - private String 이름; - - /** - *
-         * 우편번호 : 수취인 우편번호
-         * 
- */ - @Schema(requiredMode = RequiredMode.REQUIRED, title = "우편번호", example = "05048") - @NotEmpty(message = "우편번호는 필수입니다") - private String 우편번호; - - /** - *
-         * 주소 : 수취인 주소
-         * 상세주소 포함 최대 200자
-         * 상세주소를 포함하지 않는 경우 최대 100자
-         * 
- */ - @Schema(requiredMode = RequiredMode.REQUIRED, title = "주소", example = "서울특별시 광진구 강변역로2") - @Size(min = 5, max = 200, message = "주소는 필수입니다(max:200)") - private String 주소; - - - //----------------------------------------------------------------------- - /** - *
-         * 상세주소 : 수취인 주소
-         * 주소에 포함된 경우 상세주소는 공백
-         * 
- */ - @Schema(requiredMode = RequiredMode.AUTO, title = "상세주소", example = "서울광진우체국 B동 4층") - private String 상세주소; - - /** - *
-         * 전화번호 : 수취인 전화번호(준등기/등기/익일특급/선택등기 발송시 필수)
-         * 
- */ - @Schema(requiredMode = RequiredMode.AUTO, title = "전화번호", example = " ") - private String 전화번호; - - /** - *
-         * 첨부파일
-         * 
- */ - @Schema(requiredMode = RequiredMode.AUTO, title = "첨부파일", example = " ") - private String 첨부파일; - - /** - *
-         * 이미지갯수 : 수취인별 이미지파일의 개수
-         * 오류시 정상 발송 불가
-         * 여러 파일 첨부시 전체파일을 1개의 ZIP파일로 압축하여 pstFile로 전송
-         * 
- */ - @Schema(requiredMode = RequiredMode.AUTO, title = "이미지갯수", example = " ") - private Integer 이미지갯수; - - /** - *
-         * 이미지1 파일명
-         * 
- */ - @Schema(requiredMode = RequiredMode.AUTO, title = "이미지1", example = " ") - private String 이미지1; - - /** - *
-         * 이미지2 파일명
-         * 
- */ - @Schema(requiredMode = RequiredMode.AUTO, title = "이미지2", example = " ") - private String 이미지2; - - /** - *
-         * 이미지3 파일명
-         * 
- */ - @Schema(requiredMode = RequiredMode.AUTO, title = "이미지3", example = " ") - private String 이미지3; - - /** - *
-         * 가변 : 최대 200개 까지
-         * 
- */ - } - - /** - *
-     * Postplus 우편제작 상태 조회 요청 DTO
-     * Request: PpStatusRequest
-     * Response: PpStatusResponse
-     * 
- */ - @Schema(name = "PpStatusRequest", description = "Postplus 우편제작 상태 조회 요청 DTO") - @Data - @NoArgsConstructor - @AllArgsConstructor - @SuperBuilder - @JsonInclude(JsonInclude.Include.NON_NULL) - @EqualsAndHashCode(callSuper = false) - public static class PpStatusRequest extends CmmEnsRequestDTO { - - /** - *
-         * apiKey
-         * 
- */ - @Schema(requiredMode = RequiredMode.REQUIRED, title = "apiKey", example = " ") - @NotEmpty(message = "apiKey는 필수 입니다.") - private String apiKey; - - /** - *
-         * 우편 제작 요청 연계 식별키
-         * 
- */ - @Schema(requiredMode = RequiredMode.REQUIRED, title = "우편제작요청연계식별키", example = "TEST20230221_000001") - @NotEmpty(message = "우편 제작 요청 연계 식별키는 필수 입니다.") - private String inputCode; - } - - /** - *
-     * Postplus 우편제작 상태 조회 결과 DTO
-     * 성공 :
-     * 
- */ - @Schema(name = "PpStatusResponse", description = "Postplus 우편제작 상태 조회 결과 DTO") - @Getter - @NoArgsConstructor - @AllArgsConstructor - @SuperBuilder - @JsonInclude(JsonInclude.Include.NON_NULL) - public static class PpStatusResponse extends PpCommonResponse { - //--------------------------------------------------------- - // 필수 - //--------------------------------------------------------- - /** - *
-         * 신청일자 : YYYYMMDD0000
-         * 우편 제작 요청 접수일
-         * 
- */ - @Schema(requiredMode = RequiredMode.REQUIRED) - private String 신청일자; - - /** - *
-         * 봉투 : 소봉투|대봉투|접착시|엽서
-         * 
- */ - @Schema(requiredMode = RequiredMode.REQUIRED) - private String 봉투; - - /** - *
-         * 배달 : 일반|등기|준등기|악일특급|선택등기
-         * 
- */ - @Schema(requiredMode = RequiredMode.REQUIRED) - private String 배달; - - /** - *
-         * 흑백칼라 : 흑백|칼라
-         * 
- */ - @Schema(requiredMode = RequiredMode.REQUIRED) - private String 흑백칼라; - - /** - *
-         * 단면양면 : 단면|양면
-         * 
- */ - @Schema(requiredMode = RequiredMode.REQUIRED) - private String 단면양면; - - /** - *
-         * 발송건수
-         * 
- */ - @Schema(requiredMode = RequiredMode.REQUIRED) - private Integer 발송건수; - - /** - *
-         * 상태: 출력대기|출력|봉입|우체국접수중|제작발송완료|접수취소|확인불가
-         * 확인불가 -> 일반 오류상태 msg
-         * 출력대기 -> 제작 전단계
-         * 출력/봉입/우체국접수중 -> 제작 중
-         * 제작발송완료 -> 제작 후 우체국접수, 후불결제시 과금대상
-         * 접수취소 -> 제작 취소
-         * 
- */ - @Schema(requiredMode = RequiredMode.REQUIRED) - private String 상태; - - /** - *
-         * 연계식별키 : 우편 제작 요청 연계 식별키
-         * 
- */ - @Schema(requiredMode = RequiredMode.REQUIRED) - private String 연계식별키; - //--------------------------------------------------------- - - /** - *
-         * 시작등기번호 : 등기의 경우 표기
-         * 
- */ - @Schema(requiredMode = RequiredMode.AUTO) - private String 시작등기번호; - - /** - *
-         * 종료등기번호 : 등기의 경우 표기
-         * 
- */ - @Schema(requiredMode = RequiredMode.AUTO) - private String 종료등기번호; - } - - @Data - @NoArgsConstructor - @AllArgsConstructor - @SuperBuilder - public static class BatchAcceptRequest implements Serializable { - /** - * 통합 발송 마스터 id - */ - private String unitySndngMastrId; - /** - * 통합 발송 상세 id - */ - private String unitySndngDetailId; - /** - * 발송 마스터 id - */ - private String sndngMastrId; - /** - * 발송 상세 id - */ - private String sndngDetailId; - /** - * 시군구 코드 - */ - private String signguCode; - /** - * 과태료 코드 - */ - private String ffnlgCode; - /** - * 서비스 코드 - */ - private String serviceCd; - /** - * 연계 식별 키 - */ - private String conKey; - /** - * 발송 처리 상태 - */ - private String sndngProcessSttus; - - private String masterCols; - private String masterRows; - private String detailCols; - private String detailRows; - - - - - - - - /** - * 발송인 명 - */ - private String senderNm; - /** - * 발송인 우편번호 - */ - private String senderZipNo; - /** - * 발송인 주소 - */ - private String senderAddr; - /** - * 발송인 상세 주소 - */ - private String senderDetailAddr; - /** - * 수취인 일련 번호 - */ - private String receiverSendNo; - /** - * 수취인 명 - */ - private String receiverNm; - /** - * 수취인 우편번호 - */ - private String receiverZipNo; - /** - * 수취인 주소 - */ - private String receiverAddr; - /** - * 수취인 상세 주소 - */ - private String receiverDetailAddr; - /** - * 가변 1 - */ - private String sschnge1; - /** - * 가변 2 - */ - private String sschnge2; - /** - * 가변 3 - */ - private String sschnge3; - - - - } - - @Schema(name = "PpStatusResMapping", description = "Postplus 우편제작 상태 조회 결과 Mapping DTO") - @Data - @NoArgsConstructor - @AllArgsConstructor - @SuperBuilder - public static class PpStatusResMapping { - /** - *
-         * 연계식별키 : 우편 제작 요청 연계 식별키
-         * 
- */ - private String unitySndngMastrId; - - /** - * 순번 - */ - private Integer sn; - - /** - *
-         * 상태: 출력대기|출력|봉입|우체국접수중|제작발송완료|접수취소|확인불가
-         * 확인불가 -> 일반 오류상태 msg
-         * 출력대기 -> 제작 전단계
-         * 출력/봉입/우체국접수중 -> 제작 중
-         * 제작발송완료 -> 제작 후 우체국접수, 후불결제시 과금대상
-         * 접수취소 -> 제작 취소
-         * 
- */ - private String processSttus; - - /** - *
-         * 배달상태
-         * 
- */ - private String dlvrSttus; - - /** - *
-         * 등기번호
-         * 
- */ - private String rgistNo; - - /** - *
-         * 배달상세
-         * 종적 조회 연계 detaileTrackList 마지막 statue : 미배달 주소불명 (반송불요, 1개월 보관)
-         * 
- */ - private String dlvrDetail; - - } - - - @Schema(name = "PplusResult", description = "Postplus 상태 조회 결과 Mapping DTO") - @Data - @NoArgsConstructor - @AllArgsConstructor - @SuperBuilder - @EqualsAndHashCode(callSuper = true) - public static class PplusResult extends PpStatusResMapping { - /** - *
-         * 통합발송 상세ID
-         * 
- */ - private String unitySndngDetailId; - - private String sndngSeCode; - - /** - * 시군구 코드 - */ - private String signguCode; - /** - * 과태료 코드 - */ - private String ffnlgCode; - - /** - *
-         * 보낸 날자 : 필수 - 10자리
-         * 발신일자 yyyy-mm-dd
-         * 
- */ - private String senderData; - - /** - *
-         * 받는 사람 : 필수 - max 50
-         * 
- */ - private String receiveName; - - /** - *
-         * 받은 날자 : 필수 - 10자리
-         * 수신일자 yyyy-mm-dd
-         * 
- */ - private String receiveDate; - - private String errorCn; - } -}