영상데이터관리 목록 조회 수정
This commit is contained in:
@@ -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))
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user