분류데이터셋 tif 바이너리화 API 추가

This commit is contained in:
2026-07-20 17:07:13 +09:00
parent 9b1bd16d1b
commit 96dd76101b
5 changed files with 22 additions and 13 deletions

View File

@@ -236,21 +236,11 @@ public class DatasetClsApiController {
return ApiResponseDto.okObject(datasetClsService.insertDataset(addReq)); return ApiResponseDto.okObject(datasetClsService.insertDataset(addReq));
} }
@Operation(summary = "객체별 파일 Path 조회", description = "파일 Path 조회") @Operation(summary = "분류데이터셋 객체별 파일 Path 조회", description = "파일 Path 조회")
@GetMapping("/files") @GetMapping("/files")
public ResponseEntity<Resource> getFile(@RequestParam UUID uuid, @RequestParam String pathType) public ResponseEntity<Resource> getFile(@RequestParam UUID uuid) throws Exception {
throws Exception {
String path = datasetClsService.getFilePathByUUIDPathType(uuid, pathType); String path = datasetClsService.getFilePathByUUIDPathTif(uuid);
return datasetClsService.getFilePathByFile(path);
}
@Operation(summary = "객체별 파일 Path 조회", description = "파일 Path 조회")
@GetMapping("/files-to86")
public ResponseEntity<Resource> getFileTo86(
@RequestParam UUID uuid, @RequestParam String pathType) throws Exception {
String path = datasetClsService.getFilePathByUUIDPathType(uuid, pathType);
return datasetClsService.getFilePathByFile(path); return datasetClsService.getFilePathByFile(path);
} }

View File

@@ -818,4 +818,8 @@ public class DatasetClsService {
"이미 등록된 회차 데이터 파일입니다. 확인 부탁드립니다."); "이미 등록된 회차 데이터 파일입니다. 확인 부탁드립니다.");
} }
} }
public String getFilePathByUUIDPathTif(UUID uuid) {
return datasetClsCoreService.getFilePathByUUIDPathTif(uuid);
}
} }

View File

@@ -275,4 +275,8 @@ public class DatasetClsCoreService
public void insertDatasetClsObj(DatasetObjDto.DatasetClsObjRegDto objRegDto) { public void insertDatasetClsObj(DatasetObjDto.DatasetClsObjRegDto objRegDto) {
datasetClsRepository.insertDatasetClsObj(objRegDto); datasetClsRepository.insertDatasetClsObj(objRegDto);
} }
public String getFilePathByUUIDPathTif(UUID uuid) {
return datasetClsRepository.getFilePathByUUIDPathType(uuid);
}
} }

View File

@@ -43,4 +43,6 @@ public interface DatasetClsRepositoryCustom {
Page<DatasetClsObjEntity> searchDatasetClsObjectList(DatasetClsObjDto.ClsSearchReq searchReq); Page<DatasetClsObjEntity> searchDatasetClsObjectList(DatasetClsObjDto.ClsSearchReq searchReq);
void insertDatasetClsObj(DatasetObjDto.DatasetClsObjRegDto objRegDto); void insertDatasetClsObj(DatasetObjDto.DatasetClsObjRegDto objRegDto);
String getFilePathByUUIDPathType(UUID uuid);
} }

View File

@@ -656,4 +656,13 @@ public class DatasetClsRepositoryImpl implements DatasetClsRepositoryCustom {
throw new RuntimeException(e); throw new RuntimeException(e);
} }
} }
@Override
public String getFilePathByUUIDPathType(UUID uuid) {
return queryFactory
.select(datasetClsObjEntity.tifImgPath)
.from(datasetClsObjEntity)
.where(datasetClsObjEntity.uuid.eq(uuid))
.fetchOne();
}
} }