fix: NIMS API 조회시 사용자보고식별아이디 값이 있는 경우, NIMS 상태값 무시 하도록 변경('확인' 상태도 조회)

dev
Jonguk. Lim 5 months ago
parent c5e062aa9b
commit f18c6a2f39

@ -251,7 +251,7 @@ public class BizNimsServiceBean extends AbstractServiceBean implements BizNimsSe
reqDto.setGc(apiInfInfo.get("deptCd")); // 관할관청코드
ApiUtil.validate(reqDto, null, validator);
List<NimsApiDto.DsuseRptInfo> rtnList = findNimsDsuseRptsOfApi(reqDto);
List<NimsApiDto.DsuseRptInfo> 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<NimsApiDto.DsuseRptInfo> rtnList = saveFromfindDsuseRptDataByNimsApi(rptDto);
// 폐기보고 확인(NIMS 폐기 완료 - 상태가 "확인" 인 경우 데이타 조회 추가
List<NimsApiDto.DsuseRptInfo> 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
* </pre>
*/
private List<NimsApiDto.DsuseRptInfo> saveFromfindDsuseRptDataByNimsApi(NimsApiRequest.DsuseRptInfoReq reqDto) {
List<NimsApiDto.DsuseRptInfo> nimsList = findNimsDsuseRptsOfApi(reqDto);
List<NimsApiDto.DsuseRptInfo> nimsList = findNimsDsuseRptsOfApi(reqDto, false);
// 신규 작업대상 데이타 List
List<NimsApiDto.DsuseRptInfo> newList = new ArrayList<>();
@ -684,9 +691,15 @@ public class BizNimsServiceBean extends AbstractServiceBean implements BizNimsSe
return new ArrayList<>(concurrentList);
}
private List<NimsApiDto.DsuseRptInfo> findNimsDsuseRptsOfApi(NimsApiRequest.DsuseRptInfoReq reqDto) {
/**
*
* @param reqDto
* @param isUsrRptIdNo "확인"
* @return
*/
private List<NimsApiDto.DsuseRptInfo> findNimsDsuseRptsOfApi(NimsApiRequest.DsuseRptInfoReq reqDto, boolean isUsrRptIdNo) {
List<NimsApiDto.DsuseRptInfo> nimsList = new ArrayList<>();
boolean isUsrRptIdNo = !isEmpty(reqDto.getUr());
//boolean isUsrRptIdNo = !isEmpty(reqDto.getUr());
while(true) {
NimsApiResult.Response<NimsApiDto.DsuseRptInfo> rslt = infNimsService.getDsuseRptInfo(reqDto);

Loading…
Cancel
Save