feat:导入区划转中文

pg_adapter
wangxy 9 months ago
parent 830cce03a7
commit 1932d5b242

@ -1,6 +1,8 @@
package com.ruoyi.web.controller.system.check; package com.ruoyi.web.controller.system.check;
import java.util.List; import java.util.List;
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;
@ -19,6 +21,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
* *
@ -34,6 +38,9 @@ public class TdCheckController extends BaseController
@Autowired @Autowired
private ITdCheckService tdCheckService; private ITdCheckService tdCheckService;
@Resource
private SysAreaManager sysAreaManager;
@RequiresPermissions("system:check:view") @RequiresPermissions("system:check:view")
@GetMapping() @GetMapping()
public String check() public String check()
@ -64,6 +71,10 @@ public class TdCheckController extends BaseController
public AjaxResult export(TdCheck tdCheck) public AjaxResult export(TdCheck tdCheck)
{ {
List<TdCheck> list = tdCheckService.selectTdCheckList(tdCheck); List<TdCheck> list = tdCheckService.selectTdCheckList(tdCheck);
list.forEach(tdCheck1 -> {
tdCheck1.setFramework(sysAreaManager.getAreaName(tdCheck1.getFramework()));
tdCheck1.setArea(sysAreaManager.getAreaName(tdCheck1.getArea()));
});
ExcelUtil<TdCheck> util = new ExcelUtil<TdCheck>(TdCheck.class); ExcelUtil<TdCheck> util = new ExcelUtil<TdCheck>(TdCheck.class);
return util.exportExcel(list, "检查报告管理数据"); return util.exportExcel(list, "检查报告管理数据");
} }

@ -8,12 +8,14 @@ import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.poi.ExcelUtil; import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.system.domain.TdCheck; import com.ruoyi.system.domain.TdCheck;
import com.ruoyi.system.service.ITdCheckService; import com.ruoyi.system.service.ITdCheckService;
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;
import org.springframework.ui.ModelMap; import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.util.List; import java.util.List;
import java.util.Objects; import java.util.Objects;
@ -24,6 +26,9 @@ public class TdCheckResultController extends BaseController {
@Autowired @Autowired
private ITdCheckService tdCheckService; private ITdCheckService tdCheckService;
@Resource
private SysAreaManager sysAreaManager;
@RequiresPermissions("system:checkresult:view") @RequiresPermissions("system:checkresult:view")
@GetMapping() @GetMapping()
public String checkresult() public String checkresult()
@ -54,6 +59,10 @@ public class TdCheckResultController extends BaseController {
public AjaxResult export(TdCheck tdCheck) public AjaxResult export(TdCheck tdCheck)
{ {
List<TdCheck> list = tdCheckService.selectTdCheckList(tdCheck); List<TdCheck> list = tdCheckService.selectTdCheckList(tdCheck);
list.forEach(tdCheck1 -> {
tdCheck1.setFramework(sysAreaManager.getAreaName(tdCheck1.getFramework()));
tdCheck1.setArea(sysAreaManager.getAreaName(tdCheck1.getArea()));
});
ExcelUtil<TdCheck> util = new ExcelUtil<TdCheck>(TdCheck.class); ExcelUtil<TdCheck> util = new ExcelUtil<TdCheck>(TdCheck.class);
return util.exportExcel(list, "检查结果管理数据"); return util.exportExcel(list, "检查结果管理数据");
} }

@ -1,6 +1,8 @@
package com.ruoyi.web.controller.system.check; package com.ruoyi.web.controller.system.check;
import java.util.List; import java.util.List;
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;
@ -19,6 +21,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
* *
@ -34,6 +38,9 @@ public class TdNotifyController extends BaseController
@Autowired @Autowired
private ITdNotifyService tdNotifyService; private ITdNotifyService tdNotifyService;
@Resource
private SysAreaManager sysAreaManager;
@RequiresPermissions("system:notify:view") @RequiresPermissions("system:notify:view")
@GetMapping() @GetMapping()
public String notice() public String notice()
@ -64,6 +71,10 @@ public class TdNotifyController extends BaseController
public AjaxResult export(TdNotify tdNotify) public AjaxResult export(TdNotify tdNotify)
{ {
List<TdNotify> list = tdNotifyService.selectTdNotifyList(tdNotify); List<TdNotify> list = tdNotifyService.selectTdNotifyList(tdNotify);
list.forEach(tdNotify1 -> {
tdNotify1.setFramework(sysAreaManager.getAreaName(tdNotify1.getFramework()));
tdNotify1.setArea(sysAreaManager.getAreaName(tdNotify1.getArea()));
});
ExcelUtil<TdNotify> util = new ExcelUtil<TdNotify>(TdNotify.class); ExcelUtil<TdNotify> util = new ExcelUtil<TdNotify>(TdNotify.class);
return util.exportExcel(list, "检查通知数据"); return util.exportExcel(list, "检查通知数据");
} }

@ -62,14 +62,15 @@ public class TdCheck extends BaseEntity
@Excel(name = "部门结果") @Excel(name = "部门结果")
private String departreault; private String departreault;
/** 地区 */
@Excel(name = "地区")
private String area;
/** 市州 */ /** 市州 */
@Excel(name = "市州") @Excel(name = "所属市州")
private String framework; private String framework;
/** 地区 */
@Excel(name = "所属区县")
private String area;
/** 检查状态 */ /** 检查状态 */
@Excel(name = "检查状态", readConverterExp = "0=通过,1=未通过,2=待检查") @Excel(name = "检查状态", readConverterExp = "0=通过,1=未通过,2=待检查")
private String checkState; private String checkState;

@ -46,11 +46,11 @@ public class TdNotify extends BaseEntity
private String notifyState; private String notifyState;
/** 市州 */ /** 市州 */
@Excel(name = "市州") @Excel(name = "所属市州")
private String framework; private String framework;
/** 地区 */ /** 地区 */
@Excel(name = "地区") @Excel(name = "所属地区")
private String area; private String area;
public void setNotifyId(Long notifyId) public void setNotifyId(Long notifyId)

Loading…
Cancel
Save