From 11502c7f9f26edda0733c43a17b5b773ee8447e4 Mon Sep 17 00:00:00 2001
From: zss <zss@example.com>
Date: 星期三, 20 五月 2026 16:47:47 +0800
Subject: [PATCH] refactor(account): 财务模块更新

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

diff --git a/src/main/java/com/ruoyi/sales/controller/InvoiceLedgerController.java b/src/main/java/com/ruoyi/sales/controller/InvoiceLedgerController.java
index 3b4f493..0559ff8 100644
--- a/src/main/java/com/ruoyi/sales/controller/InvoiceLedgerController.java
+++ b/src/main/java/com/ruoyi/sales/controller/InvoiceLedgerController.java
@@ -3,8 +3,7 @@
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.ruoyi.framework.aspectj.lang.annotation.Log;
 import com.ruoyi.framework.aspectj.lang.enums.BusinessType;
-import com.ruoyi.framework.web.controller.BaseController;
-import com.ruoyi.framework.web.domain.R;
+import com.ruoyi.framework.web.domain.AjaxResult;
 import com.ruoyi.sales.dto.InvoiceLedgerDto;
 import com.ruoyi.sales.dto.InvoiceRegistrationProductDto;
 import com.ruoyi.sales.mapper.InvoiceLedgerFileMapper;
@@ -21,7 +20,7 @@
 @RestController
 @RequestMapping("/invoiceLedger")
 @AllArgsConstructor
-public class InvoiceLedgerController extends BaseController {
+public class InvoiceLedgerController {
 
     private InvoiceLedgerService invoiceLedgerService;
     private InvoiceLedgerFileMapper invoiceLedgerFileMapper;
@@ -32,9 +31,9 @@
      * @return
      */
     @PostMapping("/saveOrUpdate")
-    public R<?> invoiceLedgerSaveOrUpdate(@RequestBody InvoiceRegistrationProductDto productDto) {
+    public AjaxResult invoiceLedgerSaveOrUpdate(@RequestBody InvoiceRegistrationProductDto productDto) {
         invoiceLedgerService.invoiceLedgerSaveOrUpdate(productDto);
-        return R.ok();
+        return AjaxResult.success();
     }
 
     /**
@@ -43,9 +42,9 @@
      * @return
      */
     @DeleteMapping("/del")
-    public R<?> invoiceLedgerDel(@RequestBody List<Integer> ids) {
+    public AjaxResult invoiceLedgerDel(@RequestBody List<Integer> ids) {
         invoiceLedgerService.invoiceLedgerDel(ids);
-        return R.ok();
+        return AjaxResult.success();
     }
 
     /**
@@ -55,8 +54,8 @@
      * @return
      */
     @GetMapping("/page")
-    public R<?> invoiceLedgerPage(Page page, InvoiceLedgerDto invoiceLedgerDto) {
-        return R.ok(invoiceLedgerService.invoiceLedgerPage(page, invoiceLedgerDto));
+    public AjaxResult invoiceLedgerPage(Page page, InvoiceLedgerDto invoiceLedgerDto) {
+        return AjaxResult.success(invoiceLedgerService.invoiceLedgerPage(page, invoiceLedgerDto));
     }
 
     /**
@@ -65,8 +64,8 @@
      * @return
      */
     @GetMapping("/fileList")
-    public R<?> invoiceLedgerFileList(Integer invoiceLedgerId) {
-        return R.ok(invoiceLedgerService.invoiceLedgerFileList(invoiceLedgerId));
+    public AjaxResult invoiceLedgerFileList(Integer invoiceLedgerId) {
+        return AjaxResult.success(invoiceLedgerService.invoiceLedgerFileList(invoiceLedgerId));
     }
 
     /**
@@ -74,10 +73,10 @@
      */
     @DeleteMapping("/delFile")
     @Log(title = "寮�绁ㄥ彴璐�", businessType = BusinessType.DELETE)
-    public R<?> invoiceLedgerDelFile(@RequestBody List<Integer> ids) {
-        if(Collections.isEmpty(ids)) return R.fail("璇烽�夋嫨瑕佸垹闄ょ殑鏂囦欢");
+    public AjaxResult invoiceLedgerDelFile(@RequestBody List<Integer> ids) {
+        if(Collections.isEmpty(ids)) return AjaxResult.error("璇烽�夋嫨瑕佸垹闄ょ殑鏂囦欢");
         invoiceLedgerFileMapper.deleteBatchIds(ids);
-        return R.ok();
+        return AjaxResult.success();
     }
 
 
@@ -88,11 +87,11 @@
      * @return
      */
     @PostMapping("/uploadFile")
-    public R<?> invoiceLedgerUploadFile(MultipartFile file) {
+    public AjaxResult invoiceLedgerUploadFile(MultipartFile file) {
         try {
-            return R.ok(invoiceLedgerService.invoiceLedgerUploadFile(file));
+            return AjaxResult.success(invoiceLedgerService.invoiceLedgerUploadFile(file));
         }catch (Exception e) {
-            return R.fail(e.getMessage());
+            return AjaxResult.error(e.getMessage());
         }
     }
 
@@ -113,8 +112,8 @@
      * @return
      */
     @GetMapping("/info")
-    public R<?> invoiceLedgerInfo(Integer id) {
-        return R.ok(invoiceLedgerService.invoiceLedgerDetail(id));
+    public AjaxResult invoiceLedgerInfo(Integer id) {
+        return AjaxResult.success(invoiceLedgerService.invoiceLedgerDetail(id));
     }
 
     /**
@@ -123,12 +122,12 @@
      * @return
      */
     @PostMapping("/commitFile")
-    public R<?> invoiceLedgerCommitFile(@RequestBody InvoiceLedgerDto invoiceLedgerDto) {
+    public AjaxResult invoiceLedgerCommitFile(@RequestBody InvoiceLedgerDto invoiceLedgerDto) {
         try {
             invoiceLedgerService.invoiceLedgerCommitFile(invoiceLedgerDto);
-            return R.ok();
+            return AjaxResult.success();
         }catch (Exception e) {
-            return R.fail(e.getMessage());
+            return AjaxResult.error(e.getMessage());
         }
     }
 
@@ -138,8 +137,8 @@
      * @return
      */
     @GetMapping("/list")
-    public R<?> invoiceLedgerList(InvoiceLedgerDto invoiceLedgerDto) {
-        return R.ok(invoiceLedgerService.invoiceLedgerList(invoiceLedgerDto));
+    public AjaxResult invoiceLedgerList(InvoiceLedgerDto invoiceLedgerDto) {
+        return AjaxResult.success(invoiceLedgerService.invoiceLedgerList(invoiceLedgerDto));
     }
 
     /**
@@ -149,20 +148,20 @@
      * @return
      */
     @GetMapping("/salesAccount")
-    public R<?> invoiceLedgerSalesAccount(Page page, InvoiceLedgerDto invoiceLedgerDto) {
-        return R.ok(invoiceLedgerService.invoiceLedgerSalesAccount(page,invoiceLedgerDto));
+    public AjaxResult invoiceLedgerSalesAccount(Page page, InvoiceLedgerDto invoiceLedgerDto) {
+        return AjaxResult.success(invoiceLedgerService.invoiceLedgerSalesAccount(page,invoiceLedgerDto));
     }
 
     /**
      * 鏈湀寮�绁ㄩ噾棰�
      */
     @GetMapping("/getInvoiceAmount")
-    public R<?> getInvoiceAmount() {
+    public AjaxResult getInvoiceAmount() {
         try {
             BigDecimal amount = invoiceLedgerService.getInvoiceAmount();
-            return R.ok(amount != null ? amount : BigDecimal.ZERO);
+            return AjaxResult.success(amount != null ? amount : BigDecimal.ZERO);
         } catch (Exception e) {
-            return R.fail("鑾峰彇寮�绁ㄩ噾棰濆け璐ワ細" + e.getMessage());
+            return AjaxResult.error("鑾峰彇寮�绁ㄩ噾棰濆け璐ワ細" + e.getMessage());
         }
     }
 
@@ -173,9 +172,9 @@
      * @return
      */
     @GetMapping("/registrationProductPage")
-    public R<?> registrationProductPage(Page page, InvoiceRegistrationProductDto registrationProductDto) {
+    public AjaxResult registrationProductPage(Page page, InvoiceRegistrationProductDto registrationProductDto) {
 
-        return R.ok(invoiceLedgerService.registrationProductPage(page,registrationProductDto));
+        return AjaxResult.success(invoiceLedgerService.registrationProductPage(page,registrationProductDto));
     }
 
     /**
@@ -184,8 +183,8 @@
      * @return
      */
     @GetMapping("/invoiceLedgerProductInfo")
-    public R<?> invoiceLedgerProductDetail(Integer id) {
-        return R.ok(invoiceLedgerService.invoiceLedgerProductDetail(id));
+    public AjaxResult invoiceLedgerProductDetail(Integer id) {
+        return AjaxResult.success(invoiceLedgerService.invoiceLedgerProductDetail(id));
     }
 
     /**
@@ -194,12 +193,12 @@
      * @return
      */
     @DeleteMapping("delInvoiceLedger/{invoiceRegistrationProductId}")
-    public R<?> delInvoiceLedger(@PathVariable Integer invoiceRegistrationProductId) {
+    public AjaxResult delInvoiceLedger(@PathVariable Integer invoiceRegistrationProductId) {
         try {
             invoiceLedgerService.delInvoiceLedger(invoiceRegistrationProductId);
-            return R.ok();
+            return AjaxResult.success();
         }catch (Exception e) {
-            return R.fail(e.getMessage());
+            return AjaxResult.error(e.getMessage());
         }
     }
 

--
Gitblit v1.9.3