public class ExportCommonServer extends Object
| 限定符和类型 | 字段和说明 |
|---|---|
protected IExcelDataHandler |
dataHanlder |
protected static org.slf4j.Logger |
LOGGER |
protected List<String> |
needHanlderList |
| 构造器和说明 |
|---|
ExportCommonServer() |
| 限定符和类型 | 方法和说明 |
|---|---|
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 dataHanlder
public void getAllExcelField(String[] exclusions, String targetId, Field[] fields, List<ExcelExportEntity> excelParams, Class<?> pojoClass, List<Method> getMethods, ExcelEntity excelGroup) throws Exception
targetId - 目标IDExceptionpublic Object getCellValue(ExcelExportEntity entity, Object obj) throws Exception
Exceptionpublic Collection<?> getListCellValue(ExcelExportEntity entity, Object obj) throws Exception
Exceptionpublic Object getFieldBySomeMethod(List<Method> list, Object t) throws Exception
Exceptionpublic 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 © 2017 Lumer. All Rights Reserved.