maven
8 天以前 5b98825dbf9d72e41660c19dbec6d556eb6a86f5
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;
    }
}