Merge remote-tracking branch 'origin/feat/infer_dev_260107' into feat/infer_dev_260107
# Conflicts: # src/main/java/com/kamco/cd/kamcoback/postgres/entity/ModelMngEntity.java
This commit is contained in:
@@ -281,20 +281,19 @@ public class MapSheetMngApiController {
|
||||
return ApiResponseDto.createOK(mapSheetMngService.getFilesAll(srchDto));
|
||||
}
|
||||
|
||||
|
||||
@Operation(summary = "영상 데이터 관리 완료 년도 목록 조회", description = "영상 데이터 관리 완료 년도 목록 조회")
|
||||
@ApiResponses(
|
||||
value = {
|
||||
@ApiResponse(
|
||||
responseCode = "200",
|
||||
description = "조회 성공",
|
||||
content =
|
||||
@Content(
|
||||
mediaType = "application/json",
|
||||
schema = @Schema(implementation = CommonCodeDto.Basic.class))),
|
||||
@ApiResponse(responseCode = "404", description = "코드를 찾을 수 없음", content = @Content),
|
||||
@ApiResponse(responseCode = "500", description = "서버 오류", content = @Content)
|
||||
})
|
||||
value = {
|
||||
@ApiResponse(
|
||||
responseCode = "200",
|
||||
description = "조회 성공",
|
||||
content =
|
||||
@Content(
|
||||
mediaType = "application/json",
|
||||
schema = @Schema(implementation = CommonCodeDto.Basic.class))),
|
||||
@ApiResponse(responseCode = "404", description = "코드를 찾을 수 없음", content = @Content),
|
||||
@ApiResponse(responseCode = "500", description = "서버 오류", content = @Content)
|
||||
})
|
||||
@PostMapping("/mng-done-yyyy-list")
|
||||
public ApiResponseDto<List<Integer>> findMapSheetMngDoneYyyyList() {
|
||||
|
||||
|
||||
@@ -23,7 +23,6 @@ import java.nio.file.Paths;
|
||||
import java.nio.file.StandardCopyOption;
|
||||
import java.util.Comparator;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.data.domain.Page;
|
||||
@@ -343,10 +342,11 @@ public class MapSheetMngService {
|
||||
public List<Integer> findMapSheetMngDoneYyyyList() {
|
||||
|
||||
List<MngDto> mngList = mapSheetMngCoreService.findMapSheetMngList();
|
||||
List<Integer> yearList = mngList.stream()
|
||||
.filter(dto -> "DONE".equals(dto.getMngState()))
|
||||
.map(dto -> dto.getMngYyyy()) // 날짜 객체에서 연도(int)만 추출
|
||||
.toList();
|
||||
List<Integer> yearList =
|
||||
mngList.stream()
|
||||
.filter(dto -> "DONE".equals(dto.getMngState()))
|
||||
.map(dto -> dto.getMngYyyy()) // 날짜 객체에서 연도(int)만 추출
|
||||
.toList();
|
||||
|
||||
return yearList;
|
||||
}
|
||||
|
||||
@@ -176,7 +176,6 @@ public class ModelMngDto {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Schema(name = "ModelMetricAddReq", description = "모델 등록 req")
|
||||
@Getter
|
||||
@Setter
|
||||
@@ -191,5 +190,4 @@ public class ModelMngDto {
|
||||
private double loss;
|
||||
private double iou;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -65,7 +65,7 @@ public class ModelMngService {
|
||||
addReq.setUuid(uuid);
|
||||
Long modelUid = modelMngCoreService.insertModel(addReq);
|
||||
|
||||
ModelMetricAddReq modelMetricAddReq = new ModelMetricAddReq();
|
||||
ModelMetricAddReq modelMetricAddReq = new ModelMetricAddReq();
|
||||
modelMetricAddReq.setModelUid(modelUid);
|
||||
modelMetricAddReq.setModelVerUid(modelUid);
|
||||
modelMetricAddReq.setF1Score(0);
|
||||
|
||||
@@ -1,11 +1,7 @@
|
||||
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.ModelMetricAddReq;
|
||||
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 java.time.LocalDate;
|
||||
import java.util.UUID;
|
||||
@@ -44,7 +40,7 @@ public class ModelMngCoreService {
|
||||
|
||||
public Long insertModel(ModelMngDto.AddReq addReq) {
|
||||
|
||||
ModelMngEntity addEntity = new ModelMngEntity();
|
||||
ModelMngEntity addEntity = new ModelMngEntity();
|
||||
addEntity.setModelVer(addReq.getModelVer());
|
||||
addEntity.setModelType(addReq.getModelType());
|
||||
addEntity.setFilePath(addReq.getFilePath());
|
||||
@@ -60,7 +56,7 @@ public class ModelMngCoreService {
|
||||
addEntity.setClsModelFileName(addReq.getClsModelFileName());
|
||||
addEntity.setDeleted(false);
|
||||
|
||||
//modelMngRepository.insertModel(addReq);
|
||||
// modelMngRepository.insertModel(addReq);
|
||||
ModelMngEntity entity = modelMngRepository.save(addEntity);
|
||||
return entity.getModelUid();
|
||||
}
|
||||
@@ -78,11 +74,8 @@ public class ModelMngCoreService {
|
||||
addEntity.setIou(addReq.getIou());
|
||||
*/
|
||||
|
||||
|
||||
modelMngRepository.insertModelResultMetric(addReq);
|
||||
//ModelMngEntity entity = modelMngRepository.save(addEntity);
|
||||
//return entity.getMetricUid();
|
||||
// ModelMngEntity entity = modelMngRepository.save(addEntity);
|
||||
// return entity.getMetricUid();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -3,15 +3,11 @@ package com.kamco.cd.kamcoback.postgres.entity;
|
||||
import jakarta.persistence.*;
|
||||
import java.time.ZonedDateTime;
|
||||
import java.util.Map;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.Setter;
|
||||
import org.hibernate.annotations.JdbcTypeCode;
|
||||
import org.hibernate.type.SqlTypes;
|
||||
|
||||
|
||||
@Table(name = "tb_model_result_metric")
|
||||
@Getter
|
||||
@Setter
|
||||
|
||||
@@ -25,6 +25,4 @@ public interface ModelMngRepositoryCustom {
|
||||
void deleteByModelUuid(UUID uuid);
|
||||
|
||||
void insertModelResultMetric(ModelMngDto.ModelMetricAddReq addReq);
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -198,30 +198,27 @@ public class ModelMngRepositoryImpl extends QuerydslRepositorySupport
|
||||
.execute();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void insertModelResultMetric(@Valid ModelMngDto.ModelMetricAddReq addReq) {
|
||||
long execCount =
|
||||
queryFactory
|
||||
.insert(modelResultMetricEntity)
|
||||
.columns(
|
||||
modelResultMetricEntity.modelUid,
|
||||
modelResultMetricEntity.modelVerUid,
|
||||
modelResultMetricEntity.f1Score,
|
||||
modelResultMetricEntity.precision,
|
||||
modelResultMetricEntity.recall,
|
||||
modelResultMetricEntity.loss,
|
||||
modelResultMetricEntity.iou)
|
||||
.values(
|
||||
addReq.getModelUid(),
|
||||
addReq.getModelVerUid(),
|
||||
addReq.getF1Score(),
|
||||
addReq.getPrecision(),
|
||||
addReq.getRecall(),
|
||||
addReq.getLoss(),
|
||||
addReq.getIou())
|
||||
.execute();
|
||||
queryFactory
|
||||
.insert(modelResultMetricEntity)
|
||||
.columns(
|
||||
modelResultMetricEntity.modelUid,
|
||||
modelResultMetricEntity.modelVerUid,
|
||||
modelResultMetricEntity.f1Score,
|
||||
modelResultMetricEntity.precision,
|
||||
modelResultMetricEntity.recall,
|
||||
modelResultMetricEntity.loss,
|
||||
modelResultMetricEntity.iou)
|
||||
.values(
|
||||
addReq.getModelUid(),
|
||||
addReq.getModelVerUid(),
|
||||
addReq.getF1Score(),
|
||||
addReq.getPrecision(),
|
||||
addReq.getRecall(),
|
||||
addReq.getLoss(),
|
||||
addReq.getIou())
|
||||
.execute();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user