修改导出导入excel类型

This commit is contained in:
梁琦涛
2024-10-08 11:59:02 +08:00
parent 5d3a7fda8a
commit 4049bfea09
2 changed files with 3 additions and 1 deletions
@@ -286,7 +286,7 @@ public class LawsPartRelevanceServiceImpl extends ServiceImpl<LawsPartRelevanceM
mv.addObject(JeroController.CLASS, LawsPartRelevance.class);
//update-begin--Author:liusq Date:20210126 for:图片导出报错,ImageBasePath未设置--------------------
ExportParams exportParams=new ExportParams(null, "关键零部件绑定关系管理");
exportParams.setType(ExcelType.XSSF);
exportParams.setType(ExcelType.HSSF);
//update-end--Author:liusq Date:20210126 for:图片导出报错,ImageBasePath未设置----------------------
mv.addObject(JeroController.PARAMS,exportParams);
mv.addObject(NormalExcelConstants.DATA_LIST, new ArrayList<>());
@@ -24,6 +24,7 @@ import lombok.extern.slf4j.Slf4j;
import org.apache.shiro.SecurityUtils;
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
import org.jeecgframework.poi.excel.entity.ExportParams;
import org.jeecgframework.poi.excel.entity.enmus.ExcelType;
import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
import org.springframework.context.i18n.LocaleContextHolder;
import org.springframework.stereotype.Service;
@@ -180,6 +181,7 @@ public class LawsPartTypeServiceImpl extends ServiceImpl<LawsPartTypeMapper, Law
mv.addObject(JeroController.FILE_NAME, "关键零部件型号库");
mv.addObject(JeroController.CLASS, LawsPartType.class);
ExportParams exportParams = new ExportParams("密级:核心商密□普通商密□内部资料■外部公开□", "关键零部件型号库");
exportParams.setType(ExcelType.HSSF);
// 导出xls
mv.addObject(JeroController.PARAMS, exportParams);
mv.addObject(NormalExcelConstants.DATA_LIST, re);