추론 상세 속도 느린 현상 수정
This commit is contained in:
@@ -4,7 +4,6 @@ import com.kamco.cd.kamcoback.common.exception.CustomApiException;
|
||||
import com.kamco.cd.kamcoback.common.utils.UserUtil;
|
||||
import com.kamco.cd.kamcoback.inference.dto.InferenceDetailDto;
|
||||
import com.kamco.cd.kamcoback.inference.dto.InferenceDetailDto.AnalResultInfo;
|
||||
import com.kamco.cd.kamcoback.inference.dto.InferenceDetailDto.BboxPointDto;
|
||||
import com.kamco.cd.kamcoback.inference.dto.InferenceDetailDto.Dashboard;
|
||||
import com.kamco.cd.kamcoback.inference.dto.InferenceDetailDto.Geom;
|
||||
import com.kamco.cd.kamcoback.inference.dto.InferenceDetailDto.InferenceBatchSheet;
|
||||
@@ -480,10 +479,10 @@ public class InferenceResultCoreService {
|
||||
log.info("get inference result info end time = {}", LocalDateTime.now());
|
||||
// bbox, point 조회
|
||||
log.info("get inference result info bbox start time = {}", LocalDateTime.now());
|
||||
BboxPointDto bboxPointDto = mapSheetLearnRepository.getBboxPoint(uuid);
|
||||
// BboxPointDto bboxPointDto = mapSheetLearnRepository.getBboxPoint(uuid);
|
||||
log.info("get inference result info bbox end time = {}", LocalDateTime.now());
|
||||
resultInfo.setBboxGeom(bboxPointDto.getBboxGeom());
|
||||
resultInfo.setBboxCenterPoint(bboxPointDto.getBboxCenterPoint());
|
||||
resultInfo.setBboxGeom(null);
|
||||
resultInfo.setBboxCenterPoint(null);
|
||||
|
||||
return resultInfo;
|
||||
}
|
||||
|
||||
@@ -162,6 +162,9 @@ public class MapSheetAnalDataInferenceGeomEntity {
|
||||
@Column(name = "lock_yn")
|
||||
private String lockYn;
|
||||
|
||||
@Column(name = "learn_id")
|
||||
private Long learnId;
|
||||
|
||||
public InferenceDetailDto.DetailListEntity toEntity() {
|
||||
DetectionClassification classification = DetectionClassification.fromString(classBeforeCd);
|
||||
Clazzes comparedClazz = new Clazzes(classification, classBeforeProb);
|
||||
|
||||
@@ -161,7 +161,8 @@ public class InferenceResultRepositoryImpl implements InferenceResultRepositoryC
|
||||
area,
|
||||
data_uid,
|
||||
created_dttm,
|
||||
ref_map_sheet_num
|
||||
ref_map_sheet_num,
|
||||
learn_id
|
||||
)
|
||||
SELECT
|
||||
x.result_uid,
|
||||
@@ -179,7 +180,8 @@ public class InferenceResultRepositoryImpl implements InferenceResultRepositoryC
|
||||
x.area,
|
||||
x.data_uid,
|
||||
x.created_dttm,
|
||||
x.ref_map_sheet_num
|
||||
x.ref_map_sheet_num,
|
||||
x.learn_id
|
||||
FROM (
|
||||
SELECT
|
||||
r.uid AS result_uid,
|
||||
@@ -204,7 +206,8 @@ public class InferenceResultRepositoryImpl implements InferenceResultRepositoryC
|
||||
r.area,
|
||||
msadi.data_uid,
|
||||
r.created_date AS created_dttm,
|
||||
msadi.ref_map_sheet_num
|
||||
msadi.ref_map_sheet_num,
|
||||
msl.learn_id
|
||||
FROM inference_results_testing r
|
||||
JOIN tb_map_sheet_anal_inference msl
|
||||
ON r.batch_id IN (
|
||||
|
||||
@@ -421,7 +421,8 @@ public class MapSheetLearnRepositoryImpl implements MapSheetLearnRepositoryCusto
|
||||
}
|
||||
|
||||
// 2) where 조건
|
||||
where.and(mapSheetAnalInferenceEntity.learnId.eq(analEntity.getId()));
|
||||
// where.and(mapSheetAnalInferenceEntity.learnId.eq(analEntity.getId()));
|
||||
where.and(mapSheetAnalDataInferenceGeomEntity.learnId.eq(analEntity.getId()));
|
||||
|
||||
if (searchGeoReq.getTargetClass() != null && !searchGeoReq.getTargetClass().isBlank()) {
|
||||
where.and(
|
||||
@@ -492,11 +493,7 @@ public class MapSheetLearnRepositoryImpl implements MapSheetLearnRepositoryCusto
|
||||
mapSheetAnalDataInferenceGeomEntity.resultUid),
|
||||
Expressions.constant(""),
|
||||
mapSheetAnalDataInferenceGeomEntity.fitState))
|
||||
.from(mapSheetAnalInferenceEntity)
|
||||
.join(mapSheetAnalDataInferenceEntity)
|
||||
.on(mapSheetAnalDataInferenceEntity.analUid.eq(mapSheetAnalInferenceEntity.id))
|
||||
.join(mapSheetAnalDataInferenceGeomEntity)
|
||||
.on(mapSheetAnalDataInferenceGeomEntity.dataUid.eq(mapSheetAnalDataInferenceEntity.id))
|
||||
.from(mapSheetAnalDataInferenceGeomEntity)
|
||||
.join(mapInkx5kEntity)
|
||||
.on(inkxIsNumeric.and(mapSheetAnalDataInferenceGeomEntity.mapSheetNum.eq(inkxNoAsLong)))
|
||||
.where(where)
|
||||
@@ -536,11 +533,9 @@ public class MapSheetLearnRepositoryImpl implements MapSheetLearnRepositoryCusto
|
||||
Long total =
|
||||
queryFactory
|
||||
.select(mapSheetAnalDataInferenceGeomEntity.geoUid.count())
|
||||
.from(mapSheetAnalInferenceEntity)
|
||||
.join(mapSheetAnalDataInferenceEntity)
|
||||
.on(mapSheetAnalDataInferenceEntity.analUid.eq(mapSheetAnalInferenceEntity.id))
|
||||
.join(mapSheetAnalDataInferenceGeomEntity)
|
||||
.on(mapSheetAnalDataInferenceGeomEntity.dataUid.eq(mapSheetAnalDataInferenceEntity.id))
|
||||
.from(mapSheetAnalDataInferenceGeomEntity)
|
||||
.join(mapInkx5kEntity)
|
||||
.on(inkxIsNumeric.and(mapSheetAnalDataInferenceGeomEntity.mapSheetNum.eq(inkxNoAsLong)))
|
||||
.where(where)
|
||||
.fetchOne();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user