org.jeecgframework.poi.excel.entity.vo.NormalExcelConstants Java Examples
The following examples show how to use
org.jeecgframework.poi.excel.entity.vo.NormalExcelConstants.
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: JeecgTemplateExcelView.java From jeasypoi with Apache License 2.0 | 6 votes |
@Override protected void renderMergedOutputModel(Map<String, Object> model, HttpServletRequest request, HttpServletResponse response) throws Exception { String codedFileName = "临时文件"; Workbook workbook = ExcelExportUtil.exportExcel((TemplateExportParams) model.get(TemplateExcelConstants.PARAMS), (Class<?>) model.get(TemplateExcelConstants.CLASS), (List<?>) model.get(TemplateExcelConstants.LIST_DATA), (Map<String, Object>) model.get(TemplateExcelConstants.MAP_DATA)); if (model.containsKey(NormalExcelConstants.FILE_NAME)) { codedFileName = (String) model.get(NormalExcelConstants.FILE_NAME); } if (workbook instanceof HSSFWorkbook) { codedFileName += HSSF; } else { codedFileName += XSSF; } if (isIE(request)) { codedFileName = java.net.URLEncoder.encode(codedFileName, "UTF8"); } else { codedFileName = new String(codedFileName.getBytes("UTF-8"), "ISO-8859-1"); } response.setHeader("content-disposition", "attachment;filename=" + codedFileName); ServletOutputStream out = response.getOutputStream(); workbook.write(out); out.flush(); }
Example #2
Source File: JformGraphreportHeadController.java From jeecg with Apache License 2.0 | 6 votes |
@RequestMapping(params = "exportXls") public String exportXls(JformGraphreportHeadEntity jformGraphreportHead,HttpServletRequest request,HttpServletResponse response , DataGrid dataGrid,ModelMap map) { CriteriaQuery cq = new CriteriaQuery(JformGraphreportHeadEntity.class, dataGrid); //查询条件组装器 org.jeecgframework.core.extend.hqlsearch.HqlGenerateUtil.installHql(cq, jformGraphreportHead); List<JformGraphreportHeadEntity> dataList= this.jformGraphreportHeadService.getListByCriteriaQuery(cq,false); List<JformGraphreportHeadPage> pageList=new ArrayList<JformGraphreportHeadPage>(); if(dataList!=null&&dataList.size()>0){ String hql0 = "from JformGraphreportItemEntity where 1 = 1 AND cGREPORT_HEAD_ID = ? "; for(JformGraphreportHeadEntity headEntity:dataList){ List<JformGraphreportItemEntity> itemEntities = systemService.findHql(hql0,headEntity.getId()); pageList.add(new JformGraphreportHeadPage(itemEntities,headEntity)); } } map.put(NormalExcelConstants.FILE_NAME,"图表配置"); map.put(NormalExcelConstants.CLASS,JformGraphreportHeadPage.class); map.put(NormalExcelConstants.PARAMS,new ExportParams("图表配置","导出信息")); map.put(NormalExcelConstants.DATA_LIST, pageList); return NormalExcelConstants.JEECG_EXCEL_VIEW; }
Example #3
Source File: JformOrderTicket2Controller.java From jeecg with Apache License 2.0 | 5 votes |
/** * 导出excel * * @param request * @param response */ @RequestMapping(params = "exportXls") public String exportXls(JformOrderTicket2Entity jformOrderTicket2,HttpServletRequest request,HttpServletResponse response , DataGrid dataGrid,ModelMap modelMap) { CriteriaQuery cq = new CriteriaQuery(JformOrderTicket2Entity.class, dataGrid); org.jeecgframework.core.extend.hqlsearch.HqlGenerateUtil.installHql(cq, jformOrderTicket2, request.getParameterMap()); List<JformOrderTicket2Entity> jformOrderTicket2s = this.jformOrderMain2Service.getListByCriteriaQuery(cq,false); modelMap.put(NormalExcelConstants.FILE_NAME,"订单机票信息"); modelMap.put(NormalExcelConstants.CLASS,JformOrderTicket2Entity.class); modelMap.put(NormalExcelConstants.PARAMS,new ExportParams("订单机票信息列表", "导出人:"+ResourceUtil.getSessionUser().getRealName(), "导出信息")); modelMap.put(NormalExcelConstants.DATA_LIST,jformOrderTicket2s); return NormalExcelConstants.JEECG_EXCEL_VIEW; }
Example #4
Source File: RoleController.java From jeecg with Apache License 2.0 | 5 votes |
/** * 导出excel * * @param request * @param response */ @RequestMapping(params = "exportXls") public String exportXls(TSRole tsRole,HttpServletRequest request,HttpServletResponse response , DataGrid dataGrid,ModelMap modelMap) { tsRole.setRoleName(null); CriteriaQuery cq = new CriteriaQuery(TSRole.class, dataGrid); org.jeecgframework.core.extend.hqlsearch.HqlGenerateUtil.installHql(cq, tsRole, request.getParameterMap()); List<TSRole> tsRoles = systemService.getListByCriteriaQuery(cq,false); modelMap.put(NormalExcelConstants.FILE_NAME,"角色表"); modelMap.put(NormalExcelConstants.CLASS,TSRole.class); modelMap.put(NormalExcelConstants.PARAMS,new ExportParams("角色表列表", "导出人:"+ResourceUtil.getSessionUser().getRealName(), "导出信息")); modelMap.put(NormalExcelConstants.DATA_LIST,tsRoles); return NormalExcelConstants.JEECG_EXCEL_VIEW; }
Example #5
Source File: RoleController.java From jeecg with Apache License 2.0 | 5 votes |
/** * 导出excel 使模板 * * @param request * @param response */ @RequestMapping(params = "exportXlsByT") public String exportXlsByT(TSRole tsRole,HttpServletRequest request,HttpServletResponse response , DataGrid dataGrid,ModelMap modelMap) { modelMap.put(NormalExcelConstants.FILE_NAME,"用户表"); modelMap.put(NormalExcelConstants.CLASS,TSRole.class); modelMap.put(NormalExcelConstants.PARAMS,new ExportParams("用户表列表", "导出人:"+ResourceUtil.getSessionUser().getRealName(), "导出信息")); modelMap.put(NormalExcelConstants.DATA_LIST,new ArrayList()); return NormalExcelConstants.JEECG_EXCEL_VIEW; }
Example #6
Source File: TSCompanyPositionController.java From jeecg with Apache License 2.0 | 5 votes |
/** * 导出excel * * @param request * @param response */ @RequestMapping(params = "exportXls") public String exportXls(TSCompanyPositionEntity tSCompanyPosition,HttpServletRequest request,HttpServletResponse response , DataGrid dataGrid,ModelMap modelMap) { CriteriaQuery cq = new CriteriaQuery(TSCompanyPositionEntity.class, dataGrid); org.jeecgframework.core.extend.hqlsearch.HqlGenerateUtil.installHql(cq, tSCompanyPosition, request.getParameterMap()); List<TSCompanyPositionEntity> tSCompanyPositions = this.tSCompanyPositionService.getListByCriteriaQuery(cq,false); modelMap.put(NormalExcelConstants.FILE_NAME,"职务管理"); modelMap.put(NormalExcelConstants.CLASS,TSCompanyPositionEntity.class); modelMap.put(NormalExcelConstants.PARAMS,new ExportParams("职务管理列表", "导出人:"+ResourceUtil.getSessionUser().getRealName(), "导出信息")); modelMap.put(NormalExcelConstants.DATA_LIST,tSCompanyPositions); return NormalExcelConstants.JEECG_EXCEL_VIEW; }
Example #7
Source File: TSCompanyPositionController.java From jeecg with Apache License 2.0 | 5 votes |
/** * 导出excel 使模板 * * @param request * @param response */ @RequestMapping(params = "exportXlsByT") public String exportXlsByT(TSCompanyPositionEntity tSCompanyPosition,HttpServletRequest request,HttpServletResponse response , DataGrid dataGrid,ModelMap modelMap) { modelMap.put(NormalExcelConstants.FILE_NAME,"职务管理"); modelMap.put(NormalExcelConstants.CLASS,TSCompanyPositionEntity.class); modelMap.put(NormalExcelConstants.PARAMS,new ExportParams("职务管理列表", "导出人:"+ResourceUtil.getSessionUser().getRealName(), "导出信息")); modelMap.put(NormalExcelConstants.DATA_LIST,new ArrayList()); return NormalExcelConstants.JEECG_EXCEL_VIEW; }
Example #8
Source File: JfromOrderController.java From jeecg with Apache License 2.0 | 5 votes |
/** * 导出excel 使模板 */ @RequestMapping(params = "exportXlsByT") public String exportXlsByT(ModelMap map) { map.put(NormalExcelConstants.FILE_NAME,"订单列表"); map.put(NormalExcelConstants.CLASS,JfromOrderPage.class); map.put(NormalExcelConstants.PARAMS,new ExportParams("订单列表列表", "导出人:"+ ResourceUtil.getSessionUser().getRealName(), "导出信息")); map.put(NormalExcelConstants.DATA_LIST,new ArrayList()); return NormalExcelConstants.JEECG_EXCEL_VIEW; }
Example #9
Source File: MultiUploadController.java From jeecg with Apache License 2.0 | 5 votes |
/** * 导出excel * * @param request * @param response */ @RequestMapping(params = "exportXls") public String exportXls(MultiUploadEntity multiUpload,HttpServletRequest request,HttpServletResponse response , DataGrid dataGrid,ModelMap modelMap) { CriteriaQuery cq = new CriteriaQuery(MultiUploadEntity.class, dataGrid); org.jeecgframework.core.extend.hqlsearch.HqlGenerateUtil.installHql(cq, multiUpload, request.getParameterMap()); List<MultiUploadEntity> multiUploads = this.multiUploadService.getListByCriteriaQuery(cq,false); modelMap.put(NormalExcelConstants.FILE_NAME,"测试多文件上传"); modelMap.put(NormalExcelConstants.CLASS,MultiUploadEntity.class); modelMap.put(NormalExcelConstants.PARAMS,new ExportParams("测试多文件上传列表", "导出人:"+ResourceUtil.getSessionUser().getRealName(), "导出信息")); modelMap.put(NormalExcelConstants.DATA_LIST,multiUploads); return NormalExcelConstants.JEECG_EXCEL_VIEW; }
Example #10
Source File: MultiUploadController.java From jeecg with Apache License 2.0 | 5 votes |
/** * 导出excel 使模板 * * @param request * @param response */ @RequestMapping(params = "exportXlsByT") public String exportXlsByT(MultiUploadEntity multiUpload,HttpServletRequest request,HttpServletResponse response , DataGrid dataGrid,ModelMap modelMap) { modelMap.put(NormalExcelConstants.FILE_NAME,"测试多文件上传"); modelMap.put(NormalExcelConstants.CLASS,MultiUploadEntity.class); modelMap.put(NormalExcelConstants.PARAMS,new ExportParams("测试多文件上传列表", "导出人:"+ResourceUtil.getSessionUser().getRealName(), "导出信息")); modelMap.put(NormalExcelConstants.DATA_LIST,new ArrayList()); return NormalExcelConstants.JEECG_EXCEL_VIEW; }
Example #11
Source File: TSDictTableConfigController.java From jeecg with Apache License 2.0 | 5 votes |
/** * 导出excel * * @param request * @param response */ @RequestMapping(params = "exportXls") public String exportXls(TSDictTableConfigEntity tSDictTableConfig,HttpServletRequest request,HttpServletResponse response , DataGrid dataGrid,ModelMap modelMap) { CriteriaQuery cq = new CriteriaQuery(TSDictTableConfigEntity.class, dataGrid); org.jeecgframework.core.extend.hqlsearch.HqlGenerateUtil.installHql(cq, tSDictTableConfig, request.getParameterMap()); List<TSDictTableConfigEntity> tSDictTableConfigs = this.tSDictTableConfigService.getListByCriteriaQuery(cq,false); modelMap.put(NormalExcelConstants.FILE_NAME,"字典表授权配置"); modelMap.put(NormalExcelConstants.CLASS,TSDictTableConfigEntity.class); modelMap.put(NormalExcelConstants.PARAMS,new ExportParams("字典表授权配置列表", "导出人:"+ResourceUtil.getSessionUser().getRealName(), "导出信息")); modelMap.put(NormalExcelConstants.DATA_LIST,tSDictTableConfigs); return NormalExcelConstants.JEECG_EXCEL_VIEW; }
Example #12
Source File: JformOrderTicket2Controller.java From jeecg with Apache License 2.0 | 5 votes |
/** * 导出excel 使模板 * * @param request * @param response */ @RequestMapping(params = "exportXlsByT") public String exportXlsByT(JformOrderTicket2Entity jformOrderTicket2,HttpServletRequest request,HttpServletResponse response , DataGrid dataGrid,ModelMap modelMap) { modelMap.put(NormalExcelConstants.FILE_NAME,"订单机票信息"); modelMap.put(NormalExcelConstants.CLASS,JformOrderTicket2Entity.class); modelMap.put(NormalExcelConstants.PARAMS,new ExportParams("订单机票信息列表", "导出人:"+ResourceUtil.getSessionUser().getRealName(), "导出信息")); modelMap.put(NormalExcelConstants.DATA_LIST,new ArrayList()); return NormalExcelConstants.JEECG_EXCEL_VIEW; }
Example #13
Source File: JformOrderMain2Controller.java From jeecg with Apache License 2.0 | 5 votes |
/** * 导出excel 使模板 */ @RequestMapping(params = "exportXlsByT") public String exportXlsByT(ModelMap map) { map.put(NormalExcelConstants.FILE_NAME,"订单主信息"); map.put(NormalExcelConstants.CLASS,JformOrderMain2Page.class); map.put(NormalExcelConstants.PARAMS,new ExportParams("订单主信息列表", "导出人:"+ ResourceUtil.getSessionUser().getRealName(), "导出信息")); map.put(NormalExcelConstants.DATA_LIST,new ArrayList()); return NormalExcelConstants.JEECG_EXCEL_VIEW; }
Example #14
Source File: JeecgDemoExcelController.java From jeecg with Apache License 2.0 | 5 votes |
/** * 导出excel * * @param request * @param response */ @RequestMapping(params = "exportXls") public String exportXls(JeecgDemoExcelEntity jeecgDemoExcel,HttpServletRequest request,HttpServletResponse response , DataGrid dataGrid,ModelMap modelMap) { CriteriaQuery cq = new CriteriaQuery(JeecgDemoExcelEntity.class, dataGrid); org.jeecgframework.core.extend.hqlsearch.HqlGenerateUtil.installHql(cq, jeecgDemoExcel, request.getParameterMap()); List<JeecgDemoExcelEntity> jeecgDemoExcels = this.jeecgDemoExcelService.getListByCriteriaQuery(cq,false); modelMap.put(NormalExcelConstants.FILE_NAME,"excel导入导出测试表"); modelMap.put(NormalExcelConstants.CLASS,JeecgDemoExcelEntity.class); modelMap.put(NormalExcelConstants.PARAMS,new ExportParams("excel导入导出测试表列表", "导出人:"+ResourceUtil.getSessionUser().getRealName(), "导出信息")); modelMap.put(NormalExcelConstants.DATA_LIST,jeecgDemoExcels); return NormalExcelConstants.JEECG_EXCEL_VIEW; }
Example #15
Source File: JeecgDemoExcelController.java From jeecg with Apache License 2.0 | 5 votes |
/** * 导出excel 使模板 * * @param request * @param response */ @RequestMapping(params = "exportXlsByT") public String exportXlsByT(JeecgDemoExcelEntity jeecgDemoExcel,HttpServletRequest request,HttpServletResponse response , DataGrid dataGrid,ModelMap modelMap) { modelMap.put(NormalExcelConstants.FILE_NAME,"excel导入导出测试表"); modelMap.put(NormalExcelConstants.CLASS,JeecgDemoExcelEntity.class); modelMap.put(NormalExcelConstants.PARAMS,new ExportParams("excel导入导出测试表列表", "导出人:"+ResourceUtil.getSessionUser().getRealName(), "导出信息")); modelMap.put(NormalExcelConstants.DATA_LIST,new ArrayList()); return NormalExcelConstants.JEECG_EXCEL_VIEW; }
Example #16
Source File: JformOrderCustomer2Controller.java From jeecg with Apache License 2.0 | 5 votes |
/** * 导出excel * * @param request * @param response */ @RequestMapping(params = "exportXls") public String exportXls(JformOrderCustomer2Entity jformOrderCustomer2,HttpServletRequest request,HttpServletResponse response , DataGrid dataGrid,ModelMap modelMap) { CriteriaQuery cq = new CriteriaQuery(JformOrderCustomer2Entity.class, dataGrid); org.jeecgframework.core.extend.hqlsearch.HqlGenerateUtil.installHql(cq, jformOrderCustomer2, request.getParameterMap()); List<JformOrderCustomer2Entity> jformOrderCustomer2s = this.jformOrderMain2Service.getListByCriteriaQuery(cq,false); modelMap.put(NormalExcelConstants.FILE_NAME,"订单客户信息"); modelMap.put(NormalExcelConstants.CLASS,JformOrderCustomer2Entity.class); modelMap.put(NormalExcelConstants.PARAMS,new ExportParams("订单客户信息列表", "导出人:"+ResourceUtil.getSessionUser().getRealName(), "导出信息")); modelMap.put(NormalExcelConstants.DATA_LIST,jformOrderCustomer2s); return NormalExcelConstants.JEECG_EXCEL_VIEW; }
Example #17
Source File: JformOrderCustomer2Controller.java From jeecg with Apache License 2.0 | 5 votes |
/** * 导出excel 使模板 * * @param request * @param response */ @RequestMapping(params = "exportXlsByT") public String exportXlsByT(JformOrderCustomer2Entity jformOrderCustomer2,HttpServletRequest request,HttpServletResponse response , DataGrid dataGrid,ModelMap modelMap) { modelMap.put(NormalExcelConstants.FILE_NAME,"订单客户信息"); modelMap.put(NormalExcelConstants.CLASS,JformOrderCustomer2Entity.class); modelMap.put(NormalExcelConstants.PARAMS,new ExportParams("订单客户信息列表", "导出人:"+ResourceUtil.getSessionUser().getRealName(), "导出信息")); modelMap.put(NormalExcelConstants.DATA_LIST,new ArrayList()); return NormalExcelConstants.JEECG_EXCEL_VIEW; }
Example #18
Source File: JformOrderMainController.java From jeecg with Apache License 2.0 | 5 votes |
/** * 导出excel 使模板 */ @RequestMapping(params = "exportXlsByT") public String exportXlsByT(ModelMap map) { map.put(NormalExcelConstants.FILE_NAME,"订单主信息"); map.put(NormalExcelConstants.CLASS,JformOrderMainPage.class); map.put(NormalExcelConstants.PARAMS,new ExportParams("订单主信息列表", "导出人:"+ ResourceUtil.getSessionUser().getRealName(), "导出信息")); map.put(NormalExcelConstants.DATA_LIST,new ArrayList()); return NormalExcelConstants.JEECG_EXCEL_VIEW; }
Example #19
Source File: JeecgListDemoController.java From jeecg with Apache License 2.0 | 5 votes |
/** * 导出excel * * @param request * @param response */ @RequestMapping(params = "exportXls") public String exportXls(JeecgDemoEntity jeecgDemo,HttpServletRequest request,HttpServletResponse response , DataGrid dataGrid,ModelMap modelMap) { CriteriaQuery cq = new CriteriaQuery(JeecgDemoEntity.class, dataGrid); org.jeecgframework.core.extend.hqlsearch.HqlGenerateUtil.installHql(cq, jeecgDemo, request.getParameterMap()); List<JeecgDemoEntity> jeecgDemos = this.jeecgDemoService.getListByCriteriaQuery(cq,false); modelMap.put(NormalExcelConstants.FILE_NAME,"jeecg_demo"); modelMap.put(NormalExcelConstants.CLASS,JeecgDemoEntity.class); modelMap.put(NormalExcelConstants.PARAMS,new ExportParams("jeecg_demo列表", "导出人:"+ResourceUtil.getSessionUser().getRealName(),"导出信息")); modelMap.put(NormalExcelConstants.DATA_LIST,jeecgDemos); return NormalExcelConstants.JEECG_EXCEL_VIEW; }
Example #20
Source File: JeecgListDemoController.java From jeecg with Apache License 2.0 | 5 votes |
/** * 导出excel 使模板 * * @param request * @param response */ @RequestMapping(params = "exportXlsByT") public String exportXlsByT(JeecgDemoEntity jeecgDemo,HttpServletRequest request,HttpServletResponse response , DataGrid dataGrid,ModelMap modelMap) { modelMap.put(NormalExcelConstants.FILE_NAME,"jeecg_demo"); modelMap.put(NormalExcelConstants.CLASS,JeecgDemoEntity.class); modelMap.put(NormalExcelConstants.PARAMS,new ExportParams("jeecg_demo列表", "导出人:"+ResourceUtil.getSessionUser().getRealName(), "导出信息")); modelMap.put(NormalExcelConstants.DATA_LIST,new ArrayList()); return NormalExcelConstants.JEECG_EXCEL_VIEW; }
Example #21
Source File: TSFillRuleController.java From jeecg with Apache License 2.0 | 5 votes |
/** * 导出excel 使模板 * * @param request * @param response */ @RequestMapping(params = "exportXlsByT") public String exportXlsByT(TSFillRuleEntity tSFillRule,HttpServletRequest request,HttpServletResponse response , DataGrid dataGrid,ModelMap modelMap) { modelMap.put(NormalExcelConstants.FILE_NAME,"填值规则表"); modelMap.put(NormalExcelConstants.CLASS,TSFillRuleEntity.class); modelMap.put(NormalExcelConstants.PARAMS,new ExportParams("填值规则表列表", "导出人:"+ResourceUtil.getSessionUser().getRealName(), "导出信息")); modelMap.put(NormalExcelConstants.DATA_LIST,new ArrayList()); return NormalExcelConstants.JEECG_EXCEL_VIEW; }
Example #22
Source File: JeecgSingleExcelView.java From jeasypoi with Apache License 2.0 | 5 votes |
@Override protected void renderMergedOutputModel(Map<String, Object> model, HttpServletRequest request, HttpServletResponse response) throws Exception { String codedFileName = "临时文件"; Workbook workbook = null; if (model.containsKey(NormalExcelConstants.MAP_LIST)) { List<Map<String, Object>> list = (List<Map<String, Object>>) model.get(NormalExcelConstants.MAP_LIST); if (list.size() == 0) { throw new RuntimeException("MAP_LIST IS NULL"); } workbook = ExcelExportUtil.exportExcel((ExportParams) list.get(0).get(NormalExcelConstants.PARAMS), (Class<?>) list.get(0).get(NormalExcelConstants.CLASS), (Collection<?>) list.get(0).get(NormalExcelConstants.DATA_LIST)); for (int i = 1; i < list.size(); i++) { new ExcelExportServer().createSheet(workbook, (ExportParams) list.get(i).get(NormalExcelConstants.PARAMS), (Class<?>) list.get(i).get(NormalExcelConstants.CLASS), (Collection<?>) list.get(i).get(NormalExcelConstants.DATA_LIST)); } } else { workbook = ExcelExportUtil.exportExcel((ExportParams) model.get(NormalExcelConstants.PARAMS), (Class<?>) model.get(NormalExcelConstants.CLASS), (Collection<?>) model.get(NormalExcelConstants.DATA_LIST)); } if (model.containsKey(NormalExcelConstants.FILE_NAME)) { codedFileName = (String) model.get(NormalExcelConstants.FILE_NAME); } if (workbook instanceof HSSFWorkbook) { codedFileName += HSSF; } else { codedFileName += XSSF; } if (isIE(request)) { codedFileName = java.net.URLEncoder.encode(codedFileName, "UTF8"); } else { codedFileName = new String(codedFileName.getBytes("UTF-8"), "ISO-8859-1"); } response.setHeader("content-disposition", "attachment;filename=" + codedFileName); ServletOutputStream out = response.getOutputStream(); workbook.write(out); out.flush(); }
Example #23
Source File: JeecgTemplateExcelView.java From easypoi with Apache License 2.0 | 5 votes |
@Override protected void renderMergedOutputModel(Map<String, Object> model, HttpServletRequest request, HttpServletResponse response) throws Exception { String codedFileName = "临时文件"; Workbook workbook = ExcelExportUtil.exportExcel( (TemplateExportParams) model.get(TemplateExcelConstants.PARAMS), (Class<?>) model.get(TemplateExcelConstants.CLASS), (List<?>) model.get(TemplateExcelConstants.LIST_DATA), (Map<String, Object>) model.get(TemplateExcelConstants.MAP_DATA)); if (model.containsKey(NormalExcelConstants.FILE_NAME)) { codedFileName = (String) model.get(NormalExcelConstants.FILE_NAME); } if (workbook instanceof HSSFWorkbook) { codedFileName += HSSF; } else { codedFileName += XSSF; } if (isIE(request)) { codedFileName = java.net.URLEncoder.encode(codedFileName, "UTF8"); } else { codedFileName = new String(codedFileName.getBytes("UTF-8"), "ISO-8859-1"); } response.setHeader("content-disposition", "attachment;filename=" + codedFileName); ServletOutputStream out = response.getOutputStream(); workbook.write(out); out.flush(); }
Example #24
Source File: SuperQueryMainController.java From jeecg with Apache License 2.0 | 5 votes |
/** * 导出excel 使模板 */ @SuppressWarnings( "rawtypes" ) @RequestMapping(params = "exportXlsByT") public String exportXlsByT(ModelMap map) { map.put(NormalExcelConstants.FILE_NAME,"高级查询"); map.put(NormalExcelConstants.CLASS,SuperQueryMainPage.class); map.put(NormalExcelConstants.PARAMS,new ExportParams("高级查询列表", "导出人:"+ ResourceUtil.getSessionUser().getRealName(), "导出信息")); map.put(NormalExcelConstants.DATA_LIST,new ArrayList()); return NormalExcelConstants.JEECG_EXCEL_VIEW; }
Example #25
Source File: CgformTemplateController.java From jeecg with Apache License 2.0 | 5 votes |
/** * 导出excel * * @param request * @param response */ @RequestMapping(params = "exportXls") public String exportXls(CgformTemplateEntity cgformTemplate,HttpServletRequest request,HttpServletResponse response , DataGrid dataGrid,ModelMap modelMap) { CriteriaQuery cq = new CriteriaQuery(CgformTemplateEntity.class, dataGrid); org.jeecgframework.core.extend.hqlsearch.HqlGenerateUtil.installHql(cq, cgformTemplate, request.getParameterMap()); List<CgformTemplateEntity> cgformTemplates = this.cgformTemplateService.getListByCriteriaQuery(cq, false); modelMap.put(NormalExcelConstants.FILE_NAME,"自定义模板"); modelMap.put(NormalExcelConstants.CLASS,CgformTemplateEntity.class); modelMap.put(NormalExcelConstants.PARAMS,new ExportParams("自定义模板列表", "导出人:"+ResourceUtil.getSessionUser().getRealName(), "导出信息")); modelMap.put(NormalExcelConstants.DATA_LIST, cgformTemplates); return NormalExcelConstants.JEECG_EXCEL_VIEW; }
Example #26
Source File: CgFormIndexController.java From jeecg with Apache License 2.0 | 5 votes |
/** * 导出excel * * @param request * @param response */ @RequestMapping(params = "exportXls") public String exportXls(CgFormIndexEntity cgFormIndex,HttpServletRequest request,HttpServletResponse response , DataGrid dataGrid,ModelMap modelMap) { CriteriaQuery cq = new CriteriaQuery(CgFormIndexEntity.class, dataGrid); org.jeecgframework.core.extend.hqlsearch.HqlGenerateUtil.installHql(cq, cgFormIndex, request.getParameterMap()); List<CgFormIndexEntity> cgFormIndexs = this.cgFormIndexService.getListByCriteriaQuery(cq,false); modelMap.put(NormalExcelConstants.FILE_NAME,"索引表"); modelMap.put(NormalExcelConstants.CLASS,CgFormIndexEntity.class); modelMap.put(NormalExcelConstants.PARAMS,new ExportParams("索引表列表", "导出人:"+ResourceUtil.getSessionUser().getRealName(), "导出信息")); modelMap.put(NormalExcelConstants.DATA_LIST,cgFormIndexs); return NormalExcelConstants.JEECG_EXCEL_VIEW; }
Example #27
Source File: CgFormIndexController.java From jeecg with Apache License 2.0 | 5 votes |
/** * 导出excel 使模板 * * @param request * @param response */ @RequestMapping(params = "exportXlsByT") public String exportXlsByT(CgFormIndexEntity cgFormIndex,HttpServletRequest request,HttpServletResponse response , DataGrid dataGrid,ModelMap modelMap) { modelMap.put(NormalExcelConstants.FILE_NAME,"索引表"); modelMap.put(NormalExcelConstants.CLASS,CgFormIndexEntity.class); modelMap.put(NormalExcelConstants.PARAMS,new ExportParams("索引表列表", "导出人:"+ResourceUtil.getSessionUser().getRealName(), "导出信息")); modelMap.put(NormalExcelConstants.DATA_LIST,new ArrayList()); return NormalExcelConstants.JEECG_EXCEL_VIEW; }
Example #28
Source File: TSFillRuleController.java From jeecg with Apache License 2.0 | 5 votes |
/** * 导出excel * * @param request * @param response */ @RequestMapping(params = "exportXls") public String exportXls(TSFillRuleEntity tSFillRule,HttpServletRequest request,HttpServletResponse response , DataGrid dataGrid,ModelMap modelMap) { CriteriaQuery cq = new CriteriaQuery(TSFillRuleEntity.class, dataGrid); org.jeecgframework.core.extend.hqlsearch.HqlGenerateUtil.installHql(cq, tSFillRule, request.getParameterMap()); List<TSFillRuleEntity> tSFillRules = this.tSFillRuleService.getListByCriteriaQuery(cq,false); modelMap.put(NormalExcelConstants.FILE_NAME,"填值规则表"); modelMap.put(NormalExcelConstants.CLASS,TSFillRuleEntity.class); modelMap.put(NormalExcelConstants.PARAMS,new ExportParams("填值规则表列表", "导出人:"+ResourceUtil.getSessionUser().getRealName(), "导出信息")); modelMap.put(NormalExcelConstants.DATA_LIST,tSFillRules); return NormalExcelConstants.JEECG_EXCEL_VIEW; }
Example #29
Source File: TSDictTableConfigController.java From jeecg with Apache License 2.0 | 5 votes |
/** * 导出excel 使模板 * * @param request * @param response */ @RequestMapping(params = "exportXlsByT") public String exportXlsByT(TSDictTableConfigEntity tSDictTableConfig,HttpServletRequest request,HttpServletResponse response , DataGrid dataGrid,ModelMap modelMap) { modelMap.put(NormalExcelConstants.FILE_NAME,"字典表授权配置"); modelMap.put(NormalExcelConstants.CLASS,TSDictTableConfigEntity.class); modelMap.put(NormalExcelConstants.PARAMS,new ExportParams("字典表授权配置列表", "导出人:"+ResourceUtil.getSessionUser().getRealName(), "导出信息")); modelMap.put(NormalExcelConstants.DATA_LIST,new ArrayList()); return NormalExcelConstants.JEECG_EXCEL_VIEW; }
Example #30
Source File: TsBlackListController.java From jeecg with Apache License 2.0 | 5 votes |
/** * 导出excel * * @param request * @param response */ @RequestMapping(params = "exportXls") public String exportXls(TsBlackListEntity tsBlackList,HttpServletRequest request,HttpServletResponse response , DataGrid dataGrid,ModelMap modelMap) { CriteriaQuery cq = new CriteriaQuery(TsBlackListEntity.class, dataGrid); org.jeecgframework.core.extend.hqlsearch.HqlGenerateUtil.installHql(cq, tsBlackList, request.getParameterMap()); List<TsBlackListEntity> tsBlackLists = this.tsBlackListService.getListByCriteriaQuery(cq,false); modelMap.put(NormalExcelConstants.FILE_NAME,"黑名单"); modelMap.put(NormalExcelConstants.CLASS,TsBlackListEntity.class); modelMap.put(NormalExcelConstants.PARAMS,new ExportParams("黑名单列表", "导出人:"+ResourceUtil.getSessionUser().getRealName(), "导出信息")); modelMap.put(NormalExcelConstants.DATA_LIST,tsBlackLists); return NormalExcelConstants.JEECG_EXCEL_VIEW; }