shp 파일 생성 수정

This commit is contained in:
2026-01-16 18:22:56 +09:00
parent 74cbfb362c
commit 161e774860
3 changed files with 26 additions and 1 deletions

View File

@@ -1,5 +1,7 @@
package com.kamco.cd.kamcoback.common.service;
import com.kamco.cd.kamcoback.inference.dto.InferenceResultsTestingDto;
import com.kamco.cd.kamcoback.postgres.core.InferenceResultCoreService;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.nio.charset.StandardCharsets;
@@ -15,7 +17,28 @@ import org.springframework.stereotype.Component;
@RequiredArgsConstructor
public class ExternalJarRunner {
private final InferenceResultCoreService inferenceResultCoreService;
public void run(String jarPath, String batchIds, String inferenceId, String mapIds) {
List<Long> batch = new ArrayList<>();
batch.add(285L);
batch.add(286L);
batch.add(287L);
List<InferenceResultsTestingDto.ShpDto> resultList =
inferenceResultCoreService.getInferenceResults(batch);
StringBuilder sb = new StringBuilder();
mapIds = sb.toString();
for (InferenceResultsTestingDto.ShpDto dto : resultList) {
if (dto.getMapId() == null) {
continue;
}
if (!sb.isEmpty()) {
sb.append(",");
}
sb.append("\"").append(dto.getMapId()).append("\"");
}
StringBuilder out = new StringBuilder();
try {