[KC-103] 결과 테이블 적용
This commit is contained in:
@@ -200,7 +200,7 @@ public class InferenceResultDto {
|
|||||||
long m = (s % 3600) / 60;
|
long m = (s % 3600) / 60;
|
||||||
long sec = s % 60;
|
long sec = s % 60;
|
||||||
|
|
||||||
return String.format("%dH %dM %dS", h, m, sec);
|
return String.format("%d시간 %d분 %d초", h, m, sec);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -465,6 +465,42 @@ public class InferenceResultDto {
|
|||||||
private String getMapSheetScope() {
|
private String getMapSheetScope() {
|
||||||
return MapSheetScope.getDescByCode(this.mapSheetScope);
|
return MapSheetScope.getDescByCode(this.mapSheetScope);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Schema(description = "M1 사용시간")
|
||||||
|
@JsonProperty("m1ElapsedTim")
|
||||||
|
public String getM1ElapsedTime() {
|
||||||
|
return formatElapsedTime(this.m1ModelStartDttm, this.m1ModelEndDttm);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Schema(description = "M2 사용시간")
|
||||||
|
@JsonProperty("m2ElapsedTim")
|
||||||
|
public String getM2ElapsedTime() {
|
||||||
|
return formatElapsedTime(this.m2ModelStartDttm, this.m2ModelEndDttm);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Schema(description = "M3 사용시간")
|
||||||
|
@JsonProperty("m3ElapsedTim")
|
||||||
|
public String getM3ElapsedTime() {
|
||||||
|
return formatElapsedTime(this.m3ModelStartDttm, this.m3ModelEndDttm);
|
||||||
|
}
|
||||||
|
|
||||||
|
private String formatElapsedTime(ZonedDateTime start, ZonedDateTime end) {
|
||||||
|
if (start == null || end == null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
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("%d시간 %d분 %d초", h, m, sec);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Getter
|
@Getter
|
||||||
|
|||||||
Reference in New Issue
Block a user