diff --git a/src/main/java/com/kamco/cd/kamcoback/postgres/repository/mapsheet/MapSheetMngRepositoryImpl.java b/src/main/java/com/kamco/cd/kamcoback/postgres/repository/mapsheet/MapSheetMngRepositoryImpl.java index b6820493..6c1fbcd2 100644 --- a/src/main/java/com/kamco/cd/kamcoback/postgres/repository/mapsheet/MapSheetMngRepositoryImpl.java +++ b/src/main/java/com/kamco/cd/kamcoback/postgres/repository/mapsheet/MapSheetMngRepositoryImpl.java @@ -91,15 +91,17 @@ public class MapSheetMngRepositoryImpl extends QuerydslRepositorySupport .then(1L) .otherwise(0L) .sum(), + new CaseBuilder() .when( mapSheetMngHstEntity .syncState - .eq("NOFILE") - .or(mapSheetMngHstEntity.syncState.eq("NOTPAIR"))) + .eq("NOTPAIR") + ) .then(1L) .otherwise(0L) .sum(), + new CaseBuilder() .when( mapSheetMngHstEntity @@ -108,8 +110,7 @@ public class MapSheetMngRepositoryImpl extends QuerydslRepositorySupport .and( mapSheetMngHstEntity .syncState - .eq("NOFILE") - .or(mapSheetMngHstEntity.syncState.eq("NOTPAIR")))) + .eq("NOTPAIR"))) .then(1L) .otherwise(0L) .sum(), @@ -224,20 +225,23 @@ public class MapSheetMngRepositoryImpl extends QuerydslRepositorySupport .otherwise(0L) .sum() .as("syncStateDoneCnt"), + new CaseBuilder() .when(mapSheetMngHstEntity.syncState.ne("NOTYET")) .then(1L) .otherwise(0L) .sum(), + new CaseBuilder() .when( mapSheetMngHstEntity .syncState - .eq("NOFILE") - .or(mapSheetMngHstEntity.syncState.eq("NOTPAIR"))) + .eq("NOTPAIR") + ) .then(1L) .otherwise(0L) .sum(), + new CaseBuilder() .when( mapSheetMngHstEntity @@ -246,16 +250,18 @@ public class MapSheetMngRepositoryImpl extends QuerydslRepositorySupport .and( mapSheetMngHstEntity .syncState - .eq("NOFILE") - .or(mapSheetMngHstEntity.syncState.eq("NOTPAIR")))) + .eq("NOTPAIR") + )) .then(1L) .otherwise(0L) .sum(), + new CaseBuilder() .when(mapSheetMngHstEntity.syncState.eq("DUPLICATE")) .then(1L) .otherwise(0L) .sum(), + new CaseBuilder() .when( mapSheetMngHstEntity @@ -274,6 +280,7 @@ public class MapSheetMngRepositoryImpl extends QuerydslRepositorySupport .then(1L) .otherwise(0L) .sum(), + new CaseBuilder() .when( mapSheetMngHstEntity