추론 결과 bbox, bbox point 추가
This commit is contained in:
@@ -4,6 +4,7 @@ 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;
|
||||
@@ -409,8 +410,18 @@ public class InferenceResultCoreService {
|
||||
return dto;
|
||||
}
|
||||
|
||||
/**
|
||||
* 추론결과 기본정보
|
||||
*
|
||||
* @param uuid uuid
|
||||
* @return
|
||||
*/
|
||||
public AnalResultInfo getInferenceResultInfo(UUID uuid) {
|
||||
return mapSheetLearnRepository.getInferenceResultInfo(uuid);
|
||||
AnalResultInfo resultInfo = mapSheetLearnRepository.getInferenceResultInfo(uuid);
|
||||
BboxPointDto bboxPointDto = mapSheetLearnRepository.getBboxPoint(uuid);
|
||||
resultInfo.setBboxGeom(bboxPointDto.getBboxGeom());
|
||||
resultInfo.setBboxCenterPoint(bboxPointDto.getBboxCenterPoint());
|
||||
return resultInfo;
|
||||
}
|
||||
|
||||
public List<Dashboard> getInferenceClassCountList(UUID uuid) {
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.kamco.cd.kamcoback.postgres.repository.Inference;
|
||||
|
||||
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.SearchGeoReq;
|
||||
@@ -34,6 +35,8 @@ public interface MapSheetLearnRepositoryCustom {
|
||||
|
||||
AnalResultInfo getInferenceResultInfo(UUID uuid);
|
||||
|
||||
BboxPointDto getBboxPoint(UUID uuid);
|
||||
|
||||
List<Dashboard> getInferenceClassCountList(UUID uuid);
|
||||
|
||||
Page<Geom> getInferenceGeomList(UUID uuid, SearchGeoReq searchGeoReq);
|
||||
|
||||
@@ -13,6 +13,7 @@ import static com.kamco.cd.kamcoback.postgres.entity.QSystemMetricEntity.systemM
|
||||
import com.kamco.cd.kamcoback.common.exception.CustomApiException;
|
||||
import com.kamco.cd.kamcoback.common.utils.DateRange;
|
||||
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.SearchGeoReq;
|
||||
@@ -24,6 +25,7 @@ import com.kamco.cd.kamcoback.model.service.ModelMngService;
|
||||
import com.kamco.cd.kamcoback.postgres.entity.MapSheetLearnEntity;
|
||||
import com.kamco.cd.kamcoback.postgres.entity.QModelMngEntity;
|
||||
import com.querydsl.core.BooleanBuilder;
|
||||
import com.querydsl.core.types.Expression;
|
||||
import com.querydsl.core.types.Projections;
|
||||
import com.querydsl.core.types.dsl.BooleanExpression;
|
||||
import com.querydsl.core.types.dsl.CaseBuilder;
|
||||
@@ -331,6 +333,30 @@ public class MapSheetLearnRepositoryImpl implements MapSheetLearnRepositoryCusto
|
||||
.fetchOne();
|
||||
}
|
||||
|
||||
@Override
|
||||
public BboxPointDto getBboxPoint(UUID uuid) {
|
||||
Expression<String> bboxGeom =
|
||||
Expressions.stringTemplate(
|
||||
"ST_AsGeoJSON(ST_Envelope(ST_Collect({0})))", mapSheetAnalDataInferenceGeomEntity.geom);
|
||||
|
||||
Expression<String> bboxCenterPoint =
|
||||
Expressions.stringTemplate(
|
||||
"ST_AsGeoJSON(ST_Centroid(ST_Envelope(ST_Collect({0}))))",
|
||||
mapSheetAnalDataInferenceGeomEntity.geom);
|
||||
|
||||
return queryFactory
|
||||
.select(Projections.constructor(BboxPointDto.class, bboxGeom, bboxCenterPoint))
|
||||
.from(mapSheetLearnEntity)
|
||||
.join(mapSheetAnalInferenceEntity)
|
||||
.on(mapSheetAnalInferenceEntity.learnId.eq(mapSheetLearnEntity.id))
|
||||
.join(mapSheetAnalDataInferenceEntity)
|
||||
.on(mapSheetAnalDataInferenceEntity.analUid.eq(mapSheetAnalInferenceEntity.id))
|
||||
.join(mapSheetAnalDataInferenceGeomEntity)
|
||||
.on(mapSheetAnalDataInferenceGeomEntity.dataUid.eq(mapSheetAnalDataInferenceEntity.id))
|
||||
.where(mapSheetLearnEntity.uuid.eq(uuid))
|
||||
.fetchOne();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Dashboard> getInferenceClassCountList(UUID uuid) {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user