Bring Data fix

This commit is contained in:
DanielLee
2026-01-05 16:25:38 +09:00
parent 27d33dac3b
commit bd1f82a5d0

View File

@@ -648,9 +648,9 @@ public class LabelAllocateRepositoryImpl implements LabelAllocateRepositoryCusto
.select(
mapSheetAnalInferenceEntity.compareYyyy,
mapSheetAnalInferenceEntity.targetYyyy,
mapSheetAnalInferenceEntity.analTitle,
mapSheetAnalInferenceEntity.stage,
mapSheetAnalInferenceEntity.gukyuinApplyDttm,
mapSheetAnalInferenceEntity.analStrtDttm,
mapSheetAnalInferenceEntity.createdDttm,
mapSheetAnalInferenceEntity.uuid)
.from(mapSheetAnalInferenceEntity)
.where(mapSheetAnalInferenceEntity.id.eq(analUid))
@@ -662,23 +662,23 @@ public class LabelAllocateRepositoryImpl implements LabelAllocateRepositoryCusto
Integer compareYyyy = result.get(mapSheetAnalInferenceEntity.compareYyyy);
Integer targetYyyy = result.get(mapSheetAnalInferenceEntity.targetYyyy);
String analTitle = result.get(mapSheetAnalInferenceEntity.analTitle);
Integer stage = result.get(mapSheetAnalInferenceEntity.stage);
ZonedDateTime gukyuinApplyDttm = result.get(mapSheetAnalInferenceEntity.gukyuinApplyDttm);
ZonedDateTime analStrtDttm = result.get(mapSheetAnalInferenceEntity.analStrtDttm);
ZonedDateTime createdDttm = result.get(mapSheetAnalInferenceEntity.createdDttm);
UUID uuid = result.get(mapSheetAnalInferenceEntity.uuid);
// 변화탐지년도 생성
String detectionYear =
(compareYyyy != null && targetYyyy != null) ? compareYyyy + "-" + targetYyyy : null;
// 회차 추출 (예: "8회차" → "8")
String round = extractRoundFromTitle(analTitle);
// 회차를 stage 컬럼에서 가져옴
String round = stage != null ? String.valueOf(stage) : null;
return ProjectInfo.builder()
.detectionYear(detectionYear)
.round(round)
.reflectionDate(formatDate(gukyuinApplyDttm))
.startDate(formatDate(analStrtDttm))
.startDate(formatDate(createdDttm))
.uuid(uuid != null ? uuid.toString() : null)
.build();
}
@@ -691,9 +691,9 @@ public class LabelAllocateRepositoryImpl implements LabelAllocateRepositoryCusto
.select(
mapSheetAnalInferenceEntity.compareYyyy,
mapSheetAnalInferenceEntity.targetYyyy,
mapSheetAnalInferenceEntity.analTitle,
mapSheetAnalInferenceEntity.stage,
mapSheetAnalInferenceEntity.gukyuinApplyDttm,
mapSheetAnalInferenceEntity.analStrtDttm,
mapSheetAnalInferenceEntity.createdDttm,
mapSheetAnalInferenceEntity.uuid)
.from(mapSheetAnalInferenceEntity)
.orderBy(
@@ -709,38 +709,27 @@ public class LabelAllocateRepositoryImpl implements LabelAllocateRepositoryCusto
Integer compareYyyy = result.get(mapSheetAnalInferenceEntity.compareYyyy);
Integer targetYyyy = result.get(mapSheetAnalInferenceEntity.targetYyyy);
String analTitle = result.get(mapSheetAnalInferenceEntity.analTitle);
Integer stage = result.get(mapSheetAnalInferenceEntity.stage);
ZonedDateTime gukyuinApplyDttm = result.get(mapSheetAnalInferenceEntity.gukyuinApplyDttm);
ZonedDateTime analStrtDttm = result.get(mapSheetAnalInferenceEntity.analStrtDttm);
ZonedDateTime createdDttm = result.get(mapSheetAnalInferenceEntity.createdDttm);
UUID uuid = result.get(mapSheetAnalInferenceEntity.uuid);
// 변화탐지년도 생성
String detectionYear =
(compareYyyy != null && targetYyyy != null) ? compareYyyy + "-" + targetYyyy : null;
// 회차 추출 (예: "8회차" → "8")
String round = extractRoundFromTitle(analTitle);
// 회차를 stage 컬럼에서 가져옴
String round = stage != null ? String.valueOf(stage) : null;
return ProjectInfo.builder()
.detectionYear(detectionYear)
.round(round)
.reflectionDate(formatDate(gukyuinApplyDttm))
.startDate(formatDate(analStrtDttm))
.startDate(formatDate(createdDttm))
.uuid(uuid != null ? uuid.toString() : null)
.build();
}
/** 제목에서 회차 숫자 추출 예: "8회차", "제8회차" → "8" */
private String extractRoundFromTitle(String title) {
if (title == null || title.isEmpty()) {
return null;
}
Pattern pattern = Pattern.compile("(\\d+)회차");
Matcher matcher = pattern.matcher(title);
return matcher.find() ? matcher.group(1) : null;
}
/** ZonedDateTime을 "yyyy-MM-dd" 형식으로 변환 */
private String formatDate(ZonedDateTime dateTime) {