From 78c0d6c79dcd5a8e2e2f99199dbcf5504fe8687b Mon Sep 17 00:00:00 2001 From: liding <756868258@qq.com> Date: 星期六, 24 五月 2025 15:45:56 +0800 Subject: [PATCH] 采购管理模块 --- src/main/java/com/ruoyi/sales/controller/ReceiptPaymentController.java | 28 +++++++++++++++++++++++++--- 1 files changed, 25 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/ruoyi/sales/controller/ReceiptPaymentController.java b/src/main/java/com/ruoyi/sales/controller/ReceiptPaymentController.java index f5d7146..7279df7 100644 --- a/src/main/java/com/ruoyi/sales/controller/ReceiptPaymentController.java +++ b/src/main/java/com/ruoyi/sales/controller/ReceiptPaymentController.java @@ -8,6 +8,7 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; +import java.math.BigDecimal; import java.util.List; @RestController @@ -22,9 +23,9 @@ * @param receiptPayment * @return */ - @PostMapping("/add") - public AjaxResult receiptPaymentAdd (@RequestBody ReceiptPayment receiptPayment) { - receiptPaymentService.receiptPaymentAdd(receiptPayment); + @PostMapping("/saveOrUpdate") + public AjaxResult receiptPaymentSaveOrUpdate (@RequestBody ReceiptPayment receiptPayment) { + receiptPaymentService.receiptPaymentSaveOrUpdate(receiptPayment); return AjaxResult.success(); } @@ -59,5 +60,26 @@ return AjaxResult.success(receiptPaymentService.receiptPaymentListPage(page,receiptPaymentDto)); } + /** + * 鍥炴鐧昏璇︽儏 + * @param id + * @return + */ + @GetMapping("/info") + public AjaxResult receiptPaymentInfo (Integer id) { + return AjaxResult.success(receiptPaymentService.receiptPaymentInfo(id)); + } + /** + * 鏈湀鍥炴閲戦 + */ + @GetMapping("/getReceiptAmount") + public AjaxResult getReceiptAmount() { + try { + BigDecimal amount = receiptPaymentService.getReceiptAmount(); + return AjaxResult.success(amount != null ? amount : BigDecimal.ZERO); + } catch (Exception e) { + return AjaxResult.error("鑾峰彇鍚堝悓閲戦澶辫触锛�" + e.getMessage()); + } + } } -- Gitblit v1.9.3