추론진행 도엽 목록 api추가

This commit is contained in:
2026-01-20 11:21:49 +09:00
parent 9090c94611
commit 71de307ad7
5 changed files with 65 additions and 0 deletions

View File

@@ -490,4 +490,24 @@ public class InferenceResultApiController {
return ApiResponseDto.ok(inferenceResultService.getDownloadAudit(searchReq, downloadReq));
}
@Operation(summary = "추론 실행중인 도엽 목록", description = "추론관리 실행중인 도엽명 5k 목록")
@ApiResponses({
@ApiResponse(
responseCode = "200",
description = "검색 성공",
content =
@Content(
mediaType = "application/json",
schema = @Schema(implementation = ApiResponseDto.class))),
@ApiResponse(responseCode = "400", description = "잘못된 검색 조건", content = @Content),
@ApiResponse(responseCode = "500", description = "서버 오류", content = @Content)
})
@GetMapping(value = "/running-map/{uuid}")
public ApiResponseDto<List<String>> getInferenceRunMapName(
@Parameter(description = "uuid", example = "9d213416-0e9e-429a-b037-070e6a29946e")
@PathVariable
UUID uuid) {
return ApiResponseDto.ok(inferenceResultService.getInferenceRunMapId(uuid));
}
}

View File

@@ -595,4 +595,14 @@ public class InferenceResultService {
AuditLogDto.searchReq searchReq, DownloadReq downloadReq) {
return auditLogCoreService.findLogByAccount(searchReq, downloadReq);
}
/**
* 실행중인 추론 도엽명 목록
*
* @param uuid uuid
* @return
*/
public List<String> getInferenceRunMapId(UUID uuid) {
return inferenceResultCoreService.getInferenceRunMapId(uuid);
}
}

View File

@@ -476,4 +476,14 @@ public class InferenceResultCoreService {
dto.setUid(entity.getUid());
return dto;
}
/**
* 실행중인 추론 도엽명 목록
*
* @param uuid 추론 실행중인 uuid
* @return
*/
public List<String> getInferenceRunMapId(UUID uuid) {
return mapSheetLearn5kRepository.getInferenceRunMapId(uuid);
}
}

View File

@@ -6,4 +6,6 @@ import java.util.UUID;
public interface MapSheetLearn5kRepositoryCustom {
void saveFail5k(UUID uuid, List<Long> failMapIds, String type);
List<String> getInferenceRunMapId(UUID uuid);
}

View File

@@ -1,9 +1,11 @@
package com.kamco.cd.kamcoback.postgres.repository.Inference;
import static com.kamco.cd.kamcoback.postgres.entity.QMapInkx5kEntity.mapInkx5kEntity;
import static com.kamco.cd.kamcoback.postgres.entity.QMapSheetLearn5kEntity.mapSheetLearn5kEntity;
import static com.kamco.cd.kamcoback.postgres.entity.QMapSheetLearnEntity.mapSheetLearnEntity;
import com.querydsl.core.types.dsl.BooleanPath;
import com.querydsl.core.types.dsl.Expressions;
import com.querydsl.jpa.impl.JPAQueryFactory;
import java.util.List;
import java.util.UUID;
@@ -59,4 +61,25 @@ public class MapSheetLearn5kRepositoryImpl implements MapSheetLearn5kRepositoryC
.and(mapSheetLearn5kEntity.mapSheetNum.in(failMapIds)))
.execute();
}
@Override
public List<String> getInferenceRunMapId(UUID uuid) {
return queryFactory
.select(mapInkx5kEntity.mapidNm)
.from(mapSheetLearnEntity)
.innerJoin(mapSheetLearn5kEntity)
.on(mapSheetLearn5kEntity.learn.id.eq(mapSheetLearnEntity.id))
.innerJoin(mapInkx5kEntity)
.on(
Expressions.booleanTemplate(
"function('regexp_match', {0}, '^[0-9]+$') is not null",
mapInkx5kEntity.mapidcdNo)
.and(
mapSheetLearn5kEntity.mapSheetNum.eq(
Expressions.numberTemplate(
Long.class, "cast({0} as long)", mapInkx5kEntity.mapidcdNo))))
.where(mapSheetLearnEntity.uuid.eq(uuid))
.groupBy(mapInkx5kEntity.mapidNm)
.fetch();
}
}