|
|
@@ -359,10 +359,16 @@ public class PurchaseProofingServiceImpl implements PurchaseProofingService {
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public Page<PurchaseProofingApproval> findApprovalsByPageInfo(final PageInfo pageInfo, final String keyword) {
|
|
|
+ public Page<PurchaseProofingApproval> findApprovalsByPageInfo(final PageInfo pageInfo, final String keyword, final Long fromDate, final Long endDate) {
|
|
|
if (StringUtils.hasText(keyword))
|
|
|
pageInfo.expression(PredicateUtils.in("id", purchaseProofingApprovalIndexDao.findByKeyword(
|
|
|
SystemSession.getUser().getEnterprise().getUu(), keyword), false));
|
|
|
+ if (fromDate != null)
|
|
|
+ pageInfo.expression(PredicateUtils.in("id", purchaseProofingApprovalDao.findByFromDate(SystemSession
|
|
|
+ .getUser().getEnterprise().getUu(), new Date(fromDate)), false));
|
|
|
+ if(endDate != null)
|
|
|
+ pageInfo.expression(PredicateUtils.in("id", purchaseProofingApprovalDao.findByEndDate(SystemSession
|
|
|
+ .getUser().getEnterprise().getUu(), new Date(endDate)), false));
|
|
|
return purchaseProofingApprovalDao.findAll(new Specification<PurchaseProofingApproval>() {
|
|
|
public Predicate toPredicate(Root<PurchaseProofingApproval> root, CriteriaQuery<?> query,
|
|
|
CriteriaBuilder builder) {
|