2 Commits

Author SHA1 Message Date
5bc59c0e0b Merge pull request '데이터셋 조회 수정' (#15) from feat/training_260202 into develop
Reviewed-on: #15
2026-02-04 14:11:00 +09:00
3c0a12da4e 데이터셋 조회 수정 2026-02-04 14:10:46 +09:00
2 changed files with 26 additions and 8 deletions

View File

@@ -231,28 +231,34 @@ public class DatasetDto {
private Long datasetId; private Long datasetId;
private UUID uuid; private UUID uuid;
private String groupTitle; private String dataType;
private String yyyy; private String yyyy;
private Long roundNo; private Long roundNo;
private Integer compareYyyy;
private Integer targetYyyy;
private String memo; private String memo;
private Long classCount; private Long classCount;
private Integer buildingCount; private Integer buildingCount;
private Integer containerCount; private Integer containerCount;
private String groupTitleCd; private String dataTypeName;
public SelectDataSet( public SelectDataSet(
Long datasetId, Long datasetId,
UUID uuid, UUID uuid,
String groupTitle, String dataType,
String yyyy, String yyyy,
Long roundNo, Long roundNo,
Integer compareYyyy,
Integer targetYyyy,
String memo, String memo,
Long classCount) { Long classCount) {
this.datasetId = datasetId; this.datasetId = datasetId;
this.uuid = uuid; this.uuid = uuid;
this.groupTitle = groupTitle; this.dataType = dataType;
this.yyyy = yyyy; this.yyyy = yyyy;
this.roundNo = roundNo; this.roundNo = roundNo;
this.compareYyyy = compareYyyy;
this.targetYyyy = targetYyyy;
this.memo = memo; this.memo = memo;
this.classCount = classCount; this.classCount = classCount;
} }
@@ -260,26 +266,34 @@ public class DatasetDto {
public SelectDataSet( public SelectDataSet(
Long datasetId, Long datasetId,
UUID uuid, UUID uuid,
String groupTitle, String dataType,
String yyyy, String yyyy,
Long roundNo, Long roundNo,
Integer compareYyyy,
Integer targetYyyy,
String memo, String memo,
Integer buildingCount, Integer buildingCount,
Integer containerCount) { Integer containerCount) {
this.datasetId = datasetId; this.datasetId = datasetId;
this.uuid = uuid; this.uuid = uuid;
this.groupTitle = getGroupTitle(groupTitle); this.dataType = dataType;
this.groupTitleCd = groupTitle; this.dataTypeName = getDataTypeName(dataType);
this.yyyy = yyyy; this.yyyy = yyyy;
this.roundNo = roundNo; this.roundNo = roundNo;
this.compareYyyy = compareYyyy;
this.targetYyyy = targetYyyy;
this.memo = memo; this.memo = memo;
this.buildingCount = buildingCount; this.buildingCount = buildingCount;
this.containerCount = containerCount; this.containerCount = containerCount;
} }
public String getGroupTitle(String groupTitleCd) { public String getDataTypeName(String groupTitleCd) {
LearnDataType type = Enums.fromId(LearnDataType.class, groupTitleCd); LearnDataType type = Enums.fromId(LearnDataType.class, groupTitleCd);
return type == null ? null : type.getText(); 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.dataType,
dataset.title, dataset.title,
dataset.roundNo, dataset.roundNo,
dataset.compareYyyy,
dataset.targetYyyy,
dataset.memo, dataset.memo,
new CaseBuilder() new CaseBuilder()
.when(datasetObjEntity.targetClassCd.eq("building")) .when(datasetObjEntity.targetClassCd.eq("building"))
@@ -158,6 +160,8 @@ public class DatasetRepositoryImpl implements DatasetRepositoryCustom {
dataset.dataType, dataset.dataType,
dataset.title, dataset.title,
dataset.roundNo, dataset.roundNo,
dataset.compareYyyy,
dataset.targetYyyy,
dataset.memo, dataset.memo,
selectedCnt.as("cnt"))) selectedCnt.as("cnt")))
.from(dataset) .from(dataset)