Merge branch 'feat/dev_251201' of https://10.100.0.10:3210/dabeeo/kamco-dabeeo-backoffice into feat/dev_251201
This commit is contained in:
@@ -650,9 +650,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))
|
||||
@@ -664,23 +664,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();
|
||||
}
|
||||
@@ -693,9 +693,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(
|
||||
@@ -711,38 +711,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) {
|
||||
|
||||
Reference in New Issue
Block a user