excel导入修改

web_backend_develope
chenlw 9 years ago
parent 24bacac2a2
commit db84669826

@ -279,7 +279,7 @@ public class ExcelController extends BaseController{
for (String p : jsonlist) {
listPath.add(dirPath + p);
}
Map<String, List> result = new HashMap<String, List>();
Map<String, Object> result = new HashMap<String, Object>();
if (listPath.size() > 0) {
//导入
result = preDataInfoService.importExcel(listPath);
@ -288,9 +288,9 @@ public class ExcelController extends BaseController{
modelMap.addAttribute("data", datalist);
modelMap.addAttribute("length", datalist.size());
modelMap.addAttribute("code","1001");
modelMap.addAllAttributes(result);
//失败
if (result.keySet().size() > 0) {
modelMap.addAllAttributes(result);
if (result.keySet().contains("err")) {
modelMap.addAttribute("code","3001");
response.setStatus(500);
}

Loading…
Cancel
Save