Commit a3ee469c authored by shizhilong's avatar shizhilong

Merge branch 'dev-szl' of http://gitlab.suntrayoa.com/ztgk/hzsomms into dev

parents eb968230 5c4f5aa8
......@@ -2,6 +2,7 @@ package org.jeecg.modules.checkData.equipmentCheckData.controller;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.poi.excel.ExcelReader;
import cn.hutool.poi.excel.ExcelUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
......@@ -243,16 +244,26 @@ public class MovementRecordsMasterController extends JeecgController<MovementRec
return Result.OK("删除成功!");
}
// @AutoLog(value = "导入")
// @ApiOperation(value = "导入", notes = "导入 ")
// @PostMapping(value = "/upload")
// @ResponseBody
// public Result<String> uploadFile(MultipartFile file) throws IOException {
// byte[] bytes = file.getBytes();
// ByteArrayInputStream bis = new ByteArrayInputStream(bytes);
// ExcelUtil.getReader(bis);
// return Result.ok("操作成功");
// }
@AutoLog(value = "导入")
@ApiOperation(value = "导入", notes = "导入 ")
@PostMapping(value = "/upload")
@ResponseBody
public Result<String> uploadFile(MultipartFile file,@RequestParam(name="动静态几何尺寸主键id") String id) {
try{
//读取第一个sheet页的数据
ExcelReader reader = ExcelUtil.getReader(file.getInputStream(),0);
//读取Excel中所有的行和列
List<List<Object>> readAll = reader.read();
for (List<Object> list :readAll){
System.out.println(list.toString());
}
}catch (Exception e){
e.getMessage();
}
return Result.ok("操作成功");
}
/**
* 校验参数
*
......
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