주석 추가, 패스워드변경 권한 수정
This commit is contained in:
@@ -340,6 +340,7 @@ public class InferenceResultApiController {
|
||||
}
|
||||
|
||||
/** 추론결과 화면에서 호출 */
|
||||
/** 다운로드는 a 링크로 받는걸로 변경되어 사번을 파라미터로 받아서 로그에 저장하는걸로 변경함 */
|
||||
@Operation(summary = "shp 파일 다운로드", description = "추론관리 분석결과 shp 파일 다운로드")
|
||||
@ApiResponses(
|
||||
value = {
|
||||
@@ -373,7 +374,6 @@ public class InferenceResultApiController {
|
||||
|
||||
Path zipPath = Path.of(path);
|
||||
|
||||
// Range + 200/206/416 공통 처리 (추가 헤더 포함)
|
||||
return rangeDownloadResponder.buildZipResponse(zipPath, uid + ".zip", request);
|
||||
}
|
||||
|
||||
|
||||
@@ -780,11 +780,17 @@ public class InferenceResultService {
|
||||
return inferenceResultCoreService.listGetScenes5k(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 추론 서버 현황 cpu, gpu 확인
|
||||
*
|
||||
* @return 서버 정보
|
||||
*/
|
||||
public List<InferenceServerStatusDto> getInferenceServerStatusList() {
|
||||
|
||||
String[] serverNames = inferenceServerName.split(",");
|
||||
int serveCnt = serverNames.length;
|
||||
|
||||
// 서버정보 조회
|
||||
List<InferenceServerStatusDto> dtoList =
|
||||
inferenceResultCoreService.getInferenceServerStatusList();
|
||||
int size = dtoList.size();
|
||||
@@ -794,6 +800,7 @@ public class InferenceResultService {
|
||||
System.out.println("size =" + size);
|
||||
|
||||
if (size == 0) {
|
||||
// 서버 정보가 없을때
|
||||
for (int k = 0; k < serveCnt; k++) {
|
||||
InferenceServerStatusDto dto = new InferenceServerStatusDto();
|
||||
dto.setServerName(serverNames[k]);
|
||||
@@ -861,17 +868,35 @@ public class InferenceResultService {
|
||||
return inferenceResultCoreService.getInferenceResultInfo(uuid);
|
||||
}
|
||||
|
||||
/**
|
||||
* 분류별 탐지건수 조회
|
||||
*
|
||||
* @param uuid 추론 uuid
|
||||
* @return 분류별 탐지건수 정보
|
||||
*/
|
||||
public List<Dashboard> getInferenceClassCountList(UUID uuid) {
|
||||
return inferenceResultCoreService.getInferenceClassCountList(uuid);
|
||||
}
|
||||
|
||||
/**
|
||||
* 추론결과 geom 목록 조회
|
||||
*
|
||||
* @param uuid 추론 uuid
|
||||
* @param searchGeoReq 추론 결과 상세화면 geom 조회 조건
|
||||
* @return geom 목록 정보
|
||||
*/
|
||||
public Page<Geom> getInferenceGeomList(UUID uuid, SearchGeoReq searchGeoReq) {
|
||||
return inferenceResultCoreService.getInferenceGeomList(uuid, searchGeoReq);
|
||||
}
|
||||
|
||||
/** 추론 종료 */
|
||||
/**
|
||||
* 추론 종료
|
||||
*
|
||||
* @return 호출한 uuid
|
||||
*/
|
||||
@Transactional
|
||||
public UUID deleteInferenceEnd() {
|
||||
// 추론 진행중인지 확인
|
||||
SaveInferenceAiDto dto = inferenceResultCoreService.getProcessing();
|
||||
if (dto == null) {
|
||||
throw new CustomApiException("NOT_FOUND", HttpStatus.NOT_FOUND);
|
||||
@@ -883,13 +908,15 @@ public class InferenceResultService {
|
||||
headers.setContentType(MediaType.APPLICATION_JSON);
|
||||
headers.setAccept(List.of(MediaType.APPLICATION_JSON));
|
||||
|
||||
// 종료 api 호출
|
||||
ExternalCallResult<String> result =
|
||||
externalHttpClient.call(url, HttpMethod.DELETE, dto, headers, String.class);
|
||||
externalHttpClient.callLong(url, HttpMethod.DELETE, dto, headers, String.class);
|
||||
|
||||
if (!result.success()) {
|
||||
throw new CustomApiException("BAD_GATEWAY", HttpStatus.BAD_GATEWAY);
|
||||
}
|
||||
|
||||
// 추론 정보 테이블 update
|
||||
SaveInferenceAiDto request = new SaveInferenceAiDto();
|
||||
request.setStatus(Status.FORCED_END.getId());
|
||||
request.setUuid(dto.getUuid());
|
||||
@@ -910,8 +937,11 @@ public class InferenceResultService {
|
||||
* @return 32자 추론 uid, shp 파일 경로
|
||||
*/
|
||||
public Map<String, Object> shpDownloadPath(UUID uuid) {
|
||||
// 추론정보 조회
|
||||
InferenceLearnDto dto = inferenceResultCoreService.getInferenceUid(uuid);
|
||||
String uid = dto.getUid();
|
||||
|
||||
// 파일 경로 생성
|
||||
Path path = Path.of(datasetDir).resolve(uid).resolve("merge").resolve(uid + ".zip");
|
||||
|
||||
Map<String, Object> downloadMap = new HashMap<>();
|
||||
|
||||
Reference in New Issue
Block a user