feat: fix
This commit is contained in:
@@ -1,10 +1,12 @@
|
||||
package com.kamco.cd.kamcoback.inference.dto;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.kamco.cd.kamcoback.common.enums.DetectionClassification;
|
||||
import com.kamco.cd.kamcoback.common.utils.interfaces.JsonFormatDttm;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import java.time.ZonedDateTime;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
@@ -178,12 +180,45 @@ public class InferenceResultDto {
|
||||
@AllArgsConstructor
|
||||
public static class DetailListEntity {
|
||||
|
||||
private Uid code;
|
||||
private Double detectionScore;
|
||||
private Clazz compare;
|
||||
private Clazz target;
|
||||
private Clazzes compare;
|
||||
private Clazzes target;
|
||||
private MapSheet mapSheet;
|
||||
private Coordinate center;
|
||||
@JsonFormatDttm private ZonedDateTime updatedDttm;
|
||||
|
||||
public DetailListEntity(
|
||||
UUID uuid,
|
||||
Double detectionScore,
|
||||
Clazzes compare,
|
||||
Clazzes target,
|
||||
MapSheet mapSheet,
|
||||
Coordinate center,
|
||||
ZonedDateTime updatedDttm) {
|
||||
this.code = new Uid(uuid);
|
||||
this.detectionScore = detectionScore;
|
||||
this.compare = compare;
|
||||
this.target = target;
|
||||
this.mapSheet = mapSheet;
|
||||
this.center = center;
|
||||
this.updatedDttm = updatedDttm;
|
||||
}
|
||||
}
|
||||
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public static class Uid {
|
||||
|
||||
private String shortCode;
|
||||
private String code;
|
||||
|
||||
public Uid(UUID uuid) {
|
||||
if (uuid != null) {
|
||||
this.shortCode = uuid.toString().substring(0, 8).toUpperCase();
|
||||
this.code = uuid.toString();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// MAP NO
|
||||
@@ -201,13 +236,41 @@ public class InferenceResultDto {
|
||||
|
||||
private String code;
|
||||
private String name;
|
||||
private Double score;
|
||||
@JsonIgnore private Double score;
|
||||
|
||||
public Clazz(String code, Double score) {
|
||||
this.code = code;
|
||||
this.score = score;
|
||||
this.name = DetectionClassification.fromString(code).getDesc();
|
||||
}
|
||||
|
||||
public Clazz(String code) {
|
||||
this.code = code;
|
||||
this.name = DetectionClassification.fromString(code).getDesc();
|
||||
}
|
||||
}
|
||||
|
||||
// classification info
|
||||
@Getter
|
||||
public static class Clazzes {
|
||||
|
||||
private DetectionClassification code;
|
||||
private String name;
|
||||
@JsonIgnore private Double score;
|
||||
private Integer order;
|
||||
|
||||
public Clazzes(DetectionClassification classification, Double score) {
|
||||
this.code = classification;
|
||||
this.name = classification.getDesc();
|
||||
this.order = classification.getOrder();
|
||||
this.score = score;
|
||||
}
|
||||
|
||||
public Clazzes(DetectionClassification classification) {
|
||||
this.code = classification;
|
||||
this.name = classification.getDesc();
|
||||
this.order = classification.getOrder();
|
||||
}
|
||||
}
|
||||
|
||||
// 좌표 정보 point
|
||||
|
||||
Reference in New Issue
Block a user