public class ImportBaseService extends Object
| 构造器和说明 |
|---|
ImportBaseService() |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
addEntityToMap(String targetId,
Field field,
ExcelImportEntity excelEntity,
Class<?> pojoClass,
List<Method> getMethods,
Map<String,ExcelImportEntity> temp)
把这个注解解析放到类型对象中
|
void |
getAllExcelField(String targetId,
Field[] fields,
Map<String,ExcelImportEntity> excelParams,
List<ExcelCollectionParams> excelCollection,
Class<?> pojoClass,
List<Method> getMethods)
获取需要导出的全部字段
|
void |
getExcelField(String targetId,
Field field,
ExcelImportEntity excelEntity,
Excel excel,
Class<?> pojoClass) |
void |
getExcelFieldList(String targetId,
Field[] fields,
Class<?> pojoClass,
Map<String,ExcelImportEntity> temp,
List<Method> getMethods) |
String |
getExcelName(String exportName,
String targetId)
判断在这个单元格显示的名称
|
Object |
getFieldBySomeMethod(List<Method> list,
Object t) |
ExcelVerifyEntity |
getImportVerify(Field field)
获取导入校验参数
|
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) throws Exception
targetId - field - excelEntity - pojoClass - getMethods - temp - Exceptionpublic ExcelVerifyEntity getImportVerify(Field field)
field - public void getAllExcelField(String targetId, Field[] fields, Map<String,ExcelImportEntity> excelParams, List<ExcelCollectionParams> excelCollection, Class<?> pojoClass, List<Method> getMethods) throws Exception
targetId - 目标IDfields - excelCollection - Exceptionpublic void getExcelField(String targetId, Field field, ExcelImportEntity excelEntity, Excel excel, Class<?> pojoClass) throws Exception
Exceptionpublic void getExcelFieldList(String targetId, Field[] fields, Class<?> pojoClass, Map<String,ExcelImportEntity> temp, List<Method> getMethods) throws Exception
Exceptionpublic String getExcelName(String exportName, String targetId)
exportName - targetId - public Object getFieldBySomeMethod(List<Method> list, Object t) throws Exception
Exceptionpublic void saveThisExcel(ImportParams params, Class<?> pojoClass, boolean isXSSFWorkbook, org.apache.poi.ss.usermodel.Workbook book) throws Exception
Exceptionpublic String getSaveExcelUrl(ImportParams params, Class<?> pojoClass) throws Exception
params - pojoClass - Exceptionpublic void setFieldBySomeMethod(List<Method> setMethods, Object object, Object value) throws Exception
setMethods - object - Exceptionpublic void setValues(ExcelImportEntity entity, Object object, Object value) throws Exception
entity - object - value - ExceptionCopyright © 2023. All rights reserved.