|
|
|
@ -68,39 +68,30 @@ public class IMinSimsa680RepositoryImpl implements IMinSimsa680RepositoryCustom
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
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);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
QueryResults<MinSimsa680> rslt =
|
|
|
|
|
queryFactory
|
|
|
|
|
.select(minSimsa680.msSeq,
|
|
|
|
|
.select(Projections.fields(MinSimsa680.class,
|
|
|
|
|
minSimsa680.msSeq,
|
|
|
|
|
minSimsa680.msCarnum,
|
|
|
|
|
minSimsa680.msMaincode)
|
|
|
|
|
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)))
|
|
|
|
|
minSimsa680.msChasu.eq(dto.getMsChasu()),
|
|
|
|
|
minSimsa680.msSdate.eq(dto.getMsSdate()),
|
|
|
|
|
minSimsa680.msEdate.eq(dto.getMsEdate()))
|
|
|
|
|
.groupBy(minSimsa680.msCarnum,
|
|
|
|
|
minSimsa680.msSeq,
|
|
|
|
|
minSimsa680.msMaincode)
|
|
|
|
|
.orderBy(minSimsa680.msSeq.asc())
|
|
|
|
|
.offset(0L)
|
|
|
|
|
.limit(10L)
|
|
|
|
|
//, minSimsa680.msSdate.eq(java.sql.Date.valueOf(now)))
|
|
|
|
|
.offset(pageable.getOffset())
|
|
|
|
|
.limit(pageable.getPageSize())
|
|
|
|
|
.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();
|
|
|
|
|
return null;
|
|
|
|
|
|
|
|
|
|
return new PageImpl<>(rslt.getResults(), pageable, rslt.getTotal());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|