src/main/java/com/ruoyi/sales/controller/SalesLedgerController.java
@@ -194,6 +194,55 @@
    }
    /**
     * 反审核操作
     */
    @Log(title = "销售台账反审核", businessType = BusinessType.UPDATE)
    @PostMapping("/counterReview")
    @ApiOperation("反审核操作:作废或重新生成")
    public AjaxResult counterReview(@RequestBody CounterReviewDto dto) {
        List<Long> newLedgerIds = salesLedgerService.counterReview(dto);
        AjaxResult result = AjaxResult.success("反审核成功");
        if (newLedgerIds != null && !newLedgerIds.isEmpty()) {
            result.put("newLedgerIds", newLedgerIds);
        }
        return result;
    }
    /**
     * 标记订单完成
     */
    @Log(title = "销售台账标记完成", businessType = BusinessType.UPDATE)
    @PostMapping("/markOrderCompleted")
    @ApiOperation("标记订单完成(不可撤销)")
    public AjaxResult markOrderCompleted(@RequestBody Map<String, Object> params) {
        @SuppressWarnings("unchecked")
        List<Long> ids = (List<Long>) params.get("ids");
        if (ids == null || ids.isEmpty()) {
            return AjaxResult.error("请选择要标记完成的订单");
        }
        salesLedgerService.markOrderCompleted(ids);
        return AjaxResult.success("标记完成成功");
    }
    /**
     * 递增打印次数
     */
    @PostMapping("/incrementPrintCount")
    @ApiOperation("递增打印次数")
    public AjaxResult incrementPrintCount(@RequestBody Map<String, Object> params) {
        Long id = params.get("id") != null ? Long.valueOf(params.get("id").toString()) : null;
        String printType = (String) params.get("printType");
        if (id == null) {
            return AjaxResult.error("销售台账ID不能为空");
        }
        if (printType == null || (!"label".equals(printType) && !"document".equals(printType))) {
            return AjaxResult.error("打印类型必须为 label 或 document");
        }
        salesLedgerService.incrementPrintCount(id, printType);
        return AjaxResult.success();
    }
    /**
     * 删除销售台账
     */
    @Log(title = "销售台账", businessType = BusinessType.DELETE)