변화탐지 기획안에 맞게 수정, 학습데이터현황 쿼리 수정
This commit is contained in:
@@ -2,8 +2,11 @@ package com.kamco.cd.kamcoback.changedetection.service;
|
||||
|
||||
import com.fasterxml.jackson.databind.JsonNode;
|
||||
import com.kamco.cd.kamcoback.changedetection.dto.ChangeDetectionDto;
|
||||
import com.kamco.cd.kamcoback.changedetection.dto.ChangeDetectionDto.DetectSearchType;
|
||||
import com.kamco.cd.kamcoback.changedetection.dto.ChangeDetectionDto.MapScaleType;
|
||||
import com.kamco.cd.kamcoback.postgres.core.ChangeDetectionCoreService;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@@ -22,8 +25,16 @@ public class ChangeDetectionService {
|
||||
}
|
||||
|
||||
public List<ChangeDetectionDto.CountDto> getChangeDetectionClassCount(
|
||||
Long id, String mapSheetNum) {
|
||||
return changeDetectionCoreService.getChangeDetectionClassCount(id, mapSheetNum);
|
||||
DetectSearchType type, MapScaleType scale, UUID uuid, String mapSheetNum) {
|
||||
switch (type) {
|
||||
case MAPSHEET -> {
|
||||
return changeDetectionCoreService.getChangeDetectionClassCount(scale, uuid, mapSheetNum);
|
||||
}
|
||||
case ADDRESS -> {
|
||||
return List.of(); // TODO: 일반 주소 검색 로직 확인 후 작업 필요
|
||||
}
|
||||
default -> throw new IllegalArgumentException("Unsupported type: " + type);
|
||||
}
|
||||
}
|
||||
|
||||
public ChangeDetectionDto.CogUrlDto getChangeDetectionCogUrl(ChangeDetectionDto.CogUrlReq req) {
|
||||
@@ -35,18 +46,47 @@ public class ChangeDetectionService {
|
||||
}
|
||||
|
||||
public ChangeDetectionDto.PolygonFeatureList getChangeDetectionPolygonList(
|
||||
Long analUid, String mapSheetNum) {
|
||||
|
||||
return changeDetectionCoreService.getChangeDetectionPolygonList(analUid, mapSheetNum);
|
||||
DetectSearchType type, MapScaleType scale, UUID uuid, String mapSheetNum) {
|
||||
switch (type) {
|
||||
case MAPSHEET -> {
|
||||
return changeDetectionCoreService.getChangeDetectionPolygonList(scale, uuid, mapSheetNum);
|
||||
}
|
||||
case ADDRESS -> {
|
||||
return new ChangeDetectionDto.PolygonFeatureList(); // TODO: 일반 주소 검색 로직 확인 후 작업 필요
|
||||
}
|
||||
default -> throw new IllegalArgumentException("Unsupported type: " + type);
|
||||
}
|
||||
}
|
||||
|
||||
// Geometry 객체 순환 참조 문제로 캐싱 불가
|
||||
public ChangeDetectionDto.PointFeatureList getChangeDetectionPointList(
|
||||
Long analUid, String mapSheetNum) {
|
||||
return changeDetectionCoreService.getChangeDetectionPointList(analUid, mapSheetNum);
|
||||
DetectSearchType type, MapScaleType scale, UUID uuid, String mapSheetNum) {
|
||||
|
||||
switch (type) {
|
||||
case MAPSHEET -> {
|
||||
return changeDetectionCoreService.getChangeDetectionPointList(scale, uuid, mapSheetNum);
|
||||
}
|
||||
case ADDRESS -> {
|
||||
return new ChangeDetectionDto.PointFeatureList(); // TODO: 일반 주소 검색 로직 확인 후 작업 필요
|
||||
}
|
||||
default -> throw new IllegalArgumentException("Unsupported type: " + type);
|
||||
}
|
||||
}
|
||||
|
||||
public List<ChangeDetectionDto.MapSheetList> getChangeDetectionMapSheetList(Long analUid) {
|
||||
return changeDetectionCoreService.getChangeDetectionMapSheetList(analUid);
|
||||
public List<ChangeDetectionDto.MapSheetList> getChangeDetectionMapSheetList(
|
||||
DetectSearchType type, MapScaleType scale, UUID uuid) {
|
||||
switch (type) {
|
||||
case MAPSHEET -> {
|
||||
return switch (scale) {
|
||||
case SCALE_5K -> changeDetectionCoreService.getChangeDetectionMapSheetList(uuid);
|
||||
case SCALE_50K -> changeDetectionCoreService.getChangeDetectionMapSheet50kList(uuid);
|
||||
default -> throw new IllegalArgumentException("Unsupported scale: " + scale);
|
||||
};
|
||||
}
|
||||
case ADDRESS -> {
|
||||
return List.of(); // TODO: 일반 주소 검색 로직 확인 후 작업 필요
|
||||
}
|
||||
default -> throw new IllegalArgumentException("Unsupported type: " + type);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user