yuan
9 小时以前 47806d9e390ee00e1d29ad1da8c1aa908882a758
src/main/java/com/ruoyi/sales/controller/SalesLedgerController.java
@@ -262,7 +262,7 @@
            //  如果已经有过开票或回款操作,则不允许编辑
            boolean hasReceiptOperation = receiptPaymentAmountTotal.compareTo(BigDecimal.ZERO) > 0;
            salesLedgerVo.setIsEdit(!hasReceiptOperation);
            salesLedgerVo.setIsEdit(hasReceiptOperation);
            salesLedgerVo.setStorageBlobVOs(fileUtil.getStorageBlobVOsByApplicationAndRecordTypeAndRecordId(ApplicationTypeEnum.FILE, RecordTypeEnum.SALES_LEDGER, ledgerId));
        }
@@ -281,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);
    }
}