Merge remote-tracking branch 'origin/feat/dev_251201' into feat/dev_251201

# Conflicts:
#	src/main/java/com/kamco/cd/kamcoback/postgres/repository/mapsheet/MapSheetMngRepositoryImpl.java
This commit is contained in:
2025-12-16 14:12:42 +09:00
2 changed files with 52 additions and 24 deletions

View File

@@ -74,8 +74,11 @@ public class MapSheetMngDto {
private Long syncStateDoneCnt; private Long syncStateDoneCnt;
private Long syncDataCheckDoneCnt; private Long syncDataCheckDoneCnt;
private Long syncNotPaireCnt; private Long syncNotPaireCnt;
private Long syncNotPaireExecCnt;
private Long syncDuplicateCnt; private Long syncDuplicateCnt;
private Long syncDuplicateExecCnt;
private Long syncFaultCnt; private Long syncFaultCnt;
private Long syncFaultExecCnt;
@JsonFormatDttm private ZonedDateTime rgstStrtDttm; @JsonFormatDttm private ZonedDateTime rgstStrtDttm;
@JsonFormatDttm private ZonedDateTime rgstEndDttm; @JsonFormatDttm private ZonedDateTime rgstEndDttm;
@@ -92,6 +95,14 @@ public class MapSheetMngDto {
} }
return (double) this.syncDataCheckDoneCnt / this.syncTotCnt * 100.0; return (double) this.syncDataCheckDoneCnt / this.syncTotCnt * 100.0;
} }
public long getSyncErrorTotCnt() {
return this.syncNotPaireCnt + this.syncDuplicateCnt + this.syncFaultCnt;
}
public long getSyncErrorExecTotCnt() {
return this.syncNotPaireExecCnt + this.syncDuplicateExecCnt + this.syncFaultExecCnt;
}
} }
@Schema(name = "ErrorSearchReq", description = "영상관리 오류데이터 검색 요청") @Schema(name = "ErrorSearchReq", description = "영상관리 오류데이터 검색 요청")

View File

@@ -54,13 +54,12 @@ public class MapSheetMngRepositoryImpl extends QuerydslRepositorySupport
NumberExpression<Long> totalCount = mapSheetMngHstEntity.count().as("syncTotCnt"); NumberExpression<Long> totalCount = mapSheetMngHstEntity.count().as("syncTotCnt");
NumberExpression<Long> doneCount = NumberExpression<Long> doneCount = new CaseBuilder()
new CaseBuilder() .when(mapSheetMngHstEntity.dataState.eq("DONE"))
.when(mapSheetMngHstEntity.dataState.eq("DONE")) .then(1L)
.then(1L) .otherwise(0L)
.otherwise(0L) .sum()
.sum() .as("syncStateDoneCnt");
.as("syncStateDoneCnt");
List<MapSheetMngDto.MngDto> foundContent = List<MapSheetMngDto.MngDto> foundContent =
queryFactory queryFactory
@@ -88,28 +87,46 @@ public class MapSheetMngRepositoryImpl extends QuerydslRepositorySupport
.otherwise(0L) .otherwise(0L)
.sum(), .sum(),
new CaseBuilder() new CaseBuilder()
.when( .when(mapSheetMngHstEntity.syncState.eq("NOFILE")
mapSheetMngHstEntity .or( mapSheetMngHstEntity.syncState.eq("NOTPAIR")))
.syncState
.eq("NOFILE")
.or(mapSheetMngHstEntity.syncState.eq("NOTPAIR")))
.then(1L) .then(1L)
.otherwise(0L) .otherwise(0L)
.sum(), .sum(),
new CaseBuilder() new CaseBuilder()
.when(mapSheetMngHstEntity.syncState.eq("DUPLICATE")) .when(mapSheetMngHstEntity.syncCheckState.eq("DONE")
.then(1L) .and( mapSheetMngHstEntity.syncState.eq("NOFILE")
.otherwise(0L) .or(mapSheetMngHstEntity.syncState.eq("NOTPAIR")) )
.sum(), )
.then(1L)
.otherwise(0L)
.sum(),
new CaseBuilder() new CaseBuilder()
.when( .when(mapSheetMngHstEntity.syncState.eq("DUPLICATE"))
mapSheetMngHstEntity .then(1L)
.syncState .otherwise(0L)
.eq("TYPEERROR") .sum(),
.or(mapSheetMngHstEntity.syncState.eq("SIZEERROR"))) new CaseBuilder()
.then(1L) .when(mapSheetMngHstEntity.syncCheckState.eq("DONE")
.otherwise(0L) .and(mapSheetMngHstEntity.syncState.eq("DUPLICATE")) )
.sum(), .then(1L)
.otherwise(0L)
.sum(),
new CaseBuilder()
.when(mapSheetMngHstEntity.syncState.eq("TYPEERROR")
.or( mapSheetMngHstEntity.syncState.eq("SIZEERROR")))
.then(1L)
.otherwise(0L)
.sum(),
new CaseBuilder()
.when(mapSheetMngHstEntity.syncCheckState.eq("DONE")
.and(mapSheetMngHstEntity.syncState.eq("TYPEERROR")
.or( mapSheetMngHstEntity.syncState.eq("SIZEERROR"))) )
.then(1L)
.otherwise(0L)
.sum(),
mapSheetMngEntity.createdDttm, mapSheetMngEntity.createdDttm,
mapSheetMngHstEntity.syncEndDttm.max())) mapSheetMngHstEntity.syncEndDttm.max()))
.from(mapSheetMngEntity) .from(mapSheetMngEntity)