From 53bdb26a0ae994418e92d93aab23d6f5e7225f37 Mon Sep 17 00:00:00 2001
From: liding <756868258@qq.com>
Date: 星期一, 19 五月 2025 16:20:56 +0800
Subject: [PATCH] 产品
---
src/main/java/com/ruoyi/sales/controller/InvoiceLedgerController.java | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++----
1 files changed, 54 insertions(+), 4 deletions(-)
diff --git a/src/main/java/com/ruoyi/sales/controller/InvoiceLedgerController.java b/src/main/java/com/ruoyi/sales/controller/InvoiceLedgerController.java
index a42414b..ae7c5e7 100644
--- a/src/main/java/com/ruoyi/sales/controller/InvoiceLedgerController.java
+++ b/src/main/java/com/ruoyi/sales/controller/InvoiceLedgerController.java
@@ -9,6 +9,7 @@
import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletResponse;
+import java.math.BigDecimal;
import java.util.List;
@RestController
@@ -76,14 +77,14 @@
}
/**
- * 闄勪欢涓嬭浇
+ * 寮�绁ㄥ彴璐﹀鍑�
* @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);
}
/**
@@ -96,4 +97,53 @@
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());
+ }
+ }
+
+ /**
+ * 寮�绁ㄥ彴璐︽煡璇�
+ * @param invoiceLedgerDto
+ * @return
+ */
+ @GetMapping("/list")
+ public AjaxResult invoiceLedgerList(InvoiceLedgerDto invoiceLedgerDto) {
+ return AjaxResult.success(invoiceLedgerService.invoiceLedgerList(invoiceLedgerDto));
+ }
+
+ /**
+ * 瀹㈡埛閿�鍞褰�
+ * @param page
+ * @param invoiceLedgerDto
+ * @return
+ */
+ @GetMapping("/salesAccount")
+ public AjaxResult invoiceLedgerSalesAccount(Page page, InvoiceLedgerDto invoiceLedgerDto) {
+ return AjaxResult.success(invoiceLedgerService.invoiceLedgerSalesAccount(page,invoiceLedgerDto));
+ }
+
+ /**
+ * 鏈湀寮�绁ㄩ噾棰�
+ */
+ @GetMapping("/getInvoiceAmount")
+ public AjaxResult getInvoiceAmount() {
+ try {
+ BigDecimal amount = invoiceLedgerService.getInvoiceAmount();
+ return AjaxResult.success(amount != null ? amount : BigDecimal.ZERO);
+ } catch (Exception e) {
+ return AjaxResult.error("鑾峰彇寮�绁ㄩ噾棰濆け璐ワ細" + e.getMessage());
+ }
+ }
+
}
--
Gitblit v1.9.3