From 9015de5c00d6c79396386fd00eaba6319cf43ea9 Mon Sep 17 00:00:00 2001 From: Moon Date: Fri, 2 Jan 2026 21:51:44 +0900 Subject: [PATCH] =?UTF-8?q?=EB=9D=BC=EB=B2=A8=EB=A7=81=20=EC=9E=91?= =?UTF-8?q?=EC=97=85=20=EA=B4=80=EB=A6=AC=EB=AA=A9=EB=A1=9D=20=EC=A1=B0?= =?UTF-8?q?=ED=9A=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../repository/label/LabelWorkRepositoryImpl.java | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/main/java/com/kamco/cd/kamcoback/postgres/repository/label/LabelWorkRepositoryImpl.java b/src/main/java/com/kamco/cd/kamcoback/postgres/repository/label/LabelWorkRepositoryImpl.java index a7e1c3fa..e57f5314 100644 --- a/src/main/java/com/kamco/cd/kamcoback/postgres/repository/label/LabelWorkRepositoryImpl.java +++ b/src/main/java/com/kamco/cd/kamcoback/postgres/repository/label/LabelWorkRepositoryImpl.java @@ -76,14 +76,17 @@ public class LabelWorkRepositoryImpl extends QuerydslRepositorySupport whereSubBuilder.and(mapSheetAnalDataInferenceGeomEntity.dataUid.eq(mapSheetAnalDataInferenceEntity.id)); - if (searchReq.getStrtDttm() != null && ! searchReq.getStrtDttm().isEmpty()) { - - whereSubBuilder.and(mapSheetAnalDataInferenceGeomEntity.labelStateDttm.isNotNull()); + if (searchReq.getStrtDttm() != null && ! searchReq.getStrtDttm().isEmpty() + && searchReq.getEndDttm() != null && ! searchReq.getEndDttm().isEmpty()) { + //whereSubBuilder.and(mapSheetAnalDataInferenceGeomEntity.labelStateDttm.isNotNull()); whereSubBuilder.and( - Expressions.stringTemplate("to_char({0}, 'YYYY-MM-DD')", mapSheetAnalDataInferenceEntity.labelStateDttm) - .gt("2024-01-01") + Expressions.stringTemplate("to_char({0}, 'YYYYMMDD')", mapSheetAnalDataInferenceGeomEntity.labelStateDttm) + .between(searchReq.getStrtDttm(), searchReq.getEndDttm()) ); + + //whereBuilder.and(mapSheetAnalDataInferenceGeomEntity.labelStateDttm.min().isNotNull()); + } @@ -119,7 +122,7 @@ public class LabelWorkRepositoryImpl extends QuerydslRepositorySupport mapSheetAnalDataInferenceGeomEntity.labelStateDttm.min() )) .from(mapSheetAnalDataInferenceEntity) - .leftJoin(mapSheetAnalDataInferenceGeomEntity) + .innerJoin(mapSheetAnalDataInferenceGeomEntity) .on(whereSubBuilder) .where(whereBuilder) .groupBy(