yuan
14 小时以前 ca23602089d4a5410fa5fe125b317c260536c192
src/main/java/com/ruoyi/sales/controller/SalesLedgerController.java
@@ -269,9 +269,6 @@
        if (ObjectUtils.isNotEmpty(salesLedgerDto.getStatus())) {
            if (salesLedgerDto.getStatus()) {
                // 清除所有“未开票金额”为 0 的记录
                iPage.getRecords().removeIf(salesLedger ->
                        Objects.equals(salesLedger.getNoInvoiceAmountTotal(), new BigDecimal("0.00")));
                iPage.setTotal(iPage.getRecords().size());
            }
        }
@@ -284,4 +281,14 @@
    public R getSalesLedgerWithProductsLoss(Long salesLedgerId) {
        return R.ok(salesLedgerService.getSalesLedgerWithProductsLoss(salesLedgerId));
    }
    @Operation(summary = "获取销售单打印数据")
    @GetMapping("/printData/{id}")
    public AjaxResult printData(@PathVariable Long id) {
        Map<String, Object> data = salesLedgerService.getPrintData(id);
        if (data == null) {
            return AjaxResult.error("销售单不存在");
        }
        return AjaxResult.success(data);
    }
}