From a303e40b2d843700f2b9045ca105c81dea97d964 Mon Sep 17 00:00:00 2001 From: chenrui <1187576398@qq.com> Date: 星期一, 09 六月 2025 16:06:42 +0800 Subject: [PATCH] 回款登记记录修改 --- src/main/java/com/ruoyi/sales/controller/ReceiptPaymentController.java | 96 ++++++++++++++++++++++++++++++++++++++++++++---- 1 files changed, 88 insertions(+), 8 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..3e3013e 100644 --- a/src/main/java/com/ruoyi/sales/controller/ReceiptPaymentController.java +++ b/src/main/java/com/ruoyi/sales/controller/ReceiptPaymentController.java @@ -1,18 +1,23 @@ package com.ruoyi.sales.controller; +import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.ruoyi.framework.web.controller.BaseController; import com.ruoyi.framework.web.domain.AjaxResult; +import com.ruoyi.framework.web.page.TableDataInfo; +import com.ruoyi.purchase.dto.InvoicePurchaseDto; import com.ruoyi.sales.dto.ReceiptPaymentDto; import com.ruoyi.sales.pojo.ReceiptPayment; import com.ruoyi.sales.service.ReceiptPaymentService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; +import java.math.BigDecimal; import java.util.List; @RestController @RequestMapping("/receiptPayment") -public class ReceiptPaymentController { +public class ReceiptPaymentController extends BaseController { @Autowired private ReceiptPaymentService receiptPaymentService; @@ -22,9 +27,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(); } @@ -49,15 +54,90 @@ } /** - * 鍥炴鐧昏鍒嗛〉鏌ヨ + * 瀹㈡埛寰�鏉ヨ褰曟煡璇� + * @param receiptPaymentDto + * @return + */ + @GetMapping("/customerInteractions") + public AjaxResult customerInteractions (ReceiptPaymentDto receiptPaymentDto) { + return AjaxResult.success(receiptPaymentService.customerInteractions(receiptPaymentDto)); + } + + /** + * 鍥炴鐧昏璇︽儏 + * @param id + * @return + */ + @GetMapping("/info") + public AjaxResult receiptPaymentInfo (Integer id) { + return AjaxResult.success(receiptPaymentService.receiptPaymentInfo(id)); + } + + /** + * 鏈湀鍥炴閲戦 + */ + @GetMapping("/getReceiptAmount") + public AjaxResult getReceiptAmount() { + try { + BigDecimal receiptAmount = receiptPaymentService.getReceiptAmount(); + return AjaxResult.success(receiptAmount != null ? receiptAmount : BigDecimal.ZERO); + } catch (Exception e) { + return AjaxResult.error("鑾峰彇鍥炴閲戦澶辫触锛�" + e.getMessage()); + } + } + + /** + * 鏌ヨ宸茬粡缁戝畾鍙戠エ鐨勫紑绁ㄥ彴璐� * @param page * @param receiptPaymentDto * @return */ - @GetMapping("/listPage") - public AjaxResult receiptPaymentListPage (Page page, ReceiptPaymentDto receiptPaymentDto) { - return AjaxResult.success(receiptPaymentService.receiptPaymentListPage(page,receiptPaymentDto)); + @GetMapping("/bindInvoiceNoRegPage") + public AjaxResult bindInvoiceNoRegPage(Page page, ReceiptPaymentDto receiptPaymentDto) { + return AjaxResult.success(receiptPaymentService.bindInvoiceNoRegPage(page,receiptPaymentDto)); } + /** + * 寮�绁ㄥ彴璐﹁鎯� + * @param id + * @return + */ + @GetMapping("/invoiceInfo") + public AjaxResult invoiceInfo (Integer id) { + return AjaxResult.success(receiptPaymentService.invoiceInfo(id)); + } + /** + * 鏈湀搴旀敹,鍥炴閲戦 + */ + @GetMapping("/getAmountMouth") + public AjaxResult getAmountMouth() { + return AjaxResult.success(receiptPaymentService.getAmountMouth()); + } + + /** + * 鏌ヨ鍥炴璁板綍 + */ + @GetMapping("/receiptPaymentHistoryList") + public TableDataInfo receiptPaymentHistoryList(ReceiptPaymentDto receiptPaymentDto) { + startPage(); + List<ReceiptPaymentDto> list = receiptPaymentService.receiptPaymentHistoryList(receiptPaymentDto); + return getDataTable(list); + } + + /** + * 鏌ヨ鍥炴璁板綍 + */ + @GetMapping("/receiptPaymentHistoryListPage") + public IPage<ReceiptPaymentDto> receiptPaymentHistoryListPage(Page page, ReceiptPaymentDto receiptPaymentDto) { + return receiptPaymentService.receiptPaymentHistoryListPage(page,receiptPaymentDto); + } + + /** + * 鏌ヨ鍥炴璁板綍涓嶅垎椤� + */ + @GetMapping("/receiptPaymentHistoryListNoPage") + public List<ReceiptPaymentDto> receiptPaymentHistoryListNoPage(ReceiptPaymentDto receiptPaymentDto) { + return receiptPaymentService.receiptPaymentHistoryListNoPage(receiptPaymentDto); + } } -- Gitblit v1.9.3