From 0268f58a18bfcf061389387ef5322bf11aece154 Mon Sep 17 00:00:00 2001
From: huminmin <mac@MacBook-Pro.local>
Date: 星期二, 28 四月 2026 14:22:54 +0800
Subject: [PATCH] Merge branch 'dev_New_pro' of http://114.132.189.42:9002/r/product-inventory-management-after into dev_New_pro
---
src/main/java/com/ruoyi/waterrecord/controller/WaterRecordController.java | 20 ++++++++++++--------
1 files changed, 12 insertions(+), 8 deletions(-)
diff --git a/src/main/java/com/ruoyi/waterrecord/controller/WaterRecordController.java b/src/main/java/com/ruoyi/waterrecord/controller/WaterRecordController.java
index 87a9b7d..be3933b 100644
--- a/src/main/java/com/ruoyi/waterrecord/controller/WaterRecordController.java
+++ b/src/main/java/com/ruoyi/waterrecord/controller/WaterRecordController.java
@@ -9,15 +9,16 @@
import com.ruoyi.framework.web.domain.AjaxResult;
import com.ruoyi.waterrecord.pojo.WaterRecord;
import com.ruoyi.waterrecord.service.WaterRecordService;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import io.swagger.v3.oas.annotations.Operation;
+import lombok.AllArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.CollectionUtils;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
-import javax.servlet.http.HttpServletResponse;
+import jakarta.servlet.http.HttpServletResponse;
import java.util.List;
/**
@@ -25,11 +26,11 @@
* @date : 2025/8/11 10:08
*/
@RestController
-@Api(tags = "鐢ㄦ按绠$悊")
+@Tag(name = "鐢ㄦ按绠$悊")
@RequestMapping("/waterRecord")
+@AllArgsConstructor
public class WaterRecordController extends BaseController {
- @Autowired
private WaterRecordService waterRecordService;
@GetMapping("/listPage")
@@ -69,7 +70,7 @@
*/
@Log(title = "瀵煎叆鐢ㄦ按绠$悊", businessType = BusinessType.IMPORT)
@PostMapping("/importData")
- @ApiOperation("瀵煎叆鐢ㄦ按绠$悊")
+ @Operation(summary = "瀵煎叆鐢ㄦ按绠$悊")
public AjaxResult importData(MultipartFile file) throws Exception {
return waterRecordService.importData(file);
}
@@ -79,10 +80,13 @@
*/
@Log(title = "瀵煎嚭鐢ㄦ按绠$悊", businessType = BusinessType.EXPORT)
@PostMapping("/export")
- @ApiOperation("瀵煎嚭鐢ㄦ按绠$悊")
+ @Operation(summary = "瀵煎嚭鐢ㄦ按绠$悊")
public void export(HttpServletResponse response) {
+ Page page = new Page(-1,-1);
+ WaterRecord waterRecord = new WaterRecord();
+ IPage<WaterRecord> listPage = waterRecordService.listPage(page, waterRecord);
ExcelUtil<WaterRecord> util = new ExcelUtil<WaterRecord>(WaterRecord.class);
- util.exportExcel(response, null , "鐢ㄦ按绠$悊");
+ util.exportExcel(response, listPage.getRecords() , "鐢ㄦ按绠$悊");
}
}
--
Gitblit v1.9.3