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