From f18c6a2f39e61a03d7639e5c7c36fabe6eb3f430 Mon Sep 17 00:00:00 2001 From: "Jonguk. Lim" Date: Mon, 1 Jul 2024 12:22:01 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20NIMS=20API=20=EC=A1=B0=ED=9A=8C=EC=8B=9C?= =?UTF-8?q?=20=EC=82=AC=EC=9A=A9=EC=9E=90=EB=B3=B4=EA=B3=A0=EC=8B=9D?= =?UTF-8?q?=EB=B3=84=EC=95=84=EC=9D=B4=EB=94=94=20=EA=B0=92=EC=9D=B4=20?= =?UTF-8?q?=EC=9E=88=EB=8A=94=20=EA=B2=BD=EC=9A=B0,=20NIMS=20=EC=83=81?= =?UTF-8?q?=ED=83=9C=EA=B0=92=20=EB=AC=B4=EC=8B=9C=20=ED=95=98=EB=8F=84?= =?UTF-8?q?=EB=A1=9D=20=EB=B3=80=EA=B2=BD('=ED=99=95=EC=9D=B8'=20=EC=83=81?= =?UTF-8?q?=ED=83=9C=EB=8F=84=20=EC=A1=B0=ED=9A=8C)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../nims/service/bean/BizNimsServiceBean.java | 23 +++++++++++++++---- 1 file changed, 18 insertions(+), 5 deletions(-) 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 b55c27b..91617da 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 @@ -251,7 +251,7 @@ public class BizNimsServiceBean extends AbstractServiceBean implements BizNimsSe reqDto.setGc(apiInfInfo.get("deptCd")); // 관할관청코드 ApiUtil.validate(reqDto, null, validator); - List rtnList = findNimsDsuseRptsOfApi(reqDto); + List rtnList = findNimsDsuseRptsOfApi(reqDto, false); rtnList.sort((a, b) -> a.getUsrRptIdNo().compareTo(b.getUsrRptIdNo())); return rtnList; @@ -438,10 +438,17 @@ public class BizNimsServiceBean extends AbstractServiceBean implements BizNimsSe .sdt(dsuseMgtDto.getHdrDe()) .edt(dsuseMgtDto.getHdrDe()) .bc(dsuseMgtDto.getBsshCd()) + .ur(dsuseMgtDto.getUsrRptIdNo()) .userId(reqDto.getUserId()) .build(); - List rtnList = saveFromfindDsuseRptDataByNimsApi(rptDto); + // 폐기보고 확인(NIMS 폐기 완료 - 상태가 "확인" 인 경우 데이타 조회 추가 + List rtnList = null; + if(!isEmpty(dsuseMgtDto.getUsrRptIdNo()) && Constants.PRGRS_STTS_CD.COMPLETE.getCode().equals(dsuseMgtDto.getPrgrsSttsCd())) { + rtnList = findNimsDsuseRptsOfApi(rptDto, true); + }else { + rtnList = saveFromfindDsuseRptDataByNimsApi(rptDto); + } for(NimsApiDto.DsuseRptInfo dto : rtnList){ // 7. FIXME : 폐기 관리 데이타와 매핑 @@ -615,7 +622,7 @@ public class BizNimsServiceBean extends AbstractServiceBean implements BizNimsSe * */ private List saveFromfindDsuseRptDataByNimsApi(NimsApiRequest.DsuseRptInfoReq reqDto) { - List nimsList = findNimsDsuseRptsOfApi(reqDto); + List nimsList = findNimsDsuseRptsOfApi(reqDto, false); // 신규 작업대상 데이타 List List newList = new ArrayList<>(); @@ -684,9 +691,15 @@ public class BizNimsServiceBean extends AbstractServiceBean implements BizNimsSe return new ArrayList<>(concurrentList); } - private List findNimsDsuseRptsOfApi(NimsApiRequest.DsuseRptInfoReq reqDto) { + /** + * + * @param reqDto + * @param isUsrRptIdNo "확인" 상태의 데이타 조회 여부 + * @return + */ + private List findNimsDsuseRptsOfApi(NimsApiRequest.DsuseRptInfoReq reqDto, boolean isUsrRptIdNo) { List nimsList = new ArrayList<>(); - boolean isUsrRptIdNo = !isEmpty(reqDto.getUr()); + //boolean isUsrRptIdNo = !isEmpty(reqDto.getUr()); while(true) { NimsApiResult.Response rslt = infNimsService.getDsuseRptInfo(reqDto);