青城
5 天以前 6437bdc301a3738b3e6f3be9913a41a45d9f96d9
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()) {
@@ -203,6 +205,7 @@
                iPage.getRecords().removeIf(salesLedger -> Objects.equals(salesLedger.getNoInvoiceAmountTotal(), new BigDecimal("0.00")));
            }
        }
        iPage.setTotal(iPage.getRecords().size());
        return iPage;
    }
}