feat: Post plus 상태 조회 반영

- 우편물 종적 추적시 배달완료 시간 set
dev
gitea-관리자 1 year ago
parent ad6973f62d
commit d81da9bf1d

@ -336,12 +336,14 @@ public class EnsBatchStatusService extends EgovAbstractServiceImpl implements IE
try{
assert epostResDTO != null;
// 종적추적 결과 set : 실패시 BizRuntimeException
// 배달완료시 시간 set
EpostTraceResTrackInfo traceDTO = epostResDTO.result();
mapper.updatePplusDlvrStatusFromEPostByRgistNo(traceDTO);
dto.setDlvrSttus(traceDTO.getTrackState());
dto.setSenderData(Checks.isNotEmpty(traceDTO.getSenderData()) ? traceDTO.getSenderData() + "0000" : null);
dto.setReceiveDate(Checks.isNotEmpty(traceDTO.getReceiveDate()) ? traceDTO.getReceiveDate() + "0000" : null);
dto.setReceiveDate(traceDTO.getReceiveDate());
}catch (BizRuntimeException e){
//TODO :: error 처리 확인 필요

@ -18,6 +18,7 @@ import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;
import org.apache.commons.lang3.ObjectUtils;
/**
* <pre>
@ -98,6 +99,13 @@ public class EPostDTO {
if("N".equals(this.header.successYN)){
throw BizRuntimeException.create(this.header.errorMessage);
}
// 배달 완료시 배달시간 set
if(ObjectUtils.isNotEmpty(this.trackInfo.receiveDate)){
String time = trackInfo.getDetaileTrackList().get(trackInfo.getDetaileTrackList().size()-1)
.getTime();
this.trackInfo.setReceiveDate(this.trackInfo.receiveDate + time.replace(":", ""));
}
return this.trackInfo;
}
}

Loading…
Cancel
Save