모델 종류 이름 변경

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
@AllArgsConstructor
public enum ModelType implements EnumType {
M1("M1"),
M2("M2"),
M3("M3");
G1("G1"),
G2("G2"),
G3("G3");
private String desc;

View File

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

View File

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

View File

@@ -51,9 +51,16 @@ public class ModelTrainMngApiController {
schema = @Schema(allowableValues = {"", "IN_PROGRESS", "COMPLETED"}))
@RequestParam(required = false)
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 = "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));
}

View File

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

View File

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

View File

@@ -108,12 +108,12 @@ public class ModelTrainMngCoreService {
modelMasterEntity.setId(modelId);
datasetEntity.setModel(modelMasterEntity);
if (addReq.getModelNo().equals(ModelType.M1.getId())) {
if (addReq.getModelNo().equals(ModelType.G1.getId())) {
datasetEntity.setBuildingCnt(dataset.getSummary().getBuildingCnt());
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());
} else if (addReq.getModelNo().equals(ModelType.M3.getId())) {
} else if (addReq.getModelNo().equals(ModelType.G3.getId())) {
datasetEntity.setLandCoverCnt(dataset.getSummary().getLandCoverCnt());
}

View File

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