From 9d71b9bf1ec9e8597da70582f9eb7df580f3d58b Mon Sep 17 00:00:00 2001
From: maven <2163098428@qq.com>
Date: 星期三, 05 十一月 2025 09:42:18 +0800
Subject: [PATCH] yys
---
src/main/java/com/ruoyi/purchase/controller/AccountingReportController.java | 39 +++++++++++++++++++++++++++++++++++++--
1 files changed, 37 insertions(+), 2 deletions(-)
diff --git a/src/main/java/com/ruoyi/purchase/controller/AccountingReportController.java b/src/main/java/com/ruoyi/purchase/controller/AccountingReportController.java
index 50367c9..3df034f 100644
--- a/src/main/java/com/ruoyi/purchase/controller/AccountingReportController.java
+++ b/src/main/java/com/ruoyi/purchase/controller/AccountingReportController.java
@@ -2,19 +2,26 @@
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+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.InvoicePurchaseDto;
import com.ruoyi.purchase.dto.InvoicePurchaseReportDto;
+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.annotations.Api;
+import io.swagger.annotations.ApiOperation;
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 javax.servlet.http.HttpServletResponse;
+import java.util.List;
@RestController
@Api(tags = "閲囪喘鎶ヨ〃")
@@ -26,9 +33,37 @@
private IInvoicePurchaseService invoicePurchaseService;
@GetMapping("/list")
- @Log(title = "閲囪喘鎶ヨ〃", businessType = BusinessType.OTHER)
+ @Log(title = "閲囪喘鎶ヨ〃-椤圭洰鍒╂鼎", businessType = BusinessType.OTHER)
public AjaxResult list(Page page, InvoicePurchaseReportDto invoicePurchaseReportDto) {
IPage<InvoicePurchaseReportDto> result =invoicePurchaseService.listPurchaseReport(page, invoicePurchaseReportDto);
return AjaxResult.success(result);
}
+
+ @Log(title = "閲囪喘鎶ヨ〃-椤圭洰鍒╂鼎瀵煎嚭", businessType = BusinessType.EXPORT)
+ @PostMapping("/export")
+ @ApiOperation("閲囪喘鎶ヨ〃-椤圭洰鍒╂鼎瀵煎嚭")
+ 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() , "椤圭洰鍒╂鼎瀵煎嚭");
+ }
+
+ @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);
+ }
+
+ @Log(title = "閲囪喘鎶ヨ〃-澧炲�肩◣姣斿", businessType = BusinessType.EXPORT)
+ @PostMapping("/exportTwo")
+ @ApiOperation("閲囪喘鎶ヨ〃-澧炲�肩◣姣斿")
+ 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() , "澧炲�肩◣姣斿");
+ }
}
--
Gitblit v1.9.3