모델학습 설정 dto 수정

This commit is contained in:
2026-02-04 14:03:25 +09:00
parent fdfda049f8
commit abe4272227
5 changed files with 12 additions and 29 deletions

View File

@@ -47,7 +47,7 @@ public class DatasetApiController {
example = "", example = "",
schema = @Schema(allowableValues = {"DELIVER", "PRODUCTION"})) schema = @Schema(allowableValues = {"DELIVER", "PRODUCTION"}))
@RequestParam(required = false) @RequestParam(required = false)
String groupTitle, String dataType,
@Parameter(description = "제목", example = "") @RequestParam(required = false) String title, @Parameter(description = "제목", example = "") @RequestParam(required = false) String title,
@Parameter(description = "페이지 번호 (0부터 시작)", example = "0") @RequestParam(defaultValue = "0") @Parameter(description = "페이지 번호 (0부터 시작)", example = "0") @RequestParam(defaultValue = "0")
int page, int page,
@@ -55,7 +55,7 @@ public class DatasetApiController {
int size) { int size) {
DatasetDto.SearchReq searchReq = new DatasetDto.SearchReq(); DatasetDto.SearchReq searchReq = new DatasetDto.SearchReq();
searchReq.setTitle(title); searchReq.setTitle(title);
searchReq.setGroupTitle(groupTitle); searchReq.setDataType(dataType);
searchReq.setPage(page); searchReq.setPage(page);
searchReq.setSize(size); searchReq.setSize(size);
return ApiResponseDto.ok(datasetService.searchDatasets(searchReq)); return ApiResponseDto.ok(datasetService.searchDatasets(searchReq));

View File

@@ -33,8 +33,6 @@ public class DatasetDto {
private Long id; private Long id;
private UUID uuid; private UUID uuid;
private String groupTitle;
private String groupTitleCd;
private String title; private String title;
private Long roundNo; private Long roundNo;
private Integer compareYyyy; private Integer compareYyyy;
@@ -50,7 +48,6 @@ public class DatasetDto {
public Basic( public Basic(
Long id, Long id,
UUID uuid, UUID uuid,
String groupTitle,
String title, String title,
Long roundNo, Long roundNo,
Integer compareYyyy, Integer compareYyyy,
@@ -63,8 +60,6 @@ public class DatasetDto {
String dataType) { String dataType) {
this.id = id; this.id = id;
this.uuid = uuid; this.uuid = uuid;
this.groupTitle = getGroupTitle(groupTitle);
this.groupTitleCd = groupTitle;
this.title = title; this.title = title;
this.roundNo = roundNo; this.roundNo = roundNo;
this.compareYyyy = compareYyyy; this.compareYyyy = compareYyyy;
@@ -84,11 +79,6 @@ public class DatasetDto {
return String.format("%.2fG", giga); return String.format("%.2fG", giga);
} }
public String getGroupTitle(String groupTitleCd) {
LearnDataType type = Enums.fromId(LearnDataType.class, groupTitleCd);
return type == null ? null : type.getText();
}
public String getStatus(String status) { public String getStatus(String status) {
LearnDataRegister type = Enums.fromId(LearnDataRegister.class, status); LearnDataRegister type = Enums.fromId(LearnDataRegister.class, status);
return type == null ? null : type.getText(); return type == null ? null : type.getText();
@@ -130,7 +120,7 @@ public class DatasetDto {
public static class SearchReq { public static class SearchReq {
@Schema(description = "구분") @Schema(description = "구분")
private String groupTitle; private String dataType;
@Schema(description = "제목 (부분 검색)", example = "1차") @Schema(description = "제목 (부분 검색)", example = "1차")
private String title; private String title;

View File

@@ -108,7 +108,7 @@ public class DatasetCoreService
DatasetEntity entity = new DatasetEntity(); DatasetEntity entity = new DatasetEntity();
entity.setTitle(registerReq.getTitle()); entity.setTitle(registerReq.getTitle());
// entity.setYear(registerReq.getYear()); // entity.setYear(registerReq.getYear());
entity.setGroupTitle(LearnDataType.PRODUCTION.getId()); entity.setDataType(LearnDataType.PRODUCTION.getId());
entity.setCompareYyyy(registerReq.getCompareYear()); entity.setCompareYyyy(registerReq.getCompareYear());
entity.setTargetYyyy(registerReq.getTargetYyyy()); entity.setTargetYyyy(registerReq.getTargetYyyy());
entity.setRoundNo(registerReq.getRoundNo() != null ? registerReq.getRoundNo() : 1L); entity.setRoundNo(registerReq.getRoundNo() != null ? registerReq.getRoundNo() : 1L);
@@ -207,7 +207,6 @@ public class DatasetCoreService
return ModelMngDto.DatasetInfo.builder() return ModelMngDto.DatasetInfo.builder()
.id(entity.getId()) .id(entity.getId())
.title(entity.getTitle()) .title(entity.getTitle())
.groupTitle(entity.getGroupTitle())
.totalItems(entity.getTotalItems()) .totalItems(entity.getTotalItems())
.totalSize(totalSizeStr) .totalSize(totalSizeStr)
.classCounts(classCounts) .classCounts(classCounts)

View File

@@ -30,11 +30,6 @@ public class DatasetEntity {
@Column(name = "dataset_uid", nullable = false) @Column(name = "dataset_uid", nullable = false)
private Long id; private Long id;
@Size(max = 200)
@NotNull
@Column(name = "group_title", nullable = false, length = 200)
private String groupTitle;
@Column(name = "compare_yyyy", nullable = false) @Column(name = "compare_yyyy", nullable = false)
private Integer compareYyyy; private Integer compareYyyy;
@@ -134,7 +129,6 @@ public class DatasetEntity {
return new DatasetDto.Basic( return new DatasetDto.Basic(
this.id, this.id,
this.uuid, this.uuid,
this.groupTitle,
this.title, this.title,
this.roundNo, this.roundNo,
this.compareYyyy, this.compareYyyy,

View File

@@ -46,8 +46,8 @@ public class DatasetRepositoryImpl implements DatasetRepositoryCustom {
} }
// 구분 // 구분
if (StringUtils.isNotBlank(searchReq.getGroupTitle())) { if (StringUtils.isNotBlank(searchReq.getDataType())) {
builder.and(dataset.groupTitle.eq(searchReq.getGroupTitle())); builder.and(dataset.dataType.eq(searchReq.getDataType()));
} }
// Entity 직접 조회 (Projections 사용 지양) // Entity 직접 조회 (Projections 사용 지양)
@@ -85,7 +85,7 @@ public class DatasetRepositoryImpl implements DatasetRepositoryCustom {
BooleanBuilder builder = new BooleanBuilder(); BooleanBuilder builder = new BooleanBuilder();
if (StringUtils.isNotBlank(selectType) && !"CURRENT".equals(selectType)) { if (StringUtils.isNotBlank(selectType) && !"CURRENT".equals(selectType)) {
builder.and(dataset.groupTitle.eq(selectType)); builder.and(dataset.dataType.eq(selectType));
} }
return queryFactory return queryFactory
@@ -94,7 +94,7 @@ public class DatasetRepositoryImpl implements DatasetRepositoryCustom {
SelectDataSet.class, SelectDataSet.class,
dataset.id, dataset.id,
dataset.uuid, dataset.uuid,
dataset.groupTitle, dataset.dataType,
dataset.title, dataset.title,
dataset.roundNo, dataset.roundNo,
dataset.memo, dataset.memo,
@@ -115,7 +115,7 @@ public class DatasetRepositoryImpl implements DatasetRepositoryCustom {
.groupBy( .groupBy(
dataset.id, dataset.id,
dataset.uuid, dataset.uuid,
dataset.groupTitle, dataset.dataType,
dataset.title, dataset.title,
dataset.roundNo, dataset.roundNo,
dataset.memo) dataset.memo)
@@ -146,7 +146,7 @@ public class DatasetRepositoryImpl implements DatasetRepositoryCustom {
} }
if (StringUtils.isNotBlank(selectType) && !"CURRENT".equals(selectType)) { if (StringUtils.isNotBlank(selectType) && !"CURRENT".equals(selectType)) {
builder.and(dataset.groupTitle.eq(selectType)); builder.and(dataset.dataType.eq(selectType));
} }
return queryFactory return queryFactory
@@ -155,7 +155,7 @@ public class DatasetRepositoryImpl implements DatasetRepositoryCustom {
SelectDataSet.class, SelectDataSet.class,
dataset.id, dataset.id,
dataset.uuid, dataset.uuid,
dataset.groupTitle, dataset.dataType,
dataset.title, dataset.title,
dataset.roundNo, dataset.roundNo,
dataset.memo, dataset.memo,
@@ -167,7 +167,7 @@ public class DatasetRepositoryImpl implements DatasetRepositoryCustom {
.groupBy( .groupBy(
dataset.id, dataset.id,
dataset.uuid, dataset.uuid,
dataset.groupTitle, dataset.dataType,
dataset.title, dataset.title,
dataset.roundNo, dataset.roundNo,
dataset.memo) dataset.memo)