Merge pull request 'feat/infer_dev_260211' (#118) from feat/infer_dev_260211 into develop
Reviewed-on: #118
This commit was merged in pull request #118.
This commit is contained in:
@@ -69,8 +69,8 @@ public class GukYuinApiService {
|
||||
@Value("${file.nfs}")
|
||||
private String nfs;
|
||||
|
||||
// @Value("${file.dataset-dir}")
|
||||
// private String datasetDir;
|
||||
@Value("${inference.output-dir}")
|
||||
private String outputDir;
|
||||
|
||||
@Transactional
|
||||
public ChngDetectMastDto.RegistResDto regist(
|
||||
@@ -456,10 +456,11 @@ public class GukYuinApiService {
|
||||
return new ResponseObj(ApiResponseCode.DUPLICATE_DATA, "이미 국유인 연동을 한 회차입니다.");
|
||||
}
|
||||
|
||||
// String kamconfsDatasetExportPathfsDatasetExportPath = "/kamco-nfs/dataset/export/";
|
||||
String kamconfsDatasetExportPathfsDatasetExportPath =
|
||||
String.format("%s%s", nfs, "/dataset/export/");
|
||||
if (!Files.isDirectory(Path.of(kamconfsDatasetExportPathfsDatasetExportPath + info.getUid()))) {
|
||||
// 추론 shp 파일 생성되는 위치
|
||||
String kamconfsDatasetExportPathfsDatasetExportPath = outputDir;
|
||||
log.info("outputDir path : " + kamconfsDatasetExportPathfsDatasetExportPath);
|
||||
if (!Files.isDirectory(
|
||||
Path.of(kamconfsDatasetExportPathfsDatasetExportPath + "/" + info.getUid()))) {
|
||||
return new ResponseObj(
|
||||
ApiResponseCode.NOT_FOUND_DATA, "파일 경로에 회차 실행 파일이 생성되지 않았습니다. 확인 부탁드립니다.");
|
||||
}
|
||||
@@ -474,7 +475,7 @@ public class GukYuinApiService {
|
||||
reqDto.setCrtrYr(String.valueOf(info.getTargetYyyy()));
|
||||
reqDto.setChnDtctSno(String.valueOf(maxStage + 1));
|
||||
reqDto.setChnDtctId(info.getUid());
|
||||
reqDto.setPathNm(kamconfsDatasetExportPathfsDatasetExportPath + info.getUid());
|
||||
reqDto.setPathNm(kamconfsDatasetExportPathfsDatasetExportPath + "/" + info.getUid());
|
||||
|
||||
// 1회차를 종료 상태로 처리하고 2회차를 보내야 함
|
||||
// 추론(learn), 학습데이터(inference) 둘 다 종료 처리
|
||||
|
||||
@@ -1,14 +1,10 @@
|
||||
package com.kamco.cd.kamcoback.mapsheet;
|
||||
|
||||
import com.kamco.cd.kamcoback.code.dto.CommonCodeDto;
|
||||
import com.kamco.cd.kamcoback.code.service.CommonCodeService;
|
||||
import com.kamco.cd.kamcoback.config.api.ApiResponseDto;
|
||||
import com.kamco.cd.kamcoback.mapsheet.dto.FileDto.FilesDto;
|
||||
import com.kamco.cd.kamcoback.mapsheet.dto.FileDto.FoldersDto;
|
||||
import com.kamco.cd.kamcoback.mapsheet.dto.FileDto.SrchFilesDto;
|
||||
import com.kamco.cd.kamcoback.mapsheet.dto.FileDto.SrchFoldersDto;
|
||||
import com.kamco.cd.kamcoback.mapsheet.dto.MapSheetMngDto;
|
||||
import com.kamco.cd.kamcoback.mapsheet.dto.MapSheetMngDto.MngYyyyDto;
|
||||
import com.kamco.cd.kamcoback.mapsheet.service.MapSheetMngService;
|
||||
import com.kamco.cd.kamcoback.model.dto.ModelMngDto.ModelUploadResDto;
|
||||
import com.kamco.cd.kamcoback.upload.dto.UploadDto;
|
||||
@@ -42,7 +38,6 @@ import org.springframework.web.multipart.MultipartFile;
|
||||
@RequestMapping({"/api/imagery/dataset"})
|
||||
public class MapSheetMngApiController {
|
||||
|
||||
private final CommonCodeService commonCodeService;
|
||||
private final MapSheetMngService mapSheetMngService;
|
||||
|
||||
@Value("${file.sync-root-dir}")
|
||||
@@ -51,7 +46,7 @@ public class MapSheetMngApiController {
|
||||
@Value("${file.sync-tmp-dir}")
|
||||
private String syncRootTmpDir;
|
||||
|
||||
@Operation(summary = "영상 데이터 관리 목록 조회", description = "영상 데이터 관리 목록 조회")
|
||||
@Operation(summary = "영상데이터관리 > 목록 조회", description = "영상데이터관리 > 목록 조회")
|
||||
@ApiResponses(
|
||||
value = {
|
||||
@ApiResponse(
|
||||
@@ -70,7 +65,7 @@ public class MapSheetMngApiController {
|
||||
return ApiResponseDto.ok(mapSheetMngService.findMapSheetMngList());
|
||||
}
|
||||
|
||||
@Operation(summary = "영상 데이터 관리 상세", description = "영상 데이터 관리 상세")
|
||||
@Operation(summary = "영상데이터관리 > 상세 조회", description = "영상데이터관리 > 상세 조회")
|
||||
@ApiResponses(
|
||||
value = {
|
||||
@ApiResponse(
|
||||
@@ -89,7 +84,7 @@ public class MapSheetMngApiController {
|
||||
return ApiResponseDto.ok(mapSheetMngService.findMapSheetMng(mngYyyy));
|
||||
}
|
||||
|
||||
@Operation(summary = "영상관리 > 데이터 등록", description = "영상관리 > 데이터 등록")
|
||||
@Operation(summary = "영상데이터관리 > 데이터 등록", description = "영상데이터관리 > 데이터 등록")
|
||||
@ApiResponses(
|
||||
value = {
|
||||
@ApiResponse(
|
||||
@@ -109,26 +104,7 @@ public class MapSheetMngApiController {
|
||||
return ApiResponseDto.ok(mapSheetMngService.mngDataSave(AddReq));
|
||||
}
|
||||
|
||||
@Operation(summary = "영상관리 > 작업완료", description = "영상관리 > 작업완료")
|
||||
@ApiResponses(
|
||||
value = {
|
||||
@ApiResponse(
|
||||
responseCode = "201",
|
||||
description = "작업완료 처리 성공",
|
||||
content =
|
||||
@Content(
|
||||
mediaType = "application/json",
|
||||
schema = @Schema(implementation = Long.class))),
|
||||
@ApiResponse(responseCode = "400", description = "잘못된 요청 데이터", content = @Content),
|
||||
@ApiResponse(responseCode = "404", description = "코드를 찾을 수 없음", content = @Content),
|
||||
@ApiResponse(responseCode = "500", description = "서버 오류", content = @Content)
|
||||
})
|
||||
@PutMapping("/mng-complete")
|
||||
public ApiResponseDto<MapSheetMngDto.DmlReturn> mngComplete(@RequestParam @Valid int mngYyyy) {
|
||||
return ApiResponseDto.ok(mapSheetMngService.mngComplete(mngYyyy));
|
||||
}
|
||||
|
||||
@Operation(summary = "영상 데이터 관리 년도 목록", description = "영상 데이터 관리 년도 목록")
|
||||
@Operation(summary = "영상데이터관리 > 데이터 등록 > 연도 선택 목록", description = "영상데이터관리 > 데이터 등록 > 연도 선택 목록")
|
||||
@ApiResponses(
|
||||
value = {
|
||||
@ApiResponse(
|
||||
@@ -147,7 +123,7 @@ public class MapSheetMngApiController {
|
||||
return ApiResponseDto.ok(mapSheetMngService.findMapSheetMngYyyyList());
|
||||
}
|
||||
|
||||
@Operation(summary = "영상 데이터 관리 오류 목록", description = "영상 데이터 관리 오류 목록")
|
||||
@Operation(summary = "영상데이터관리 > 상세 > 오류 처리 내역", description = "영상데이터관리 > 상세 > 오류 처리 내역")
|
||||
@ApiResponses(
|
||||
value = {
|
||||
@ApiResponse(
|
||||
@@ -166,42 +142,9 @@ public class MapSheetMngApiController {
|
||||
return ApiResponseDto.ok(mapSheetMngService.findMapSheetErrorList(searchReq));
|
||||
}
|
||||
|
||||
/*
|
||||
@Operation(summary = "오류데이터 팝업 > 업로드 처리", description = "오류데이터 팝업 > 업로드 처리")
|
||||
@ApiResponses(
|
||||
value = {
|
||||
@ApiResponse(
|
||||
responseCode = "201",
|
||||
description = "업로드 처리 성공",
|
||||
content =
|
||||
@Content(
|
||||
mediaType = "application/json",
|
||||
schema = @Schema(implementation = Long.class))),
|
||||
@ApiResponse(responseCode = "400", description = "잘못된 요청 데이터", content = @Content),
|
||||
@ApiResponse(responseCode = "404", description = "코드를 찾을 수 없음", content = @Content),
|
||||
@ApiResponse(responseCode = "500", description = "서버 오류", content = @Content)
|
||||
})
|
||||
@PutMapping("/upload-process")
|
||||
public ApiResponseDto<MapSheetMngDto.DmlReturn> uploadProcess(
|
||||
@RequestBody @Valid List<Long> hstUidList) {
|
||||
return ApiResponseDto.ok(mapSheetMngService.uploadProcess(hstUidList));
|
||||
}
|
||||
|
||||
*/
|
||||
|
||||
/*
|
||||
@Operation(summary = "오류데이터 팝업 > 추론 제외", description = "오류데이터 팝업 > 추론 제외")
|
||||
@PutMapping("/except-inference")
|
||||
public ApiResponseDto<MapSheetMngDto.DmlReturn> updateExceptUseInference(
|
||||
@RequestBody @Valid List<Long> hstUidList) {
|
||||
return ApiResponseDto.ok(mapSheetMngService.updateExceptUseInference(hstUidList));
|
||||
}
|
||||
|
||||
|
||||
|
||||
*/
|
||||
|
||||
@Operation(summary = "페어 파일 업로드", description = "TFW/TIF 두 파일을 쌍으로 업로드 및 검증")
|
||||
@Operation(
|
||||
summary = "영상데이터관리 > 상세 > 오류 처리 내역 > 업로드 (페어 파일 저장)",
|
||||
description = "영상데이터관리 > 상세 > 오류 처리 내역 > 업로드 (페어 파일 저장)")
|
||||
@PostMapping(value = "/upload-pair", consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
|
||||
public ApiResponseDto<MapSheetMngDto.DmlReturn> uploadPair(
|
||||
@RequestPart("tfw") MultipartFile tfwFile,
|
||||
@@ -213,7 +156,9 @@ public class MapSheetMngApiController {
|
||||
mapSheetMngService.uploadPair(tfwFile, tifFile, hstUid, tifFileSize));
|
||||
}
|
||||
|
||||
@Operation(summary = "영상관리 > 파일조회", description = "영상관리 > 파일조회")
|
||||
@Operation(
|
||||
summary = "영상데이터관리 > 상세 > 오류 처리 내역 > 중복제거 > 팝업 내 해당 파일조회",
|
||||
description = "영상데이터관리 > 상세 > 오류 처리 내역 > 중복제거 > 팝업 내 해당 파일조회")
|
||||
@ApiResponses(
|
||||
value = {
|
||||
@ApiResponse(
|
||||
@@ -234,13 +179,13 @@ public class MapSheetMngApiController {
|
||||
}
|
||||
|
||||
@Operation(
|
||||
summary = "영상관리 > 파일사용설정 및 중복제거",
|
||||
description = "영상관리 >파일사용설정 및 중복제거(중복파일제거 및 선택파일사용설정)")
|
||||
summary = "영상데이터관리 > 상세 > 오류 처리 내역 > 중복제거 업데이트",
|
||||
description = "영상데이터관리 > 상세 > 오류 처리 내역 > 중복제거 업데이트")
|
||||
@ApiResponses(
|
||||
value = {
|
||||
@ApiResponse(
|
||||
responseCode = "201",
|
||||
description = "파일사용설정 처리 성공",
|
||||
description = "중복제거 업데이트 처리 성공",
|
||||
content =
|
||||
@Content(
|
||||
mediaType = "application/json",
|
||||
@@ -255,7 +200,7 @@ public class MapSheetMngApiController {
|
||||
return ApiResponseDto.ok(mapSheetMngService.setUseByFileUidMngFile(fileUids));
|
||||
}
|
||||
|
||||
@Operation(summary = "폴더 조회", description = "폴더 조회 (ROOT:/app/original-images 이하로 경로입력)")
|
||||
@Operation(summary = "영상데이터관리 > 데이터 등록 > NAS 폴더 선택", description = "영상데이터관리 > 데이터 등록 > NAS 폴더 선택")
|
||||
@ApiResponses(
|
||||
value = {
|
||||
@ApiResponse(
|
||||
@@ -274,45 +219,9 @@ public class MapSheetMngApiController {
|
||||
return ApiResponseDto.createOK(mapSheetMngService.getFolderAll(srchDto));
|
||||
}
|
||||
|
||||
@Operation(summary = "지정폴더내 파일목록 조회", description = "지정폴더내 파일목록 조회")
|
||||
@ApiResponses(
|
||||
value = {
|
||||
@ApiResponse(
|
||||
responseCode = "200",
|
||||
description = "조회 성공",
|
||||
content =
|
||||
@Content(
|
||||
mediaType = "application/json",
|
||||
schema = @Schema(implementation = CommonCodeDto.Basic.class))),
|
||||
@ApiResponse(responseCode = "404", description = "코드를 찾을 수 없음", content = @Content),
|
||||
@ApiResponse(responseCode = "500", description = "서버 오류", content = @Content)
|
||||
})
|
||||
@PostMapping("/file-list")
|
||||
public ApiResponseDto<FilesDto> getFiles(@RequestBody SrchFilesDto srchDto) {
|
||||
|
||||
return ApiResponseDto.createOK(mapSheetMngService.getFilesAll(srchDto));
|
||||
}
|
||||
|
||||
@Operation(summary = "영상 데이터 관리 완료 년도 목록 조회", description = "영상 데이터 관리 완료 년도 목록 조회")
|
||||
@ApiResponses(
|
||||
value = {
|
||||
@ApiResponse(
|
||||
responseCode = "200",
|
||||
description = "조회 성공",
|
||||
content =
|
||||
@Content(
|
||||
mediaType = "application/json",
|
||||
schema = @Schema(implementation = CommonCodeDto.Basic.class))),
|
||||
@ApiResponse(responseCode = "404", description = "코드를 찾을 수 없음", content = @Content),
|
||||
@ApiResponse(responseCode = "500", description = "서버 오류", content = @Content)
|
||||
})
|
||||
@PostMapping("/mng-done-yyyy-list")
|
||||
public ApiResponseDto<List<MngYyyyDto>> findMapSheetMngDoneYyyyList() {
|
||||
|
||||
return ApiResponseDto.ok(mapSheetMngService.findMapSheetMngDoneYyyyList());
|
||||
}
|
||||
|
||||
@Operation(summary = "영상 tif 대용량 파일 분할 전송", description = "영상 tif 파일 대용량 파일을 청크 단위로 전송합니다.")
|
||||
@Operation(
|
||||
summary = "영상데이터관리 > 상세 > 오류 처리 내역 > 업로드 (영상 tif 대용량 파일 분할 전송)",
|
||||
description = "영상데이터관리 > 상세 > 오류 처리 내역 > 업로드 (영상 tif 대용량 파일 분할 전송)")
|
||||
@ApiResponses(
|
||||
value = {
|
||||
@ApiResponse(responseCode = "200", description = "청크 업로드 성공", content = @Content),
|
||||
|
||||
@@ -283,7 +283,7 @@ public class InferenceResultCoreService {
|
||||
.distinct() // 중복 방지 (선택)
|
||||
.toList();
|
||||
|
||||
// testing 추론결과 테이블 조회하여 탐지 개수 업데이트
|
||||
// testing 테이블 추론결과 테이블 조회하여 탐지 개수 업데이트
|
||||
Long testing = getInferenceResultCnt(batchIds);
|
||||
|
||||
// 공통 영역 업데이트
|
||||
@@ -535,6 +535,12 @@ public class InferenceResultCoreService {
|
||||
return list.stream().map(InferenceResultsTestingEntity::toDto).toList();
|
||||
}
|
||||
|
||||
/**
|
||||
* 테스팅 테이블 조회하여 탐지건수 조회
|
||||
*
|
||||
* @param batchIds batchIds
|
||||
* @return batchIds 조회 count 수
|
||||
*/
|
||||
public Long getInferenceResultCnt(List<Long> batchIds) {
|
||||
return inferenceResultsTestingRepository.getInferenceResultCnt(batchIds);
|
||||
}
|
||||
|
||||
@@ -7,5 +7,11 @@ public interface InferenceResultsTestingRepositoryCustom {
|
||||
|
||||
List<InferenceResultsTestingEntity> getInferenceResultList(List<Long> batchIds);
|
||||
|
||||
/**
|
||||
* 테스팅 테이블 조회하여 탐지건수 조회
|
||||
*
|
||||
* @param batchIds batchIds
|
||||
* @return batchIds 조회 count 수
|
||||
*/
|
||||
Long getInferenceResultCnt(List<Long> batchIds);
|
||||
}
|
||||
|
||||
@@ -59,6 +59,8 @@ public class MapInkxMngApiController {
|
||||
mapInkxMngService.findMapInkxMngList(searchReq, useInference, searchVal));
|
||||
}
|
||||
|
||||
// 미사용 : 기획에서 도엽정보 등록 로직 제거됨
|
||||
@Hidden
|
||||
@Operation(summary = "저장", description = "도엽정보를 저장 합니다.")
|
||||
@ApiResponses(
|
||||
value = {
|
||||
|
||||
@@ -101,6 +101,7 @@ inference:
|
||||
batch-url: http://192.168.2.183:8000/batches
|
||||
jar-path: ${inference.nfs}/repo/jar/shp-exporter.jar
|
||||
inference-server-name: server1,server2,server3,server4
|
||||
output-dir: ${inference.nfs}/model_output/export
|
||||
|
||||
gukyuin:
|
||||
#url: http://localhost:8080
|
||||
|
||||
@@ -95,6 +95,7 @@ inference:
|
||||
batch-url: http://172.16.4.56:8000/batches
|
||||
jar-path: ${inference.nfs}/repo/jar/shp-exporter.jar
|
||||
inference-server-name: server1,server2,server3,server4
|
||||
output-dir: ${inference.nfs}/model_output/export
|
||||
|
||||
gukyuin:
|
||||
url: http://127.0.0.1:5301
|
||||
|
||||
Reference in New Issue
Block a user