Merge remote-tracking branch 'origin/feat/infer_dev_260107' into feat/infer_dev_260107

This commit is contained in:
Moon
2026-01-12 21:09:11 +09:00
7 changed files with 97 additions and 96 deletions

View File

@@ -1,7 +1,6 @@
package com.kamco.cd.kamcoback.inference;
import com.kamco.cd.kamcoback.config.api.ApiResponseDto;
import com.kamco.cd.kamcoback.inference.dto.InferenceDetailDto;
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;
@@ -241,8 +240,6 @@ public class InferenceResultApiController {
return ApiResponseDto.ok(inferenceResultService.getInferenceServerStatusList());
}
@Operation(summary = "추론관리 진행현황 상세", description = "어드민 홈 > 추론관리 > 추론관리 > 진행현황 상세")
@ApiResponses(
value = {

View File

@@ -247,18 +247,15 @@ public class InferenceResultDto {
private String model3VerStatus = "PROCCESING";
private String model4VerStatusName = "진행중";
public String getDetectOptionName()
{
public String getDetectOptionName() {
if (this.detectOption.equals("EXCL")) return "추론제외";
return "이전 년도 도엽 사용";
}
public String getMapSheetScopeName()
{
public String getMapSheetScopeName() {
if (this.detectOption.equals("ALL")) return "전체";
return "부분";
}
}
@Getter

View File

@@ -405,7 +405,8 @@ public class InferenceResultService {
public InferenceStatusDetailDto getInferenceStatus(UUID uuid) {
List<InferenceServerStatusDto> servers = inferenceResultCoreService.getInferenceServerStatusList();
List<InferenceServerStatusDto> servers =
inferenceResultCoreService.getInferenceServerStatusList();
String serverNames = "";
for (InferenceServerStatusDto server : servers) {
@@ -418,5 +419,4 @@ public class InferenceResultService {
return dto;
}
}

View File

@@ -1,13 +1,12 @@
package com.kamco.cd.kamcoback.postgres.repository.Inference;
import com.kamco.cd.kamcoback.inference.dto.InferenceDetailDto;
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;
import java.util.UUID;
import java.util.List;
import org.springframework.data.domain.Page;
public interface MapSheetLearnRepositoryCustom {

View File

@@ -2,11 +2,9 @@ package com.kamco.cd.kamcoback.postgres.repository.Inference;
import static com.kamco.cd.kamcoback.postgres.entity.QGpuMetricEntity.gpuMetricEntity;
import static com.kamco.cd.kamcoback.postgres.entity.QMapSheetLearnEntity.mapSheetLearnEntity;
import static com.kamco.cd.kamcoback.postgres.entity.QModelMngEntity.modelMngEntity;
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.InferenceDetailDto;
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;
@@ -100,30 +98,37 @@ public class MapSheetLearnRepositoryImpl implements MapSheetLearnRepositoryCusto
BooleanBuilder builder = new BooleanBuilder();
List<Integer> latestIds = queryFactory
List<Integer> latestIds =
queryFactory
.select(systemMetricEntity.id1.max())
.from(systemMetricEntity)
.groupBy(systemMetricEntity.serverName)
.fetch();
List<Integer> latestGpuIds = queryFactory
List<Integer> latestGpuIds =
queryFactory
.select(gpuMetricEntity.id1.max())
.from(gpuMetricEntity)
.groupBy(gpuMetricEntity.serverName)
.fetch();
List<InferenceServerStatusDto> foundContent = queryFactory
.select(Projections.constructor(
List<InferenceServerStatusDto> foundContent =
queryFactory
.select(
Projections.constructor(
InferenceServerStatusDto.class,
systemMetricEntity.serverName,
systemMetricEntity.cpuUser,
systemMetricEntity.cpuSystem,
systemMetricEntity.memused,
systemMetricEntity.kbmemused,
gpuMetricEntity.gpuUtil
))
gpuMetricEntity.gpuUtil))
.from(systemMetricEntity)
.leftJoin(gpuMetricEntity).on(gpuMetricEntity.id1.in(latestGpuIds)
.leftJoin(gpuMetricEntity)
.on(
gpuMetricEntity
.id1
.in(latestGpuIds)
.and(gpuMetricEntity.serverName.eq(systemMetricEntity.serverName)))
.where(systemMetricEntity.id1.in(latestIds)) // In 절 사용
.orderBy(systemMetricEntity.serverName.asc())
@@ -142,8 +147,10 @@ public class MapSheetLearnRepositoryImpl implements MapSheetLearnRepositoryCusto
QModelMngEntity m2Model = new QModelMngEntity("m2Model");
QModelMngEntity m3Model = new QModelMngEntity("m3Model");
InferenceStatusDetailDto foundContent = queryFactory
.select(Projections.constructor(
InferenceStatusDetailDto foundContent =
queryFactory
.select(
Projections.constructor(
InferenceStatusDetailDto.class,
mapSheetLearnEntity.title,
mapSheetLearnEntity.compareYyyy,
@@ -155,16 +162,17 @@ public class MapSheetLearnRepositoryImpl implements MapSheetLearnRepositoryCusto
mapSheetLearnEntity.detectingCnt,
m1Model.modelVer.as("model1Ver"),
m2Model.modelVer.as("model2Ver"),
m3Model.modelVer.as("model3Ver")
))
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))
.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;
}
}