spotless 적용

This commit is contained in:
2026-01-14 17:25:29 +09:00
parent 986b93c470
commit 05d10e63fe
5 changed files with 467 additions and 452 deletions

View File

@@ -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
@@ -252,64 +238,90 @@ 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;
@@ -340,8 +352,7 @@ public class InferenceResultDto {
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;
@@ -375,7 +386,13 @@ public class InferenceResultDto {
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;

View File

@@ -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");

View File

@@ -270,7 +270,8 @@ 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" ->
applyModelFields(
request, request,
entity::setM1ModelBatchId, entity::setM1ModelBatchId,
entity::setM1ModelStartDttm, entity::setM1ModelStartDttm,
@@ -279,7 +280,8 @@ public class InferenceResultCoreService {
entity::setM1RunningJobs, entity::setM1RunningJobs,
entity::setM1CompletedJobs, entity::setM1CompletedJobs,
entity::setM1FailedJobs); entity::setM1FailedJobs);
case "M2" -> applyModelFields( case "M2" ->
applyModelFields(
request, request,
entity::setM2ModelBatchId, entity::setM2ModelBatchId,
entity::setM2ModelStartDttm, entity::setM2ModelStartDttm,
@@ -288,7 +290,8 @@ public class InferenceResultCoreService {
entity::setM2RunningJobs, entity::setM2RunningJobs,
entity::setM2CompletedJobs, entity::setM2CompletedJobs,
entity::setM2FailedJobs); entity::setM2FailedJobs);
case "M3" -> applyModelFields( case "M3" ->
applyModelFields(
request, request,
entity::setM3ModelBatchId, entity::setM3ModelBatchId,
entity::setM3ModelStartDttm, entity::setM3ModelStartDttm,