[KC-108] 상태 코드명 추가
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
package com.kamco.cd.kamcoback.inference.dto;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.kamco.cd.kamcoback.common.utils.enums.EnumType;
|
||||
import com.kamco.cd.kamcoback.common.utils.interfaces.EnumValid;
|
||||
import com.kamco.cd.kamcoback.common.utils.interfaces.JsonFormatDttm;
|
||||
@@ -8,6 +9,7 @@ import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import java.time.LocalDate;
|
||||
import java.time.ZonedDateTime;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
import lombok.AllArgsConstructor;
|
||||
@@ -36,6 +38,11 @@ public class InferenceResultDto {
|
||||
@JsonFormatDttm private ZonedDateTime elapsedTime;
|
||||
private Boolean applyYn;
|
||||
@JsonFormatDttm private ZonedDateTime applyDttm;
|
||||
|
||||
@JsonProperty("statusName")
|
||||
public String statusName() {
|
||||
return Status.getDescByCode(this.status);
|
||||
}
|
||||
}
|
||||
|
||||
/** 목록조회 검색 조건 dto */
|
||||
@@ -101,6 +108,37 @@ public class InferenceResultDto {
|
||||
}
|
||||
}
|
||||
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum Status implements EnumType {
|
||||
READY("대기"),
|
||||
IN_PROGRESS("진행중"),
|
||||
END("종료"),
|
||||
;
|
||||
private final String desc;
|
||||
|
||||
@Override
|
||||
public String getId() {
|
||||
return name();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getText() {
|
||||
return desc;
|
||||
}
|
||||
|
||||
public static Status fromCode(String code) {
|
||||
return Arrays.stream(values())
|
||||
.filter(v -> v.name().equals(code))
|
||||
.findFirst()
|
||||
.orElseThrow(() -> new IllegalArgumentException("알 수 없는 상태 코드: " + code));
|
||||
}
|
||||
|
||||
public static String getDescByCode(String code) {
|
||||
return fromCode(code).getDesc();
|
||||
}
|
||||
}
|
||||
|
||||
/** 변화탐지 실행 정보 저장 요청 정보 */
|
||||
@Getter
|
||||
@Setter
|
||||
|
||||
@@ -51,7 +51,7 @@ public class MapSheetLearnRepositoryImpl implements MapSheetLearnRepositoryCusto
|
||||
|
||||
// 제목
|
||||
if (StringUtils.isNotBlank(req.getTitle())) {
|
||||
builder.and(mapSheetLearnEntity.title.equalsIgnoreCase(req.getTitle()));
|
||||
builder.and(mapSheetLearnEntity.title.containsIgnoreCase(req.getTitle()));
|
||||
}
|
||||
|
||||
List<MapSheetLearnEntity> content =
|
||||
|
||||
Reference in New Issue
Block a user