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; /** 网络终端(数量) */