Merge pull request '[KC-108] 분석도엽 추론제외 조건 수정, 모델관리수정' (#182) from feat/infer_dev_260107 into develop
Reviewed-on: https://kamco.gitea.gs.dabeeo.com/dabeeo/kamco-dabeeo-backoffice/pulls/182
This commit is contained in:
@@ -74,19 +74,18 @@ public class InferenceResultService {
|
|||||||
mapSheetIds.add(mapInkx5kEntity.getMapidcdNo());
|
mapSheetIds.add(mapInkx5kEntity.getMapidcdNo());
|
||||||
});
|
});
|
||||||
req.setMapSheetNum(mapSheetIds);
|
req.setMapSheetNum(mapSheetIds);
|
||||||
System.out.println(mapSheetIds);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// UUID uuid = inferenceResultCoreService.saveInferenceInfo(req);
|
UUID uuid = inferenceResultCoreService.saveInferenceInfo(req);
|
||||||
|
|
||||||
// TODO tif 없으면 전년도 파일 조회 쿼리 추가해야함
|
// TODO tif 없으면 전년도 파일 조회 쿼리 추가해야함
|
||||||
// TODO 도엽 개수를 target 기준으로 맞춰야함
|
// TODO 도엽 개수를 target 기준으로 맞춰야함
|
||||||
// this.getSceneInference(String.valueOf(req.getCompareYyyy()), req.getMapSheetNum());
|
this.getSceneInference(String.valueOf(req.getCompareYyyy()), req.getMapSheetNum());
|
||||||
// this.getSceneInference(String.valueOf(req.getTargetYyyy()), req.getMapSheetNum());
|
this.getSceneInference(String.valueOf(req.getTargetYyyy()), req.getMapSheetNum());
|
||||||
//
|
|
||||||
// InferenceSendDto m1 = this.getModelInfo(req.getModel1Uuid());
|
InferenceSendDto m1 = this.getModelInfo(req.getModel1Uuid());
|
||||||
// InferenceSendDto m2 = this.getModelInfo(req.getModel2Uuid());
|
InferenceSendDto m2 = this.getModelInfo(req.getModel2Uuid());
|
||||||
// InferenceSendDto m3 = this.getModelInfo(req.getModel3Uuid());
|
InferenceSendDto m3 = this.getModelInfo(req.getModel3Uuid());
|
||||||
//
|
//
|
||||||
// ensureAccepted(m1);
|
// ensureAccepted(m1);
|
||||||
// ensureAccepted(m2);
|
// ensureAccepted(m2);
|
||||||
@@ -134,12 +133,12 @@ public class InferenceResultService {
|
|||||||
/**
|
/**
|
||||||
* 모델정보 조회 dto 생성 후 반환
|
* 모델정보 조회 dto 생성 후 반환
|
||||||
*
|
*
|
||||||
* @param id
|
* @param uuid
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
private InferenceSendDto getModelInfo(Long id) {
|
private InferenceSendDto getModelInfo(UUID uuid) {
|
||||||
|
|
||||||
Basic modelInfo = modelMngCoreService.findByModelUuid(id);
|
Basic modelInfo = modelMngCoreService.findByModelUuid(uuid);
|
||||||
|
|
||||||
InferenceSendDto sendDto = new InferenceSendDto();
|
InferenceSendDto sendDto = new InferenceSendDto();
|
||||||
sendDto.setModel_version(modelInfo.getModelVer());
|
sendDto.setModel_version(modelInfo.getModelVer());
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ import com.kamco.cd.kamcoback.common.utils.enums.CodeExpose;
|
|||||||
import com.kamco.cd.kamcoback.common.utils.enums.EnumType;
|
import com.kamco.cd.kamcoback.common.utils.enums.EnumType;
|
||||||
import com.kamco.cd.kamcoback.common.utils.interfaces.JsonFormatDttm;
|
import com.kamco.cd.kamcoback.common.utils.interfaces.JsonFormatDttm;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import java.math.BigDecimal;
|
|
||||||
import java.time.ZonedDateTime;
|
import java.time.ZonedDateTime;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
@@ -126,11 +125,11 @@ public class ModelMngDto {
|
|||||||
private String fileName;
|
private String fileName;
|
||||||
private String modelType;
|
private String modelType;
|
||||||
private String createCompleteDttm;
|
private String createCompleteDttm;
|
||||||
private BigDecimal f1Score;
|
private Double f1Score;
|
||||||
private BigDecimal precision;
|
private Double precision;
|
||||||
private BigDecimal recall;
|
private Double recall;
|
||||||
private BigDecimal accuracy;
|
private Double accuracy;
|
||||||
private BigDecimal iou;
|
private Double iou;
|
||||||
private String memo;
|
private String memo;
|
||||||
private Boolean deleted;
|
private Boolean deleted;
|
||||||
private UUID uuid;
|
private UUID uuid;
|
||||||
|
|||||||
@@ -209,7 +209,7 @@ public class InferenceResultCoreService {
|
|||||||
.toList();
|
.toList();
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<MapInkxMngDto.Basic> findByMapidList(Search5kReq req) {
|
public List<MapInkxMngDto.MapInkList> findByMapidList(Search5kReq req) {
|
||||||
return mapInkx5kRepository.findByMapidList(req);
|
return mapInkx5kRepository.findByMapidList(req);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -91,4 +91,12 @@ public class ModelMngCoreService {
|
|||||||
.orElseThrow(() -> new EntityNotFoundException("모델 정보가 없습니다."));
|
.orElseThrow(() -> new EntityNotFoundException("모델 정보가 없습니다."));
|
||||||
return entity.toDto();
|
return entity.toDto();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public ModelMngDto.Basic findByModelUuid(UUID id) {
|
||||||
|
ModelMngEntity entity =
|
||||||
|
modelMngRepository
|
||||||
|
.findByModelId(id)
|
||||||
|
.orElseThrow(() -> new EntityNotFoundException("모델 정보가 없습니다."));
|
||||||
|
return entity.toDto();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -27,4 +27,6 @@ public interface ModelMngRepositoryCustom {
|
|||||||
void insertModelResultMetric(ModelMngDto.ModelMetricAddReq addReq);
|
void insertModelResultMetric(ModelMngDto.ModelMetricAddReq addReq);
|
||||||
|
|
||||||
Optional<ModelMngEntity> findByModelId(Long id);
|
Optional<ModelMngEntity> findByModelId(Long id);
|
||||||
|
|
||||||
|
Optional<ModelMngEntity> findByModelId(UUID id);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -74,11 +74,11 @@ public class ModelMngRepositoryImpl extends QuerydslRepositorySupport
|
|||||||
modelMngEntity.modelType,
|
modelMngEntity.modelType,
|
||||||
Expressions.stringTemplate(
|
Expressions.stringTemplate(
|
||||||
"to_char({0}, 'YYYY-MM-DD')", modelMngEntity.createCompleteDttm),
|
"to_char({0}, 'YYYY-MM-DD')", modelMngEntity.createCompleteDttm),
|
||||||
roundNumericToPercent(modelResultMetricEntity.f1Score),
|
modelResultMetricEntity.f1Score,
|
||||||
roundNumericToPercent(modelResultMetricEntity.precision),
|
modelResultMetricEntity.precision,
|
||||||
roundNumericToPercent(modelResultMetricEntity.recall),
|
modelResultMetricEntity.recall,
|
||||||
roundNumericToPercent(modelResultMetricEntity.loss),
|
modelResultMetricEntity.loss,
|
||||||
roundNumericToPercent(modelResultMetricEntity.iou),
|
modelResultMetricEntity.iou,
|
||||||
modelMngEntity.memo,
|
modelMngEntity.memo,
|
||||||
modelMngEntity.deleted,
|
modelMngEntity.deleted,
|
||||||
modelMngEntity.uuid,
|
modelMngEntity.uuid,
|
||||||
@@ -237,4 +237,10 @@ public class ModelMngRepositoryImpl extends QuerydslRepositorySupport
|
|||||||
return Optional.ofNullable(
|
return Optional.ofNullable(
|
||||||
queryFactory.selectFrom(modelMngEntity).where(modelMngEntity.modelUid.eq(id)).fetchOne());
|
queryFactory.selectFrom(modelMngEntity).where(modelMngEntity.modelUid.eq(id)).fetchOne());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Optional<ModelMngEntity> findByModelId(UUID uuid) {
|
||||||
|
return Optional.ofNullable(
|
||||||
|
queryFactory.selectFrom(modelMngEntity).where(modelMngEntity.uuid.eq(uuid)).fetchOne());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -27,5 +27,5 @@ public interface MapInkx5kRepositoryCustom {
|
|||||||
List<MapInkx5kEntity> findByMapSheetNumInAndUseInference(
|
List<MapInkx5kEntity> findByMapSheetNumInAndUseInference(
|
||||||
List<String> mapSheetNums, CommonUseStatus use);
|
List<String> mapSheetNums, CommonUseStatus use);
|
||||||
|
|
||||||
List<MapInkxMngDto.Basic> findByMapidList(Search5kReq search5kReq);
|
List<MapInkxMngDto.MapInkList> findByMapidList(Search5kReq search5kReq);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -146,7 +146,7 @@ public class MapInkx5kRepositoryImpl extends QuerydslRepositorySupport
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<MapInkxMngDto.Basic> findByMapidList(Search5kReq search5kReq) {
|
public List<MapInkxMngDto.MapInkList> findByMapidList(Search5kReq search5kReq) {
|
||||||
BooleanBuilder builder = new BooleanBuilder();
|
BooleanBuilder builder = new BooleanBuilder();
|
||||||
|
|
||||||
if (StringUtils.isNotBlank(search5kReq.getMapidcdNo())) {
|
if (StringUtils.isNotBlank(search5kReq.getMapidcdNo())) {
|
||||||
@@ -162,7 +162,7 @@ public class MapInkx5kRepositoryImpl extends QuerydslRepositorySupport
|
|||||||
return queryFactory
|
return queryFactory
|
||||||
.select(
|
.select(
|
||||||
Projections.constructor(
|
Projections.constructor(
|
||||||
MapInkxMngDto.Basic.class,
|
MapInkxMngDto.MapInkList.class,
|
||||||
mapInkx5kEntity.fid,
|
mapInkx5kEntity.fid,
|
||||||
mapInkx5kEntity.mapidcdNo,
|
mapInkx5kEntity.mapidcdNo,
|
||||||
mapInkx5kEntity.mapidNm,
|
mapInkx5kEntity.mapidNm,
|
||||||
|
|||||||
@@ -70,7 +70,7 @@ public class MapInkxMngDto {
|
|||||||
private String mapidcdNo;
|
private String mapidcdNo;
|
||||||
private String mapidNm;
|
private String mapidNm;
|
||||||
private Geometry geom;
|
private Geometry geom;
|
||||||
private String useInference;
|
private CommonUseStatus useInference;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Getter
|
@Getter
|
||||||
|
|||||||
Reference in New Issue
Block a user