Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
eshiled-new
/
ne-shield-trialdrive-admin
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 6f090816
authored
Jan 02, 2022
by
levphon
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
工单详情-导入
1 parent
d8741627
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
src/main/java/cn/com/glsx/admin/modules/controller/WorkOrderController.java
src/main/java/cn/com/glsx/admin/modules/model/imports/WorkOrderImportListener.java
src/main/java/cn/com/glsx/admin/modules/controller/WorkOrderController.java
View file @
6f09081
...
@@ -82,11 +82,11 @@ public class WorkOrderController {
...
@@ -82,11 +82,11 @@ public class WorkOrderController {
}
}
@PostMapping
(
value
=
"/import"
,
consumes
=
MediaType
.
MULTIPART_FORM_DATA_VALUE
)
@PostMapping
(
value
=
"/import"
,
consumes
=
MediaType
.
MULTIPART_FORM_DATA_VALUE
)
public
R
import
Custom
ers
(
@RequestParam
(
"file"
)
MultipartFile
file
)
throws
IOException
{
public
R
import
WorkOrd
ers
(
@RequestParam
(
"file"
)
MultipartFile
file
)
throws
IOException
{
WorkOrderImportListener
listener
=
new
WorkOrderImportListener
(
workOrderService
);
WorkOrderImportListener
listener
=
new
WorkOrderImportListener
(
workOrderService
);
EasyExcel
.
read
(
file
.
getInputStream
(),
WorkOrderImport
.
class
,
listener
)
EasyExcel
.
read
(
file
.
getInputStream
(),
WorkOrderImport
.
class
,
listener
)
.
head
(
WorkOrderImport
.
class
)
.
head
(
WorkOrderImport
.
class
)
.
ignoreEmptyRow
(
fals
e
)
.
ignoreEmptyRow
(
tru
e
)
.
sheet
().
doRead
();
.
sheet
().
doRead
();
BaseImportInfo
importInfo
=
listener
.
getBaseImportInfo
();
BaseImportInfo
importInfo
=
listener
.
getBaseImportInfo
();
return
R
.
ok
().
data
(
importInfo
);
return
R
.
ok
().
data
(
importInfo
);
...
...
src/main/java/cn/com/glsx/admin/modules/model/imports/WorkOrderImportListener.java
View file @
6f09081
...
@@ -76,7 +76,7 @@ public class WorkOrderImportListener extends AnalysisEventListener<WorkOrderImpo
...
@@ -76,7 +76,7 @@ public class WorkOrderImportListener extends AnalysisEventListener<WorkOrderImpo
continue
;
continue
;
}
}
String
excelPropertyName
=
property
.
value
()[
0
];
String
excelPropertyName
=
property
.
value
()[
0
];
if
(
excelPropertyName
.
equals
(
"
客户状态"
)
||
excelPropertyName
.
equals
(
"
导入失败原因"
))
{
if
(
excelPropertyName
.
equals
(
"导入失败原因"
))
{
continue
;
continue
;
}
}
String
excelColumnName
=
headMap
.
get
(
property
.
index
());
String
excelColumnName
=
headMap
.
get
(
property
.
index
());
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment