maven
10 天以前 75d9938a60612339250eadc8d5ef1b177fbc10ec
src/main/java/com/ruoyi/sales/controller/SalesLedgerController.java
@@ -261,10 +261,15 @@
        }
        if (ObjectUtils.isNotEmpty(salesLedgerDto.getStatus())) {
            if (salesLedgerDto.getStatus()) {
                iPage.getRecords().removeIf(salesLedger -> Objects.equals(salesLedger.getNoInvoiceAmountTotal(), new BigDecimal("0.00")));
                // 获取删除数量
                long count = iPage.getRecords()
                        .stream()
                        .filter(salesLedger -> salesLedger.getNoInvoiceAmountTotal() != null && salesLedger.getNoInvoiceAmountTotal().compareTo(BigDecimal.ZERO) == 0)
                        .count();
                iPage.setTotal(iPage.getTotal() - count);
                iPage.getRecords().removeIf(salesLedger -> salesLedger.getNoInvoiceAmountTotal() != null && salesLedger.getNoInvoiceAmountTotal().compareTo(BigDecimal.ZERO) == 0);
            }
        }
        iPage.setTotal(iPage.getRecords().size());
        return iPage;
    }
}