spotless 적용
This commit is contained in:
@@ -22,9 +22,7 @@ import org.springframework.data.domain.Pageable;
|
||||
|
||||
public class InferenceResultDto {
|
||||
|
||||
/**
|
||||
* 탐지 데이터 옵션 dto
|
||||
*/
|
||||
/** 탐지 데이터 옵션 dto */
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum MapSheetScope implements EnumType {
|
||||
@@ -53,9 +51,7 @@ public class InferenceResultDto {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 분석대상 도엽 enum
|
||||
*/
|
||||
/** 분석대상 도엽 enum */
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum DetectOption implements EnumType {
|
||||
@@ -132,9 +128,7 @@ public class InferenceResultDto {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 목록조회 dto
|
||||
*/
|
||||
/** 목록조회 dto */
|
||||
@Getter
|
||||
@Setter
|
||||
@AllArgsConstructor
|
||||
@@ -146,15 +140,11 @@ public class InferenceResultDto {
|
||||
private String status;
|
||||
private String mapSheetCnt;
|
||||
private Long detectingCnt;
|
||||
@JsonFormatDttm
|
||||
private ZonedDateTime startTime;
|
||||
@JsonFormatDttm
|
||||
private ZonedDateTime endTime;
|
||||
@JsonFormatDttm
|
||||
private ZonedDateTime elapsedTime;
|
||||
@JsonFormatDttm private ZonedDateTime startTime;
|
||||
@JsonFormatDttm private ZonedDateTime endTime;
|
||||
@JsonFormatDttm private ZonedDateTime elapsedTime;
|
||||
private Boolean applyYn;
|
||||
@JsonFormatDttm
|
||||
private ZonedDateTime applyDttm;
|
||||
@JsonFormatDttm private ZonedDateTime applyDttm;
|
||||
|
||||
@JsonProperty("statusName")
|
||||
public String statusName() {
|
||||
@@ -162,9 +152,7 @@ public class InferenceResultDto {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 목록조회 검색 조건 dto
|
||||
*/
|
||||
/** 목록조회 검색 조건 dto */
|
||||
@Getter
|
||||
@Setter
|
||||
@NoArgsConstructor
|
||||
@@ -186,9 +174,7 @@ public class InferenceResultDto {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 변화탐지 실행 정보 저장 요청 정보
|
||||
*/
|
||||
/** 변화탐지 실행 정보 저장 요청 정보 */
|
||||
@Getter
|
||||
@Setter
|
||||
@NoArgsConstructor
|
||||
@@ -252,64 +238,90 @@ public class InferenceResultDto {
|
||||
|
||||
@Schema(description = "탐지대상 도엽수")
|
||||
private Long detectingCnt;
|
||||
|
||||
@Schema(description = "모델1 분석 대기")
|
||||
private Integer m1PendingJobs;
|
||||
|
||||
@Schema(description = "모델2 분석 대기")
|
||||
private Integer m2PendingJobs;
|
||||
|
||||
@Schema(description = "모델3 분석 대기")
|
||||
private Integer m3PendingJobs;
|
||||
|
||||
@Schema(description = "모델1 분석 완료")
|
||||
private Integer m1CompletedJobs;
|
||||
|
||||
@Schema(description = "모델2 분석 완료")
|
||||
private Integer m2CompletedJobs;
|
||||
|
||||
@Schema(description = "모델3 분석 완료")
|
||||
private Integer m3CompletedJobs;
|
||||
|
||||
@Schema(description = "모델1 분석 실패")
|
||||
private Integer m1FailedJobs;
|
||||
|
||||
@Schema(description = "모델2 분석 실패")
|
||||
private Integer m2FailedJobs;
|
||||
|
||||
@Schema(description = "모델3 분석 실패")
|
||||
private Integer m3FailedJobs;
|
||||
|
||||
@Schema(description = "모델1 사용시간 시작일시")
|
||||
@JsonFormatDttm
|
||||
ZonedDateTime m1ModelStartDttm;
|
||||
|
||||
@Schema(description = "모델2 사용시간 시작일시")
|
||||
@JsonFormatDttm
|
||||
ZonedDateTime m2ModelStartDttm;
|
||||
|
||||
@Schema(description = "모델3 사용시간 시작일시")
|
||||
@JsonFormatDttm
|
||||
ZonedDateTime m3ModelStartDttm;
|
||||
|
||||
@Schema(description = "모델1 사용시간 종료일시")
|
||||
@JsonFormatDttm
|
||||
ZonedDateTime m1ModelEndDttm;
|
||||
|
||||
@Schema(description = "모델2 사용시간 종료일시")
|
||||
@JsonFormatDttm
|
||||
ZonedDateTime m2ModelEndDttm;
|
||||
|
||||
@Schema(description = "모델3 사용시간 종료일시")
|
||||
@JsonFormatDttm
|
||||
ZonedDateTime m3ModelEndDttm;
|
||||
|
||||
@Schema(description = "변화탐지 제목")
|
||||
private String title;
|
||||
|
||||
@Schema(description = "비교년도")
|
||||
private Integer compareYyyy;
|
||||
|
||||
@Schema(description = "기준년도")
|
||||
private Integer targetYyyy;
|
||||
|
||||
@Schema(description = "회차")
|
||||
private Integer stage;
|
||||
|
||||
@Schema(description = "변화탐지 시작")
|
||||
@JsonFormatDttm
|
||||
private ZonedDateTime inferStartDttm;
|
||||
|
||||
@Schema(description = "변화탐지 종료")
|
||||
@JsonFormatDttm
|
||||
private ZonedDateTime inferEndDttm;
|
||||
|
||||
@Schema(description = "변화탐지 옵션")
|
||||
private String detectOption;
|
||||
|
||||
@Schema(description = "분석도엽")
|
||||
private String mapSheetScope;
|
||||
|
||||
@Schema(description = "모델1 버전")
|
||||
private String modelVer1;
|
||||
|
||||
@Schema(description = "모델2 버전")
|
||||
private String modelVer2;
|
||||
|
||||
@Schema(description = "모델3 버전")
|
||||
private String modelVer3;
|
||||
|
||||
@@ -340,8 +352,7 @@ public class InferenceResultDto {
|
||||
String mapSheetScope,
|
||||
String modelVer1,
|
||||
String modelVer2,
|
||||
String modelVer3
|
||||
) {
|
||||
String modelVer3) {
|
||||
this.detectingCnt = detectingCnt;
|
||||
this.m1PendingJobs = m1PendingJobs;
|
||||
this.m2PendingJobs = m2PendingJobs;
|
||||
@@ -375,7 +386,13 @@ public class InferenceResultDto {
|
||||
private int getProgress() {
|
||||
long tiles = this.detectingCnt; // 도엽수
|
||||
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; // 전체 작업량
|
||||
return (int) ((completed * 100L) / total);
|
||||
@@ -392,7 +409,6 @@ public class InferenceResultDto {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@NoArgsConstructor
|
||||
@@ -400,12 +416,9 @@ public class InferenceResultDto {
|
||||
public static class InferenceServerStatusDto {
|
||||
|
||||
private String serverName;
|
||||
@JsonIgnore
|
||||
private float cpu_user;
|
||||
@JsonIgnore
|
||||
private float cpu_system;
|
||||
@JsonIgnore
|
||||
private float memused;
|
||||
@JsonIgnore private float cpu_user;
|
||||
@JsonIgnore private float cpu_system;
|
||||
@JsonIgnore private float memused;
|
||||
private Long kbmemused;
|
||||
private float gpuUtil;
|
||||
|
||||
|
||||
@@ -307,8 +307,7 @@ public class InferenceResultService {
|
||||
// 4) 응답 파싱
|
||||
try {
|
||||
List<Map<String, Object>> list =
|
||||
objectMapper.readValue(result.body(), new TypeReference<>() {
|
||||
});
|
||||
objectMapper.readValue(result.body(), new TypeReference<>() {});
|
||||
|
||||
if (list.isEmpty()) {
|
||||
throw new IllegalStateException("Inference response is empty");
|
||||
|
||||
@@ -270,7 +270,8 @@ public class InferenceResultCoreService {
|
||||
|
||||
private void applyModelUpdate(MapSheetLearnEntity entity, SaveInferenceAiDto request) {
|
||||
switch (request.getType()) {
|
||||
case "M1" -> applyModelFields(
|
||||
case "M1" ->
|
||||
applyModelFields(
|
||||
request,
|
||||
entity::setM1ModelBatchId,
|
||||
entity::setM1ModelStartDttm,
|
||||
@@ -279,7 +280,8 @@ public class InferenceResultCoreService {
|
||||
entity::setM1RunningJobs,
|
||||
entity::setM1CompletedJobs,
|
||||
entity::setM1FailedJobs);
|
||||
case "M2" -> applyModelFields(
|
||||
case "M2" ->
|
||||
applyModelFields(
|
||||
request,
|
||||
entity::setM2ModelBatchId,
|
||||
entity::setM2ModelStartDttm,
|
||||
@@ -288,7 +290,8 @@ public class InferenceResultCoreService {
|
||||
entity::setM2RunningJobs,
|
||||
entity::setM2CompletedJobs,
|
||||
entity::setM2FailedJobs);
|
||||
case "M3" -> applyModelFields(
|
||||
case "M3" ->
|
||||
applyModelFields(
|
||||
request,
|
||||
entity::setM3ModelBatchId,
|
||||
entity::setM3ModelStartDttm,
|
||||
|
||||
Reference in New Issue
Block a user