Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
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
首航-临时账号
api
Commits
aabad90d
Commit
aabad90d
authored
Oct 11, 2017
by
Java - 段鹏举
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
过滤重复记录,查sql改为代码
parent
78bb4186
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
5 deletions
+17
-5
CallService.java
src/com/ejweb/modules/call/service/CallService.java
+17
-5
No files found.
src/com/ejweb/modules/call/service/CallService.java
View file @
aabad90d
...
...
@@ -70,14 +70,26 @@ public class CallService extends BaseService<CallDao> {
}
//过滤重复记录
List
<
CallRecordListEntity
>
templist
=
new
ArrayList
<
CallRecordListEntity
>();
for
(
CallRecordListEntity
callRecordListEntity
:
list
)
{
if
(
"FAILD"
.
equals
(
callRecordListEntity
.
getEndStatus
()))
{
List
<
CallRecordListEntity
>
entity
=
dao
.
get
(
callRecordListEntity
);
if
(
entity
.
size
()>
0
&&
"SUCCESS"
.
equals
(
entity
.
get
(
0
).
getEndStatus
())){
// for (CallRecordListEntity callRecordListEntity : list) {
// if ("FAILD".equals(callRecordListEntity.getEndStatus())) {
// List<CallRecordListEntity> entity = dao.get(callRecordListEntity);
// if(entity.size()>0 && "SUCCESS".equals(entity.get(0).getEndStatus())){
// templist.add(callRecordListEntity);
// }
// }
// }
for
(
int
i
=
0
;
i
<
list
.
size
();
i
++)
{
CallRecordListEntity
callRecordListEntity
=
list
.
get
(
i
);
if
(
i
>
0
&&
"FAILD"
.
equals
(
callRecordListEntity
.
getEndStatus
()))
{
CallRecordListEntity
last
=
list
.
get
(
i
-
1
);
if
(
"SUCCESS"
.
equals
(
last
.
getEndStatus
())
&&
callRecordListEntity
.
getCreateName
().
equals
(
last
.
getCreateName
())
&&
callRecordListEntity
.
getUsername
().
equals
(
last
.
getUsername
())
&&
callRecordListEntity
.
getEndTime
().
after
(
last
.
getStartTime
()))
{
templist
.
add
(
callRecordListEntity
);
}
}
}
}
if
(
templist
.
size
()>
0
){
list
.
removeAll
(
templist
);
pageInfo
.
setSize
(
list
.
size
());
...
...
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