추론 실행 수정 및 추석 추가 작업중

This commit is contained in:
2026-02-26 11:52:56 +09:00
parent cefacb291b
commit a44e93c234
6 changed files with 139 additions and 55 deletions

View File

@@ -369,6 +369,12 @@ public class InferenceResultCoreService {
return mapSheetLearnRepository.getInferenceServerStatusList();
}
/**
* 진행중 배치 조회
*
* @param status
* @return
*/
public InferenceBatchSheet getInferenceResultByStatus(String status) {
MapSheetLearnEntity entity =
mapSheetLearnRepository.getInferenceResultByStatus(status).orElse(null);
@@ -403,6 +409,12 @@ public class InferenceResultCoreService {
return mapSheetLearnRepository.getInferenceAiResultById(id, modelUuid);
}
/**
* 추론 진행 현황 상세
*
* @param uuid
* @return
*/
public InferenceStatusDetailDto getInferenceStatus(UUID uuid) {
return mapSheetLearnRepository.getInferenceStatus(uuid);
}

View File

@@ -367,6 +367,7 @@ public class MapSheetMngCoreService {
return List.of();
}
// 년도 별로 루프를 돌리기위해 년도별 정리
Map<Integer, List<MapSheetFallbackYearDto>> groupedByYear =
yearDtos.stream()
.filter(d -> d.getMngYyyy() != null && d.getMapSheetNum() != null)
@@ -377,6 +378,7 @@ public class MapSheetMngCoreService {
for (Map.Entry<Integer, List<MapSheetFallbackYearDto>> entry : groupedByYear.entrySet()) {
Integer year = entry.getKey();
// 년도별 mapSheetNum 만들기
List<String> sheetNums =
entry.getValue().stream()
.map(MapSheetFallbackYearDto::getMapSheetNum)
@@ -384,6 +386,7 @@ public class MapSheetMngCoreService {
.distinct()
.toList();
// tif파일 정보 조회
List<ImageFeature> temp = mapSheetMngRepository.getSceneInference(year.toString(), sheetNums);
if (temp != null && !temp.isEmpty()) {
@@ -433,6 +436,12 @@ public class MapSheetMngCoreService {
return entity.stream().map(MapSheetMngHstEntity::getMapSheetNum).toList();
}
/**
* 특정 연도의 도엽 이력 데이터를 조회
*
* @param year
* @return
*/
public List<MapSheetFallbackYearDto> getMapSheetNumDtoByHst(Integer year) {
List<MapSheetMngHstEntity> entity = mapSheetMngRepository.getMapSheetMngHst(year);
return entity.stream()

View File

@@ -18,29 +18,101 @@ import org.springframework.data.domain.Page;
public interface MapSheetLearnRepositoryCustom {
/**
* 추론 관리 목록 조회
*
* @param req 추론관리 목록 화면 조회 조건
* @return 추론 관리 목록
*/
Page<MapSheetLearnEntity> getInferenceMgnResultList(InferenceResultDto.SearchListReq req);
/**
* uuid 조건으로 추론 실행 정보 조회
*
* @param uuid uuid
* @return 추론 실행 정보
*/
Optional<MapSheetLearnEntity> getInferenceResultByUuid(UUID uuid);
/**
* 추론 실행중 서버정보 조회 cpu, gpu
*
* @return cpu, gpu 정보
*/
List<InferenceServerStatusDto> getInferenceServerStatusList();
/**
* 추론 실행 목록 진행 상태별 조회
*
* @param status 추론 진행 상태
* @return 추론 실행 정보
*/
Optional<MapSheetLearnEntity> getInferenceResultByStatus(String status);
/**
* 등록된 추론 실행목록 및 등록된 모델 정보 조회
*
* @param id 추론 실행 테이블 id
* @param modelUuid 모델 uuid
* @return 모델 정보
*/
InferenceProgressDto getInferenceAiResultById(Long id, UUID modelUuid);
/**
* 진행중인 추론 정보 상세 조회
*
* @param uuid 추론진행 uuid
* @return 진행중인 추론정보 상세 정보
*/
InferenceStatusDetailDto getInferenceStatus(UUID uuid);
/**
* 진행중인 추론이 있는지 조회
*
* @return 진행중인 추론 정보
*/
MapSheetLearnEntity getProcessing();
Integer getLearnStage(Integer compareYear, Integer targetYear);
/**
* 추론 결과 정보 조회
*
* @param uuid 추론 uuid
* @return 추론 결과 및 사용 모델 정보
*/
AnalResultInfo getInferenceResultInfo(UUID uuid);
/**
* 추론 결과 bbox, point 조회
*
* @param uuid 추론 uuid
* @return bbox, pont 정보
*/
BboxPointDto getBboxPoint(UUID uuid);
/**
* 분류별 탐지건수 조회
*
* @param uuid 추론 uuid
* @return 분류별 탐지건수 정보
*/
List<Dashboard> getInferenceClassCountList(UUID uuid);
/**
* 추론 결과 상세 geom 목록 조회
*
* @param uuid 추론 uuid
* @param searchGeoReq 추론 결과 상세화면 geom 조회 조건
* @return geom 목록 정보
*/
Page<Geom> getInferenceGeomList(UUID uuid, SearchGeoReq searchGeoReq);
/**
* 국유in연동 가능여부 확인 조회
*
* @param uuid 추론 uuid
* @return 추론 존재여부, 부분도엽 여부, 추론 진행중 여부, 국유인 작업 진행중 여부
*/
GukYuinLinkFacts findLinkFacts(UUID uuid);
}

View File

@@ -528,6 +528,7 @@ public class MapSheetLearnRepositoryImpl implements MapSheetLearnRepositoryCusto
@Override
public GukYuinLinkFacts findLinkFacts(UUID uuid) {
// 해당 추론 있는지 확인
MapSheetLearnEntity learn =
queryFactory
.selectFrom(QMapSheetLearnEntity.mapSheetLearnEntity)
@@ -538,12 +539,14 @@ public class MapSheetLearnRepositoryImpl implements MapSheetLearnRepositoryCusto
return new GukYuinLinkFacts(false, false, false, false);
}
// 부분 도엽 실행인지 확인
boolean isPartScope = MapSheetScope.PART.getId().equals(learn.getMapSheetScope());
QMapSheetAnalInferenceEntity inf = QMapSheetAnalInferenceEntity.mapSheetAnalInferenceEntity;
QMapSheetLearnEntity learn2 = new QMapSheetLearnEntity("learn2");
QMapSheetLearnEntity learnQ = QMapSheetLearnEntity.mapSheetLearnEntity;
// 실행중인 추론 있는지 확인
boolean hasRunningInference =
queryFactory
.selectOne()
@@ -557,6 +560,7 @@ public class MapSheetLearnRepositoryImpl implements MapSheetLearnRepositoryCusto
.fetchFirst()
!= null;
// 국유인 작업 진행중 있는지 확인
boolean hasOtherUnfinishedGukYuin =
queryFactory
.selectOne()