liyong
昨天 d9aac64d061758c77af5ecccce740df43167024e
src/main/java/com/ruoyi/sales/controller/SalesLedgerController.java
@@ -65,6 +65,7 @@
                if (salesLedger.getId().intValue() == invoiceLedgerDto.getSalesLedgerId()) {
                    BigDecimal noInvoiceAmountTotal = salesLedger.getContractAmount().subtract(invoiceLedgerDto.getInvoiceTotal());
                    salesLedger.setNoInvoiceAmountTotal(noInvoiceAmountTotal);
                }
            }
        }
@@ -177,6 +178,7 @@
        List<Long> salesLedgerIds = iPage.getRecords().stream().map(SalesLedger::getId).collect(Collectors.toList());
        List<InvoiceLedgerDto> invoiceLedgerDtoList = invoiceLedgerMapper.invoicedTotal(salesLedgerIds);
        if(CollectionUtils.isEmpty(invoiceLedgerDtoList)){
            iPage.setTotal(iPage.getRecords().size());
            return iPage;
        }
        for (SalesLedger salesLedger : iPage.getRecords()) {
@@ -199,10 +201,11 @@
            salesLedger.setInvoiceTotal(invoiceTotal);
        }
        if (ObjectUtils.isNotEmpty(salesLedgerDto.getStatus())) {
            if (salesLedgerDto.getStatus()==1) {
                iPage.getRecords().removeIf(salesLedger -> !Objects.equals(salesLedger.getNoInvoiceAmountTotal(), new BigDecimal("0.00")));
            if (salesLedgerDto.getStatus()) {
                iPage.getRecords().removeIf(salesLedger -> Objects.equals(salesLedger.getNoInvoiceAmountTotal(), new BigDecimal("0.00")));
            }
        }
        iPage.setTotal(iPage.getRecords().size());
        return iPage;
    }
}