org.jeecg.modules.system.vo.SysDictPage Java Examples
The following examples show how to use
org.jeecg.modules.system.vo.SysDictPage.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: SysDictController.java From jeecg-cloud with Apache License 2.0 | 5 votes |
/** * 导出excel * * @param request */ @RequestMapping(value = "/exportXls") public ModelAndView exportXls(SysDict sysDict,HttpServletRequest request) { // Step.1 组装查询条件 QueryWrapper<SysDict> queryWrapper = QueryGenerator.initQueryWrapper(sysDict, request.getParameterMap()); //Step.2 AutoPoi 导出Excel ModelAndView mv = new ModelAndView(new JeecgEntityExcelView()); List<SysDictPage> pageList = new ArrayList<SysDictPage>(); List<SysDict> sysDictList = sysDictService.list(queryWrapper); for (SysDict dictMain : sysDictList) { SysDictPage vo = new SysDictPage(); BeanUtils.copyProperties(dictMain, vo); // 查询机票 List<SysDictItem> sysDictItemList = sysDictItemService.selectItemsByMainId(dictMain.getId()); vo.setSysDictItemList(sysDictItemList); pageList.add(vo); } // 导出文件名称 mv.addObject(NormalExcelConstants.FILE_NAME, "数据字典"); // 注解对象Class mv.addObject(NormalExcelConstants.CLASS, SysDictPage.class); // 自定义表格参数 LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal(); mv.addObject(NormalExcelConstants.PARAMS, new ExportParams("数据字典列表", "导出人:"+user.getRealname(), "数据字典")); // 导出数据列表 mv.addObject(NormalExcelConstants.DATA_LIST, pageList); return mv; }
Example #2
Source File: SysDictController.java From jeecg-boot-with-activiti with MIT License | 5 votes |
/** * 导出excel * * @param request * @param response */ @RequestMapping(value = "/exportXls") public ModelAndView exportXls(SysDict sysDict,HttpServletRequest request) { // Step.1 组装查询条件 QueryWrapper<SysDict> queryWrapper = QueryGenerator.initQueryWrapper(sysDict, request.getParameterMap()); //Step.2 AutoPoi 导出Excel ModelAndView mv = new ModelAndView(new JeecgEntityExcelView()); List<SysDictPage> pageList = new ArrayList<SysDictPage>(); List<SysDict> sysDictList = sysDictService.list(queryWrapper); for (SysDict dictMain : sysDictList) { SysDictPage vo = new SysDictPage(); BeanUtils.copyProperties(dictMain, vo); // 查询机票 List<SysDictItem> sysDictItemList = sysDictItemService.selectItemsByMainId(dictMain.getId()); vo.setSysDictItemList(sysDictItemList); pageList.add(vo); } // 导出文件名称 mv.addObject(NormalExcelConstants.FILE_NAME, "数据字典"); // 注解对象Class mv.addObject(NormalExcelConstants.CLASS, SysDictPage.class); // 自定义表格参数 LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal(); mv.addObject(NormalExcelConstants.PARAMS, new ExportParams("数据字典列表", "导出人:"+user.getRealname(), "数据字典")); // 导出数据列表 mv.addObject(NormalExcelConstants.DATA_LIST, pageList); return mv; }
Example #3
Source File: SysDictController.java From teaching with Apache License 2.0 | 5 votes |
/** * 导出excel * * @param request */ @RequestMapping(value = "/exportXls") public ModelAndView exportXls(SysDict sysDict,HttpServletRequest request) { // Step.1 组装查询条件 QueryWrapper<SysDict> queryWrapper = QueryGenerator.initQueryWrapper(sysDict, request.getParameterMap()); //Step.2 AutoPoi 导出Excel ModelAndView mv = new ModelAndView(new JeecgEntityExcelView()); List<SysDictPage> pageList = new ArrayList<SysDictPage>(); List<SysDict> sysDictList = sysDictService.list(queryWrapper); for (SysDict dictMain : sysDictList) { SysDictPage vo = new SysDictPage(); BeanUtils.copyProperties(dictMain, vo); // 查询机票 List<SysDictItem> sysDictItemList = sysDictItemService.selectItemsByMainId(dictMain.getId()); vo.setSysDictItemList(sysDictItemList); pageList.add(vo); } // 导出文件名称 mv.addObject(NormalExcelConstants.FILE_NAME, "数据字典"); // 注解对象Class mv.addObject(NormalExcelConstants.CLASS, SysDictPage.class); // 自定义表格参数 LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal(); mv.addObject(NormalExcelConstants.PARAMS, new ExportParams("数据字典列表", "导出人:"+user.getRealname(), "数据字典")); // 导出数据列表 mv.addObject(NormalExcelConstants.DATA_LIST, pageList); return mv; }
Example #4
Source File: SysDictController.java From jeecg-boot with Apache License 2.0 | 5 votes |
/** * 导出excel * * @param request */ @RequestMapping(value = "/exportXls") public ModelAndView exportXls(SysDict sysDict,HttpServletRequest request) { // Step.1 组装查询条件 QueryWrapper<SysDict> queryWrapper = QueryGenerator.initQueryWrapper(sysDict, request.getParameterMap()); //Step.2 AutoPoi 导出Excel ModelAndView mv = new ModelAndView(new JeecgEntityExcelView()); List<SysDictPage> pageList = new ArrayList<SysDictPage>(); List<SysDict> sysDictList = sysDictService.list(queryWrapper); for (SysDict dictMain : sysDictList) { SysDictPage vo = new SysDictPage(); BeanUtils.copyProperties(dictMain, vo); // 查询机票 List<SysDictItem> sysDictItemList = sysDictItemService.selectItemsByMainId(dictMain.getId()); vo.setSysDictItemList(sysDictItemList); pageList.add(vo); } // 导出文件名称 mv.addObject(NormalExcelConstants.FILE_NAME, "数据字典"); // 注解对象Class mv.addObject(NormalExcelConstants.CLASS, SysDictPage.class); // 自定义表格参数 LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal(); mv.addObject(NormalExcelConstants.PARAMS, new ExportParams("数据字典列表", "导出人:"+user.getRealname(), "数据字典")); // 导出数据列表 mv.addObject(NormalExcelConstants.DATA_LIST, pageList); return mv; }