From c076a4e4b10e8788e6e2622e8e4713441fdfce5f Mon Sep 17 00:00:00 2001 From: DanielLee <198891672+sanghyeonhd@users.noreply.github.com> Date: Mon, 19 Jan 2026 14:46:04 +0900 Subject: [PATCH 1/2] Polygon Sample data change --- .../TrainingDataLabelApiController.java | 88 +++++++++++++++---- .../TrainingDataReviewApiController.java | 88 +++++++++++++++---- 2 files changed, 144 insertions(+), 32 deletions(-) diff --git a/src/main/java/com/kamco/cd/kamcoback/trainingdata/TrainingDataLabelApiController.java b/src/main/java/com/kamco/cd/kamcoback/trainingdata/TrainingDataLabelApiController.java index 9efd6f32..4139bccc 100644 --- a/src/main/java/com/kamco/cd/kamcoback/trainingdata/TrainingDataLabelApiController.java +++ b/src/main/java/com/kamco/cd/kamcoback/trainingdata/TrainingDataLabelApiController.java @@ -376,10 +376,29 @@ public class TrainingDataLabelApiController { "type": "Polygon", "coordinates": [ [ - [126.663, 34.588], - [126.662, 34.587], - [126.664, 34.589], - [126.663, 34.588] + [255968.87499999875, 522096.0392135622], + [255969.3749999955, 522097.7892135601], + [255973.8750000003, 522103.53921356186], + [255976.62499999997, 522108.53921356145], + [255978.9607864372, 522110.87500000006], + [255980.7107864374, 522111.624999999], + [255982.53921356448, 522111.6250000003], + [255988.37499999587, 522109.87499999726], + [255988.37499999927, 522108.28921356244], + [255990.12499999776, 522106.5392135628], + [255990.87499999846, 522105.039213567], + [255990.87500000012, 522102.4607864364], + [255990.12499999718, 522100.4607864384], + [255988.37499999863, 522097.46078643657], + [255988.37499999968, 522096.46078643645], + [255983.28921356171, 522092.8749999984], + [255979.5392135627, 522088.37499999907], + [255978.53921355822, 522087.8750000016], + [255974.46078643817, 522087.874999998], + [255971.21078643805, 522088.87499999977], + [255969.87500000134, 522090.21078643604], + [255968.87499999907, 522092.21078643575], + [255968.87499999875, 522096.0392135622] ] ] }, @@ -408,10 +427,16 @@ public class TrainingDataLabelApiController { "type": "Polygon", "coordinates": [ [ - [126.663, 34.588], - [126.662, 34.587], - [126.664, 34.589], - [126.663, 34.588] + [168526.71078643727, 544547.3749999998], + [168527.71078643794, 544548.3749999991], + [168530.28921356675, 544548.6249999998], + [168538.53921356046, 544547.1250000003], + [168547.28921356154, 544547.374999999], + [168549.53921357248, 544545.1250000008], + [168526.9607864362, 544544.6249999998], + [168525.87500000178, 544545.710786436], + [168525.87499999133, 544547.3749999998], + [168526.71078643727, 544547.3749999998] ] ] }, @@ -426,10 +451,22 @@ public class TrainingDataLabelApiController { "type": "Polygon", "coordinates": [ [ - [126.665, 34.590], - [126.664, 34.589], - [126.666, 34.591], - [126.665, 34.590] + [321550.124999999, 399476.9607864386], + [321550.12500000146, 399480.53921356204], + [321551.96078643796, 399482.37499999895], + [321553.46078643616, 399483.12499999907], + [321558.21078643785, 399484.62500000035], + [321560.96078643884, 399486.1250000005], + [321563.78921356366, 399486.1249999994], + [321565.62500000204, 399484.28921355924], + [321565.87499999726, 399479.7107864349], + [321565.37500000506, 399478.71078644204], + [321562.0392135627, 399476.12499999604], + [321559.0392135677, 399474.62499999924], + [321556.0392135648, 399473.6249999991], + [321552.4607864374, 399473.6249999991], + [321550.8750000004, 399474.96078643366], + [321550.124999999, 399476.9607864386] ] ] }, @@ -444,10 +481,29 @@ public class TrainingDataLabelApiController { "type": "Polygon", "coordinates": [ [ - [126.667, 34.592], - [126.666, 34.591], - [126.668, 34.593], - [126.667, 34.592] + [386684.62499999895, 310943.28921356204], + [386684.87499999773, 310944.7892135619], + [386686.87500000314, 310949.03921356524], + [386689.71078643756, 310952.37499999907], + [386692.5392135586, 310952.6249999989], + [386694.0392135624, 310951.87500000035], + [386697.28921356064, 310951.87500000035], + [386700.53921356215, 310948.62499999854], + [386709.78921356826, 310946.37499999977], + [386715.0392135615, 310942.87500000285], + [386717.8750000029, 310939.2892135617], + [386718.3750000007, 310937.28921356343], + [386718.124999998, 310933.71078643954], + [386716.87500000326, 310931.4607864389], + [386712.7892135609, 310927.12499999825], + [386708.4607864385, 310927.124999999], + [386699.2107864381, 310931.3749999989], + [386694.9607864365, 310932.6249999988], + [386692.21078644064, 310932.8750000003], + [386686.4607864376, 310935.12499999994], + [386685.3750000027, 310936.2107864344], + [386684.3750000007, 310938.71078643826], + [386684.62499999895, 310943.28921356204] ] ] }, diff --git a/src/main/java/com/kamco/cd/kamcoback/trainingdata/TrainingDataReviewApiController.java b/src/main/java/com/kamco/cd/kamcoback/trainingdata/TrainingDataReviewApiController.java index 35664d9e..c0e3d1ee 100644 --- a/src/main/java/com/kamco/cd/kamcoback/trainingdata/TrainingDataReviewApiController.java +++ b/src/main/java/com/kamco/cd/kamcoback/trainingdata/TrainingDataReviewApiController.java @@ -376,10 +376,29 @@ public class TrainingDataReviewApiController { "type": "Polygon", "coordinates": [ [ - [126.663, 34.588], - [126.662, 34.587], - [126.664, 34.589], - [126.663, 34.588] + [255968.87499999875, 522096.0392135622], + [255969.3749999955, 522097.7892135601], + [255973.8750000003, 522103.53921356186], + [255976.62499999997, 522108.53921356145], + [255978.9607864372, 522110.87500000006], + [255980.7107864374, 522111.624999999], + [255982.53921356448, 522111.6250000003], + [255988.37499999587, 522109.87499999726], + [255988.37499999927, 522108.28921356244], + [255990.12499999776, 522106.5392135628], + [255990.87499999846, 522105.039213567], + [255990.87500000012, 522102.4607864364], + [255990.12499999718, 522100.4607864384], + [255988.37499999863, 522097.46078643657], + [255988.37499999968, 522096.46078643645], + [255983.28921356171, 522092.8749999984], + [255979.5392135627, 522088.37499999907], + [255978.53921355822, 522087.8750000016], + [255974.46078643817, 522087.874999998], + [255971.21078643805, 522088.87499999977], + [255969.87500000134, 522090.21078643604], + [255968.87499999907, 522092.21078643575], + [255968.87499999875, 522096.0392135622] ] ] }, @@ -408,10 +427,16 @@ public class TrainingDataReviewApiController { "type": "Polygon", "coordinates": [ [ - [126.663, 34.588], - [126.662, 34.587], - [126.664, 34.589], - [126.663, 34.588] + [168526.71078643727, 544547.3749999998], + [168527.71078643794, 544548.3749999991], + [168530.28921356675, 544548.6249999998], + [168538.53921356046, 544547.1250000003], + [168547.28921356154, 544547.374999999], + [168549.53921357248, 544545.1250000008], + [168526.9607864362, 544544.6249999998], + [168525.87500000178, 544545.710786436], + [168525.87499999133, 544547.3749999998], + [168526.71078643727, 544547.3749999998] ] ] }, @@ -426,10 +451,22 @@ public class TrainingDataReviewApiController { "type": "Polygon", "coordinates": [ [ - [126.665, 34.590], - [126.664, 34.589], - [126.666, 34.591], - [126.665, 34.590] + [321550.124999999, 399476.9607864386], + [321550.12500000146, 399480.53921356204], + [321551.96078643796, 399482.37499999895], + [321553.46078643616, 399483.12499999907], + [321558.21078643785, 399484.62500000035], + [321560.96078643884, 399486.1250000005], + [321563.78921356366, 399486.1249999994], + [321565.62500000204, 399484.28921355924], + [321565.87499999726, 399479.7107864349], + [321565.37500000506, 399478.71078644204], + [321562.0392135627, 399476.12499999604], + [321559.0392135677, 399474.62499999924], + [321556.0392135648, 399473.6249999991], + [321552.4607864374, 399473.6249999991], + [321550.8750000004, 399474.96078643366], + [321550.124999999, 399476.9607864386] ] ] }, @@ -444,10 +481,29 @@ public class TrainingDataReviewApiController { "type": "Polygon", "coordinates": [ [ - [126.667, 34.592], - [126.666, 34.591], - [126.668, 34.593], - [126.667, 34.592] + [386684.62499999895, 310943.28921356204], + [386684.87499999773, 310944.7892135619], + [386686.87500000314, 310949.03921356524], + [386689.71078643756, 310952.37499999907], + [386692.5392135586, 310952.6249999989], + [386694.0392135624, 310951.87500000035], + [386697.28921356064, 310951.87500000035], + [386700.53921356215, 310948.62499999854], + [386709.78921356826, 310946.37499999977], + [386715.0392135615, 310942.87500000285], + [386717.8750000029, 310939.2892135617], + [386718.3750000007, 310937.28921356343], + [386718.124999998, 310933.71078643954], + [386716.87500000326, 310931.4607864389], + [386712.7892135609, 310927.12499999825], + [386708.4607864385, 310927.124999999], + [386699.2107864381, 310931.3749999989], + [386694.9607864365, 310932.6249999988], + [386692.21078644064, 310932.8750000003], + [386686.4607864376, 310935.12499999994], + [386685.3750000027, 310936.2107864344], + [386684.3750000007, 310938.71078643826], + [386684.62499999895, 310943.28921356204] ] ] }, From 043c4c6df7ed598d551a517693d2f2deef82f423 Mon Sep 17 00:00:00 2001 From: teddy Date: Mon, 19 Jan 2026 15:19:15 +0900 Subject: [PATCH 2/2] =?UTF-8?q?[KC-116]=20shp=20=ED=8C=8C=EC=9D=BC=20?= =?UTF-8?q?=EC=83=9D=EC=84=B1=20=EA=B8=B0=EB=8A=A5=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../InferenceResultApiController.java | 53 +++++++++++++++++++ .../inference/dto/InferenceResultDto.java | 7 +++ .../inference/dto/InferenceSendDto.java | 1 + .../service/InferenceResultService.java | 18 +++++++ .../core/InferenceResultCoreService.java | 17 ++++++ .../InferenceResultRepositoryCustom.java | 4 ++ .../InferenceResultRepositoryImpl.java | 12 +++++ .../MapSheetLearnRepositoryImpl.java | 19 +++---- 8 files changed, 119 insertions(+), 12 deletions(-) diff --git a/src/main/java/com/kamco/cd/kamcoback/inference/InferenceResultApiController.java b/src/main/java/com/kamco/cd/kamcoback/inference/InferenceResultApiController.java index 5f4189c4..cfb122c8 100644 --- a/src/main/java/com/kamco/cd/kamcoback/inference/InferenceResultApiController.java +++ b/src/main/java/com/kamco/cd/kamcoback/inference/InferenceResultApiController.java @@ -1,5 +1,6 @@ package com.kamco.cd.kamcoback.inference; +import com.kamco.cd.kamcoback.common.exception.CustomApiException; import com.kamco.cd.kamcoback.config.api.ApiResponseDto; import com.kamco.cd.kamcoback.inference.dto.InferenceDetailDto; import com.kamco.cd.kamcoback.inference.dto.InferenceResultDto; @@ -20,11 +21,19 @@ import io.swagger.v3.oas.annotations.responses.ApiResponse; import io.swagger.v3.oas.annotations.responses.ApiResponses; import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.validation.Valid; +import java.io.IOException; +import java.nio.charset.StandardCharsets; +import java.nio.file.Path; import java.time.LocalDate; import java.util.List; import java.util.UUID; import lombok.RequiredArgsConstructor; +import org.springframework.core.io.FileSystemResource; +import org.springframework.core.io.Resource; import org.springframework.data.domain.Page; +import org.springframework.http.HttpHeaders; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.DeleteMapping; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PathVariable; @@ -33,6 +42,7 @@ import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.util.UriUtils; @Tag(name = "추론관리", description = "추론관리 API") @RequestMapping("/api/inference") @@ -388,4 +398,47 @@ public class InferenceResultApiController { inferenceResultService.getInferenceGeomList(uuid, searchGeoReq); return ApiResponseDto.ok(geomList); } + + @Operation(summary = "shp 파일 다운로드", description = "추론관리 분석결과 shp 파일 다운로드") + @ApiResponses( + value = { + @ApiResponse( + responseCode = "200", + description = "shp zip파일 다운로드", + content = + @Content( + mediaType = "application/octet-stream", + schema = @Schema(type = "string", format = "binary"))), + @ApiResponse(responseCode = "404", description = "파일 없음", content = @Content), + @ApiResponse(responseCode = "500", description = "서버 오류", content = @Content) + }) + @GetMapping(value = "/download/{uuid}", produces = MediaType.APPLICATION_OCTET_STREAM_VALUE) + public ResponseEntity downloadZip(@PathVariable UUID uuid) throws IOException { + + String path; + try { + path = String.valueOf(inferenceResultService.shpDownloadPath(uuid)); + } catch (CustomApiException e) { + // 데이터 없음 등 404 + return ResponseEntity.status(e.getStatus()).build(); + } + + Path zipPath = Path.of(path); + FileSystemResource resource = new FileSystemResource(zipPath); + + if (!resource.exists() || !resource.isReadable()) { + return ResponseEntity.notFound().build(); + } + + String filename = zipPath.getFileName().toString(); + String encodedFilename = UriUtils.encode(filename, StandardCharsets.UTF_8); + + return ResponseEntity.ok() + .contentType(MediaType.APPLICATION_OCTET_STREAM) + .header( + HttpHeaders.CONTENT_DISPOSITION, + "attachment; filename=\"" + filename + "\"; filename*=UTF-8''" + encodedFilename) + .contentLength(resource.contentLength()) + .body((Resource) resource); + } } diff --git a/src/main/java/com/kamco/cd/kamcoback/inference/dto/InferenceResultDto.java b/src/main/java/com/kamco/cd/kamcoback/inference/dto/InferenceResultDto.java index 9d579903..2efdbadb 100644 --- a/src/main/java/com/kamco/cd/kamcoback/inference/dto/InferenceResultDto.java +++ b/src/main/java/com/kamco/cd/kamcoback/inference/dto/InferenceResultDto.java @@ -622,4 +622,11 @@ public class InferenceResultDto { private Integer completedJobs; private Integer failedJobs; } + + @Getter + @Setter + public static class InferenceLearnDto { + + private String uid; + } } diff --git a/src/main/java/com/kamco/cd/kamcoback/inference/dto/InferenceSendDto.java b/src/main/java/com/kamco/cd/kamcoback/inference/dto/InferenceSendDto.java index bb09413f..ab90238a 100644 --- a/src/main/java/com/kamco/cd/kamcoback/inference/dto/InferenceSendDto.java +++ b/src/main/java/com/kamco/cd/kamcoback/inference/dto/InferenceSendDto.java @@ -5,6 +5,7 @@ import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; +/** AI API 추론 실행 DTO */ @Getter @Setter @NoArgsConstructor diff --git a/src/main/java/com/kamco/cd/kamcoback/inference/service/InferenceResultService.java b/src/main/java/com/kamco/cd/kamcoback/inference/service/InferenceResultService.java index 3586f22b..8634d357 100644 --- a/src/main/java/com/kamco/cd/kamcoback/inference/service/InferenceResultService.java +++ b/src/main/java/com/kamco/cd/kamcoback/inference/service/InferenceResultService.java @@ -16,6 +16,7 @@ import com.kamco.cd.kamcoback.inference.dto.InferenceDetailDto.MapSheet; import com.kamco.cd.kamcoback.inference.dto.InferenceDetailDto.SearchGeoReq; import com.kamco.cd.kamcoback.inference.dto.InferenceResultDto; import com.kamco.cd.kamcoback.inference.dto.InferenceResultDto.DetectOption; +import com.kamco.cd.kamcoback.inference.dto.InferenceResultDto.InferenceLearnDto; import com.kamco.cd.kamcoback.inference.dto.InferenceResultDto.InferenceServerStatusDto; import com.kamco.cd.kamcoback.inference.dto.InferenceResultDto.InferenceStatusDetailDto; import com.kamco.cd.kamcoback.inference.dto.InferenceResultDto.MapSheetNumDto; @@ -32,6 +33,7 @@ import com.kamco.cd.kamcoback.postgres.core.InferenceResultCoreService; import com.kamco.cd.kamcoback.postgres.core.MapSheetMngCoreService; import com.kamco.cd.kamcoback.postgres.core.ModelMngCoreService; import jakarta.validation.constraints.NotNull; +import java.nio.file.Path; import java.time.ZonedDateTime; import java.util.ArrayList; import java.util.List; @@ -70,6 +72,9 @@ public class InferenceResultService { @Value("${inference.batch-url}") private String batchUrl; + @Value("${file.dataset-dir}") + private String datasetDir; + @Value("${spring.profiles.active}") private String profile; @@ -536,4 +541,17 @@ public class InferenceResultService { Long learnId = inferenceResultCoreService.getInferenceLearnIdByUuid(dto.getUuid()); inferenceResultCoreService.upsertGeomData(learnId); } + + /** + * 추론결과 shp zip 파일 다운로드 경로 생성 + * + * @param uuid + * @return + */ + public Path shpDownloadPath(UUID uuid) { + InferenceLearnDto dto = inferenceResultCoreService.getInferenceUid(uuid); + String uid = dto.getUid(); + + return Path.of(datasetDir).resolve(uid).resolve("merge").resolve(uid + ".zip"); + } } diff --git a/src/main/java/com/kamco/cd/kamcoback/postgres/core/InferenceResultCoreService.java b/src/main/java/com/kamco/cd/kamcoback/postgres/core/InferenceResultCoreService.java index 75c40180..174ee4eb 100644 --- a/src/main/java/com/kamco/cd/kamcoback/postgres/core/InferenceResultCoreService.java +++ b/src/main/java/com/kamco/cd/kamcoback/postgres/core/InferenceResultCoreService.java @@ -11,6 +11,7 @@ import com.kamco.cd.kamcoback.inference.dto.InferenceDetailDto.MapSheet; import com.kamco.cd.kamcoback.inference.dto.InferenceDetailDto.SearchGeoReq; import com.kamco.cd.kamcoback.inference.dto.InferenceProgressDto; import com.kamco.cd.kamcoback.inference.dto.InferenceResultDto; +import com.kamco.cd.kamcoback.inference.dto.InferenceResultDto.InferenceLearnDto; import com.kamco.cd.kamcoback.inference.dto.InferenceResultDto.InferenceServerStatusDto; import com.kamco.cd.kamcoback.inference.dto.InferenceResultDto.InferenceStatusDetailDto; import com.kamco.cd.kamcoback.inference.dto.InferenceResultDto.ResultList; @@ -461,4 +462,20 @@ public class InferenceResultCoreService { inferenceResultsTetingRepository.getInferenceResultList(batchIds); return list.stream().map(InferenceResultsTestingDto.ShpDto::fromEntity).toList(); } + + /** + * uid 조회 + * + * @param uuid + * @return + */ + public InferenceLearnDto getInferenceUid(UUID uuid) { + MapSheetLearnEntity entity = + inferenceResultRepository + .getInferenceUid(uuid) + .orElseThrow(() -> new CustomApiException("NOT_FOUND_DATA", HttpStatus.NOT_FOUND)); + InferenceLearnDto dto = new InferenceLearnDto(); + dto.setUid(entity.getUid()); + return dto; + } } diff --git a/src/main/java/com/kamco/cd/kamcoback/postgres/repository/Inference/InferenceResultRepositoryCustom.java b/src/main/java/com/kamco/cd/kamcoback/postgres/repository/Inference/InferenceResultRepositoryCustom.java index 0d0887c7..c3162853 100644 --- a/src/main/java/com/kamco/cd/kamcoback/postgres/repository/Inference/InferenceResultRepositoryCustom.java +++ b/src/main/java/com/kamco/cd/kamcoback/postgres/repository/Inference/InferenceResultRepositoryCustom.java @@ -1,7 +1,9 @@ package com.kamco.cd.kamcoback.postgres.repository.Inference; import com.kamco.cd.kamcoback.postgres.entity.MapSheetAnalDataInferenceGeomEntity; +import com.kamco.cd.kamcoback.postgres.entity.MapSheetLearnEntity; import java.util.List; +import java.util.Optional; import java.util.UUID; public interface InferenceResultRepositoryCustom { @@ -27,4 +29,6 @@ public interface InferenceResultRepositoryCustom { List findGeomEntitiesByDataUid(Long dataUid, int limit); Long getInferenceLearnIdByUuid(UUID uuid); + + public Optional getInferenceUid(UUID uuid); } diff --git a/src/main/java/com/kamco/cd/kamcoback/postgres/repository/Inference/InferenceResultRepositoryImpl.java b/src/main/java/com/kamco/cd/kamcoback/postgres/repository/Inference/InferenceResultRepositoryImpl.java index f6f02e28..3d51412b 100644 --- a/src/main/java/com/kamco/cd/kamcoback/postgres/repository/Inference/InferenceResultRepositoryImpl.java +++ b/src/main/java/com/kamco/cd/kamcoback/postgres/repository/Inference/InferenceResultRepositoryImpl.java @@ -3,6 +3,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.MapSheetLearnEntity; import com.kamco.cd.kamcoback.postgres.entity.QMapSheetAnalDataInferenceEntity; import com.kamco.cd.kamcoback.postgres.entity.QMapSheetAnalDataInferenceGeomEntity; import com.kamco.cd.kamcoback.postgres.entity.QMapSheetAnalInferenceEntity; @@ -10,6 +11,7 @@ import com.querydsl.jpa.impl.JPAQueryFactory; import jakarta.persistence.EntityManager; import java.time.ZonedDateTime; import java.util.List; +import java.util.Optional; import java.util.UUID; import lombok.RequiredArgsConstructor; import org.springframework.stereotype.Repository; @@ -468,4 +470,14 @@ public class InferenceResultRepositoryImpl implements InferenceResultRepositoryC .where(mapSheetLearnEntity.uuid.eq(uuid)) .fetchOne(); } + + @Override + public Optional getInferenceUid(UUID uuid) { + return Optional.ofNullable( + queryFactory + .select(mapSheetLearnEntity) + .from(mapSheetLearnEntity) + .where(mapSheetLearnEntity.uuid.eq(uuid)) + .fetchOne()); + } } diff --git a/src/main/java/com/kamco/cd/kamcoback/postgres/repository/Inference/MapSheetLearnRepositoryImpl.java b/src/main/java/com/kamco/cd/kamcoback/postgres/repository/Inference/MapSheetLearnRepositoryImpl.java index a28a2c14..9038d6d5 100644 --- a/src/main/java/com/kamco/cd/kamcoback/postgres/repository/Inference/MapSheetLearnRepositoryImpl.java +++ b/src/main/java/com/kamco/cd/kamcoback/postgres/repository/Inference/MapSheetLearnRepositoryImpl.java @@ -2,6 +2,7 @@ package com.kamco.cd.kamcoback.postgres.repository.Inference; import static com.kamco.cd.kamcoback.postgres.entity.QGpuMetricEntity.gpuMetricEntity; import static com.kamco.cd.kamcoback.postgres.entity.QMapInkx5kEntity.mapInkx5kEntity; +import static com.kamco.cd.kamcoback.postgres.entity.QMapSheetAnalDataInferenceEntity.mapSheetAnalDataInferenceEntity; import static com.kamco.cd.kamcoback.postgres.entity.QMapSheetAnalDataInferenceGeomEntity.mapSheetAnalDataInferenceGeomEntity; import static com.kamco.cd.kamcoback.postgres.entity.QMapSheetAnalInferenceEntity.mapSheetAnalInferenceEntity; import static com.kamco.cd.kamcoback.postgres.entity.QMapSheetAnalSttcEntity.mapSheetAnalSttcEntity; @@ -419,13 +420,10 @@ public class MapSheetLearnRepositoryImpl implements MapSheetLearnRepositoryCusto // mapSheetAnalDataInferenceGeomEntity.geomCenter) )) .from(mapSheetAnalInferenceEntity) + .join(mapSheetAnalDataInferenceEntity) + .on(mapSheetAnalDataInferenceEntity.analUid.eq(mapSheetAnalInferenceEntity.id)) .join(mapSheetAnalDataInferenceGeomEntity) - .on( - mapSheetAnalDataInferenceGeomEntity.compareYyyy.eq( - mapSheetAnalInferenceEntity.compareYyyy), - mapSheetAnalDataInferenceGeomEntity.targetYyyy.eq( - mapSheetAnalInferenceEntity.targetYyyy), - mapSheetAnalDataInferenceGeomEntity.stage.eq(mapSheetAnalInferenceEntity.stage)) + .on(mapSheetAnalDataInferenceGeomEntity.dataUid.eq(mapSheetAnalDataInferenceEntity.id)) .join(mapInkx5kEntity) .on( mapSheetAnalDataInferenceGeomEntity.mapSheetNum.eq( @@ -440,13 +438,10 @@ public class MapSheetLearnRepositoryImpl implements MapSheetLearnRepositoryCusto queryFactory .select(mapSheetAnalDataInferenceGeomEntity.geoUid) .from(mapSheetAnalInferenceEntity) + .join(mapSheetAnalDataInferenceEntity) + .on(mapSheetAnalDataInferenceEntity.analUid.eq(mapSheetAnalInferenceEntity.id)) .join(mapSheetAnalDataInferenceGeomEntity) - .on( - mapSheetAnalDataInferenceGeomEntity.compareYyyy.eq( - mapSheetAnalInferenceEntity.compareYyyy), - mapSheetAnalDataInferenceGeomEntity.targetYyyy.eq( - mapSheetAnalInferenceEntity.targetYyyy), - mapSheetAnalDataInferenceGeomEntity.stage.eq(mapSheetAnalInferenceEntity.stage)) + .on(mapSheetAnalDataInferenceGeomEntity.dataUid.eq(mapSheetAnalDataInferenceEntity.id)) .join(mapInkx5kEntity) .on( mapSheetAnalDataInferenceGeomEntity.mapSheetNum.eq(