추론관리 목록 조회 수정

This commit is contained in:
2026-01-14 18:16:35 +09:00
parent 5b19924a06
commit 993a06243c
2 changed files with 65 additions and 11 deletions

View File

@@ -8,6 +8,7 @@ import com.kamco.cd.kamcoback.common.utils.interfaces.JsonFormatDttm;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank; import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull; import jakarta.validation.constraints.NotNull;
import java.time.Duration;
import java.time.LocalDate; import java.time.LocalDate;
import java.time.ZonedDateTime; import java.time.ZonedDateTime;
import java.util.Arrays; import java.util.Arrays;
@@ -129,6 +130,7 @@ public class InferenceResultDto {
} }
/** 목록조회 dto */ /** 목록조회 dto */
@Schema(name = "ResultList", description = "추론관리 목록")
@Getter @Getter
@Setter @Setter
@AllArgsConstructor @AllArgsConstructor
@@ -136,20 +138,70 @@ public class InferenceResultDto {
public static class ResultList { public static class ResultList {
private UUID uuid; private UUID uuid;
private String title;
private String status;
private String mapSheetCnt;
private Long detectingCnt;
@JsonFormatDttm private ZonedDateTime startTime;
@JsonFormatDttm private ZonedDateTime endTime;
@JsonFormatDttm private ZonedDateTime elapsedTime;
private Boolean applyYn;
@JsonFormatDttm private ZonedDateTime applyDttm;
@Schema(description = "제목")
private String title;
@Schema(description = "회차")
private Integer stage;
@Schema(description = "상태")
private String status;
@Schema(description = "분석 도엽")
private String mapSheetCnt;
@Schema(description = "탐지건수")
private Long detectingCnt;
@Schema(description = "시작일시")
@JsonFormatDttm
private ZonedDateTime startTime;
@Schema(description = "종료일시")
@JsonFormatDttm
private ZonedDateTime endTime;
@Schema(description = "반영여부")
private Boolean applyYn;
@Schema(description = "반영일시")
@JsonFormatDttm
private ZonedDateTime applyDttm;
@Schema(description = "비교년도")
private Integer compareYyyy;
@Schema(description = "기준년도")
private Integer targetYyyy;
@Schema(description = "상태명")
@JsonProperty("statusName") @JsonProperty("statusName")
public String statusName() { public String statusName() {
return Status.getDescByCode(this.status); return Status.getDescByCode(this.status);
} }
@Schema(description = "소요시간")
@JsonProperty("elapsedTim")
public String getElapsedTime() {
if (this.startTime == null || this.endTime == null) {
return null;
}
ZonedDateTime start = this.startTime;
ZonedDateTime end = this.endTime;
Duration d = Duration.between(start, end);
if (d.isNegative()) {
d = d.negated();
}
long s = d.getSeconds();
long h = s / 3600;
long m = (s % 3600) / 60;
long sec = s % 60;
return String.format("%dH %dM %dS", h, m, sec);
}
} }
/** 목록조회 검색 조건 dto */ /** 목록조회 검색 조건 dto */

View File

@@ -190,13 +190,15 @@ public class MapSheetLearnEntity {
return new InferenceResultDto.ResultList( return new InferenceResultDto.ResultList(
this.uuid, this.uuid,
this.title, this.title,
this.stage,
this.status, this.status,
this.mapSheetCnt, this.mapSheetCnt,
this.detectingCnt, this.detectingCnt,
this.inferStartDttm, this.inferStartDttm,
this.inferEndDttm, this.inferEndDttm,
this.elapsedTime,
this.applyYn, this.applyYn,
this.applyDttm); this.applyDttm,
this.compareYyyy,
this.targetYyyy);
} }
} }