From 3dc512965573a2ad6a2eaf86f08d6fcb95f94ee7 Mon Sep 17 00:00:00 2001 From: Moon Date: Mon, 12 Jan 2026 22:46:05 +0900 Subject: [PATCH] =?UTF-8?q?=EC=B6=94=EB=A1=A0=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../MapSheetLearnRepositoryImpl.java | 58 ++++++++++--------- 1 file changed, 31 insertions(+), 27 deletions(-) diff --git a/src/main/java/com/kamco/cd/kamcoback/postgres/repository/Inference/MapSheetLearnRepositoryImpl.java b/src/main/java/com/kamco/cd/kamcoback/postgres/repository/Inference/MapSheetLearnRepositoryImpl.java index fe6c21f4..89f46605 100644 --- a/src/main/java/com/kamco/cd/kamcoback/postgres/repository/Inference/MapSheetLearnRepositoryImpl.java +++ b/src/main/java/com/kamco/cd/kamcoback/postgres/repository/Inference/MapSheetLearnRepositoryImpl.java @@ -172,6 +172,7 @@ public class MapSheetLearnRepositoryImpl implements MapSheetLearnRepositoryCusto mapSheetLearnEntity.inferEndDttm, mapSheetLearnEntity.detectingCnt, mapSheetLearnEntity.detectEndCnt, + m1Model.modelVer.as("model1Ver"), m2Model.modelVer.as("model2Ver"), m3Model.modelVer.as("model3Ver"))) @@ -189,32 +190,35 @@ public class MapSheetLearnRepositoryImpl implements MapSheetLearnRepositoryCusto } @Override - public Optional getInferenceAiResultById(Long id) { - // InferenceProgressDto dto = - // queryFactory - // .select( - // Projections.constructor( - // InferenceProgressDto.class, - // Projections.constructor( - // InferenceProgressDto.pred_requests_areas.class, - // mapSheetLearnEntity.compareYyyy, - // mapSheetLearnEntity.targetYyyy, - // mapSheetLearnEntity.modelComparePath, - // mapSheetLearnEntity.modelTargetPath - // ), - // modelMngEntity.uuid.eq(mapSheetLearnEntity.m1ModelUuid).as("m1ModelUuid"), - // modelMngEntity.uuid.eq(mapSheetLearnEntity.m2ModelUuid).as("m2ModelUuid"), - // mapSheetLearnEntity.cdModelPath, - // mapSheetLearnEntity.cdModelConfig, - // mapSheetLearnEntity.clsModelPath, - // mapSheetLearnEntity.clsModelVersion, - // mapSheetLearnEntity.cdModelType, - // mapSheetLearnEntity.priority - // ) - // ) - // .from(mapSheetLearnEntity) - // .where(mapSheetLearnEntity.id.eq(id)) - // .fetchOne(); - return Optional.empty(); + public InferenceProgressDto getInferenceAiResultById(Long id, UUID modelUuid) { + + QModelMngEntity model = new QModelMngEntity("model"); + + InferenceProgressDto dto = + queryFactory + .select( + Projections.constructor( + InferenceProgressDto.class, + Projections.constructor( + InferenceProgressDto.pred_requests_areas.class, + mapSheetLearnEntity.compareYyyy, + mapSheetLearnEntity.targetYyyy, + mapSheetLearnEntity.modelComparePath, + mapSheetLearnEntity.modelTargetPath), + model.modelVer.as("modelVer"), + model.cdModelPath.as("cdModelPath"), + model.cdModelFileName.as("cdModelFileName"), + model.cdModelConfigPath.as("cdModelConfigPath"), + model.cdModelConfigFileName.as("cdModelConfigFileName"), + model.clsModelPath, + model.clsModelFileName, + model.clsModelVersion + )) + .from(mapSheetLearnEntity) + .join(model) + .on(model.uuid.eq(modelUuid)) + .where(mapSheetLearnEntity.id.eq(id)) + .fetchOne(); + return dto; } }