From cb5c22b79f0b34276c1d8d64c09b4c2d194e6afd Mon Sep 17 00:00:00 2001 From: wangxy <1356089412@qq.com> Date: Thu, 11 Jul 2024 16:58:33 +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 --- .../controller/system/system/TdTrainController.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/system/TdTrainController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/system/TdTrainController.java index e543ba0..c0044b4 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/system/TdTrainController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/system/TdTrainController.java @@ -4,6 +4,7 @@ import java.util.Date; import java.util.List; import com.ruoyi.common.core.domain.entity.SysUser; +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; @@ -22,6 +23,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 * @@ -37,6 +40,9 @@ public class TdTrainController extends BaseController @Autowired private ITdTrainService tdTrainService; + @Resource + private SysAreaManager sysAreaManager; + @RequiresPermissions("system:train:view") @GetMapping() public String train() @@ -67,6 +73,10 @@ public class TdTrainController extends BaseController public AjaxResult export(TdTrain tdTrain) { List list = tdTrainService.selectTdTrainList(tdTrain); + list.forEach(tdTrain1 -> { + tdTrain1.setAREAID(sysAreaManager.getAreaName(tdTrain1.getAREAID())); + tdTrain1.setFRAMEWORK(sysAreaManager.getAreaName(tdTrain1.getFRAMEWORK())); + }); ExcelUtil util = new ExcelUtil(TdTrain.class); return util.exportExcel(list, "涉密人员培训数据"); }