|
|
@@ -45,6 +45,7 @@ import com.uas.platform.b2c.trade.util.TradeLogUtil;
|
|
|
import com.uas.platform.core.exception.IllegalOperatorException;
|
|
|
import com.uas.platform.core.model.EncodingRulesConstant;
|
|
|
import com.uas.platform.core.model.PageInfo;
|
|
|
+import com.uas.platform.core.model.PageParams;
|
|
|
import com.uas.platform.core.model.Status;
|
|
|
import com.uas.platform.core.persistence.criteria.PredicateUtils;
|
|
|
import com.uas.platform.core.persistence.criteria.SimpleExpression;
|
|
|
@@ -727,6 +728,7 @@ public class InvoiceServiceImpl implements InvoiceService {
|
|
|
}
|
|
|
pageInfo.filter("piclass", piclass);
|
|
|
Page<Invoice> invoicePage = invoiceDao.findAll(new Specification<Invoice>() {
|
|
|
+ @Override
|
|
|
public Predicate toPredicate(Root<Invoice> root, CriteriaQuery<?> query, CriteriaBuilder builder) {
|
|
|
query.where(pageInfo.getPredicates(root, query, builder));
|
|
|
return null;
|
|
|
@@ -1199,4 +1201,24 @@ public class InvoiceServiceImpl implements InvoiceService {
|
|
|
}
|
|
|
return ResultMap.success(inFpu);
|
|
|
}
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public Page<Invoice> getEnterpriseInboundInvoice(PageParams pageParams) {
|
|
|
+ final PageInfo info = new PageInfo(pageParams);
|
|
|
+ User user = SystemSession.getUser();
|
|
|
+ Enterprise enterprise = user.getEnterprise();
|
|
|
+ if (enterprise == null) {
|
|
|
+ info.filter("dissociative", Type.PERSONAL.value());
|
|
|
+ info.filter("buyeruu", user.getUserUU());
|
|
|
+ } else {
|
|
|
+ info.filter("buyerenuu", user.getEnterprise().getUu());
|
|
|
+ }
|
|
|
+ return invoiceDao.findAll(new Specification<Invoice>() {
|
|
|
+ @Override
|
|
|
+ public Predicate toPredicate(Root<Invoice> root, CriteriaQuery<?> query, CriteriaBuilder cb) {
|
|
|
+ query.where(info.getPredicates(root, query, cb));
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+ }, info);
|
|
|
+ }
|
|
|
}
|