feat:导入区划转中文

pg_adapter
wangxy 9 months ago
parent 487841a862
commit cb5c22b79f

@ -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<TdTrain> list = tdTrainService.selectTdTrainList(tdTrain);
list.forEach(tdTrain1 -> {
tdTrain1.setAREAID(sysAreaManager.getAreaName(tdTrain1.getAREAID()));
tdTrain1.setFRAMEWORK(sysAreaManager.getAreaName(tdTrain1.getFRAMEWORK()));
});
ExcelUtil<TdTrain> util = new ExcelUtil<TdTrain>(TdTrain.class);
return util.exportExcel(list, "涉密人员培训数据");
}

Loading…
Cancel
Save