后台在完成功能之后返回json对象
@RequestMapping("/upLoad")
@ResponseBody
public HarJson upLoad(MultipartFile upfile,String pipeId){
HarJson harJson = new HarJson();
//数据解析
boolean b = false;
//获取文件名
String name = upfile.getOriginalFilename();
//获取文件的大小
long size = upfile.getSize();
if(name==null || ("").equals(name) && size==0){
harJson.setSuccess(false);
harJson.setMsg("未选择文件");
return harJson;
}else if(CheckExcel.validateExcel(name)==false){
harJson.setSuccess(false);
harJson.setMsg("文件格式不正确");
return harJson;
}
//创建处理excel
ReadExcel readExcel = new ReadExcel();
//解析excel,获取管道信息
List<Anchor> anchorList = readExcel.getExcelInfo(upfile);
if(readExcel.getErrorMsg().equals("")&&anchorList != null && !anchorList.toString().equals("[]&#