From 1223edea2f56e5c3c0e36ea844c12ef55908e3c2 Mon Sep 17 00:00:00 2001
From: chenrui <1187576398@qq.com>
Date: 星期五, 09 五月 2025 17:33:34 +0800
Subject: [PATCH] 回款登记功能开发

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

diff --git a/src/main/java/com/ruoyi/sales/controller/InvoiceLedgerController.java b/src/main/java/com/ruoyi/sales/controller/InvoiceLedgerController.java
new file mode 100644
index 0000000..6fd4449
--- /dev/null
+++ b/src/main/java/com/ruoyi/sales/controller/InvoiceLedgerController.java
@@ -0,0 +1,100 @@
+package com.ruoyi.sales.controller;
+
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.ruoyi.framework.web.domain.AjaxResult;
+import com.ruoyi.sales.dto.InvoiceLedgerDto;
+import com.ruoyi.sales.service.InvoiceLedgerService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.multipart.MultipartFile;
+
+import javax.servlet.http.HttpServletResponse;
+import java.util.List;
+
+@RestController
+@RequestMapping("/invoiceLedger")
+public class InvoiceLedgerController {
+
+    @Autowired
+    private InvoiceLedgerService invoiceLedgerService;
+
+    /**
+     * 寮�绁ㄥ彴璐︽柊澧�
+     * @param invoiceLedgerDto
+     * @return
+     */
+    @PostMapping("/add")
+    public AjaxResult invoiceLedgerAdd(@RequestBody InvoiceLedgerDto invoiceLedgerDto) {
+        invoiceLedgerService.invoiceLedgerAdd(invoiceLedgerDto);
+        return AjaxResult.success();
+    }
+
+    /**
+     * 寮�绁ㄥ彴璐﹀垹闄�
+     * @param ids
+     * @return
+     */
+    @DeleteMapping("/del")
+    public AjaxResult invoiceLedgerDel(@RequestParam 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();
+    }
+
+    /**
+     * 寮�绁ㄥ彴璐﹀垎椤垫煡璇�
+     * @param page
+     * @param invoiceLedgerDto
+     * @return
+     */
+    @GetMapping("/page")
+    public AjaxResult invoiceLedgerPage(Page page, InvoiceLedgerDto invoiceLedgerDto) {
+        return AjaxResult.success(invoiceLedgerService.invoiceLedgerPage(page, invoiceLedgerDto));
+    }
+
+    /**
+     * 寮�绁ㄥ彴璐︽枃浠舵煡璇�
+     * @param invoiceLedgerId
+     * @return
+     */
+    @GetMapping("/fileList")
+    public AjaxResult invoiceLedgerFileList(Integer invoiceLedgerId) {
+        return AjaxResult.success(invoiceLedgerService.invoiceLedgerFileList(invoiceLedgerId));
+    }
+
+    /**
+     * 寮�绁ㄥ彴璐︽枃浠朵笂浼�
+     * @param file
+     * @return
+     */
+    @PostMapping("/uploadFile")
+    public AjaxResult invoiceLedgerUploadFile(MultipartFile file) {
+        try {
+            return AjaxResult.success(invoiceLedgerService.invoiceLedgerUploadFile(file));
+        }catch (Exception e) {
+            return AjaxResult.error(e.getMessage());
+        }
+    }
+
+    /**
+     * 闄勪欢涓嬭浇
+     * @param response
+     * @param invoiceLedgerDto
+     * @return
+     */
+    @GetMapping("/downloadFile")
+    public void invoiceLedgerDownloadFile(HttpServletResponse response, InvoiceLedgerDto invoiceLedgerDto) {
+        invoiceLedgerService.invoiceLedgerDownload(response, invoiceLedgerDto);
+    }
+
+}

--
Gitblit v1.9.3