huminmin
6 天以前 d06ef3f44d6dc19dae223ab420165369ea13cc16
src/main/java/com/ruoyi/sales/controller/ReceiptPaymentController.java
@@ -7,7 +7,7 @@
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.AjaxResult;
import com.ruoyi.framework.web.domain.R;
import com.ruoyi.framework.web.page.TableDataInfo;
import com.ruoyi.sales.dto.InvoiceLedgerDto;
import com.ruoyi.sales.dto.ReceiptPaymentDto;
@@ -39,9 +39,9 @@
     * @return
     */
    @PostMapping("/saveOrUpdate")
    public AjaxResult receiptPaymentSaveOrUpdate (@RequestBody List<ReceiptPayment> receiptPayment) {
    public R<?> receiptPaymentSaveOrUpdate (@RequestBody List<ReceiptPayment> receiptPayment) {
        receiptPaymentService.receiptPaymentSaveOrUpdate(receiptPayment);
        return AjaxResult.success();
        return R.ok();
    }
    /**
@@ -51,8 +51,8 @@
     */
    @PostMapping("/update")
    @Transactional(rollbackFor = Exception.class)
    public AjaxResult receiptPaymentUpdate (@RequestBody ReceiptPayment receiptPayment) {
        return AjaxResult.success(receiptPaymentService.receiptPaymentUpdate(receiptPayment));
    public R<?> receiptPaymentUpdate (@RequestBody ReceiptPayment receiptPayment) {
        return R.ok(receiptPaymentService.receiptPaymentUpdate(receiptPayment));
    }
    /**
@@ -62,8 +62,8 @@
     */
    @DeleteMapping("/del")
    @Transactional(rollbackFor = Exception.class)
    public AjaxResult receiptPaymentDel (@RequestBody List<Integer> ids) {
        return AjaxResult.success(receiptPaymentService.receiptPaymentDel(ids));
    public R<?> receiptPaymentDel (@RequestBody List<Integer> ids) {
        return R.ok(receiptPaymentService.receiptPaymentDel(ids));
    }
    /**
@@ -72,8 +72,8 @@
     * @return
     */
    @GetMapping("/customerInteractions")
    public AjaxResult customerInteractions (InvoiceLedgerDto receiptPaymentDto) {
        return AjaxResult.success(receiptPaymentService.customerInteractions(receiptPaymentDto));
    public R<?> customerInteractions (InvoiceLedgerDto receiptPaymentDto) {
        return R.ok(receiptPaymentService.customerInteractions(receiptPaymentDto));
    }
    /**
@@ -82,20 +82,20 @@
     * @return
     */
    @GetMapping("/info")
    public AjaxResult receiptPaymentInfo (Integer id) {
        return AjaxResult.success(receiptPaymentService.receiptPaymentInfo(id));
    public R<?> receiptPaymentInfo (Integer id) {
        return R.ok(receiptPaymentService.receiptPaymentInfo(id));
    }
    /**
     * 本月回款金额
     */
    @GetMapping("/getReceiptAmount")
    public AjaxResult getReceiptAmount() {
    public R<?> getReceiptAmount() {
        try {
            BigDecimal receiptAmount = receiptPaymentService.getReceiptAmount();
            return AjaxResult.success(receiptAmount != null ? receiptAmount : BigDecimal.ZERO);
            return R.ok(receiptAmount != null ? receiptAmount : BigDecimal.ZERO);
        } catch (Exception e) {
            return AjaxResult.error("获取回款金额失败:" + e.getMessage());
            return R.fail("获取回款金额失败:" + e.getMessage());
        }
    }
@@ -106,8 +106,8 @@
     * @return
     */
    @GetMapping("/bindInvoiceNoRegPage")
    public AjaxResult bindInvoiceNoRegPage(Page page, ReceiptPaymentDto receiptPaymentDto) {
        return AjaxResult.success(receiptPaymentService.bindInvoiceNoRegPage(page,receiptPaymentDto));
    public R<?> bindInvoiceNoRegPage(Page page, ReceiptPaymentDto receiptPaymentDto) {
        return R.ok(receiptPaymentService.bindInvoiceNoRegPage(page,receiptPaymentDto));
    }
    @Schema(description = "导出回款登记")
@@ -131,16 +131,16 @@
     * @return
     */
    @GetMapping("/invoiceInfo")
    public AjaxResult invoiceInfo (Integer id) {
        return AjaxResult.success(receiptPaymentService.invoiceInfo(id));
    public R<?> invoiceInfo (Integer id) {
        return R.ok(receiptPaymentService.invoiceInfo(id));
    }
    /**
     * 本月应收,回款金额
     */
    @GetMapping("/getAmountMouth")
    public AjaxResult getAmountMouth() {
        return  AjaxResult.success(receiptPaymentService.getAmountMouth());
    public R<?> getAmountMouth() {
        return  R.ok(receiptPaymentService.getAmountMouth());
    }
    /**