[KC-108] ai api batch 작업중

This commit is contained in:
2026-01-12 21:12:46 +09:00
parent a2d9dfc036
commit bf9ea206d1
10 changed files with 169 additions and 3 deletions

View File

@@ -234,10 +234,20 @@ public class InferenceResultCoreService {
entity.setM3ModelBatchId(request.getBatchId());
}
entity.setStatus(request.getStatus());
if (request.getInferStartDttm() != null) {
entity.setInferStartDttm(request.getInferStartDttm());
}
if (request.getModelComparePath() != null) {
entity.setModelComparePath(request.getModelComparePath());
}
if (request.getModelTargetPath() != null) {
entity.setModelTargetPath(request.getModelTargetPath());
}
entity.setRunningModelType(request.getType());
entity.setStatus(request.getStatus());
}
public List<InferenceServerStatusDto> getInferenceServerStatusList() {
@@ -251,6 +261,7 @@ public class InferenceResultCoreService {
.orElseThrow(() -> new EntityNotFoundException(status));
InferenceBatchSheet inferenceBatchSheet = new InferenceBatchSheet();
inferenceBatchSheet.setId(entity.getId());
inferenceBatchSheet.setM1BatchId(entity.getM1ModelBatchId());
inferenceBatchSheet.setM2BatchId(entity.getM2ModelBatchId());
inferenceBatchSheet.setM3BatchId(entity.getM3ModelBatchId());
@@ -258,4 +269,9 @@ public class InferenceResultCoreService {
inferenceBatchSheet.setRunningModelType(entity.getRunningModelType());
return inferenceBatchSheet;
}
public SaveInferenceAiDto getInferenceAiResultById(Long id) {
return null;
}
}

View File

@@ -118,6 +118,12 @@ public class MapSheetLearnEntity {
@Column(name = "detect_end_cnt")
private Long detectEndCnt;
@Column(name = "model_compare_path")
private String modelComparePath;
@Column(name = "model_target_path")
private String modelTargetPath;
public InferenceResultDto.ResultList toDto() {
return new InferenceResultDto.ResultList(
this.uuid,

View File

@@ -1,5 +1,6 @@
package com.kamco.cd.kamcoback.postgres.repository.Inference;
import com.kamco.cd.kamcoback.inference.dto.InferenceProgressDto;
import com.kamco.cd.kamcoback.inference.dto.InferenceResultDto;
import com.kamco.cd.kamcoback.inference.dto.InferenceResultDto.InferenceServerStatusDto;
import com.kamco.cd.kamcoback.postgres.entity.MapSheetLearnEntity;
@@ -17,4 +18,6 @@ public interface MapSheetLearnRepositoryCustom {
List<InferenceServerStatusDto> getInferenceServerStatusList();
Optional<MapSheetLearnEntity> getInferenceResultByStatus(String status);
Optional<InferenceProgressDto> getInferenceAiResultById(Long id);
}

View File

@@ -5,6 +5,7 @@ import static com.kamco.cd.kamcoback.postgres.entity.QMapSheetLearnEntity.mapShe
import static com.kamco.cd.kamcoback.postgres.entity.QSystemMetricEntity.systemMetricEntity;
import com.kamco.cd.kamcoback.common.utils.DateRange;
import com.kamco.cd.kamcoback.inference.dto.InferenceProgressDto;
import com.kamco.cd.kamcoback.inference.dto.InferenceResultDto;
import com.kamco.cd.kamcoback.inference.dto.InferenceResultDto.InferenceServerStatusDto;
import com.kamco.cd.kamcoback.postgres.entity.MapSheetLearnEntity;
@@ -139,4 +140,34 @@ public class MapSheetLearnRepositoryImpl implements MapSheetLearnRepositoryCusto
.limit(1)
.fetchOne());
}
@Override
public Optional<InferenceProgressDto> 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();
}
}