From d3fe9ee8970f9417a1459e06f396ef79a87db90d Mon Sep 17 00:00:00 2001 From: Moon Date: Tue, 23 Dec 2025 14:44:41 +0900 Subject: [PATCH 1/2] =?UTF-8?q?=ED=8E=98=EC=96=B4=EC=98=A4=EB=A5=98?= =?UTF-8?q?=EA=B0=9C=EC=88=98=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mapsheet/MapSheetMngRepositoryImpl.java | 23 ++++++++++++------- 1 file changed, 15 insertions(+), 8 deletions(-) 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 From d4f5947a3809724033444875a38822f309a7b7c2 Mon Sep 17 00:00:00 2001 From: teddy Date: Tue, 23 Dec 2025 14:45:16 +0900 Subject: [PATCH 2/2] =?UTF-8?q?spot=20less=20=EC=A0=81=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mapsheet/MapSheetMngRepositoryImpl.java | 31 +++---------------- 1 file changed, 4 insertions(+), 27 deletions(-) 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 6c1fbcd2..5ca2c6de 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,26 +91,17 @@ public class MapSheetMngRepositoryImpl extends QuerydslRepositorySupport .then(1L) .otherwise(0L) .sum(), - new CaseBuilder() - .when( - mapSheetMngHstEntity - .syncState - .eq("NOTPAIR") - ) + .when(mapSheetMngHstEntity.syncState.eq("NOTPAIR")) .then(1L) .otherwise(0L) .sum(), - new CaseBuilder() .when( mapSheetMngHstEntity .syncCheckState .eq("DONE") - .and( - mapSheetMngHstEntity - .syncState - .eq("NOTPAIR"))) + .and(mapSheetMngHstEntity.syncState.eq("NOTPAIR"))) .then(1L) .otherwise(0L) .sum(), @@ -225,43 +216,30 @@ 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("NOTPAIR") - ) + .when(mapSheetMngHstEntity.syncState.eq("NOTPAIR")) .then(1L) .otherwise(0L) .sum(), - new CaseBuilder() .when( mapSheetMngHstEntity .syncCheckState .eq("DONE") - .and( - mapSheetMngHstEntity - .syncState - .eq("NOTPAIR") - )) + .and(mapSheetMngHstEntity.syncState.eq("NOTPAIR"))) .then(1L) .otherwise(0L) .sum(), - new CaseBuilder() .when(mapSheetMngHstEntity.syncState.eq("DUPLICATE")) .then(1L) .otherwise(0L) .sum(), - new CaseBuilder() .when( mapSheetMngHstEntity @@ -280,7 +258,6 @@ public class MapSheetMngRepositoryImpl extends QuerydslRepositorySupport .then(1L) .otherwise(0L) .sum(), - new CaseBuilder() .when( mapSheetMngHstEntity