spotless
This commit is contained in:
@@ -30,22 +30,20 @@ public class InferenceDetailDto {
|
|||||||
private String dataName;
|
private String dataName;
|
||||||
private Long mapSheepNum;
|
private Long mapSheepNum;
|
||||||
private Long detectingCnt;
|
private Long detectingCnt;
|
||||||
@JsonFormatDttm
|
@JsonFormatDttm private ZonedDateTime analStrtDttm;
|
||||||
private ZonedDateTime analStrtDttm;
|
@JsonFormatDttm private ZonedDateTime analEndDttm;
|
||||||
@JsonFormatDttm
|
|
||||||
private ZonedDateTime analEndDttm;
|
|
||||||
private Long analSec;
|
private Long analSec;
|
||||||
private String analState;
|
private String analState;
|
||||||
|
|
||||||
public Basic(
|
public Basic(
|
||||||
Long id,
|
Long id,
|
||||||
String dataName,
|
String dataName,
|
||||||
Long mapSheepNum,
|
Long mapSheepNum,
|
||||||
Long detectingCnt,
|
Long detectingCnt,
|
||||||
ZonedDateTime analStrtDttm,
|
ZonedDateTime analStrtDttm,
|
||||||
ZonedDateTime analEndDttm,
|
ZonedDateTime analEndDttm,
|
||||||
Long analSec,
|
Long analSec,
|
||||||
String analState) {
|
String analState) {
|
||||||
this.id = id;
|
this.id = id;
|
||||||
this.dataName = dataName;
|
this.dataName = dataName;
|
||||||
this.mapSheepNum = mapSheepNum;
|
this.mapSheepNum = mapSheepNum;
|
||||||
@@ -64,10 +62,8 @@ public class InferenceDetailDto {
|
|||||||
private Long id;
|
private Long id;
|
||||||
private String analTitle;
|
private String analTitle;
|
||||||
private Long detectingCnt;
|
private Long detectingCnt;
|
||||||
@JsonFormatDttm
|
@JsonFormatDttm private ZonedDateTime analStrtDttm;
|
||||||
private ZonedDateTime analStrtDttm;
|
@JsonFormatDttm private ZonedDateTime analEndDttm;
|
||||||
@JsonFormatDttm
|
|
||||||
private ZonedDateTime analEndDttm;
|
|
||||||
private Long analSec;
|
private Long analSec;
|
||||||
private Long analPredSec;
|
private Long analPredSec;
|
||||||
private String analState;
|
private String analState;
|
||||||
@@ -75,16 +71,16 @@ public class InferenceDetailDto {
|
|||||||
private String gukyuinUsed;
|
private String gukyuinUsed;
|
||||||
|
|
||||||
public AnalResList(
|
public AnalResList(
|
||||||
Long id,
|
Long id,
|
||||||
String analTitle,
|
String analTitle,
|
||||||
Long detectingCnt,
|
Long detectingCnt,
|
||||||
ZonedDateTime analStrtDttm,
|
ZonedDateTime analStrtDttm,
|
||||||
ZonedDateTime analEndDttm,
|
ZonedDateTime analEndDttm,
|
||||||
Long analSec,
|
Long analSec,
|
||||||
Long analPredSec,
|
Long analPredSec,
|
||||||
String analState,
|
String analState,
|
||||||
String analStateNm,
|
String analStateNm,
|
||||||
String gukyuinUsed) {
|
String gukyuinUsed) {
|
||||||
this.id = id;
|
this.id = id;
|
||||||
this.analTitle = analTitle;
|
this.analTitle = analTitle;
|
||||||
this.detectingCnt = detectingCnt;
|
this.detectingCnt = detectingCnt;
|
||||||
@@ -107,10 +103,8 @@ public class InferenceDetailDto {
|
|||||||
private String modelInfo;
|
private String modelInfo;
|
||||||
private Integer targetYyyy;
|
private Integer targetYyyy;
|
||||||
private Integer compareYyyy;
|
private Integer compareYyyy;
|
||||||
@JsonFormatDttm
|
@JsonFormatDttm private ZonedDateTime analStrtDttm;
|
||||||
private ZonedDateTime analStrtDttm;
|
@JsonFormatDttm private ZonedDateTime analEndDttm;
|
||||||
@JsonFormatDttm
|
|
||||||
private ZonedDateTime analEndDttm;
|
|
||||||
private Long analSec;
|
private Long analSec;
|
||||||
private Long analPredSec;
|
private Long analPredSec;
|
||||||
private String resultUrl;
|
private String resultUrl;
|
||||||
@@ -120,20 +114,20 @@ public class InferenceDetailDto {
|
|||||||
private String analStateNm;
|
private String analStateNm;
|
||||||
|
|
||||||
public AnalResSummary(
|
public AnalResSummary(
|
||||||
Long id,
|
Long id,
|
||||||
String analTitle,
|
String analTitle,
|
||||||
String modelInfo,
|
String modelInfo,
|
||||||
Integer targetYyyy,
|
Integer targetYyyy,
|
||||||
Integer compareYyyy,
|
Integer compareYyyy,
|
||||||
ZonedDateTime analStrtDttm,
|
ZonedDateTime analStrtDttm,
|
||||||
ZonedDateTime analEndDttm,
|
ZonedDateTime analEndDttm,
|
||||||
Long analSec,
|
Long analSec,
|
||||||
Long analPredSec,
|
Long analPredSec,
|
||||||
String resultUrl,
|
String resultUrl,
|
||||||
Long detectingCnt,
|
Long detectingCnt,
|
||||||
Double accuracy,
|
Double accuracy,
|
||||||
String analState,
|
String analState,
|
||||||
String analStateNm) {
|
String analStateNm) {
|
||||||
this.id = id;
|
this.id = id;
|
||||||
this.analTitle = analTitle;
|
this.analTitle = analTitle;
|
||||||
this.modelInfo = modelInfo;
|
this.modelInfo = modelInfo;
|
||||||
@@ -190,17 +184,16 @@ public class InferenceDetailDto {
|
|||||||
private Clazzes target;
|
private Clazzes target;
|
||||||
private MapSheet mapSheet;
|
private MapSheet mapSheet;
|
||||||
private Coordinate center;
|
private Coordinate center;
|
||||||
@JsonFormatDttm
|
@JsonFormatDttm private ZonedDateTime updatedDttm;
|
||||||
private ZonedDateTime updatedDttm;
|
|
||||||
|
|
||||||
public DetailListEntity(
|
public DetailListEntity(
|
||||||
UUID uuid,
|
UUID uuid,
|
||||||
Double detectionScore,
|
Double detectionScore,
|
||||||
Clazzes compare,
|
Clazzes compare,
|
||||||
Clazzes target,
|
Clazzes target,
|
||||||
MapSheet mapSheet,
|
MapSheet mapSheet,
|
||||||
Coordinate center,
|
Coordinate center,
|
||||||
ZonedDateTime updatedDttm) {
|
ZonedDateTime updatedDttm) {
|
||||||
this.code = new Uid(uuid);
|
this.code = new Uid(uuid);
|
||||||
this.detectionScore = detectionScore;
|
this.detectionScore = detectionScore;
|
||||||
this.compare = compare;
|
this.compare = compare;
|
||||||
@@ -241,8 +234,7 @@ public class InferenceDetailDto {
|
|||||||
|
|
||||||
private String code;
|
private String code;
|
||||||
private String name;
|
private String name;
|
||||||
@JsonIgnore
|
@JsonIgnore private Double score;
|
||||||
private Double score;
|
|
||||||
|
|
||||||
public Clazz(String code, Double score) {
|
public Clazz(String code, Double score) {
|
||||||
this.code = code;
|
this.code = code;
|
||||||
@@ -309,23 +301,21 @@ public class InferenceDetailDto {
|
|||||||
String classAfterName;
|
String classAfterName;
|
||||||
Double classAfterProb;
|
Double classAfterProb;
|
||||||
Long mapSheetNum;
|
Long mapSheetNum;
|
||||||
@JsonIgnore
|
@JsonIgnore String gemoStr;
|
||||||
String gemoStr;
|
@JsonIgnore String geomCenterStr;
|
||||||
@JsonIgnore
|
|
||||||
String geomCenterStr;
|
|
||||||
JsonNode gemo;
|
JsonNode gemo;
|
||||||
JsonNode geomCenter;
|
JsonNode geomCenter;
|
||||||
|
|
||||||
public Geom(
|
public Geom(
|
||||||
Integer compareYyyy,
|
Integer compareYyyy,
|
||||||
Integer targetYyyy,
|
Integer targetYyyy,
|
||||||
String classBeforeCd,
|
String classBeforeCd,
|
||||||
Double classBeforeProb,
|
Double classBeforeProb,
|
||||||
String classAfterCd,
|
String classAfterCd,
|
||||||
Double classAfterProb,
|
Double classAfterProb,
|
||||||
Long mapSheetNum,
|
Long mapSheetNum,
|
||||||
String gemoStr,
|
String gemoStr,
|
||||||
String geomCenterStr) {
|
String geomCenterStr) {
|
||||||
this.compareYyyy = compareYyyy;
|
this.compareYyyy = compareYyyy;
|
||||||
this.targetYyyy = targetYyyy;
|
this.targetYyyy = targetYyyy;
|
||||||
this.classBeforeCd = classBeforeCd;
|
this.classBeforeCd = classBeforeCd;
|
||||||
@@ -396,7 +386,7 @@ public class InferenceDetailDto {
|
|||||||
String[] sortParams = sort.split(",");
|
String[] sortParams = sort.split(",");
|
||||||
String property = sortParams[0];
|
String property = sortParams[0];
|
||||||
Sort.Direction direction =
|
Sort.Direction direction =
|
||||||
sortParams.length > 1 ? Sort.Direction.fromString(sortParams[1]) : Sort.Direction.ASC;
|
sortParams.length > 1 ? Sort.Direction.fromString(sortParams[1]) : Sort.Direction.ASC;
|
||||||
return PageRequest.of(page, size, Sort.by(direction, property));
|
return PageRequest.of(page, size, Sort.by(direction, property));
|
||||||
}
|
}
|
||||||
return PageRequest.of(page, size);
|
return PageRequest.of(page, size);
|
||||||
@@ -435,24 +425,22 @@ public class InferenceDetailDto {
|
|||||||
private Integer targetYyyy;
|
private Integer targetYyyy;
|
||||||
private String detectOption;
|
private String detectOption;
|
||||||
private String mapSheetScope;
|
private String mapSheetScope;
|
||||||
@JsonFormatDttm
|
@JsonFormatDttm private ZonedDateTime inferStartDttm;
|
||||||
private ZonedDateTime inferStartDttm;
|
@JsonFormatDttm private ZonedDateTime inferEndDttm;
|
||||||
@JsonFormatDttm
|
|
||||||
private ZonedDateTime inferEndDttm;
|
|
||||||
|
|
||||||
private Duration elapsedDuration;
|
private Duration elapsedDuration;
|
||||||
|
|
||||||
public AnalResultInfo(String analTitle,
|
public AnalResultInfo(
|
||||||
String modelVer1,
|
String analTitle,
|
||||||
String modelVer2,
|
String modelVer1,
|
||||||
String modelVer3,
|
String modelVer2,
|
||||||
Integer compareYyyy,
|
String modelVer3,
|
||||||
Integer targetYyyy,
|
Integer compareYyyy,
|
||||||
String detectOption,
|
Integer targetYyyy,
|
||||||
String mapSheetScope,
|
String detectOption,
|
||||||
ZonedDateTime inferStartDttm,
|
String mapSheetScope,
|
||||||
ZonedDateTime inferEndDttm
|
ZonedDateTime inferStartDttm,
|
||||||
) {
|
ZonedDateTime inferEndDttm) {
|
||||||
this.analTitle = analTitle;
|
this.analTitle = analTitle;
|
||||||
this.modelVer1 = modelVer1;
|
this.modelVer1 = modelVer1;
|
||||||
this.modelVer2 = modelVer2;
|
this.modelVer2 = modelVer2;
|
||||||
@@ -463,9 +451,10 @@ public class InferenceDetailDto {
|
|||||||
this.mapSheetScope = mapSheetScope;
|
this.mapSheetScope = mapSheetScope;
|
||||||
this.inferStartDttm = inferStartDttm;
|
this.inferStartDttm = inferStartDttm;
|
||||||
this.inferEndDttm = inferEndDttm;
|
this.inferEndDttm = inferEndDttm;
|
||||||
this.elapsedDuration = (inferStartDttm != null && inferEndDttm != null)
|
this.elapsedDuration =
|
||||||
? Duration.between(inferStartDttm, inferEndDttm)
|
(inferStartDttm != null && inferEndDttm != null)
|
||||||
: null;
|
? Duration.between(inferStartDttm, inferEndDttm)
|
||||||
|
: null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ public class MapSheetLearnRepositoryImpl implements MapSheetLearnRepositoryCusto
|
|||||||
BooleanBuilder builder = new BooleanBuilder();
|
BooleanBuilder builder = new BooleanBuilder();
|
||||||
|
|
||||||
NumberExpression<Integer> statusOrder =
|
NumberExpression<Integer> statusOrder =
|
||||||
new CaseBuilder().when(mapSheetLearnEntity.status.eq("Y")).then(0).otherwise(1);
|
new CaseBuilder().when(mapSheetLearnEntity.status.eq("Y")).then(0).otherwise(1);
|
||||||
|
|
||||||
// 국유인 반영 여부
|
// 국유인 반영 여부
|
||||||
if (StringUtils.isNotBlank(req.getApplyYn())) {
|
if (StringUtils.isNotBlank(req.getApplyYn())) {
|
||||||
@@ -55,10 +55,10 @@ public class MapSheetLearnRepositoryImpl implements MapSheetLearnRepositoryCusto
|
|||||||
// 국유인 반영일
|
// 국유인 반영일
|
||||||
if (req.getStrtDttm() != null && req.getEndDttm() != null) {
|
if (req.getStrtDttm() != null && req.getEndDttm() != null) {
|
||||||
builder.and(
|
builder.and(
|
||||||
mapSheetLearnEntity
|
mapSheetLearnEntity
|
||||||
.applyDttm
|
.applyDttm
|
||||||
.goe(DateRange.start(req.getStrtDttm()))
|
.goe(DateRange.start(req.getStrtDttm()))
|
||||||
.and(mapSheetLearnEntity.applyDttm.lt(DateRange.end(req.getEndDttm()))));
|
.and(mapSheetLearnEntity.applyDttm.lt(DateRange.end(req.getEndDttm()))));
|
||||||
}
|
}
|
||||||
|
|
||||||
// 제목
|
// 제목
|
||||||
@@ -67,21 +67,21 @@ public class MapSheetLearnRepositoryImpl implements MapSheetLearnRepositoryCusto
|
|||||||
}
|
}
|
||||||
|
|
||||||
List<MapSheetLearnEntity> content =
|
List<MapSheetLearnEntity> content =
|
||||||
queryFactory
|
queryFactory
|
||||||
.select(mapSheetLearnEntity)
|
.select(mapSheetLearnEntity)
|
||||||
.from(mapSheetLearnEntity)
|
.from(mapSheetLearnEntity)
|
||||||
.where(builder)
|
.where(builder)
|
||||||
.offset(pageable.getOffset())
|
.offset(pageable.getOffset())
|
||||||
.limit(pageable.getPageSize())
|
.limit(pageable.getPageSize())
|
||||||
.orderBy(mapSheetLearnEntity.id.desc())
|
.orderBy(mapSheetLearnEntity.id.desc())
|
||||||
.fetch();
|
.fetch();
|
||||||
|
|
||||||
Long total =
|
Long total =
|
||||||
queryFactory
|
queryFactory
|
||||||
.select(mapSheetLearnEntity.count())
|
.select(mapSheetLearnEntity.count())
|
||||||
.from(mapSheetLearnEntity)
|
.from(mapSheetLearnEntity)
|
||||||
.where(builder)
|
.where(builder)
|
||||||
.fetchOne();
|
.fetchOne();
|
||||||
|
|
||||||
return new PageImpl<>(content, pageable, total == null ? 0L : total);
|
return new PageImpl<>(content, pageable, total == null ? 0L : total);
|
||||||
}
|
}
|
||||||
@@ -89,10 +89,10 @@ public class MapSheetLearnRepositoryImpl implements MapSheetLearnRepositoryCusto
|
|||||||
@Override
|
@Override
|
||||||
public Optional<MapSheetLearnEntity> getInferenceResultByUuid(UUID uuid) {
|
public Optional<MapSheetLearnEntity> getInferenceResultByUuid(UUID uuid) {
|
||||||
return Optional.ofNullable(
|
return Optional.ofNullable(
|
||||||
queryFactory
|
queryFactory
|
||||||
.selectFrom(mapSheetLearnEntity)
|
.selectFrom(mapSheetLearnEntity)
|
||||||
.where(mapSheetLearnEntity.uuid.eq(uuid))
|
.where(mapSheetLearnEntity.uuid.eq(uuid))
|
||||||
.fetchOne());
|
.fetchOne());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -101,41 +101,41 @@ public class MapSheetLearnRepositoryImpl implements MapSheetLearnRepositoryCusto
|
|||||||
BooleanBuilder builder = new BooleanBuilder();
|
BooleanBuilder builder = new BooleanBuilder();
|
||||||
|
|
||||||
List<Integer> latestIds =
|
List<Integer> latestIds =
|
||||||
queryFactory
|
queryFactory
|
||||||
.select(systemMetricEntity.id1.max())
|
.select(systemMetricEntity.id1.max())
|
||||||
.from(systemMetricEntity)
|
.from(systemMetricEntity)
|
||||||
.groupBy(systemMetricEntity.serverName)
|
.groupBy(systemMetricEntity.serverName)
|
||||||
.fetch();
|
.fetch();
|
||||||
|
|
||||||
List<Integer> latestGpuIds =
|
List<Integer> latestGpuIds =
|
||||||
queryFactory
|
queryFactory
|
||||||
.select(gpuMetricEntity.id1.max())
|
.select(gpuMetricEntity.id1.max())
|
||||||
.from(gpuMetricEntity)
|
.from(gpuMetricEntity)
|
||||||
.groupBy(gpuMetricEntity.serverName)
|
.groupBy(gpuMetricEntity.serverName)
|
||||||
.fetch();
|
.fetch();
|
||||||
|
|
||||||
List<InferenceServerStatusDto> foundContent =
|
List<InferenceServerStatusDto> foundContent =
|
||||||
queryFactory
|
queryFactory
|
||||||
.select(
|
.select(
|
||||||
Projections.constructor(
|
Projections.constructor(
|
||||||
InferenceServerStatusDto.class,
|
InferenceServerStatusDto.class,
|
||||||
systemMetricEntity.serverName,
|
systemMetricEntity.serverName,
|
||||||
systemMetricEntity.cpuUser,
|
systemMetricEntity.cpuUser,
|
||||||
systemMetricEntity.cpuSystem,
|
systemMetricEntity.cpuSystem,
|
||||||
systemMetricEntity.memused,
|
systemMetricEntity.memused,
|
||||||
systemMetricEntity.kbmemused,
|
systemMetricEntity.kbmemused,
|
||||||
gpuMetricEntity.gpuUtil))
|
gpuMetricEntity.gpuUtil))
|
||||||
.from(systemMetricEntity)
|
.from(systemMetricEntity)
|
||||||
.leftJoin(gpuMetricEntity)
|
.leftJoin(gpuMetricEntity)
|
||||||
.on(
|
.on(
|
||||||
gpuMetricEntity
|
gpuMetricEntity
|
||||||
.id1
|
.id1
|
||||||
.in(latestGpuIds)
|
.in(latestGpuIds)
|
||||||
.and(gpuMetricEntity.serverName.eq(systemMetricEntity.serverName)))
|
.and(gpuMetricEntity.serverName.eq(systemMetricEntity.serverName)))
|
||||||
.where(systemMetricEntity.id1.in(latestIds)) // In 절 사용
|
.where(systemMetricEntity.id1.in(latestIds)) // In 절 사용
|
||||||
.orderBy(systemMetricEntity.serverName.asc())
|
.orderBy(systemMetricEntity.serverName.asc())
|
||||||
.limit(4)
|
.limit(4)
|
||||||
.fetch();
|
.fetch();
|
||||||
|
|
||||||
return foundContent;
|
return foundContent;
|
||||||
}
|
}
|
||||||
@@ -143,11 +143,11 @@ public class MapSheetLearnRepositoryImpl implements MapSheetLearnRepositoryCusto
|
|||||||
@Override
|
@Override
|
||||||
public Optional<MapSheetLearnEntity> getInferenceResultByStatus(String status) {
|
public Optional<MapSheetLearnEntity> getInferenceResultByStatus(String status) {
|
||||||
return Optional.ofNullable(
|
return Optional.ofNullable(
|
||||||
queryFactory
|
queryFactory
|
||||||
.selectFrom(mapSheetLearnEntity)
|
.selectFrom(mapSheetLearnEntity)
|
||||||
.where(mapSheetLearnEntity.status.eq(status))
|
.where(mapSheetLearnEntity.status.eq(status))
|
||||||
.limit(1)
|
.limit(1)
|
||||||
.fetchOne());
|
.fetchOne());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -160,37 +160,37 @@ public class MapSheetLearnRepositoryImpl implements MapSheetLearnRepositoryCusto
|
|||||||
QModelMngEntity m3Model = new QModelMngEntity("m3Model");
|
QModelMngEntity m3Model = new QModelMngEntity("m3Model");
|
||||||
|
|
||||||
InferenceStatusDetailDto foundContent =
|
InferenceStatusDetailDto foundContent =
|
||||||
queryFactory
|
queryFactory
|
||||||
.select(
|
.select(
|
||||||
Projections.constructor(
|
Projections.constructor(
|
||||||
InferenceStatusDetailDto.class,
|
InferenceStatusDetailDto.class,
|
||||||
mapSheetLearnEntity.title,
|
mapSheetLearnEntity.title,
|
||||||
mapSheetLearnEntity.compareYyyy,
|
mapSheetLearnEntity.compareYyyy,
|
||||||
mapSheetLearnEntity.targetYyyy,
|
mapSheetLearnEntity.targetYyyy,
|
||||||
mapSheetLearnEntity.detectOption,
|
mapSheetLearnEntity.detectOption,
|
||||||
mapSheetLearnEntity.mapSheetScope,
|
mapSheetLearnEntity.mapSheetScope,
|
||||||
mapSheetLearnEntity.inferStartDttm,
|
mapSheetLearnEntity.inferStartDttm,
|
||||||
mapSheetLearnEntity.inferEndDttm,
|
mapSheetLearnEntity.inferEndDttm,
|
||||||
mapSheetLearnEntity.detectingCnt,
|
mapSheetLearnEntity.detectingCnt,
|
||||||
mapSheetLearnEntity.detectEndCnt,
|
mapSheetLearnEntity.detectEndCnt,
|
||||||
mapSheetLearnEntity.m1ModelStartDttm,
|
mapSheetLearnEntity.m1ModelStartDttm,
|
||||||
mapSheetLearnEntity.m1ModelEndDttm,
|
mapSheetLearnEntity.m1ModelEndDttm,
|
||||||
mapSheetLearnEntity.m2ModelStartDttm,
|
mapSheetLearnEntity.m2ModelStartDttm,
|
||||||
mapSheetLearnEntity.m2ModelEndDttm,
|
mapSheetLearnEntity.m2ModelEndDttm,
|
||||||
mapSheetLearnEntity.m3ModelStartDttm,
|
mapSheetLearnEntity.m3ModelStartDttm,
|
||||||
mapSheetLearnEntity.m3ModelEndDttm,
|
mapSheetLearnEntity.m3ModelEndDttm,
|
||||||
m1Model.modelVer.as("model1Ver"),
|
m1Model.modelVer.as("model1Ver"),
|
||||||
m2Model.modelVer.as("model2Ver"),
|
m2Model.modelVer.as("model2Ver"),
|
||||||
m3Model.modelVer.as("model3Ver")))
|
m3Model.modelVer.as("model3Ver")))
|
||||||
.from(mapSheetLearnEntity)
|
.from(mapSheetLearnEntity)
|
||||||
.leftJoin(m1Model)
|
.leftJoin(m1Model)
|
||||||
.on(m1Model.uuid.eq(mapSheetLearnEntity.m1ModelUuid))
|
.on(m1Model.uuid.eq(mapSheetLearnEntity.m1ModelUuid))
|
||||||
.leftJoin(m2Model)
|
.leftJoin(m2Model)
|
||||||
.on(m2Model.uuid.eq(mapSheetLearnEntity.m2ModelUuid))
|
.on(m2Model.uuid.eq(mapSheetLearnEntity.m2ModelUuid))
|
||||||
.leftJoin(m3Model)
|
.leftJoin(m3Model)
|
||||||
.on(m3Model.uuid.eq(mapSheetLearnEntity.m3ModelUuid))
|
.on(m3Model.uuid.eq(mapSheetLearnEntity.m3ModelUuid))
|
||||||
.where(mapSheetLearnEntity.uuid.eq(uuid))
|
.where(mapSheetLearnEntity.uuid.eq(uuid))
|
||||||
.fetchOne();
|
.fetchOne();
|
||||||
|
|
||||||
return foundContent;
|
return foundContent;
|
||||||
}
|
}
|
||||||
@@ -201,30 +201,30 @@ public class MapSheetLearnRepositoryImpl implements MapSheetLearnRepositoryCusto
|
|||||||
QModelMngEntity model = new QModelMngEntity("model");
|
QModelMngEntity model = new QModelMngEntity("model");
|
||||||
|
|
||||||
InferenceProgressDto dto =
|
InferenceProgressDto dto =
|
||||||
queryFactory
|
queryFactory
|
||||||
.select(
|
.select(
|
||||||
Projections.constructor(
|
Projections.constructor(
|
||||||
InferenceProgressDto.class,
|
InferenceProgressDto.class,
|
||||||
Projections.constructor(
|
Projections.constructor(
|
||||||
InferenceProgressDto.pred_requests_areas.class,
|
InferenceProgressDto.pred_requests_areas.class,
|
||||||
mapSheetLearnEntity.compareYyyy,
|
mapSheetLearnEntity.compareYyyy,
|
||||||
mapSheetLearnEntity.targetYyyy,
|
mapSheetLearnEntity.targetYyyy,
|
||||||
mapSheetLearnEntity.modelComparePath,
|
mapSheetLearnEntity.modelComparePath,
|
||||||
mapSheetLearnEntity.modelTargetPath),
|
mapSheetLearnEntity.modelTargetPath),
|
||||||
model.modelVer.as("modelVer"),
|
model.modelVer.as("modelVer"),
|
||||||
model.cdModelPath.as("cdModelPath"),
|
model.cdModelPath.as("cdModelPath"),
|
||||||
model.cdModelFileName.as("cdModelFileName"),
|
model.cdModelFileName.as("cdModelFileName"),
|
||||||
model.cdModelConfigPath.as("cdModelConfigPath"),
|
model.cdModelConfigPath.as("cdModelConfigPath"),
|
||||||
model.cdModelConfigFileName.as("cdModelConfigFileName"),
|
model.cdModelConfigFileName.as("cdModelConfigFileName"),
|
||||||
model.clsModelPath,
|
model.clsModelPath,
|
||||||
model.clsModelFileName,
|
model.clsModelFileName,
|
||||||
model.clsModelVersion,
|
model.clsModelVersion,
|
||||||
model.priority))
|
model.priority))
|
||||||
.from(mapSheetLearnEntity)
|
.from(mapSheetLearnEntity)
|
||||||
.join(model)
|
.join(model)
|
||||||
.on(model.uuid.eq(modelUuid))
|
.on(model.uuid.eq(modelUuid))
|
||||||
.where(mapSheetLearnEntity.id.eq(id))
|
.where(mapSheetLearnEntity.id.eq(id))
|
||||||
.fetchOne();
|
.fetchOne();
|
||||||
return dto;
|
return dto;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -235,10 +235,10 @@ public class MapSheetLearnRepositoryImpl implements MapSheetLearnRepositoryCusto
|
|||||||
*/
|
*/
|
||||||
public UUID getProcessing() {
|
public UUID getProcessing() {
|
||||||
return queryFactory
|
return queryFactory
|
||||||
.select(mapSheetLearnEntity.uuid)
|
.select(mapSheetLearnEntity.uuid)
|
||||||
.from(mapSheetLearnEntity)
|
.from(mapSheetLearnEntity)
|
||||||
.where(mapSheetLearnEntity.status.eq("IN_PROGRESS"))
|
.where(mapSheetLearnEntity.status.eq("IN_PROGRESS"))
|
||||||
.fetchOne();
|
.fetchOne();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -248,17 +248,17 @@ public class MapSheetLearnRepositoryImpl implements MapSheetLearnRepositoryCusto
|
|||||||
entity.setTargetYyyy(targetYear);
|
entity.setTargetYyyy(targetYear);
|
||||||
|
|
||||||
Integer stage =
|
Integer stage =
|
||||||
queryFactory
|
queryFactory
|
||||||
.select(mapSheetLearnEntity.stage)
|
.select(mapSheetLearnEntity.stage)
|
||||||
.from(mapSheetLearnEntity)
|
.from(mapSheetLearnEntity)
|
||||||
.where(
|
.where(
|
||||||
mapSheetLearnEntity
|
mapSheetLearnEntity
|
||||||
.compareYyyy
|
.compareYyyy
|
||||||
.eq(compareYear)
|
.eq(compareYear)
|
||||||
.and(mapSheetLearnEntity.targetYyyy.eq(targetYear)))
|
.and(mapSheetLearnEntity.targetYyyy.eq(targetYear)))
|
||||||
.orderBy(mapSheetLearnEntity.stage.desc())
|
.orderBy(mapSheetLearnEntity.stage.desc())
|
||||||
.limit(1)
|
.limit(1)
|
||||||
.fetchOne();
|
.fetchOne();
|
||||||
|
|
||||||
return stage == null ? 1 : stage + 1;
|
return stage == null ? 1 : stage + 1;
|
||||||
}
|
}
|
||||||
@@ -270,28 +270,27 @@ public class MapSheetLearnRepositoryImpl implements MapSheetLearnRepositoryCusto
|
|||||||
QModelMngEntity m3 = new QModelMngEntity("m3");
|
QModelMngEntity m3 = new QModelMngEntity("m3");
|
||||||
|
|
||||||
return queryFactory
|
return queryFactory
|
||||||
.select(
|
.select(
|
||||||
Projections.constructor(
|
Projections.constructor(
|
||||||
AnalResultInfo.class,
|
AnalResultInfo.class,
|
||||||
mapSheetLearnEntity.title,
|
mapSheetLearnEntity.title,
|
||||||
m1.modelVer,
|
m1.modelVer,
|
||||||
m2.modelVer,
|
m2.modelVer,
|
||||||
m3.modelVer,
|
m3.modelVer,
|
||||||
mapSheetLearnEntity.compareYyyy,
|
mapSheetLearnEntity.compareYyyy,
|
||||||
mapSheetLearnEntity.targetYyyy,
|
mapSheetLearnEntity.targetYyyy,
|
||||||
mapSheetLearnEntity.detectOption,
|
mapSheetLearnEntity.detectOption,
|
||||||
mapSheetLearnEntity.mapSheetScope,
|
mapSheetLearnEntity.mapSheetScope,
|
||||||
mapSheetLearnEntity.inferStartDttm,
|
mapSheetLearnEntity.inferStartDttm,
|
||||||
mapSheetLearnEntity.inferEndDttm
|
mapSheetLearnEntity.inferEndDttm))
|
||||||
)
|
.from(mapSheetLearnEntity)
|
||||||
)
|
.leftJoin(m1)
|
||||||
.from(mapSheetLearnEntity)
|
.on(mapSheetLearnEntity.m1ModelUuid.eq(m1.uuid))
|
||||||
.leftJoin(m1)
|
.leftJoin(m2)
|
||||||
.on(mapSheetLearnEntity.m1ModelUuid.eq(m1.uuid))
|
.on(mapSheetLearnEntity.m2ModelUuid.eq(m2.uuid))
|
||||||
.leftJoin(m2)
|
.leftJoin(m3)
|
||||||
.on(mapSheetLearnEntity.m2ModelUuid.eq(m2.uuid))
|
.on(mapSheetLearnEntity.m3ModelUuid.eq(m3.uuid))
|
||||||
.leftJoin(m3)
|
.where(mapSheetLearnEntity.uuid.eq(UUID.fromString(uuid)))
|
||||||
.on(mapSheetLearnEntity.m3ModelUuid.eq(m3.uuid))
|
.fetchOne();
|
||||||
.where(mapSheetLearnEntity.uuid.eq(UUID.fromString(uuid))).fetchOne();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -34,7 +34,6 @@ import com.querydsl.core.types.dsl.CaseBuilder;
|
|||||||
import com.querydsl.core.types.dsl.Expressions;
|
import com.querydsl.core.types.dsl.Expressions;
|
||||||
import com.querydsl.core.types.dsl.NumberExpression;
|
import com.querydsl.core.types.dsl.NumberExpression;
|
||||||
import com.querydsl.core.types.dsl.StringExpression;
|
import com.querydsl.core.types.dsl.StringExpression;
|
||||||
import com.querydsl.jpa.JPAExpressions;
|
|
||||||
import com.querydsl.jpa.impl.JPAQueryFactory;
|
import com.querydsl.jpa.impl.JPAQueryFactory;
|
||||||
import jakarta.persistence.EntityManager;
|
import jakarta.persistence.EntityManager;
|
||||||
import jakarta.persistence.EntityNotFoundException;
|
import jakarta.persistence.EntityNotFoundException;
|
||||||
|
|||||||
Reference in New Issue
Block a user