|
|
|
|
@ -2,6 +2,7 @@ package go.kr.project.carInspectionPenalty.registration.service.impl;
|
|
|
|
|
|
|
|
|
|
import egovframework.constant.TaskPrcsSttsConstants;
|
|
|
|
|
import egovframework.exception.MessageException;
|
|
|
|
|
import egovframework.util.DateUtil;
|
|
|
|
|
import egovframework.util.SessionUtil;
|
|
|
|
|
import go.kr.project.api.model.request.NewBasicRequest;
|
|
|
|
|
import go.kr.project.api.model.request.NewLedgerRequest;
|
|
|
|
|
@ -191,7 +192,7 @@ public class ComparisonServiceImpl extends EgovAbstractServiceImpl implements Co
|
|
|
|
|
|
|
|
|
|
// 명의이전 코드 11 확인 및 기간 확인
|
|
|
|
|
if ("11".equals(chgTaskSeCd) && chgYmd != null) {
|
|
|
|
|
if (isDateBetween(chgYmd, vldPrdExpryYmd, inspEndYmd)) {
|
|
|
|
|
if (DateUtil.isDateBetween(chgYmd, vldPrdExpryYmd, inspEndYmd)) {
|
|
|
|
|
log.info("[상품용] 조건 충족! 차량번호: {}, 변경일자: {}, 변경업무: {}", vhclno, chgYmd, chgTaskSeCd);
|
|
|
|
|
|
|
|
|
|
// 비고 생성 - 갑부 상세 정보 포함
|
|
|
|
|
@ -265,7 +266,7 @@ public class ComparisonServiceImpl extends EgovAbstractServiceImpl implements Co
|
|
|
|
|
if (daycnt > 115) {
|
|
|
|
|
// 이첩-2: 부과기준일 = 검사종료일자 + 115일
|
|
|
|
|
String inspEndYmd = existingData.getInspEndYmd();
|
|
|
|
|
LocalDate inspEndDate = LocalDate.parse(inspEndYmd, DATE_FORMATTER);
|
|
|
|
|
LocalDate inspEndDate = DateUtil.parseDate(inspEndYmd);
|
|
|
|
|
LocalDate levyCrtrDate = inspEndDate.plusDays(115);
|
|
|
|
|
levyCrtrYmd = levyCrtrDate.format(DATE_FORMATTER);
|
|
|
|
|
transferType = "이첩-2";
|
|
|
|
|
@ -428,31 +429,6 @@ public class ComparisonServiceImpl extends EgovAbstractServiceImpl implements Co
|
|
|
|
|
return request;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 날짜가 범위 내에 있는지 확인
|
|
|
|
|
*
|
|
|
|
|
* @param targetDate 확인할 날짜
|
|
|
|
|
* @param startDate 시작일
|
|
|
|
|
* @param endDate 종료일
|
|
|
|
|
* @return 범위 내 여부
|
|
|
|
|
*/
|
|
|
|
|
private boolean isDateBetween(String targetDate, String startDate, String endDate) {
|
|
|
|
|
if (targetDate == null || startDate == null || endDate == null) {
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
LocalDate target = LocalDate.parse(targetDate, DATE_FORMATTER);
|
|
|
|
|
LocalDate start = LocalDate.parse(startDate, DATE_FORMATTER);
|
|
|
|
|
LocalDate end = LocalDate.parse(endDate, DATE_FORMATTER);
|
|
|
|
|
|
|
|
|
|
return !target.isBefore(start) && !target.isAfter(end);
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
log.error("날짜 비교 중 오류 발생 - target: {}, start: {}, end: {}", targetDate, startDate, endDate, e);
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 상품용 비고 생성
|
|
|
|
|
*
|
|
|
|
|
@ -491,7 +467,7 @@ public class ComparisonServiceImpl extends EgovAbstractServiceImpl implements Co
|
|
|
|
|
|
|
|
|
|
// 3. 갑부 상세 정보 (명의이전 이력)
|
|
|
|
|
sb.append("\n■ 갑부 상세 (명의이전 이력)\n");
|
|
|
|
|
sb.append(" - 변경일자: ").append(formatDateWithHyphen(ledgerRecord.getChgYmd())).append("\n");
|
|
|
|
|
sb.append(" - 변경일자: ").append(DateUtil.formatDateString(ledgerRecord.getChgYmd())).append("\n");
|
|
|
|
|
sb.append(" - 변경업무코드: ").append(nvl(ledgerRecord.getChgTaskSeCd())).append("\n");
|
|
|
|
|
sb.append(" - 변경업무명: ").append(nvl(ledgerRecord.getChgTaskSeNm())).append("\n");
|
|
|
|
|
sb.append(" - 접수번호: ").append(nvl(ledgerRecord.getAplyRcptNo())).append("\n");
|
|
|
|
|
@ -504,8 +480,8 @@ public class ComparisonServiceImpl extends EgovAbstractServiceImpl implements Co
|
|
|
|
|
|
|
|
|
|
// 4. 비교 기간
|
|
|
|
|
sb.append("\n■ 비교 기간\n");
|
|
|
|
|
sb.append(" - 유효기간만료일: ").append(formatDateWithHyphen(vldPrdExpryYmd)).append("\n");
|
|
|
|
|
sb.append(" - 검사종료일자: ").append(formatDateWithHyphen(inspEndYmd)).append("\n");
|
|
|
|
|
sb.append(" - 유효기간만료일: ").append(DateUtil.formatDateString(vldPrdExpryYmd)).append("\n");
|
|
|
|
|
sb.append(" - 검사종료일자: ").append(DateUtil.formatDateString(inspEndYmd)).append("\n");
|
|
|
|
|
sb.append(" - 판정: 명의이전일자가 기간 내 존재");
|
|
|
|
|
|
|
|
|
|
return sb.toString();
|
|
|
|
|
@ -529,16 +505,6 @@ public class ComparisonServiceImpl extends EgovAbstractServiceImpl implements Co
|
|
|
|
|
return front + "*******";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 날짜 형식 변환 (YYYYMMDD → YYYY-MM-DD)
|
|
|
|
|
*/
|
|
|
|
|
private String formatDateWithHyphen(String date) {
|
|
|
|
|
if (date == null || date.isEmpty() || date.length() != 8) {
|
|
|
|
|
return date != null ? date : "";
|
|
|
|
|
}
|
|
|
|
|
return date.substring(0, 4) + "-" + date.substring(4, 6) + "-" + date.substring(6, 8);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 등록원부 갑부 레코드 상세 정보 생성
|
|
|
|
|
*/
|
|
|
|
|
@ -552,7 +518,7 @@ public class ComparisonServiceImpl extends EgovAbstractServiceImpl implements Co
|
|
|
|
|
// 변경 정보
|
|
|
|
|
appendIfNotEmpty(detail, "변경업무구분코드", record.getChgTaskSeCd());
|
|
|
|
|
appendIfNotEmpty(detail, "변경업무구분명", record.getChgTaskSeNm());
|
|
|
|
|
appendIfNotEmpty(detail, "변경일자", formatDateWithHyphen(record.getChgYmd()));
|
|
|
|
|
appendIfNotEmpty(detail, "변경일자", DateUtil.formatDateString(record.getChgYmd()));
|
|
|
|
|
|
|
|
|
|
// 주요 정보
|
|
|
|
|
appendIfNotEmpty(detail, "주요번호", record.getMainNo());
|
|
|
|
|
|