Commit 511cfff5 by 宋珺琪

服务管理新增excel上传修改bug

parent edaa7b34
...@@ -99,9 +99,9 @@ public class SkServiceController extends ApiController { ...@@ -99,9 +99,9 @@ public class SkServiceController extends ApiController {
String postfix = filename.substring(filename.lastIndexOf(".") + 1); String postfix = filename.substring(filename.lastIndexOf(".") + 1);
//根据Excel文件后缀读取数据 //根据Excel文件后缀读取数据
if (postfix.equals("xls")) { if (postfix.equals("xls")) {
Map xlsExcelMap = ExcelUtil.readXLSExcel(file.getInputStream(), SkService.class, abandonFields); Map xlsExcelMap = ExcelUtil.readXLSXExcel(file.getInputStream(), SkService.class, abandonFields);
resultList = (List) xlsExcelMap.get("dataList"); resultList = (List) xlsExcelMap.get("dataList");
} else { } else if (postfix.equals("xlsx")){
Map xlsxExcelMap = ExcelUtil.readXLSXExcel(file.getInputStream(), SkService.class, abandonFields); Map xlsxExcelMap = ExcelUtil.readXLSXExcel(file.getInputStream(), SkService.class, abandonFields);
resultList = (List) xlsxExcelMap.get("dataList"); resultList = (List) xlsxExcelMap.get("dataList");
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment