전체적은 old, new 구조로 변경 및 통합model 적용 진행중...

main
박성영 4 weeks ago
parent 0efc6eb361
commit 0004c7119f

@ -1,9 +1,9 @@
package go.kr.project.api.controller;
import go.kr.project.api.model.Envelope;
import go.kr.project.api.model.request.OldBasicRequest;
import go.kr.project.api.model.request.NewBasicRequest;
import go.kr.project.api.model.request.NewLedgerRequest;
import go.kr.project.api.model.response.OldBasicResponse;
import go.kr.project.api.model.response.NewBasicResponse;
import go.kr.project.api.model.response.NewLedgerResponse;
import go.kr.project.api.service.ExternalVehicleApiService;
import io.swagger.v3.oas.annotations.Operation;
@ -58,29 +58,29 @@ public class VehicleInterfaceController {
@PostMapping(value = "/basic.ajax", consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE)
@Operation(
summary = "자동차기본사항조회 (단독)",
description = "vmis.integration.mode에 따라 내부 모듈 또는 외부 REST API를 통해 기본정보만 조회",
description = "YAML 설정(vmis.external.api.url.basic.old-or-new)에 따라 old/new API를 자동 호출하여 기본정보만 조회",
requestBody = @RequestBody(
content = @Content(
mediaType = MediaType.APPLICATION_JSON_VALUE,
examples = @ExampleObject(
name = "기본사항조회 예제 (자동차번호)",
value = "{\"data\": [{\"VHRNO\": \"12가3456\",\"LEVY_STDDE\": \"20250101\"}]}"
value = "{\"data\": [{\"VHRNO\": \"12가3456\",\"LEVY_CRTR_YMD\": \"20250101\"}]}"
)
)
)
)
public ResponseEntity<Envelope<OldBasicResponse>> basic(
@org.springframework.web.bind.annotation.RequestBody Envelope<OldBasicRequest> envelope
public ResponseEntity<Envelope<NewBasicResponse>> basic(
@org.springframework.web.bind.annotation.RequestBody Envelope<NewBasicRequest> envelope
) {
// 중요 로직: Swagger 요청 Envelope에서 BasicRequest 추출 (차량번호 및 필수 파라미터 포함)
OldBasicRequest request = (envelope != null && !envelope.getData().isEmpty()) ? envelope.getData().get(0) : null;
if (request == null || request.getVhrno() == null || request.getVhrno().trim().isEmpty()) {
// Envelope에서 NewBasicRequest 추출
NewBasicRequest request = (envelope != null && !envelope.getData().isEmpty()) ? envelope.getData().get(0) : null;
if (request == null || request.getRecord() == null || request.getRecord().isEmpty()) {
return ResponseEntity.ok(new Envelope<>(Collections.emptyList()));
}
// VehicleInfoService는 모드에 따라 구현체가 자동 주입되어 분기 처리
OldBasicResponse basic = service.getBasicInfo(request);
Envelope<OldBasicResponse> out = (basic != null) ? new Envelope<>(basic) : new Envelope<>(Collections.emptyList());
// YAML 설정에 따라 old/new API 자동 선택
NewBasicResponse basic = service.getBasicInfo(request);
Envelope<NewBasicResponse> out = (basic != null) ? new Envelope<>(basic) : new Envelope<>(Collections.emptyList());
return ResponseEntity.ok(out);
}
@ -91,13 +91,13 @@ public class VehicleInterfaceController {
@PostMapping(value = "/ledger.ajax", consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE)
@Operation(
summary = "자동차등록원부(갑) 조회 (단독)",
description = "vmis.integration.mode에 따라 내부 모듈 또는 외부 REST API를 통해 등록원부만 조회",
description = "YAML 설정(vmis.external.api.url.ledger.old-or-new)에 따라 old/new API를 자동 호출하여 등록원부만 조회",
requestBody = @RequestBody(
content = @Content(
mediaType = MediaType.APPLICATION_JSON_VALUE,
examples = @ExampleObject(
name = "등록원부 조회 예제",
value = "{\"data\": [{\"VHRNO\": \"12가3456\",\"ONES_INFORMATION_OPEN\": \"1\",\"CPTTR_NM\": \"홍길동\",\"CPTTR_IHIDNUM\": \"8801011234567\",\"CPTTR_LEGALDONG_CODE\": \"1111011700\",\"DETAIL_EXPRESSION\": \"1\",\"INQIRE_SE_CODE\": \"1\"}]}"
value = "{\"data\": [{\"VHRNO\": \"12가3456\",\"PRVC_RLS\": \"1\",\"CVLPR_NM\": \"홍길동\",\"CVLPR_IDECNO\": \"8801011234567\",\"CVLPR_STDG_CD\": \"1111011700\",\"DSCTN_INDCT\": \"1\",\"INQ_SE_CD\": \"1\"}]}"
)
)
)
@ -105,12 +105,13 @@ public class VehicleInterfaceController {
public ResponseEntity<Envelope<NewLedgerResponse>> ledger(
@org.springframework.web.bind.annotation.RequestBody Envelope<NewLedgerRequest> envelope
) {
// 중요 로직: Swagger 요청 Envelope에서 LedgerRequest 추출 (차량번호 및 필수 파라미터 포함)
// Envelope에서 NewLedgerRequest 추출
NewLedgerRequest request = (envelope != null && !envelope.getData().isEmpty()) ? envelope.getData().get(0) : null;
if (request == null || request.getVhrno() == null || request.getVhrno().trim().isEmpty()) {
return ResponseEntity.ok(new Envelope<>(Collections.emptyList()));
}
// YAML 설정에 따라 old/new API 자동 선택
NewLedgerResponse ledger = service.getLedgerInfo(request);
Envelope<NewLedgerResponse> out = (ledger != null) ? new Envelope<>(ledger) : new Envelope<>(Collections.emptyList());
return ResponseEntity.ok(out);

@ -1,8 +1,8 @@
package go.kr.project.api.service;
import go.kr.project.api.model.request.OldBasicRequest;
import go.kr.project.api.model.request.NewBasicRequest;
import go.kr.project.api.model.request.NewLedgerRequest;
import go.kr.project.api.model.response.OldBasicResponse;
import go.kr.project.api.model.response.NewBasicResponse;
import go.kr.project.api.model.response.NewLedgerResponse;
/**
@ -12,17 +12,16 @@ import go.kr.project.api.model.response.NewLedgerResponse;
public interface ExternalVehicleApiService {
/**
* (old-basic)
* (YAML old/new )
* vmis.external.api.url.basic.old-or-new
* @param request ( old/new )
*/
OldBasicResponse getOldBasicInfo(OldBasicRequest request);
NewBasicResponse getBasicInfo(NewBasicRequest request);
/**
* (new-basic)
* () (YAML old/new )
* vmis.external.api.url.ledger.old-or-new
* @param request ( old/new )
*/
OldBasicResponse getNewBasicInfo(OldBasicRequest request);
/**
* () (new-ledger)
*/
NewLedgerResponse getNewLedgerInfo(NewLedgerRequest request);
NewLedgerResponse getLedgerInfo(NewLedgerRequest request);
}

@ -8,6 +8,7 @@ import go.kr.project.api.util.ExceptionDetailUtil;
import go.kr.project.api.model.ApiExchangeEnvelope;
import go.kr.project.api.model.Envelope;
import go.kr.project.api.model.request.OldBasicRequest;
import go.kr.project.api.model.request.NewBasicRequest;
import go.kr.project.api.model.request.NewLedgerRequest;
import go.kr.project.api.model.response.*;
import go.kr.project.api.service.VmisCarBassMatterInqireLogService;
@ -21,6 +22,7 @@ import org.springframework.stereotype.Service;
import org.springframework.web.client.RestTemplate;
import java.util.List;
import java.util.stream.Collectors;
/**
* VMIS-interface API
@ -32,48 +34,80 @@ import java.util.List;
public class ExternalVehicleApiServiceImpl extends EgovAbstractServiceImpl implements ExternalVehicleApiService {
private final RestTemplate restTemplate;
private final VmisProperties vmisProperties; // 프로퍼티 주입 (외부 API URL 구성에 사용)
private final VmisCarBassMatterInqireLogService bassMatterLogService; // 기본사항 조회 로그 서비스
private final VmisCarLedgerFrmbkLogService ledgerLogService; // 등록원부 로그 서비스
private final VmisProperties vmisProperties;
private final VmisCarBassMatterInqireLogService bassMatterLogService;
private final VmisCarLedgerFrmbkLogService ledgerLogService;
/**
* (old-basic)
* : (ApiExchangeEnvelope)
* (YAML old/new )
* vmis.external.api.url.basic.old-or-new
*/
@Override
public OldBasicResponse getOldBasicInfo(OldBasicRequest request) {
log.debug("[OLD-BASIC] 자동차 기본정보 조회 API 호출 - 차량번호: {}", request.getVhrno());
public NewBasicResponse getBasicInfo(NewBasicRequest request) {
String apiVersion = vmisProperties.getExternal().getApi().getUrl().getBasic().getOldOrNew();
log.debug("[AUTO-BASIC] YAML 설정에 따른 API 버전: {}", apiVersion);
if ("old".equalsIgnoreCase(apiVersion)) {
return callOldBasicApi(request);
} else {
return callNewBasicApi(request);
}
}
/**
* () (YAML old/new )
* vmis.external.api.url.ledger.old-or-new
*/
@Override
public NewLedgerResponse getLedgerInfo(NewLedgerRequest request) {
String apiVersion = vmisProperties.getExternal().getApi().getUrl().getLedger().getOldOrNew();
log.debug("[AUTO-LEDGER] YAML 설정에 따른 API 버전: {}", apiVersion);
if ("old".equalsIgnoreCase(apiVersion)) {
return callOldLedgerApi(request);
} else {
return callNewLedgerApi(request);
}
}
/**
* API ()
*/
private NewBasicResponse callOldBasicApi(NewBasicRequest newRequest) {
log.debug("[OLD-BASIC] 자동차 기본정보 조회 API 호출");
String generatedId = null;
try {
VmisCarBassMatterInqireVO logEntity = VmisCarBassMatterInqireVO.fromOldRequest(request);
// NewBasicRequest → OldBasicRequest 변환
OldBasicRequest oldRequest = convertToOldBasicRequest(newRequest);
VmisCarBassMatterInqireVO logEntity = VmisCarBassMatterInqireVO.fromOldRequest(oldRequest);
generatedId = bassMatterLogService.createInitialRequestNewTx(logEntity);
Envelope<OldBasicRequest> requestEnvelope = new Envelope<>(request);
Envelope<OldBasicRequest> requestEnvelope = new Envelope<>(oldRequest);
HttpHeaders headers = new HttpHeaders();
headers.setContentType(MediaType.APPLICATION_JSON);
HttpEntity<Envelope<OldBasicRequest>> requestEntity = new HttpEntity<>(requestEnvelope, headers);
ResponseEntity<ApiExchangeEnvelope<OldBasicRequest, OldBasicResponse>> responseEntity = restTemplate.exchange(
ResponseEntity<ApiExchangeEnvelope<OldBasicRequest, NewBasicResponse>> responseEntity = restTemplate.exchange(
vmisProperties.getExternal().getApi().getUrl().buildOldBasicUrl(),
HttpMethod.POST,
requestEntity,
new ParameterizedTypeReference<ApiExchangeEnvelope<OldBasicRequest, OldBasicResponse>>() {}
new ParameterizedTypeReference<ApiExchangeEnvelope<OldBasicRequest, NewBasicResponse>>() {}
);
if (responseEntity.getStatusCode() == HttpStatus.OK && responseEntity.getBody() != null) {
ApiExchangeEnvelope<OldBasicRequest, OldBasicResponse> body = responseEntity.getBody();
List<OldBasicResponse> data = (body.getResponse() != null) ? body.getResponse().getData() : null;
ApiExchangeEnvelope<OldBasicRequest, NewBasicResponse> body = responseEntity.getBody();
List<NewBasicResponse> data = (body.getResponse() != null) ? body.getResponse().getData() : null;
if (data != null && !data.isEmpty()) {
VmisCarBassMatterInqireVO update = VmisCarBassMatterInqireVO.fromOldExchange(generatedId, body);
if (update != null) bassMatterLogService.updateResponseNewTx(update);
// 로그 저장 로직은 기존과 동일하게 유지 (OldBasicResponse 기반)
log.debug("[OLD-BASIC] txId: {}", body.getTxId());
return data.get(0);
}
}
log.warn("[OLD-BASIC] 응답이 비어있음 - 차량번호: {}", request.getVhrno());
log.warn("[OLD-BASIC] 응답이 비어있음");
return null;
} catch (Exception e) {
if (generatedId != null) {
@ -95,38 +129,141 @@ public class ExternalVehicleApiServiceImpl extends EgovAbstractServiceImpl imple
}
/**
* (new-basic)
* API ()
*/
@Override
public OldBasicResponse getNewBasicInfo(OldBasicRequest request) {
return null;
}
private NewBasicResponse callNewBasicApi(NewBasicRequest request) {
log.debug("[NEW-BASIC] 자동차 기본정보 조회 API 호출");
String generatedId = null;
try {
// NewBasicRequest를 사용하여 로그 저장 (임시로 OldBasicRequest로 변환)
OldBasicRequest tempForLog = convertToOldBasicRequest(request);
VmisCarBassMatterInqireVO logEntity = VmisCarBassMatterInqireVO.fromOldRequest(tempForLog);
generatedId = bassMatterLogService.createInitialRequestNewTx(logEntity);
Envelope<NewBasicRequest> requestEnvelope = new Envelope<>(request);
HttpHeaders headers = new HttpHeaders();
headers.setContentType(MediaType.APPLICATION_JSON);
HttpEntity<Envelope<NewBasicRequest>> requestEntity = new HttpEntity<>(requestEnvelope, headers);
ResponseEntity<ApiExchangeEnvelope<NewBasicRequest, NewBasicResponse>> responseEntity = restTemplate.exchange(
vmisProperties.getExternal().getApi().getUrl().buildNewBasicUrl(),
HttpMethod.POST,
requestEntity,
new ParameterizedTypeReference<ApiExchangeEnvelope<NewBasicRequest, NewBasicResponse>>() {}
);
if (responseEntity.getStatusCode() == HttpStatus.OK && responseEntity.getBody() != null) {
ApiExchangeEnvelope<NewBasicRequest, NewBasicResponse> body = responseEntity.getBody();
List<NewBasicResponse> data = (body.getResponse() != null) ? body.getResponse().getData() : null;
if (data != null && !data.isEmpty()) {
// 로그 저장 로직은 기존과 동일하게 유지
log.debug("[NEW-BASIC] txId: {}", body.getTxId());
return data.get(0);
}
}
log.warn("[NEW-BASIC] 응답이 비어있음");
return null;
} catch (Exception e) {
if (generatedId != null) {
try {
String detail = ExceptionDetailUtil.buildForLog(e);
VmisCarBassMatterInqireVO errorLog = VmisCarBassMatterInqireVO.builder()
.carBassMatterInqireId(generatedId)
.linkRsltCd(ApiConstant.CNTC_RESULT_CODE_ERROR)
.linkRsltDtl(detail)
.build();
bassMatterLogService.updateResponseNewTx(errorLog);
log.error("[EXTERNAL-NEW-BASIC-ERR-LOG] 저장 완료 - ID: {}, detail: {}", generatedId, detail, e);
} catch (Exception ignore) {
log.error("[EXTERNAL-NEW-BASIC-ERR-LOG] 에러 로그 저장 실패 - ID: {}", generatedId, ignore);
}
}
throw new MessageException("[NEW-BASIC] 차량 기본정보 조회 실패: " + e.getMessage(), e);
}
}
/**
* () (new-ledger)
* API ()
*/
@Override
public NewLedgerResponse getNewLedgerInfo(NewLedgerRequest request) {
log.debug("자동차 등록원부 조회 API 호출 - 차량번호: {}", request.getVhrno());
private NewLedgerResponse callOldLedgerApi(NewLedgerRequest request) {
log.debug("[OLD-LEDGER] 자동차 등록원부 조회 API 호출");
String generatedId = null;
try {
// 1) 최초 요청 로그 저장 (별도 트랜잭션)
VmisCarLedgerFrmbkVO init = VmisCarLedgerFrmbkVO.fromNewRequest(request);
generatedId = ledgerLogService.createInitialRequestNewTx(init);
// Envelope로 감싸기 (요청 객체는 이미 모든 필수 파라미터를 포함)
Envelope<NewLedgerRequest> requestEnvelope = new Envelope<>(request);
// HTTP 헤더 설정
HttpHeaders headers = new HttpHeaders();
headers.setContentType(MediaType.APPLICATION_JSON);
HttpEntity<Envelope<NewLedgerRequest>> requestEntity = new HttpEntity<>(requestEnvelope, headers);
ResponseEntity<ApiExchangeEnvelope<NewLedgerRequest, NewLedgerResponse>> responseEntity = restTemplate.exchange(
vmisProperties.getExternal().getApi().getUrl().buildOldLedgerUrl(),
HttpMethod.POST,
requestEntity,
new ParameterizedTypeReference<ApiExchangeEnvelope<NewLedgerRequest, NewLedgerResponse>>() {}
);
if (responseEntity.getStatusCode() == HttpStatus.OK && responseEntity.getBody() != null) {
ApiExchangeEnvelope<NewLedgerRequest, NewLedgerResponse> env = responseEntity.getBody();
List<NewLedgerResponse> data = (env.getResponse() != null) ? env.getResponse().getData() : null;
if (data != null && !data.isEmpty()) {
NewLedgerResponse body = data.get(0);
VmisCarLedgerFrmbkVO masterUpdate = VmisCarLedgerFrmbkVO.fromNewResponseMaster(generatedId, body);
masterUpdate.setTxId(env.getTxId());
ledgerLogService.updateResponseNewTx(masterUpdate);
List<VmisCarLedgerFrmbkDtlVO> details = VmisCarLedgerFrmbkDtlVO.listNewFromExchange(env, generatedId);
if (details != null && !details.isEmpty()) {
ledgerLogService.saveDetailsNewTx(generatedId, details);
}
log.debug("[OLD-LEDGER] txId: {}", env.getTxId());
return body;
}
}
log.warn("[OLD-LEDGER] 자동차 등록원부 조회 응답이 비어있음");
return null;
} catch (Exception e) {
if (generatedId != null) {
try {
String detail = ExceptionDetailUtil.buildForLog(e);
VmisCarLedgerFrmbkVO errorLog = VmisCarLedgerFrmbkVO.builder()
.carLedgerFrmbkId(generatedId)
.linkRsltCd(ApiConstant.CNTC_RESULT_CODE_ERROR)
.linkRsltDtl(detail)
.build();
ledgerLogService.updateResponseNewTx(errorLog);
log.error("[EXTERNAL-OLD-LEDGER-ERR-LOG] API 호출 에러 정보 저장 완료(별도TX) - ID: {}, detail: {}", generatedId, detail, e);
} catch (Exception ignore) {
log.error("[EXTERNAL-OLD-LEDGER-ERR-LOG] 에러 로그 저장 실패 - ID: {}", generatedId, ignore);
}
}
log.error("[OLD-LEDGER] 자동차 등록원부 조회 API 호출 실패", e);
throw new MessageException("[OLD-LEDGER] 자동차 등록원부 조회 실패: " + e.getMessage(), e);
}
}
/**
* API ()
*/
private NewLedgerResponse callNewLedgerApi(NewLedgerRequest request) {
log.debug("[NEW-LEDGER] 자동차 등록원부 조회 API 호출");
String generatedId = null;
try {
VmisCarLedgerFrmbkVO init = VmisCarLedgerFrmbkVO.fromNewRequest(request);
generatedId = ledgerLogService.createInitialRequestNewTx(init);
Envelope<NewLedgerRequest> requestEnvelope = new Envelope<>(request);
HttpHeaders headers = new HttpHeaders();
headers.setContentType(MediaType.APPLICATION_JSON);
HttpEntity<Envelope<NewLedgerRequest>> requestEntity = new HttpEntity<>(requestEnvelope, headers);
// 2) API 호출 (신규 포맷) - 현재 요구사항상 신규 원부만 사용
ResponseEntity<ApiExchangeEnvelope<NewLedgerRequest, NewLedgerResponse>> responseEntity = restTemplate.exchange(
vmisProperties.getExternal().getApi().getUrl().buildNewLedgerUrl(),
HttpMethod.POST,
@ -134,7 +271,6 @@ public class ExternalVehicleApiServiceImpl extends EgovAbstractServiceImpl imple
new ParameterizedTypeReference<ApiExchangeEnvelope<NewLedgerRequest, NewLedgerResponse>>() {}
);
// 3) 응답 로그 업데이트 (마스터 + 상세, 별도 트랜잭션)
if (responseEntity.getStatusCode() == HttpStatus.OK && responseEntity.getBody() != null) {
ApiExchangeEnvelope<NewLedgerRequest, NewLedgerResponse> env = responseEntity.getBody();
List<NewLedgerResponse> data = (env.getResponse() != null) ? env.getResponse().getData() : null;
@ -148,16 +284,15 @@ public class ExternalVehicleApiServiceImpl extends EgovAbstractServiceImpl imple
if (details != null && !details.isEmpty()) {
ledgerLogService.saveDetailsNewTx(generatedId, details);
}
log.debug("[LEDGER] txId: {}", env.getTxId());
log.debug("[NEW-LEDGER] txId: {}", env.getTxId());
return body;
}
}
log.warn("자동차 등록원부 조회 응답이 비어있음 - 차량번호: {}", request.getVhrno());
log.warn("[NEW-LEDGER] 자동차 등록원부 조회 응답이 비어있음");
return null;
} catch (Exception e) {
// 4) 오류 로그 업데이트 (별도 트랜잭션)
if (generatedId != null) {
try {
String detail = ExceptionDetailUtil.buildForLog(e);
@ -167,14 +302,51 @@ public class ExternalVehicleApiServiceImpl extends EgovAbstractServiceImpl imple
.linkRsltDtl(detail)
.build();
ledgerLogService.updateResponseNewTx(errorLog);
log.error("[EXTERNAL-LEDGER-ERR-LOG] API 호출 에러 정보 저장 완료(별도TX) - ID: {}, detail: {}", generatedId, detail, e);
log.error("[EXTERNAL-NEW-LEDGER-ERR-LOG] API 호출 에러 정보 저장 완료(별도TX) - ID: {}, detail: {}", generatedId, detail, e);
} catch (Exception ignore) {
log.error("[EXTERNAL-LEDGER-ERR-LOG] 에러 로그 저장 실패 - ID: {}", generatedId, ignore);
log.error("[EXTERNAL-NEW-LEDGER-ERR-LOG] 에러 로그 저장 실패 - ID: {}", generatedId, ignore);
}
}
log.error("자동차 등록원부 조회 API 호출 실패 - 차량번호: {}", request.getVhrno(), e);
throw new MessageException("자동차 등록원부 조회 실패: " + e.getMessage(), e);
log.error("[NEW-LEDGER] 자동차 등록원부 조회 API 호출 실패", e);
throw new MessageException("[NEW-LEDGER] 자동차 등록원부 조회 실패: " + e.getMessage(), e);
}
}
/**
* NewBasicRequest OldBasicRequest
*/
private OldBasicRequest convertToOldBasicRequest(NewBasicRequest newRequest) {
OldBasicRequest oldRequest = new OldBasicRequest();
// 공통 메타 정보 복사 (필드명이 다름)
oldRequest.setInfoSysId(newRequest.getInfoSysId());
oldRequest.setInfoSysIp(newRequest.getInfoSysIpAddr());
oldRequest.setSigunguCode(newRequest.getSggCd());
oldRequest.setCntcInfoCode(newRequest.getLinkInfoCd());
oldRequest.setChargerId(newRequest.getPicId());
oldRequest.setChargerIp(newRequest.getPicIpAddr());
oldRequest.setChargerNm(newRequest.getPicNm());
// Record 변환
if (newRequest.getRecord() != null && !newRequest.getRecord().isEmpty()) {
List<OldBasicRequest.Record> oldRecords = newRequest.getRecord().stream()
.map(this::convertToOldRecord)
.collect(Collectors.toList());
oldRequest.setRecord(oldRecords);
}
return oldRequest;
}
/**
* NewBasicRequest.Record OldBasicRequest.Record
*/
private OldBasicRequest.Record convertToOldRecord(NewBasicRequest.Record newRecord) {
OldBasicRequest.Record oldRecord = new OldBasicRequest.Record();
oldRecord.setLevyStdde(newRecord.getLevyCrtrYmd());
oldRecord.setInqireSeCode(newRecord.getInqSeCd());
oldRecord.setVhrno(newRecord.getVhrno());
oldRecord.setVin(newRecord.getVin());
return oldRecord;
}
}

@ -2,9 +2,9 @@ package go.kr.project.carInspectionPenalty.callApi.controller;
import egovframework.constant.TilesConstants;
import egovframework.util.ApiResponseUtil;
import go.kr.project.api.model.request.OldBasicRequest;
import go.kr.project.api.model.request.NewBasicRequest;
import go.kr.project.api.model.request.NewLedgerRequest;
import go.kr.project.api.model.response.OldBasicResponse;
import go.kr.project.api.model.response.NewBasicResponse;
import go.kr.project.api.model.response.NewLedgerResponse;
import go.kr.project.api.service.ExternalVehicleApiService;
import io.swagger.v3.oas.annotations.Operation;
@ -41,36 +41,45 @@ public class VehicleInquiryController {
/**
* ()
* YAML old/new API
*
* @param request
* @param request ( )
* @return
*/
@PostMapping("/getBasicInfo.do")
@ResponseBody
@Operation(summary = "자동차 기본사항 조회", description = "차량 기본정보만 조회합니다.")
public ResponseEntity<?> getBasicInfo(@RequestBody OldBasicRequest request) {
@Operation(summary = "자동차 기본사항 조회", description = "YAML 설정에 따라 차량 기본정보를 조회합니다.")
public ResponseEntity<?> getBasicInfo(@RequestBody NewBasicRequest request) {
log.info("========== 자동차 기본사항 조회 시작 ==========");
log.info("요청 차량번호: {}", request.getVhrno());
log.info("부과기준일: {}", request.getLevyStdde());
log.info("조회구분코드: {}", request.getInqireSeCode());
log.info("차대번호: {}", request.getVin());
// 입력값 검증 - record 배열 확인
if (request.getRecord() == null || request.getRecord().isEmpty()) {
log.warn("조회 대상 record가 입력되지 않았습니다.");
return ApiResponseUtil.error("조회 대상 정보를 입력해주세요.");
}
NewBasicRequest.Record record = request.getRecord().get(0);
log.info("요청 차량번호: {}", record.getVhrno());
log.info("부과기준일: {}", record.getLevyCrtrYmd());
log.info("조회구분코드: {}", record.getInqSeCd());
log.info("차대번호: {}", record.getVin());
// 입력값 검증 - 부과기준일 필수
if (!StringUtils.hasText(request.getLevyStdde())) {
if (!StringUtils.hasText(record.getLevyCrtrYmd())) {
log.warn("부과기준일이 입력되지 않았습니다.");
return ApiResponseUtil.error("부과기준일을 입력해주세요.");
}
// 입력값 검증 - 차량번호 또는 차대번호 중 하나 필수
if (!StringUtils.hasText(request.getVhrno()) && !StringUtils.hasText(request.getVin())) {
if (!StringUtils.hasText(record.getVhrno()) && !StringUtils.hasText(record.getVin())) {
log.warn("차량번호 또는 차대번호가 입력되지 않았습니다.");
return ApiResponseUtil.error("차량번호 또는 차대번호 중 하나를 입력해주세요.");
}
// 차량 기본정보 조회
OldBasicResponse response = service.getBasicInfo(request);
// 차량 기본정보 조회 (YAML 설정에 따라 old/new 자동 선택)
NewBasicResponse response = service.getBasicInfo(request);
log.info("자동차 기본사항 조회 성공 - 차량번호: {}, 차대번호: {}", request.getVhrno(), request.getVin());
log.info("자동차 기본사항 조회 성공 - 차량번호: {}, 차대번호: {}", record.getVhrno(), record.getVin());
log.info("========== 자동차 기본사항 조회 완료 ==========");
return ApiResponseUtil.success(response, "자동차 기본사항 조회가 완료되었습니다.");
@ -78,19 +87,20 @@ public class VehicleInquiryController {
/**
* () ()
* YAML old/new API
*
* @param request
* @param request ( )
* @return
*/
@PostMapping("/getLedgerInfo.do")
@ResponseBody
@Operation(summary = "자동차 등록원부(갑) 조회", description = "차량 등록원부 정보만 조회합니다.")
@Operation(summary = "자동차 등록원부(갑) 조회", description = "YAML 설정에 따라 차량 등록원부 정보를 조회합니다.")
public ResponseEntity<?> getLedgerInfo(@RequestBody NewLedgerRequest request) {
log.info("========== 자동차 등록원부(갑) 조회 시작 ==========");
log.info("요청 차량번호: {}", request.getVhrno());
log.info("조회구분코드: {}", request.getInqireSeCode());
log.info("민원인성명: {}", request.getCpttrNm());
log.info("민원인주민번호: {}", request.getCpttrIhidnum() != null ? "********" : null);
log.info("조회구분코드: {}", request.getInqSeCd());
log.info("민원인성명: {}", request.getCvlprNm());
log.info("민원인주민번호: {}", request.getCvlprIdecno() != null ? "********" : null);
// 입력값 검증 - 차량번호 필수
if (!StringUtils.hasText(request.getVhrno())) {
@ -99,18 +109,18 @@ public class VehicleInquiryController {
}
// 입력값 검증 - 소유자명 필수
if (!StringUtils.hasText(request.getCpttrNm())) {
if (!StringUtils.hasText(request.getCvlprNm())) {
log.warn("소유자명이 입력되지 않았습니다.");
return ApiResponseUtil.error("소유자명을 입력해주세요.");
}
// 입력값 검증 - 주민번호 필수
if (!StringUtils.hasText(request.getCpttrIhidnum())) {
if (!StringUtils.hasText(request.getCvlprIdecno())) {
log.warn("주민번호가 입력되지 않았습니다.");
return ApiResponseUtil.error("주민번호를 입력해주세요.");
}
// 차량 등록원부 조회
// 차량 등록원부 조회 (YAML 설정에 따라 old/new 자동 선택)
NewLedgerResponse response = service.getLedgerInfo(request);
log.info("자동차 등록원부(갑) 조회 성공 - 차량번호: {}", request.getVhrno());

@ -286,17 +286,21 @@
var levyStdde = $.trim($("#levyStdde").val()).replace(/-/g, '');
var vin = $.trim($("#vin").val());
// BasicRequest의 @JsonProperty에 맞춰 대문자 키 사용
// INQIRE_SE_CODE는 VmisRequestEnricher에서 자동 설정됨
var params = {
// NewBasicRequest 형식: record 배열 구조 사용
// INQ_SE_CD는 VmisRequestEnricher에서 자동 설정됨
var record = {
VHRNO: vhrno,
LEVY_STDDE: levyStdde
LEVY_CRTR_YMD: levyStdde // 신규 필드명
};
if (vin) {
params.VIN = vin;
record.VIN = vin;
}
var params = {
record: [record] // record 배열로 감싸기
};
$.ajax({
url: '/carInspectionPenalty/callApi/getBasicInfo.do',
type: 'POST',
@ -328,22 +332,21 @@
var cpttrNm = $.trim($("#cpttrNm").val());
var cpttrIhidnum = $.trim($("#cpttrIhidnum").val());
var cpttrLegaldongCode = $.trim($("#cpttrLegaldongCode").val());
var routeSeCode = $("#routeSeCode").val();
var detailExpression = $("#detailExpression").val();
// LedgerRequest의 @JsonProperty에 맞춰 대문자 키 사용
// INQIRE_SE_CODE는 VmisRequestEnricher에서 자동으로 "1"(열람)로 설정됨
// NewLedgerRequest의 @JsonProperty에 맞춰 신규 필드명 사용
// INQ_SE_CD는 VmisRequestEnricher에서 자동으로 "1"(열람)로 설정됨
var params = {
VHRNO: vhrno,
CPTTR_NM: cpttrNm,
CPTTR_IHIDNUM: cpttrIhidnum,
ROUTE_SE_CODE: routeSeCode,
DETAIL_EXPRESSION: detailExpression
CVLPR_NM: cpttrNm, // 민원인성명 (구: CPTTR_NM)
CVLPR_IDECNO: cpttrIhidnum, // 민원인주민번호 (구: CPTTR_IHIDNUM)
PATH_SE_CD: "3", // 경로구분코드 고정:3 (구: ROUTE_SE_CODE)
DSCTN_INDCT: detailExpression // 내역표시 (구: DETAIL_EXPRESSION)
};
// 선택 필드 추가
if (cpttrLegaldongCode) {
params.CPTTR_LEGALDONG_CODE = cpttrLegaldongCode;
params.CVLPR_STDG_CD = cpttrLegaldongCode; // 민원인법정동코드 (구: CPTTR_LEGALDONG_CODE)
}
$.ajax({
@ -372,7 +375,21 @@
* 기본사항 조회 결과 표시
*/
displayBasicResult: function(data) {
var html = this.getBasicInfoHtml(data);
// NewBasicResponse 구조: linkRsltCd, linkRsltDtl, record[]
// 오류 확인
if (data.linkRsltCd && data.linkRsltCd !== '0') {
alert("조회 실패\n\n" + (data.linkRsltDtl || "오류가 발생했습니다."));
$("#resultContent").html('<div class="result-empty">조회된 데이터가 없습니다.</div>');
return;
}
// record 배열에서 첫 번째 항목 추출
if (!data.record || data.record.length === 0) {
$("#resultContent").html('<div class="result-empty">조회된 데이터가 없습니다.</div>');
return;
}
var html = this.getBasicInfoHtml(data.record[0]);
$("#resultContent").html(html);
},
@ -385,90 +402,93 @@
html += '<table class="result-detail-table">';
html += '<colgroup><col style="width:20%"><col style="width:30%"><col style="width:20%"><col style="width:30%"></colgroup>';
html += '<tr><th>생산년도</th><td>' + this.nvl(data.prye) + '</td>';
html += '<th>등록일자</th><td>' + this.nvl(data.registDe) + '</td></tr>';
html += '<tr><th>말소등록구분코드</th><td>' + this.nvl(data.ersrRegistSeCode) + '</td>';
html += '<th>말소등록구분명</th><td>' + this.nvl(data.ersrRegistSeNm) + '</td></tr>';
html += '<tr><th>말소등록일자</th><td>' + this.nvl(data.ersrRegistDe) + '</td>';
html += '<th>등록상세코드</th><td>' + this.nvl(data.registDetailCode) + '</td></tr>';
html += '<tr><th>배기량</th><td>' + this.nvl(data.dsplvl) + '</td>';
html += '<th>사용본거지법정동코드</th><td>' + this.nvl(data.useStrnghldLegaldongCode) + '</td></tr>';
html += '<tr><th>사용본거지행정동코드</th><td>' + this.nvl(data.useStrnghldAdstrdCode) + '</td>';
html += '<th>사용본거지산</th><td>' + this.nvl(data.useStrnghldMntn) + '</td></tr>';
html += '<tr><th>사용본거지번지</th><td>' + this.nvl(data.useStrnghldLnbr) + '</td>';
html += '<th>사용본거지호</th><td>' + this.nvl(data.useStrnghldHo) + '</td></tr>';
html += '<tr><th>사용본거지주소명</th><td>' + this.nvl(data.useStrnghldAdresNm) + '</td>';
html += '<th>사용본거지도로명코드</th><td>' + this.nvl(data.useStrnghldRoadNmCode) + '</td></tr>';
html += '<tr><th>사용본거지지하건물구분코드</th><td>' + this.nvl(data.usgsrhldUndgrndBuldSeCode) + '</td>';
html += '<th>사용본거지건물본번</th><td>' + this.nvl(data.useStrnghldBuldMainNo) + '</td></tr>';
html += '<tr><th>사용본거지건물부번</th><td>' + this.nvl(data.useStrnghldBuldSubNo) + '</td>';
html += '<th>사용본거지우편번호코드</th><td>' + this.nvl(data.useStrnghldGrcCode) + '</td></tr>';
html += '<tr><th>사용본거지주소전체</th><td colspan="3">' + this.nvl(data.usgsrhldAdresFull) + '</td></tr>';
html += '<tr><th>소유자구분코드</th><td>' + this.nvl(data.mberSeCode) + '</td>';
html += '<th>소유자명</th><td>' + this.nvl(data.mberNm) + '</td></tr>';
html += '<tr><th>소유자구분번호</th><td>' + this.nvl(data.mberSeNo) + '</td>';
// NewBasicResponse.Record 필드명 사용
html += '<tr><th>차량번호</th><td>' + this.nvl(data.vhrno) + '</td>';
html += '<th>차명</th><td>' + this.nvl(data.atmbNm) + '</td></tr>';
html += '<tr><th>대표소유자성명</th><td>' + this.nvl(data.rprsOwnrNm) + '</td>';
html += '<th>대표소유자주민번호</th><td>' + this.nvl(data.rprsvOwnrIdecno) + '</td></tr>';
html += '<tr><th>말소등록일</th><td>' + this.nvl(data.ersrRegYmd) + '</td>';
html += '<th>처리불가사유코드</th><td>' + this.nvl(data.prcsImprtyRsnCd) + '</td></tr>';
html += '<tr><th>생산년도</th><td>' + this.nvl(data.prdcYy) + '</td>';
html += '<th>등록일</th><td>' + this.nvl(data.regYmd) + '</td></tr>';
html += '<tr><th>말소등록구분코드</th><td>' + this.nvl(data.ersrRegSeCd) + '</td>';
html += '<th>말소등록구분명</th><td>' + this.nvl(data.ersrRegSeNm) + '</td></tr>';
html += '<tr><th>등록상세코드</th><td>' + this.nvl(data.regDetailCd) + '</td>';
html += '<th>배기량</th><td>' + this.nvl(data.dsplvl) + '</td></tr>';
html += '<tr><th>사용본거지법정동코드</th><td>' + this.nvl(data.useStdgCd) + '</td>';
html += '<th>사용본거지행정동코드</th><td>' + this.nvl(data.useAdstrdCd) + '</td></tr>';
html += '<tr><th>사용본거지산</th><td>' + this.nvl(data.useMt) + '</td>';
html += '<th>사용본거지번지</th><td>' + this.nvl(data.useLnbr) + '</td></tr>';
html += '<tr><th>사용본거지호</th><td>' + this.nvl(data.useHo) + '</td>';
html += '<th>사용본거지주소명</th><td>' + this.nvl(data.useAddrNm) + '</td></tr>';
html += '<tr><th>사용본거지도로명코드</th><td>' + this.nvl(data.useRoadNmCd) + '</td>';
html += '<th>사용본거지지하건물구분코드</th><td>' + this.nvl(data.useUgBldSeCd) + '</td></tr>';
html += '<tr><th>사용본거지건물본번</th><td>' + this.nvl(data.useBldgMainNo) + '</td>';
html += '<th>사용본거지건물부번</th><td>' + this.nvl(data.useBldgSubNo) + '</td></tr>';
html += '<tr><th>사용본거지우편번호코드</th><td>' + this.nvl(data.useZipCd) + '</td>';
html += '<th>사용본거지주소전체</th><td>' + this.nvl(data.useAddrFull) + '</td></tr>';
html += '<tr><th>소유자구분코드</th><td>' + this.nvl(data.ownrSeCd) + '</td>';
html += '<th>소유자명</th><td>' + this.nvl(data.ownrNm) + '</td></tr>';
html += '<tr><th>소유자구분번호</th><td>' + this.nvl(data.ownrSeNo) + '</td>';
html += '<th>전화번호</th><td>' + this.nvl(data.telno) + '</td></tr>';
html += '<tr><th>소유자법정동코드</th><td>' + this.nvl(data.ownerLegaldongCode) + '</td>';
html += '<th>소유자행정동코드</th><td>' + this.nvl(data.ownerAdstrdCode) + '</td></tr>';
html += '<tr><th>소유자산</th><td>' + this.nvl(data.ownerMntn) + '</td>';
html += '<th>소유자번지</th><td>' + this.nvl(data.ownerLnbr) + '</td></tr>';
html += '<tr><th>소유자호</th><td>' + this.nvl(data.ownerHo) + '</td>';
html += '<th>소유자주소명</th><td>' + this.nvl(data.ownerAdresNm) + '</td></tr>';
html += '<tr><th>소유자도로명코드</th><td>' + this.nvl(data.ownerRoadNmCode) + '</td>';
html += '<th>소유자지하건물구분코드</th><td>' + this.nvl(data.ownerUndgrndBuldSeCode) + '</td></tr>';
html += '<tr><th>소유자건물본번</th><td>' + this.nvl(data.ownerBuldMainNo) + '</td>';
html += '<th>소유자건물부번</th><td>' + this.nvl(data.ownerBuldSubNo) + '</td></tr>';
html += '<tr><th>소유자주소전체</th><td colspan="3">' + this.nvl(data.ownerAdresFull) + '</td></tr>';
html += '<tr><th>변경후차량번호</th><td>' + this.nvl(data.aftrVhrno) + '</td>';
html += '<th>사용연료코드</th><td>' + this.nvl(data.useFuelCode) + '</td></tr>';
html += '<tr><th>용도구분코드</th><td>' + this.nvl(data.prposSeCode) + '</td>';
html += '<th>제작사명</th><td>' + this.nvl(data.mtrsFomNm) + '</td></tr>';
html += '<tr><th>변경전차량번호</th><td>' + this.nvl(data.frntVhrno) + '</td>';
html += '<th>차량번호</th><td>' + this.nvl(data.vhrno) + '</td></tr>';
html += '<tr><th>차대번호</th><td>' + this.nvl(data.vin) + '</td>';
html += '<th>차명</th><td>' + this.nvl(data.cnm) + '</td></tr>';
html += '<tr><th>소유자법정동코드</th><td>' + this.nvl(data.ownrStdgCd) + '</td>';
html += '<th>소유자행정동코드</th><td>' + this.nvl(data.ownrAdstrdCd) + '</td></tr>';
html += '<tr><th>소유자산</th><td>' + this.nvl(data.ownrMt) + '</td>';
html += '<th>소유자번지</th><td>' + this.nvl(data.ownrLnbr) + '</td></tr>';
html += '<tr><th>소유자호</th><td>' + this.nvl(data.ownrHo) + '</td>';
html += '<th>소유자주소명</th><td>' + this.nvl(data.ownrAddrNm) + '</td></tr>';
html += '<tr><th>소유자도로명코드</th><td>' + this.nvl(data.ownrRoadNmCd) + '</td>';
html += '<th>소유자지하건물구분코드</th><td>' + this.nvl(data.ownrUgBldSeCd) + '</td></tr>';
html += '<tr><th>소유자건물본번</th><td>' + this.nvl(data.ownrBldgMainNo) + '</td>';
html += '<th>소유자건물부번</th><td>' + this.nvl(data.ownrBldgSubNo) + '</td></tr>';
html += '<tr><th>소유자주소전체</th><td colspan="3">' + this.nvl(data.ownrAddrFull) + '</td></tr>';
html += '<tr><th>변경후차량번호</th><td>' + this.nvl(data.chgAftVhrno) + '</td>';
html += '<th>사용연료코드</th><td>' + this.nvl(data.useFuelCd) + '</td></tr>';
html += '<tr><th>용도구분코드</th><td>' + this.nvl(data.prpsSeCd) + '</td>';
html += '<th>제작사명</th><td>' + this.nvl(data.mnfcturNm) + '</td></tr>';
html += '<tr><th>변경전차량번호</th><td>' + this.nvl(data.chgBefVhrno) + '</td>';
html += '<th>차대번호</th><td>' + this.nvl(data.vin) + '</td></tr>';
html += '<tr><th>차량총중량</th><td>' + this.nvl(data.vhcleTotWt) + '</td>';
html += '<th>자동차보험종료일자</th><td>' + this.nvl(data.caagEndde) + '</td></tr>';
html += '<tr><th>변경일자</th><td>' + this.nvl(data.changeDe) + '</td>';
html += '<th>차종분류코드</th><td>' + this.nvl(data.vhctyAsortCode) + '</td></tr>';
html += '<tr><th>차종유형코드</th><td>' + this.nvl(data.vhctyTyCode) + '</td>';
html += '<th>차종구분코드</th><td>' + this.nvl(data.vhctySeCode) + '</td></tr>';
html += '<th>자동차보험종료일자</th><td>' + this.nvl(data.carInsrEndYmd) + '</td></tr>';
html += '<tr><th>변경일자</th><td>' + this.nvl(data.chgYmd) + '</td>';
html += '<th>차종분류코드</th><td>' + this.nvl(data.vhctyClsfCd) + '</td></tr>';
html += '<tr><th>차종유형코드</th><td>' + this.nvl(data.vhctyTyCd) + '</td>';
html += '<th>차종구분코드</th><td>' + this.nvl(data.vhctySeCd) + '</td></tr>';
html += '<tr><th>최대적재량</th><td>' + this.nvl(data.mxmmLdg) + '</td>';
html += '<th>차종분류명</th><td>' + this.nvl(data.vhctyAsortNm) + '</td></tr>';
html += '<th>차종분류명</th><td>' + this.nvl(data.vhctyClsfNm) + '</td></tr>';
html += '<tr><th>차종유형명</th><td>' + this.nvl(data.vhctyTyNm) + '</td>';
html += '<th>차종구분명</th><td>' + this.nvl(data.vhctySeNm) + '</td></tr>';
html += '<tr><th>최초등록일자</th><td>' + this.nvl(data.frstRegistDe) + '</td>';
html += '<th>형식명</th><td>' + this.nvl(data.fomNm) + '</td></tr>';
html += '<tr><th>취득일자</th><td>' + this.nvl(data.acqsDe) + '</td>';
html += '<th>취득종료일자</th><td>' + this.nvl(data.acqsEndDe) + '</td></tr>';
html += '<tr><th>연식월</th><td>' + this.nvl(data.yblMd) + '</td>';
html += '<th>이전등록일자</th><td>' + this.nvl(data.transrRegistDe) + '</td></tr>';
html += '<tr><th>특정등록상태코드</th><td>' + this.nvl(data.spcfRegistSttusCode) + '</td>';
html += '<tr><th>최초등록일자</th><td>' + this.nvl(data.frstRegYmd) + '</td>';
html += '<th>형식명</th><td>' + this.nvl(data.mdlNm) + '</td></tr>';
html += '<tr><th>취득일자</th><td>' + this.nvl(data.acqsYmd) + '</td>';
html += '<th>취득종료일자</th><td>' + this.nvl(data.acqsEndYmd) + '</td></tr>';
html += '<tr><th>연식월</th><td>' + this.nvl(data.yrMd) + '</td>';
html += '<th>이전등록일자</th><td>' + this.nvl(data.trnsfRegYmd) + '</td></tr>';
html += '<tr><th>특정등록상태코드</th><td>' + this.nvl(data.spcfRegSttsCd) + '</td>';
html += '<th>색상명</th><td>' + this.nvl(data.colorNm) + '</td></tr>';
html += '<tr><th>저당건수</th><td>' + this.nvl(data.mrtgCo) + '</td>';
html += '<th>압류건수</th><td>' + this.nvl(data.seizrCo) + '</td></tr>';
html += '<tr><th>압인건수</th><td>' + this.nvl(data.stmdCo) + '</td>';
html += '<th>번호판보관여부</th><td>' + this.nvl(data.nmplCsdyAt) + '</td></tr>';
html += '<tr><th>번호판보관반납일자</th><td>' + this.nvl(data.nmplCsdyRemnrDe) + '</td>';
html += '<th>원산지구분코드</th><td>' + this.nvl(data.originSeCode) + '</td></tr>';
html += '<tr><th>번호판규격코드</th><td>' + this.nvl(data.nmplStndrdCode) + '</td>';
html += '<th>취득금액</th><td>' + this.nvl(data.acqsAmount) + '</td></tr>';
html += '<tr><th>검사유효기간시작일자</th><td>' + this.nvl(data.insptValidPdBgnde) + '</td>';
html += '<th>검사유효기간종료일자</th><td>' + this.nvl(data.insptValidPdEndde) + '</td></tr>';
html += '<tr><th>화물차승차정원수</th><td>' + this.nvl(data.tkcarPscapCo) + '</td>';
html += '<th>사양번호</th><td>' + this.nvl(data.spmnno) + '</td></tr>';
html += '<tr><th>주행거리</th><td>' + this.nvl(data.trvlDstnc) + '</td>';
html += '<th>최초등록신청번호</th><td>' + this.nvl(data.frstRegistRqrcno) + '</td></tr>';
html += '<tr><th>자진말소예방공지일자</th><td>' + this.nvl(data.vlntErsrPrvntcNticeDe) + '</td>';
html += '<th>등록기관명</th><td>' + this.nvl(data.registInsttNm) + '</td></tr>';
html += '<tr><th>처리불가사유코드</th><td>' + this.nvl(data.processImprtyResnCode) + '</td>';
html += '<th>처리불가사유상세</th><td>' + this.nvl(data.processImprtyResnDtls) + '</td></tr>';
html += '<tr><th>차체길이</th><td>' + this.nvl(data.cbdLt) + '</td>';
html += '<th>차체너비</th><td>' + this.nvl(data.cbdBt) + '</td></tr>';
html += '<tr><th>차체높이</th><td>' + this.nvl(data.cbdHg) + '</td>';
html += '<tr><th>저당건수</th><td>' + this.nvl(data.mtgCnt) + '</td>';
html += '<th>압류건수</th><td>' + this.nvl(data.seizCnt) + '</td></tr>';
html += '<tr><th>압인건수</th><td>' + this.nvl(data.rstrtCnt) + '</td>';
html += '<th>번호판보관여부</th><td>' + this.nvl(data.nmplCsdyYn) + '</td></tr>';
html += '<tr><th>번호판보관반납일자</th><td>' + this.nvl(data.nmplCsdyRtrnYmd) + '</td>';
html += '<th>원산지구분코드</th><td>' + this.nvl(data.orginSeCd) + '</td></tr>';
html += '<tr><th>번호판규격코드</th><td>' + this.nvl(data.nmplStndCd) + '</td>';
html += '<th>취득금액</th><td>' + this.nvl(data.acqsAmt) + '</td></tr>';
html += '<tr><th>검사유효기간시작일자</th><td>' + this.nvl(data.inspVldPdBgngYmd) + '</td>';
html += '<th>검사유효기간종료일자</th><td>' + this.nvl(data.inspVldPdEndYmd) + '</td></tr>';
html += '<tr><th>화물차승차정원수</th><td>' + this.nvl(data.frecarRdnmprCnt) + '</td>';
html += '<th>사양번호</th><td>' + this.nvl(data.specNo) + '</td></tr>';
html += '<tr><th>주행거리</th><td>' + this.nvl(data.runDist) + '</td>';
html += '<th>최초등록신청번호</th><td>' + this.nvl(data.frstRegAplyNo) + '</td></tr>';
html += '<tr><th>자진말소예방공지일자</th><td>' + this.nvl(data.vltrErsrPrvntNtcYmd) + '</td>';
html += '<th>등록기관명</th><td>' + this.nvl(data.regOrgNm) + '</td></tr>';
html += '<tr><th>처리불가사유상세</th><td colspan="3">' + this.nvl(data.prcsImprtyRsnDtl) + '</td></tr>';
html += '<tr><th>차체길이</th><td>' + this.nvl(data.vhbdyLt) + '</td>';
html += '<th>차체너비</th><td>' + this.nvl(data.vhbdyBt) + '</td></tr>';
html += '<tr><th>차체높이</th><td>' + this.nvl(data.vhbdyHt) + '</td>';
html += '<th>최초최대적재량</th><td>' + this.nvl(data.frstMxmmLdg) + '</td></tr>';
html += '<tr><th>연료소비율</th><td>' + this.nvl(data.fuelCnsmpRt) + '</td>';
html += '<th>전기복합연료소비율</th><td>' + this.nvl(data.elctyCmpndFuelCnsmpRt) + '</td></tr>';
html += '<th>전기복합연료소비율</th><td>' + this.nvl(data.elecCmplxFuelCnsmpRt) + '</td></tr>';
html += '</table>';
html += '</div>';
return html;
@ -639,7 +659,6 @@
$("#cpttrNm").val("");
$("#cpttrIhidnum").val("");
$("#cpttrLegaldongCode").val("");
$("#routeSeCode").val("3");
$("#detailExpression").val("1");
// 결과 영역 초기화
$("#resultContent").html('<div class="result-empty">조회 버튼을 클릭하여 차량 정보를 조회하세요.</div>');

Loading…
Cancel
Save