영상데이터관리 목록 조회 수정

This commit is contained in:
Moon
2025-12-16 12:33:36 +09:00
parent b6a96846b5
commit 103242d292
5 changed files with 49 additions and 21 deletions

View File

@@ -52,6 +52,15 @@ public class MapSheetMngRepositoryImpl extends QuerydslRepositorySupport
whereBuilder.and(mapSheetMngEntity.mngYyyy.eq(searchReq.getMngYyyy()));
}
NumberExpression<Long> totalCount = mapSheetMngHstEntity.count().as("syncTotCnt");
NumberExpression<Long> doneCount = new CaseBuilder()
.when(mapSheetMngHstEntity.dataState.eq("DONE"))
.then(1L)
.otherwise(0L)
.sum()
.as("syncStateDoneCnt");
List<MapSheetMngDto.MngDto> foundContent =
queryFactory
.select(
@@ -67,33 +76,35 @@ public class MapSheetMngRepositoryImpl extends QuerydslRepositorySupport
mapSheetMngEntity.syncCheckState,
mapSheetMngHstEntity.count(),
new CaseBuilder()
.when(mapSheetMngHstEntity.syncState.eq("DONE"))
.when(mapSheetMngHstEntity.dataState.eq("DONE"))
.then(1L)
.otherwise(0L)
.sum()
.as("syncStateDoneCnt"),
new CaseBuilder()
.when(mapSheetMngHstEntity.syncCheckState.eq("DONE"))
.when(mapSheetMngHstEntity.syncState.ne("NOTYET"))
.then(1L)
.otherwise(0L)
.sum(),
new CaseBuilder()
.when(mapSheetMngHstEntity.dataState.eq("NOT"))
.when(mapSheetMngHstEntity.syncState.eq("NOFILE")
.or( mapSheetMngHstEntity.syncState.eq("NOTPAIR")))
.then(1L)
.otherwise(0L)
.sum(),
new CaseBuilder()
.when(mapSheetMngHstEntity.dataState.eq("TYPEERROR"))
.then(1L)
.otherwise(0L)
.sum(),
.when(mapSheetMngHstEntity.syncState.eq("DUPLICATE"))
.then(1L)
.otherwise(0L)
.sum(),
new CaseBuilder()
.when(mapSheetMngHstEntity.dataState.eq("SIZEERROR"))
.then(1L)
.otherwise(0L)
.sum(),
mapSheetMngHstEntity.syncStrtDttm.min(),
mapSheetMngHstEntity.syncCheckEndDttm.max()))
.when(mapSheetMngHstEntity.syncState.eq("TYPEERROR")
.or( mapSheetMngHstEntity.syncState.eq("SIZEERROR")))
.then(1L)
.otherwise(0L)
.sum(),
mapSheetMngEntity.createdDttm,
mapSheetMngHstEntity.syncEndDttm.max()))
.from(mapSheetMngEntity)
.leftJoin(mapSheetMngHstEntity)
.on(mapSheetMngEntity.mngYyyy.eq(mapSheetMngHstEntity.mngYyyy))

View File

@@ -108,7 +108,7 @@ public class MapSheetMngFileJobRepositoryImpl extends QuerydslRepositorySupport
public void mngHstDataSyncStateUpdate(MapSheetMngDto.MngHstDto updateReq) {
if (updateReq.getSyncState().equals("DONE")) {
if (updateReq.getDataState().equals("DONE")) {
long updateCount =
queryFactory
.update(mapSheetMngHstEntity)