feat:导入区划转中文

pg_adapter
wangxy 9 months ago
parent 21f11260f2
commit 9a41767818

@ -6,6 +6,7 @@ import java.util.List;
import com.ruoyi.common.utils.uuid.Seq; import com.ruoyi.common.utils.uuid.Seq;
import com.ruoyi.system.domain.TdPropertyInfo; import com.ruoyi.system.domain.TdPropertyInfo;
import com.ruoyi.system.service.ITdPropertyInfoService; import com.ruoyi.system.service.ITdPropertyInfoService;
import com.ruoyi.web.controller.manager.SysAreaManager;
import org.apache.shiro.authz.annotation.RequiresPermissions; import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller; 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.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo; import com.ruoyi.common.core.page.TableDataInfo;
import javax.annotation.Resource;
/** /**
* Controller * Controller
* *
@ -41,6 +44,9 @@ public class TdPropertyManagerController extends BaseController
@Autowired @Autowired
private ITdPropertyInfoService tdPropertyInfoService; private ITdPropertyInfoService tdPropertyInfoService;
@Resource
private SysAreaManager sysAreaManager;
@RequiresPermissions("system:property:view") @RequiresPermissions("system:property:view")
@GetMapping() @GetMapping()
public String property() public String property()
@ -71,6 +77,10 @@ public class TdPropertyManagerController extends BaseController
public AjaxResult export(TdPropertyManager tdPropertyManager) public AjaxResult export(TdPropertyManager tdPropertyManager)
{ {
List<TdPropertyManager> list = tdPropertyManagerService.selectTdPropertyManagerList(tdPropertyManager); List<TdPropertyManager> list = tdPropertyManagerService.selectTdPropertyManagerList(tdPropertyManager);
list.forEach(tdPropertyManager1 -> {
tdPropertyManager1.setPart(sysAreaManager.getAreaName(tdPropertyManager1.getPart()));
tdPropertyManager1.setAreaId(sysAreaManager.getAreaName(tdPropertyManager1.getAreaId()));
});
ExcelUtil<TdPropertyManager> util = new ExcelUtil<TdPropertyManager>(TdPropertyManager.class); ExcelUtil<TdPropertyManager> util = new ExcelUtil<TdPropertyManager>(TdPropertyManager.class);
return util.exportExcel(list, "资产登记数据"); return util.exportExcel(list, "资产登记数据");
} }

@ -56,11 +56,11 @@ public class TdPropertyManager extends BaseEntity
private Long shemichengdu; private Long shemichengdu;
/** 市 */ /** 市 */
@Excel(name = "市") @Excel(name = "所属")
private String part; private String part;
/** 区 */ /** 区 */
@Excel(name = "区") @Excel(name = "所属")
private String areaId; private String areaId;
/** 网络终端(数量) */ /** 网络终端(数量) */

Loading…
Cancel
Save