@ -85,50 +85,71 @@ public class ComparisonServiceImpl extends EgovAbstractServiceImpl implements Co
return null ;
return null ;
}
}
// ========== Step 1: 자동차기본정보 조회 (차대번호 + 검사일) - 한번만 호출 ==========
String step0vin = step0Response . getRecord ( ) . get ( 0 ) . getVin ( ) ;
String inspYmd = existingData . getInspYmd ( ) . replace ( "-" , "" ) ;
log . info ( "[공통] Step 1: 자동차기본정보 조회 - 차대번호: {}, 검사일: {}" , step0vin , inspYmd ) ;
NewBasicResponse step1Response = null ;
try {
NewBasicRequest step1Request = createBasicRequest ( null , step0vin , inspYmd ) ;
step1Response = apiService . getBasicInfo ( step1Request ) ;
bassMatterLogService . updateCarFfnlgTrgtIdByTxIdNewTx ( step1Response , existingData . getCarFfnlgTrgtId ( ) ) ;
if ( step1Response = = null | | step1Response . getRecord ( ) = = null | | step1Response . getRecord ( ) . isEmpty ( ) ) {
log . warn ( "[공통] Step 1 응답 없음 - 차대번호: {}" , step0vin ) ;
log . info ( "========== 비교 로직 종료 (Step 1 응답 없음): {} ==========" , vhclno ) ;
return null ;
}
} catch ( Exception e ) {
log . error ( "[공통] Step 1 호출 중 오류 발생 - 차대번호: {}" , step0vin , e ) ;
log . info ( "========== 비교 로직 종료 (Step 1 오류): {} ==========" , vhclno ) ;
return null ;
}
// ========== 1. 상품용 체크 - api-1번호출.소유자명.contains("상품용") ==========
// ========== 1. 상품용 체크 - api-1번호출.소유자명.contains("상품용") ==========
String productUseResult = productUseChecker . check ( existingData , userOrgCd , step0Response ) ;
String productUseResult = productUseChecker . check ( existingData , userOrgCd , step0Response , step1Response );
if ( productUseResult ! = null ) {
if ( productUseResult ! = null ) {
log . info ( "========== 비교 로직 종료 (상품용): {} ==========" , vhclno ) ;
log . info ( "========== 비교 로직 종료 (상품용): {} ==========" , vhclno ) ;
return productUseResult ;
return productUseResult ;
}
}
// ========== 2. 상품용 체크 - api-1번호출.소유자명.contains("상품용-변경등록") ==========
// ========== 2. 상품용 체크 - api-1번호출.소유자명.contains("상품용-변경등록") ==========
String productUseChangeResult = productUseChnageChecker . check ( existingData , userOrgCd , step0Response ) ;
String productUseChangeResult = productUseChnageChecker . check ( existingData , userOrgCd , step0Response , step1Response );
if ( productUseChangeResult ! = null ) {
if ( productUseChangeResult ! = null ) {
log . info ( "========== 비교 로직 종료 (상품용-변경등록): {} ==========" , vhclno ) ;
log . info ( "========== 비교 로직 종료 (상품용-변경등록): {} ==========" , vhclno ) ;
return productUseChangeResult ;
return productUseChangeResult ;
}
}
// ========== 3. 내사종결 체크 - 명의이전 이전소유자 상품용, 31일 이내 ==========
// ========== 3. 내사종결 체크 - 명의이전 이전소유자 상품용, 31일 이내 ==========
String investigationClosedByProductResult = productCloseWithin31Checker . check ( existingData , userOrgCd , step0Response ) ;
String investigationClosedByProductResult = productCloseWithin31Checker . check ( existingData , userOrgCd , step0Response , step1Response );
if ( investigationClosedByProductResult ! = null ) {
if ( investigationClosedByProductResult ! = null ) {
log . info ( "========== 비교 로직 종료 (내사종결 - 명의이전 이전소유자 상품용, 31일 이내): {} ==========" , vhclno ) ;
log . info ( "========== 비교 로직 종료 (내사종결 - 명의이전 이전소유자 상품용, 31일 이내): {} ==========" , vhclno ) ;
return investigationClosedByProductResult ;
return investigationClosedByProductResult ;
}
}
// ========== 4. 내사종결 체크 - 명의이전, 31일 이내 ==========
// ========== 4. 내사종결 체크 - 명의이전, 31일 이내 ==========
String investigationClosedByOwnerChangeResult = ownerCloseWithin31Checker . check ( existingData , userOrgCd , step0Response );
String investigationClosedByOwnerChangeResult = ownerCloseWithin31Checker . check ( existingData , userOrgCd , step0Response , step1Response );
if ( investigationClosedByOwnerChangeResult ! = null ) {
if ( investigationClosedByOwnerChangeResult ! = null ) {
log . info ( "========== 비교 로직 종료 (내사종결 - 명의이전, 31일 이내): {} ==========" , vhclno ) ;
log . info ( "========== 비교 로직 종료 (내사종결 - 명의이전, 31일 이내): {} ==========" , vhclno ) ;
return investigationClosedByOwnerChangeResult ;
return investigationClosedByOwnerChangeResult ;
}
}
// ========== 5. 이첩 체크 ==========
// ========== 5. 이첩 체크 ==========
String transferResult = transferCase115DayChecker . check ( existingData , userOrgCd , step0Response );
String transferResult = transferCase115DayChecker . check ( existingData , userOrgCd , step0Response , step1Response );
if ( transferResult ! = null ) {
if ( transferResult ! = null ) {
log . info ( "========== 비교 로직 종료 (이첩): {} ==========" , vhclno ) ;
log . info ( "========== 비교 로직 종료 (이첩): {} ==========" , vhclno ) ;
return transferResult ;
return transferResult ;
}
}
// ========== 6. 날짜 수정 후 부과 체크 - 명의이전 이전소유자 상품용, 31일 초과 ==========
// ========== 6. 날짜 수정 후 부과 체크 - 명의이전 이전소유자 상품용, 31일 초과 ==========
String dateModifiedLevyByProductResult = productLevyOver31Checker . check ( existingData , userOrgCd , step0Response );
String dateModifiedLevyByProductResult = productLevyOver31Checker . check ( existingData , userOrgCd , step0Response , step1Response );
if ( dateModifiedLevyByProductResult ! = null ) {
if ( dateModifiedLevyByProductResult ! = null ) {
log . info ( "========== 비교 로직 종료 (날짜 수정 후 부과 - 명의이전 이전소유자, 31일 초과): {} ==========" , vhclno ) ;
log . info ( "========== 비교 로직 종료 (날짜 수정 후 부과 - 명의이전 이전소유자, 31일 초과): {} ==========" , vhclno ) ;
return dateModifiedLevyByProductResult ;
return dateModifiedLevyByProductResult ;
}
}
// ========== 7. 날짜 수정 후 부과 체크 - 명의이전, 31일 초과 ==========
// ========== 7. 날짜 수정 후 부과 체크 - 명의이전, 31일 초과 ==========
String dateModifiedLevyByOwnerChangeOverResult = ownerLevyOver31Checker . check ( existingData , userOrgCd , step0Response );
String dateModifiedLevyByOwnerChangeOverResult = ownerLevyOver31Checker . check ( existingData , userOrgCd , step0Response , step1Response );
if ( dateModifiedLevyByOwnerChangeOverResult ! = null ) {
if ( dateModifiedLevyByOwnerChangeOverResult ! = null ) {
log . info ( "========== 비교 로직 종료 (날짜 수정 후 부과 - 명의이전, 31일 초과): {} ==========" , vhclno ) ;
log . info ( "========== 비교 로직 종료 (날짜 수정 후 부과 - 명의이전, 31일 초과): {} ==========" , vhclno ) ;
return dateModifiedLevyByOwnerChangeOverResult ;
return dateModifiedLevyByOwnerChangeOverResult ;