maven
3 天以前 366b67926809852c1090f14c5a24fe00109a81b5
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);
                }
            }
        }
@@ -160,8 +161,8 @@
     * 近半年开票,回款金额
     */
    @GetMapping("/getAmountHalfYear")
    public AjaxResult getAmountHalfYear() {
        return AjaxResult.success(salesLedgerService.getAmountHalfYear());
    public AjaxResult getAmountHalfYear(@RequestParam(value = "type",defaultValue = "1") Integer type) {
        return AjaxResult.success(salesLedgerService.getAmountHalfYear(type));
    }
    /**
@@ -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;
    }
}