[KC-109] 모델관리 수정
This commit is contained in:
@@ -281,7 +281,6 @@ public class MapSheetMngApiController {
|
|||||||
return ApiResponseDto.createOK(mapSheetMngService.getFilesAll(srchDto));
|
return ApiResponseDto.createOK(mapSheetMngService.getFilesAll(srchDto));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Operation(summary = "영상 데이터 관리 완료 년도 목록 조회", description = "영상 데이터 관리 완료 년도 목록 조회")
|
@Operation(summary = "영상 데이터 관리 완료 년도 목록 조회", description = "영상 데이터 관리 완료 년도 목록 조회")
|
||||||
@ApiResponses(
|
@ApiResponses(
|
||||||
value = {
|
value = {
|
||||||
|
|||||||
@@ -23,7 +23,6 @@ import java.nio.file.Paths;
|
|||||||
import java.nio.file.StandardCopyOption;
|
import java.nio.file.StandardCopyOption;
|
||||||
import java.util.Comparator;
|
import java.util.Comparator;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.stream.Collectors;
|
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import org.springframework.beans.factory.annotation.Value;
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
import org.springframework.data.domain.Page;
|
import org.springframework.data.domain.Page;
|
||||||
@@ -343,7 +342,8 @@ public class MapSheetMngService {
|
|||||||
public List<Integer> findMapSheetMngDoneYyyyList() {
|
public List<Integer> findMapSheetMngDoneYyyyList() {
|
||||||
|
|
||||||
List<MngDto> mngList = mapSheetMngCoreService.findMapSheetMngList();
|
List<MngDto> mngList = mapSheetMngCoreService.findMapSheetMngList();
|
||||||
List<Integer> yearList = mngList.stream()
|
List<Integer> yearList =
|
||||||
|
mngList.stream()
|
||||||
.filter(dto -> "DONE".equals(dto.getMngState()))
|
.filter(dto -> "DONE".equals(dto.getMngState()))
|
||||||
.map(dto -> dto.getMngYyyy()) // 날짜 객체에서 연도(int)만 추출
|
.map(dto -> dto.getMngYyyy()) // 날짜 객체에서 연도(int)만 추출
|
||||||
.toList();
|
.toList();
|
||||||
|
|||||||
@@ -176,7 +176,6 @@ public class ModelMngDto {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Schema(name = "ModelMetricAddReq", description = "모델 등록 req")
|
@Schema(name = "ModelMetricAddReq", description = "모델 등록 req")
|
||||||
@Getter
|
@Getter
|
||||||
@Setter
|
@Setter
|
||||||
@@ -191,5 +190,4 @@ public class ModelMngDto {
|
|||||||
private double loss;
|
private double loss;
|
||||||
private double iou;
|
private double iou;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,11 +1,7 @@
|
|||||||
package com.kamco.cd.kamcoback.postgres.core;
|
package com.kamco.cd.kamcoback.postgres.core;
|
||||||
|
|
||||||
import static com.kamco.cd.kamcoback.postgres.entity.QModelMngEntity.modelMngEntity;
|
|
||||||
|
|
||||||
import com.kamco.cd.kamcoback.model.dto.ModelMngDto;
|
import com.kamco.cd.kamcoback.model.dto.ModelMngDto;
|
||||||
import com.kamco.cd.kamcoback.model.dto.ModelMngDto.ModelMetricAddReq;
|
|
||||||
import com.kamco.cd.kamcoback.postgres.entity.ModelMngEntity;
|
import com.kamco.cd.kamcoback.postgres.entity.ModelMngEntity;
|
||||||
import com.kamco.cd.kamcoback.postgres.entity.ModelResultMetricEntity;
|
|
||||||
import com.kamco.cd.kamcoback.postgres.repository.model.ModelMngRepository;
|
import com.kamco.cd.kamcoback.postgres.repository.model.ModelMngRepository;
|
||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
@@ -60,7 +56,7 @@ public class ModelMngCoreService {
|
|||||||
addEntity.setClsModelFileName(addReq.getClsModelFileName());
|
addEntity.setClsModelFileName(addReq.getClsModelFileName());
|
||||||
addEntity.setDeleted(false);
|
addEntity.setDeleted(false);
|
||||||
|
|
||||||
//modelMngRepository.insertModel(addReq);
|
// modelMngRepository.insertModel(addReq);
|
||||||
ModelMngEntity entity = modelMngRepository.save(addEntity);
|
ModelMngEntity entity = modelMngRepository.save(addEntity);
|
||||||
return entity.getModelUid();
|
return entity.getModelUid();
|
||||||
}
|
}
|
||||||
@@ -78,11 +74,8 @@ public class ModelMngCoreService {
|
|||||||
addEntity.setIou(addReq.getIou());
|
addEntity.setIou(addReq.getIou());
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
modelMngRepository.insertModelResultMetric(addReq);
|
modelMngRepository.insertModelResultMetric(addReq);
|
||||||
//ModelMngEntity entity = modelMngRepository.save(addEntity);
|
// ModelMngEntity entity = modelMngRepository.save(addEntity);
|
||||||
//return entity.getMetricUid();
|
// return entity.getMetricUid();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -81,8 +81,6 @@ public class ModelMngEntity extends CommonDateEntity {
|
|||||||
@Column(name = "cls_model_file_name", length = 155)
|
@Column(name = "cls_model_file_name", length = 155)
|
||||||
private String clsModelFileName;
|
private String clsModelFileName;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public void deleted() {
|
public void deleted() {
|
||||||
this.deleted = true;
|
this.deleted = true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,15 +3,11 @@ package com.kamco.cd.kamcoback.postgres.entity;
|
|||||||
import jakarta.persistence.*;
|
import jakarta.persistence.*;
|
||||||
import java.time.ZonedDateTime;
|
import java.time.ZonedDateTime;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import lombok.AllArgsConstructor;
|
|
||||||
import lombok.Builder;
|
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.NoArgsConstructor;
|
|
||||||
import lombok.Setter;
|
import lombok.Setter;
|
||||||
import org.hibernate.annotations.JdbcTypeCode;
|
import org.hibernate.annotations.JdbcTypeCode;
|
||||||
import org.hibernate.type.SqlTypes;
|
import org.hibernate.type.SqlTypes;
|
||||||
|
|
||||||
|
|
||||||
@Table(name = "tb_model_result_metric")
|
@Table(name = "tb_model_result_metric")
|
||||||
@Getter
|
@Getter
|
||||||
@Setter
|
@Setter
|
||||||
|
|||||||
@@ -25,6 +25,4 @@ public interface ModelMngRepositoryCustom {
|
|||||||
void deleteByModelUuid(UUID uuid);
|
void deleteByModelUuid(UUID uuid);
|
||||||
|
|
||||||
void insertModelResultMetric(ModelMngDto.ModelMetricAddReq addReq);
|
void insertModelResultMetric(ModelMngDto.ModelMetricAddReq addReq);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -198,7 +198,6 @@ public class ModelMngRepositoryImpl extends QuerydslRepositorySupport
|
|||||||
.execute();
|
.execute();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void insertModelResultMetric(@Valid ModelMngDto.ModelMetricAddReq addReq) {
|
public void insertModelResultMetric(@Valid ModelMngDto.ModelMetricAddReq addReq) {
|
||||||
long execCount =
|
long execCount =
|
||||||
@@ -222,6 +221,4 @@ public class ModelMngRepositoryImpl extends QuerydslRepositorySupport
|
|||||||
addReq.getIou())
|
addReq.getIou())
|
||||||
.execute();
|
.execute();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user