From 407e6597d851fa74a4ddb5dd4af635252205a737 Mon Sep 17 00:00:00 2001 From: wangxy <1356089412@qq.com> Date: Tue, 20 Aug 2024 15:35:44 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E5=AF=86=E5=93=81=E8=AE=BE=E5=A4=87?= =?UTF-8?q?=E7=BB=B4=E4=BF=AE=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../property/TdPropertyEmentController.java | 18 +++++++++++++++++- .../ruoyi/system/domain/TdPropertyEment.java | 5 +++++ 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/property/TdPropertyEmentController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/property/TdPropertyEmentController.java index 7df19fb..b5ee783 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/property/TdPropertyEmentController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/property/TdPropertyEmentController.java @@ -5,8 +5,10 @@ import com.ruoyi.common.core.controller.BaseController; import com.ruoyi.common.core.domain.AjaxResult; import com.ruoyi.common.core.page.TableDataInfo; import com.ruoyi.common.enums.BusinessType; +import com.ruoyi.common.utils.poi.ExcelUtil; import com.ruoyi.common.utils.uuid.Seq; import com.ruoyi.system.domain.TdPropertyEment; +import com.ruoyi.system.domain.TdPropertyInfo; import com.ruoyi.web.controller.manager.TdPropertyEmentManager; import org.apache.shiro.authz.annotation.RequiresPermissions; import org.springframework.stereotype.Controller; @@ -50,6 +52,20 @@ public class TdPropertyEmentController extends BaseController { return getDataTable(tdPropertyEments); } + + /** + * 导出设备管理列表 + */ + @RequiresPermissions("system:property:export") + @Log(title = "涉密设备", businessType = BusinessType.EXPORT) + @PostMapping("/export") + @ResponseBody + public AjaxResult export(TdPropertyEment tdPropertyEment) { + List tdPropertyEments = tdPropertyEmentManager.selectEmentList(tdPropertyEment); + ExcelUtil util = new ExcelUtil<>(TdPropertyEment.class); + return util.exportExcel(tdPropertyEments, "涉密设备数据"); + } + /** * 新增设备 */ @@ -95,8 +111,8 @@ public class TdPropertyEmentController extends BaseController { } /** + * 查询所有设备 * - * 查询所有设备 * @return com.ruoyi.common.core.domain.AjaxResult */ @PostMapping("/getList") diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/domain/TdPropertyEment.java b/ruoyi-system/src/main/java/com/ruoyi/system/domain/TdPropertyEment.java index 8ffd102..ad8d1d0 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/domain/TdPropertyEment.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/domain/TdPropertyEment.java @@ -4,6 +4,8 @@ import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableId; import java.io.Serializable; import java.util.Date; + +import com.ruoyi.common.annotation.Excel; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.experimental.Accessors; @@ -30,16 +32,19 @@ public class TdPropertyEment implements Serializable { /** * 名称 */ + @Excel(name = "名称") private String name; /** * 用途 */ + @Excel(name = "用途") private String purposes; /** * 备注 */ + @Excel(name = "备注") private String remark; /**