모델 종류 이름 변경

This commit is contained in:
2026-02-04 18:41:34 +09:00
parent 350d622e5a
commit 200b384e19
8 changed files with 22 additions and 11 deletions

View File

@@ -9,9 +9,9 @@ import lombok.Getter;
@Getter @Getter
@AllArgsConstructor @AllArgsConstructor
public enum ModelType implements EnumType { public enum ModelType implements EnumType {
M1("M1"), G1("G1"),
M2("M2"), G2("G2"),
M3("M3"); G3("G3");
private String desc; private String desc;

View File

@@ -213,7 +213,7 @@ public class DatasetApiController {
@Parameter( @Parameter(
description = "모델 구분", description = "모델 구분",
example = "", example = "",
schema = @Schema(allowableValues = {"M1", "M2", "M3"})) schema = @Schema(allowableValues = {"G1", "G2", "G3"}))
@RequestParam @RequestParam
String modelType, String modelType,
@Parameter( @Parameter(

View File

@@ -97,7 +97,7 @@ public class DatasetService {
} }
public List<SelectDataSet> getDatasetSelectList(String modelType, String selectType) { public List<SelectDataSet> getDatasetSelectList(String modelType, String selectType) {
if (modelType.equals("M1")) { if (modelType.equals("G1")) {
return datasetCoreService.getDatasetSelectM1List(modelType, selectType); return datasetCoreService.getDatasetSelectM1List(modelType, selectType);
} else { } else {
return datasetCoreService.getDatasetSelectM2M3List(modelType, selectType); return datasetCoreService.getDatasetSelectM2M3List(modelType, selectType);

View File

@@ -51,9 +51,16 @@ public class ModelTrainMngApiController {
schema = @Schema(allowableValues = {"", "IN_PROGRESS", "COMPLETED"})) schema = @Schema(allowableValues = {"", "IN_PROGRESS", "COMPLETED"}))
@RequestParam(required = false) @RequestParam(required = false)
String status, String status,
@Parameter(
description = "모델",
example = "G1",
schema = @Schema(allowableValues = {"G1", "G2", "G3"}))
@RequestParam(required = false)
String modelNo,
@Parameter(description = "페이지 번호") @RequestParam(defaultValue = "0") int page, @Parameter(description = "페이지 번호") @RequestParam(defaultValue = "0") int page,
@Parameter(description = "페이지 크기") @RequestParam(defaultValue = "20") int size) { @Parameter(description = "페이지 크기") @RequestParam(defaultValue = "20") int size) {
ModelTrainMngDto.SearchReq searchReq = new ModelTrainMngDto.SearchReq(status, page, size); ModelTrainMngDto.SearchReq searchReq =
new ModelTrainMngDto.SearchReq(status, modelNo, page, size);
return ApiResponseDto.ok(modelTrainMngService.getModelList(searchReq)); return ApiResponseDto.ok(modelTrainMngService.getModelList(searchReq));
} }

View File

@@ -107,6 +107,7 @@ public class ModelTrainMngDto {
public static class SearchReq { public static class SearchReq {
private String status; private String status;
private String modelNo;
// 페이징 파라미터 // 페이징 파라미터
private int page = 0; private int page = 0;
private int size = 20; private int size = 20;
@@ -124,7 +125,7 @@ public class ModelTrainMngDto {
public static class AddReq { public static class AddReq {
@NotNull @NotNull
@Schema(description = "모델 종류 M1, M2, M3", example = "M1") @Schema(description = "모델 종류 G1, G2, G3", example = "G1")
private String modelNo; private String modelNo;
@NotNull @NotNull

View File

@@ -53,7 +53,6 @@ public class ModelTrainMngService {
HyperParam hyperParam = req.getHyperParam(); HyperParam hyperParam = req.getHyperParam();
HyperParamDto.Basic hyper = new HyperParamDto.Basic(); HyperParamDto.Basic hyper = new HyperParamDto.Basic();
/** OPTIMIZED(최적화 파라미터), EXISTING(기존 파라미터), NEW(신규 파라미터) * */
if (HyperParamSelectType.NEW.getId().equals(req.getHyperParamType())) { if (HyperParamSelectType.NEW.getId().equals(req.getHyperParamType())) {
// 하이퍼파라미터 등록 // 하이퍼파라미터 등록
hyper = hyperParamCoreService.createHyperParam(hyperParam); hyper = hyperParamCoreService.createHyperParam(hyperParam);

View File

@@ -108,12 +108,12 @@ public class ModelTrainMngCoreService {
modelMasterEntity.setId(modelId); modelMasterEntity.setId(modelId);
datasetEntity.setModel(modelMasterEntity); datasetEntity.setModel(modelMasterEntity);
if (addReq.getModelNo().equals(ModelType.M1.getId())) { if (addReq.getModelNo().equals(ModelType.G1.getId())) {
datasetEntity.setBuildingCnt(dataset.getSummary().getBuildingCnt()); datasetEntity.setBuildingCnt(dataset.getSummary().getBuildingCnt());
datasetEntity.setContainerCnt(dataset.getSummary().getContainerCnt()); datasetEntity.setContainerCnt(dataset.getSummary().getContainerCnt());
} else if (addReq.getModelNo().equals(ModelType.M2.getId())) { } else if (addReq.getModelNo().equals(ModelType.G2.getId())) {
datasetEntity.setWasteCnt(dataset.getSummary().getWasteCnt()); datasetEntity.setWasteCnt(dataset.getSummary().getWasteCnt());
} else if (addReq.getModelNo().equals(ModelType.M3.getId())) { } else if (addReq.getModelNo().equals(ModelType.G3.getId())) {
datasetEntity.setLandCoverCnt(dataset.getSummary().getLandCoverCnt()); datasetEntity.setLandCoverCnt(dataset.getSummary().getLandCoverCnt());
} }

View File

@@ -36,6 +36,10 @@ public class ModelMngRepositoryImpl implements ModelMngRepositoryCustom {
builder.and(modelMasterEntity.statusCd.eq(req.getStatus())); builder.and(modelMasterEntity.statusCd.eq(req.getStatus()));
} }
if (req.getModelNo() != null && !req.getModelNo().isEmpty()) {
builder.and(modelMasterEntity.modelNo.eq(req.getModelNo()));
}
List<ModelMasterEntity> content = List<ModelMasterEntity> content =
queryFactory queryFactory
.selectFrom(modelMasterEntity) .selectFrom(modelMasterEntity)