데이터셋 조회 수정 #15

Merged
teddy merged 1 commits from feat/training_260202 into develop 2026-02-04 14:11:00 +09:00
2 changed files with 26 additions and 8 deletions
Showing only changes of commit 3c0a12da4e - Show all commits

View File

@@ -231,28 +231,34 @@ public class DatasetDto {
private Long datasetId;
private UUID uuid;
private String groupTitle;
private String dataType;
private String yyyy;
private Long roundNo;
private Integer compareYyyy;
private Integer targetYyyy;
private String memo;
private Long classCount;
private Integer buildingCount;
private Integer containerCount;
private String groupTitleCd;
private String dataTypeName;
public SelectDataSet(
Long datasetId,
UUID uuid,
String groupTitle,
String dataType,
String yyyy,
Long roundNo,
Integer compareYyyy,
Integer targetYyyy,
String memo,
Long classCount) {
this.datasetId = datasetId;
this.uuid = uuid;
this.groupTitle = groupTitle;
this.dataType = dataType;
this.yyyy = yyyy;
this.roundNo = roundNo;
this.compareYyyy = compareYyyy;
this.targetYyyy = targetYyyy;
this.memo = memo;
this.classCount = classCount;
}
@@ -260,26 +266,34 @@ public class DatasetDto {
public SelectDataSet(
Long datasetId,
UUID uuid,
String groupTitle,
String dataType,
String yyyy,
Long roundNo,
Integer compareYyyy,
Integer targetYyyy,
String memo,
Integer buildingCount,
Integer containerCount) {
this.datasetId = datasetId;
this.uuid = uuid;
this.groupTitle = getGroupTitle(groupTitle);
this.groupTitleCd = groupTitle;
this.dataType = dataType;
this.dataTypeName = getDataTypeName(dataType);
this.yyyy = yyyy;
this.roundNo = roundNo;
this.compareYyyy = compareYyyy;
this.targetYyyy = targetYyyy;
this.memo = memo;
this.buildingCount = buildingCount;
this.containerCount = containerCount;
}
public String getGroupTitle(String groupTitleCd) {
public String getDataTypeName(String groupTitleCd) {
LearnDataType type = Enums.fromId(LearnDataType.class, groupTitleCd);
return type == null ? null : type.getText();
}
public String getYear() {
return this.compareYyyy + "-" + this.targetYyyy;
}
}
}

View File

@@ -97,6 +97,8 @@ public class DatasetRepositoryImpl implements DatasetRepositoryCustom {
dataset.dataType,
dataset.title,
dataset.roundNo,
dataset.compareYyyy,
dataset.targetYyyy,
dataset.memo,
new CaseBuilder()
.when(datasetObjEntity.targetClassCd.eq("building"))
@@ -158,6 +160,8 @@ public class DatasetRepositoryImpl implements DatasetRepositoryCustom {
dataset.dataType,
dataset.title,
dataset.roundNo,
dataset.compareYyyy,
dataset.targetYyyy,
dataset.memo,
selectedCnt.as("cnt")))
.from(dataset)