분류데이터셋 tif 바이너리화 API 추가
This commit is contained in:
@@ -236,21 +236,11 @@ public class DatasetClsApiController {
|
||||
return ApiResponseDto.okObject(datasetClsService.insertDataset(addReq));
|
||||
}
|
||||
|
||||
@Operation(summary = "객체별 파일 Path 조회", description = "파일 Path 조회")
|
||||
@Operation(summary = "분류데이터셋 객체별 파일 Path 조회", description = "파일 Path 조회")
|
||||
@GetMapping("/files")
|
||||
public ResponseEntity<Resource> getFile(@RequestParam UUID uuid, @RequestParam String pathType)
|
||||
throws Exception {
|
||||
public ResponseEntity<Resource> getFile(@RequestParam UUID uuid) throws Exception {
|
||||
|
||||
String path = datasetClsService.getFilePathByUUIDPathType(uuid, pathType);
|
||||
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);
|
||||
String path = datasetClsService.getFilePathByUUIDPathTif(uuid);
|
||||
return datasetClsService.getFilePathByFile(path);
|
||||
}
|
||||
|
||||
|
||||
@@ -818,4 +818,8 @@ public class DatasetClsService {
|
||||
"이미 등록된 회차 데이터 파일입니다. 확인 부탁드립니다.");
|
||||
}
|
||||
}
|
||||
|
||||
public String getFilePathByUUIDPathTif(UUID uuid) {
|
||||
return datasetClsCoreService.getFilePathByUUIDPathTif(uuid);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -275,4 +275,8 @@ public class DatasetClsCoreService
|
||||
public void insertDatasetClsObj(DatasetObjDto.DatasetClsObjRegDto objRegDto) {
|
||||
datasetClsRepository.insertDatasetClsObj(objRegDto);
|
||||
}
|
||||
|
||||
public String getFilePathByUUIDPathTif(UUID uuid) {
|
||||
return datasetClsRepository.getFilePathByUUIDPathType(uuid);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -43,4 +43,6 @@ public interface DatasetClsRepositoryCustom {
|
||||
Page<DatasetClsObjEntity> searchDatasetClsObjectList(DatasetClsObjDto.ClsSearchReq searchReq);
|
||||
|
||||
void insertDatasetClsObj(DatasetObjDto.DatasetClsObjRegDto objRegDto);
|
||||
|
||||
String getFilePathByUUIDPathType(UUID uuid);
|
||||
}
|
||||
|
||||
@@ -656,4 +656,13 @@ public class DatasetClsRepositoryImpl implements DatasetClsRepositoryCustom {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getFilePathByUUIDPathType(UUID uuid) {
|
||||
return queryFactory
|
||||
.select(datasetClsObjEntity.tifImgPath)
|
||||
.from(datasetClsObjEntity)
|
||||
.where(datasetClsObjEntity.uuid.eq(uuid))
|
||||
.fetchOne();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user