public class ImportBaseService extends Object
Constructor and Description |
---|
ImportBaseService() |
Modifier and Type | Method and Description |
---|---|
void |
addEntityToMap(String targetId,
Field field,
ExcelImportEntity excelEntity,
Class<?> pojoClass,
List<Method> getMethods,
Map<String,ExcelImportEntity> temp,
ExcelEntity excelEntityAnn)
把这个注解解析放到类型对象中
|
void |
getAllExcelField(String targetId,
Field[] fields,
Map<String,ExcelImportEntity> excelParams,
List<ExcelCollectionParams> excelCollection,
Class<?> pojoClass,
List<Method> getMethods,
ExcelEntity excelEntityAnn)
获取需要导出的全部字段
|
void |
getExcelFieldList(String targetId,
Field[] fields,
Class<?> pojoClass,
Map<String,ExcelImportEntity> temp,
List<Method> getMethods) |
Object |
getFieldBySomeMethod(List<Method> list,
Object t) |
String |
getSaveExcelUrl(ImportParams params,
Class<?> pojoClass)
获取保存的Excel 的真实路径
|
void |
saveThisExcel(ImportParams params,
Class<?> pojoClass,
boolean isXSSFWorkbook,
org.apache.poi.ss.usermodel.Workbook book) |
void |
setFieldBySomeMethod(List<Method> setMethods,
Object object,
Object value)
多个get 最后再set
|
void |
setValues(ExcelImportEntity entity,
Object object,
Object value) |
public void addEntityToMap(String targetId, Field field, ExcelImportEntity excelEntity, Class<?> pojoClass, List<Method> getMethods, Map<String,ExcelImportEntity> temp, ExcelEntity excelEntityAnn) throws Exception
targetId
- field
- excelEntity
- pojoClass
- getMethods
- temp
- Exception
public void getAllExcelField(String targetId, Field[] fields, Map<String,ExcelImportEntity> excelParams, List<ExcelCollectionParams> excelCollection, Class<?> pojoClass, List<Method> getMethods, ExcelEntity excelEntityAnn) throws Exception
targetId
- fields
- excelParams
- excelCollection
- pojoClass
- getMethods
- Exception
public void getExcelFieldList(String targetId, Field[] fields, Class<?> pojoClass, Map<String,ExcelImportEntity> temp, List<Method> getMethods) throws Exception
Exception
public Object getFieldBySomeMethod(List<Method> list, Object t) throws Exception
Exception
public void saveThisExcel(ImportParams params, Class<?> pojoClass, boolean isXSSFWorkbook, org.apache.poi.ss.usermodel.Workbook book) throws Exception
Exception
public String getSaveExcelUrl(ImportParams params, Class<?> pojoClass) throws Exception
params
- pojoClass
- Exception
public void setFieldBySomeMethod(List<Method> setMethods, Object object, Object value) throws Exception
setMethods
- object
- Exception
public void setValues(ExcelImportEntity entity, Object object, Object value) throws Exception
entity
- object
- value
- Exception
Copyright © 2018 Lumer. All rights reserved.