fix : 주정차 심의 상세 반영

dev
Lim Jonguk 3 years ago
parent 76c501fe24
commit 0c1d3bde3d

@ -7,12 +7,15 @@ import com.querydsl.core.types.dsl.CaseBuilder;
import com.querydsl.jpa.impl.JPAQueryFactory;
import com.xit.biz.ctgy.dto.MinSimsa680GroupDto;
import com.xit.biz.ctgy.dto.MinSimsaReviewGroupDto;
import com.xit.biz.ctgy.entity.MinSimsa680;
import com.xit.core.util.Checks;
import lombok.RequiredArgsConstructor;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageImpl;
import org.springframework.data.domain.Pageable;
import java.time.LocalDate;
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;
@ -64,6 +67,42 @@ public class IMinSimsa680RepositoryImpl implements IMinSimsa680RepositoryCustom
return new PageImpl<>(rslt.getResults(), pageable, rslt.getTotal());
}
public Page<MinSimsa680> findMinSimsa680Details(MinSimsa680GroupDto dto, Pageable pageable){
//LocalDate now = LocalDate.now();
LocalDate now = LocalDate.of(2021, 12, 11);
LocalDate now2 = LocalDate.of(2021, 12, 12);
queryFactory
.select(minSimsa680.msSeq,
minSimsa680.msCarnum,
minSimsa680.msMaincode)
.from(minSimsaUser680)
.join(minSimsa680)
.on(minSimsa680.msMaincode.eq(minSimsaUser680.msuMaincode))
.join(minUserinfo)
.on(minSimsaUser680.msuUserid.eq(minUserinfo.userid))
.where(minSimsaUser680.msuTeam.eq(""),
minSimsa680.msChasu.eq(1L),
minSimsa680.msSdate.eq(java.sql.Date.valueOf(now)),
minSimsa680.msEdate.eq(java.sql.Date.valueOf(now2)))
.groupBy(minSimsa680.msCarnum,
minSimsa680.msSeq,
minSimsa680.msMaincode)
.orderBy(minSimsa680.msSeq.asc())
.offset(0L)
.limit(10L)
//, minSimsa680.msSdate.eq(java.sql.Date.valueOf(now)))
.fetchResults();
// jpaQueryFactory.selectFrom(minSimsa680)
// .leftJoin(minSimsa680.msMaincode, minSimsaUser680).fetchJoin()
// .groupBy(minSimsa680.msEdate, minSimsaUser680.msuTeam, qMinUserinfo.name)
// .orderBy(minSimsa680.msChasu.desc())
// //.where(minSimsa680.name.eq(name))
// .fetch();
}
@Override
public Page<MinSimsaReviewGroupDto> findMinSimsa680s2(Pageable pageable) {
/*

Loading…
Cancel
Save