모델 종류 이름 변경
This commit is contained in:
@@ -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;
|
||||||
|
|
||||||
|
|||||||
@@ -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(
|
||||||
|
|||||||
@@ -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);
|
||||||
|
|||||||
@@ -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));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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);
|
||||||
|
|||||||
@@ -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());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -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)
|
||||||
|
|||||||
Reference in New Issue
Block a user