spotless 적용
This commit is contained in:
@@ -44,53 +44,53 @@ public class InferenceResultApiController {
|
|||||||
|
|
||||||
@Operation(summary = "추론관리 목록", description = "어드민 홈 > 추론관리 > 추론관리 > 추론관리 목록")
|
@Operation(summary = "추론관리 목록", description = "어드민 홈 > 추론관리 > 추론관리 > 추론관리 목록")
|
||||||
@ApiResponses(
|
@ApiResponses(
|
||||||
value = {
|
value = {
|
||||||
@ApiResponse(
|
@ApiResponse(
|
||||||
responseCode = "200",
|
responseCode = "200",
|
||||||
description = "검색 성공",
|
description = "검색 성공",
|
||||||
content =
|
content =
|
||||||
@Content(
|
@Content(
|
||||||
mediaType = "application/json",
|
mediaType = "application/json",
|
||||||
schema = @Schema(implementation = Page.class))),
|
schema = @Schema(implementation = Page.class))),
|
||||||
@ApiResponse(responseCode = "400", description = "잘못된 검색 조건", content = @Content),
|
@ApiResponse(responseCode = "400", description = "잘못된 검색 조건", content = @Content),
|
||||||
@ApiResponse(responseCode = "500", description = "서버 오류", content = @Content)
|
@ApiResponse(responseCode = "500", description = "서버 오류", content = @Content)
|
||||||
})
|
})
|
||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
public ApiResponseDto<Page<ResultList>> getInferenceResultList(
|
public ApiResponseDto<Page<ResultList>> getInferenceResultList(
|
||||||
@Parameter(description = "국유인 반영 여부", example = "Y") @RequestParam(required = false)
|
@Parameter(description = "국유인 반영 여부", example = "Y") @RequestParam(required = false)
|
||||||
String applyYn,
|
String applyYn,
|
||||||
@Parameter(description = "반영일", example = "2025-01-01") @RequestParam(required = false)
|
@Parameter(description = "반영일", example = "2025-01-01") @RequestParam(required = false)
|
||||||
LocalDate strtDttm,
|
LocalDate strtDttm,
|
||||||
@Parameter(description = "반영일", example = "2026-01-01") @RequestParam(required = false)
|
@Parameter(description = "반영일", example = "2026-01-01") @RequestParam(required = false)
|
||||||
LocalDate endDttm,
|
LocalDate endDttm,
|
||||||
@Parameter(description = "제목", example = "변화탐지") @RequestParam(required = false) String title,
|
@Parameter(description = "제목", example = "변화탐지") @RequestParam(required = false) String title,
|
||||||
@Parameter(description = "페이지 번호 (0부터 시작)", example = "0") @RequestParam(defaultValue = "0")
|
@Parameter(description = "페이지 번호 (0부터 시작)", example = "0") @RequestParam(defaultValue = "0")
|
||||||
int page,
|
int page,
|
||||||
@Parameter(description = "페이지 크기", example = "20") @RequestParam(defaultValue = "20")
|
@Parameter(description = "페이지 크기", example = "20") @RequestParam(defaultValue = "20")
|
||||||
int size) {
|
int size) {
|
||||||
InferenceResultDto.SearchListReq req =
|
InferenceResultDto.SearchListReq req =
|
||||||
new InferenceResultDto.SearchListReq(applyYn, strtDttm, endDttm, title, page, size);
|
new InferenceResultDto.SearchListReq(applyYn, strtDttm, endDttm, title, page, size);
|
||||||
Page<ResultList> analResList = inferenceResultService.getInferenceResultList(req);
|
Page<ResultList> analResList = inferenceResultService.getInferenceResultList(req);
|
||||||
return ApiResponseDto.ok(analResList);
|
return ApiResponseDto.ok(analResList);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Operation(summary = "추론 진행 여부 확인", description = "어드민 홈 > 추론관리 > 추론관리 > 추론관리 목록")
|
@Operation(summary = "추론 진행 여부 확인", description = "어드민 홈 > 추론관리 > 추론관리 > 추론관리 목록")
|
||||||
@ApiResponses(
|
@ApiResponses(
|
||||||
value = {
|
value = {
|
||||||
@ApiResponse(
|
@ApiResponse(
|
||||||
responseCode = "200",
|
responseCode = "200",
|
||||||
description = "검색 성공",
|
description = "검색 성공",
|
||||||
content =
|
content =
|
||||||
@Content(
|
@Content(
|
||||||
mediaType = "application/json",
|
mediaType = "application/json",
|
||||||
schema =
|
schema =
|
||||||
@Schema(
|
@Schema(
|
||||||
description = "진행 여부 (UUID 있으면 진행중)",
|
description = "진행 여부 (UUID 있으면 진행중)",
|
||||||
type = "UUID",
|
type = "UUID",
|
||||||
example = "44709877-2e27-4fc5-bacb-8e0328c69b64"))),
|
example = "44709877-2e27-4fc5-bacb-8e0328c69b64"))),
|
||||||
@ApiResponse(responseCode = "400", description = "잘못된 검색 조건", content = @Content),
|
@ApiResponse(responseCode = "400", description = "잘못된 검색 조건", content = @Content),
|
||||||
@ApiResponse(responseCode = "500", description = "서버 오류", content = @Content)
|
@ApiResponse(responseCode = "500", description = "서버 오류", content = @Content)
|
||||||
})
|
})
|
||||||
@GetMapping("/processing-yn")
|
@GetMapping("/processing-yn")
|
||||||
public ApiResponseDto<UUID> getProcessing() {
|
public ApiResponseDto<UUID> getProcessing() {
|
||||||
return ApiResponseDto.ok(inferenceResultService.getProcessing());
|
return ApiResponseDto.ok(inferenceResultService.getProcessing());
|
||||||
@@ -98,17 +98,17 @@ public class InferenceResultApiController {
|
|||||||
|
|
||||||
@Operation(summary = "년도 목록 조회", description = "어드민 홈 > 추론관리 > 추론목록 > 변화탐지 실행 정보 입력 > 년도 목록 조회")
|
@Operation(summary = "년도 목록 조회", description = "어드민 홈 > 추론관리 > 추론목록 > 변화탐지 실행 정보 입력 > 년도 목록 조회")
|
||||||
@ApiResponses(
|
@ApiResponses(
|
||||||
value = {
|
value = {
|
||||||
@ApiResponse(
|
@ApiResponse(
|
||||||
responseCode = "200",
|
responseCode = "200",
|
||||||
description = "조회 성공",
|
description = "조회 성공",
|
||||||
content =
|
content =
|
||||||
@Content(
|
@Content(
|
||||||
mediaType = "application/json",
|
mediaType = "application/json",
|
||||||
array = @ArraySchema(schema = @Schema(implementation = Integer.class)))),
|
array = @ArraySchema(schema = @Schema(implementation = Integer.class)))),
|
||||||
@ApiResponse(responseCode = "404", description = "코드를 찾을 수 없음", content = @Content),
|
@ApiResponse(responseCode = "404", description = "코드를 찾을 수 없음", content = @Content),
|
||||||
@ApiResponse(responseCode = "500", description = "서버 오류", content = @Content)
|
@ApiResponse(responseCode = "500", description = "서버 오류", content = @Content)
|
||||||
})
|
})
|
||||||
@GetMapping("/years")
|
@GetMapping("/years")
|
||||||
public ApiResponseDto<List<Integer>> findMapSheetMngDoneYyyyList() {
|
public ApiResponseDto<List<Integer>> findMapSheetMngDoneYyyyList() {
|
||||||
return ApiResponseDto.ok(mapSheetMngService.findMapSheetMngDoneYyyyList());
|
return ApiResponseDto.ok(mapSheetMngService.findMapSheetMngDoneYyyyList());
|
||||||
@@ -116,57 +116,57 @@ public class InferenceResultApiController {
|
|||||||
|
|
||||||
@Operation(summary = "변화탐지 실행 정보 입력", description = "어드민 홈 > 추론관리 > 추론목록 > 변화탐지 실행 정보 입력")
|
@Operation(summary = "변화탐지 실행 정보 입력", description = "어드민 홈 > 추론관리 > 추론목록 > 변화탐지 실행 정보 입력")
|
||||||
@ApiResponses(
|
@ApiResponses(
|
||||||
value = {
|
value = {
|
||||||
@ApiResponse(
|
@ApiResponse(
|
||||||
responseCode = "201",
|
responseCode = "201",
|
||||||
description = "변화탐지 실행 정보 생성 성공",
|
description = "변화탐지 실행 정보 생성 성공",
|
||||||
content =
|
content =
|
||||||
@Content(
|
@Content(
|
||||||
mediaType = "application/json",
|
mediaType = "application/json",
|
||||||
schema = @Schema(description = "저장 uuid", implementation = UUID.class))),
|
schema = @Schema(description = "저장 uuid", implementation = UUID.class))),
|
||||||
@ApiResponse(responseCode = "400", description = "잘못된 요청 데이터", content = @Content),
|
@ApiResponse(responseCode = "400", description = "잘못된 요청 데이터", content = @Content),
|
||||||
@ApiResponse(responseCode = "500", description = "서버 오류", content = @Content)
|
@ApiResponse(responseCode = "500", description = "서버 오류", content = @Content)
|
||||||
})
|
})
|
||||||
@PostMapping("/reg")
|
@PostMapping("/reg")
|
||||||
public ApiResponseDto<UUID> saveInferenceInfo(
|
public ApiResponseDto<UUID> saveInferenceInfo(
|
||||||
@io.swagger.v3.oas.annotations.parameters.RequestBody(
|
@io.swagger.v3.oas.annotations.parameters.RequestBody(
|
||||||
description = "변화탐지 실행 정보 저장 요청 정보",
|
description = "변화탐지 실행 정보 저장 요청 정보",
|
||||||
required = true)
|
required = true)
|
||||||
@RequestBody
|
@RequestBody
|
||||||
@Valid
|
@Valid
|
||||||
InferenceResultDto.RegReq req) {
|
InferenceResultDto.RegReq req) {
|
||||||
UUID uuid = inferenceResultService.saveInferenceInfo(req);
|
UUID uuid = inferenceResultService.saveInferenceInfo(req);
|
||||||
return ApiResponseDto.ok(uuid);
|
return ApiResponseDto.ok(uuid);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Operation(summary = "분석 모델 선택 조회", description = "변화탐지 실행 정보 입력 모델선택 팝업 ")
|
@Operation(summary = "분석 모델 선택 조회", description = "변화탐지 실행 정보 입력 모델선택 팝업 ")
|
||||||
@ApiResponses(
|
@ApiResponses(
|
||||||
value = {
|
value = {
|
||||||
@ApiResponse(
|
@ApiResponse(
|
||||||
responseCode = "200",
|
responseCode = "200",
|
||||||
description = "분석 모델 조회 성공",
|
description = "분석 모델 조회 성공",
|
||||||
content =
|
content =
|
||||||
@Content(
|
@Content(
|
||||||
mediaType = "application/json",
|
mediaType = "application/json",
|
||||||
schema = @Schema(description = "분석 모델", implementation = Page.class))),
|
schema = @Schema(description = "분석 모델", implementation = Page.class))),
|
||||||
@ApiResponse(responseCode = "404", description = "코드를 찾을 수 없음", content = @Content),
|
@ApiResponse(responseCode = "404", description = "코드를 찾을 수 없음", content = @Content),
|
||||||
@ApiResponse(responseCode = "500", description = "서버 오류", content = @Content)
|
@ApiResponse(responseCode = "500", description = "서버 오류", content = @Content)
|
||||||
})
|
})
|
||||||
@GetMapping("/model")
|
@GetMapping("/model")
|
||||||
public ApiResponseDto<Page<ModelMngDto.ModelList>> saveInferenceInfo(
|
public ApiResponseDto<Page<ModelMngDto.ModelList>> saveInferenceInfo(
|
||||||
@Parameter(description = "모델 생성일 시작", example = "2025-12-01") @RequestParam(required = false)
|
@Parameter(description = "모델 생성일 시작", example = "2025-12-01") @RequestParam(required = false)
|
||||||
LocalDate strtDttm,
|
LocalDate strtDttm,
|
||||||
@Parameter(description = "모델 생성일 종료", example = "2026-01-09") @RequestParam(required = false)
|
@Parameter(description = "모델 생성일 종료", example = "2026-01-09") @RequestParam(required = false)
|
||||||
LocalDate endDttm,
|
LocalDate endDttm,
|
||||||
@Parameter(description = "키워드 (모델버전)", example = "M1.H1.E28") @RequestParam(required = false)
|
@Parameter(description = "키워드 (모델버전)", example = "M1.H1.E28") @RequestParam(required = false)
|
||||||
String searchVal,
|
String searchVal,
|
||||||
@Parameter(description = "타입", example = "M1") @RequestParam(required = false)
|
@Parameter(description = "타입", example = "M1") @RequestParam(required = false)
|
||||||
String modelType,
|
String modelType,
|
||||||
@RequestParam(defaultValue = "0") int page,
|
@RequestParam(defaultValue = "0") int page,
|
||||||
@RequestParam(defaultValue = "20") int size) {
|
@RequestParam(defaultValue = "20") int size) {
|
||||||
ModelMngDto.searchReq searchReq = new ModelMngDto.searchReq(page, size, null);
|
ModelMngDto.searchReq searchReq = new ModelMngDto.searchReq(page, size, null);
|
||||||
Page<ModelMngDto.ModelList> result =
|
Page<ModelMngDto.ModelList> result =
|
||||||
modelMngService.findModelMgmtList(searchReq, strtDttm, endDttm, modelType, searchVal);
|
modelMngService.findModelMgmtList(searchReq, strtDttm, endDttm, modelType, searchVal);
|
||||||
return ApiResponseDto.ok(result);
|
return ApiResponseDto.ok(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -246,17 +246,17 @@ public class InferenceResultApiController {
|
|||||||
|
|
||||||
@Operation(summary = "추론관리 추론진행 서버 현황", description = "추론관리 추론진행 서버 현황")
|
@Operation(summary = "추론관리 추론진행 서버 현황", description = "추론관리 추론진행 서버 현황")
|
||||||
@ApiResponses(
|
@ApiResponses(
|
||||||
value = {
|
value = {
|
||||||
@ApiResponse(
|
@ApiResponse(
|
||||||
responseCode = "200",
|
responseCode = "200",
|
||||||
description = "검색 성공",
|
description = "검색 성공",
|
||||||
content =
|
content =
|
||||||
@Content(
|
@Content(
|
||||||
mediaType = "application/json",
|
mediaType = "application/json",
|
||||||
schema = @Schema(implementation = Page.class))),
|
schema = @Schema(implementation = Page.class))),
|
||||||
@ApiResponse(responseCode = "400", description = "잘못된 검색 조건", content = @Content),
|
@ApiResponse(responseCode = "400", description = "잘못된 검색 조건", content = @Content),
|
||||||
@ApiResponse(responseCode = "500", description = "서버 오류", content = @Content)
|
@ApiResponse(responseCode = "500", description = "서버 오류", content = @Content)
|
||||||
})
|
})
|
||||||
@GetMapping("/serverStatus")
|
@GetMapping("/serverStatus")
|
||||||
public ApiResponseDto<List<InferenceServerStatusDto>> getInferenceServerStatusList() {
|
public ApiResponseDto<List<InferenceServerStatusDto>> getInferenceServerStatusList() {
|
||||||
|
|
||||||
@@ -265,46 +265,46 @@ public class InferenceResultApiController {
|
|||||||
|
|
||||||
@Operation(summary = "추론관리 진행현황 상세", description = "어드민 홈 > 추론관리 > 추론관리 > 진행현황 상세")
|
@Operation(summary = "추론관리 진행현황 상세", description = "어드민 홈 > 추론관리 > 추론관리 > 진행현황 상세")
|
||||||
@ApiResponses(
|
@ApiResponses(
|
||||||
value = {
|
value = {
|
||||||
@ApiResponse(
|
@ApiResponse(
|
||||||
responseCode = "200",
|
responseCode = "200",
|
||||||
description = "검색 성공",
|
description = "검색 성공",
|
||||||
content =
|
content =
|
||||||
@Content(
|
@Content(
|
||||||
mediaType = "application/json",
|
mediaType = "application/json",
|
||||||
schema = @Schema(implementation = InferenceStatusDetailDto.class))),
|
schema = @Schema(implementation = InferenceStatusDetailDto.class))),
|
||||||
@ApiResponse(responseCode = "400", description = "잘못된 검색 조건", content = @Content),
|
@ApiResponse(responseCode = "400", description = "잘못된 검색 조건", content = @Content),
|
||||||
@ApiResponse(responseCode = "500", description = "서버 오류", content = @Content)
|
@ApiResponse(responseCode = "500", description = "서버 오류", content = @Content)
|
||||||
})
|
})
|
||||||
@GetMapping("/status/{uuid}")
|
@GetMapping("/status/{uuid}")
|
||||||
public ApiResponseDto<InferenceStatusDetailDto> getInferenceStatus(
|
public ApiResponseDto<InferenceStatusDetailDto> getInferenceStatus(
|
||||||
@io.swagger.v3.oas.annotations.parameters.RequestBody(
|
@io.swagger.v3.oas.annotations.parameters.RequestBody(
|
||||||
description = "추론 진행현황 정보",
|
description = "추론 진행현황 정보",
|
||||||
required = true)
|
required = true)
|
||||||
@PathVariable
|
@PathVariable
|
||||||
UUID uuid) {
|
UUID uuid) {
|
||||||
|
|
||||||
return ApiResponseDto.ok(inferenceResultService.getInferenceStatus(uuid));
|
return ApiResponseDto.ok(inferenceResultService.getInferenceStatus(uuid));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Operation(summary = "추론결과 기본정보", description = "추론결과 기본정보")
|
@Operation(summary = "추론결과 기본정보", description = "추론결과 기본정보")
|
||||||
@ApiResponses(
|
@ApiResponses(
|
||||||
value = {
|
value = {
|
||||||
@ApiResponse(
|
@ApiResponse(
|
||||||
responseCode = "200",
|
responseCode = "200",
|
||||||
description = "검색 성공",
|
description = "검색 성공",
|
||||||
content =
|
content =
|
||||||
@Content(
|
@Content(
|
||||||
mediaType = "application/json",
|
mediaType = "application/json",
|
||||||
schema = @Schema(implementation = InferenceDetailDto.AnalResSummary.class))),
|
schema = @Schema(implementation = InferenceDetailDto.AnalResSummary.class))),
|
||||||
@ApiResponse(responseCode = "400", description = "잘못된 검색 조건", content = @Content),
|
@ApiResponse(responseCode = "400", description = "잘못된 검색 조건", content = @Content),
|
||||||
@ApiResponse(responseCode = "500", description = "서버 오류", content = @Content)
|
@ApiResponse(responseCode = "500", description = "서버 오류", content = @Content)
|
||||||
})
|
})
|
||||||
@GetMapping("/infer-result-info")
|
@GetMapping("/infer-result-info")
|
||||||
public ApiResponseDto<InferenceDetailDto.AnalResultInfo> getInferenceResultInfo(
|
public ApiResponseDto<InferenceDetailDto.AnalResultInfo> getInferenceResultInfo(
|
||||||
@Parameter(description = "회차 uuid", example = "932fbd72-2e8e-4a49-b189-09046787f9d1")
|
@Parameter(description = "회차 uuid", example = "932fbd72-2e8e-4a49-b189-09046787f9d1")
|
||||||
@RequestParam
|
@RequestParam
|
||||||
String uuid) {
|
String uuid) {
|
||||||
return ApiResponseDto.ok(inferenceResultService.getInferenceResultInfo(uuid));
|
return ApiResponseDto.ok(inferenceResultService.getInferenceResultInfo(uuid));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -22,9 +22,7 @@ import org.springframework.data.domain.Pageable;
|
|||||||
|
|
||||||
public class InferenceResultDto {
|
public class InferenceResultDto {
|
||||||
|
|
||||||
/**
|
/** 탐지 데이터 옵션 dto */
|
||||||
* 탐지 데이터 옵션 dto
|
|
||||||
*/
|
|
||||||
@Getter
|
@Getter
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
public enum MapSheetScope implements EnumType {
|
public enum MapSheetScope implements EnumType {
|
||||||
@@ -53,9 +51,7 @@ public class InferenceResultDto {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/** 분석대상 도엽 enum */
|
||||||
* 분석대상 도엽 enum
|
|
||||||
*/
|
|
||||||
@Getter
|
@Getter
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
public enum DetectOption implements EnumType {
|
public enum DetectOption implements EnumType {
|
||||||
@@ -132,9 +128,7 @@ public class InferenceResultDto {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/** 목록조회 dto */
|
||||||
* 목록조회 dto
|
|
||||||
*/
|
|
||||||
@Getter
|
@Getter
|
||||||
@Setter
|
@Setter
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
@@ -146,15 +140,11 @@ public class InferenceResultDto {
|
|||||||
private String status;
|
private String status;
|
||||||
private String mapSheetCnt;
|
private String mapSheetCnt;
|
||||||
private Long detectingCnt;
|
private Long detectingCnt;
|
||||||
@JsonFormatDttm
|
@JsonFormatDttm private ZonedDateTime startTime;
|
||||||
private ZonedDateTime startTime;
|
@JsonFormatDttm private ZonedDateTime endTime;
|
||||||
@JsonFormatDttm
|
@JsonFormatDttm private ZonedDateTime elapsedTime;
|
||||||
private ZonedDateTime endTime;
|
|
||||||
@JsonFormatDttm
|
|
||||||
private ZonedDateTime elapsedTime;
|
|
||||||
private Boolean applyYn;
|
private Boolean applyYn;
|
||||||
@JsonFormatDttm
|
@JsonFormatDttm private ZonedDateTime applyDttm;
|
||||||
private ZonedDateTime applyDttm;
|
|
||||||
|
|
||||||
@JsonProperty("statusName")
|
@JsonProperty("statusName")
|
||||||
public String statusName() {
|
public String statusName() {
|
||||||
@@ -162,9 +152,7 @@ public class InferenceResultDto {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/** 목록조회 검색 조건 dto */
|
||||||
* 목록조회 검색 조건 dto
|
|
||||||
*/
|
|
||||||
@Getter
|
@Getter
|
||||||
@Setter
|
@Setter
|
||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
@@ -186,9 +174,7 @@ public class InferenceResultDto {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/** 변화탐지 실행 정보 저장 요청 정보 */
|
||||||
* 변화탐지 실행 정보 저장 요청 정보
|
|
||||||
*/
|
|
||||||
@Getter
|
@Getter
|
||||||
@Setter
|
@Setter
|
||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
@@ -227,8 +213,8 @@ public class InferenceResultDto {
|
|||||||
@Schema(description = "탐지 데이터 옵션 - 추론제외(EXCL), 이전 년도 도엽 사용(PREV)", example = "EXCL")
|
@Schema(description = "탐지 데이터 옵션 - 추론제외(EXCL), 이전 년도 도엽 사용(PREV)", example = "EXCL")
|
||||||
@NotBlank
|
@NotBlank
|
||||||
@EnumValid(
|
@EnumValid(
|
||||||
enumClass = DetectOption.class,
|
enumClass = DetectOption.class,
|
||||||
message = "탐지 데이터 옵션은 '추론제외', '이전 년도 도엽 사용' 만 사용 가능합니다.")
|
message = "탐지 데이터 옵션은 '추론제외', '이전 년도 도엽 사용' 만 사용 가능합니다.")
|
||||||
private String detectOption;
|
private String detectOption;
|
||||||
|
|
||||||
@Schema(description = "5k 도협 번호 목록", example = "[33605,33606, 33610, 34802, 35603, 35611]")
|
@Schema(description = "5k 도협 번호 목록", example = "[33605,33606, 33610, 34802, 35603, 35611]")
|
||||||
@@ -252,96 +238,121 @@ public class InferenceResultDto {
|
|||||||
|
|
||||||
@Schema(description = "탐지대상 도엽수")
|
@Schema(description = "탐지대상 도엽수")
|
||||||
private Long detectingCnt;
|
private Long detectingCnt;
|
||||||
|
|
||||||
@Schema(description = "모델1 분석 대기")
|
@Schema(description = "모델1 분석 대기")
|
||||||
private Integer m1PendingJobs;
|
private Integer m1PendingJobs;
|
||||||
|
|
||||||
@Schema(description = "모델2 분석 대기")
|
@Schema(description = "모델2 분석 대기")
|
||||||
private Integer m2PendingJobs;
|
private Integer m2PendingJobs;
|
||||||
|
|
||||||
@Schema(description = "모델3 분석 대기")
|
@Schema(description = "모델3 분석 대기")
|
||||||
private Integer m3PendingJobs;
|
private Integer m3PendingJobs;
|
||||||
|
|
||||||
@Schema(description = "모델1 분석 완료")
|
@Schema(description = "모델1 분석 완료")
|
||||||
private Integer m1CompletedJobs;
|
private Integer m1CompletedJobs;
|
||||||
|
|
||||||
@Schema(description = "모델2 분석 완료")
|
@Schema(description = "모델2 분석 완료")
|
||||||
private Integer m2CompletedJobs;
|
private Integer m2CompletedJobs;
|
||||||
|
|
||||||
@Schema(description = "모델3 분석 완료")
|
@Schema(description = "모델3 분석 완료")
|
||||||
private Integer m3CompletedJobs;
|
private Integer m3CompletedJobs;
|
||||||
|
|
||||||
@Schema(description = "모델1 분석 실패")
|
@Schema(description = "모델1 분석 실패")
|
||||||
private Integer m1FailedJobs;
|
private Integer m1FailedJobs;
|
||||||
|
|
||||||
@Schema(description = "모델2 분석 실패")
|
@Schema(description = "모델2 분석 실패")
|
||||||
private Integer m2FailedJobs;
|
private Integer m2FailedJobs;
|
||||||
|
|
||||||
@Schema(description = "모델3 분석 실패")
|
@Schema(description = "모델3 분석 실패")
|
||||||
private Integer m3FailedJobs;
|
private Integer m3FailedJobs;
|
||||||
|
|
||||||
@Schema(description = "모델1 사용시간 시작일시")
|
@Schema(description = "모델1 사용시간 시작일시")
|
||||||
@JsonFormatDttm
|
@JsonFormatDttm
|
||||||
ZonedDateTime m1ModelStartDttm;
|
ZonedDateTime m1ModelStartDttm;
|
||||||
|
|
||||||
@Schema(description = "모델2 사용시간 시작일시")
|
@Schema(description = "모델2 사용시간 시작일시")
|
||||||
@JsonFormatDttm
|
@JsonFormatDttm
|
||||||
ZonedDateTime m2ModelStartDttm;
|
ZonedDateTime m2ModelStartDttm;
|
||||||
|
|
||||||
@Schema(description = "모델3 사용시간 시작일시")
|
@Schema(description = "모델3 사용시간 시작일시")
|
||||||
@JsonFormatDttm
|
@JsonFormatDttm
|
||||||
ZonedDateTime m3ModelStartDttm;
|
ZonedDateTime m3ModelStartDttm;
|
||||||
|
|
||||||
@Schema(description = "모델1 사용시간 종료일시")
|
@Schema(description = "모델1 사용시간 종료일시")
|
||||||
@JsonFormatDttm
|
@JsonFormatDttm
|
||||||
ZonedDateTime m1ModelEndDttm;
|
ZonedDateTime m1ModelEndDttm;
|
||||||
|
|
||||||
@Schema(description = "모델2 사용시간 종료일시")
|
@Schema(description = "모델2 사용시간 종료일시")
|
||||||
@JsonFormatDttm
|
@JsonFormatDttm
|
||||||
ZonedDateTime m2ModelEndDttm;
|
ZonedDateTime m2ModelEndDttm;
|
||||||
|
|
||||||
@Schema(description = "모델3 사용시간 종료일시")
|
@Schema(description = "모델3 사용시간 종료일시")
|
||||||
@JsonFormatDttm
|
@JsonFormatDttm
|
||||||
ZonedDateTime m3ModelEndDttm;
|
ZonedDateTime m3ModelEndDttm;
|
||||||
|
|
||||||
@Schema(description = "변화탐지 제목")
|
@Schema(description = "변화탐지 제목")
|
||||||
private String title;
|
private String title;
|
||||||
|
|
||||||
@Schema(description = "비교년도")
|
@Schema(description = "비교년도")
|
||||||
private Integer compareYyyy;
|
private Integer compareYyyy;
|
||||||
|
|
||||||
@Schema(description = "기준년도")
|
@Schema(description = "기준년도")
|
||||||
private Integer targetYyyy;
|
private Integer targetYyyy;
|
||||||
|
|
||||||
@Schema(description = "회차")
|
@Schema(description = "회차")
|
||||||
private Integer stage;
|
private Integer stage;
|
||||||
|
|
||||||
@Schema(description = "변화탐지 시작")
|
@Schema(description = "변화탐지 시작")
|
||||||
@JsonFormatDttm
|
@JsonFormatDttm
|
||||||
private ZonedDateTime inferStartDttm;
|
private ZonedDateTime inferStartDttm;
|
||||||
|
|
||||||
@Schema(description = "변화탐지 종료")
|
@Schema(description = "변화탐지 종료")
|
||||||
@JsonFormatDttm
|
@JsonFormatDttm
|
||||||
private ZonedDateTime inferEndDttm;
|
private ZonedDateTime inferEndDttm;
|
||||||
|
|
||||||
@Schema(description = "변화탐지 옵션")
|
@Schema(description = "변화탐지 옵션")
|
||||||
private String detectOption;
|
private String detectOption;
|
||||||
|
|
||||||
@Schema(description = "분석도엽")
|
@Schema(description = "분석도엽")
|
||||||
private String mapSheetScope;
|
private String mapSheetScope;
|
||||||
|
|
||||||
@Schema(description = "모델1 버전")
|
@Schema(description = "모델1 버전")
|
||||||
private String modelVer1;
|
private String modelVer1;
|
||||||
|
|
||||||
@Schema(description = "모델2 버전")
|
@Schema(description = "모델2 버전")
|
||||||
private String modelVer2;
|
private String modelVer2;
|
||||||
|
|
||||||
@Schema(description = "모델3 버전")
|
@Schema(description = "모델3 버전")
|
||||||
private String modelVer3;
|
private String modelVer3;
|
||||||
|
|
||||||
public InferenceStatusDetailDto(
|
public InferenceStatusDetailDto(
|
||||||
Long detectingCnt,
|
Long detectingCnt,
|
||||||
Integer m1PendingJobs,
|
Integer m1PendingJobs,
|
||||||
Integer m2PendingJobs,
|
Integer m2PendingJobs,
|
||||||
Integer m3PendingJobs,
|
Integer m3PendingJobs,
|
||||||
Integer m1CompletedJobs,
|
Integer m1CompletedJobs,
|
||||||
Integer m2CompletedJobs,
|
Integer m2CompletedJobs,
|
||||||
Integer m3CompletedJobs,
|
Integer m3CompletedJobs,
|
||||||
Integer m1FailedJobs,
|
Integer m1FailedJobs,
|
||||||
Integer m2FailedJobs,
|
Integer m2FailedJobs,
|
||||||
Integer m3FailedJobs,
|
Integer m3FailedJobs,
|
||||||
ZonedDateTime m1ModelStartDttm,
|
ZonedDateTime m1ModelStartDttm,
|
||||||
ZonedDateTime m2ModelStartDttm,
|
ZonedDateTime m2ModelStartDttm,
|
||||||
ZonedDateTime m3ModelStartDttm,
|
ZonedDateTime m3ModelStartDttm,
|
||||||
ZonedDateTime m1ModelEndDttm,
|
ZonedDateTime m1ModelEndDttm,
|
||||||
ZonedDateTime m2ModelEndDttm,
|
ZonedDateTime m2ModelEndDttm,
|
||||||
ZonedDateTime m3ModelEndDttm,
|
ZonedDateTime m3ModelEndDttm,
|
||||||
String title,
|
String title,
|
||||||
Integer compareYyyy,
|
Integer compareYyyy,
|
||||||
Integer targetYyyy,
|
Integer targetYyyy,
|
||||||
Integer stage,
|
Integer stage,
|
||||||
ZonedDateTime inferStartDttm,
|
ZonedDateTime inferStartDttm,
|
||||||
ZonedDateTime inferEndDttm,
|
ZonedDateTime inferEndDttm,
|
||||||
String detectOption,
|
String detectOption,
|
||||||
String mapSheetScope,
|
String mapSheetScope,
|
||||||
String modelVer1,
|
String modelVer1,
|
||||||
String modelVer2,
|
String modelVer2,
|
||||||
String modelVer3
|
String modelVer3) {
|
||||||
) {
|
|
||||||
this.detectingCnt = detectingCnt;
|
this.detectingCnt = detectingCnt;
|
||||||
this.m1PendingJobs = m1PendingJobs;
|
this.m1PendingJobs = m1PendingJobs;
|
||||||
this.m2PendingJobs = m2PendingJobs;
|
this.m2PendingJobs = m2PendingJobs;
|
||||||
@@ -373,11 +384,17 @@ public class InferenceResultDto {
|
|||||||
|
|
||||||
@JsonProperty("progress")
|
@JsonProperty("progress")
|
||||||
private int getProgress() {
|
private int getProgress() {
|
||||||
long tiles = this.detectingCnt; // 도엽수
|
long tiles = this.detectingCnt; // 도엽수
|
||||||
int models = 3; // 모델 개수
|
int models = 3; // 모델 개수
|
||||||
int completed = this.m1CompletedJobs + this.m2CompletedJobs + this.m3CompletedJobs + this.m1FailedJobs + this.m2FailedJobs + this.m3FailedJobs; // 완료수
|
int completed =
|
||||||
|
this.m1CompletedJobs
|
||||||
|
+ this.m2CompletedJobs
|
||||||
|
+ this.m3CompletedJobs
|
||||||
|
+ this.m1FailedJobs
|
||||||
|
+ this.m2FailedJobs
|
||||||
|
+ this.m3FailedJobs; // 완료수
|
||||||
|
|
||||||
long total = tiles * models; // 전체 작업량
|
long total = tiles * models; // 전체 작업량
|
||||||
return (int) ((completed * 100L) / total);
|
return (int) ((completed * 100L) / total);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -392,7 +409,6 @@ public class InferenceResultDto {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Getter
|
@Getter
|
||||||
@Setter
|
@Setter
|
||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
@@ -400,12 +416,9 @@ public class InferenceResultDto {
|
|||||||
public static class InferenceServerStatusDto {
|
public static class InferenceServerStatusDto {
|
||||||
|
|
||||||
private String serverName;
|
private String serverName;
|
||||||
@JsonIgnore
|
@JsonIgnore private float cpu_user;
|
||||||
private float cpu_user;
|
@JsonIgnore private float cpu_system;
|
||||||
@JsonIgnore
|
@JsonIgnore private float memused;
|
||||||
private float cpu_system;
|
|
||||||
@JsonIgnore
|
|
||||||
private float memused;
|
|
||||||
private Long kbmemused;
|
private Long kbmemused;
|
||||||
private float gpuUtil;
|
private float gpuUtil;
|
||||||
|
|
||||||
|
|||||||
@@ -109,7 +109,7 @@ public class InferenceResultService {
|
|||||||
|
|
||||||
// 변화탐지 실행 가능 비교년도 조회
|
// 변화탐지 실행 가능 비교년도 조회
|
||||||
List<MngListCompareDto> compareList =
|
List<MngListCompareDto> compareList =
|
||||||
mapSheetMngCoreService.getByHstMapSheetCompareList(req.getCompareYyyy(), mapTargetIds);
|
mapSheetMngCoreService.getByHstMapSheetCompareList(req.getCompareYyyy(), mapTargetIds);
|
||||||
|
|
||||||
if (compareList.isEmpty()) {
|
if (compareList.isEmpty()) {
|
||||||
throw new CustomApiException("NOT_FOUND_COMPARE_YEAR", HttpStatus.NOT_FOUND);
|
throw new CustomApiException("NOT_FOUND_COMPARE_YEAR", HttpStatus.NOT_FOUND);
|
||||||
@@ -158,20 +158,20 @@ public class InferenceResultService {
|
|||||||
|
|
||||||
// 추론에 필요한 geojson 파일 생성
|
// 추론에 필요한 geojson 파일 생성
|
||||||
List<String> mapSheetNumList =
|
List<String> mapSheetNumList =
|
||||||
targetList.stream()
|
targetList.stream()
|
||||||
.filter(t -> Boolean.TRUE.equals(t.getIsSuccess()))
|
.filter(t -> Boolean.TRUE.equals(t.getIsSuccess()))
|
||||||
.map(MngListDto::getMapSheetNum)
|
.map(MngListDto::getMapSheetNum)
|
||||||
.toList();
|
.toList();
|
||||||
|
|
||||||
// 비교년도 geojson 파일 생성하여 경로 받기
|
// 비교년도 geojson 파일 생성하여 경로 받기
|
||||||
String modelComparePath =
|
String modelComparePath =
|
||||||
getSceneInference(
|
getSceneInference(
|
||||||
String.valueOf(req.getCompareYyyy()), mapSheetNumList, req.getMapSheetScope());
|
String.valueOf(req.getCompareYyyy()), mapSheetNumList, req.getMapSheetScope());
|
||||||
|
|
||||||
// 기준년도 geojson 파일 생성하여 경로 받기
|
// 기준년도 geojson 파일 생성하여 경로 받기
|
||||||
String modelTargetPath =
|
String modelTargetPath =
|
||||||
getSceneInference(
|
getSceneInference(
|
||||||
String.valueOf(req.getTargetYyyy()), mapSheetNumList, req.getMapSheetScope());
|
String.valueOf(req.getTargetYyyy()), mapSheetNumList, req.getMapSheetScope());
|
||||||
|
|
||||||
// ai 서버에 전달할 파라미터 생성
|
// ai 서버에 전달할 파라미터 생성
|
||||||
pred_requests_areas predRequestsAreas = new pred_requests_areas();
|
pred_requests_areas predRequestsAreas = new pred_requests_areas();
|
||||||
@@ -203,19 +203,19 @@ public class InferenceResultService {
|
|||||||
|
|
||||||
// 비교년도 탐지 제이터 옵션 별로 조회하여 req에 적용
|
// 비교년도 탐지 제이터 옵션 별로 조회하여 req에 적용
|
||||||
private List<MapSheetNumDto> createdMngDto(
|
private List<MapSheetNumDto> createdMngDto(
|
||||||
InferenceResultDto.RegReq req, List<MngListDto> targetList) {
|
InferenceResultDto.RegReq req, List<MngListDto> targetList) {
|
||||||
List<String> mapTargetIds = new ArrayList<>();
|
List<String> mapTargetIds = new ArrayList<>();
|
||||||
|
|
||||||
targetList.forEach(
|
targetList.forEach(
|
||||||
hstMapSheet -> {
|
hstMapSheet -> {
|
||||||
// 비교년도는 target 년도 기준으로 가져옴 파라미터 만들기
|
// 비교년도는 target 년도 기준으로 가져옴 파라미터 만들기
|
||||||
mapTargetIds.add(hstMapSheet.getMapSheetNum());
|
mapTargetIds.add(hstMapSheet.getMapSheetNum());
|
||||||
});
|
});
|
||||||
|
|
||||||
// 비교년도 조회
|
// 비교년도 조회
|
||||||
List<String> mapCompareIds = new ArrayList<>();
|
List<String> mapCompareIds = new ArrayList<>();
|
||||||
List<MngListCompareDto> compareList =
|
List<MngListCompareDto> compareList =
|
||||||
mapSheetMngCoreService.getByHstMapSheetCompareList(req.getCompareYyyy(), mapTargetIds);
|
mapSheetMngCoreService.getByHstMapSheetCompareList(req.getCompareYyyy(), mapTargetIds);
|
||||||
|
|
||||||
for (MngListCompareDto dto : compareList) {
|
for (MngListCompareDto dto : compareList) {
|
||||||
// 추론 제외일때 이전년도 파일이 없으면 제외
|
// 추론 제외일때 이전년도 파일이 없으면 제외
|
||||||
@@ -230,35 +230,35 @@ public class InferenceResultService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Set<String> compareSet =
|
Set<String> compareSet =
|
||||||
mapCompareIds.stream()
|
mapCompareIds.stream()
|
||||||
.filter(Objects::nonNull)
|
.filter(Objects::nonNull)
|
||||||
.map(String::trim) // 공백/개행 방지
|
.map(String::trim) // 공백/개행 방지
|
||||||
.collect(Collectors.toSet());
|
.collect(Collectors.toSet());
|
||||||
|
|
||||||
// target 기준 compare 비교하여 서로 있는것만 저장
|
// target 기준 compare 비교하여 서로 있는것만 저장
|
||||||
List<String> commonIds =
|
List<String> commonIds =
|
||||||
mapTargetIds.stream()
|
mapTargetIds.stream()
|
||||||
.filter(Objects::nonNull)
|
.filter(Objects::nonNull)
|
||||||
.map(String::trim)
|
.map(String::trim)
|
||||||
.filter(compareSet::contains)
|
.filter(compareSet::contains)
|
||||||
.toList();
|
.toList();
|
||||||
|
|
||||||
Set<String> commonIdSet =
|
Set<String> commonIdSet =
|
||||||
commonIds.stream().filter(Objects::nonNull).map(String::trim).collect(Collectors.toSet());
|
commonIds.stream().filter(Objects::nonNull).map(String::trim).collect(Collectors.toSet());
|
||||||
|
|
||||||
// 저장하기위해 파라미터 다시 구성
|
// 저장하기위해 파라미터 다시 구성
|
||||||
List<MapSheetNumDto> mapSheetNum =
|
List<MapSheetNumDto> mapSheetNum =
|
||||||
targetList.stream()
|
targetList.stream()
|
||||||
.filter(dto -> dto.getMapSheetNum() != null)
|
.filter(dto -> dto.getMapSheetNum() != null)
|
||||||
.filter(dto -> commonIdSet.contains(dto.getMapSheetNum().trim()))
|
.filter(dto -> commonIdSet.contains(dto.getMapSheetNum().trim()))
|
||||||
.map(
|
.map(
|
||||||
dto -> {
|
dto -> {
|
||||||
MapSheetNumDto mapSheetNumDto = new MapSheetNumDto();
|
MapSheetNumDto mapSheetNumDto = new MapSheetNumDto();
|
||||||
mapSheetNumDto.setMapSheetNum(dto.getMapSheetNum());
|
mapSheetNumDto.setMapSheetNum(dto.getMapSheetNum());
|
||||||
mapSheetNumDto.setMapSheetName(dto.getMapSheetName());
|
mapSheetNumDto.setMapSheetName(dto.getMapSheetName());
|
||||||
return mapSheetNumDto;
|
return mapSheetNumDto;
|
||||||
})
|
})
|
||||||
.toList();
|
.toList();
|
||||||
|
|
||||||
return mapSheetNum;
|
return mapSheetNum;
|
||||||
}
|
}
|
||||||
@@ -297,7 +297,7 @@ public class InferenceResultService {
|
|||||||
headers.setAccept(List.of(MediaType.APPLICATION_JSON));
|
headers.setAccept(List.of(MediaType.APPLICATION_JSON));
|
||||||
|
|
||||||
ExternalCallResult<String> result =
|
ExternalCallResult<String> result =
|
||||||
externalHttpClient.call(inferenceUrl, HttpMethod.POST, dto, headers, String.class);
|
externalHttpClient.call(inferenceUrl, HttpMethod.POST, dto, headers, String.class);
|
||||||
|
|
||||||
if (result.statusCode() < 200 || result.statusCode() >= 300) {
|
if (result.statusCode() < 200 || result.statusCode() >= 300) {
|
||||||
log.error("Inference API failed. status={}, body={}", result.statusCode(), result.body());
|
log.error("Inference API failed. status={}, body={}", result.statusCode(), result.body());
|
||||||
@@ -307,8 +307,7 @@ public class InferenceResultService {
|
|||||||
// 4) 응답 파싱
|
// 4) 응답 파싱
|
||||||
try {
|
try {
|
||||||
List<Map<String, Object>> list =
|
List<Map<String, Object>> list =
|
||||||
objectMapper.readValue(result.body(), new TypeReference<>() {
|
objectMapper.readValue(result.body(), new TypeReference<>() {});
|
||||||
});
|
|
||||||
|
|
||||||
if (list.isEmpty()) {
|
if (list.isEmpty()) {
|
||||||
throw new IllegalStateException("Inference response is empty");
|
throw new IllegalStateException("Inference response is empty");
|
||||||
@@ -377,8 +376,8 @@ public class InferenceResultService {
|
|||||||
/**
|
/**
|
||||||
* geojson 파일 생성
|
* geojson 파일 생성
|
||||||
*
|
*
|
||||||
* @param yyyy 영상관리 파일별 년도
|
* @param yyyy 영상관리 파일별 년도
|
||||||
* @param mapSheetNums 5k 도엽 번호 리스트
|
* @param mapSheetNums 5k 도엽 번호 리스트
|
||||||
* @param mapSheetScope EXCL : 추론제외, PREV 이전 년도 도엽 사용
|
* @param mapSheetScope EXCL : 추론제외, PREV 이전 년도 도엽 사용
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@@ -413,7 +412,7 @@ public class InferenceResultService {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public Page<InferenceDetailDto.Geom> getInferenceResultGeomList(
|
public Page<InferenceDetailDto.Geom> getInferenceResultGeomList(
|
||||||
Long id, InferenceDetailDto.SearchGeoReq searchGeoReq) {
|
Long id, InferenceDetailDto.SearchGeoReq searchGeoReq) {
|
||||||
return inferenceResultCoreService.getInferenceResultGeomList(id, searchGeoReq);
|
return inferenceResultCoreService.getInferenceResultGeomList(id, searchGeoReq);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -424,7 +423,7 @@ public class InferenceResultService {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public Page<InferenceDetailDto.DetailListEntity> listInferenceResultWithGeom(
|
public Page<InferenceDetailDto.DetailListEntity> listInferenceResultWithGeom(
|
||||||
@NotNull Long id, InferenceDetailDto.SearchGeoReq searchReq) {
|
@NotNull Long id, InferenceDetailDto.SearchGeoReq searchReq) {
|
||||||
|
|
||||||
return inferenceResultCoreService.listInferenceResultWithGeom(id, searchReq);
|
return inferenceResultCoreService.listInferenceResultWithGeom(id, searchReq);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -106,7 +106,7 @@ public class InferenceResultCoreService {
|
|||||||
mapSheetLearnEntity.setMapSheetCnt(mapSheetName);
|
mapSheetLearnEntity.setMapSheetCnt(mapSheetName);
|
||||||
mapSheetLearnEntity.setDetectingCnt((long) detectingCnt);
|
mapSheetLearnEntity.setDetectingCnt((long) detectingCnt);
|
||||||
mapSheetLearnEntity.setStage(
|
mapSheetLearnEntity.setStage(
|
||||||
mapSheetLearnRepository.getLearnStage(req.getCompareYyyy(), req.getTargetYyyy()));
|
mapSheetLearnRepository.getLearnStage(req.getCompareYyyy(), req.getTargetYyyy()));
|
||||||
|
|
||||||
// learn 테이블 저장
|
// learn 테이블 저장
|
||||||
MapSheetLearnEntity savedLearn = mapSheetLearnRepository.save(mapSheetLearnEntity);
|
MapSheetLearnEntity savedLearn = mapSheetLearnRepository.save(mapSheetLearnEntity);
|
||||||
@@ -168,9 +168,9 @@ public class InferenceResultCoreService {
|
|||||||
*/
|
*/
|
||||||
public InferenceDetailDto.AnalResSummary getInferenceResultSummary(Long id) {
|
public InferenceDetailDto.AnalResSummary getInferenceResultSummary(Long id) {
|
||||||
InferenceDetailDto.AnalResSummary summary =
|
InferenceDetailDto.AnalResSummary summary =
|
||||||
mapSheetAnalDataRepository
|
mapSheetAnalDataRepository
|
||||||
.getInferenceResultSummary(id)
|
.getInferenceResultSummary(id)
|
||||||
.orElseThrow(() -> new EntityNotFoundException("요약정보를 찾을 수 없습니다. " + id));
|
.orElseThrow(() -> new EntityNotFoundException("요약정보를 찾을 수 없습니다. " + id));
|
||||||
return summary;
|
return summary;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -191,7 +191,7 @@ public class InferenceResultCoreService {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public Page<InferenceDetailDto.Geom> getInferenceResultGeomList(
|
public Page<InferenceDetailDto.Geom> getInferenceResultGeomList(
|
||||||
Long id, InferenceDetailDto.SearchGeoReq searchGeoReq) {
|
Long id, InferenceDetailDto.SearchGeoReq searchGeoReq) {
|
||||||
return mapSheetAnalDataRepository.getInferenceGeomList(id, searchGeoReq);
|
return mapSheetAnalDataRepository.getInferenceGeomList(id, searchGeoReq);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -203,16 +203,16 @@ public class InferenceResultCoreService {
|
|||||||
*/
|
*/
|
||||||
@Transactional(readOnly = true)
|
@Transactional(readOnly = true)
|
||||||
public Page<InferenceDetailDto.DetailListEntity> listInferenceResultWithGeom(
|
public Page<InferenceDetailDto.DetailListEntity> listInferenceResultWithGeom(
|
||||||
@NotNull Long analyId, InferenceDetailDto.SearchGeoReq searchReq) {
|
@NotNull Long analyId, InferenceDetailDto.SearchGeoReq searchReq) {
|
||||||
// 분석 ID 에 해당하는 dataids를 가져온다.
|
// 분석 ID 에 해당하는 dataids를 가져온다.
|
||||||
List<Long> dataIds =
|
List<Long> dataIds =
|
||||||
mapSheetAnalDataRepository.listAnalyGeom(analyId).stream()
|
mapSheetAnalDataRepository.listAnalyGeom(analyId).stream()
|
||||||
.mapToLong(MapSheetAnalDataInferenceEntity::getId)
|
.mapToLong(MapSheetAnalDataInferenceEntity::getId)
|
||||||
.boxed()
|
.boxed()
|
||||||
.toList();
|
.toList();
|
||||||
// 해당데이터의 폴리곤데이터를 가져온다
|
// 해당데이터의 폴리곤데이터를 가져온다
|
||||||
Page<MapSheetAnalDataInferenceGeomEntity> mapSheetAnalDataGeomEntities =
|
Page<MapSheetAnalDataInferenceGeomEntity> mapSheetAnalDataGeomEntities =
|
||||||
mapSheetAnalDataRepository.listInferenceResultWithGeom(dataIds, searchReq);
|
mapSheetAnalDataRepository.listInferenceResultWithGeom(dataIds, searchReq);
|
||||||
return mapSheetAnalDataGeomEntities.map(MapSheetAnalDataInferenceGeomEntity::toEntity);
|
return mapSheetAnalDataGeomEntities.map(MapSheetAnalDataInferenceGeomEntity::toEntity);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -229,14 +229,14 @@ public class InferenceResultCoreService {
|
|||||||
@Transactional(readOnly = true)
|
@Transactional(readOnly = true)
|
||||||
public List<MapSheet> listGetScenes5k(Long analyId) {
|
public List<MapSheet> listGetScenes5k(Long analyId) {
|
||||||
List<String> sceneCodes =
|
List<String> sceneCodes =
|
||||||
mapSheetAnalDataRepository.listAnalyGeom(analyId).stream()
|
mapSheetAnalDataRepository.listAnalyGeom(analyId).stream()
|
||||||
.mapToLong(MapSheetAnalDataInferenceEntity::getMapSheetNum)
|
.mapToLong(MapSheetAnalDataInferenceEntity::getMapSheetNum)
|
||||||
.mapToObj(String::valueOf)
|
.mapToObj(String::valueOf)
|
||||||
.toList();
|
.toList();
|
||||||
|
|
||||||
return mapInkx5kRepository.listGetScenes5k(sceneCodes).stream()
|
return mapInkx5kRepository.listGetScenes5k(sceneCodes).stream()
|
||||||
.map(MapInkx5kEntity::toEntity)
|
.map(MapInkx5kEntity::toEntity)
|
||||||
.toList();
|
.toList();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -246,9 +246,9 @@ public class InferenceResultCoreService {
|
|||||||
*/
|
*/
|
||||||
public void update(SaveInferenceAiDto request) {
|
public void update(SaveInferenceAiDto request) {
|
||||||
MapSheetLearnEntity entity =
|
MapSheetLearnEntity entity =
|
||||||
mapSheetLearnRepository
|
mapSheetLearnRepository
|
||||||
.getInferenceResultByUuid(request.getUuid())
|
.getInferenceResultByUuid(request.getUuid())
|
||||||
.orElseThrow(EntityNotFoundException::new);
|
.orElseThrow(EntityNotFoundException::new);
|
||||||
|
|
||||||
// M1/M2/M3 영역 업데이트
|
// M1/M2/M3 영역 업데이트
|
||||||
if (request.getType() != null) {
|
if (request.getType() != null) {
|
||||||
@@ -270,46 +270,49 @@ public class InferenceResultCoreService {
|
|||||||
|
|
||||||
private void applyModelUpdate(MapSheetLearnEntity entity, SaveInferenceAiDto request) {
|
private void applyModelUpdate(MapSheetLearnEntity entity, SaveInferenceAiDto request) {
|
||||||
switch (request.getType()) {
|
switch (request.getType()) {
|
||||||
case "M1" -> applyModelFields(
|
case "M1" ->
|
||||||
request,
|
applyModelFields(
|
||||||
entity::setM1ModelBatchId,
|
request,
|
||||||
entity::setM1ModelStartDttm,
|
entity::setM1ModelBatchId,
|
||||||
entity::setM1ModelEndDttm,
|
entity::setM1ModelStartDttm,
|
||||||
entity::setM1PendingJobs,
|
entity::setM1ModelEndDttm,
|
||||||
entity::setM1RunningJobs,
|
entity::setM1PendingJobs,
|
||||||
entity::setM1CompletedJobs,
|
entity::setM1RunningJobs,
|
||||||
entity::setM1FailedJobs);
|
entity::setM1CompletedJobs,
|
||||||
case "M2" -> applyModelFields(
|
entity::setM1FailedJobs);
|
||||||
request,
|
case "M2" ->
|
||||||
entity::setM2ModelBatchId,
|
applyModelFields(
|
||||||
entity::setM2ModelStartDttm,
|
request,
|
||||||
entity::setM2ModelEndDttm,
|
entity::setM2ModelBatchId,
|
||||||
entity::setM2PendingJobs,
|
entity::setM2ModelStartDttm,
|
||||||
entity::setM2RunningJobs,
|
entity::setM2ModelEndDttm,
|
||||||
entity::setM2CompletedJobs,
|
entity::setM2PendingJobs,
|
||||||
entity::setM2FailedJobs);
|
entity::setM2RunningJobs,
|
||||||
case "M3" -> applyModelFields(
|
entity::setM2CompletedJobs,
|
||||||
request,
|
entity::setM2FailedJobs);
|
||||||
entity::setM3ModelBatchId,
|
case "M3" ->
|
||||||
entity::setM3ModelStartDttm,
|
applyModelFields(
|
||||||
entity::setM3ModelEndDttm,
|
request,
|
||||||
entity::setM3PendingJobs,
|
entity::setM3ModelBatchId,
|
||||||
entity::setM3RunningJobs,
|
entity::setM3ModelStartDttm,
|
||||||
entity::setM3CompletedJobs,
|
entity::setM3ModelEndDttm,
|
||||||
entity::setM3FailedJobs);
|
entity::setM3PendingJobs,
|
||||||
|
entity::setM3RunningJobs,
|
||||||
|
entity::setM3CompletedJobs,
|
||||||
|
entity::setM3FailedJobs);
|
||||||
default -> throw new IllegalArgumentException("Unknown type: " + request.getType());
|
default -> throw new IllegalArgumentException("Unknown type: " + request.getType());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void applyModelFields(
|
private void applyModelFields(
|
||||||
SaveInferenceAiDto request,
|
SaveInferenceAiDto request,
|
||||||
Consumer<Long> setBatchId,
|
Consumer<Long> setBatchId,
|
||||||
Consumer<ZonedDateTime> setStart,
|
Consumer<ZonedDateTime> setStart,
|
||||||
Consumer<ZonedDateTime> setEnd,
|
Consumer<ZonedDateTime> setEnd,
|
||||||
Consumer<Integer> setPending,
|
Consumer<Integer> setPending,
|
||||||
Consumer<Integer> setRunning,
|
Consumer<Integer> setRunning,
|
||||||
Consumer<Integer> setCompleted,
|
Consumer<Integer> setCompleted,
|
||||||
Consumer<Integer> setFailed) {
|
Consumer<Integer> setFailed) {
|
||||||
applyIfNotNull(request.getBatchId(), setBatchId);
|
applyIfNotNull(request.getBatchId(), setBatchId);
|
||||||
applyIfNotNull(request.getModelStartDttm(), setStart);
|
applyIfNotNull(request.getModelStartDttm(), setStart);
|
||||||
applyIfNotNull(request.getModelEndDttm(), setEnd);
|
applyIfNotNull(request.getModelEndDttm(), setEnd);
|
||||||
@@ -336,7 +339,7 @@ public class InferenceResultCoreService {
|
|||||||
|
|
||||||
public InferenceBatchSheet getInferenceResultByStatus(String status) {
|
public InferenceBatchSheet getInferenceResultByStatus(String status) {
|
||||||
MapSheetLearnEntity entity =
|
MapSheetLearnEntity entity =
|
||||||
mapSheetLearnRepository.getInferenceResultByStatus(status).orElse(null);
|
mapSheetLearnRepository.getInferenceResultByStatus(status).orElse(null);
|
||||||
|
|
||||||
if (entity == null) {
|
if (entity == null) {
|
||||||
return null;
|
return null;
|
||||||
@@ -382,7 +385,7 @@ public class InferenceResultCoreService {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param compareYear 비교년도
|
* @param compareYear 비교년도
|
||||||
* @param targetYear 기준년도
|
* @param targetYear 기준년도
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public Integer getLearnStage(Integer compareYear, Integer targetYear) {
|
public Integer getLearnStage(Integer compareYear, Integer targetYear) {
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ public class MapSheetLearnRepositoryImpl implements MapSheetLearnRepositoryCusto
|
|||||||
BooleanBuilder builder = new BooleanBuilder();
|
BooleanBuilder builder = new BooleanBuilder();
|
||||||
|
|
||||||
NumberExpression<Integer> statusOrder =
|
NumberExpression<Integer> statusOrder =
|
||||||
new CaseBuilder().when(mapSheetLearnEntity.status.eq("Y")).then(0).otherwise(1);
|
new CaseBuilder().when(mapSheetLearnEntity.status.eq("Y")).then(0).otherwise(1);
|
||||||
|
|
||||||
// 국유인 반영 여부
|
// 국유인 반영 여부
|
||||||
if (StringUtils.isNotBlank(req.getApplyYn())) {
|
if (StringUtils.isNotBlank(req.getApplyYn())) {
|
||||||
@@ -66,10 +66,10 @@ public class MapSheetLearnRepositoryImpl implements MapSheetLearnRepositoryCusto
|
|||||||
// 국유인 반영일
|
// 국유인 반영일
|
||||||
if (req.getStrtDttm() != null && req.getEndDttm() != null) {
|
if (req.getStrtDttm() != null && req.getEndDttm() != null) {
|
||||||
builder.and(
|
builder.and(
|
||||||
mapSheetLearnEntity
|
mapSheetLearnEntity
|
||||||
.applyDttm
|
.applyDttm
|
||||||
.goe(DateRange.start(req.getStrtDttm()))
|
.goe(DateRange.start(req.getStrtDttm()))
|
||||||
.and(mapSheetLearnEntity.applyDttm.lt(DateRange.end(req.getEndDttm()))));
|
.and(mapSheetLearnEntity.applyDttm.lt(DateRange.end(req.getEndDttm()))));
|
||||||
}
|
}
|
||||||
|
|
||||||
// 제목
|
// 제목
|
||||||
@@ -78,21 +78,21 @@ public class MapSheetLearnRepositoryImpl implements MapSheetLearnRepositoryCusto
|
|||||||
}
|
}
|
||||||
|
|
||||||
List<MapSheetLearnEntity> content =
|
List<MapSheetLearnEntity> content =
|
||||||
queryFactory
|
queryFactory
|
||||||
.select(mapSheetLearnEntity)
|
.select(mapSheetLearnEntity)
|
||||||
.from(mapSheetLearnEntity)
|
.from(mapSheetLearnEntity)
|
||||||
.where(builder)
|
.where(builder)
|
||||||
.offset(pageable.getOffset())
|
.offset(pageable.getOffset())
|
||||||
.limit(pageable.getPageSize())
|
.limit(pageable.getPageSize())
|
||||||
.orderBy(mapSheetLearnEntity.id.desc())
|
.orderBy(mapSheetLearnEntity.id.desc())
|
||||||
.fetch();
|
.fetch();
|
||||||
|
|
||||||
Long total =
|
Long total =
|
||||||
queryFactory
|
queryFactory
|
||||||
.select(mapSheetLearnEntity.count())
|
.select(mapSheetLearnEntity.count())
|
||||||
.from(mapSheetLearnEntity)
|
.from(mapSheetLearnEntity)
|
||||||
.where(builder)
|
.where(builder)
|
||||||
.fetchOne();
|
.fetchOne();
|
||||||
|
|
||||||
return new PageImpl<>(content, pageable, total == null ? 0L : total);
|
return new PageImpl<>(content, pageable, total == null ? 0L : total);
|
||||||
}
|
}
|
||||||
@@ -100,10 +100,10 @@ public class MapSheetLearnRepositoryImpl implements MapSheetLearnRepositoryCusto
|
|||||||
@Override
|
@Override
|
||||||
public Optional<MapSheetLearnEntity> getInferenceResultByUuid(UUID uuid) {
|
public Optional<MapSheetLearnEntity> getInferenceResultByUuid(UUID uuid) {
|
||||||
return Optional.ofNullable(
|
return Optional.ofNullable(
|
||||||
queryFactory
|
queryFactory
|
||||||
.selectFrom(mapSheetLearnEntity)
|
.selectFrom(mapSheetLearnEntity)
|
||||||
.where(mapSheetLearnEntity.uuid.eq(uuid))
|
.where(mapSheetLearnEntity.uuid.eq(uuid))
|
||||||
.fetchOne());
|
.fetchOne());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -112,41 +112,41 @@ public class MapSheetLearnRepositoryImpl implements MapSheetLearnRepositoryCusto
|
|||||||
BooleanBuilder builder = new BooleanBuilder();
|
BooleanBuilder builder = new BooleanBuilder();
|
||||||
|
|
||||||
List<Integer> latestIds =
|
List<Integer> latestIds =
|
||||||
queryFactory
|
queryFactory
|
||||||
.select(systemMetricEntity.id1.max())
|
.select(systemMetricEntity.id1.max())
|
||||||
.from(systemMetricEntity)
|
.from(systemMetricEntity)
|
||||||
.groupBy(systemMetricEntity.serverName)
|
.groupBy(systemMetricEntity.serverName)
|
||||||
.fetch();
|
.fetch();
|
||||||
|
|
||||||
List<Integer> latestGpuIds =
|
List<Integer> latestGpuIds =
|
||||||
queryFactory
|
queryFactory
|
||||||
.select(gpuMetricEntity.id1.max())
|
.select(gpuMetricEntity.id1.max())
|
||||||
.from(gpuMetricEntity)
|
.from(gpuMetricEntity)
|
||||||
.groupBy(gpuMetricEntity.serverName)
|
.groupBy(gpuMetricEntity.serverName)
|
||||||
.fetch();
|
.fetch();
|
||||||
|
|
||||||
List<InferenceServerStatusDto> foundContent =
|
List<InferenceServerStatusDto> foundContent =
|
||||||
queryFactory
|
queryFactory
|
||||||
.select(
|
.select(
|
||||||
Projections.constructor(
|
Projections.constructor(
|
||||||
InferenceServerStatusDto.class,
|
InferenceServerStatusDto.class,
|
||||||
systemMetricEntity.serverName,
|
systemMetricEntity.serverName,
|
||||||
systemMetricEntity.cpuUser,
|
systemMetricEntity.cpuUser,
|
||||||
systemMetricEntity.cpuSystem,
|
systemMetricEntity.cpuSystem,
|
||||||
systemMetricEntity.memused,
|
systemMetricEntity.memused,
|
||||||
systemMetricEntity.kbmemused,
|
systemMetricEntity.kbmemused,
|
||||||
gpuMetricEntity.gpuUtil))
|
gpuMetricEntity.gpuUtil))
|
||||||
.from(systemMetricEntity)
|
.from(systemMetricEntity)
|
||||||
.leftJoin(gpuMetricEntity)
|
.leftJoin(gpuMetricEntity)
|
||||||
.on(
|
.on(
|
||||||
gpuMetricEntity
|
gpuMetricEntity
|
||||||
.id1
|
.id1
|
||||||
.in(latestGpuIds)
|
.in(latestGpuIds)
|
||||||
.and(gpuMetricEntity.serverName.eq(systemMetricEntity.serverName)))
|
.and(gpuMetricEntity.serverName.eq(systemMetricEntity.serverName)))
|
||||||
.where(systemMetricEntity.id1.in(latestIds)) // In 절 사용
|
.where(systemMetricEntity.id1.in(latestIds)) // In 절 사용
|
||||||
.orderBy(systemMetricEntity.serverName.asc())
|
.orderBy(systemMetricEntity.serverName.asc())
|
||||||
.limit(4)
|
.limit(4)
|
||||||
.fetch();
|
.fetch();
|
||||||
|
|
||||||
return foundContent;
|
return foundContent;
|
||||||
}
|
}
|
||||||
@@ -154,11 +154,11 @@ public class MapSheetLearnRepositoryImpl implements MapSheetLearnRepositoryCusto
|
|||||||
@Override
|
@Override
|
||||||
public Optional<MapSheetLearnEntity> getInferenceResultByStatus(String status) {
|
public Optional<MapSheetLearnEntity> getInferenceResultByStatus(String status) {
|
||||||
return Optional.ofNullable(
|
return Optional.ofNullable(
|
||||||
queryFactory
|
queryFactory
|
||||||
.selectFrom(mapSheetLearnEntity)
|
.selectFrom(mapSheetLearnEntity)
|
||||||
.where(mapSheetLearnEntity.status.eq(status))
|
.where(mapSheetLearnEntity.status.eq(status))
|
||||||
.limit(1)
|
.limit(1)
|
||||||
.fetchOne());
|
.fetchOne());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -177,46 +177,46 @@ public class MapSheetLearnRepositoryImpl implements MapSheetLearnRepositoryCusto
|
|||||||
QModelMngEntity m3Model = new QModelMngEntity("m3Model");
|
QModelMngEntity m3Model = new QModelMngEntity("m3Model");
|
||||||
|
|
||||||
InferenceStatusDetailDto foundContent =
|
InferenceStatusDetailDto foundContent =
|
||||||
queryFactory
|
queryFactory
|
||||||
.select(
|
.select(
|
||||||
Projections.constructor(
|
Projections.constructor(
|
||||||
InferenceStatusDetailDto.class,
|
InferenceStatusDetailDto.class,
|
||||||
mapSheetLearnEntity.detectingCnt,
|
mapSheetLearnEntity.detectingCnt,
|
||||||
mapSheetLearnEntity.m1PendingJobs,
|
mapSheetLearnEntity.m1PendingJobs,
|
||||||
mapSheetLearnEntity.m2PendingJobs,
|
mapSheetLearnEntity.m2PendingJobs,
|
||||||
mapSheetLearnEntity.m3PendingJobs,
|
mapSheetLearnEntity.m3PendingJobs,
|
||||||
mapSheetLearnEntity.m1CompletedJobs,
|
mapSheetLearnEntity.m1CompletedJobs,
|
||||||
mapSheetLearnEntity.m2CompletedJobs,
|
mapSheetLearnEntity.m2CompletedJobs,
|
||||||
mapSheetLearnEntity.m3CompletedJobs,
|
mapSheetLearnEntity.m3CompletedJobs,
|
||||||
mapSheetLearnEntity.m1FailedJobs,
|
mapSheetLearnEntity.m1FailedJobs,
|
||||||
mapSheetLearnEntity.m2FailedJobs,
|
mapSheetLearnEntity.m2FailedJobs,
|
||||||
mapSheetLearnEntity.m3FailedJobs,
|
mapSheetLearnEntity.m3FailedJobs,
|
||||||
mapSheetLearnEntity.m1ModelStartDttm,
|
mapSheetLearnEntity.m1ModelStartDttm,
|
||||||
mapSheetLearnEntity.m2ModelStartDttm,
|
mapSheetLearnEntity.m2ModelStartDttm,
|
||||||
mapSheetLearnEntity.m3ModelStartDttm,
|
mapSheetLearnEntity.m3ModelStartDttm,
|
||||||
mapSheetLearnEntity.m1ModelEndDttm,
|
mapSheetLearnEntity.m1ModelEndDttm,
|
||||||
mapSheetLearnEntity.m2ModelEndDttm,
|
mapSheetLearnEntity.m2ModelEndDttm,
|
||||||
mapSheetLearnEntity.m3ModelEndDttm,
|
mapSheetLearnEntity.m3ModelEndDttm,
|
||||||
mapSheetLearnEntity.title,
|
mapSheetLearnEntity.title,
|
||||||
mapSheetLearnEntity.compareYyyy,
|
mapSheetLearnEntity.compareYyyy,
|
||||||
mapSheetLearnEntity.targetYyyy,
|
mapSheetLearnEntity.targetYyyy,
|
||||||
mapSheetLearnEntity.stage,
|
mapSheetLearnEntity.stage,
|
||||||
mapSheetLearnEntity.inferStartDttm,
|
mapSheetLearnEntity.inferStartDttm,
|
||||||
mapSheetLearnEntity.inferEndDttm,
|
mapSheetLearnEntity.inferEndDttm,
|
||||||
mapSheetLearnEntity.detectOption,
|
mapSheetLearnEntity.detectOption,
|
||||||
mapSheetLearnEntity.mapSheetScope,
|
mapSheetLearnEntity.mapSheetScope,
|
||||||
m1Model.modelVer.as("model1Ver"),
|
m1Model.modelVer.as("model1Ver"),
|
||||||
m2Model.modelVer.as("model2Ver"),
|
m2Model.modelVer.as("model2Ver"),
|
||||||
m3Model.modelVer.as("model3Ver")))
|
m3Model.modelVer.as("model3Ver")))
|
||||||
.from(mapSheetLearnEntity)
|
.from(mapSheetLearnEntity)
|
||||||
.leftJoin(m1Model)
|
.leftJoin(m1Model)
|
||||||
.on(m1Model.uuid.eq(mapSheetLearnEntity.m1ModelUuid))
|
.on(m1Model.uuid.eq(mapSheetLearnEntity.m1ModelUuid))
|
||||||
.leftJoin(m2Model)
|
.leftJoin(m2Model)
|
||||||
.on(m2Model.uuid.eq(mapSheetLearnEntity.m2ModelUuid))
|
.on(m2Model.uuid.eq(mapSheetLearnEntity.m2ModelUuid))
|
||||||
.leftJoin(m3Model)
|
.leftJoin(m3Model)
|
||||||
.on(m3Model.uuid.eq(mapSheetLearnEntity.m3ModelUuid))
|
.on(m3Model.uuid.eq(mapSheetLearnEntity.m3ModelUuid))
|
||||||
.where(mapSheetLearnEntity.uuid.eq(uuid))
|
.where(mapSheetLearnEntity.uuid.eq(uuid))
|
||||||
.fetchOne();
|
.fetchOne();
|
||||||
|
|
||||||
return foundContent;
|
return foundContent;
|
||||||
}
|
}
|
||||||
@@ -227,30 +227,30 @@ public class MapSheetLearnRepositoryImpl implements MapSheetLearnRepositoryCusto
|
|||||||
QModelMngEntity model = new QModelMngEntity("model");
|
QModelMngEntity model = new QModelMngEntity("model");
|
||||||
|
|
||||||
InferenceProgressDto dto =
|
InferenceProgressDto dto =
|
||||||
queryFactory
|
queryFactory
|
||||||
.select(
|
.select(
|
||||||
Projections.constructor(
|
Projections.constructor(
|
||||||
InferenceProgressDto.class,
|
InferenceProgressDto.class,
|
||||||
Projections.constructor(
|
Projections.constructor(
|
||||||
InferenceProgressDto.pred_requests_areas.class,
|
InferenceProgressDto.pred_requests_areas.class,
|
||||||
mapSheetLearnEntity.compareYyyy,
|
mapSheetLearnEntity.compareYyyy,
|
||||||
mapSheetLearnEntity.targetYyyy,
|
mapSheetLearnEntity.targetYyyy,
|
||||||
mapSheetLearnEntity.modelComparePath,
|
mapSheetLearnEntity.modelComparePath,
|
||||||
mapSheetLearnEntity.modelTargetPath),
|
mapSheetLearnEntity.modelTargetPath),
|
||||||
model.modelVer.as("modelVer"),
|
model.modelVer.as("modelVer"),
|
||||||
model.cdModelPath.as("cdModelPath"),
|
model.cdModelPath.as("cdModelPath"),
|
||||||
model.cdModelFileName.as("cdModelFileName"),
|
model.cdModelFileName.as("cdModelFileName"),
|
||||||
model.cdModelConfigPath.as("cdModelConfigPath"),
|
model.cdModelConfigPath.as("cdModelConfigPath"),
|
||||||
model.cdModelConfigFileName.as("cdModelConfigFileName"),
|
model.cdModelConfigFileName.as("cdModelConfigFileName"),
|
||||||
model.clsModelPath,
|
model.clsModelPath,
|
||||||
model.clsModelFileName,
|
model.clsModelFileName,
|
||||||
model.clsModelVersion,
|
model.clsModelVersion,
|
||||||
model.priority))
|
model.priority))
|
||||||
.from(mapSheetLearnEntity)
|
.from(mapSheetLearnEntity)
|
||||||
.join(model)
|
.join(model)
|
||||||
.on(model.uuid.eq(modelUuid))
|
.on(model.uuid.eq(modelUuid))
|
||||||
.where(mapSheetLearnEntity.id.eq(id))
|
.where(mapSheetLearnEntity.id.eq(id))
|
||||||
.fetchOne();
|
.fetchOne();
|
||||||
return dto;
|
return dto;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -261,10 +261,10 @@ public class MapSheetLearnRepositoryImpl implements MapSheetLearnRepositoryCusto
|
|||||||
*/
|
*/
|
||||||
public UUID getProcessing() {
|
public UUID getProcessing() {
|
||||||
return queryFactory
|
return queryFactory
|
||||||
.select(mapSheetLearnEntity.uuid)
|
.select(mapSheetLearnEntity.uuid)
|
||||||
.from(mapSheetLearnEntity)
|
.from(mapSheetLearnEntity)
|
||||||
.where(mapSheetLearnEntity.status.eq("IN_PROGRESS"))
|
.where(mapSheetLearnEntity.status.eq("IN_PROGRESS"))
|
||||||
.fetchOne();
|
.fetchOne();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -274,17 +274,17 @@ public class MapSheetLearnRepositoryImpl implements MapSheetLearnRepositoryCusto
|
|||||||
entity.setTargetYyyy(targetYear);
|
entity.setTargetYyyy(targetYear);
|
||||||
|
|
||||||
Integer stage =
|
Integer stage =
|
||||||
queryFactory
|
queryFactory
|
||||||
.select(mapSheetLearnEntity.stage)
|
.select(mapSheetLearnEntity.stage)
|
||||||
.from(mapSheetLearnEntity)
|
.from(mapSheetLearnEntity)
|
||||||
.where(
|
.where(
|
||||||
mapSheetLearnEntity
|
mapSheetLearnEntity
|
||||||
.compareYyyy
|
.compareYyyy
|
||||||
.eq(compareYear)
|
.eq(compareYear)
|
||||||
.and(mapSheetLearnEntity.targetYyyy.eq(targetYear)))
|
.and(mapSheetLearnEntity.targetYyyy.eq(targetYear)))
|
||||||
.orderBy(mapSheetLearnEntity.stage.desc())
|
.orderBy(mapSheetLearnEntity.stage.desc())
|
||||||
.limit(1)
|
.limit(1)
|
||||||
.fetchOne();
|
.fetchOne();
|
||||||
|
|
||||||
return stage == null ? 1 : stage + 1;
|
return stage == null ? 1 : stage + 1;
|
||||||
}
|
}
|
||||||
@@ -296,28 +296,28 @@ public class MapSheetLearnRepositoryImpl implements MapSheetLearnRepositoryCusto
|
|||||||
QModelMngEntity m3 = new QModelMngEntity("m3");
|
QModelMngEntity m3 = new QModelMngEntity("m3");
|
||||||
|
|
||||||
return queryFactory
|
return queryFactory
|
||||||
.select(
|
.select(
|
||||||
Projections.constructor(
|
Projections.constructor(
|
||||||
AnalResultInfo.class,
|
AnalResultInfo.class,
|
||||||
mapSheetLearnEntity.title,
|
mapSheetLearnEntity.title,
|
||||||
m1.modelVer,
|
m1.modelVer,
|
||||||
m2.modelVer,
|
m2.modelVer,
|
||||||
m3.modelVer,
|
m3.modelVer,
|
||||||
mapSheetLearnEntity.compareYyyy,
|
mapSheetLearnEntity.compareYyyy,
|
||||||
mapSheetLearnEntity.targetYyyy,
|
mapSheetLearnEntity.targetYyyy,
|
||||||
mapSheetLearnEntity.detectOption,
|
mapSheetLearnEntity.detectOption,
|
||||||
mapSheetLearnEntity.mapSheetScope,
|
mapSheetLearnEntity.mapSheetScope,
|
||||||
mapSheetLearnEntity.inferStartDttm,
|
mapSheetLearnEntity.inferStartDttm,
|
||||||
mapSheetLearnEntity.inferEndDttm))
|
mapSheetLearnEntity.inferEndDttm))
|
||||||
.from(mapSheetLearnEntity)
|
.from(mapSheetLearnEntity)
|
||||||
.leftJoin(m1)
|
.leftJoin(m1)
|
||||||
.on(mapSheetLearnEntity.m1ModelUuid.eq(m1.uuid))
|
.on(mapSheetLearnEntity.m1ModelUuid.eq(m1.uuid))
|
||||||
.leftJoin(m2)
|
.leftJoin(m2)
|
||||||
.on(mapSheetLearnEntity.m2ModelUuid.eq(m2.uuid))
|
.on(mapSheetLearnEntity.m2ModelUuid.eq(m2.uuid))
|
||||||
.leftJoin(m3)
|
.leftJoin(m3)
|
||||||
.on(mapSheetLearnEntity.m3ModelUuid.eq(m3.uuid))
|
.on(mapSheetLearnEntity.m3ModelUuid.eq(m3.uuid))
|
||||||
.where(mapSheetLearnEntity.uuid.eq(UUID.fromString(uuid)))
|
.where(mapSheetLearnEntity.uuid.eq(UUID.fromString(uuid)))
|
||||||
.fetchOne();
|
.fetchOne();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
Reference in New Issue
Block a user