Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in / Register
Toggle navigation
H
hzsomms
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ZTGK
hzsomms
Commits
5c4f5aa8
Commit
5c4f5aa8
authored
Jul 13, 2023
by
shizhilong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
导入 --shizhilong
parent
37e86dc0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
10 deletions
+21
-10
MovementRecordsMasterController.java
...CheckData/controller/MovementRecordsMasterController.java
+21
-10
No files found.
jeecg-module-system/src/main/java/org/jeecg/modules/checkData/equipmentCheckData/controller/MovementRecordsMasterController.java
View file @
5c4f5aa8
...
@@ -2,6 +2,7 @@ package org.jeecg.modules.checkData.equipmentCheckData.controller;
...
@@ -2,6 +2,7 @@ package org.jeecg.modules.checkData.equipmentCheckData.controller;
import
cn.hutool.core.util.ObjectUtil
;
import
cn.hutool.core.util.ObjectUtil
;
import
cn.hutool.poi.excel.ExcelReader
;
import
cn.hutool.poi.excel.ExcelUtil
;
import
cn.hutool.poi.excel.ExcelUtil
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper
;
import
com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper
;
...
@@ -243,16 +244,26 @@ public class MovementRecordsMasterController extends JeecgController<MovementRec
...
@@ -243,16 +244,26 @@ public class MovementRecordsMasterController extends JeecgController<MovementRec
return
Result
.
OK
(
"删除成功!"
);
return
Result
.
OK
(
"删除成功!"
);
}
}
// @AutoLog(value = "导入")
@AutoLog
(
value
=
"导入"
)
// @ApiOperation(value = "导入", notes = "导入 ")
@ApiOperation
(
value
=
"导入"
,
notes
=
"导入 "
)
// @PostMapping(value = "/upload")
@PostMapping
(
value
=
"/upload"
)
// @ResponseBody
@ResponseBody
// public Result<String> uploadFile(MultipartFile file) throws IOException {
public
Result
<
String
>
uploadFile
(
MultipartFile
file
,
@RequestParam
(
name
=
"动静态几何尺寸主键id"
)
String
id
)
{
// byte[] bytes = file.getBytes();
try
{
// ByteArrayInputStream bis = new ByteArrayInputStream(bytes);
//读取第一个sheet页的数据
// ExcelUtil.getReader(bis);
ExcelReader
reader
=
ExcelUtil
.
getReader
(
file
.
getInputStream
(),
0
);
// return Result.ok("操作成功");
//读取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
(
"操作成功"
);
}
/**
/**
* 校验参数
* 校验参数
*
*
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment