Merge remote-tracking branch 'origin/feat/infer_dev_260107' into feat/infer_dev_260107
# Conflicts: # src/main/java/com/kamco/cd/kamcoback/postgres/core/InferenceResultCoreService.java # src/main/java/com/kamco/cd/kamcoback/postgres/repository/Inference/MapSheetLearnRepositoryCustom.java
This commit is contained in:
@@ -8,6 +8,7 @@ import com.kamco.cd.kamcoback.inference.dto.InferenceDetailDto.InferenceBatchShe
|
||||
import com.kamco.cd.kamcoback.inference.dto.InferenceDetailDto.MapSheet;
|
||||
import com.kamco.cd.kamcoback.inference.dto.InferenceResultDto;
|
||||
import com.kamco.cd.kamcoback.inference.dto.InferenceResultDto.InferenceServerStatusDto;
|
||||
import com.kamco.cd.kamcoback.inference.dto.InferenceResultDto.InferenceStatusDetailDto;
|
||||
import com.kamco.cd.kamcoback.inference.dto.InferenceResultDto.MapSheetNumDto;
|
||||
import com.kamco.cd.kamcoback.inference.dto.InferenceResultDto.ResultList;
|
||||
import com.kamco.cd.kamcoback.inference.dto.InferenceResultDto.SaveInferenceAiDto;
|
||||
@@ -274,4 +275,8 @@ public class InferenceResultCoreService {
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public InferenceStatusDetailDto getInferenceStatus(UUID uuid) {
|
||||
return mapSheetLearnRepository.getInferenceStatus(uuid);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ 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.inference.dto.InferenceResultDto.InferenceStatusDetailDto;
|
||||
import com.kamco.cd.kamcoback.postgres.entity.MapSheetLearnEntity;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
@@ -20,4 +21,5 @@ public interface MapSheetLearnRepositoryCustom {
|
||||
Optional<MapSheetLearnEntity> getInferenceResultByStatus(String status);
|
||||
|
||||
Optional<InferenceProgressDto> getInferenceAiResultById(Long id);
|
||||
public InferenceStatusDetailDto getInferenceStatus(UUID uuid);
|
||||
}
|
||||
|
||||
@@ -8,7 +8,10 @@ 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.inference.dto.InferenceResultDto.InferenceStatusDetailDto;
|
||||
import com.kamco.cd.kamcoback.model.service.ModelMngService;
|
||||
import com.kamco.cd.kamcoback.postgres.entity.MapSheetLearnEntity;
|
||||
import com.kamco.cd.kamcoback.postgres.entity.QModelMngEntity;
|
||||
import com.querydsl.core.BooleanBuilder;
|
||||
import com.querydsl.core.types.Projections;
|
||||
import com.querydsl.core.types.dsl.CaseBuilder;
|
||||
@@ -29,6 +32,7 @@ import org.springframework.stereotype.Repository;
|
||||
public class MapSheetLearnRepositoryImpl implements MapSheetLearnRepositoryCustom {
|
||||
|
||||
private final JPAQueryFactory queryFactory;
|
||||
private final ModelMngService modelMngService;
|
||||
|
||||
@Override
|
||||
public Page<MapSheetLearnEntity> getInferenceMgnResultList(InferenceResultDto.SearchListReq req) {
|
||||
@@ -122,7 +126,11 @@ public class MapSheetLearnRepositoryImpl implements MapSheetLearnRepositoryCusto
|
||||
gpuMetricEntity.gpuUtil))
|
||||
.from(systemMetricEntity)
|
||||
.leftJoin(gpuMetricEntity)
|
||||
.on(gpuMetricEntity.serverName.eq(systemMetricEntity.serverName))
|
||||
.on(
|
||||
gpuMetricEntity
|
||||
.id1
|
||||
.in(latestGpuIds)
|
||||
.and(gpuMetricEntity.serverName.eq(systemMetricEntity.serverName)))
|
||||
.where(systemMetricEntity.id1.in(latestIds)) // In 절 사용
|
||||
.orderBy(systemMetricEntity.serverName.asc())
|
||||
.limit(4)
|
||||
@@ -132,13 +140,41 @@ public class MapSheetLearnRepositoryImpl implements MapSheetLearnRepositoryCusto
|
||||
}
|
||||
|
||||
@Override
|
||||
public Optional<MapSheetLearnEntity> getInferenceResultByStatus(String status) {
|
||||
return Optional.ofNullable(
|
||||
public InferenceStatusDetailDto getInferenceStatus(UUID uuid) {
|
||||
|
||||
String serverNames = "";
|
||||
|
||||
QModelMngEntity m1Model = new QModelMngEntity("m1Model");
|
||||
QModelMngEntity m2Model = new QModelMngEntity("m2Model");
|
||||
QModelMngEntity m3Model = new QModelMngEntity("m3Model");
|
||||
|
||||
InferenceStatusDetailDto foundContent =
|
||||
queryFactory
|
||||
.selectFrom(mapSheetLearnEntity)
|
||||
.where(mapSheetLearnEntity.status.eq(status))
|
||||
.limit(1)
|
||||
.fetchOne());
|
||||
.select(
|
||||
Projections.constructor(
|
||||
InferenceStatusDetailDto.class,
|
||||
mapSheetLearnEntity.title,
|
||||
mapSheetLearnEntity.compareYyyy,
|
||||
mapSheetLearnEntity.targetYyyy,
|
||||
mapSheetLearnEntity.detectOption,
|
||||
mapSheetLearnEntity.mapSheetScope,
|
||||
mapSheetLearnEntity.inferStartDttm,
|
||||
mapSheetLearnEntity.inferEndDttm,
|
||||
mapSheetLearnEntity.detectingCnt,
|
||||
m1Model.modelVer.as("model1Ver"),
|
||||
m2Model.modelVer.as("model2Ver"),
|
||||
m3Model.modelVer.as("model3Ver")))
|
||||
.from(mapSheetLearnEntity)
|
||||
.leftJoin(m1Model)
|
||||
.on(m1Model.uuid.eq(mapSheetLearnEntity.m1ModelUuid))
|
||||
.leftJoin(m2Model)
|
||||
.on(m2Model.uuid.eq(mapSheetLearnEntity.m2ModelUuid))
|
||||
.leftJoin(m3Model)
|
||||
.on(m3Model.uuid.eq(mapSheetLearnEntity.m3ModelUuid))
|
||||
.where(mapSheetLearnEntity.uuid.eq(uuid))
|
||||
.fetchOne();
|
||||
|
||||
return foundContent;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user