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/purchase/controller/PaymentRegistrationController.java | 50 +++++++++++++++++++++++---------------------------
1 files changed, 23 insertions(+), 27 deletions(-)
diff --git a/src/main/java/com/ruoyi/purchase/controller/PaymentRegistrationController.java b/src/main/java/com/ruoyi/purchase/controller/PaymentRegistrationController.java
index 9019c61..289110c 100644
--- a/src/main/java/com/ruoyi/purchase/controller/PaymentRegistrationController.java
+++ b/src/main/java/com/ruoyi/purchase/controller/PaymentRegistrationController.java
@@ -6,7 +6,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.R;
+import com.ruoyi.framework.web.domain.AjaxResult;
import com.ruoyi.framework.web.page.TableDataInfo;
import com.ruoyi.purchase.dto.PaymentHistoryRecordVo;
import com.ruoyi.purchase.dto.PaymentLedgerDto;
@@ -62,8 +62,8 @@
* 鑾峰彇浠樻鐧昏璇︾粏淇℃伅
*/
@GetMapping(value = "/{id}")
- public R<?> getInfo(@PathVariable("id") Long id) {
- return R.ok(paymentRegistrationService.selectPaymentRegistrationById(id));
+ public AjaxResult getInfo(@PathVariable("id") Long id) {
+ return success(paymentRegistrationService.selectPaymentRegistrationById(id));
}
/**
@@ -72,9 +72,8 @@
@Log(title = "浠樻鐧昏", businessType = BusinessType.INSERT)
@PostMapping
@Transactional(rollbackFor = Exception.class)
- public R<?> add(@RequestBody List<PaymentRegistration> paymentRegistration) {
- paymentRegistrationService.insertPaymentRegistration(paymentRegistration);
- return R.ok();
+ public AjaxResult add(@RequestBody List<PaymentRegistration> paymentRegistration) {
+ return toAjax(paymentRegistrationService.insertPaymentRegistration(paymentRegistration));
}
/**
@@ -83,9 +82,8 @@
@Log(title = "浠樻鐧昏", businessType = BusinessType.UPDATE)
@PutMapping
@Transactional(rollbackFor = Exception.class)
- public R<?> edit(@RequestBody PaymentRegistration paymentRegistration) {
- paymentRegistrationService.updatePaymentRegistration(paymentRegistration);
- return R.ok();
+ public AjaxResult edit(@RequestBody PaymentRegistration paymentRegistration) {
+ return toAjax(paymentRegistrationService.updatePaymentRegistration(paymentRegistration));
}
/**
@@ -93,9 +91,8 @@
*/
@Log(title = "浠樻鐧昏", businessType = BusinessType.DELETE)
@DeleteMapping("/del")
- public R<?> remove(@RequestBody Long[] ids) {
- paymentRegistrationService.deletePaymentRegistrationByIds(ids);
- return R.ok();
+ public AjaxResult remove(@RequestBody Long[] ids) {
+ return toAjax(paymentRegistrationService.deletePaymentRegistrationByIds(ids));
}
/**
@@ -103,52 +100,51 @@
*/
@Log(title = "浠樻鐧昏", businessType = BusinessType.DELETE)
@DeleteMapping("/delete")
- public R<?> delete(@RequestBody Long[] ids) {
- paymentRegistrationService.delete(ids);
- return R.ok();
+ public AjaxResult delete(@RequestBody Long[] ids) {
+ return toAjax(paymentRegistrationService.delete(ids));
}
/**
* 鑾峰彇浠樻鐧昏璇︾粏淇℃伅
*/
@GetMapping(value = "/byPurchaseId/{id}")
- public R<?> getPurchaseInfo(@PathVariable("id") Long id) {
- return R.ok(paymentRegistrationService.selectPaymentRegistrationByPurchaseId(id));
+ public AjaxResult getPurchaseInfo(@PathVariable("id") Long id) {
+ return success(paymentRegistrationService.selectPaymentRegistrationByPurchaseId(id));
}
/**
* 鑾峰彇浠樻鐧昏璇︾粏淇℃伅
*/
@GetMapping(value = "/paymentLedgerList")
- public R<?> paymentLedgerList(PaymentLedgerDto paymentLedgerDto, Page page,
+ public AjaxResult paymentLedgerList(PaymentLedgerDto paymentLedgerDto, Page page,
Integer detailPageNum,
Integer detailPageSize) {
IPage<Map<String, Object>> mapIPage = paymentRegistrationService.selectPaymentLedgerList(paymentLedgerDto, page, detailPageNum, detailPageSize);
- return R.ok(mapIPage);
+ return success(mapIPage);
}
/**
* 渚涘簲鍟嗗線鏉ュ垎椤垫帴鍙�
*/
@GetMapping("/supplierNameListPage")
- public R<?> supplierNameListPage(PaymentLedgerDto paymentLedgerDto, Page page){
- return R.ok(paymentRegistrationService.supplierNameListPage(page,paymentLedgerDto));
+ public AjaxResult supplierNameListPage(PaymentLedgerDto paymentLedgerDto, Page page){
+ return success(paymentRegistrationService.supplierNameListPage(page,paymentLedgerDto));
}
/**
* 渚涘簲鍟嗗線鏉ュ垎椤垫帴鍙�
*/
@GetMapping("/supplierNameListPageDetails")
- public R<?> supplierNameListPageDetails(PaymentLedgerDto paymentLedgerDto){
- return R.ok(paymentRegistrationService.supplierNameListPageDetails(paymentLedgerDto));
+ public AjaxResult supplierNameListPageDetails(PaymentLedgerDto paymentLedgerDto){
+ return success(paymentRegistrationService.supplierNameListPageDetails(paymentLedgerDto));
}
/**
* 鑾峰彇鏈湀搴斾粯淇℃伅
*/
@GetMapping(value = "/paymentMonthList")
- public R<?> paymentMonthList() {
- return R.ok(paymentRegistrationService.paymentMonthList());
+ public AjaxResult paymentMonthList() {
+ return success(paymentRegistrationService.paymentMonthList());
}
/**
@@ -170,9 +166,9 @@
* @return
*/
@GetMapping("/getPaymentRecordList/{supplierId}")
- public R<?> getPaymentRecordList(@PathVariable Long supplierId) {
+ public AjaxResult getPaymentRecordList(@PathVariable Long supplierId) {
List<PaymentHistoryRecordVo> paymentRecordList = paymentRegistrationService.getPaymentRecordList(supplierId);
- return R.ok(paymentRecordList);
+ return success(paymentRecordList);
}
/**
--
Gitblit v1.9.3