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

Loading…
Cancel
Save