추론진행 도엽 목록 api추가
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user