|
|
@ -17,6 +17,7 @@ import org.springframework.data.domain.Page;
|
|
|
|
import org.springframework.data.domain.PageImpl;
|
|
|
|
import org.springframework.data.domain.PageImpl;
|
|
|
|
import org.springframework.data.domain.Pageable;
|
|
|
|
import org.springframework.data.domain.Pageable;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import javax.validation.constraints.NotNull;
|
|
|
|
import java.util.ArrayList;
|
|
|
|
import java.util.ArrayList;
|
|
|
|
import java.util.List;
|
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
|
|
|
@ -35,13 +36,13 @@ public class IResidentAndDisabledRepositoryImpl implements IResidentAndDisabledR
|
|
|
|
private final JPAQueryFactory queryFactory;
|
|
|
|
private final JPAQueryFactory queryFactory;
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public Page<GnRecallScDto> findJudgeDatas(Pageable pageable) {
|
|
|
|
public Page<GnRecallScDto> findJudgeDatas(@NotNull final String scDatagb, Pageable pageable) {
|
|
|
|
|
|
|
|
|
|
|
|
// 커버링 인덱스로 대상 조회
|
|
|
|
// 커버링 인덱스로 대상 조회
|
|
|
|
QueryResults<Long> scCodeList = queryFactory
|
|
|
|
QueryResults<Long> scCodeList = queryFactory
|
|
|
|
.select(gnRecallSc.scCode)
|
|
|
|
.select(gnRecallSc.scCode)
|
|
|
|
.from(gnRecallSc)
|
|
|
|
.from(gnRecallSc)
|
|
|
|
.where(gnRecallSc.scDatagb.eq(CtgyConstants.Judge.DATAGB_RESIDENT.getCode()))
|
|
|
|
.where(gnRecallSc.scDatagb.eq(scDatagb))
|
|
|
|
.orderBy(gnRecallSc.scCode.desc())
|
|
|
|
.orderBy(gnRecallSc.scCode.desc())
|
|
|
|
.offset(pageable.getOffset())
|
|
|
|
.offset(pageable.getOffset())
|
|
|
|
.limit(pageable.getPageSize())
|
|
|
|
.limit(pageable.getPageSize())
|
|
|
@ -89,9 +90,6 @@ public class IResidentAndDisabledRepositoryImpl implements IResidentAndDisabledR
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public GnRecallScDto findJudgeData(final Long scCode) {
|
|
|
|
public GnRecallScDto findJudgeData(final Long scCode) {
|
|
|
|
BooleanBuilder builder = new BooleanBuilder();
|
|
|
|
|
|
|
|
builder.and(gnRecallSc.scDatagb.eq(CtgyConstants.Judge.DATAGB_RESIDENT.getCode()));
|
|
|
|
|
|
|
|
builder.and(gnRecallSc.scCode.eq(scCode));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return queryFactory
|
|
|
|
return queryFactory
|
|
|
|
.select(Projections.fields(
|
|
|
|
.select(Projections.fields(
|
|
|
@ -124,6 +122,7 @@ public class IResidentAndDisabledRepositoryImpl implements IResidentAndDisabledR
|
|
|
|
gnRecallSc.scPicad3,
|
|
|
|
gnRecallSc.scPicad3,
|
|
|
|
gnRecallSc.scPicad4,
|
|
|
|
gnRecallSc.scPicad4,
|
|
|
|
gnRecallSc.scTransfer,
|
|
|
|
gnRecallSc.scTransfer,
|
|
|
|
|
|
|
|
gnRecallSc.scDatagb,
|
|
|
|
gnRecallSc.scAnswer,
|
|
|
|
gnRecallSc.scAnswer,
|
|
|
|
gnRecallSc.scState,
|
|
|
|
gnRecallSc.scState,
|
|
|
|
gnRecallSc.zipcode1,
|
|
|
|
gnRecallSc.zipcode1,
|
|
|
@ -160,7 +159,7 @@ public class IResidentAndDisabledRepositoryImpl implements IResidentAndDisabledR
|
|
|
|
"scStateNm")
|
|
|
|
"scStateNm")
|
|
|
|
))
|
|
|
|
))
|
|
|
|
.from(gnRecallSc)
|
|
|
|
.from(gnRecallSc)
|
|
|
|
.where(builder)
|
|
|
|
.where(gnRecallSc.scCode.eq(scCode))
|
|
|
|
.fetchOne();
|
|
|
|
.fetchOne();
|
|
|
|
/*
|
|
|
|
/*
|
|
|
|
SELECT SC_CODE, SC_SEQ, SC_CARNUM, SC_NAME, SC_DONG,
|
|
|
|
SELECT SC_CODE, SC_SEQ, SC_CARNUM, SC_NAME, SC_DONG,
|
|
|
|