|
|
@ -15,6 +15,7 @@ import org.springframework.data.domain.PageImpl;
|
|
|
|
import org.springframework.data.domain.Pageable;
|
|
|
|
import org.springframework.data.domain.Pageable;
|
|
|
|
|
|
|
|
|
|
|
|
import java.time.LocalDate;
|
|
|
|
import java.time.LocalDate;
|
|
|
|
|
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
|
|
|
|
import static com.xit.biz.ctgy.entity.QMinSimsa680.minSimsa680;
|
|
|
|
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.QMinSimsaUser680.minSimsaUser680;
|
|
|
@ -67,8 +68,18 @@ public class IMinSimsa680RepositoryImpl implements IMinSimsa680RepositoryCustom
|
|
|
|
return new PageImpl<>(rslt.getResults(), pageable, rslt.getTotal());
|
|
|
|
return new PageImpl<>(rslt.getResults(), pageable, rslt.getTotal());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public Page<MinSimsa680> findMinSimsa680Details(MinSimsa680GroupDto dto, Pageable pageable) {
|
|
|
|
public List<MinSimsa680> findMinSimsa680Details(MinSimsa680GroupDto dto) {
|
|
|
|
QueryResults<MinSimsa680> rslt =
|
|
|
|
|
|
|
|
|
|
|
|
BooleanBuilder builder = new BooleanBuilder();
|
|
|
|
|
|
|
|
builder.and(minSimsa680.msSdate.eq(dto.getMsSdate()));
|
|
|
|
|
|
|
|
builder.and(minSimsa680.msEdate.eq(dto.getMsEdate()));
|
|
|
|
|
|
|
|
builder.and(minSimsaUser680.msuTeam.eq(dto.getMsuTeam()));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!Checks.isEmpty(dto.getMsChasu())) {
|
|
|
|
|
|
|
|
builder.and(minSimsa680.msChasu.eq(dto.getMsChasu()));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
List<MinSimsa680> rslt =
|
|
|
|
queryFactory
|
|
|
|
queryFactory
|
|
|
|
.select(Projections.fields(MinSimsa680.class,
|
|
|
|
.select(Projections.fields(MinSimsa680.class,
|
|
|
|
minSimsa680.msSeq,
|
|
|
|
minSimsa680.msSeq,
|
|
|
@ -79,19 +90,14 @@ public class IMinSimsa680RepositoryImpl implements IMinSimsa680RepositoryCustom
|
|
|
|
.on(minSimsa680.msMaincode.eq(minSimsaUser680.msuMaincode))
|
|
|
|
.on(minSimsa680.msMaincode.eq(minSimsaUser680.msuMaincode))
|
|
|
|
.join(minUserinfo)
|
|
|
|
.join(minUserinfo)
|
|
|
|
.on(minSimsaUser680.msuUserid.eq(minUserinfo.userid))
|
|
|
|
.on(minSimsaUser680.msuUserid.eq(minUserinfo.userid))
|
|
|
|
.where(minSimsaUser680.msuTeam.eq(""),
|
|
|
|
.where(builder)
|
|
|
|
minSimsa680.msChasu.eq(dto.getMsChasu()),
|
|
|
|
|
|
|
|
minSimsa680.msSdate.eq(dto.getMsSdate()),
|
|
|
|
|
|
|
|
minSimsa680.msEdate.eq(dto.getMsEdate()))
|
|
|
|
|
|
|
|
.groupBy(minSimsa680.msCarnum,
|
|
|
|
.groupBy(minSimsa680.msCarnum,
|
|
|
|
minSimsa680.msSeq,
|
|
|
|
minSimsa680.msSeq,
|
|
|
|
minSimsa680.msMaincode)
|
|
|
|
minSimsa680.msMaincode)
|
|
|
|
.orderBy(minSimsa680.msSeq.asc())
|
|
|
|
.orderBy(minSimsa680.msSeq.asc())
|
|
|
|
.offset(pageable.getOffset())
|
|
|
|
.fetch();
|
|
|
|
.limit(pageable.getPageSize())
|
|
|
|
|
|
|
|
.fetchResults();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return new PageImpl<>(rslt.getResults(), pageable, rslt.getTotal());
|
|
|
|
return rslt;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|