public class ExportCommonService extends Object
Modifier and Type | Field and Description |
---|---|
protected IExcelDataHandler |
dataHandler |
protected IExcelDictHandler |
dictHandler |
protected static org.slf4j.Logger |
LOGGER |
protected List<String> |
needHandlerList |
Constructor and Description |
---|
ExportCommonService() |
Modifier and Type | Method and Description |
---|---|
void |
getAllExcelField(String[] exclusions,
String targetId,
Field[] fields,
List<ExcelExportEntity> excelParams,
Class<?> pojoClass,
List<Method> getMethods,
ExcelEntity excelGroup)
获取需要导出的全部字段
|
Object |
getCellValue(ExcelExportEntity entity,
Object obj)
获取填如这个cell的值,提供一些附加功能
|
Object |
getFieldBySomeMethod(List<Method> list,
Object t)
多个反射获取值
|
int |
getFieldLength(List<ExcelExportEntity> excelParams)
获取导出报表的字段总长度
|
Collection<?> |
getListCellValue(ExcelExportEntity entity,
Object obj)
获取集合的值
|
short |
getRowHeight(List<ExcelExportEntity> excelParams)
根据注解获取行高
|
int |
getRowNums(List<ExcelExportEntity> excelParams)
判断表头是只有一行还是两行
|
ExcelExportEntity |
indexExcelEntity(ExportParams entity)
添加Index列
|
void |
sortAllParams(List<ExcelExportEntity> excelParams)
对字段根据用户设置排序
|
protected static final org.slf4j.Logger LOGGER
protected IExcelDataHandler dataHandler
protected IExcelDictHandler dictHandler
public void getAllExcelField(String[] exclusions, String targetId, Field[] fields, List<ExcelExportEntity> excelParams, Class<?> pojoClass, List<Method> getMethods, ExcelEntity excelGroup) throws Exception
targetId
- 目标IDException
public Object getCellValue(ExcelExportEntity entity, Object obj) throws Exception
Exception
public Collection<?> getListCellValue(ExcelExportEntity entity, Object obj) throws Exception
Exception
public Object getFieldBySomeMethod(List<Method> list, Object t) throws Exception
Exception
public short getRowHeight(List<ExcelExportEntity> excelParams)
public void sortAllParams(List<ExcelExportEntity> excelParams)
public ExcelExportEntity indexExcelEntity(ExportParams entity)
public int getFieldLength(List<ExcelExportEntity> excelParams)
public int getRowNums(List<ExcelExportEntity> excelParams)
Copyright © 2018 Lumer. All rights reserved.