Bring Data fix
This commit is contained in:
@@ -648,9 +648,9 @@ public class LabelAllocateRepositoryImpl implements LabelAllocateRepositoryCusto
|
|||||||
.select(
|
.select(
|
||||||
mapSheetAnalInferenceEntity.compareYyyy,
|
mapSheetAnalInferenceEntity.compareYyyy,
|
||||||
mapSheetAnalInferenceEntity.targetYyyy,
|
mapSheetAnalInferenceEntity.targetYyyy,
|
||||||
mapSheetAnalInferenceEntity.analTitle,
|
mapSheetAnalInferenceEntity.stage,
|
||||||
mapSheetAnalInferenceEntity.gukyuinApplyDttm,
|
mapSheetAnalInferenceEntity.gukyuinApplyDttm,
|
||||||
mapSheetAnalInferenceEntity.analStrtDttm,
|
mapSheetAnalInferenceEntity.createdDttm,
|
||||||
mapSheetAnalInferenceEntity.uuid)
|
mapSheetAnalInferenceEntity.uuid)
|
||||||
.from(mapSheetAnalInferenceEntity)
|
.from(mapSheetAnalInferenceEntity)
|
||||||
.where(mapSheetAnalInferenceEntity.id.eq(analUid))
|
.where(mapSheetAnalInferenceEntity.id.eq(analUid))
|
||||||
@@ -662,23 +662,23 @@ public class LabelAllocateRepositoryImpl implements LabelAllocateRepositoryCusto
|
|||||||
|
|
||||||
Integer compareYyyy = result.get(mapSheetAnalInferenceEntity.compareYyyy);
|
Integer compareYyyy = result.get(mapSheetAnalInferenceEntity.compareYyyy);
|
||||||
Integer targetYyyy = result.get(mapSheetAnalInferenceEntity.targetYyyy);
|
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 gukyuinApplyDttm = result.get(mapSheetAnalInferenceEntity.gukyuinApplyDttm);
|
||||||
ZonedDateTime analStrtDttm = result.get(mapSheetAnalInferenceEntity.analStrtDttm);
|
ZonedDateTime createdDttm = result.get(mapSheetAnalInferenceEntity.createdDttm);
|
||||||
UUID uuid = result.get(mapSheetAnalInferenceEntity.uuid);
|
UUID uuid = result.get(mapSheetAnalInferenceEntity.uuid);
|
||||||
|
|
||||||
// 변화탐지년도 생성
|
// 변화탐지년도 생성
|
||||||
String detectionYear =
|
String detectionYear =
|
||||||
(compareYyyy != null && targetYyyy != null) ? compareYyyy + "-" + targetYyyy : null;
|
(compareYyyy != null && targetYyyy != null) ? compareYyyy + "-" + targetYyyy : null;
|
||||||
|
|
||||||
// 회차 추출 (예: "8회차" → "8")
|
// 회차를 stage 컬럼에서 가져옴
|
||||||
String round = extractRoundFromTitle(analTitle);
|
String round = stage != null ? String.valueOf(stage) : null;
|
||||||
|
|
||||||
return ProjectInfo.builder()
|
return ProjectInfo.builder()
|
||||||
.detectionYear(detectionYear)
|
.detectionYear(detectionYear)
|
||||||
.round(round)
|
.round(round)
|
||||||
.reflectionDate(formatDate(gukyuinApplyDttm))
|
.reflectionDate(formatDate(gukyuinApplyDttm))
|
||||||
.startDate(formatDate(analStrtDttm))
|
.startDate(formatDate(createdDttm))
|
||||||
.uuid(uuid != null ? uuid.toString() : null)
|
.uuid(uuid != null ? uuid.toString() : null)
|
||||||
.build();
|
.build();
|
||||||
}
|
}
|
||||||
@@ -691,9 +691,9 @@ public class LabelAllocateRepositoryImpl implements LabelAllocateRepositoryCusto
|
|||||||
.select(
|
.select(
|
||||||
mapSheetAnalInferenceEntity.compareYyyy,
|
mapSheetAnalInferenceEntity.compareYyyy,
|
||||||
mapSheetAnalInferenceEntity.targetYyyy,
|
mapSheetAnalInferenceEntity.targetYyyy,
|
||||||
mapSheetAnalInferenceEntity.analTitle,
|
mapSheetAnalInferenceEntity.stage,
|
||||||
mapSheetAnalInferenceEntity.gukyuinApplyDttm,
|
mapSheetAnalInferenceEntity.gukyuinApplyDttm,
|
||||||
mapSheetAnalInferenceEntity.analStrtDttm,
|
mapSheetAnalInferenceEntity.createdDttm,
|
||||||
mapSheetAnalInferenceEntity.uuid)
|
mapSheetAnalInferenceEntity.uuid)
|
||||||
.from(mapSheetAnalInferenceEntity)
|
.from(mapSheetAnalInferenceEntity)
|
||||||
.orderBy(
|
.orderBy(
|
||||||
@@ -709,38 +709,27 @@ public class LabelAllocateRepositoryImpl implements LabelAllocateRepositoryCusto
|
|||||||
|
|
||||||
Integer compareYyyy = result.get(mapSheetAnalInferenceEntity.compareYyyy);
|
Integer compareYyyy = result.get(mapSheetAnalInferenceEntity.compareYyyy);
|
||||||
Integer targetYyyy = result.get(mapSheetAnalInferenceEntity.targetYyyy);
|
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 gukyuinApplyDttm = result.get(mapSheetAnalInferenceEntity.gukyuinApplyDttm);
|
||||||
ZonedDateTime analStrtDttm = result.get(mapSheetAnalInferenceEntity.analStrtDttm);
|
ZonedDateTime createdDttm = result.get(mapSheetAnalInferenceEntity.createdDttm);
|
||||||
UUID uuid = result.get(mapSheetAnalInferenceEntity.uuid);
|
UUID uuid = result.get(mapSheetAnalInferenceEntity.uuid);
|
||||||
|
|
||||||
// 변화탐지년도 생성
|
// 변화탐지년도 생성
|
||||||
String detectionYear =
|
String detectionYear =
|
||||||
(compareYyyy != null && targetYyyy != null) ? compareYyyy + "-" + targetYyyy : null;
|
(compareYyyy != null && targetYyyy != null) ? compareYyyy + "-" + targetYyyy : null;
|
||||||
|
|
||||||
// 회차 추출 (예: "8회차" → "8")
|
// 회차를 stage 컬럼에서 가져옴
|
||||||
String round = extractRoundFromTitle(analTitle);
|
String round = stage != null ? String.valueOf(stage) : null;
|
||||||
|
|
||||||
return ProjectInfo.builder()
|
return ProjectInfo.builder()
|
||||||
.detectionYear(detectionYear)
|
.detectionYear(detectionYear)
|
||||||
.round(round)
|
.round(round)
|
||||||
.reflectionDate(formatDate(gukyuinApplyDttm))
|
.reflectionDate(formatDate(gukyuinApplyDttm))
|
||||||
.startDate(formatDate(analStrtDttm))
|
.startDate(formatDate(createdDttm))
|
||||||
.uuid(uuid != null ? uuid.toString() : null)
|
.uuid(uuid != null ? uuid.toString() : null)
|
||||||
.build();
|
.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" 형식으로 변환 */
|
/** ZonedDateTime을 "yyyy-MM-dd" 형식으로 변환 */
|
||||||
private String formatDate(ZonedDateTime dateTime) {
|
private String formatDate(ZonedDateTime dateTime) {
|
||||||
|
|||||||
Reference in New Issue
Block a user