From c2963c9ba128728788add2586f1fb5dc421ca6b5 Mon Sep 17 00:00:00 2001
From: 龚焕茏 <2842157468@qq.com>
Date: 星期三, 10 四月 2024 18:11:31 +0800
Subject: [PATCH] 新增运维平台、资产管理
---
ycl-server/src/main/java/com/ycl/platform/controller/YwUnitController.java | 18 ++++++++++++++++--
1 files changed, 16 insertions(+), 2 deletions(-)
diff --git a/ycl-server/src/main/java/com/ycl/platform/controller/YwUnitController.java b/ycl-server/src/main/java/com/ycl/platform/controller/YwUnitController.java
index bc5a1ab..7bda29c 100644
--- a/ycl-server/src/main/java/com/ycl/platform/controller/YwUnitController.java
+++ b/ycl-server/src/main/java/com/ycl/platform/controller/YwUnitController.java
@@ -1,11 +1,17 @@
package com.ycl.platform.controller;
+import com.ycl.platform.domain.query.ReportQuery;
+import com.ycl.platform.domain.vo.ReportVO;
+import com.ycl.platform.domain.vo.YwUnitVO;
import com.ycl.system.Result;
import com.ycl.platform.domain.form.YwUnitForm;
import com.ycl.system.domain.group.Update;
import com.ycl.system.domain.group.Add;
import com.ycl.platform.domain.query.YwUnitQuery;
import com.ycl.platform.service.YwUnitService;
+import com.ycl.utils.poi.ExcelUtil;
+import jakarta.servlet.http.HttpServletResponse;
+import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.annotation.Validated;
import lombok.RequiredArgsConstructor;
import java.util.List;
@@ -55,9 +61,9 @@
}
// @PreAuthorize("@ss.hasPermi('unit:list')")
- @GetMapping("/page")
+ @PostMapping("/page")
@ApiOperation(value = "鍒嗛〉", notes = "鍒嗛〉")
- public Result page(YwUnitQuery query) {
+ public Result page(@RequestBody YwUnitQuery query) {
return ywUnitService.page(query);
}
@@ -72,4 +78,12 @@
public Result list() {
return ywUnitService.all();
}
+
+ @PostMapping("/export")
+ public void export(HttpServletResponse response, YwUnitQuery query)
+ {
+ List<YwUnitVO> list = ywUnitService.export(query);
+ ExcelUtil<YwUnitVO> util = new ExcelUtil<>(YwUnitVO.class);
+ util.exportExcel(response, list, "鎶ュ");
+ }
}
--
Gitblit v1.8.0