From d7ca504a668322be5137d3dc8e72072c4efbd9c9 Mon Sep 17 00:00:00 2001
From: 云 <2163098428@qq.com>
Date: 星期三, 22 四月 2026 15:33:31 +0800
Subject: [PATCH] refactor(sales): 重构销售分类账服务以集成生产质量相关模块
---
src/main/java/com/ruoyi/sales/controller/ReceiptPaymentController.java | 19 ++++++++++---------
1 files changed, 10 insertions(+), 9 deletions(-)
diff --git a/src/main/java/com/ruoyi/sales/controller/ReceiptPaymentController.java b/src/main/java/com/ruoyi/sales/controller/ReceiptPaymentController.java
index 0801107..a5ebc32 100644
--- a/src/main/java/com/ruoyi/sales/controller/ReceiptPaymentController.java
+++ b/src/main/java/com/ruoyi/sales/controller/ReceiptPaymentController.java
@@ -9,18 +9,17 @@
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.InvoiceLedgerDto;
import com.ruoyi.sales.dto.ReceiptPaymentDto;
import com.ruoyi.sales.dto.ReceiptPaymentRecordDto;
-import com.ruoyi.sales.dto.SalesLedgerDto;
import com.ruoyi.sales.pojo.ReceiptPayment;
-import com.ruoyi.sales.pojo.SalesLedger;
import com.ruoyi.sales.service.ReceiptPaymentService;
import io.swagger.annotations.ApiModelProperty;
-import org.springframework.beans.factory.annotation.Autowired;
+import jakarta.servlet.http.HttpServletResponse;
+import lombok.AllArgsConstructor;
+import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.*;
-import javax.servlet.http.HttpServletResponse;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Arrays;
@@ -29,9 +28,9 @@
@RestController
@RequestMapping("/receiptPayment")
+@AllArgsConstructor
public class ReceiptPaymentController extends BaseController {
- @Autowired
private ReceiptPaymentService receiptPaymentService;
/**
@@ -40,7 +39,7 @@
* @return
*/
@PostMapping("/saveOrUpdate")
- public AjaxResult receiptPaymentSaveOrUpdate (@RequestBody ReceiptPayment receiptPayment) {
+ public AjaxResult receiptPaymentSaveOrUpdate (@RequestBody List<ReceiptPayment> receiptPayment) {
receiptPaymentService.receiptPaymentSaveOrUpdate(receiptPayment);
return AjaxResult.success();
}
@@ -51,6 +50,7 @@
* @return
*/
@PostMapping("/update")
+ @Transactional(rollbackFor = Exception.class)
public AjaxResult receiptPaymentUpdate (@RequestBody ReceiptPayment receiptPayment) {
return AjaxResult.success(receiptPaymentService.receiptPaymentUpdate(receiptPayment));
}
@@ -61,6 +61,7 @@
* @return
*/
@DeleteMapping("/del")
+ @Transactional(rollbackFor = Exception.class)
public AjaxResult receiptPaymentDel (@RequestBody List<Integer> ids) {
return AjaxResult.success(receiptPaymentService.receiptPaymentDel(ids));
}
@@ -71,7 +72,7 @@
* @return
*/
@GetMapping("/customerInteractions")
- public AjaxResult customerInteractions (ReceiptPaymentDto receiptPaymentDto) {
+ public AjaxResult customerInteractions (InvoiceLedgerDto receiptPaymentDto) {
return AjaxResult.success(receiptPaymentService.customerInteractions(receiptPaymentDto));
}
@@ -174,7 +175,7 @@
List<ReceiptPaymentRecordDto> receiptPaymentRecordDtos = new ArrayList<>();
salesLedgerIPage.getRecords().forEach(receiptPaymentRecordDto -> {
ReceiptPaymentRecordDto receiptPaymentRecordDto1 = new ReceiptPaymentRecordDto();
- BeanUtils.copyBeanProp(receiptPaymentRecordDto, receiptPaymentRecordDto1);
+ BeanUtils.copyProperties(receiptPaymentRecordDto, receiptPaymentRecordDto1);
receiptPaymentRecordDtos.add(receiptPaymentRecordDto1);
});
util.exportExcel(response, receiptPaymentRecordDtos, "瀵煎嚭寮�绁ㄧ櫥璁板垪琛�");
--
Gitblit v1.9.3