Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
D
dsk-operate-sys-cscec
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
fulixin
dsk-operate-sys-cscec
Commits
62f94d3d
Commit
62f94d3d
authored
Feb 06, 2024
by
lcl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
u
parent
e0c88ce3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
3 deletions
+2
-3
ExcelUtils.java
...common/src/main/java/com/dsk/common/excel/ExcelUtils.java
+1
-2
CbQuantitySummaryController.java
...com/dsk/cscec/controller/CbQuantitySummaryController.java
+1
-1
No files found.
dsk-common/src/main/java/com/dsk/common/excel/ExcelUtils.java
View file @
62f94d3d
...
...
@@ -1503,10 +1503,9 @@ public class ExcelUtils<T> {
*
* @param titleNum 标题占用行数
* @param is 输入流
* @param keyName 主要键名称(NULL则不判断)
* @return 转换后集合
*/
public
List
<
T
>
importExcelAllSheet
(
InputStream
is
,
int
titleNum
,
String
keyName
)
throws
Exception
{
public
List
<
T
>
importExcelAllSheet
(
InputStream
is
,
int
titleNum
)
throws
Exception
{
this
.
type
=
Excel
.
Type
.
IMPORT
;
this
.
wb
=
WorkbookFactory
.
create
(
is
);
List
<
T
>
list
=
new
ArrayList
<
T
>();
...
...
dsk-module/dsk-biz-api/src/main/java/com/dsk/cscec/controller/CbQuantitySummaryController.java
View file @
62f94d3d
...
...
@@ -56,7 +56,7 @@ public class CbQuantitySummaryController extends BaseController {
@PostMapping
(
value
=
"/importData"
)
public
R
<
Void
>
importFile
(
@RequestPart
(
"file"
)
MultipartFile
file
)
throws
Exception
{
//识别Excel内容
List
<
CbQuantitySummary
>
importList
=
new
ExcelUtils
<>(
CbQuantitySummary
.
class
).
importExcelAllSheet
(
file
.
getInputStream
(),
1
,
"cbSubjectName"
);
List
<
CbQuantitySummary
>
importList
=
new
ExcelUtils
<>(
CbQuantitySummary
.
class
).
importExcelAllSheet
(
file
.
getInputStream
(),
1
);
if
(
importList
.
isEmpty
())
{
throw
new
ServiceException
(
"表格中不存在待导入数据!"
);
}
...
...
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