refactor: 미사용 클래스 제거

main
Jonguk. Lim 3 months ago
parent 5687e9b5ff
commit 767c6576ff

@ -58,6 +58,13 @@
<systemPath>${basedir}/lib/ojdbc6.jar</systemPath>
</dependency>
<dependency>
<groupId>external</groupId>
<artifactId>nicedici</artifactId>
<version>1.0</version>
<scope>system</scope>
<systemPath>${basedir}/lib/VNOInterop.jar</systemPath>
</dependency>
</dependencies>

@ -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;
/**
* <pre>
* description :
*
* packageName : kr.xit.ens.epost.service
* fileName : EpostService
* author : limju
* date : 2023-10-04
* ======================================================================
*
* ----------------------------------------------------------------------
* 2023-10-04 limju
*
* </pre>
*/
@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<String,String> 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
);
}
}

@ -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;
/**
* <pre>
* description :
*
* packageName : kr.xit.ens.pplus.service
* fileName : IPplusService
* author : limju
* date : 2023-10-04
* ======================================================================
*
* ----------------------------------------------------------------------
* 2023-10-04 limju
*
* </pre>
*/
public interface IEpostService {
EpostTraceResponse postTrackInfo(final EpostTraceRequest reqDTO);
}

@ -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;
/**
* <pre>
* description :
*
* packageName : kr.xit.ens.epost.web
* fileName : EpostController
* author : limju
* date : 2023-10-04
* ======================================================================
*
* ----------------------------------------------------------------------
* 2023-10-04 limju
*
* </pre>
*/
@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));
}
}

@ -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;
/**
* <pre>
* description :
*
* packageName : kr.xit.ens.pplus.mapper
* fileName : IPplusMapper
* author : limju
* date : 2023-11-01
* ======================================================================
*
* ----------------------------------------------------------------------
* 2023-11-01 limju
*
* </pre>
*/
@Mapper
public interface IPplusMapper {
List<BatchAcceptRequest> selectPostPlusSendTgts(final SndngMssageParam dto);
}

@ -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;
/**
* <pre>
* description :
*
* packageName : kr.xit.ens.pplus.service
* fileName : IPplusService
* author : limju
* date : 2023-10-04
* ======================================================================
*
* ----------------------------------------------------------------------
* 2023-10-04 limju
*
* </pre>
*/
public interface IPplusService {
PpCommonResponse sendBulks(final SndngMssageParam reqDTO);
PpStatusResponse statusBulks(final PpStatusRequest reqDTO);
}

@ -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;
/**
* <pre>
* description :
*
* packageName : kr.xit.ens.pplus.service
* fileName : PplusService
* author : limju
* date : 2023-10-04
* ======================================================================
*
* ----------------------------------------------------------------------
* 2023-10-04 limju
*
* </pre>
*/
@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<BatchAcceptRequest> 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<MultipartFile> 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<String,String> headerMap = new HashMap<>();
headerMap.put(HttpHeaders.CONTENT_TYPE, MediaType.MULTIPART_FORM_DATA_VALUE);
return webClient.exchangeFormData(
HOST + STATUS,
HttpMethod.POST,
reqDTO,
PpStatusResponse.class,
headerMap
);
}
}

@ -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;
/**
* <pre>
* description :
*
* packageName : kr.xit.ens.pplus.web
* fileName : PplusController
* author : limju
* date : 2023-10-04
* ======================================================================
*
* ----------------------------------------------------------------------
* 2023-10-04 limju
*
* </pre>
*/
@Tag(name = "PplusController", description = "Postplus(포스토피아) API")
@RequiredArgsConstructor
@RestController
@RequestMapping("/api/ens/pplus/v1")
public class PplusController {
private final IPplusService service;
@Operation(summary = "우편제작접수", description = "우편제작접수 요청<br><a href='/pstFile.html'>우편제작접수</a>")
@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);
}
}

@ -1,27 +0,0 @@
package kr.xit.other.mapper;
import kr.xit.other.model.ElecnoticeDTO.Elecnoticedtl;
import org.egovframe.rte.psl.dataaccess.mapper.Mapper;
/**
* <pre>
* description : mapper
*
* packageName : kr.xit.biz.other.mapper
* fileName : IOtherMapper
* author : seojh
* date : 2024-01-03
* ======================================================================
*
* ----------------------------------------------------------------------
* 2024-01-03 seojh
*
* </pre>
*/
@Mapper
public interface IOtherMapper {
Elecnoticedtl selectElecnotice(final Elecnoticedtl dto);
int saveElecnoticemst(final Elecnoticedtl dto);
int saveElecnoticedtl(final Elecnoticedtl dto);
}

@ -1,138 +0,0 @@
package kr.xit.other.model;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;
/**
* <pre>
* description : DTO
*
* packageName : kr.xit.biz.other.model
* fileName : ElecnoticeDTO
* author : seojh
* date : 2024-01-03
* ======================================================================
*
* ----------------------------------------------------------------------
* 2024-01-03 seojh
*
* </pre>
*/
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;
}
}

@ -1,23 +0,0 @@
package kr.xit.other.service;
/**
* <pre>
* description :
*
* packageName : kr.xit.other.service
* fileName : IOtherService
* author : seojh
* date : 2024-01-04
* ======================================================================
*
* ----------------------------------------------------------------------
* 2024-01-04 seojh
*
* </pre>
*/
public interface IOtherService {
//--------------------------------------------------------------------------------
// merge save oracle
//--------------------------------------------------------------------------------
String mergeData();
}

@ -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;
/**
* <pre>
* description :
*
* packageName : kr.xit.other.service
* fileName : OtherService
* author : seojh
* date : 2024-01-04
* ======================================================================
*
* ----------------------------------------------------------------------
* 2024-01-04 seojh
*
* </pre>
*/
@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<Elecnoticedtl> 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";
}
}

@ -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.*;
/**
* <pre>
* description :
*
* packageName : kr.xit.other.web
* fileName : OtherController
* author : jhseo
* date : 2024-01-09
* ======================================================================
*
* ----------------------------------------------------------------------
* 2024-01-09 jhseo
*
* </pre>
*/
@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);
}
}

@ -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;
/**
* <pre>
@ -363,26 +362,6 @@ public interface IEnsBatchMapper {
* </pre>
*/
int updateKakaoStatusInfo(final BulkStatus dto);
Optional<SndngMssageParam> selectPplusSndProcessStatus(final String unitySndngMastrId);
int updatePplusSndStatus(final PpStatusResMapping dto);
/**
*
* @param t T
* @return int
*/
<T> int selectCountRgistNo(final T t);
int updatePplusRgistNo(final PpStatusResMapping dto);
/**
* ID - ~
* @param t T
* @return List<String>
*/
<T> List<PplusResult> selectPplusUnitySndngDetailIdsByRgistNo(final T t);
int updatePplusDlvrStatusFromEPostByRgistNo(final PplusResult dto);
//----------------------------------------------------------------------
// status
//----------------------------------------------------------------------
@ -416,13 +395,6 @@ public interface IEnsBatchMapper {
* @return List<String>
*/
List<String> selectPplusResultTgtsByUnitySndngMstId(final String unitySndngMstId);
/**
* Post plus
* @param dto PplusResult
* @return int
*/
int savePplusCntcSndngResult(final PplusResult dto);
//----------------------------------------------------------------------
// result
//----------------------------------------------------------------------

@ -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;
/**
* <pre>
* description : tb_ens_ Entity DTO
*
* packageName : kr.xit.biz.ens.model
* fileName : EnsDTO
* author : limju
* date : 2023-08-31
* ======================================================================
*
* ----------------------------------------------------------------------
* 2023-08-31 limju
*
* </pre>
*/
@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;
}

@ -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;
/**
* <pre>
@ -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;
}

@ -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;
/**
* <pre>
@ -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<EnsDTO.PostSndng> 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<EnsDTO.SmsSndng> 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<KtMainSendReqData> 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;
}
}

@ -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;
/**
* <pre>
@ -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));
};
}

@ -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;
/**
* <pre>
@ -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());
}
}
/**
* <pre>
* Post plus send
* @param dto SndngMssageParam
* </pre>
*/
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("~~~ ??? 발생할 수 없는 경우 인데 ??? ~~~");
}
}
//-----------------------------------------------------------------------------------------------------------------
}

@ -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;
/**
* <pre>
@ -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
})
);
}
/**
* <pre>
*
*
* @param reqDTO BatchEnsRequest
* </pre>
*/
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<String> 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<String,String> 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<String,String> pMap = new HashMap<>();
pMap.put("startRgistNo", resDTO.get());
pMap.put("endRgistNo", resDTO.get());
final List<PplusResult> 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);
}
});
}
}

@ -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<BulkSendResponses> resList);
void sendEgreen(final SndngMssageParam dto);
void sendSms(final SndngMssageParam dto);
void saveKtBcResult(final SndngMssageParam dto, final List<KtMainSendReqData> sendReqs);

@ -1,29 +0,0 @@
package kr.xit.biz.sms.mapper;
import org.egovframe.rte.psl.dataaccess.mapper.Mapper;
/**
* <pre>
* description : SMS (oracle DB)
*
* packageName : kr.xit.biz.sms.mapper
* fileName : ISmsMessageMapper
* author : limju
* date : 2023-06-26
* ======================================================================
*
* ----------------------------------------------------------------------
* 2023-06-26 limju
*
* </pre>
*/
@Mapper
public interface ISmsMessageMapper {
/**
* sms
* @param t status
* @return int
*/
<T> int insertScTran(final T t);
}

@ -1,24 +0,0 @@
package kr.xit.biz.sms.service;
import kr.xit.biz.ens.model.EnsDTO;
import java.util.List;
/**
* <pre>
* description :
*
* packageName : kr.xit.biz.sms.service
* fileName : ISmsMessageService
* author : limju
* date : 2023-06-26
* ======================================================================
*
* ----------------------------------------------------------------------
* 2023-06-26 limju
*
* </pre>
*/
public interface ISmsMessageService {
void sendSmsList(final List<EnsDTO.SmsSndng> list);
}

@ -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;
/**
* <pre>
* description : xit SMS - Oracle 11
*
* packageName : kr.xit.biz.sms.service
* fileName : SmsMessageService
* author : limju
* date : 2023-06-26
* ======================================================================
*
* ----------------------------------------------------------------------
* 2023-06-26 limju
*
* </pre>
*/
@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<EnsDTO.SmsSndng> list) {
for(EnsDTO.SmsSndng dto : list) mapper.insertScTran(dto);
}
}

@ -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;
/**
* <pre>
* description :
*
* packageName : kr.xit.biz.sms.web
* fileName : SmsMessageController
* author : limju
* date : 2023-10-30
* ======================================================================
*
* ----------------------------------------------------------------------
* 2023-10-30 limju
*
* </pre>
*/
@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<SmsSndng> 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();
}
}

@ -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

@ -1,36 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="kr.xit.biz.sms.mapper.ISmsMessageMapper">
<!-- =================================================================================== -->
<!-- ================================ send ============================================= -->
<!-- =================================================================================== -->
<insert id="insertScTran">
/** 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 */
)
</insert>
<!-- =================================================================================== -->
<!-- ================================ send ============================================= -->
<!-- =================================================================================== -->
</mapper>

@ -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;

@ -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;
/**
* <pre>
* 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
*
* </pre>
*/
public class EPostDTO {
/**
* <pre>
* EPost DTO
* Request: EpostTraceRequest
* Response: EpostTraceResponse
* </pre>
*/
@Schema(name = "EpostTraceRequest", description = "EPost 종적추적 요청 DTO")
@Data
@NoArgsConstructor
@AllArgsConstructor
@SuperBuilder
@JsonInclude(JsonInclude.Include.NON_NULL)
@EqualsAndHashCode(callSuper = false)
public static class EpostTraceRequest extends CmmEnsRequestDTO {
/**
* <pre>
* (URL Encode)
* </pre>
*/
@Schema(requiredMode = RequiredMode.REQUIRED, title = "인증키", example = " ")
@Size(min = 30, max = 100, message = "apiKey는 필수 입니다.")
private String serviceKey;
/**
* <pre>
* - 13
* </pre>
*/
@Schema(requiredMode = RequiredMode.REQUIRED, title = "등기번호", example = "1900472677718|1900472677695")
@Size(min = 13, max = 13, message = "등기번호는 필수 입니다(13자리)")
private String rgist;
}
/**
* <pre>
* EPost DTO
* </pre>
*/
@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;
}
}
/**
* <pre>
* EPost header DTO
* </pre>
*/
@Schema(name = "EpostTraceResHeader", description = "EPost 종적추적 요청 결과 header DTO")
@Data
@NoArgsConstructor
@AllArgsConstructor
@XmlAccessorType(XmlAccessType.FIELD)
@XmlRootElement(name = "header")
public static class EpostTraceResHeader {
/**
* <pre>
* API : - 13
* </pre>
*/
@Schema(requiredMode = RequiredMode.REQUIRED, title = "등기번호")
private String requestRegiNo;
/**
* <pre>
* : - 20
* yyyy-mm-dd HH:mi:ss
* </pre>
*/
@Schema(requiredMode = RequiredMode.REQUIRED, title = "응답시간")
private String responseTime;
/**
* <pre>
* : - Y|N
* </pre>
*/
@Schema(requiredMode = RequiredMode.REQUIRED, title = "성공여부")
private String successYN;
/**
* <pre>
* : max 100
* </pre>
*/
@Schema(requiredMode = RequiredMode.AUTO, title = "에러메세지")
private String errorMessage;
}
/**
* <pre>
* EPost trackInfo DTO
* </pre>
*/
@Schema(name = "EpostTraceResTrackInfo", description = "EPost 종적추적 요청 결과 trackInfo DTO")
@Data
@NoArgsConstructor
@AllArgsConstructor
@XmlAccessorType(XmlAccessType.FIELD)
@XmlRootElement(name = "trackInfo")
@Builder
public static class EpostTraceResTrackInfo {
/**
* <pre>
* : - 13
*
* </pre>
*/
@Schema(requiredMode = RequiredMode.REQUIRED, title = "등기번호")
private String regiNo;
/**
* <pre>
* : - max 50
*
* </pre>
*/
@Schema(requiredMode = RequiredMode.REQUIRED, title = "보낸 사람")
private String senderName;
/**
* <pre>
* : - 10
* yyyy-mm-dd
* </pre>
*/
@Schema(requiredMode = RequiredMode.REQUIRED, title = "보낸 날자")
private String senderData;
/**
* <pre>
* : - max 50
* </pre>
*/
@Schema(requiredMode = RequiredMode.REQUIRED, title = "받는 사람")
private String receiveName;
/**
* <pre>
* : - 10
* yyyy-mm-dd
* </pre>
*/
@Schema(requiredMode = RequiredMode.REQUIRED, title = "받은 날자")
private String receiveDate;
/**
* <pre>
* : - max 10
* |
* </pre>
*/
@Schema(requiredMode = RequiredMode.REQUIRED, title = "배달 상태")
private String trackState;
/**
* <pre>
* : - max 10
* : EMS
* </pre>
*/
@Schema(requiredMode = RequiredMode.REQUIRED, title = "서비스 종류")
private String expressType;
@Schema(requiredMode = RequiredMode.REQUIRED)
private List<EpostTraceResDtlTrack> detaileTrackList;
/**
* <pre>
* EPost detaileTrackList DTO
* </pre>
*/
@Schema(name = "EpostTraceResDtlTrack", description = "EPost 종적추적 요청 결과 detaileTrackList DTO")
@Data
@NoArgsConstructor
@AllArgsConstructor
@XmlAccessorType(XmlAccessType.FIELD)
@XmlRootElement(name = "detaileTrackList")
public static class EpostTraceResDtlTrack {
/**
* <pre>
* : - 1
*
* </pre>
*/
@Schema(requiredMode = RequiredMode.REQUIRED, title = "정렬 순서")
private String sortNo;
/**
* <pre>
* : - 10
* yyyy-mm-dd
* </pre>
*/
@Schema(requiredMode = RequiredMode.REQUIRED, title = "처리일")
private String date;
/**
* <pre>
* : - 5
* mi:ss
* </pre>
*/
@Schema(requiredMode = RequiredMode.REQUIRED, title = "처리 시간")
private String time;
/**
* <pre>
* : - max 10
*
* </pre>
*/
@Schema(requiredMode = RequiredMode.REQUIRED, title = "처리 상태")
private String statue;
/**
* <pre>
* :
*
* </pre>
*/
@Schema(requiredMode = RequiredMode.REQUIRED, title = "처리 장소")
private String location;
/**
* <pre>
* : - max 500
* -
* </pre>
*/
@Schema(requiredMode = RequiredMode.REQUIRED, title = "상세 설명")
private String remark;
}
}
}

@ -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;
/**
* <pre>
* 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
*
* </pre>
*/
public class PplusDTO {
/**
* <pre>
* Postplus DTO
* : - "OK"
* </pre>
*/
@Schema(name = "PpAcceptResponse", description = "Postplus 우편제작 접수 요청 결과 DTO")
@Getter
@NoArgsConstructor
@AllArgsConstructor
@SuperBuilder
@JsonInclude(JsonInclude.Include.NON_NULL)
public static class PpCommonResponse implements IApiResponse {
/**
* <pre>
*
* OK ERROR
* </pre>
*/
@Schema(requiredMode = RequiredMode.REQUIRED)
private String ;
/**
* <pre>
*
*
* </pre>
*/
@Schema(requiredMode = RequiredMode.REQUIRED)
private String ;
@Setter
private String unitySndngMastrId;
}
/**
* <pre>
* Postplus Data Master DTO
* </pre>
*/
@Schema(name = "PpAcceptReqDataMst", description = "Postplus 우편제작 접수 요청 Data master DTO")
@Data
@NoArgsConstructor
@AllArgsConstructor
@SuperBuilder
@JsonInclude(JsonInclude.Include.NON_NULL)
public static class PpAcceptReqDataMst {
//-----------------------------------------------------------------------
// 필수
//-----------------------------------------------------------------------
/**
* <pre>
* : v1.10
* </pre>
*/
@Schema(requiredMode = RequiredMode.REQUIRED, title = "버전", example = "v1.10")
@NotEmpty(message = "버전은 필수 입니다")
private final String = "v1.10";
/**
* <pre>
* : default "N" -
* </pre>
*/
@Schema(requiredMode = RequiredMode.REQUIRED, title = "테스트여부", example = "N")
@NotEmpty(message = "테스트여부는 필수 입니다(Y|N)")
private final String = "N";
/**
* <pre>
* : PST - , SMS - , KKO -
* </pre>
*/
@Schema(requiredMode = RequiredMode.REQUIRED, title = "서비스", example = "PST")
@NotEmpty(message = "서비스 코드는 필수 입니다(PST)")
private final String = "PST";
/**
* <pre>
* : unique key
* max : 40byte
* </pre>
*/
@Schema(requiredMode = RequiredMode.REQUIRED, title = "연계식별키", example = " ")
@Size(min = 5, max = 40, message = "연계식별키는 필수입니다(max:40)")
private String ;
/**
* <pre>
* : |||
* / A4(210*297)
* '' 'Y .
* 릿 data .
* </pre>
*/
@Schema(requiredMode = RequiredMode.REQUIRED, title = "봉투", example = "소봉투")
@NotEmpty(message = "봉투는 필수입니다(소봉투|대봉투|접착시|엽서)")
private String ;
/**
* <pre>
* : ||
* (,) (,) (), ()
* .
* </pre>
*/
@Schema(requiredMode = RequiredMode.REQUIRED, title = "봉투창", example = "이중창")
@NotEmpty(message = "봉투창은 필수입니다(이중창|단창|무창)")
private String ;
/**
* <pre>
* : |
* </pre>
*/
@Schema(requiredMode = RequiredMode.REQUIRED, title = "흑백칼라", example = "흑백")
@NotEmpty(message = "흑백칼라는 필수입니다(흑백|칼라)")
private String ;
/**
* <pre>
* : |
* 2 .
* </pre>
*/
@Schema(requiredMode = RequiredMode.REQUIRED, title = "단면양면", example = "단면")
@NotEmpty(message = "단면양면은 필수입니다(단면|양면)")
private String ;
/**
* <pre>
* : ||||
* </pre>
*/
@Schema(requiredMode = RequiredMode.REQUIRED, title = "배달", example = "일반")
@NotEmpty(message = "배달은 필수입니다(일반|등기|준등기|악일특급|선택등기)")
private String ;
/**
* <pre>
* 릿 : 릿 Y
* </pre>
*/
@Schema(requiredMode = RequiredMode.REQUIRED, title = "템플릿코드", example = "N")
@NotEmpty(message = "템플릿출력여부는 필수입니다(Y|N)")
private final String 릿 = StringUtils.isEmpty(this.릿) ? "N" : "Y";
/**
* <pre>
*
* Y:
*
* margin
* - 8mm, 5mm margin
* - 8mm, 5mm, 17mm margin
* </pre>
*/
@Schema(requiredMode = RequiredMode.REQUIRED, title = "여백생성유무", example = "N")
@NotEmpty(message = "여백생성유무는 필수입니다(Y|N)")
private final String = "N";
/**
* <pre>
*
* Y
* N
* </pre>
*/
@Schema(requiredMode = RequiredMode.REQUIRED, title = "여백생성유무", example = "N")
@NotEmpty(message = "주소페이지유무는 필수입니다(Y|N)")
private final String = "N";
/**
* <pre>
*
* </pre>
*/
@Schema(requiredMode = RequiredMode.REQUIRED, title = "맞춤자제유무", example = "N")
@NotEmpty(message = "맞춤자제유무는 필수입니다(Y|N)")
private final String = "N";
/**
* <pre>
*
* Y 릿
* </pre>
*/
@Schema(requiredMode = RequiredMode.REQUIRED, title = "메일머지유무", example = "N")
@NotEmpty(message = "메일머지유무는 필수입니다(Y|N)")
private final String = "N";
/**
* <pre>
*
* Y 릿
* </pre>
*/
@Schema(requiredMode = RequiredMode.REQUIRED, title = "동봉물유무", example = "N")
@NotEmpty(message = "동봉물유무는 필수입니다(Y|N)")
private final String = "N";
/**
* <pre>
*
* : N
* : Y ( )
* </pre>
*/
@Schema(requiredMode = RequiredMode.REQUIRED, title = "반송여부유무", example = "N")
@NotEmpty(message = "반송여부는 필수입니다(Y|N)")
//private final String 반송여부 = "N";
private final String[] = new String[]{"Y", "N"};
/**
* <pre>
*
* .
* </pre>
*/
@Schema(requiredMode = RequiredMode.REQUIRED, title = "스테이플러유무", example = "N")
@NotEmpty(message = "스테이플러유무는 필수입니다(Y|N)")
private final String = "N";
/**
* <pre>
*
* </pre>
*/
@Schema(requiredMode = RequiredMode.REQUIRED, title = "발송인명", example = "포스토피아")
@NotEmpty(message = "발송인명은 필수입니다")
private String ;
/**
* <pre>
*
* </pre>
*/
@Schema(requiredMode = RequiredMode.REQUIRED, title = "발송인우편번호", example = "05048")
@NotEmpty(message = "발송인우편번호는 필수입니다")
private String ;
/**
* <pre>
*
* </pre>
*/
@Schema(requiredMode = RequiredMode.REQUIRED, title = "발송인주소", example = "서울특별시 광진구 강변로역2")
@NotEmpty(message = "발송인주소는 필수입니다")
private String ;
/**
* <pre>
*
* </pre>
*/
@Schema(requiredMode = RequiredMode.REQUIRED, title = "발송인상세주소", example = "구의동, 서울광진우체국")
@NotEmpty(message = "발송인상세주소는 필수입니다")
private String ;
//-----------------------------------------------------------------------
/**
* <pre>
* 릿 : 릿 ,
* </pre>
*/
@Schema(requiredMode = RequiredMode.AUTO, title = "템플릿코드", example = " ")
private String 릿;
/**
* <pre>
*
*
*
* </pre>
*/
@Schema(requiredMode = RequiredMode.AUTO, title = "수취인수", example = " ")
private Integer ;
/**
* <pre>
*
*
* </pre>
*/
@Schema(requiredMode = RequiredMode.AUTO, title = "동봉물페이지수", example = " ")
private Integer ;
/**
* <pre>
*
* 릿
* .
* </pre>
*/
@Schema(requiredMode = RequiredMode.AUTO, title = "로고파일", example = " ")
private String ;
/**
* <pre>
*
* ///
* </pre>
*/
@Schema(requiredMode = RequiredMode.AUTO, title = "발송인전화번호", example = "010-XXXX-XXXX")
private String ;
}
/**
* <pre>
* Postplus Data Detail DTO
* </pre>
*/
@Schema(name = "PpAcceptReqDataDtl", description = "Postplus 우편제작 접수 요청 Data detail DTO")
@Data
@NoArgsConstructor
@AllArgsConstructor
@SuperBuilder
@JsonInclude(JsonInclude.Include.NON_NULL)
public static class PpAcceptReqDataDtl {
//-----------------------------------------------------------------------
// 필수
//-----------------------------------------------------------------------
/**
* <pre>
* : "1"
* </pre>
*/
@Schema(requiredMode = RequiredMode.REQUIRED, title = "순번", example = "1")
@NotEmpty(message = "순번은 필수입니다")
private String ;
/**
* <pre>
* :
* </pre>
*/
@Schema(requiredMode = RequiredMode.REQUIRED, title = "이름", example = "홍길동")
@NotEmpty(message = "이름은 필수입니다")
private String ;
/**
* <pre>
* :
* </pre>
*/
@Schema(requiredMode = RequiredMode.REQUIRED, title = "우편번호", example = "05048")
@NotEmpty(message = "우편번호는 필수입니다")
private String ;
/**
* <pre>
* :
* 200
* 100
* </pre>
*/
@Schema(requiredMode = RequiredMode.REQUIRED, title = "주소", example = "서울특별시 광진구 강변역로2")
@Size(min = 5, max = 200, message = "주소는 필수입니다(max:200)")
private String ;
//-----------------------------------------------------------------------
/**
* <pre>
* :
*
* </pre>
*/
@Schema(requiredMode = RequiredMode.AUTO, title = "상세주소", example = "서울광진우체국 B동 4층")
private String ;
/**
* <pre>
* : (/// )
* </pre>
*/
@Schema(requiredMode = RequiredMode.AUTO, title = "전화번호", example = " ")
private String ;
/**
* <pre>
*
* </pre>
*/
@Schema(requiredMode = RequiredMode.AUTO, title = "첨부파일", example = " ")
private String ;
/**
* <pre>
* :
*
* 1 ZIP pstFile
* </pre>
*/
@Schema(requiredMode = RequiredMode.AUTO, title = "이미지갯수", example = " ")
private Integer ;
/**
* <pre>
* 1
* </pre>
*/
@Schema(requiredMode = RequiredMode.AUTO, title = "이미지1", example = " ")
private String 1;
/**
* <pre>
* 2
* </pre>
*/
@Schema(requiredMode = RequiredMode.AUTO, title = "이미지2", example = " ")
private String 2;
/**
* <pre>
* 3
* </pre>
*/
@Schema(requiredMode = RequiredMode.AUTO, title = "이미지3", example = " ")
private String 3;
/**
* <pre>
* : 200
* </pre>
*/
}
/**
* <pre>
* Postplus DTO
* Request: PpStatusRequest
* Response: PpStatusResponse
* </pre>
*/
@Schema(name = "PpStatusRequest", description = "Postplus 우편제작 상태 조회 요청 DTO")
@Data
@NoArgsConstructor
@AllArgsConstructor
@SuperBuilder
@JsonInclude(JsonInclude.Include.NON_NULL)
@EqualsAndHashCode(callSuper = false)
public static class PpStatusRequest extends CmmEnsRequestDTO {
/**
* <pre>
* apiKey
* </pre>
*/
@Schema(requiredMode = RequiredMode.REQUIRED, title = "apiKey", example = " ")
@NotEmpty(message = "apiKey는 필수 입니다.")
private String apiKey;
/**
* <pre>
*
* </pre>
*/
@Schema(requiredMode = RequiredMode.REQUIRED, title = "우편제작요청연계식별키", example = "TEST20230221_000001")
@NotEmpty(message = "우편 제작 요청 연계 식별키는 필수 입니다.")
private String inputCode;
}
/**
* <pre>
* Postplus DTO
* :
* </pre>
*/
@Schema(name = "PpStatusResponse", description = "Postplus 우편제작 상태 조회 결과 DTO")
@Getter
@NoArgsConstructor
@AllArgsConstructor
@SuperBuilder
@JsonInclude(JsonInclude.Include.NON_NULL)
public static class PpStatusResponse extends PpCommonResponse {
//---------------------------------------------------------
// 필수
//---------------------------------------------------------
/**
* <pre>
* : YYYYMMDD0000
*
* </pre>
*/
@Schema(requiredMode = RequiredMode.REQUIRED)
private String ;
/**
* <pre>
* : |||
* </pre>
*/
@Schema(requiredMode = RequiredMode.REQUIRED)
private String ;
/**
* <pre>
* : ||||
* </pre>
*/
@Schema(requiredMode = RequiredMode.REQUIRED)
private String ;
/**
* <pre>
* : |
* </pre>
*/
@Schema(requiredMode = RequiredMode.REQUIRED)
private String ;
/**
* <pre>
* : |
* </pre>
*/
@Schema(requiredMode = RequiredMode.REQUIRED)
private String ;
/**
* <pre>
*
* </pre>
*/
@Schema(requiredMode = RequiredMode.REQUIRED)
private Integer ;
/**
* <pre>
* : ||||||
* -> msg
* ->
* // ->
* -> ,
* ->
* </pre>
*/
@Schema(requiredMode = RequiredMode.REQUIRED)
private String ;
/**
* <pre>
* :
* </pre>
*/
@Schema(requiredMode = RequiredMode.REQUIRED)
private String ;
//---------------------------------------------------------
/**
* <pre>
* :
* </pre>
*/
@Schema(requiredMode = RequiredMode.AUTO)
private String ;
/**
* <pre>
* :
* </pre>
*/
@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 {
/**
* <pre>
* :
* </pre>
*/
private String unitySndngMastrId;
/**
*
*/
private Integer sn;
/**
* <pre>
* : ||||||
* -> msg
* ->
* // ->
* -> ,
* ->
* </pre>
*/
private String processSttus;
/**
* <pre>
*
* </pre>
*/
private String dlvrSttus;
/**
* <pre>
*
* </pre>
*/
private String rgistNo;
/**
* <pre>
*
* detaileTrackList statue : (, 1 )
* </pre>
*/
private String dlvrDetail;
}
@Schema(name = "PplusResult", description = "Postplus 상태 조회 결과 Mapping DTO")
@Data
@NoArgsConstructor
@AllArgsConstructor
@SuperBuilder
@EqualsAndHashCode(callSuper = true)
public static class PplusResult extends PpStatusResMapping {
/**
* <pre>
* ID
* </pre>
*/
private String unitySndngDetailId;
private String sndngSeCode;
/**
*
*/
private String signguCode;
/**
*
*/
private String ffnlgCode;
/**
* <pre>
* : - 10
* yyyy-mm-dd
* </pre>
*/
private String senderData;
/**
* <pre>
* : - max 50
* </pre>
*/
private String receiveName;
/**
* <pre>
* : - 10
* yyyy-mm-dd
* </pre>
*/
private String receiveDate;
private String errorCn;
}
}
Loading…
Cancel
Save