|
|
@@ -2260,18 +2260,16 @@ public class OrderServiceImpl implements OrderService {
|
|
|
|
|
|
@Override
|
|
|
public Page<Order> getBillByStatus(final PageInfo page, String keyword, int status) {
|
|
|
- SimpleExpression simpleExpression1 = new SimpleExpression("status", Status.CANCELLED.value(), Operator.NE);
|
|
|
- SimpleExpression simpleExpression2 = new SimpleExpression("status", Status.UNAVAILABLE_NOPAID.value(),
|
|
|
- Operator.NE);
|
|
|
- page.expression(simpleExpression1);
|
|
|
- page.expression(simpleExpression2);
|
|
|
- if (status != 799) {
|
|
|
- page.filter("vatBillStatus", status);
|
|
|
- } else { // 如果等于799,代表是要找处于待收发票状态的明细的订单
|
|
|
- page.filter("tobeReceiveinvoice", Status.TOCONFIRM_BILL.value());
|
|
|
- }
|
|
|
- if ((keyword != null) && (!keyword.equals(""))) {
|
|
|
- page.filter("orderid", keyword);
|
|
|
+ page.expression(PredicateUtils.eq("status", status, false));
|
|
|
+ page.expression(PredicateUtils.isNull("invoiceid"));
|
|
|
+ page.expression(PredicateUtils.eq("invoicetype", Type.Bill_No.value(), false));
|
|
|
+
|
|
|
+ if (StringUtils.hasText(keyword)) {
|
|
|
+ SimpleExpression sellername = new SimpleExpression("sellername", keyword , Operator.LIKE);
|
|
|
+ SimpleExpression orderid = new SimpleExpression("orderid", keyword, Operator.LIKE);
|
|
|
+ SimpleExpression[] simpleExpressions = new SimpleExpression[]{sellername, orderid};
|
|
|
+ LogicalExpression logicalExpression = PredicateUtils.or(simpleExpressions);
|
|
|
+ page.expression(logicalExpression);
|
|
|
}
|
|
|
|
|
|
return orderDao.findAll(new Specification<Order>() {
|