From fe1845ba21d8e9908077ab0bb5a9a8137942a50b Mon Sep 17 00:00:00 2001
From: chenrui <1187576398@qq.com>
Date: 星期二, 13 五月 2025 16:53:15 +0800
Subject: [PATCH] 开票台账前后端联调

---
 src/main/java/com/ruoyi/sales/controller/InvoiceLedgerController.java |   52 +++++++++++++++++++++++++++++++++-------------------
 1 files changed, 33 insertions(+), 19 deletions(-)

diff --git a/src/main/java/com/ruoyi/sales/controller/InvoiceLedgerController.java b/src/main/java/com/ruoyi/sales/controller/InvoiceLedgerController.java
index 6fd4449..0b101b9 100644
--- a/src/main/java/com/ruoyi/sales/controller/InvoiceLedgerController.java
+++ b/src/main/java/com/ruoyi/sales/controller/InvoiceLedgerController.java
@@ -1,6 +1,7 @@
 package com.ruoyi.sales.controller;
 
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.ruoyi.basic.dto.SupplierManageDto;
 import com.ruoyi.framework.web.domain.AjaxResult;
 import com.ruoyi.sales.dto.InvoiceLedgerDto;
 import com.ruoyi.sales.service.InvoiceLedgerService;
@@ -23,9 +24,9 @@
      * @param invoiceLedgerDto
      * @return
      */
-    @PostMapping("/add")
-    public AjaxResult invoiceLedgerAdd(@RequestBody InvoiceLedgerDto invoiceLedgerDto) {
-        invoiceLedgerService.invoiceLedgerAdd(invoiceLedgerDto);
+    @PostMapping("/saveOrUpdate")
+    public AjaxResult invoiceLedgerSaveOrUpdate(@RequestBody InvoiceLedgerDto invoiceLedgerDto) {
+        invoiceLedgerService.invoiceLedgerSaveOrUpdate(invoiceLedgerDto);
         return AjaxResult.success();
     }
 
@@ -35,19 +36,8 @@
      * @return
      */
     @DeleteMapping("/del")
-    public AjaxResult invoiceLedgerDel(@RequestParam List<Integer> ids) {
+    public AjaxResult invoiceLedgerDel(@RequestBody List<Integer> ids) {
         invoiceLedgerService.invoiceLedgerDel(ids);
-        return AjaxResult.success();
-    }
-
-    /**
-     * 寮�绁ㄥ彴璐︿慨鏀�
-     * @param invoiceLedgerDto
-     * @return
-     */
-    @PostMapping("/update")
-    public AjaxResult invoiceLedgerUpdate(@RequestBody InvoiceLedgerDto invoiceLedgerDto) {
-        invoiceLedgerService.invoiceLedgerUpdate(invoiceLedgerDto);
         return AjaxResult.success();
     }
 
@@ -87,14 +77,38 @@
     }
 
     /**
-     * 闄勪欢涓嬭浇
+     * 寮�绁ㄥ彴璐﹀鍑�
      * @param response
      * @param invoiceLedgerDto
      * @return
      */
-    @GetMapping("/downloadFile")
-    public void invoiceLedgerDownloadFile(HttpServletResponse response, InvoiceLedgerDto invoiceLedgerDto) {
-        invoiceLedgerService.invoiceLedgerDownload(response, invoiceLedgerDto);
+    @PostMapping("/export")
+    public void invoiceLedgerExport(HttpServletResponse response, InvoiceLedgerDto invoiceLedgerDto) {
+        invoiceLedgerService.invoiceLedgerExport(response, invoiceLedgerDto);
     }
 
+    /**
+     * 寮�绁ㄥ彴璐﹁鎯�
+     * @param id
+     * @return
+     */
+    @GetMapping("/info")
+    public AjaxResult invoiceLedgerInfo(Integer id) {
+        return AjaxResult.success(invoiceLedgerService.invoiceLedgerDetail(id));
+    }
+
+    /**
+     * 鏂囦欢鎻愪氦
+     * @param invoiceLedgerDto
+     * @return
+     */
+    @PostMapping("/commitFile")
+    public AjaxResult invoiceLedgerCommitFile(@RequestBody InvoiceLedgerDto invoiceLedgerDto) {
+        try {
+            invoiceLedgerService.invoiceLedgerCommitFile(invoiceLedgerDto);
+            return AjaxResult.success();
+        }catch (Exception e) {
+            return AjaxResult.error(e.getMessage());
+        }
+    }
 }

--
Gitblit v1.9.3