Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
bigdatainterservice
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
曹鹏
bigdatainterservice
Commits
d053fa03
Commit
d053fa03
authored
May 28, 2019
by
chang_chao@founder.com.cn
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
电炸全国案件接口新增案件去重
parent
fead9005
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
5 deletions
+31
-5
src/main/java/com/founder/interservice/controller/MinistrySuspectInfoController.java
+31
-5
No files found.
src/main/java/com/founder/interservice/controller/MinistrySuspectInfoController.java
View file @
d053fa03
...
...
@@ -6,6 +6,7 @@ import com.founder.interservice.qgzyfw.domain.GabConfig;
import
com.founder.interservice.util.StringUtil
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.scheduling.annotation.Async
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.web.bind.annotation.CrossOrigin
;
import
org.springframework.web.bind.annotation.RequestMapping
;
...
...
@@ -13,10 +14,8 @@ import org.springframework.web.bind.annotation.RequestMethod;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.*
;
@Controller
@CrossOrigin
//跨域访问
...
...
@@ -229,9 +228,9 @@ public class MinistrySuspectInfoController {
if
(!
resList
.
isEmpty
()
&&
resList
.
size
()>
0
){
resultList
.
addAll
(
resList
);
}
}
if
(!
resultList
.
isEmpty
()
&&
resultList
!=
null
){
resultList
=
removeRepetitiveList
(
resultList
);
resultObj
.
put
(
"code"
,
ResultEnum
.
SUCCESS
.
getCode
());
resultObj
.
put
(
"message"
,
ResultEnum
.
SUCCESS
.
getMessage
());
}
else
{
...
...
@@ -247,5 +246,32 @@ public class MinistrySuspectInfoController {
}
return
resultObj
;
}
@Async
public
List
<
Map
<
String
,
Object
>>
removeRepetitiveList
(
List
<
Map
<
String
,
Object
>>
resultList
)
{
List
<
Map
<
String
,
Object
>>
newList
=
new
ArrayList
<
Map
<
String
,
Object
>>();
for
(
int
i
=
0
;
i
<
resultList
.
size
();
i
++){
Map
<
String
,
Object
>
oldMap
=
resultList
.
get
(
i
);
if
(
newList
.
size
()>
0
){
boolean
isContain
=
false
;
for
(
int
j
=
0
;
j
<
newList
.
size
();
j
++){
Map
<
String
,
Object
>
newMap
=
newList
.
get
(
j
);
if
(
newMap
.
get
(
"ASJBH"
).
equals
(
oldMap
.
get
(
"ASJBH"
))){
for
(
String
key
:
oldMap
.
keySet
()){
newMap
.
put
(
key
,
oldMap
.
get
(
key
));
}
isContain
=
true
;
break
;
}
}
if
(!
isContain
){
newList
.
add
(
oldMap
);
}
}
else
{
newList
.
add
(
oldMap
);
}
}
return
newList
;
}
}
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