This commit is contained in:
2026-01-08 18:31:38 +09:00
parent 1e505e2ece
commit 1a85c99ae4
2 changed files with 14 additions and 15 deletions

View File

@@ -11,7 +11,6 @@ import com.kamco.cd.kamcoback.label.dto.LabelWorkDto;
import com.kamco.cd.kamcoback.label.dto.LabelWorkDto.LabelWorkMng;
import com.kamco.cd.kamcoback.label.dto.LabelWorkDto.LabelWorkMngDetail;
import com.kamco.cd.kamcoback.label.dto.LabelWorkDto.WorkerState;
import com.kamco.cd.kamcoback.postgres.entity.MapSheetAnalDataInferenceGeomEntity;
import com.kamco.cd.kamcoback.postgres.entity.MapSheetAnalInferenceEntity;
import com.querydsl.core.BooleanBuilder;
import com.querydsl.core.types.Expression;
@@ -49,7 +48,6 @@ public class LabelWorkRepositoryImpl implements LabelWorkRepositoryCustom {
private final JPAQueryFactory queryFactory;
private final StringExpression NULL_STRING = Expressions.stringTemplate("cast(null as text)");
/**
* 변화탐지 년도 셀렉트박스 조회
*
@@ -123,14 +121,17 @@ public class LabelWorkRepositoryImpl implements LabelWorkRepositoryCustom {
}
// labelTotCnt: pnu가 있고 pass_yn = false (부적합)인 건수만 라벨링 대상
NumberExpression<Long> labelTotCntExpr = new CaseBuilder()
.when(
mapSheetAnalDataInferenceGeomEntity.pnu.isNotNull()
.and(mapSheetAnalDataInferenceGeomEntity.pnu.ne(0L))
.and(mapSheetAnalDataInferenceGeomEntity.passYn.eq(Boolean.FALSE)))
.then(1L)
.otherwise(0L)
.sum();
NumberExpression<Long> labelTotCntExpr =
new CaseBuilder()
.when(
mapSheetAnalDataInferenceGeomEntity
.pnu
.isNotNull()
.and(mapSheetAnalDataInferenceGeomEntity.pnu.ne(0L))
.and(mapSheetAnalDataInferenceGeomEntity.passYn.eq(Boolean.FALSE)))
.then(1L)
.otherwise(0L)
.sum();
// stagnation_yn = 'N'인 정상 진행 건수 (서브쿼리로 별도 집계)
Expression<Long> normalProgressCntSubQuery =