|
|
@ -49,15 +49,22 @@ public class VehicleInfoBean extends AbstractComponent {
|
|
|
|
@Resource(name = "vehicleInfoMapper")
|
|
|
|
@Resource(name = "vehicleInfoMapper")
|
|
|
|
private VehicleInfoMapper vehicleInfoMapper;
|
|
|
|
private VehicleInfoMapper vehicleInfoMapper;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**주어진 조건의 자동차 기본정보를 반환한다.
|
|
|
|
|
|
|
|
* @param req 자동차 기본정보 조회 조건
|
|
|
|
|
|
|
|
* @return 자동차 기본정보
|
|
|
|
|
|
|
|
*/
|
|
|
|
public BasicInfoResponse getBasicInfo(BasicInfoRequest req) {
|
|
|
|
public BasicInfoResponse getBasicInfo(BasicInfoRequest req) {
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
req.validate();
|
|
|
|
req.validate();
|
|
|
|
if (lvisHost.isLocal())
|
|
|
|
if (lvisHost.isLocal())
|
|
|
|
return getLocalBasicInfo(req);
|
|
|
|
return getLocalBasicInfo(req);
|
|
|
|
|
|
|
|
|
|
|
|
FindRegBasicReturn resp = new CarRegBasicInfoProxy(lvisHost.getAddress()).findRegBasic(req.getParams(), getRequestContext(req.getServiceID()));
|
|
|
|
FindRegBasicReturn resp = new CarRegBasicInfoProxy(lvisHost.getAddress())
|
|
|
|
|
|
|
|
.findRegBasic(req.getParams(), getRequestContext(req.getServiceID()));
|
|
|
|
BasicInfoResponse result = BasicInfoResponse.getResult(resp);
|
|
|
|
BasicInfoResponse result = BasicInfoResponse.getResult(resp);
|
|
|
|
boolean success = result.getBasicInfo().isSuccess();
|
|
|
|
boolean success = result.getBasicInfo().isSuccess();
|
|
|
|
|
|
|
|
if (success)
|
|
|
|
|
|
|
|
result.getBasicInfo().setSggCd(req.getSggCd());
|
|
|
|
log().debug("자동차 기본정보를 {}", (success ? "찾았습니다." : "찾지 못했습니다."));
|
|
|
|
log().debug("자동차 기본정보를 {}", (success ? "찾았습니다." : "찾지 못했습니다."));
|
|
|
|
|
|
|
|
|
|
|
|
boolean keepLog = properties.getBoolean("lvis.log.basicInfo", false);
|
|
|
|
boolean keepLog = properties.getBoolean("lvis.log.basicInfo", false);
|
|
|
@ -82,24 +89,34 @@ public class VehicleInfoBean extends AbstractComponent {
|
|
|
|
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());
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
BasicInfoResponse response = new BasicInfoResponse();
|
|
|
|
BasicInfoResponse response = new BasicInfoResponse();
|
|
|
|
response.setBasicInfo(basicInfo);
|
|
|
|
response.setBasicInfo(basicInfo);
|
|
|
|
return response;
|
|
|
|
return response;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public Map<String, BasicInfoResponse> getBasicInfo(List<BasicInfoRequest> reqs) {
|
|
|
|
/**주어진 조건의 자동차 기본정보들을 반환한다.
|
|
|
|
|
|
|
|
* @param reqs 자동차 기본정보 조회 조건
|
|
|
|
|
|
|
|
* @return 자동차 기본정보
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
public List<BasicInfoResponse> getBasicInfo(List<BasicInfoRequest> reqs) {
|
|
|
|
return reqs.stream()
|
|
|
|
return reqs.stream()
|
|
|
|
.map(this::getBasicInfo)
|
|
|
|
.map(this::getBasicInfo)
|
|
|
|
.filter(resp -> resp.getBasicInfo().isSuccess())
|
|
|
|
.filter(resp -> resp.getBasicInfo().isSuccess())
|
|
|
|
.collect(Collectors.toMap(
|
|
|
|
.collect(Collectors.groupingBy(resp -> resp.getBasicInfo().getKey()))
|
|
|
|
resp -> resp.getBasicInfo().getVhrno(),
|
|
|
|
.entrySet().stream()
|
|
|
|
resp -> resp
|
|
|
|
.map(entry -> entry.getValue().get(0))
|
|
|
|
));
|
|
|
|
.toList();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**주어진 조건의 자동차 등록원부(갑)를 반환한다.
|
|
|
|
|
|
|
|
* @param req 자동차 등록원부(갑) 조회 조건
|
|
|
|
|
|
|
|
* @return 자동차 등록원부(갑)
|
|
|
|
|
|
|
|
*/
|
|
|
|
public FrmrWlthReadngResponse getFrmrWlthReadng(FrmrWlthReadngRequest req) {
|
|
|
|
public FrmrWlthReadngResponse getFrmrWlthReadng(FrmrWlthReadngRequest req) {
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
req.validate();
|
|
|
|
req.validate();
|
|
|
@ -114,6 +131,10 @@ public class VehicleInfoBean extends AbstractComponent {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**주어진 조건의 자동차 등록원부(을)를 반환한다.
|
|
|
|
|
|
|
|
* @param req 자동차 등록원부(을) 조회 조건
|
|
|
|
|
|
|
|
* @return 자동차 등록원부(을)
|
|
|
|
|
|
|
|
*/
|
|
|
|
public ScldgrReadngResponse getScldgrReadng(ScldgrReadngRequest req) {
|
|
|
|
public ScldgrReadngResponse getScldgrReadng(ScldgrReadngRequest req) {
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
req.validate();
|
|
|
|
req.validate();
|
|
|
@ -128,6 +149,10 @@ public class VehicleInfoBean extends AbstractComponent {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**주어진 조건의 압류내역을 반환한다.
|
|
|
|
|
|
|
|
* @param req 압류내역 조회 조건
|
|
|
|
|
|
|
|
* @return 압류내역
|
|
|
|
|
|
|
|
*/
|
|
|
|
public SeizureByVhrNoResponse getSeizureByVhrNo(SeizureByVhrNoRequest req) {
|
|
|
|
public SeizureByVhrNoResponse getSeizureByVhrNo(SeizureByVhrNoRequest req) {
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
req.validate();
|
|
|
|
req.validate();
|
|
|
@ -142,6 +167,10 @@ public class VehicleInfoBean extends AbstractComponent {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**주어진 압류내역을 등록한다.
|
|
|
|
|
|
|
|
* @param req 등록할 압류내역
|
|
|
|
|
|
|
|
* @return 압류내역 등록 결과
|
|
|
|
|
|
|
|
*/
|
|
|
|
public SeizureByEttffResponse addAutoSeizureByEttff(SeizureByEttffRequest req) {
|
|
|
|
public SeizureByEttffResponse addAutoSeizureByEttff(SeizureByEttffRequest req) {
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
req.validate();
|
|
|
|
req.validate();
|
|
|
@ -156,6 +185,10 @@ public class VehicleInfoBean extends AbstractComponent {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**주어진 조건의 대체압류차량 정보를 반환한다.
|
|
|
|
|
|
|
|
* @param req 대체압류차량 조회조건
|
|
|
|
|
|
|
|
* @return 대체압류차량 정보
|
|
|
|
|
|
|
|
*/
|
|
|
|
public AltrtvSeizureVhrnoResponse getAltrtvSeizureVhrno(AltrtvSeizureVhrnoRequest req) {
|
|
|
|
public AltrtvSeizureVhrnoResponse getAltrtvSeizureVhrno(AltrtvSeizureVhrnoRequest req) {
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
req.validate();
|
|
|
|
req.validate();
|
|
|
@ -170,6 +203,10 @@ public class VehicleInfoBean extends AbstractComponent {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**주어진 조건의 번호판 영치대상 정보를 반환한다.
|
|
|
|
|
|
|
|
* @param req 번호판 영치대상 조회조건
|
|
|
|
|
|
|
|
* @return 번호판 영치대상 정보
|
|
|
|
|
|
|
|
*/
|
|
|
|
public CustodyTrgetResponse getCustodyTrget(CustodyTrgetRequest req) {
|
|
|
|
public CustodyTrgetResponse getCustodyTrget(CustodyTrgetRequest req) {
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
req.validate();
|
|
|
|
req.validate();
|
|
|
|