Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
emport-api
Overview
Overview
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
刘泽志
emport-api
Commits
eb72e954
Commit
eb72e954
authored
Mar 01, 2023
by
刘泽志
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
相同字段查询
parent
1b8d35cf
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
1 deletions
+20
-1
DataFieldController.java
...yf/his/web/controller/dataImport/DataFieldController.java
+20
-1
No files found.
admin-api/src/main/java/com/tbyf/his/web/controller/dataImport/DataFieldController.java
View file @
eb72e954
...
@@ -263,7 +263,26 @@ public class DataFieldController {
...
@@ -263,7 +263,26 @@ public class DataFieldController {
@GetMapping
(
"/sameFieldCheck"
)
@GetMapping
(
"/sameFieldCheck"
)
@ApiOperation
(
"相同字段检查"
)
@ApiOperation
(
"相同字段检查"
)
public
AjaxResult
sameFieldCheck
(
@RequestParam
String
templateId
)
{
public
AjaxResult
sameFieldCheck
(
@RequestParam
String
templateId
)
{
return
AjaxResult
.
success
();
List
<
CreateFieldVO
>
fieldList
=
dataFieldService
.
getCreateFields
(
templateId
);
if
(
CollectionUtils
.
isEmpty
(
fieldList
)){
return
AjaxResult
.
success
(
Collections
.
emptyList
());
}
Map
<
String
,
Integer
>
map
=
new
HashMap
<>();
List
<
CreateFieldVO
>
list
=
new
ArrayList
<>();
for
(
CreateFieldVO
field
:
fieldList
){
if
(
map
.
containsKey
(
field
.
getFieldName
())){
map
.
put
(
field
.
getFieldName
(),
map
.
get
(
field
.
getFieldName
())+
1
);
}
else
{
map
.
put
(
field
.
getFieldName
(),
1
);
}
}
map
.
forEach
((
key
,
value
)->{
if
(
value
>
1
){
Optional
<
CreateFieldVO
>
first
=
fieldList
.
stream
().
filter
(
item
->
StringUtils
.
equals
(
item
.
getFieldName
(),
key
)).
findFirst
();
first
.
ifPresent
(
list:
:
add
);
}
});
return
AjaxResult
.
success
(
list
);
}
}
...
...
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