fix: 폐기보고확인시 매핑 정보 보다 구체적으로 set 하도록 변경

dev
Jonguk. Lim 5 months ago
parent 2f0e26f96e
commit 1a84ae9e6b

@ -10,7 +10,6 @@ import java.util.concurrent.CopyOnWriteArrayList;
import javax.validation.Validation; import javax.validation.Validation;
import javax.validation.Validator; import javax.validation.Validator;
import org.apache.commons.lang3.ObjectUtils;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartFile;
@ -452,12 +451,9 @@ public class BizNimsServiceBean extends AbstractServiceBean implements BizNimsSe
rtnList = saveFromfindDsuseRptDataByNimsApi(rptDto); rtnList = saveFromfindDsuseRptDataByNimsApi(rptDto);
} }
// NIMS폐기보고와 일치하는 경우 - 폐기관리ID 매핑
for(NimsApiDto.DsuseRptInfo dto : rtnList){ for(NimsApiDto.DsuseRptInfo dto : rtnList){
BizNimsResponse.DsuseMgtRes dsuseMgtRes = dto.mappingNewDsuseRptInfo(dsuseMgtDto); BizNimsResponse.DsuseMgtRes dsuseMgtRes = dto.mappingNewDsuseRptInfo(dsuseMgtDto);
// NIMS폐기보고와 일치하는 경우 - 폐기관리ID 매핑
if(ObjectUtils.isNotEmpty(dsuseMgtRes)) {
dto.setDscdmngId(dsuseMgtRes.getDscdmngId());
}
} }
rtnList.sort((a, b) -> a.getUsrRptIdNo().compareTo(b.getUsrRptIdNo())); rtnList.sort((a, b) -> a.getUsrRptIdNo().compareTo(b.getUsrRptIdNo()));

@ -428,35 +428,6 @@ public class NimsApiDto {
@Valid @Valid
private List<DsuseRptInfoDtl> listDtl = new ArrayList<>(); private List<DsuseRptInfoDtl> listDtl = new ArrayList<>();
/**
* <pre>
*
* -> -
* ->
*
* 1.
* 2. set
* -> - (02) set
* -> , , , set
* @param dsuseMgts List<BizNimsResponse.DsuseMgtRes>
* @return List<BizNimsResponse.DsuseMgtRes>
* </pre>
*/
/*
@JsonIgnore
public List<BizNimsResponse.DsuseMgtRes> mappingNewDsuseRptInfos(List<BizNimsResponse.DsuseMgtRes> dsuseMgts){
List<BizNimsResponse.DsuseMgtRes> newList = new ArrayList<>();
for(BizNimsResponse.DsuseMgtRes mgtDto: dsuseMgts) {
BizNimsResponse.DsuseMgtRes dsuseMgtRes = mappingNewDsuseRptInfo(mgtDto);
if(ObjectUtils.isNotEmpty(dsuseMgtRes)) {
newList.add(dsuseMgtRes);
}
}
return newList;
}
*/
/** /**
* <pre> * <pre>
* *
@ -495,6 +466,25 @@ public class NimsApiDto {
// FIXME: 폐기관리와 폐기보고의 상품정보 일치 여부 set - 비교 필드 확정 필요 // FIXME: 폐기관리와 폐기보고의 상품정보 일치 여부 set - 비교 필드 확정 필요
if (rptInfoStr.equals(mgtInfoStr)) { if (rptInfoStr.equals(mgtInfoStr)) {
prdMatch(mgtDto);
if(mgtDto.isPrdMatch()){
mgtDto.setUsrRptIdNo(this.usrRptIdNo);
mgtDto.setOrgUsrRptIdNo(this.usrRptIdNo);
mgtDto.setRptTyCd(this.rptTyCd);
mgtDto.setStts(this.status);
mgtDto.setPrgrsSttsCd(Constants.PRGRS_STTS_CD.MAPPING.getCode());
mgtDto.setRgtr(this.getRgtr());
this.dscdmngId = mgtDto.getDscdmngId();
return mgtDto;
}
}else{
prdMatch(mgtDto);
}
return mgtDto;
}
private void prdMatch(BizNimsResponse.DsuseMgtRes mgtDto) {
mgtDto.setPrdMatch(true); mgtDto.setPrdMatch(true);
if (this.listDtl.size() == mgtDto.getDsuseMgtDtls().size()) { if (this.listDtl.size() == mgtDto.getDsuseMgtDtls().size()) {
for (DsuseRptInfoDtl rptDtl : this.listDtl) { for (DsuseRptInfoDtl rptDtl : this.listDtl) {
@ -516,18 +506,6 @@ public class NimsApiDto {
break; break;
} }
} }
if(mgtDto.isPrdMatch()){
mgtDto.setUsrRptIdNo(this.usrRptIdNo);
mgtDto.setOrgUsrRptIdNo(this.usrRptIdNo);
mgtDto.setRptTyCd(this.rptTyCd);
mgtDto.setStts(this.status);
mgtDto.setPrgrsSttsCd(Constants.PRGRS_STTS_CD.MAPPING.getCode());
mgtDto.setRgtr(this.getRgtr());
return mgtDto;
}
}
return null;
} }
} }

Loading…
Cancel
Save