From 6305d0c86c23e9a583e8ca798645885d167f4dc5 Mon Sep 17 00:00:00 2001
From: liding <756868258@qq.com>
Date: 星期三, 10 六月 2026 17:20:58 +0800
Subject: [PATCH] feat:1.销售台账导出按照查询条件 2.导出订单和产品明细

---
 src/main/java/com/ruoyi/sales/controller/SalesLedgerController.java |   70 ++++++++++++++++++++++++++++++++++-
 1 files changed, 68 insertions(+), 2 deletions(-)

diff --git a/src/main/java/com/ruoyi/sales/controller/SalesLedgerController.java b/src/main/java/com/ruoyi/sales/controller/SalesLedgerController.java
index 5594e78..f74c85c 100644
--- a/src/main/java/com/ruoyi/sales/controller/SalesLedgerController.java
+++ b/src/main/java/com/ruoyi/sales/controller/SalesLedgerController.java
@@ -161,6 +161,16 @@
     }
 
     /**
+     * 瀵煎嚭閿�鍞彴璐﹀垪琛紙鍖呭惈浜у搧鏄庣粏锛屼袱涓猻heet椤碉級
+     */
+    @Log(title = "閿�鍞彴璐�", businessType = BusinessType.EXPORT)
+    @PostMapping("/exportWithProducts")
+    @ApiOperation("瀵煎嚭閿�鍞彴璐﹀強浜у搧鏄庣粏锛堜袱涓猻heet椤碉級")
+    public void exportWithProducts(HttpServletResponse response, SalesLedgerDto salesLedgerDto) {
+        salesLedgerService.exportWithProducts(response, salesLedgerDto);
+    }
+
+    /**
      * 瀵煎嚭寮�绁ㄧ櫥璁板垪琛�
      */
     @Log(title = "瀵煎嚭寮�绁ㄧ櫥璁板垪琛�", businessType = BusinessType.EXPORT)
@@ -190,6 +200,55 @@
     @ApiOperation("閿�鍞鍗曠粦瀹氬伐鑹鸿矾绾�")
     public AjaxResult saleProcessBind(@RequestBody SalesLedgerProcessRoute salesLedgerProcessRoute) {
         salesLedgerService.saleProcessBind(salesLedgerProcessRoute);
+        return AjaxResult.success();
+    }
+
+    /**
+     * 鍙嶅鏍告搷浣�
+     */
+    @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("閿�鍞彴璐D涓嶈兘涓虹┖");
+        }
+        if (printType == null || (!"label".equals(printType) && !"document".equals(printType))) {
+            return AjaxResult.error("鎵撳嵃绫诲瀷蹇呴』涓� label 鎴� document");
+        }
+        salesLedgerService.incrementPrintCount(id, printType);
         return AjaxResult.success();
     }
 
@@ -342,6 +401,13 @@
         return AjaxResult.success();
     }
 
+    @PostMapping("/scanShipApply")
+    @ApiOperation("閿�鍞鍗曟壂鐮�-鍙戣捣鍙戣揣瀹℃壒锛堝~鍐欒溅鐗�/蹇�掋�佸鎵逛汉銆侀檮浠讹紱閫氳繃鍚庤嚜鍔ㄦ墸搴撳瓨骞舵爣璁板凡鍙戣揣锛�")
+    public AjaxResult scanShipApply(@RequestBody SalesScanShipDto dto) {
+        salesLedgerService.scanShipApply(dto);
+        return AjaxResult.success("鍙戣揣瀹℃壒宸插彂璧�");
+    }
+
     @PostMapping("/scanOutboundUnqualified")
     @ApiOperation("閿�鍞鍗曟壂鐮�-涓嶅悎鏍煎嚭搴�")
     public AjaxResult scanOutboundUnqualified(@RequestBody SalesScanInboundDto dto) {
@@ -367,14 +433,14 @@
     @ApiOperation("閿�鍞彂璐у巻鍙叉暟鎹鍏�-宸插彂璐у鍏ユā鏉夸笅杞�")
     public void shippingImportTemplate(HttpServletResponse response) {
         ExcelUtil<SalesShippingImportDto> excelUtil = new ExcelUtil<>(SalesShippingImportDto.class);
-        excelUtil.importTemplateExcel(response, "宸插彂璐у鍏ユā鏉夸笅杞�");
+        excelUtil.importTemplateExcel(response, "宸插嚭搴撳鍏ユā鏉夸笅杞�");
     }
 
     @PostMapping("/salesHistory/notShippingImportTemplate")
     @ApiOperation("閿�鍞彂璐у巻鍙叉暟鎹鍏�-鏈彂璐у鍏ユā鏉夸笅杞�")
     public void notShippingImportTemplate(HttpServletResponse response) {
         ExcelUtil<SalesNotShippingImportDto> excelUtil = new ExcelUtil<>(SalesNotShippingImportDto.class);
-        excelUtil.importTemplateExcel(response, "鏈彂璐у鍏ユā鏉夸笅杞�");
+        excelUtil.importTemplateExcel(response, "鏈嚭搴撳鍏ユā鏉夸笅杞�");
     }
 
 }

--
Gitblit v1.9.3