### feat: 차량번호 대신 차대번호 활용 및 Step 0 로직 추가

- **차량번호 대신 차대번호 활용**
  - `OwnerCloseWithin31Checker`, `ProductLevyOver31Checker`, `ProductUseChecker` 등 여러 `delay_checker` 및 `om_checker` 클래스:
    - Step 0 단계에서 API 호출을 통해 차대번호(`vin`)를 조회하도록 수정.
    - Step 1 단계 및 이후 요청에서는 차량번호 대신 차대번호를 사용.

- **Step 0 로직 추가**
  - 명의이전 및 상품용 지연 케이스 모두 Step 0 단계 신설:
    - API 호출로 차대번호 조회.
    - 응답 데이터 유효성 검증 추가:
      - 응답 데이터가 없거나 비정상이면 null 반환.
    - 로깅(`log.info` 및 `log.warn`) 강화:
      - 오류나 응답 없음 등 상태에 따라 적절히 로그 출력.
    - `bassMatterLogService.updateCarFfnlgTrgtIdByTxIdNewTx` 호출로 로그 데이터 초기화.

- **JSP 검색 조건 로직 수정**
  - 검색 조건에서 날짜 포맷 관련 `.replace("-", "")` 제거:
    - 원본 값을 그대로 활용.
    - `searchCond.schRcptYmdStart`, `searchCond.schRcptYmdEnd` 등 검색 타임라인 유지.

- **서비스 로직 유지보수**
  - `inspYmd` 또는 `levyCrtrYmd`와 같은 기존 요청 포맷에 따라 Step 0의 차대번호를 전달하도록 기존 메서드 호출 방식 수정.
  - 불필요한 중복 호출 및 데이터 매핑 로직 제거.

- **기타**
  - 공통화된 API 호출 및 처리 로직 반영.
  - 관련 로직 가독성 강화를 위한 주석 및 변수명 수정.
main
박성영 4 days ago
parent 11456d7340
commit 045c6ec816

@ -43,10 +43,24 @@ public class OwnerCloseWithin31Checker extends AbstractComparisonChecker {
String inspEndYmd = existingData.getInspEndYmd().replace("-", "");
try {
log.info("[내사종결-명의이전] Step 0: 자동차기본정보 조회 - 차량번호: {}, 현재일", vhclno);
NewBasicRequest step0Request = createBasicRequest(vhclno, null, LocalDate.now().format(DATE_FORMATTER));
NewBasicResponse step0Response = apiService.getBasicInfo(step0Request);
bassMatterLogService.updateCarFfnlgTrgtIdByTxIdNewTx(step0Response, existingData.getCarFfnlgTrgtId());
if (step0Response == null || step0Response.getRecord() == null || step0Response.getRecord().isEmpty()) {
log.warn("[내사종결-명의이전] Step 0 응답 없음 - 차량번호: {}", vhclno);
return null;
}
NewBasicResponse.Record step0Record = step0Response.getRecord().get(0);
String step0vin = step0Record.getVin(); // 차대번호
// ========== Step 1: 자동차기본정보 조회 (차량번호, 부과일자=검사일) ==========
log.info("[내사종결-명의이전] Step 1: 자동차기본정보 조회 - 차량번호: {}, 검사일: {}", vhclno, inspYmd);
log.info("[내사종결-명의이전] Step 1: 자동차기본정보 조회 - 차대번호: {}, 검사일: {}", step0vin, inspYmd);
NewBasicRequest step1Request = createBasicRequest(vhclno, null, inspYmd);
NewBasicRequest step1Request = createBasicRequest(null, step0vin, inspYmd);
NewBasicResponse step1Response = apiService.getBasicInfo(step1Request);
bassMatterLogService.updateCarFfnlgTrgtIdByTxIdNewTx(step1Response, existingData.getCarFfnlgTrgtId());

@ -43,10 +43,24 @@ public class OwnerLevyOver31Checker extends AbstractComparisonChecker {
String inspEndYmd = existingData.getInspEndYmd().replace("-", "");
try {
log.info("[날짜수정후부과-명의이전] Step 0: 자동차기본정보 조회 - 차량번호: {}, 현재일", vhclno);
NewBasicRequest step0Request = createBasicRequest(vhclno, null, LocalDate.now().format(DATE_FORMATTER));
NewBasicResponse step0Response = apiService.getBasicInfo(step0Request);
bassMatterLogService.updateCarFfnlgTrgtIdByTxIdNewTx(step0Response, existingData.getCarFfnlgTrgtId());
if (step0Response == null || step0Response.getRecord() == null || step0Response.getRecord().isEmpty()) {
log.warn("[날짜수정후부과-명의이전] Step 0 응답 없음 - 차량번호: {}", vhclno);
return null;
}
NewBasicResponse.Record step0Record = step0Response.getRecord().get(0);
String step0vin = step0Record.getVin(); // 차대번호
// ========== Step 1: 자동차기본정보 조회 (차량번호, 부과일자=검사일) ==========
log.info("[날짜수정후부과-명의이전] Step 1: 자동차기본정보 조회 - 차량번호: {}, 검사일: {}", vhclno, inspYmd);
log.info("[날짜수정후부과-명의이전] Step 1: 자동차기본정보 조회 - 차대번호: {}, 검사일: {}", step0vin, inspYmd);
NewBasicRequest step1Request = createBasicRequest(vhclno, null, inspYmd);
NewBasicRequest step1Request = createBasicRequest(null, step0vin, inspYmd);
NewBasicResponse step1Response = apiService.getBasicInfo(step1Request);
bassMatterLogService.updateCarFfnlgTrgtIdByTxIdNewTx(step1Response, existingData.getCarFfnlgTrgtId());

@ -43,10 +43,24 @@ public class ProductCloseWithin31Checker extends AbstractComparisonChecker {
String inspEndYmd = existingData.getInspEndYmd().replace("-", "");
try {
log.info("[내사종결-명의이전 상품용] Step 0: 자동차기본정보 조회 - 차량번호: {}, 현재일", vhclno);
NewBasicRequest step0Request = createBasicRequest(vhclno, null, LocalDate.now().format(DATE_FORMATTER));
NewBasicResponse step0Response = apiService.getBasicInfo(step0Request);
bassMatterLogService.updateCarFfnlgTrgtIdByTxIdNewTx(step0Response, existingData.getCarFfnlgTrgtId());
if (step0Response == null || step0Response.getRecord() == null || step0Response.getRecord().isEmpty()) {
log.warn("[내사종결-명의이전 상품용] Step 0 응답 없음 - 차량번호: {}", vhclno);
return null;
}
NewBasicResponse.Record step0Record = step0Response.getRecord().get(0);
String step0vin = step0Record.getVin(); // 차대번호
// ========== Step 1: 자동차기본정보 조회 (차량번호, 부과일자=검사일) ==========
log.info("[내사종결-명의이전 상품용] Step 1: 자동차기본정보 조회 - 차량번호: {}, 검사일: {}", vhclno, inspYmd);
log.info("[내사종결-명의이전 상품용] Step 1: 자동차기본정보 조회 - 차대번호: {}, 검사일: {}", step0vin, inspYmd);
NewBasicRequest step1Request = createBasicRequest(vhclno, null, inspYmd);
NewBasicRequest step1Request = createBasicRequest(null, step0vin, inspYmd);
NewBasicResponse step1Response = apiService.getBasicInfo(step1Request);
bassMatterLogService.updateCarFfnlgTrgtIdByTxIdNewTx(step1Response, existingData.getCarFfnlgTrgtId());

@ -43,10 +43,24 @@ public class ProductLevyOver31Checker extends AbstractComparisonChecker {
String inspEndYmd = existingData.getInspEndYmd().replace("-", "");
try {
log.info("[날짜수정후부과-명의이전 상품용] Step 0: 자동차기본정보 조회 - 차량번호: {}, 현재일", vhclno);
NewBasicRequest step0Request = createBasicRequest(vhclno, null, LocalDate.now().format(DATE_FORMATTER));
NewBasicResponse step0Response = apiService.getBasicInfo(step0Request);
bassMatterLogService.updateCarFfnlgTrgtIdByTxIdNewTx(step0Response, existingData.getCarFfnlgTrgtId());
if (step0Response == null || step0Response.getRecord() == null || step0Response.getRecord().isEmpty()) {
log.warn("[날짜수정후부과-명의이전 상품용] Step 0 응답 없음 - 차량번호: {}", vhclno);
return null;
}
NewBasicResponse.Record step0Record = step0Response.getRecord().get(0);
String step0vin = step0Record.getVin(); // 차대번호
// ========== Step 1: 자동차기본정보 조회 (차량번호, 부과일자=검사일) ==========
log.info("[날짜수정후부과-명의이전 상품용] Step 1: 자동차기본정보 조회 - 차량번호: {}, 검사일: {}", vhclno, inspYmd);
log.info("[날짜수정후부과-명의이전 상품용] Step 1: 자동차기본정보 조회 - 차대번호: {}, 검사일: {}", step0vin, inspYmd);
NewBasicRequest step1Request = createBasicRequest(vhclno, null, inspYmd);
NewBasicRequest step1Request = createBasicRequest(null, step0vin, inspYmd);
NewBasicResponse step1Response = apiService.getBasicInfo(step1Request);
bassMatterLogService.updateCarFfnlgTrgtIdByTxIdNewTx(step1Response, existingData.getCarFfnlgTrgtId());

@ -43,10 +43,24 @@ public class ProductUseChecker extends AbstractComparisonChecker {
String inspEndYmd = existingData.getInspEndYmd().replace("-", "");
try {
// ========== Step 1: 자동차기본정보 조회 (차량번호, 부과일자=검사일) ==========
log.info("[상품용] Step 1: 자동차기본정보 조회 - 차량번호: {}, 검사일: {}", vhclno, inspYmd);
NewBasicRequest step1Request = createBasicRequest(vhclno, null, inspYmd);
log.info("[상품용] Step 0: 자동차기본정보 조회 - 차량번호: {}, 현재일", vhclno);
NewBasicRequest step0Request = createBasicRequest(vhclno, null, LocalDate.now().format(DATE_FORMATTER));
NewBasicResponse step0Response = apiService.getBasicInfo(step0Request);
bassMatterLogService.updateCarFfnlgTrgtIdByTxIdNewTx(step0Response, existingData.getCarFfnlgTrgtId());
if (step0Response == null || step0Response.getRecord() == null || step0Response.getRecord().isEmpty()) {
log.warn("[상품용] Step 0 응답 없음 - 차량번호: {}", vhclno);
return null;
}
NewBasicResponse.Record step0Record = step0Response.getRecord().get(0);
String step0vin = step0Record.getVin(); // 차대번호
// ========== Step 1: 자동차기본정보 조회 (차대번호, 부과일자=검사일) ==========
log.info("[상품용] Step 1: 자동차기본정보 조회 - 차대번호: {}, 검사일: {}", step0vin, inspYmd);
NewBasicRequest step1Request = createBasicRequest(null, step0vin, inspYmd);
NewBasicResponse step1Response = apiService.getBasicInfo(step1Request);
bassMatterLogService.updateCarFfnlgTrgtIdByTxIdNewTx(step1Response, existingData.getCarFfnlgTrgtId());

@ -43,10 +43,24 @@ public class ProductUseChnageChecker extends AbstractComparisonChecker {
String inspEndYmd = existingData.getInspEndYmd().replace("-", "");
try {
log.info("[상품용] Step 0: 자동차기본정보 조회 - 차량번호: {}, 현재일", vhclno);
NewBasicRequest step0Request = createBasicRequest(vhclno, null, LocalDate.now().format(DATE_FORMATTER));
NewBasicResponse step0Response = apiService.getBasicInfo(step0Request);
bassMatterLogService.updateCarFfnlgTrgtIdByTxIdNewTx(step0Response, existingData.getCarFfnlgTrgtId());
if (step0Response == null || step0Response.getRecord() == null || step0Response.getRecord().isEmpty()) {
log.warn("[상품용] Step 0 응답 없음 - 차량번호: {}", vhclno);
return null;
}
NewBasicResponse.Record step0Record = step0Response.getRecord().get(0);
String step0vin = step0Record.getVin(); // 차대번호
// ========== Step 1: 자동차기본정보 조회 (차량번호, 부과일자=검사일) ==========
log.info("[상품용-변경등록] Step 1: 자동차기본정보 조회 - 차량번호: {}, 검사일: {}", vhclno, inspYmd);
log.info("[상품용-변경등록] Step 1: 자동차기본정보 조회 - 차대번호: {}, 검사일: {}", step0vin, inspYmd);
NewBasicRequest step1Request = createBasicRequest(vhclno, null, inspYmd);
NewBasicRequest step1Request = createBasicRequest(null, step0vin, inspYmd);
NewBasicResponse step1Response = apiService.getBasicInfo(step1Request);
bassMatterLogService.updateCarFfnlgTrgtIdByTxIdNewTx(step1Response, existingData.getCarFfnlgTrgtId());

@ -66,10 +66,23 @@ public class TransferCase115DayChecker extends AbstractComparisonChecker {
log.info("[이첩-1] 부과기준일 = 검사일자 = {}", levyCrtrYmd);
}
log.info("[이첩] Step 0: 자동차기본정보 조회 - 차량번호: {}, 현재일", vhclno);
NewBasicRequest step0Request = createBasicRequest(vhclno, null, LocalDate.now().format(DATE_FORMATTER));
NewBasicResponse step0Response = apiService.getBasicInfo(step0Request);
bassMatterLogService.updateCarFfnlgTrgtIdByTxIdNewTx(step0Response, existingData.getCarFfnlgTrgtId());
if (step0Response == null || step0Response.getRecord() == null || step0Response.getRecord().isEmpty()) {
log.warn("[이첩] Step 0 응답 없음 - 차량번호: {}", vhclno);
return null;
}
NewBasicResponse.Record step0Record = step0Response.getRecord().get(0);
String step0vin = step0Record.getVin(); // 차대번호
// 자동차기본정보 API 호출 (부과기준일 기준)
log.info("[{}] 자동차기본정보 조회 - 차량번호: {}, 부과기준일: {}", transferType, vhclno, levyCrtrYmd);
log.info("[{}] 자동차기본정보 조회 - 차대번호: {}, 부과기준일: {}", transferType, step0vin, levyCrtrYmd);
NewBasicRequest request = createBasicRequest(vhclno, null, levyCrtrYmd);
NewBasicRequest request = createBasicRequest(null, step0vin, levyCrtrYmd);
NewBasicResponse response = apiService.getBasicInfo(request);
// API 응답에 CAR_FFNLG_TRGT_ID 업데이트

@ -80,10 +80,24 @@ public class OwnerTransferOmChecker extends AbstractComparisonOmChecker {
}
try {
log.info("[명의이전-미필] Step 0: 자동차기본정보 조회 - 차량번호: {}, 현재일", vhclno);
NewBasicRequest step0Request = createBasicRequest(vhclno, null, LocalDate.now().format(DATE_FORMATTER));
NewBasicResponse step0Response = apiService.getBasicInfo(step0Request);
bassMatterLogService.updateCarFfnlgTrgtIdByTxIdNewTx(step0Response, existingData.getCarFfnlgTrgtIncmpId());
if (step0Response == null || step0Response.getRecord() == null || step0Response.getRecord().isEmpty()) {
log.warn("[명의이전-미필] Step 0 응답 없음 - 차량번호: {}", vhclno);
return null;
}
NewBasicResponse.Record step0Record = step0Response.getRecord().get(0);
String step0vin = step0Record.getVin(); // 차대번호
// ========== Step 1: 자동차기본정보 조회 (차량번호, 부과일자=검사유효기간 종료일+146일) ==========
log.info("[명의이전-미필] Step 1: 자동차기본정보 조회 - 차량번호: {}, 부과일자: {}", vhclno, levyCrtrYmd);
log.info("[명의이전-미필] Step 1: 자동차기본정보 조회 - 차대번호: {}, 부과일자: {}", step0vin, levyCrtrYmd);
NewBasicRequest step1Request = createBasicRequest(vhclno, null, levyCrtrYmd);
NewBasicRequest step1Request = createBasicRequest(null, step0vin, levyCrtrYmd);
NewBasicResponse step1Response = apiService.getBasicInfo(step1Request);
bassMatterLogService.updateCarFfnlgTrgtIdByTxIdNewTx(step1Response, existingData.getCarFfnlgTrgtIncmpId());

@ -76,10 +76,24 @@ public class ProductUseOmChecker extends AbstractComparisonOmChecker {
}
try {
log.info("[상품용-미필] Step 0: 자동차기본정보 조회 - 차량번호: {}, 현재일", vhclno);
NewBasicRequest step0Request = createBasicRequest(vhclno, null, LocalDate.now().format(DATE_FORMATTER));
NewBasicResponse step0Response = apiService.getBasicInfo(step0Request);
bassMatterLogService.updateCarFfnlgTrgtIdByTxIdNewTx(step0Response, existingData.getCarFfnlgTrgtIncmpId());
if (step0Response == null || step0Response.getRecord() == null || step0Response.getRecord().isEmpty()) {
log.warn("[상품용-미필] Step 0 응답 없음 - 차량번호: {}", vhclno);
return null;
}
NewBasicResponse.Record step0Record = step0Response.getRecord().get(0);
String step0vin = step0Record.getVin(); // 차대번호
// ========== Step 1: 자동차기본정보 조회 (차량번호, 부과일자=검사유효기간 종료일+146일) ==========
log.info("[상품용-미필] Step 1: 자동차기본정보 조회 - 차량번호: {}, 부과일자: {}", vhclno, levyCrtrYmd);
log.info("[상품용-미필] Step 1: 자동차기본정보 조회 - 차대번호: {}, 부과일자: {}", step0vin, levyCrtrYmd);
NewBasicRequest step1Request = createBasicRequest(vhclno, null, levyCrtrYmd);
NewBasicRequest step1Request = createBasicRequest(null, step0vin, levyCrtrYmd);
NewBasicResponse step1Response = apiService.getBasicInfo(step1Request);
bassMatterLogService.updateCarFfnlgTrgtIdByTxIdNewTx(step1Response, existingData.getCarFfnlgTrgtIncmpId());

@ -62,12 +62,25 @@ public class TransferOmChecker extends AbstractComparisonOmChecker {
return null;
}
log.info("[상품용-미필] Step 0: 자동차기본정보 조회 - 차량번호: {}, 현재일", vhclno);
NewBasicRequest step0Request = createBasicRequest(vhclno, null, LocalDate.now().format(DATE_FORMATTER));
NewBasicResponse step0Response = apiService.getBasicInfo(step0Request);
bassMatterLogService.updateCarFfnlgTrgtIdByTxIdNewTx(step0Response, existingData.getCarFfnlgTrgtIncmpId());
if (step0Response == null || step0Response.getRecord() == null || step0Response.getRecord().isEmpty()) {
log.warn("[상품용-미필] Step 0 응답 없음 - 차량번호: {}", vhclno);
return null;
}
NewBasicResponse.Record step0Record = step0Response.getRecord().get(0);
String step0vin = step0Record.getVin(); // 차대번호
// 1단계: 자동차기본정보(차량번호, 부과일자=검사유효기간 + 146일)
// 부과일자는 이미 146일로 계산되어 있음
String step1Ymd = existingData.getLevyCrtrYmd();
log.info("[이첩-미필] 1단계 API 호출 - 차량번호: {}, 부과일자: {}", vhclno, step1Ymd);
NewBasicRequest step1Request = createBasicRequest(vhclno, null, step1Ymd);
log.info("[이첩-미필] 1단계 API 호출 - 차대번호: {}, 부과일자: {}", step0vin, step1Ymd);
NewBasicRequest step1Request = createBasicRequest(null, step0vin, step1Ymd);
NewBasicResponse step1Response = apiService.getBasicInfo(step1Request);
bassMatterLogService.updateCarFfnlgTrgtIdByTxIdNewTx(step1Response, existingData.getCarFfnlgTrgtIncmpId());

@ -115,8 +115,8 @@
schTaskPrcsSttsCd.push($(this).val());
});
SEARCH_COND.schRcptYmdStart = schRcptYmdStart.replace(/-/g, '');
SEARCH_COND.schRcptYmdEnd = schRcptYmdEnd.replace(/-/g, '');
SEARCH_COND.schRcptYmdStart = schRcptYmdStart;
SEARCH_COND.schRcptYmdEnd = schRcptYmdEnd;
SEARCH_COND.schVhclno = schVhclno;
SEARCH_COND.schOwnrNm = schOwnrNm;
SEARCH_COND.schTaskPrcsSttsCd = schTaskPrcsSttsCd;
@ -346,6 +346,7 @@
//return e.value ? moment(e.value, 'YYYYMMDD').format('YYYY-MM-DD') : '';
return e.value;
}
, hidden : true
},
{ header: '업무처리일자', name: 'taskPrcsYmd', align: 'center', width: 100,
formatter: function(e) {

Loading…
Cancel
Save