Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation
This project
Loading...
Sign in
platform
/
finance_serv
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 1c33c29a
authored
Sep 17, 2018
by
王军业
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
[权限导入]
1 parent
d88e14e5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
2 deletions
code/finance_serv/src/main/java/com/vion/financial/controller/ContractController.java
code/finance_serv/src/main/java/com/vion/financial/handler/ImportExcel.java
code/finance_serv/src/main/java/com/vion/financial/controller/ContractController.java
View file @
1c33c29
...
@@ -109,7 +109,7 @@ public class ContractController extends BaseController {
...
@@ -109,7 +109,7 @@ public class ContractController extends BaseController {
*/
*/
@PostMapping
(
value
=
"/import"
)
@PostMapping
(
value
=
"/import"
)
@ResponseBody
@ResponseBody
public
Object
importExcel
(
@RequestParam
(
"file"
)
MultipartFile
file
,
String
ranke
)
{
public
Object
importExcel
(
@RequestParam
(
"file"
)
MultipartFile
file
,
@RequestParam
(
"ranke"
)
String
ranke
)
{
return
contractService
.
importExcel
(
file
,
ranke
);
return
contractService
.
importExcel
(
file
,
ranke
);
}
}
...
...
code/finance_serv/src/main/java/com/vion/financial/handler/ImportExcel.java
View file @
1c33c29
...
@@ -86,7 +86,8 @@ public class ImportExcel {
...
@@ -86,7 +86,8 @@ public class ImportExcel {
Map
<
String
,
Object
>
headerTitle
=
successList
.
get
(
0
);
Map
<
String
,
Object
>
headerTitle
=
successList
.
get
(
0
);
if
(
headerTitle
.
size
()==
columns
.
length
)
{
if
(
headerTitle
.
size
()==
columns
.
length
)
{
Set
<
String
>
hashColumns
=
new
HashSet
<
String
>(
Arrays
.
asList
(
columns
));
Set
<
String
>
hashColumns
=
new
HashSet
<
String
>(
Arrays
.
asList
(
columns
));
if
(
hashColumns
==
headerTitle
)
{
Set
<
String
>
keys
=
headerTitle
.
keySet
();
if
(
hashColumns
.
containsAll
(
keys
))
{
isIlegal
=
true
;
isIlegal
=
true
;
}
}
}
}
...
...
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