|
|
@ -10,6 +10,7 @@ import org.springframework.stereotype.Component;
|
|
|
|
|
|
|
|
|
|
|
|
import cokr.xit.foundation.AbstractComponent;
|
|
|
|
import cokr.xit.foundation.AbstractComponent;
|
|
|
|
import cokr.xit.foundation.ApplicationException;
|
|
|
|
import cokr.xit.foundation.ApplicationException;
|
|
|
|
|
|
|
|
import cokr.xit.foundation.data.DataObject;
|
|
|
|
import cokr.xit.interfaces.lvis.dao.VehicleInfoMapper;
|
|
|
|
import cokr.xit.interfaces.lvis.dao.VehicleInfoMapper;
|
|
|
|
import cokr.xit.interfaces.lvis.service.reg.BasicInfoRequest;
|
|
|
|
import cokr.xit.interfaces.lvis.service.reg.BasicInfoRequest;
|
|
|
|
import cokr.xit.interfaces.lvis.service.reg.BasicInfoResponse;
|
|
|
|
import cokr.xit.interfaces.lvis.service.reg.BasicInfoResponse;
|
|
|
@ -62,9 +63,11 @@ public class VehicleInfoBean extends AbstractComponent {
|
|
|
|
FindRegBasicReturn resp = new CarRegBasicInfoProxy(lvisHost.getAddress())
|
|
|
|
FindRegBasicReturn resp = new CarRegBasicInfoProxy(lvisHost.getAddress())
|
|
|
|
.findRegBasic(req.getParams(), getRequestContext(req.getServiceID()));
|
|
|
|
.findRegBasic(req.getParams(), getRequestContext(req.getServiceID()));
|
|
|
|
BasicInfoResponse result = BasicInfoResponse.getResult(resp);
|
|
|
|
BasicInfoResponse result = BasicInfoResponse.getResult(resp);
|
|
|
|
boolean success = result.getBasicInfo().isSuccess();
|
|
|
|
BasicInfoResponse.BasicInfo basicInfo = result.getBasicInfo();
|
|
|
|
if (success)
|
|
|
|
boolean success = basicInfo.isSuccess();
|
|
|
|
result.getBasicInfo().setSggCd(req.getSggCd());
|
|
|
|
if (success) {
|
|
|
|
|
|
|
|
setRoadNameInfo(req, basicInfo);
|
|
|
|
|
|
|
|
}
|
|
|
|
log().debug("자동차 기본정보를 {}", (success ? "찾았습니다." : "찾지 못했습니다."));
|
|
|
|
log().debug("자동차 기본정보를 {}", (success ? "찾았습니다." : "찾지 못했습니다."));
|
|
|
|
|
|
|
|
|
|
|
|
boolean keepLog = properties.getBoolean("lvis.log.basicInfo", false);
|
|
|
|
boolean keepLog = properties.getBoolean("lvis.log.basicInfo", false);
|
|
|
@ -85,13 +88,26 @@ public class VehicleInfoBean extends AbstractComponent {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void setRoadNameInfo(BasicInfoRequest req, BasicInfoResponse.BasicInfo basicInfo) {
|
|
|
|
|
|
|
|
basicInfo.setSggCd(req.getSggCd());
|
|
|
|
|
|
|
|
DataObject roadNameInfo = vehicleInfoMapper.selectRoadNmAdres(
|
|
|
|
|
|
|
|
basicInfo.getUse_strnghld_road_nm_code(),
|
|
|
|
|
|
|
|
basicInfo.getUse_strnghld_buld_main_no(),
|
|
|
|
|
|
|
|
basicInfo.getUse_strnghld_buld_sub_no()
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
if (!isEmpty(roadNameInfo)) {
|
|
|
|
|
|
|
|
basicInfo.setRoad_nm_adres(roadNameInfo.string("ROAD_NM_ADRES"));
|
|
|
|
|
|
|
|
basicInfo.setZip_code(roadNameInfo.string("ZIP"));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private BasicInfoResponse getLocalBasicInfo(BasicInfoRequest req) {
|
|
|
|
private BasicInfoResponse getLocalBasicInfo(BasicInfoRequest req) {
|
|
|
|
List<BasicInfoResponse.BasicInfo> list = vehicleInfoMapper.selectBasicInfo(req);
|
|
|
|
List<BasicInfoResponse.BasicInfo> list = vehicleInfoMapper.selectBasicInfo(req);
|
|
|
|
boolean empty = list.isEmpty();
|
|
|
|
boolean empty = list.isEmpty();
|
|
|
|
BasicInfoResponse.BasicInfo basicInfo = !empty ? list.get(0) : new BasicInfoResponse.BasicInfo();
|
|
|
|
BasicInfoResponse.BasicInfo basicInfo = !empty ? list.get(0) : new BasicInfoResponse.BasicInfo();
|
|
|
|
if (!empty) {
|
|
|
|
if (!empty) {
|
|
|
|
basicInfo.setProcess_imprty_resn_code("00");
|
|
|
|
basicInfo.setProcess_imprty_resn_code("00");
|
|
|
|
basicInfo.setSggCd(req.getSggCd());
|
|
|
|
setRoadNameInfo(req, basicInfo);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
BasicInfoResponse response = new BasicInfoResponse();
|
|
|
|
BasicInfoResponse response = new BasicInfoResponse();
|
|
|
|