|
|
@@ -4,7 +4,14 @@ import java.util.HashSet;
|
|
|
import java.util.List;
|
|
|
import java.util.Set;
|
|
|
|
|
|
+import javax.persistence.criteria.CriteriaBuilder;
|
|
|
+import javax.persistence.criteria.CriteriaQuery;
|
|
|
+import javax.persistence.criteria.Predicate;
|
|
|
+import javax.persistence.criteria.Root;
|
|
|
+
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.data.domain.Page;
|
|
|
+import org.springframework.data.jpa.domain.Specification;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
import com.uas.platform.b2b.dao.PurchaseApBillDao;
|
|
|
@@ -16,6 +23,7 @@ import com.uas.platform.b2b.model.Vendor;
|
|
|
import com.uas.platform.b2b.service.PurchaseApBillService;
|
|
|
import com.uas.platform.b2b.support.SystemSession;
|
|
|
import com.uas.platform.b2b.support.XingePusher;
|
|
|
+import com.uas.platform.core.model.PageInfo;
|
|
|
import com.uas.platform.core.model.Status;
|
|
|
|
|
|
@Service
|
|
|
@@ -52,8 +60,6 @@ public class PurchaseApBillServiceImpl implements PurchaseApBillService{
|
|
|
apBillIds.add(apBillItem.getaPBill().getId());
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -74,5 +80,20 @@ public class PurchaseApBillServiceImpl implements PurchaseApBillService{
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public Page<PurchaseApBill> findAllByPageInfo(final PageInfo pageInfo) {
|
|
|
+ return purchaseApBillDao.findAll(new Specification<PurchaseApBill>() {
|
|
|
+
|
|
|
+ public Predicate toPredicate(Root<PurchaseApBill> root, CriteriaQuery<?> query, CriteriaBuilder builder) {
|
|
|
+ query.where(pageInfo.getPredicates(root, query, builder));
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+ }, pageInfo);
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public PurchaseApBill findById(Long id) {
|
|
|
+ return purchaseApBillDao.findOne(id);
|
|
|
+ }
|
|
|
|
|
|
}
|