|
|
|
@ -37,10 +37,10 @@ public class IMinSimsa680RepositoryImpl implements IMinSimsa680RepositoryCustom
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
BooleanBuilder builder = new BooleanBuilder();
|
|
|
|
|
if( !Checks.isEmpty(pMinSimsa680GroupDto.getMsYear())) {
|
|
|
|
|
if (!Checks.isEmpty(pMinSimsa680GroupDto.getMsYear())) {
|
|
|
|
|
builder.and(minSimsa680.msYear.eq(pMinSimsa680GroupDto.getMsYear()));
|
|
|
|
|
}
|
|
|
|
|
if( !Checks.isEmpty(pMinSimsa680GroupDto.getMsChasu())) {
|
|
|
|
|
if (!Checks.isEmpty(pMinSimsa680GroupDto.getMsChasu())) {
|
|
|
|
|
builder.and(minSimsa680.msChasu.like(String.valueOf(pMinSimsa680GroupDto.getMsChasu())));
|
|
|
|
|
}
|
|
|
|
|
QueryResults<MinSimsa680GroupDto> rslt =
|
|
|
|
@ -67,40 +67,31 @@ 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);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public Page<MinSimsa680> findMinSimsa680Details(MinSimsa680GroupDto dto, Pageable pageable) {
|
|
|
|
|
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
|
|
|
|
|