Merge remote-tracking branch 'origin/feat/infer_dev_260107' into feat/infer_dev_260107
This commit is contained in:
@@ -437,4 +437,8 @@ public class InferenceResultCoreService {
|
||||
public void saveFail5k(UUID uuid, List<Long> failMapIds, String type) {
|
||||
mapSheetLearn5kRepository.saveFail5k(uuid, failMapIds, type);
|
||||
}
|
||||
|
||||
public Long getInferenceLearnIdByUuid(UUID uuid) {
|
||||
return inferenceResultRepository.getInferenceLearnIdByUuid(uuid);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.kamco.cd.kamcoback.postgres.repository.Inference;
|
||||
|
||||
import com.kamco.cd.kamcoback.postgres.entity.MapSheetAnalDataInferenceGeomEntity;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
||||
public interface InferenceResultRepositoryCustom {
|
||||
|
||||
@@ -24,4 +25,6 @@ public interface InferenceResultRepositoryCustom {
|
||||
int markGeomCreatedByGeoUids(List<Long> geoUids);
|
||||
|
||||
List<MapSheetAnalDataInferenceGeomEntity> findGeomEntitiesByDataUid(Long dataUid, int limit);
|
||||
|
||||
Long getInferenceLearnIdByUuid(UUID uuid);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package com.kamco.cd.kamcoback.postgres.repository.Inference;
|
||||
|
||||
import static com.kamco.cd.kamcoback.postgres.entity.QMapSheetLearnEntity.mapSheetLearnEntity;
|
||||
|
||||
import com.kamco.cd.kamcoback.postgres.entity.MapSheetAnalDataInferenceGeomEntity;
|
||||
import com.kamco.cd.kamcoback.postgres.entity.QMapSheetAnalDataInferenceEntity;
|
||||
import com.kamco.cd.kamcoback.postgres.entity.QMapSheetAnalDataInferenceGeomEntity;
|
||||
@@ -8,6 +10,7 @@ import com.querydsl.jpa.impl.JPAQueryFactory;
|
||||
import jakarta.persistence.EntityManager;
|
||||
import java.time.ZonedDateTime;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
@@ -454,4 +457,13 @@ public class InferenceResultRepositoryImpl implements InferenceResultRepositoryC
|
||||
.limit(limit)
|
||||
.fetch();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Long getInferenceLearnIdByUuid(UUID uuid) {
|
||||
return queryFactory
|
||||
.select(mapSheetLearnEntity.id)
|
||||
.from(mapSheetLearnEntity)
|
||||
.where(mapSheetLearnEntity.uuid.eq(uuid))
|
||||
.fetchOne();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -378,19 +378,15 @@ public class MapSheetLearnRepositoryImpl implements MapSheetLearnRepositoryCusto
|
||||
// 기준년도 분류
|
||||
if (searchGeoReq.getTargetClass() != null && !searchGeoReq.getTargetClass().equals("")) {
|
||||
builder.and(
|
||||
mapSheetAnalDataInferenceGeomEntity
|
||||
.classAfterCd
|
||||
.toLowerCase()
|
||||
.eq(searchGeoReq.getTargetClass().toLowerCase()));
|
||||
mapSheetAnalDataInferenceGeomEntity.classAfterCd.eq(
|
||||
searchGeoReq.getTargetClass().toLowerCase()));
|
||||
}
|
||||
|
||||
// 비교년도 분류
|
||||
if (searchGeoReq.getCompareClass() != null && !searchGeoReq.getCompareClass().equals("")) {
|
||||
builder.and(
|
||||
mapSheetAnalDataInferenceGeomEntity
|
||||
.classBeforeCd
|
||||
.toLowerCase()
|
||||
.eq(searchGeoReq.getCompareClass().toLowerCase()));
|
||||
mapSheetAnalDataInferenceGeomEntity.classBeforeCd.eq(
|
||||
searchGeoReq.getCompareClass().toLowerCase()));
|
||||
}
|
||||
|
||||
// 분석도엽
|
||||
@@ -414,11 +410,14 @@ public class MapSheetLearnRepositoryImpl implements MapSheetLearnRepositoryCusto
|
||||
mapSheetAnalDataInferenceGeomEntity.classAfterCd,
|
||||
mapSheetAnalDataInferenceGeomEntity.classAfterProb,
|
||||
mapSheetAnalDataInferenceGeomEntity.mapSheetNum,
|
||||
mapInkx5kEntity.mapidNm,
|
||||
Expressions.stringTemplate(
|
||||
"ST_AsGeoJSON({0})", mapSheetAnalDataInferenceGeomEntity.geom),
|
||||
Expressions.stringTemplate(
|
||||
"ST_AsGeoJSON({0})", mapSheetAnalDataInferenceGeomEntity.geomCenter)))
|
||||
mapInkx5kEntity.mapidNm
|
||||
// Expressions.stringTemplate(
|
||||
// "ST_AsGeoJSON({0})",
|
||||
// mapSheetAnalDataInferenceGeomEntity.geom),
|
||||
// Expressions.stringTemplate(
|
||||
// "ST_AsGeoJSON({0})",
|
||||
// mapSheetAnalDataInferenceGeomEntity.geomCenter)
|
||||
))
|
||||
.from(mapSheetAnalInferenceEntity)
|
||||
.join(mapSheetAnalDataInferenceGeomEntity)
|
||||
.on(
|
||||
@@ -429,10 +428,9 @@ public class MapSheetLearnRepositoryImpl implements MapSheetLearnRepositoryCusto
|
||||
mapSheetAnalDataInferenceGeomEntity.stage.eq(mapSheetAnalInferenceEntity.stage))
|
||||
.join(mapInkx5kEntity)
|
||||
.on(
|
||||
mapSheetAnalDataInferenceGeomEntity
|
||||
.mapSheetNum
|
||||
.stringValue()
|
||||
.eq(mapInkx5kEntity.mapidcdNo))
|
||||
mapSheetAnalDataInferenceGeomEntity.mapSheetNum.eq(
|
||||
Expressions.numberTemplate(
|
||||
Long.class, "CAST({0} AS long)", mapInkx5kEntity.mapidcdNo)))
|
||||
.where(builder)
|
||||
.offset(pageable.getOffset())
|
||||
.limit(pageable.getPageSize())
|
||||
@@ -443,14 +441,6 @@ public class MapSheetLearnRepositoryImpl implements MapSheetLearnRepositoryCusto
|
||||
.select(mapSheetAnalDataInferenceGeomEntity.geoUid)
|
||||
.from(mapSheetAnalInferenceEntity)
|
||||
.join(mapSheetAnalDataInferenceGeomEntity)
|
||||
.on(
|
||||
mapSheetAnalDataInferenceGeomEntity.compareYyyy.eq(
|
||||
mapSheetAnalInferenceEntity.compareYyyy),
|
||||
mapSheetAnalDataInferenceGeomEntity.targetYyyy.eq(
|
||||
mapSheetAnalInferenceEntity.targetYyyy),
|
||||
mapSheetAnalDataInferenceGeomEntity.stage.eq(mapSheetAnalInferenceEntity.stage))
|
||||
.from(mapSheetAnalInferenceEntity)
|
||||
.join(mapSheetAnalDataInferenceGeomEntity)
|
||||
.on(
|
||||
mapSheetAnalDataInferenceGeomEntity.compareYyyy.eq(
|
||||
mapSheetAnalInferenceEntity.compareYyyy),
|
||||
@@ -459,10 +449,9 @@ public class MapSheetLearnRepositoryImpl implements MapSheetLearnRepositoryCusto
|
||||
mapSheetAnalDataInferenceGeomEntity.stage.eq(mapSheetAnalInferenceEntity.stage))
|
||||
.join(mapInkx5kEntity)
|
||||
.on(
|
||||
mapSheetAnalDataInferenceGeomEntity
|
||||
.mapSheetNum
|
||||
.stringValue()
|
||||
.eq(mapInkx5kEntity.mapidcdNo))
|
||||
mapSheetAnalDataInferenceGeomEntity.mapSheetNum.eq(
|
||||
Expressions.numberTemplate(
|
||||
Long.class, "CAST({0} AS long)", mapInkx5kEntity.mapidcdNo)))
|
||||
.where(builder)
|
||||
.fetchCount();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user