Merge pull request 'feat/infer_dev_260107' (#224) from feat/infer_dev_260107 into develop

Reviewed-on: https://kamco.gitea.gs.dabeeo.com/dabeeo/kamco-dabeeo-backoffice/pulls/224
This commit is contained in:
2026-01-13 14:56:06 +09:00
7 changed files with 17 additions and 20 deletions

View File

@@ -84,14 +84,14 @@ public class InferenceResultApiController {
mediaType = "application/json", mediaType = "application/json",
schema = schema =
@Schema( @Schema(
description = "진행 여부 (Y: 진행중, N: 없음)", description = "진행 여부 (UUID 있으면 진행중)",
type = "string", type = "UUID",
example = "N"))), example = "44709877-2e27-4fc5-bacb-8e0328c69b64"))),
@ApiResponse(responseCode = "400", description = "잘못된 검색 조건", content = @Content), @ApiResponse(responseCode = "400", description = "잘못된 검색 조건", content = @Content),
@ApiResponse(responseCode = "500", description = "서버 오류", content = @Content) @ApiResponse(responseCode = "500", description = "서버 오류", content = @Content)
}) })
@GetMapping("/processing-yn") @GetMapping("/processing-yn")
public ApiResponseDto<String> getProcessing() { public ApiResponseDto<UUID> getProcessing() {
return ApiResponseDto.ok(inferenceResultService.getProcessing()); return ApiResponseDto.ok(inferenceResultService.getProcessing());
} }

View File

@@ -460,5 +460,6 @@ public class InferenceResultDto {
private ZonedDateTime modelStartDttm; private ZonedDateTime modelStartDttm;
private ZonedDateTime modelEndDttm; private ZonedDateTime modelEndDttm;
private Long updateUid; private Long updateUid;
private String runningModelType;
} }
} }

View File

@@ -79,7 +79,7 @@ public class InferenceResultService {
* *
* @return * @return
*/ */
public String getProcessing() { public UUID getProcessing() {
return inferenceResultCoreService.getProcessing(); return inferenceResultCoreService.getProcessing();
} }

View File

@@ -347,7 +347,7 @@ public class InferenceResultCoreService {
* *
* @return * @return
*/ */
public String getProcessing() { public UUID getProcessing() {
return mapSheetLearnRepository.getProcessing(); return mapSheetLearnRepository.getProcessing();
} }
} }

View File

@@ -24,5 +24,5 @@ public interface MapSheetLearnRepositoryCustom {
InferenceStatusDetailDto getInferenceStatus(UUID uuid); InferenceStatusDetailDto getInferenceStatus(UUID uuid);
String getProcessing(); UUID getProcessing();
} }

View File

@@ -232,16 +232,11 @@ public class MapSheetLearnRepositoryImpl implements MapSheetLearnRepositoryCusto
* *
* @return * @return
*/ */
public String getProcessing() { public UUID getProcessing() {
Long processing = return queryFactory
queryFactory .select(mapSheetLearnEntity.uuid)
.select(mapSheetLearnEntity.count())
.from(mapSheetLearnEntity) .from(mapSheetLearnEntity)
.where(mapSheetLearnEntity.status.eq("IN_PROGRESS")) .where(mapSheetLearnEntity.status.eq("IN_PROGRESS"))
.fetchOne(); .fetchOne();
if (Long.valueOf(0L).equals(processing)) {
return "N";
}
return "Y";
} }
} }

View File

@@ -54,7 +54,7 @@ public class MapSheetInferenceJobService {
public void runBatch() { public void runBatch() {
if ("local".equalsIgnoreCase(profile)) { if ("local".equalsIgnoreCase(profile)) {
// return; return;
} }
try { try {
@@ -176,7 +176,7 @@ public class MapSheetInferenceJobService {
m.setCls_model_path( m.setCls_model_path(
progressDto.getCdModelClsPath() + "/" + progressDto.getCdModelClsFileName()); progressDto.getCdModelClsPath() + "/" + progressDto.getCdModelClsFileName());
m.setCls_model_version(progressDto.getClsModelVersion()); m.setCls_model_version(progressDto.getClsModelVersion());
m.setCd_model_type(inferenceType); m.setCd_model_type(type);
m.setPriority(progressDto.getPriority()); m.setPriority(progressDto.getPriority());
// 추론 다음모델 실행 // 추론 다음모델 실행
@@ -188,6 +188,7 @@ public class MapSheetInferenceJobService {
saveInferenceAiDto.setStatus(Status.IN_PROGRESS.getId()); saveInferenceAiDto.setStatus(Status.IN_PROGRESS.getId());
saveInferenceAiDto.setType(type); saveInferenceAiDto.setType(type);
saveInferenceAiDto.setModelStartDttm(ZonedDateTime.now()); saveInferenceAiDto.setModelStartDttm(ZonedDateTime.now());
saveInferenceAiDto.setRunningModelType(inferenceType);
inferenceResultCoreService.update(saveInferenceAiDto); inferenceResultCoreService.update(saveInferenceAiDto);
} }