diff --git a/src/main/java/com/kamco/cd/kamcoback/postgres/repository/changedetection/ChangeDetectionRepositoryImpl.java b/src/main/java/com/kamco/cd/kamcoback/postgres/repository/changedetection/ChangeDetectionRepositoryImpl.java index 43eb2647..dabe5710 100644 --- a/src/main/java/com/kamco/cd/kamcoback/postgres/repository/changedetection/ChangeDetectionRepositoryImpl.java +++ b/src/main/java/com/kamco/cd/kamcoback/postgres/repository/changedetection/ChangeDetectionRepositoryImpl.java @@ -51,18 +51,18 @@ public class ChangeDetectionRepositoryImpl extends QuerydslRepositorySupport .select( Projections.constructor( ChangeDetectionDto.CountDto.class, - mapSheetAnalSttcEntity.classAfterCd.as("classCd"), - mapSheetAnalSttcEntity.classAfterCd.as("classNm"), // 앞단 CoreService 에서 한글명으로 변환 + mapSheetAnalSttcEntity.id.classAfterCd.as("classCd"), + mapSheetAnalSttcEntity.id.classAfterCd.as("classNm"), // 앞단 CoreService 에서 한글명으로 변환 mapSheetAnalSttcEntity.classAfterCnt.sum())) .from(mapSheetAnalEntity) .innerJoin(mapSheetAnalDataEntity) .on(mapSheetAnalDataEntity.analUid.eq(mapSheetAnalEntity.id)) .innerJoin(mapSheetAnalSttcEntity) - .on(mapSheetAnalSttcEntity.dataUid.eq(mapSheetAnalDataEntity.id)) + .on(mapSheetAnalSttcEntity.id.dataUid.eq(mapSheetAnalDataEntity.id)) .where( mapSheetAnalEntity.id.eq(id), mapSheetAnalSttcEntity.id.mapSheetNum.eq(Long.valueOf(mapSheetNum))) - .groupBy(mapSheetAnalSttcEntity.classAfterCd) + .groupBy(mapSheetAnalSttcEntity.id.classAfterCd) .fetch(); }