From 9a417678187e617c55d4a2885f021d4bd362c378 Mon Sep 17 00:00:00 2001 From: wangxy <1356089412@qq.com> Date: Fri, 12 Jul 2024 08:45:46 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E5=AF=BC=E5=85=A5=E5=8C=BA=E5=88=92?= =?UTF-8?q?=E8=BD=AC=E4=B8=AD=E6=96=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../system/property/TdPropertyManagerController.java | 10 ++++++++++ .../com/ruoyi/system/domain/TdPropertyManager.java | 4 ++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/property/TdPropertyManagerController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/property/TdPropertyManagerController.java index 4924566..4af7e8d 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/property/TdPropertyManagerController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/property/TdPropertyManagerController.java @@ -6,6 +6,7 @@ import java.util.List; import com.ruoyi.common.utils.uuid.Seq; import com.ruoyi.system.domain.TdPropertyInfo; import com.ruoyi.system.service.ITdPropertyInfoService; +import com.ruoyi.web.controller.manager.SysAreaManager; import org.apache.shiro.authz.annotation.RequiresPermissions; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; @@ -24,6 +25,8 @@ import com.ruoyi.common.core.domain.AjaxResult; import com.ruoyi.common.utils.poi.ExcelUtil; import com.ruoyi.common.core.page.TableDataInfo; +import javax.annotation.Resource; + /** * 资产登记Controller * @@ -41,6 +44,9 @@ public class TdPropertyManagerController extends BaseController @Autowired private ITdPropertyInfoService tdPropertyInfoService; + @Resource + private SysAreaManager sysAreaManager; + @RequiresPermissions("system:property:view") @GetMapping() public String property() @@ -71,6 +77,10 @@ public class TdPropertyManagerController extends BaseController public AjaxResult export(TdPropertyManager tdPropertyManager) { List list = tdPropertyManagerService.selectTdPropertyManagerList(tdPropertyManager); + list.forEach(tdPropertyManager1 -> { + tdPropertyManager1.setPart(sysAreaManager.getAreaName(tdPropertyManager1.getPart())); + tdPropertyManager1.setAreaId(sysAreaManager.getAreaName(tdPropertyManager1.getAreaId())); + }); ExcelUtil util = new ExcelUtil(TdPropertyManager.class); return util.exportExcel(list, "资产登记数据"); } diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/domain/TdPropertyManager.java b/ruoyi-system/src/main/java/com/ruoyi/system/domain/TdPropertyManager.java index 4a58280..8eed75b 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/domain/TdPropertyManager.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/domain/TdPropertyManager.java @@ -56,11 +56,11 @@ public class TdPropertyManager extends BaseEntity private Long shemichengdu; /** 市 */ - @Excel(name = "市") + @Excel(name = "所属市州") private String part; /** 区 */ - @Excel(name = "区") + @Excel(name = "所属区县") private String areaId; /** 网络终端(数量) */