类 BaseExcelFileController
java.lang.Object
com.diboot.core.controller.BaseController
com.diboot.file.controller.BaseExcelFileController
public abstract class BaseExcelFileController
extends com.diboot.core.controller.BaseController
Excel导入基类Controller
- 版本:
- 2.0
- 作者:
- Mazc@dibo.ltd
-
字段概要
字段从类继承的字段 com.diboot.core.controller.BaseController
request -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明protected voidcheckIsExcel(org.springframework.web.multipart.MultipartFile file) 检查是否为合法的excel文件excelPreview(org.springframework.web.multipart.MultipartFile file, Map<String, Object> params) excel数据预览excelPreviewSave(Map<String, Object> params) 预览后提交保存protected abstract ReadExcelListener<?>获取对应的ExcelDataListenerimportData(FileRecord uploadFile, InputStream inputStream, Map<String, Object> params) 导入数据protected <T extends BaseExcelModel>
voidreadExcelFile(InputStream inputStream, ReadExcelListener<T> listener) 读取excel方法uploadExcelFile(org.springframework.web.multipart.MultipartFile file, Map<String, Object> params) 直接上传excel从类继承的方法 com.diboot.core.controller.BaseController
buildQueryWrapperByDTO, buildQueryWrapperByDTO, buildQueryWrapperByQueryParams, buildQueryWrapperByQueryParams, buildRelatedDataCondition, convertParams2Map, convertToVoAndBindRelations, dumpParams, extractQueryParams, getBoolean, getBoolean, getDouble, getDouble, getInt, getInteger, getLong, getLong, getLongList, getParamsMap, getRequestMappingURI, getString, getString, getStringArray, getStringList, getTreeRootId, loadRelatedData, loadRelatedData, relatedDataSecurityCheck
-
字段详细资料
-
fileRecordService
-
fileStorageService
-
-
构造器详细资料
-
BaseExcelFileController
public BaseExcelFileController()
-
-
方法详细资料
-
getExcelDataListener
获取对应的ExcelDataListener -
excelPreview
public com.diboot.core.vo.JsonResult<Map<String,Object>> excelPreview(org.springframework.web.multipart.MultipartFile file, Map<String, Object> params) throws Exceptionexcel数据预览- 参数:
file- excel文件params- 请求参数- 返回:
- 抛出:
Exception
-
excelPreviewSave
public com.diboot.core.vo.JsonResult<Map<String,Object>> excelPreviewSave(Map<String, Object> params) throws Exception预览后提交保存- 参数:
params- 请求参数;必需包含预览返回的文件uuid- 返回:
- 抛出:
Exception
-
uploadExcelFile
public com.diboot.core.vo.JsonResult<Map<String,Object>> uploadExcelFile(org.springframework.web.multipart.MultipartFile file, Map<String, Object> params) throws Exception直接上传excel- 参数:
file- excel文件params- 请求参数- 返回:
- 抛出:
Exception
-
importData
private com.diboot.core.vo.JsonResult<Map<String,Object>> importData(FileRecord uploadFile, InputStream inputStream, Map<String, Object> params) throws Exception导入数据- 参数:
uploadFile- 上传文件对象inputStream- excel文件输入流params- 请求参数- 返回:
- 抛出:
Exception
-
readExcelFile
protected <T extends BaseExcelModel> void readExcelFile(InputStream inputStream, ReadExcelListener<T> listener) throws Exception 读取excel方法- 参数:
inputStream-listener-- 抛出:
Exception
-
checkIsExcel
protected void checkIsExcel(org.springframework.web.multipart.MultipartFile file) 检查是否为合法的excel文件- 参数:
file-- 抛出:
Exception
-