|
|
|
@ -2,8 +2,10 @@ package com.xit.biz.ctgy.repository;
|
|
|
|
|
|
|
|
|
|
import com.querydsl.core.BooleanBuilder;
|
|
|
|
|
import com.querydsl.core.QueryResults;
|
|
|
|
|
import com.querydsl.core.types.ExpressionUtils;
|
|
|
|
|
import com.querydsl.core.types.Projections;
|
|
|
|
|
import com.querydsl.core.types.dsl.CaseBuilder;
|
|
|
|
|
import com.querydsl.jpa.JPAExpressions;
|
|
|
|
|
import com.querydsl.jpa.impl.JPAQueryFactory;
|
|
|
|
|
import com.xit.biz.ctgy.dto.MinSimsa680GroupDto;
|
|
|
|
|
import com.xit.biz.ctgy.dto.MinSimsaReviewGroupDto;
|
|
|
|
@ -17,6 +19,7 @@ import org.springframework.data.domain.Pageable;
|
|
|
|
|
|
|
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
|
|
import static com.xit.biz.cmm.entity.QCmmCodeS.cmmCodeS;
|
|
|
|
|
import static com.xit.biz.ctgy.entity.QMinSimsa680.minSimsa680;
|
|
|
|
|
import static com.xit.biz.ctgy.entity.QMinSimsaUser680.minSimsaUser680;
|
|
|
|
|
import static com.xit.biz.ctgy.entity.QMinUserinfo.minUserinfo;
|
|
|
|
@ -29,7 +32,7 @@ public class IParkingRepositoryImpl implements IParkingRepositoryCustom {
|
|
|
|
|
private final JPAQueryFactory queryFactory;
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public Page<MinSimsa680GroupDto> findSimsas(MinSimsa680GroupDto pMinSimsa680GroupDto, Pageable pageable) {
|
|
|
|
|
public Page<MinSimsa680GroupDto> findSimsas(final MinSimsa680GroupDto pMinSimsa680GroupDto, Pageable pageable) {
|
|
|
|
|
/*
|
|
|
|
|
SELECT MS_CHASU, MS_SDATE, MS_STARTSI, MS_EDATE, MS_CDATE, MS_CLOSESI, COUNT(*) CNT
|
|
|
|
|
FROM MIN_SIMSA680
|
|
|
|
@ -71,7 +74,8 @@ public class IParkingRepositoryImpl implements IParkingRepositoryCustom {
|
|
|
|
|
return new PageImpl<>(rslt.getResults(), pageable, rslt.getTotal());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public List<MinSimsa680> findSimsaDetails(MinSimsa680GroupDto dto) {
|
|
|
|
|
@Override
|
|
|
|
|
public List<MinSimsa680> findSimsaDetails(final MinSimsa680GroupDto dto) {
|
|
|
|
|
|
|
|
|
|
BooleanBuilder builder = new BooleanBuilder();
|
|
|
|
|
builder.and(minSimsa680.msSdate.eq(dto.getMsSdate()));
|
|
|
|
@ -102,8 +106,8 @@ public class IParkingRepositoryImpl implements IParkingRepositoryCustom {
|
|
|
|
|
return rslt;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//@Override
|
|
|
|
|
public List<MinSimsaTargetDto> findSimsaTargets() {
|
|
|
|
|
@Override
|
|
|
|
|
public List<MinSimsaTargetDto> findSimsaTargets(final MinSimsaTargetDto dto) {
|
|
|
|
|
/*
|
|
|
|
|
SELECT TM.MM_CODE,
|
|
|
|
|
TR.RC_CODE,
|
|
|
|
@ -171,9 +175,9 @@ public class IParkingRepositoryImpl implements IParkingRepositoryCustom {
|
|
|
|
|
//builder.and(tf680Main.mmLstate.ne("75"));
|
|
|
|
|
builder.and(tf680Recall.rcGb.eq("1"));
|
|
|
|
|
builder.and(tf680Recall.rcState.eq("0"));
|
|
|
|
|
builder.and(tf680Recall.rcIrTransfer.eq("1"));
|
|
|
|
|
//builder.and(tf680Recall.rcSeq.gt("1"));
|
|
|
|
|
//builder.and(tf680Recall.rcSeq.lt("1"));
|
|
|
|
|
builder.and(tf680Recall.rcIrTransfer.eq(dto.getRcIrTransfer()));
|
|
|
|
|
builder.and(tf680Recall.rcSeq.gt(dto.getRcSeq1()));
|
|
|
|
|
builder.and(tf680Recall.rcSeq.lt(dto.getRcSeq2()));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
List<MinSimsaTargetDto> rslt =
|
|
|
|
@ -186,7 +190,22 @@ public class IParkingRepositoryImpl implements IParkingRepositoryCustom {
|
|
|
|
|
tf680Main.mmNcarno,
|
|
|
|
|
tf680Recall.rcName,
|
|
|
|
|
tf680Recall.rcContDoc,
|
|
|
|
|
tf680Recall.rcIngb
|
|
|
|
|
tf680Recall.rcIngb,
|
|
|
|
|
tf680Recall.rcDate,
|
|
|
|
|
ExpressionUtils.as(
|
|
|
|
|
JPAExpressions.select(cmmCodeS.codeNm)
|
|
|
|
|
.from(cmmCodeS)
|
|
|
|
|
.where(tf680Recall.rcContDoc.eq(cmmCodeS.codeCd),cmmCodeS.codeGrpId.eq("TRAFFIC"),
|
|
|
|
|
cmmCodeS.codeLcd.eq("GANGNAM_SIMSA"),
|
|
|
|
|
cmmCodeS.codeMcd.eq("RC_CONT_DOC")),
|
|
|
|
|
"rcContDocStr"),
|
|
|
|
|
ExpressionUtils.as(
|
|
|
|
|
JPAExpressions.select(cmmCodeS.codeNm)
|
|
|
|
|
.from(cmmCodeS)
|
|
|
|
|
.where(tf680Recall.rcIngb.eq(cmmCodeS.codeCd),cmmCodeS.codeGrpId.eq("TRAFFIC"),
|
|
|
|
|
cmmCodeS.codeLcd.eq("GANGNAM_SIMSA"),
|
|
|
|
|
cmmCodeS.codeMcd.eq("RC_INGB")),
|
|
|
|
|
"rcIngbStr")
|
|
|
|
|
))
|
|
|
|
|
.from(tf680Main)
|
|
|
|
|
.join(tf680Recall)
|
|
|
|
@ -198,7 +217,6 @@ public class IParkingRepositoryImpl implements IParkingRepositoryCustom {
|
|
|
|
|
return rslt;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public Page<MinSimsaReviewGroupDto> findMinSimsa680s2(Pageable pageable) {
|
|
|
|
|
/*
|
|
|
|
|