Merge pull request 'feat/infer_dev_260107' (#234) from feat/infer_dev_260107 into develop
Reviewed-on: https://kamco.gitea.gs.dabeeo.com/dabeeo/kamco-dabeeo-backoffice/pulls/234
This commit is contained in:
@@ -8,6 +8,7 @@ import com.kamco.cd.kamcoback.common.utils.interfaces.JsonFormatDttm;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import java.time.Duration;
|
||||
import java.time.LocalDate;
|
||||
import java.time.ZonedDateTime;
|
||||
import java.util.Arrays;
|
||||
@@ -129,6 +130,7 @@ public class InferenceResultDto {
|
||||
}
|
||||
|
||||
/** 목록조회 dto */
|
||||
@Schema(name = "ResultList", description = "추론관리 목록")
|
||||
@Getter
|
||||
@Setter
|
||||
@AllArgsConstructor
|
||||
@@ -136,20 +138,70 @@ public class InferenceResultDto {
|
||||
public static class ResultList {
|
||||
|
||||
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")
|
||||
public String statusName() {
|
||||
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 */
|
||||
@@ -382,6 +434,7 @@ public class InferenceResultDto {
|
||||
this.modelVer3 = modelVer3;
|
||||
}
|
||||
|
||||
@Schema(description = "진행률")
|
||||
@JsonProperty("progress")
|
||||
private int getProgress() {
|
||||
long tiles = this.detectingCnt; // 도엽수
|
||||
@@ -395,14 +448,19 @@ public class InferenceResultDto {
|
||||
+ this.m3FailedJobs; // 완료수
|
||||
|
||||
long total = tiles * models; // 전체 작업량
|
||||
if (completed >= total) {
|
||||
return 100;
|
||||
}
|
||||
return (int) ((completed * 100L) / total);
|
||||
}
|
||||
|
||||
@Schema(description = "변화탐지 옵션명")
|
||||
@JsonProperty("detectOptionName")
|
||||
private String getDetectOptionName() {
|
||||
return DetectOption.getDescByCode(this.detectOption);
|
||||
}
|
||||
|
||||
@Schema(description = "분석도엽 명")
|
||||
@JsonProperty("mapSheetScopeName")
|
||||
private String getMapSheetScope() {
|
||||
return MapSheetScope.getDescByCode(this.mapSheetScope);
|
||||
|
||||
@@ -190,13 +190,15 @@ public class MapSheetLearnEntity {
|
||||
return new InferenceResultDto.ResultList(
|
||||
this.uuid,
|
||||
this.title,
|
||||
this.stage,
|
||||
this.status,
|
||||
this.mapSheetCnt,
|
||||
this.detectingCnt,
|
||||
this.inferStartDttm,
|
||||
this.inferEndDttm,
|
||||
this.elapsedTime,
|
||||
this.applyYn,
|
||||
this.applyDttm);
|
||||
this.applyDttm,
|
||||
this.compareYyyy,
|
||||
this.targetYyyy);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user