|
|
|
@ -34,6 +34,7 @@ public class RequestEnricher {
|
|
|
|
String cntc = props.getGov().getServices().getBasic().getCntcInfoCode();
|
|
|
|
String cntc = props.getGov().getServices().getBasic().getCntcInfoCode();
|
|
|
|
for (BasicRequest req : envelope.getData()) {
|
|
|
|
for (BasicRequest req : envelope.getData()) {
|
|
|
|
if (req == null) continue;
|
|
|
|
if (req == null) continue;
|
|
|
|
|
|
|
|
// 메타 필드 보강 (data level)
|
|
|
|
req.setInfoSysId(sys.getInfoSysId());
|
|
|
|
req.setInfoSysId(sys.getInfoSysId());
|
|
|
|
req.setInfoSysIp(sys.getInfoSysIp());
|
|
|
|
req.setInfoSysIp(sys.getInfoSysIp());
|
|
|
|
req.setSigunguCode(sys.getSigunguCode());
|
|
|
|
req.setSigunguCode(sys.getSigunguCode());
|
|
|
|
@ -42,12 +43,23 @@ public class RequestEnricher {
|
|
|
|
req.setChargerIp(sys.getChargerIp());
|
|
|
|
req.setChargerIp(sys.getChargerIp());
|
|
|
|
req.setChargerNm(sys.getChargerNm());
|
|
|
|
req.setChargerNm(sys.getChargerNm());
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// record 배열이 없으면 생성 (최소 1개)
|
|
|
|
|
|
|
|
java.util.List<BasicRequest.Record> records = req.getRecord();
|
|
|
|
|
|
|
|
if (records == null || records.isEmpty()) {
|
|
|
|
|
|
|
|
BasicRequest.Record r = new BasicRequest.Record();
|
|
|
|
|
|
|
|
java.util.ArrayList<BasicRequest.Record> list = new java.util.ArrayList<>();
|
|
|
|
|
|
|
|
list.add(r);
|
|
|
|
|
|
|
|
req.setRecord(list);
|
|
|
|
|
|
|
|
records = list;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 자동차 기본사항 조회 시 INQIRE_SE_CODE 자동 설정
|
|
|
|
// 자동차 기본사항 조회 시 INQIRE_SE_CODE 자동 설정
|
|
|
|
// VHRNO(차량번호) not null → 3:자동차번호, VIN(차대번호) not null → 2:차대번호
|
|
|
|
// VHRNO(차량번호) not null → 3:자동차번호, VIN(차대번호) not null → 2:차대번호
|
|
|
|
if (req.getVhrno() != null && !req.getVhrno().trim().isEmpty()) {
|
|
|
|
BasicRequest.Record first = records.get(0);
|
|
|
|
req.setInqireSeCode("3");
|
|
|
|
if (first.getVhrno() != null && !first.getVhrno().trim().isEmpty()) {
|
|
|
|
} else if (req.getVin() != null && !req.getVin().trim().isEmpty()) {
|
|
|
|
first.setInqireSeCode("3");
|
|
|
|
req.setInqireSeCode("2");
|
|
|
|
} else if (first.getVin() != null && !first.getVin().trim().isEmpty()) {
|
|
|
|
|
|
|
|
first.setInqireSeCode("2");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
log.debug("[ENRICH] basic: applied INFO_SYS_ID={}, INFO_SYS_IP={}, SIGUNGU_CODE={}, CNTC_INFO_CODE={}",
|
|
|
|
log.debug("[ENRICH] basic: applied INFO_SYS_ID={}, INFO_SYS_IP={}, SIGUNGU_CODE={}, CNTC_INFO_CODE={}",
|
|
|
|
|