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