From 620bb4712a31791231c4381581f0f60088f079fe Mon Sep 17 00:00:00 2001
From: 云 <2163098428@qq.com>
Date: 星期三, 27 五月 2026 14:03:45 +0800
Subject: [PATCH] Merge branch 'refs/heads/dev_New_pro' into dev_宁夏_英泽防锈
---
src/main/java/com/ruoyi/purchase/controller/AccountingReportController.java | 63 ++++++++++++++++++-------------
1 files changed, 36 insertions(+), 27 deletions(-)
diff --git a/src/main/java/com/ruoyi/purchase/controller/AccountingReportController.java b/src/main/java/com/ruoyi/purchase/controller/AccountingReportController.java
index 813fb44..798112b 100644
--- a/src/main/java/com/ruoyi/purchase/controller/AccountingReportController.java
+++ b/src/main/java/com/ruoyi/purchase/controller/AccountingReportController.java
@@ -1,26 +1,23 @@
package com.ruoyi.purchase.controller;
-import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.ruoyi.basic.service.ISupplierService;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.framework.aspectj.lang.annotation.Log;
import com.ruoyi.framework.aspectj.lang.enums.BusinessType;
-import com.ruoyi.framework.web.domain.AjaxResult;
-import com.ruoyi.purchase.dto.InvoicePurchaseReportDto;
+import com.ruoyi.framework.web.domain.R;
import com.ruoyi.purchase.dto.VatDto;
-import com.ruoyi.purchase.pojo.InvoicePurchase;
-import com.ruoyi.purchase.service.IInvoicePurchaseService;
-import com.ruoyi.waterrecord.pojo.WaterRecord;
-import io.swagger.v3.oas.annotations.tags.Tag;
+import com.ruoyi.purchase.service.PurchaseReportService;
+import com.ruoyi.purchase.vo.PurchaseReportVo;
import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import jakarta.servlet.http.HttpServletResponse;
import lombok.AllArgsConstructor;
-import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
-import jakarta.servlet.http.HttpServletResponse;
import java.util.List;
@RestController
@@ -29,40 +26,52 @@
@AllArgsConstructor
public class AccountingReportController {
- private IInvoicePurchaseService invoicePurchaseService;
+ private final ISupplierService supplierService;
+ private final PurchaseReportService purchaseReportService;
+
@GetMapping("/list")
@Log(title = "閲囪喘鎶ヨ〃-椤圭洰鍒╂鼎", businessType = BusinessType.OTHER)
- public AjaxResult list(Page page, InvoicePurchaseReportDto invoicePurchaseReportDto) {
- IPage<InvoicePurchaseReportDto> result =invoicePurchaseService.listPurchaseReport(page, invoicePurchaseReportDto);
- return AjaxResult.success(result);
+ public R list(Page page, String customerName) {
+ return R.ok(purchaseReportService.list(page,customerName));
}
@Log(title = "閲囪喘鎶ヨ〃-椤圭洰鍒╂鼎瀵煎嚭", businessType = BusinessType.EXPORT)
@PostMapping("/export")
@Operation(summary = "閲囪喘鎶ヨ〃-椤圭洰鍒╂鼎瀵煎嚭")
- public void export(HttpServletResponse response) {
- Page page = new Page(-1,-1);
- InvoicePurchaseReportDto waterRecord = new InvoicePurchaseReportDto();
- IPage<InvoicePurchaseReportDto> listPage = invoicePurchaseService.listPurchaseReport(page, waterRecord);
- ExcelUtil<InvoicePurchaseReportDto> util = new ExcelUtil<InvoicePurchaseReportDto>(InvoicePurchaseReportDto.class);
- util.exportExcel(response, listPage.getRecords() , "椤圭洰鍒╂鼎瀵煎嚭");
+ public void export(HttpServletResponse response, String customerName) {
+ List<PurchaseReportVo> list = purchaseReportService.list(new Page(1,-1),customerName).getRecords();
+ ExcelUtil<PurchaseReportVo> util = new ExcelUtil<>(PurchaseReportVo.class);
+ util.exportExcel(response, list , "椤圭洰鍒╂鼎");
+
}
@Log(title = "閲囪喘鎶ヨ〃-澧炲�肩◣姣斿", businessType = BusinessType.OTHER)
@GetMapping("/listVat")
- public AjaxResult listVat(Page page,String month) {
- IPage<VatDto> result = invoicePurchaseService.listVat(page, month);
- return AjaxResult.success(result);
+ public R listVat(Page page,String month) {
+ return R.ok(purchaseReportService.listVat(page,month));
}
@Log(title = "閲囪喘鎶ヨ〃-澧炲�肩◣姣斿", businessType = BusinessType.EXPORT)
@PostMapping("/exportTwo")
@Operation(summary = "閲囪喘鎶ヨ〃-澧炲�肩◣姣斿")
- public void exportTwo(HttpServletResponse response) {
- Page page = new Page(-1,-1);
- IPage<VatDto> result = invoicePurchaseService.listVat(page, null);
- ExcelUtil<VatDto> util = new ExcelUtil<VatDto>(VatDto.class);
- util.exportExcel(response, result.getRecords() , "澧炲�肩◣姣斿");
+ public void exportTwo(HttpServletResponse response,String month) {
+ List<VatDto> list = purchaseReportService.listVat(new Page(1,-1),month).getRecords();
+ ExcelUtil<VatDto> util = new ExcelUtil<>(VatDto.class);
+ util.exportExcel(response, list , "澧炲�肩◣姣斿");
+ }
+
+ @GetMapping("/supplierTransactions")
+ @Log(title = "渚涘簲鍟嗗線鏉�", businessType = BusinessType.OTHER)
+ @Operation(summary = "渚涘簲鍟嗗線鏉�")
+ public R supplierTransactions(Page page, String supplierName) {
+ return R.ok(supplierService.supplierTransactions(page,supplierName));
+ }
+
+ @GetMapping("/supplierTransactionsDetails")
+ @Log(title = "渚涘簲鍟嗗線鏉ユ槑缁�", businessType = BusinessType.OTHER)
+ @Operation(summary = "渚涘簲鍟嗗線鏉ユ槑缁�")
+ public R supplierTransactionsDetails(Page page, Long supplierId) {
+ return R.ok(supplierService.supplierTransactionsDetails(page,supplierId));
}
}
--
Gitblit v1.9.3