From 6a0c6fa51c76d42c0fffe79a8cec92479732ea8b Mon Sep 17 00:00:00 2001 From: "Jonguk. Lim" Date: Wed, 8 May 2024 11:03:40 +0900 Subject: [PATCH] =?UTF-8?q?=ED=8F=90=EA=B8=B0=EA=B4=80=EB=A6=AC=20<->=20?= =?UTF-8?q?=ED=8F=90=EA=B8=B0=EB=B3=B4=EA=B3=A0=EC=A0=95=EB=B3=B4=20?= =?UTF-8?q?=EB=A7=A4=ED=95=91=20=EC=B2=98=EB=A6=AC=20=EB=B0=98=EC=98=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../adds/biz/iros/service/BizIrosService.java | 4 +- .../iros/service/bean/BizIrosServiceBean.java | 4 +- .../adds/biz/iros/web/BizIrosController.java | 4 +- .../xit/adds/biz/nims/dao/BizNimsMapper.java | 17 +- .../adds/biz/nims/model/BizNimsRequest.java | 33 ++-- .../adds/biz/nims/model/BizNimsResponse.java | 19 ++- .../adds/biz/nims/service/BizNimsService.java | 14 +- .../nims/service/bean/BizNimsServiceBean.java | 159 ++++++++++++------ .../adds/biz/nims/web/BizNimsController.java | 82 ++++----- .../java/cokr/xit/adds/core/Constants.java | 48 ++++++ ...tlRequest.java => DrugPrdtMcpnDtlReq.java} | 4 +- .../adds/inf/iros/service/InfIrosService.java | 4 +- .../iros/service/bean/InfIrosServiceBean.java | 4 +- .../adds/inf/iros/web/InfIrosController.java | 4 +- .../xit/adds/inf/nims/model/NimsApiDto.java | 142 ++++++++++++++++ .../adds/inf/nims/model/NimsApiRequest.java | 20 +-- .../adds/inf/nims/service/InfNimsService.java | 8 +- .../nims/service/bean/InfNimsServiceBean.java | 15 +- .../adds/inf/nims/web/InfNimsController.java | 8 +- .../sql/mapper/biz/nims-mysql-mapper.xml | 70 +++++--- .../xit/adds/inf/iros/IrosRestfulTest.java | 4 +- 21 files changed, 480 insertions(+), 187 deletions(-) rename src/main/java/cokr/xit/adds/inf/iros/model/{DrugPrdtMcpnDtlRequest.java => DrugPrdtMcpnDtlReq.java} (95%) diff --git a/src/main/java/cokr/xit/adds/biz/iros/service/BizIrosService.java b/src/main/java/cokr/xit/adds/biz/iros/service/BizIrosService.java index 1dc91d4..f2e37c7 100644 --- a/src/main/java/cokr/xit/adds/biz/iros/service/BizIrosService.java +++ b/src/main/java/cokr/xit/adds/biz/iros/service/BizIrosService.java @@ -3,7 +3,7 @@ package cokr.xit.adds.biz.iros.service; import java.util.List; import cokr.xit.adds.inf.iros.model.DrugPrdtMcpnDtl; -import cokr.xit.adds.inf.iros.model.DrugPrdtMcpnDtlRequest; +import cokr.xit.adds.inf.iros.model.DrugPrdtMcpnDtlReq; /** *
@@ -20,5 +20,5 @@ import cokr.xit.adds.inf.iros.model.DrugPrdtMcpnDtlRequest;
  * 
*/ public interface BizIrosService { - List getDrugPrdtMcpnDtls(DrugPrdtMcpnDtlRequest dto); + List getDrugPrdtMcpnDtls(DrugPrdtMcpnDtlReq dto); } diff --git a/src/main/java/cokr/xit/adds/biz/iros/service/bean/BizIrosServiceBean.java b/src/main/java/cokr/xit/adds/biz/iros/service/bean/BizIrosServiceBean.java index 1054ea6..1ca9055 100644 --- a/src/main/java/cokr/xit/adds/biz/iros/service/bean/BizIrosServiceBean.java +++ b/src/main/java/cokr/xit/adds/biz/iros/service/bean/BizIrosServiceBean.java @@ -6,7 +6,7 @@ import org.springframework.stereotype.Service; import cokr.xit.adds.biz.iros.service.BizIrosService; import cokr.xit.adds.inf.iros.model.DrugPrdtMcpnDtl; -import cokr.xit.adds.inf.iros.model.DrugPrdtMcpnDtlRequest; +import cokr.xit.adds.inf.iros.model.DrugPrdtMcpnDtlReq; import cokr.xit.adds.inf.iros.model.IrosResponse; import cokr.xit.adds.inf.iros.service.InfIrosService; import cokr.xit.foundation.component.AbstractServiceBean; @@ -34,7 +34,7 @@ public class BizIrosServiceBean extends AbstractServiceBean implements BizIrosSe private final InfIrosService infIrosService; @Override - public List getDrugPrdtMcpnDtls(DrugPrdtMcpnDtlRequest dto) { + public List getDrugPrdtMcpnDtls(DrugPrdtMcpnDtlReq dto) { IrosResponse rslt = infIrosService.getDrugPrdtMcpnDtls(dto); return rslt.getResultOrThrow(); diff --git a/src/main/java/cokr/xit/adds/biz/iros/web/BizIrosController.java b/src/main/java/cokr/xit/adds/biz/iros/web/BizIrosController.java index 9235d2d..4f58db5 100644 --- a/src/main/java/cokr/xit/adds/biz/iros/web/BizIrosController.java +++ b/src/main/java/cokr/xit/adds/biz/iros/web/BizIrosController.java @@ -10,7 +10,7 @@ import org.springframework.web.bind.annotation.RestController; import cokr.xit.adds.biz.iros.service.BizIrosService; import cokr.xit.adds.core.model.ApiBaseResponse; import cokr.xit.adds.inf.iros.model.DrugPrdtMcpnDtl; -import cokr.xit.adds.inf.iros.model.DrugPrdtMcpnDtlRequest; +import cokr.xit.adds.inf.iros.model.DrugPrdtMcpnDtlReq; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; import lombok.RequiredArgsConstructor; @@ -39,7 +39,7 @@ public class BizIrosController { @Operation(summary = "의약 제품 주성분 상세 정보 조회", description = "의약 제품 주성분 상세 정보 조회") @PostMapping("/getDrugPrdtMcpnDtls") public ApiBaseResponse> getDrugPrdtMcpnDtls( - @RequestBody DrugPrdtMcpnDtlRequest dto + @RequestBody DrugPrdtMcpnDtlReq dto ) { return ApiBaseResponse.of(bizIrosService.getDrugPrdtMcpnDtls(dto)); } diff --git a/src/main/java/cokr/xit/adds/biz/nims/dao/BizNimsMapper.java b/src/main/java/cokr/xit/adds/biz/nims/dao/BizNimsMapper.java index 8efc576..1c7cb7d 100644 --- a/src/main/java/cokr/xit/adds/biz/nims/dao/BizNimsMapper.java +++ b/src/main/java/cokr/xit/adds/biz/nims/dao/BizNimsMapper.java @@ -32,9 +32,9 @@ public interface BizNimsMapper extends AbstractMapper { // NIMS API CALL //------------------------------------------------------------------------------------------------------ void mergeBsshInfoSt(NimsApiDto.BsshInfoSt dto); - List selectBsshInfos(NimsApiRequest.BsshInfoRequest dto); + List selectBsshInfos(NimsApiRequest.BsshInfoReq dto); void mergeProductInfoKd(NimsApiDto.ProductInfoKd dto); - List selectProductInfos(NimsApiRequest.ProductInfoRequest dto); + List selectProductInfos(NimsApiRequest.ProductInfoReq dto); // int mergeStorgeInfo(NimsApiDto.StorageInfo dto); //------------------------------------------------------------------------------------------------------ @@ -42,22 +42,27 @@ public interface BizNimsMapper extends AbstractMapper { //------------------------------------------------------------------------------------------------------ int insertDsuseMgt(BizNimsRequest.DsuseMgt dto); int insertDsuseMgtDtl(BizNimsRequest.DsuseMgtDtl dto); - List selectDsuseMgts(BizNimsRequest.DsuseMgtInq dto); - List selectDsuseMgtDtls(Map map); + List selectDsuseMgts(BizNimsRequest.DsuseMgtInq dto); + List selectDsuseMgtDtls(Map map); + int updateMappingDsuseMgt(BizNimsResponse.DsuseMgtRes mgtDto); int insertDsuseRptInfo(NimsApiDto.DsuseRptInfo dto); int insertDsuseRptInfoDtl(NimsApiDto.DsuseRptInfoDtl dto); int updateCancelDsuseRptInfo(NimsApiDto.DsuseRptInfo dto); int updateCancelDsuseRptInfoDtl(NimsApiDto.DsuseRptInfo dto); - int updateCancelDsuseMgt(NimsApiDto.DsuseRptInfo dto); +// int updateCancelDsuseMgt(NimsApiDto.DsuseRptInfo dto); Map recusiveRefUsrRptIdNo(String refUsrRptIdNo); + /** + * 폐기관리 테이블 사용자보고식별번호 반영 + */ + int updateUsrRptIdNoOfDsuseMgt(NimsApiDto.DsuseRptInfo dto); NimsApiDto.DsuseRptInfo selectDsuseRptInfoByUsrRptIdNo(Map map); List selectDsuseRptInfoDtls(Map map); - List selectSavedDsuseMgts(List dsuseMgtIds); + List selectSavedDsuseMgts(List dsuseMgtIds); // int insertDsuseMgtDtl(BizNimsRequest.DsuseMgtDtl dto); // int updateCancelDsuseMgtDtl(BizNimsRequest.DsuseMgt dto); diff --git a/src/main/java/cokr/xit/adds/biz/nims/model/BizNimsRequest.java b/src/main/java/cokr/xit/adds/biz/nims/model/BizNimsRequest.java index 72606e4..6dd7490 100644 --- a/src/main/java/cokr/xit/adds/biz/nims/model/BizNimsRequest.java +++ b/src/main/java/cokr/xit/adds/biz/nims/model/BizNimsRequest.java @@ -11,6 +11,7 @@ import javax.validation.constraints.Pattern; import com.fasterxml.jackson.annotation.JsonProperty; +import cokr.xit.adds.core.Constants; import cokr.xit.adds.core.model.AuditDto; import io.swagger.v3.oas.annotations.media.Schema; import lombok.AllArgsConstructor; @@ -83,8 +84,8 @@ public class BizNimsRequest { *
 		 * 진행상태
 		 *
-		 * 01-폐기보고 접수
-		 * 02-폐기보고 확인
+		 * 01-폐기신청서 접수
+		 * 02-폐기보고 매핑
 		 * 11-민원수령처리(전자결재)
 		 * 21-폐기결과통보서 작성
 		 * 22-폐기결과보고서 작성
@@ -93,9 +94,9 @@ public class BizNimsRequest {
 		 * 99-종료
 		 * 
*/ - @Schema(requiredMode = REQUIRED, title = "진행 상태 코드", example = " ", allowableValues = {"01", "02", "11", "22", "31", "41", "99"}) + @Schema(requiredMode = REQUIRED, title = "진행 상태 코드", example = " ", allowableValues = {"01", "02", "11", "21", "22", "31", "41", "99"}) @Pattern(regexp = "01|02|11|22|31|41|99", message = "진행 상태 코드는 필수 입니다") - private String prgrsSttsCd = "01"; + private String prgrsSttsCd = Constants.PRGRS_STTS_CD.RECEIPT.getCode(); } /** @@ -125,8 +126,8 @@ public class BizNimsRequest { *
 		 * 진행상태
 		 *
-		 * 01-폐기보고 접수
-		 * 02-폐기보고 확인
+		 * 01-폐기신청서 접수
+		 * 02-폐기보고 매핑
 		 * 11-민원수령처리(전자결재)
 		 * 21-폐기결과통보서 작성
 		 * 22-폐기결과보고서 작성
@@ -135,7 +136,7 @@ public class BizNimsRequest {
 		 * 99-종료
 		 * 
*/ - private String prgrsSttsCd = "01"; + private String prgrsSttsCd = Constants.PRGRS_STTS_CD.RECEIPT.getCode(); /** * 마약류취급자식별번호 @@ -270,6 +271,14 @@ public class BizNimsRequest { private String usrRptIdNo; // 사용자_보고_라인_식별_번호 private String usrRptLnIdNo; + + /** + *
+		 *     폐기관리상세와 폐기보고정보 상세의 폐기 정보(상품) 유효성 체크
+		 *     -> 일치하는 경우 "Y"
+		 * 
+ */ + private String validYn; } /** @@ -291,10 +300,10 @@ public class BizNimsRequest { /** *
-		 * 진행상태
+		 * 폐기관리진행상태
 		 *
-		 * 01-폐기보고 접수
-		 * 02-폐기보고 확인
+		 * 01-폐기신청서 접수
+		 * 02-폐기보고 매핑
 		 * 11-민원수령처리(전자결재)
 		 * 21-폐기결과통보서 작성
 		 * 22-폐기결과보고서 작성
@@ -303,8 +312,8 @@ public class BizNimsRequest {
 		 * 99-종료
 		 * 
*/ - @Schema(requiredMode = REQUIRED, title = "진행 상태 코드", example = " ", allowableValues = {"01", "02", "11", "22", "31", "41", "99"}) - private String prgrsSttsCd = "01"; + @Schema(requiredMode = REQUIRED, title = "진행 상태 코드", example = " ", allowableValues = {"01", "02", "11", "21", "22", "31", "41", "99"}) + private String prgrsSttsCd = Constants.PRGRS_STTS_CD.RECEIPT.getCode(); } /** * 마약류 폐기 관리 상세 request diff --git a/src/main/java/cokr/xit/adds/biz/nims/model/BizNimsResponse.java b/src/main/java/cokr/xit/adds/biz/nims/model/BizNimsResponse.java index df769d5..f3517d0 100644 --- a/src/main/java/cokr/xit/adds/biz/nims/model/BizNimsResponse.java +++ b/src/main/java/cokr/xit/adds/biz/nims/model/BizNimsResponse.java @@ -1,5 +1,6 @@ package cokr.xit.adds.biz.nims.model; +import cokr.xit.adds.core.Constants; import cokr.xit.adds.inf.nims.model.NimsApiDto; import io.swagger.v3.oas.annotations.media.Schema; import lombok.AllArgsConstructor; @@ -26,13 +27,13 @@ public class BizNimsResponse { /** * 폐기관리정보 조회 response */ - @Schema(name = "DsuseMgtResponse", description = "폐기관리정보 조회 response DTO") + @Schema(name = "DsuseMgtRes", description = "폐기관리정보 조회 response DTO") @Data @NoArgsConstructor @AllArgsConstructor @SuperBuilder @EqualsAndHashCode(callSuper = true) - public static class DsuseMgtResponse extends BizNimsRequest.DsuseMgt { + public static class DsuseMgtRes extends BizNimsRequest.DsuseMgt { private String dsuseSeCdNm; private String dsusePrvCdNm; @@ -55,13 +56,13 @@ public class BizNimsResponse { /** * 폐기관리정보 조회 response */ - @Schema(name = "DsuseMgtDtlResponse", description = "폐기관리상세정보 조회 response DTO") + @Schema(name = "DsuseMgtDtlRes", description = "폐기관리상세정보 조회 response DTO") @Data @NoArgsConstructor @AllArgsConstructor @SuperBuilder @EqualsAndHashCode(callSuper = true) - public static class DsuseMgtDtlResponse extends BizNimsRequest.DsuseMgtDtl { + public static class DsuseMgtDtlRes extends BizNimsRequest.DsuseMgtDtl { /** * 마약항정구분 @@ -94,13 +95,13 @@ public class BizNimsResponse { /** * 폐기관리정보 조회 response */ - @Schema(name = "DsuseRptInfoResponse", description = "폐기보고관리정보 조회 response DTO") + @Schema(name = "DsuseRptInfoRes", description = "폐기보고관리정보 조회 response DTO") @Data @NoArgsConstructor @AllArgsConstructor @SuperBuilder @EqualsAndHashCode(callSuper = true) - public static class DsuseRptInfoResponse extends NimsApiDto.DsuseRptInfo { + public static class DsuseRptInfoRes extends NimsApiDto.DsuseRptInfo { private String dscdmngId; private String userId; @@ -109,8 +110,8 @@ public class BizNimsResponse { *
 		 * 진행상태
 		 *
-		 * 01-폐기보고 접수
-		 * 02-폐기보고 확인
+		 * 01-폐기신청서 접수
+		 * 02-폐기보고 매핑
 		 * 11-민원수령처리(전자결재)
 		 * 21-폐기결과통보서 작성
 		 * 22-폐기결과보고서 작성
@@ -119,7 +120,7 @@ public class BizNimsResponse {
 		 * 99-종료
 		 * 
*/ - private String prgrsSttsCd = "01"; + private String prgrsSttsCd = Constants.PRGRS_STTS_CD.RECEIPT.getCode(); /** *
diff --git a/src/main/java/cokr/xit/adds/biz/nims/service/BizNimsService.java b/src/main/java/cokr/xit/adds/biz/nims/service/BizNimsService.java
index ce40690..c909364 100644
--- a/src/main/java/cokr/xit/adds/biz/nims/service/BizNimsService.java
+++ b/src/main/java/cokr/xit/adds/biz/nims/service/BizNimsService.java
@@ -26,9 +26,9 @@ public interface BizNimsService {
 	//------------------------------------------------------------------------------------------------------
 	// NIMS API CALL
 	//------------------------------------------------------------------------------------------------------
-	List saveBsshInfoSt(NimsApiRequest.BsshInfoRequest dto);
-	List saveProductInfoKd(NimsApiRequest.ProductInfoRequest dto, boolean isMnfSeqInfo);
-	List getMnfSeqInfo(NimsApiRequest.MnfSeqInfoRequest dto);
+	List saveBsshInfoSt(NimsApiRequest.BsshInfoReq dto);
+	List saveProductInfoKd(NimsApiRequest.ProductInfoReq dto, boolean isMnfSeqInfo);
+	List getMnfSeqInfo(NimsApiRequest.MnfSeqInfoReq dto);
 	// List getJurisdictionGovInfo(NimsApiRequest.JurisdictionGovInfoRequest dto);
 	// List saveStorageInfo(NimsApiRequest.StorageInfoRequest dto);
 
@@ -49,7 +49,7 @@ public interface BizNimsService {
 	 * @return List
 	 * 
*/ - List saveDsuseRptInfo(NimsApiRequest.DsuseRptInfoRequest dto); + List saveDsuseRptInfo(NimsApiRequest.DsuseRptInfoReq dto); //------------------------------------------------------------------------------------------------------ // NIMS BIZ @@ -59,11 +59,11 @@ public interface BizNimsService { // NimsAarResult cancelReportDsuse(); BizNimsRequest.DsuseMgt saveDsuseMgt(BizNimsRequest.DsuseMgt dto); - List getDsuseMgts(BizNimsRequest.DsuseMgtInq dto); + List getDsuseMgts(BizNimsRequest.DsuseMgtInq dto); - @Deprecated - List saveDsuseMgts(List dtos); + // @Deprecated + // List saveDsuseMgts(List dtos); // BizNimsAarDto.AarHeader getTgtDsuseRptData(BizNimsRequest.DsuseMgt dto); diff --git a/src/main/java/cokr/xit/adds/biz/nims/service/bean/BizNimsServiceBean.java b/src/main/java/cokr/xit/adds/biz/nims/service/bean/BizNimsServiceBean.java index 3c734cd..3242fc1 100644 --- a/src/main/java/cokr/xit/adds/biz/nims/service/bean/BizNimsServiceBean.java +++ b/src/main/java/cokr/xit/adds/biz/nims/service/bean/BizNimsServiceBean.java @@ -22,7 +22,7 @@ import cokr.xit.adds.core.util.ApiUtil; import cokr.xit.adds.inf.nims.model.NimsApiDto; import cokr.xit.adds.inf.nims.model.NimsApiDto.BsshInfoSt; import cokr.xit.adds.inf.nims.model.NimsApiRequest; -import cokr.xit.adds.inf.nims.model.NimsApiRequest.BsshInfoRequest; +import cokr.xit.adds.inf.nims.model.NimsApiRequest.BsshInfoReq; import cokr.xit.adds.inf.nims.model.NimsApiResult; import cokr.xit.adds.inf.nims.service.InfNimsService; import cokr.xit.foundation.component.AbstractServiceBean; @@ -75,7 +75,7 @@ public class BizNimsServiceBean extends AbstractServiceBean implements BizNimsSe * */ @Override - public List saveBsshInfoSt(BsshInfoRequest dto) { + public List saveBsshInfoSt(BsshInfoReq dto) { if(!isEmpty(dto.getBn()) && dto.getBn().length() < 3) { throw ApiCustomException.create("업체[사업자]명은 3자 이상 으로 조회해 주세요"); } @@ -120,7 +120,7 @@ public class BizNimsServiceBean extends AbstractServiceBean implements BizNimsSe * */ @Override - public List saveProductInfoKd(NimsApiRequest.ProductInfoRequest dto, boolean isMnfSeqInfo) { + public List saveProductInfoKd(NimsApiRequest.ProductInfoReq dto, boolean isMnfSeqInfo) { if(isEmpty(dto.getP()) && isEmpty(dto.getPn())){ throw ApiCustomException.create("상품번호 또는 상품명은 필수 입니다"); } @@ -161,7 +161,7 @@ public class BizNimsServiceBean extends AbstractServiceBean implements BizNimsSe } @Override - public List getMnfSeqInfo(NimsApiRequest.MnfSeqInfoRequest dto) { + public List getMnfSeqInfo(NimsApiRequest.MnfSeqInfoReq dto) { NimsApiResult.Response response = infNimsService.getMnfSeqInfo(dto); List results = response.getResultOrThrow(); @@ -203,7 +203,7 @@ public class BizNimsServiceBean extends AbstractServiceBean implements BizNimsSe * */ @Override - public List saveDsuseRptInfo(NimsApiRequest.DsuseRptInfoRequest reqDto) { + public List saveDsuseRptInfo(NimsApiRequest.DsuseRptInfoReq reqDto) { List rsltList = new ArrayList<>(); while(true) { @@ -217,6 +217,29 @@ public class BizNimsServiceBean extends AbstractServiceBean implements BizNimsSe if(rslt.isEndYn()) break; reqDto.setPg(String.valueOf(Integer.parseInt(reqDto.getPg()) + 1)); } + + // TODO: 보고관리-보고정보 매핑 처리 + // 미완료(종료)된 폐기 관리 목록 조회 + List dsuseMgts = getDsuseMgts(BizNimsRequest.DsuseMgtInq.builder() + .prgrsSttsCd(Constants.PRGRS_STTS_CD.END.getCode()) + .build()); + + ////////////////////////////////////////////////////////////////////////////// + // FIXME : 테스트를 위한 코드 + ////////////////////////////////////////////////////////////////////////////// + // for (NimsApiDto.DsuseRptInfo dto : rsltList) { + // // 폐기 관리 데이타 매핑 + // for(BizNimsResponse.DsuseMgtResponse mgtDto: dsuseMgts){ + // // 폐기 신청서 접수 상태 데이타만 처리 + // if(Constants.PRGRS_STTS_CD.RECEIPT.getCode().equals(mgtDto.getPrgrsSttsCd())){ + // dto.mappingDsuseRptInfo(mgtDto); + // }; + // } + // } + // if(true) return null; + ////////////////////////////////////////////////////////////////////////////// + + // 0. 조회(저장)한 데이타 대상 에서 제외 (usrRptIdNo가 DB에 저장된 경우) List list = new ArrayList<>(); for (NimsApiDto.DsuseRptInfo dto : rsltList) { @@ -235,9 +258,21 @@ public class BizNimsServiceBean extends AbstractServiceBean implements BizNimsSe // 신규가 아닌 경우 skip if(!"0".equals(dto.getRptTyCd())) continue; + // 폐기 보고 정보 데이타 생성 createDsuseRpt(dto, true); + + // FIXME : 폐기 관리 데이타 매핑 + List newList = dto.mappingNewDsuseRptInfo(dsuseMgts); + if(newList.size() > 1){ + throw ApiCustomException.create("폐기 관리 데이타 매핑 오류[폐기 관리 데이타 중복]"); + } + if(bizNimsMapper.updateMappingDsuseMgt(newList.get(0)) == 1){ + throw ApiCustomException.create("폐기 관리 데이타 매핑 오류[폐기 관리 데이타 매핑 실패]"); + }; } + + // 2. 신규 외의 경우(rptTyCd : 1 - 취소, 2 - 변경) String errMsg = null; for (NimsApiDto.DsuseRptInfo dto : list) { @@ -261,6 +296,15 @@ public class BizNimsServiceBean extends AbstractServiceBean implements BizNimsSe // 2-3. tb_dsuse_rpt_info, tb_dsuse_rpt_info_dtl 생성 (취소인 경우는 tb_dsuse_rpt_info의 사용 여부 'N'으로 생성) createDsuseRpt(dto, false); + + // FIXME : 폐기 관리 데이타 매핑 + List newList = dto.mappingDsuseRptInfo(dsuseMgts); + if(newList.size() > 1){ + throw ApiCustomException.create("폐기 관리 데이타 매핑 오류[폐기 관리 데이타 중복]"); + } + if(bizNimsMapper.updateMappingDsuseMgt(newList.get(0)) == 1){ + throw ApiCustomException.create("폐기 관리 데이타 매핑 오류[폐기 관리 데이타 매핑 실패]"); + }; } @@ -273,6 +317,14 @@ public class BizNimsServiceBean extends AbstractServiceBean implements BizNimsSe //------------------------------------------------------------------------------------------------------ // NIMS BIZ //------------------------------------------------------------------------------------------------------ + + /** + *
+	 *     사고마약류폐기관리 생성
+	 * @param dto BizNimsRequest.DsuseMgt
+	 * @return BizNimsRequest.DsuseMgt 생성된 폐기관리 정보
+	 * 
+ */ public BizNimsRequest.DsuseMgt saveDsuseMgt(BizNimsRequest.DsuseMgt dto) { ApiUtil.validate(dto, null, validator); if(dto.getRndDtlRptCnt() != dto.getDsuseMgtDtls().size()) throw ApiCustomException.create("폐기물 보고수 오류[폐기물 갯수 확인]"); @@ -293,11 +345,18 @@ public class BizNimsServiceBean extends AbstractServiceBean implements BizNimsSe return dto; } + /** + *
+	 *     폐기 관리 목록 조회
+	 * @param dto BizNimsRequest.DsuseMgtInq
+	 * @return List 조회된 폐기 관리 목록
+	 * 
+ */ @Override - public List getDsuseMgts(BizNimsRequest.DsuseMgtInq dto) { - List resList = bizNimsMapper.selectDsuseMgts(dto); + public List getDsuseMgts(BizNimsRequest.DsuseMgtInq dto) { + List resList = bizNimsMapper.selectDsuseMgts(dto); - for (BizNimsResponse.DsuseMgtResponse r : resList) { + for (BizNimsResponse.DsuseMgtRes r : resList) { r.setRptTyCdNm(Constants.RPT_TY_CD.getName(r.getRptTyCd())); r.setDsuseSeCdNm(Constants.DSUSE_SE_CD.getName(r.getDsuseSeCd())); r.setDsusePrvCdNm(Constants.DSUSE_PRV_CD.getName(r.getDsusePrvCd())); @@ -305,7 +364,7 @@ public class BizNimsServiceBean extends AbstractServiceBean implements BizNimsSe Map map = new HashMap<>(); map.put("dscdmngId", r.getDscdmngId()); - List dsuseRptInfoDtls = bizNimsMapper.selectDsuseMgtDtls(map); + List dsuseRptInfoDtls = bizNimsMapper.selectDsuseMgtDtls(map); setDsuseMgtDtlAddProductInfo(dsuseRptInfoDtls); r.getDsuseMgtDtls().addAll(dsuseRptInfoDtls); } @@ -317,33 +376,32 @@ public class BizNimsServiceBean extends AbstractServiceBean implements BizNimsSe /** *
-	 * 폐기관리정보 저장
-	 *
+	 *    폐기관리정보 저장
 	 * @param dtos List
-	 * @return List
+	 * @return List
 	 * 
*/ - @Deprecated - @Override - public List saveDsuseMgts(List dtos) { - for (BizNimsRequest.DsuseMgt dto : dtos) { - ApiUtil.validate(dto, null, validator); - } - - final List dscdmngIds = new ArrayList<>(); - for (BizNimsRequest.DsuseMgt dto : dtos) { - dto.setRgtr(Constants.NIMS_API_USER_ID); - - bizNimsMapper.insertDsuseMgt(dto); - dscdmngIds.add(dto.getDscdmngId()); - } - List resList = bizNimsMapper.selectSavedDsuseMgts(dscdmngIds); - - // 마약류취급업체의 허가번호(prmisnNo), 대표자명(rprsntvNm) set - setAddBsshInfo(resList); - - return resList; - } + // @Deprecated + // @Override + // public List saveDsuseMgts(List dtos) { + // for (BizNimsRequest.DsuseMgt dto : dtos) { + // ApiUtil.validate(dto, null, validator); + // } + // + // final List dscdmngIds = new ArrayList<>(); + // for (BizNimsRequest.DsuseMgt dto : dtos) { + // dto.setRgtr(Constants.NIMS_API_USER_ID); + // + // bizNimsMapper.insertDsuseMgt(dto); + // dscdmngIds.add(dto.getDscdmngId()); + // } + // List resList = bizNimsMapper.selectSavedDsuseMgts(dscdmngIds); + // + // // 마약류취급업체의 허가번호(prmisnNo), 대표자명(rprsntvNm) set + // setAddBsshInfo(resList); + // + // return resList; + // } //------------------------------------------------------------------------------------------------------ @@ -357,15 +415,15 @@ public class BizNimsServiceBean extends AbstractServiceBean implements BizNimsSe * @param dtlList * */ - private void setDsuseMgtDtlAddProductInfo(List dtlList) { + private void setDsuseMgtDtlAddProductInfo(List dtlList) { - for (BizNimsResponse.DsuseMgtDtlResponse r : dtlList) {//if() + for (BizNimsResponse.DsuseMgtDtlRes r : dtlList) {//if() // 마약항정구분(nrcdSeNm), 중점일반구분(prtmSenm) if (isEmpty(r.getNrcdSeNm()) || isEmpty(r.getPrtmSeNm())) { //NimsApiResult.Response result = infNimsService.getProductInfoKd( List list = saveProductInfoKd( - NimsApiRequest.ProductInfoRequest.builder() + NimsApiRequest.ProductInfoReq.builder() .fg("1") .pg("1") .p(r.getPrductCd()) @@ -386,7 +444,7 @@ public class BizNimsServiceBean extends AbstractServiceBean implements BizNimsSe // 제조수입자명(bsshNm) if (isEmpty(r.getBsshNm()) && !isEmpty(r.getBsshCd())) { List list = saveBsshInfoSt( - BsshInfoRequest.builder() + BsshInfoReq.builder() .fg("1") .pg("1") .bc(r.getBsshCd()) @@ -419,13 +477,14 @@ public class BizNimsServiceBean extends AbstractServiceBean implements BizNimsSe else errMsg = "변경"; if (bizNimsMapper.updateCancelDsuseRptInfo(dto) == 1) { + // TODO : 폐기 관리 테이블에 사용자보고식별번호 반영 // tb_dsuse_mgt // 조건 : 사용자보고식별번호 = 참조사용자보고식별번호 // => usr_rpt_id_no -> refUsrRptIdNo update // => 취소인 경우 use_yn = 'N' update - if(bizNimsMapper.updateCancelDsuseMgt(dto) == 0){ - throw ApiCustomException.create("폐기보고정보 변경 적용 실패\n[폐기관리테이블에 사용자보고식별번호 = 참조사용자보고식별번호에 해당하는 데이타 미존재]"); - } + // if(bizNimsMapper.updateCancelDsuseMgt(dto) == 0){ + // throw ApiCustomException.create("폐기보고정보 변경 적용 실패\n[폐기관리테이블에 사용자보고식별번호 = 참조사용자보고식별번호에 해당하는 데이타 미존재]"); + // } int cnt = bizNimsMapper.updateCancelDsuseRptInfoDtl(dto); if(cnt == 0) throw ApiCustomException.create(String.format("폐기 정보 상세 %s 실패", errMsg)); @@ -461,6 +520,9 @@ public class BizNimsServiceBean extends AbstractServiceBean implements BizNimsSe dto.setDsusePrvCdNm(Constants.DSUSE_PRV_CD.getName(dto.getDsusePrvCd())); dto.setDsuseMthCdNm(Constants.DSUSE_MTH_CD.getName(dto.getDsuseMthCd())); + // TODO : 폐기 관리 테이블에 사용자보고식별번호 반영 + // 원 사용자 식별 번호 set - 변경/취소 인 경우 + // 신규인 경우는 사용자보고식별번호로 설정 if(!isNew){ String refUsrRptIdNo = dto.getRefUsrRptIdNo(); @@ -485,10 +547,7 @@ public class BizNimsServiceBean extends AbstractServiceBean implements BizNimsSe } - //취소인 경우 상세 데이타 등록 skip - //if("1".equals(dto.getRptTyCd())) return; - - + // TODO : 폐기 관리 테이블에 사용자보고식별번호 반영 if (bizNimsMapper.insertDsuseRptInfo(dto) == 1) { //취소인 경우 상세 데이타 등록 skip @@ -513,8 +572,8 @@ public class BizNimsServiceBean extends AbstractServiceBean implements BizNimsSe * @param resList List * */ - private void setAddBsshInfo(List resList) { - for (BizNimsResponse.DsuseRptInfoResponse r : resList) { + private void setAddBsshInfo(List resList) { + for (BizNimsResponse.DsuseRptInfoRes r : resList) { r.setRptTyCdNm(Constants.RPT_TY_CD.getName(r.getRptTyCd())); r.setDsuseSeCdNm(Constants.DSUSE_SE_CD.getName(r.getDsuseSeCd())); r.setDsusePrvCdNm(Constants.DSUSE_PRV_CD.getName(r.getDsusePrvCd())); @@ -522,7 +581,7 @@ public class BizNimsServiceBean extends AbstractServiceBean implements BizNimsSe if (isEmpty(r.getPrmisnNo())) { List list = saveBsshInfoSt( - BsshInfoRequest.builder() + BsshInfoReq.builder() .fg("1") .pg("1") .bc(r.getBsshCd()) @@ -555,7 +614,7 @@ public class BizNimsServiceBean extends AbstractServiceBean implements BizNimsSe //NimsApiResult.Response result = infNimsService.getProductInfoKd( List list = saveProductInfoKd( - NimsApiRequest.ProductInfoRequest.builder() + NimsApiRequest.ProductInfoReq.builder() .fg("1") .pg("1") .p(r.getPrductCd()) @@ -576,7 +635,7 @@ public class BizNimsServiceBean extends AbstractServiceBean implements BizNimsSe // 제조수입자명(bsshNm) if (isEmpty(r.getBsshNm()) && !isEmpty(r.getBsshCd())) { List list = saveBsshInfoSt( - BsshInfoRequest.builder() + BsshInfoReq.builder() .fg("1") .pg("1") .bc(r.getBsshCd()) @@ -607,7 +666,7 @@ public class BizNimsServiceBean extends AbstractServiceBean implements BizNimsSe productCd = d.getPrductCd(); List mnfList = getMnfSeqInfo( - NimsApiRequest.MnfSeqInfoRequest.builder() + NimsApiRequest.MnfSeqInfoReq.builder() .fg("1") .pg("1") .p(d.getPrductCd()) diff --git a/src/main/java/cokr/xit/adds/biz/nims/web/BizNimsController.java b/src/main/java/cokr/xit/adds/biz/nims/web/BizNimsController.java index 5774c39..2cdf269 100644 --- a/src/main/java/cokr/xit/adds/biz/nims/web/BizNimsController.java +++ b/src/main/java/cokr/xit/adds/biz/nims/web/BizNimsController.java @@ -48,7 +48,7 @@ public class BizNimsController { @Operation(summary = "마약류 취급자 정보 조회(NIMS API)", description = "마약류 취급자 정보 조회

NIMS API 호출 결과를 DB에 저장후 결과 Return

bi-사업자등록번호, hp-요양기관번호, bn-업체명, bc-취급자식별번호 중 하나는 필수") @PostMapping(value = "/getBsshInfoSt") public ApiBaseResponse> getBsshInfoSt( - @RequestBody @Validated NimsApiRequest.BsshInfoRequest dto + @RequestBody @Validated NimsApiRequest.BsshInfoReq dto ) { return ApiBaseResponse.of(bizNimsService.saveBsshInfoSt(dto)); } @@ -56,7 +56,7 @@ public class BizNimsController { @Operation(summary = "마약류 상품 정보 조회(NIMS API)", description = "마약류 상품정보 조회

NIMS API 호출 결과를 DB에 저장후 결과 Return") @PostMapping(value = "/getProductInfoKd") public ApiBaseResponse> getMnfSeqInfo( - @RequestBody @Validated NimsApiRequest.ProductInfoRequest dto + @RequestBody @Validated NimsApiRequest.ProductInfoReq dto ) { return ApiBaseResponse.of(bizNimsService.saveProductInfoKd(dto, false)); } @@ -64,7 +64,7 @@ public class BizNimsController { @Operation(summary = "마약류 상품 정보 & 제조번호 조회(NIMS API)", description = "마약류 상품정보 & 제조번호 조회

NIMS API 호출 결과를 DB에 저장후 결과 Return") @PostMapping(value = "/getProductInfoKdAndMnfSeqInfo") public ApiBaseResponse> getProductInfoKdAndMnfSeqInfo( - @RequestBody @Validated NimsApiRequest.ProductInfoRequest dto + @RequestBody @Validated NimsApiRequest.ProductInfoReq dto ) { return ApiBaseResponse.of(bizNimsService.saveProductInfoKd(dto, true)); } @@ -72,15 +72,15 @@ public class BizNimsController { @Operation(summary = "제조 일련 번호 정보 조회(NIMS API)", description = "제보 일련 번호 정보 조회

NIMS API 호출 결과 Return") @PostMapping(value = "/getMnfSeqInfo") public ApiBaseResponse> getMnfSeqInfo( - @RequestBody @Validated NimsApiRequest.MnfSeqInfoRequest dto + @RequestBody @Validated NimsApiRequest.MnfSeqInfoReq dto ) { return ApiBaseResponse.of(bizNimsService.getMnfSeqInfo(dto)); } - @Operation(summary = "업체 폐기 보고 정보 조회(NIMS API)", description = "업체 폐기 보고 정보 조회

NIMS API 호출 결과를 DB에 저장후 Return") + @Operation(summary = "폐기 보고 정보 목록 조회(NIMS API)", description = "업체의 폐기 보고 정보 목록 조회

NIMS API 호출 결과를 DB에 저장후 Return") @PostMapping("/getDsuseRptInfo") public ApiBaseResponse> getDsuseRptInfo( - @RequestBody @Validated NimsApiRequest.DsuseRptInfoRequest dto + @RequestBody @Validated NimsApiRequest.DsuseRptInfoReq dto ) { return ApiBaseResponse.of(bizNimsService.saveDsuseRptInfo(dto)); } @@ -139,7 +139,7 @@ public class BizNimsController { @Operation(summary = "사고 마약류 폐기 관리 목록 조회", description = "사고 마약류 폐기 관리 목록 조회

사고마약류 관리대장, 결과통보서, 폐기현황등에 필요한 내용 조회") @PostMapping(value = "/getDsuseMgts") - public ApiBaseResponse> getDsuseMgts( + public ApiBaseResponse> getDsuseMgts( @RequestBody BizNimsRequest.DsuseMgtInq dto ) { return ApiBaseResponse.of(bizNimsService.getDsuseMgts(dto)); @@ -153,47 +153,47 @@ public class BizNimsController { - - - @Operation(deprecated = true, summary = "사고 마약류 폐기 관리 생성", description = "사고 마약류 폐기 관리 생성

폐기관리 데이타 생성후 폐기보고 정보 return") - @io.swagger.v3.oas.annotations.parameters.RequestBody(required = true, content = { - @Content(mediaType = "application/json", examples = { - @ExampleObject(value = """ - [ - { - "userId":"userid1", - "usrRptIdNo":"22222", - "orgUsrRptIdNo":"22222" - }, - { - "userId":"userid1", - "usrRptIdNo":"44444", - "orgUsrRptIdNo":"44444" - }, - { - "userId":"userid1", - "usrRptIdNo":"77777", - "orgUsrRptIdNo":"33333" - } - ] - """) - }) - }) - @PostMapping("/saveDsuseMgts") - public ApiBaseResponse> saveDsuseMgts( - @RequestBody List dtos - ) { - return ApiBaseResponse.of(bizNimsService.saveDsuseMgts(dtos)); - } - @Operation(deprecated = true, summary = "사고 마약류 폐기 관리 목록 조회", description = "사고 마약류 폐기 관리 목록 조회

사고마약류 관리대장, 결과통보서, 폐기현황등에 필요한 내용 조회") @PostMapping(value = "/getDsuseMgts2") - public ApiBaseResponse> getDsuseMgts2( + public ApiBaseResponse> getDsuseMgts2( @RequestBody BizNimsRequest.DsuseMgtInq dto ) { return null; //ApiBaseResponse.of(bizNimsService.getDsuseMgts(dto)); } + // @Operation(deprecated = true, summary = "사고 마약류 폐기 관리 생성", description = "사고 마약류 폐기 관리 생성

폐기관리 데이타 생성후 폐기보고 정보 return") + // @io.swagger.v3.oas.annotations.parameters.RequestBody(required = true, content = { + // @Content(mediaType = "application/json", examples = { + // @ExampleObject(value = """ + // [ + // { + // "userId":"userid1", + // "usrRptIdNo":"22222", + // "orgUsrRptIdNo":"22222" + // }, + // { + // "userId":"userid1", + // "usrRptIdNo":"44444", + // "orgUsrRptIdNo":"44444" + // }, + // { + // "userId":"userid1", + // "usrRptIdNo":"77777", + // "orgUsrRptIdNo":"33333" + // } + // ] + // """) + // }) + // }) + // @PostMapping("/saveDsuseMgts") + // public ApiBaseResponse> saveDsuseMgts( + // @RequestBody List dtos + // ) { + // return ApiBaseResponse.of(bizNimsService.saveDsuseMgts(dtos)); + // } + + + // @Operation(summary = "관할 허가 관청 정보 조회(NIMS API)", description = "관할 허가 관청 정보 조회

NIMS API 호출 결과 Return") diff --git a/src/main/java/cokr/xit/adds/core/Constants.java b/src/main/java/cokr/xit/adds/core/Constants.java index 7fa7a2b..b655986 100644 --- a/src/main/java/cokr/xit/adds/core/Constants.java +++ b/src/main/java/cokr/xit/adds/core/Constants.java @@ -179,6 +179,54 @@ public class Constants { } } + /** + *
+     * 폐기관리진행상태 - ADDS11
+     * 01-폐기신청서 접수
+     * 02-폐기보고 매핑
+     * 11-민원수령처리(전자결재)
+     * 21-폐기결과통보서 작성
+     * 22-폐기결과보고서 작성
+     * 31-기안 및 발송
+     * 41-폐기보고
+     * 99-종료
+     * 
+ */ + @Getter + public enum PRGRS_STTS_CD { + // 폐기보고신청서의 데이타 입력 생성 - 폐기관리 데이타 생성 + RECEIPT("01", "폐기신청서접수"), + // 폐기보고 데이타 매핑 완료 + MAPPING("02", "폐기보고매핑"), + ACCEPT("11", "민원수령처리(전자결재)"), + NOTICE_WRITE("21", "폐기결과통보서작성"), + REPORT_WRITE("22", "폐기결과보고서작성"), + DRAFT("31", "기안 및 발송"), + REPORT("41", "폐기보고"), + END("99", "종료") + ; + + private final String code; + private final String nm; + + PRGRS_STTS_CD(String code, String nm) { + this.code = code; + this.nm = nm; + } + + public static String getName(final String code){ + if(StringUtils.isEmpty(code)) return StringUtils.EMPTY; + + return Arrays.stream(PRGRS_STTS_CD.values()) + .filter(ssc -> ssc.getCode().equals(code)) + .findFirst() + .map(PRGRS_STTS_CD::getNm) + .orElseThrow(() -> ApiCustomException.create(String.format("미 정의된 폐기 관리 진행 상태 코드[%s]", code))); + //return eNum.getNm(); + } + } + + /** *
      * 이동 유형 코드 - ADDS06
diff --git a/src/main/java/cokr/xit/adds/inf/iros/model/DrugPrdtMcpnDtlRequest.java b/src/main/java/cokr/xit/adds/inf/iros/model/DrugPrdtMcpnDtlReq.java
similarity index 95%
rename from src/main/java/cokr/xit/adds/inf/iros/model/DrugPrdtMcpnDtlRequest.java
rename to src/main/java/cokr/xit/adds/inf/iros/model/DrugPrdtMcpnDtlReq.java
index b921093..3915ac5 100644
--- a/src/main/java/cokr/xit/adds/inf/iros/model/DrugPrdtMcpnDtlRequest.java
+++ b/src/main/java/cokr/xit/adds/inf/iros/model/DrugPrdtMcpnDtlReq.java
@@ -28,13 +28,13 @@ import lombok.NoArgsConstructor;
  *
  * 
*/ -@Schema(name = "DrugPrdtMcpnDtlRequest", description = "의약 제품 주성분 상세 정보 조회 request") +@Schema(name = "DrugPrdtMcpnDtlReq", description = "의약 제품 주성분 상세 정보 조회 request") @JsonInclude(JsonInclude.Include.NON_EMPTY) @Data @NoArgsConstructor @AllArgsConstructor @Builder -public class DrugPrdtMcpnDtlRequest { +public class DrugPrdtMcpnDtlReq { @Schema(requiredMode = REQUIRED, title = "서비스 키", description = "서비스 키", example = "0fTkYnZU6XjaAPAp6GzKW9Q6fYq8iaoSH9wKUZwz2PBjRXGM04aUgtO3a61xYGjL8nFZn4fjLGS9XErhMSXq%2Bw%3D%3D") @NotEmpty(message = "서비스 키는 필수 입니다") private String serviceKey; diff --git a/src/main/java/cokr/xit/adds/inf/iros/service/InfIrosService.java b/src/main/java/cokr/xit/adds/inf/iros/service/InfIrosService.java index 6a38e54..b90659b 100644 --- a/src/main/java/cokr/xit/adds/inf/iros/service/InfIrosService.java +++ b/src/main/java/cokr/xit/adds/inf/iros/service/InfIrosService.java @@ -1,7 +1,7 @@ package cokr.xit.adds.inf.iros.service; import cokr.xit.adds.inf.iros.model.DrugPrdtMcpnDtl; -import cokr.xit.adds.inf.iros.model.DrugPrdtMcpnDtlRequest; +import cokr.xit.adds.inf.iros.model.DrugPrdtMcpnDtlReq; import cokr.xit.adds.inf.iros.model.IrosResponse; /** @@ -20,5 +20,5 @@ import cokr.xit.adds.inf.iros.model.IrosResponse; * */ public interface InfIrosService { - IrosResponse getDrugPrdtMcpnDtls(DrugPrdtMcpnDtlRequest dto); + IrosResponse getDrugPrdtMcpnDtls(DrugPrdtMcpnDtlReq dto); } diff --git a/src/main/java/cokr/xit/adds/inf/iros/service/bean/InfIrosServiceBean.java b/src/main/java/cokr/xit/adds/inf/iros/service/bean/InfIrosServiceBean.java index 41c6a8b..bbebb78 100644 --- a/src/main/java/cokr/xit/adds/inf/iros/service/bean/InfIrosServiceBean.java +++ b/src/main/java/cokr/xit/adds/inf/iros/service/bean/InfIrosServiceBean.java @@ -13,7 +13,7 @@ import com.fasterxml.jackson.core.type.TypeReference; import cokr.xit.adds.core.spring.exception.ApiCustomException; import cokr.xit.adds.core.util.ApiUtil; import cokr.xit.adds.inf.iros.model.DrugPrdtMcpnDtl; -import cokr.xit.adds.inf.iros.model.DrugPrdtMcpnDtlRequest; +import cokr.xit.adds.inf.iros.model.DrugPrdtMcpnDtlReq; import cokr.xit.adds.inf.iros.model.IrosResponse; import cokr.xit.adds.inf.iros.service.InfIrosService; import cokr.xit.foundation.component.AbstractServiceBean; @@ -53,7 +53,7 @@ public class InfIrosServiceBean extends AbstractServiceBean implements InfIrosSe private String drugPrdtMcpnDtlInq; @Override - public IrosResponse getDrugPrdtMcpnDtls(DrugPrdtMcpnDtlRequest dto) { + public IrosResponse getDrugPrdtMcpnDtls(DrugPrdtMcpnDtlReq dto) { dto.setServiceKey(irosApiKey); ApiUtil.validate(dto, null, validator); diff --git a/src/main/java/cokr/xit/adds/inf/iros/web/InfIrosController.java b/src/main/java/cokr/xit/adds/inf/iros/web/InfIrosController.java index c1eac57..d20abd0 100644 --- a/src/main/java/cokr/xit/adds/inf/iros/web/InfIrosController.java +++ b/src/main/java/cokr/xit/adds/inf/iros/web/InfIrosController.java @@ -7,7 +7,7 @@ import org.springframework.web.bind.annotation.RestController; import cokr.xit.adds.core.model.ApiBaseResponse; import cokr.xit.adds.inf.iros.model.DrugPrdtMcpnDtl; -import cokr.xit.adds.inf.iros.model.DrugPrdtMcpnDtlRequest; +import cokr.xit.adds.inf.iros.model.DrugPrdtMcpnDtlReq; import cokr.xit.adds.inf.iros.model.IrosResponse; import cokr.xit.adds.inf.iros.service.InfIrosService; import io.swagger.v3.oas.annotations.Operation; @@ -39,7 +39,7 @@ public class InfIrosController { @Operation(summary = "의약 제품 주성분 상세 정보 조회", description = "의약 제품 주성분 상세 정보 조회") @PostMapping("/getDrugPrdtMcpnDtls") public ApiBaseResponse> getDrugPrdtMcpnDtls( - @RequestBody DrugPrdtMcpnDtlRequest dto + @RequestBody DrugPrdtMcpnDtlReq dto ) { return ApiBaseResponse.of(infIrosService.getDrugPrdtMcpnDtls(dto)); } diff --git a/src/main/java/cokr/xit/adds/inf/nims/model/NimsApiDto.java b/src/main/java/cokr/xit/adds/inf/nims/model/NimsApiDto.java index 9cf71dd..3d54d8a 100644 --- a/src/main/java/cokr/xit/adds/inf/nims/model/NimsApiDto.java +++ b/src/main/java/cokr/xit/adds/inf/nims/model/NimsApiDto.java @@ -6,12 +6,18 @@ import java.util.List; import javax.validation.Valid; +import org.apache.commons.lang3.StringUtils; + import com.fasterxml.jackson.annotation.JsonAlias; +import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.core.JsonGenerator; import com.fasterxml.jackson.databind.JsonSerializer; import com.fasterxml.jackson.databind.SerializerProvider; import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import cokr.xit.adds.biz.nims.model.BizNimsRequest; +import cokr.xit.adds.biz.nims.model.BizNimsResponse; +import cokr.xit.adds.core.Constants; import cokr.xit.adds.core.model.AuditDto; import cokr.xit.adds.core.spring.exception.ApiCustomException; import lombok.AllArgsConstructor; @@ -404,6 +410,141 @@ public class NimsApiDto { @Builder.Default @Valid private List dsuseRptInfoDtls = new ArrayList<>(); + + /** + *
+         * 폐기 관리 정보에 폐기 보고 정보 매핑 처리
+         * -> 사용자보고라인식별번호가 매핑되지 않은 경우 - 신규인 경우
+         * -> 폐기관리진행상태가 폐기신청서 접수인 상태의 데이타 대상
+         *
+         * 1. 폐기 관리 정보와 폐기 보고 정보가 동일한 데이타 매핑
+         * 2. 폐기관리 데이타 set
+         *    -> 폐기보고진생상태 - 폐기보고매핑(02)으로 set
+         *    -> 사용자보고식별번호, 원사용자보고식별번호, 보고유형코드, 처리상태 set
+         * @param dsuseMgts List 진행중인 폐기관리목록
+         * @return List 매핑 목록
+         * 
+ */ + @JsonIgnore + public List mappingNewDsuseRptInfo(List dsuseMgts){ + List newList = new ArrayList<>(); + + for(BizNimsResponse.DsuseMgtRes mgtDto: dsuseMgts) { + // 폐기 신청서 접수 상태 데이타만 처리 + if (Constants.PRGRS_STTS_CD.RECEIPT.getCode().equals(mgtDto.getPrgrsSttsCd())) { + String rptInfo = String.join("", + this.bsshCd, // 마약류취급자식별번호 + this.hdrDe, // 취급일자 + this.rptDe, // 보고일자 + this.dsuseSeCd, // 폐기구분코드 + this.dsusePrvCd, // 폐기사유코드 + this.dsuseMthCd, // 폐기방법코드 + this.dsuseDe, // 폐기일자 + String.valueOf(this.rndDtlRptCnt) // 수불상세보고수 + ); + String mgtInfo = String.join("", + mgtDto.getBsshCd(), // 마약류취급자식별번호 + mgtDto.getHdrDe(), // 취급일자 + mgtDto.getRptDe(), // 보고일자 + mgtDto.getDsuseSeCd(), // 폐기구분코드 + mgtDto.getDsusePrvCd(), // 폐기사유코드 + mgtDto.getDsuseMthCd(), // 폐기방법코드 + mgtDto.getDsuseDe(), // 폐기일자 + String.valueOf(mgtDto.getRndDtlRptCnt()) // 수불상세보고수 + ); + + // FIXME: 폐기관리와 폐기보고의 상품정보 일치 여부 set - 비교 필드 확정 필요 + if (rptInfo.equals(mgtInfo)) { + if (this.dsuseRptInfoDtls.size() == mgtDto.getDsuseMgtDtls().size()) { + for (DsuseRptInfoDtl rptDtl : this.dsuseRptInfoDtls) { + for (BizNimsRequest.DsuseMgtDtl mgtDtl : mgtDto.getDsuseMgtDtls()) { + if (rptDtl.getPrductCd().equals(mgtDtl.getPrductCd()) + // && rptDtl.getMnfNo().equals(mgtDtl.getMnfNo()) + // && rptDtl.getPrdValidDe().equals(mgtDtl.getPrdValidDe()) + // && rptDtl.getMnfSeq().equals(mgtDtl.getMnfSeq()) + && rptDtl.getDsuseQy().equals(mgtDtl.getDsuseQy())) { + mgtDtl.setValidYn("Y"); + break; + } + } + } + } + mgtDto.setUsrRptIdNo(this.usrRptIdNo); + mgtDto.setOrgUsrRptIdNo(this.orgUsrRptIdNo); + mgtDto.setRptTyCd(this.rptTyCd); + mgtDto.setStts(this.status); + mgtDto.setPrgrsSttsCd(Constants.PRGRS_STTS_CD.MAPPING.getCode()); + mgtDto.setRgtr(this.getRgtr()); + newList.add(mgtDto); + } + } + } + return newList; + } + + + /** + *
+         * 폐기 관리 정보에 폐기 보고 정보 매핑 처리
+         * -> 사용자보고라인식별번호가 매핑되어 있는 경우
+         *
+         * 1. 원사용자식별번호가 동일한 데이타 매핑
+         * 2. 폐기관리 데이타 set
+         *    2-1. 취소인경우 - 폐기관리에 매핑된 정보 초기화(폐기보고신청서접수 상태로)
+         *    2-2. 변경인 경우
+         *    -> 폐기보고진생상태 - 폐기보고매핑(02)으로 set
+         *    -> 사용자보고식별번호, 원사용자보고식별번호, 보고유형코드, 처리상태 set
+         * @param dsuseMgts List 진행중인 폐기관리목록
+         * @return List 매핑 목록
+         * 
+ */ + @JsonIgnore + public List mappingDsuseRptInfo(List dsuseMgts){ + List newList = new ArrayList<>(); + + for(BizNimsResponse.DsuseMgtRes mgtDto: dsuseMgts) { + + if (this.orgUsrRptIdNo.equals(mgtDto.getOrgUsrRptIdNo())) { + + // 취소인 경우 + // 폐기관리에 매핑된 정보 초기화 + if (Constants.RPT_TY_CD.CANCEL.getCode().equals(this.rptTyCd)) { + mgtDto.setUsrRptIdNo(StringUtils.EMPTY); + mgtDto.setOrgUsrRptIdNo(StringUtils.EMPTY); + mgtDto.setRptTyCd(StringUtils.EMPTY); + mgtDto.setStts(StringUtils.EMPTY); + mgtDto.setPrgrsSttsCd(Constants.PRGRS_STTS_CD.RECEIPT.getCode()); + mgtDto.setRgtr(this.getRgtr()); + newList.add(mgtDto); + continue; + } + + // FIXME: 상품정보 미일치 여부 set - 비교 필드 확정 필요 + if (this.dsuseRptInfoDtls.size() == mgtDto.getDsuseMgtDtls().size()) { + for (DsuseRptInfoDtl rptDtl : this.dsuseRptInfoDtls) { + for (BizNimsRequest.DsuseMgtDtl mgtDtl : mgtDto.getDsuseMgtDtls()) { + if (rptDtl.getPrductCd().equals(mgtDtl.getPrductCd()) + // && rptDtl.getMnfNo().equals(mgtDtl.getMnfNo()) + // && rptDtl.getPrdValidDe().equals(mgtDtl.getPrdValidDe()) + // && rptDtl.getMnfSeq().equals(mgtDtl.getMnfSeq()) + && rptDtl.getDsuseQy().equals(mgtDtl.getDsuseQy())) { + mgtDtl.setValidYn("Y"); + break; + } + } + } + } + mgtDto.setUsrRptIdNo(this.usrRptIdNo); + mgtDto.setOrgUsrRptIdNo(this.orgUsrRptIdNo); + mgtDto.setRptTyCd(this.rptTyCd); + mgtDto.setStts(this.status); + mgtDto.setPrgrsSttsCd(Constants.PRGRS_STTS_CD.MAPPING.getCode()); + mgtDto.setRgtr(this.getRgtr()); + newList.add(mgtDto); + } + } + return newList; + } } @Getter @@ -512,6 +653,7 @@ public class NimsApiDto { + // /** // * 관할 허가 관청 정보 조회 response // */ diff --git a/src/main/java/cokr/xit/adds/inf/nims/model/NimsApiRequest.java b/src/main/java/cokr/xit/adds/inf/nims/model/NimsApiRequest.java index 536a74f..483b28e 100644 --- a/src/main/java/cokr/xit/adds/inf/nims/model/NimsApiRequest.java +++ b/src/main/java/cokr/xit/adds/inf/nims/model/NimsApiRequest.java @@ -34,12 +34,12 @@ public class NimsApiRequest { /** * 마약류 취급자 정보 조회 request */ - @Schema(name = "BsshInfoRequest", description = "마약류 취급자 정보 조회 request") + @Schema(name = "BsshInfoReq", description = "마약류 취급자 정보 조회 request") @Data @NoArgsConstructor @AllArgsConstructor @Builder - public static class BsshInfoRequest { + public static class BsshInfoReq { /** * 인증키 @@ -128,12 +128,12 @@ public class NimsApiRequest { /** * 상품 정보 조회 request */ - @Schema(name = "ProductInfoRequest", description = "상품 정보 조회 request") + @Schema(name = "ProductInfoReq", description = "상품 정보 조회 request") @Data @NoArgsConstructor @AllArgsConstructor @Builder - public static class ProductInfoRequest { + public static class ProductInfoReq { /** * 인증키 */ @@ -205,12 +205,12 @@ public class NimsApiRequest { private String dbSkipYn = "N"; } - @Schema(name = "DsuseRptInfoRequest", description = "폐기 보고 정보 조회 request") + @Schema(name = "DsuseRptInfoReq", description = "폐기 보고 정보 조회 request") @Data @NoArgsConstructor @AllArgsConstructor @Builder - public static class DsuseRptInfoRequest { + public static class DsuseRptInfoReq { /** * 인증키 */ @@ -318,12 +318,12 @@ public class NimsApiRequest { /** * 제품 일련 번호 정보 조회 request */ - @Schema(name = "MnfSeqInfoRequest", description = "제품 일련 번호 정보 조회 request") + @Schema(name = "MnfSeqInfoReq", description = "제품 일련 번호 정보 조회 request") @Data @NoArgsConstructor @AllArgsConstructor @Builder - public static class MnfSeqInfoRequest { + public static class MnfSeqInfoReq { /** * 인증키 */ @@ -382,7 +382,7 @@ public class NimsApiRequest { // @NoArgsConstructor // @AllArgsConstructor // @Builder - // public static class JurisdictionGovInfoRequest { + // public static class JurisdictionGovInfoReq { // /** // * 인증키 // */ @@ -435,7 +435,7 @@ public class NimsApiRequest { // @NoArgsConstructor // @AllArgsConstructor // @Builder - // public static class StorageInfoRequest { + // public static class StorageInfoReq { // /** // * 인증키 // */ diff --git a/src/main/java/cokr/xit/adds/inf/nims/service/InfNimsService.java b/src/main/java/cokr/xit/adds/inf/nims/service/InfNimsService.java index bff1a14..d4235fd 100644 --- a/src/main/java/cokr/xit/adds/inf/nims/service/InfNimsService.java +++ b/src/main/java/cokr/xit/adds/inf/nims/service/InfNimsService.java @@ -20,15 +20,15 @@ import cokr.xit.adds.inf.nims.model.NimsApiResult; * */ public interface InfNimsService { - NimsApiResult.Response getBsshInfoSt(NimsApiRequest.BsshInfoRequest dto); + NimsApiResult.Response getBsshInfoSt(NimsApiRequest.BsshInfoReq dto); - NimsApiResult.Response getProductInfoKd(NimsApiRequest.ProductInfoRequest dto); + NimsApiResult.Response getProductInfoKd(NimsApiRequest.ProductInfoReq dto); - NimsApiResult.Response getMnfSeqInfo(NimsApiRequest.MnfSeqInfoRequest dto); + NimsApiResult.Response getMnfSeqInfo(NimsApiRequest.MnfSeqInfoReq dto); // // NimsApiResult.Response getJurisdictionGovInfo(NimsApiRequest.JurisdictionGovInfoRequest dto); // // NimsApiResult.Response getStorageInfo(NimsApiRequest.StorageInfoRequest dto); - NimsApiResult.Response getDsuseRptInfo(NimsApiRequest.DsuseRptInfoRequest dto); + NimsApiResult.Response getDsuseRptInfo(NimsApiRequest.DsuseRptInfoReq dto); } diff --git a/src/main/java/cokr/xit/adds/inf/nims/service/bean/InfNimsServiceBean.java b/src/main/java/cokr/xit/adds/inf/nims/service/bean/InfNimsServiceBean.java index e69b8ce..5b995a2 100644 --- a/src/main/java/cokr/xit/adds/inf/nims/service/bean/InfNimsServiceBean.java +++ b/src/main/java/cokr/xit/adds/inf/nims/service/bean/InfNimsServiceBean.java @@ -77,7 +77,7 @@ public class InfNimsServiceBean extends AbstractServiceBean implements InfNimsSe @Override @TraceLogging - public NimsApiResult.Response getBsshInfoSt(NimsApiRequest.BsshInfoRequest dto) { + public NimsApiResult.Response getBsshInfoSt(NimsApiRequest.BsshInfoReq dto) { dto.setK(nimsApiKey); ApiUtil.validate(dto, null, validator); if(isEmpty(dto.getBi()) && isEmpty(dto.getHp()) && isEmpty(dto.getBn()) && isEmpty(dto.getBc())) { @@ -92,7 +92,7 @@ public class InfNimsServiceBean extends AbstractServiceBean implements InfNimsSe @Override @TraceLogging - public NimsApiResult.Response getProductInfoKd(NimsApiRequest.ProductInfoRequest dto) { + public NimsApiResult.Response getProductInfoKd(NimsApiRequest.ProductInfoReq dto) { dto.setK(nimsApiKey); ApiUtil.validate(dto, null, validator); if(!isEmpty(dto.getYmd())) ApiUtil.checkYmdError(dto.getYmd(), null); @@ -104,7 +104,7 @@ public class InfNimsServiceBean extends AbstractServiceBean implements InfNimsSe @Override @TraceLogging - public NimsApiResult.Response getMnfSeqInfo(NimsApiRequest.MnfSeqInfoRequest dto) { + public NimsApiResult.Response getMnfSeqInfo(NimsApiRequest.MnfSeqInfoReq dto) { dto.setK(nimsApiKey); ApiUtil.validate(dto, null, validator); if(!isEmpty(dto.getYmd())) ApiUtil.checkYmdError(dto.getYmd(), null); @@ -147,7 +147,7 @@ public class InfNimsServiceBean extends AbstractServiceBean implements InfNimsSe // } @Override - public NimsApiResult.Response getDsuseRptInfo(NimsApiRequest.DsuseRptInfoRequest dto) { + public NimsApiResult.Response getDsuseRptInfo(NimsApiRequest.DsuseRptInfoReq dto) { dto.setK(nimsApiKey); dto.setFg4(ofCd); ApiUtil.validate(dto, null, validator); @@ -201,16 +201,17 @@ public class InfNimsServiceBean extends AbstractServiceBean implements InfNimsSe NimsApiDto.DsuseRptInfo dsuseRpt = NimsApiDto.DsuseRptInfo.builder() .usrRptIdNo(usrRptIdNoList.get(i)) .refUsrRptIdNo("0".equals(rptTyCds.get(i))? null : refUsrRptIdNos.get(refIdx++)) - .bsshCd("H00008333") - .bsshNm("수지미래산부인과의원") .indutyNm("마약류취급의료업") .rptTyCd(rptTyCds.get(i)) .rndDtlRptCnt("1".equals(rptTyCds.get(i))? 0 : 2) + .bsshCd("H00008333") + .bsshNm("수지미래산부인과의원") .hdrDe("20240401") .rptDe("20240401") .dsuseSeCd("1") .dsusePrvCd("01") - .dsuseMthCd("1") + .dsuseMthCd("3") + .dsuseDe("20240306") .dsuseLoc("보건소") .status("0") .dsuseRptInfoDtls("1".equals(rptTyCds.get(i))? null : List.of(dtl1, dtl2)) diff --git a/src/main/java/cokr/xit/adds/inf/nims/web/InfNimsController.java b/src/main/java/cokr/xit/adds/inf/nims/web/InfNimsController.java index dab8378..f0d5ede 100644 --- a/src/main/java/cokr/xit/adds/inf/nims/web/InfNimsController.java +++ b/src/main/java/cokr/xit/adds/inf/nims/web/InfNimsController.java @@ -39,7 +39,7 @@ public class InfNimsController { @Operation(summary = "마약류 취급자 정보 조회", description = "마약류 취급자 정보 조회") @PostMapping("/getBsshInfoSt") public ApiBaseResponse> getBsshInfoSt( - @RequestBody NimsApiRequest.BsshInfoRequest dto + @RequestBody NimsApiRequest.BsshInfoReq dto ) { return ApiBaseResponse.of(infNimsService.getBsshInfoSt(dto)); } @@ -47,7 +47,7 @@ public class InfNimsController { @Operation(summary = "마약류 상품 정보 조회", description = "마약류 상품정보 조회") @PostMapping("/getProductInfoKd") public ApiBaseResponse> getProductInfoKd( - @RequestBody NimsApiRequest.ProductInfoRequest dto + @RequestBody NimsApiRequest.ProductInfoReq dto ) { return ApiBaseResponse.of(infNimsService.getProductInfoKd(dto)); } @@ -55,7 +55,7 @@ public class InfNimsController { @Operation(summary = "제조 일련 번호 정보 조회", description = "제조 일련 번호 정보 조회") @PostMapping("/getMnfSeqInfo") public ApiBaseResponse> getMnfSeqInfo( - @RequestBody NimsApiRequest.MnfSeqInfoRequest dto + @RequestBody NimsApiRequest.MnfSeqInfoReq dto ) { return ApiBaseResponse.of(infNimsService.getMnfSeqInfo(dto)); } @@ -79,7 +79,7 @@ public class InfNimsController { @Operation(summary = "폐기 보고 정보 조회", description = "폐기 보고 정보 조회") @PostMapping("/getDsuseRptInfo") public ApiBaseResponse> getDsuseRptInfo( - @RequestBody NimsApiRequest.DsuseRptInfoRequest dto + @RequestBody NimsApiRequest.DsuseRptInfoReq dto ) { return ApiBaseResponse.of(infNimsService.getDsuseRptInfo(dto)); } diff --git a/src/main/resources/sql/mapper/biz/nims-mysql-mapper.xml b/src/main/resources/sql/mapper/biz/nims-mysql-mapper.xml index 4f9d5fc..97fd9f9 100644 --- a/src/main/resources/sql/mapper/biz/nims-mysql-mapper.xml +++ b/src/main/resources/sql/mapper/biz/nims-mysql-mapper.xml @@ -109,7 +109,7 @@ mdfr = #{rgtr} - /** nims-mysql-mapper|selectBsshInfos-마약류취급자정보 조회|julim */ SELECT bssh_cd, /* 마약류취급자식별번호 */ bssh_nm, /* 마약류취급자명 */ @@ -140,7 +140,7 @@ - /** nims-mysql-mapper|selectProductInfo-상품 정보 조회|julim */ SELECT prduct_cd, /* 제품코드 */ prdlst_mst_cd, /* 제품대표코드 */ @@ -254,13 +254,20 @@ ) - /** nims-mysql-mapper|selectDsuseMgts-폐기관리 목록 조회|julim */ - WHERE tdm.dscdmng_id IN - - #{item} - + + + AND dscdmng_id IN + + #{item} + + + + AND prgrs_stts_cd != #{prgrsSttsCd} + + @@ -288,7 +295,7 @@ ON tdm.bssh_cd = tbi.bssh_cd - /** nims-mysql-mapper|selectDsuseMgtDtls-폐기관리 상세 목록 조회|julim */ SELECT tdmd.dscdmng_id, /* 폐기관리ID */ tdmd.dscdmng_sn, /* 폐기관리일련번호 */ @@ -314,7 +321,7 @@ FROM tb_dsuse_mgt_dtl tdmd LEFT JOIN tb_prduct_info tpi ON (tdmd.prduct_cd = tpi.prduct_cd) - -- AND tdrid.use_yn = 'Y') + -- AND tdmd.use_yn = 'Y') LEFT JOIN tb_bssh_info tbi ON (tpi.bssh_cd = tbi.bssh_cd) WHERE tdmd.dscdmng_id = #{dscdmngId} @@ -331,6 +338,35 @@ AND tdmd.usr_rpt_id_no = #{usrRptIdNo} + + + + /** nims-mysql-mapper|updateMappingDsuseMgt-폐기관리 매핑정보 update|julim */ + UPDATE tb_dsuse_mgt + SET prgrs_stts_cd = #{prgrsSttsCd} + , usr_rpt_id_no = #{usrRptIdNo} + , org_usr_rpt_id_no = #{orgUsrRptIdNo} + , rpt_ty_cd = #{rptTyCd} + , stts = #{status} + , mdfcn_dt = DATE_FORMAT(now(), '%Y%m%d%H%i%s') + , mdfr = #{rgtr} + WHERE dscdmng_id = #{dscdmngId} + AND use_yn = 'Y' + + + + + + /** nims-mysql-mapper|updateCancelDsuseMgt-폐기관리 취소(참조사용자식별번호로)|julim */ + UPDATE tb_dsuse_mgt + SET usr_rpt_id_no = #{usrRptIdNo} + , use_yn = IF(#{rptTyCd} = '1', 'N', use_yn) + , mdfcn_dt = DATE_FORMAT(now(), '%Y%m%d%H%i%s') + , mdfr = #{rgtr} + WHERE usr_rpt_id_no = #{refUsrRptIdNo} + AND use_yn = 'Y' + + @@ -501,17 +537,6 @@ AND use_yn = 'Y' - - /** nims-mysql-mapper|updateCancelDsuseMgt-폐기관리 취소(참조사용자식별번호로)|julim */ - UPDATE tb_dsuse_mgt - SET usr_rpt_id_no = #{usrRptIdNo} - , use_yn = IF(#{rptTyCd} = '1', 'N', use_yn) - , mdfcn_dt = DATE_FORMAT(now(), '%Y%m%d%H%i%s') - , mdfr = #{rgtr} - WHERE usr_rpt_id_no = #{refUsrRptIdNo} - AND use_yn = 'Y' - - /** nims-mysql-mapper|updateCancelDsuseRptInfoDtl-폐기보고정보 상세 취소|julim */ UPDATE tb_dsuse_rpt_info_dtl @@ -530,6 +555,9 @@ FROM tb_dsuse_rpt_info WHERE usr_rpt_id_no = #{refUsrRptIdNo} + + + @@ -546,7 +574,7 @@ - /** nims-mysql-mapper|selectDsuseMgts-폐기관리목록 조회|julim */ WHERE tdm.dscdmng_id IN diff --git a/src/test/java/cokr/xit/adds/inf/iros/IrosRestfulTest.java b/src/test/java/cokr/xit/adds/inf/iros/IrosRestfulTest.java index ac893b7..6ff03fb 100644 --- a/src/test/java/cokr/xit/adds/inf/iros/IrosRestfulTest.java +++ b/src/test/java/cokr/xit/adds/inf/iros/IrosRestfulTest.java @@ -11,7 +11,7 @@ import org.springframework.test.context.junit.jupiter.SpringExtension; import com.fasterxml.jackson.core.type.TypeReference; import cokr.xit.adds.inf.iros.model.DrugPrdtMcpnDtl; -import cokr.xit.adds.inf.iros.model.DrugPrdtMcpnDtlRequest; +import cokr.xit.adds.inf.iros.model.DrugPrdtMcpnDtlReq; import cokr.xit.adds.inf.iros.model.IrosResponse; import cokr.xit.foundation.data.JSON; import cokr.xit.foundation.web.WebClient; @@ -41,7 +41,7 @@ public class IrosRestfulTest { @Test public void testDrugPrdtMcpnDtl() { - final DrugPrdtMcpnDtlRequest param = DrugPrdtMcpnDtlRequest.builder() + final DrugPrdtMcpnDtlReq param = DrugPrdtMcpnDtlReq.builder() .serviceKey(serviceKey) .pageNo("1") .numOfRows("10")