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
78bb4186
Commit
78bb4186
authored
Oct 10, 2017
by
Java - 段鹏举
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
过滤重复记录
parent
a66b5e2b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
27 deletions
+19
-27
CallDao.xml
resources/mapper/modules/call/CallDao.xml
+2
-1
CallService.java
src/com/ejweb/modules/call/service/CallService.java
+17
-26
No files found.
resources/mapper/modules/call/CallDao.xml
View file @
78bb4186
...
@@ -179,7 +179,8 @@
...
@@ -179,7 +179,8 @@
WHERE r.end_status !='INIT'
WHERE r.end_status !='INIT'
and r.create_name = #{createName}
and r.create_name = #{createName}
and p.username = #{username}
and p.username = #{username}
and r.start_time = #{endTime}
and r.start_time
<
= #{endTime}
ORDER BY r.start_time DESC
</select>
</select>
<!-- 通过通话的电话号查询用户信息 -->
<!-- 通过通话的电话号查询用户信息 -->
...
...
src/com/ejweb/modules/call/service/CallService.java
View file @
78bb4186
package
com
.
ejweb
.
modules
.
call
.
service
;
package
com
.
ejweb
.
modules
.
call
.
service
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
javax.sound.midi.VoiceStatus
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.time.DateFormatUtils
;
import
org.apache.commons.lang3.time.DateUtils
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
com.ejweb.core.base.BaseService
;
import
com.ejweb.core.base.BaseService
;
import
com.ejweb.core.base.PageEntity
;
import
com.ejweb.core.base.PageEntity
;
import
com.ejweb.core.util.IdWorker
;
import
com.ejweb.core.util.IdWorker
;
...
@@ -22,17 +8,18 @@ import com.ejweb.modules.call.bean.CallFindPhoneInfoBean;
...
@@ -22,17 +8,18 @@ import com.ejweb.modules.call.bean.CallFindPhoneInfoBean;
import
com.ejweb.modules.call.bean.CallPhoneBean
;
import
com.ejweb.modules.call.bean.CallPhoneBean
;
import
com.ejweb.modules.call.bean.CallRecordListBean
;
import
com.ejweb.modules.call.bean.CallRecordListBean
;
import
com.ejweb.modules.call.dao.CallDao
;
import
com.ejweb.modules.call.dao.CallDao
;
import
com.ejweb.modules.call.entity.CallPhoneAreaEntity
;
import
com.ejweb.modules.call.entity.*
;
import
com.ejweb.modules.call.entity.CallPhoneInfoListEntity
;
import
com.ejweb.modules.call.entity.CallRecordEntity
;
import
com.ejweb.modules.call.entity.CallRecordListEntity
;
import
com.ejweb.modules.call.entity.CallSoundRecordBean
;
import
com.ejweb.modules.call.entity.HuaweiNumListEntity
;
import
com.ejweb.modules.call.entity.MemberEntity
;
import
com.ejweb.modules.call.util.PhoneAreaEntity
;
import
com.ejweb.modules.call.util.PhoneAreaEntity
;
import
com.ejweb.modules.call.util.PhoneAreaUtil
;
import
com.ejweb.modules.call.util.PhoneAreaUtil
;
import
com.github.pagehelper.PageHelper
;
import
com.github.pagehelper.PageHelper
;
import
com.github.pagehelper.PageInfo
;
import
com.github.pagehelper.PageInfo
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.time.DateFormatUtils
;
import
org.apache.commons.lang3.time.DateUtils
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
java.util.*
;
@Service
@Service
@Transactional
(
readOnly
=
true
)
@Transactional
(
readOnly
=
true
)
...
@@ -84,14 +71,18 @@ public class CallService extends BaseService<CallDao> {
...
@@ -84,14 +71,18 @@ public class CallService extends BaseService<CallDao> {
//过滤重复记录
//过滤重复记录
List
<
CallRecordListEntity
>
templist
=
new
ArrayList
<
CallRecordListEntity
>();
List
<
CallRecordListEntity
>
templist
=
new
ArrayList
<
CallRecordListEntity
>();
for
(
CallRecordListEntity
callRecordListEntity
:
list
)
{
for
(
CallRecordListEntity
callRecordListEntity
:
list
)
{
List
<
CallRecordListEntity
>
entity
=
dao
.
get
(
callRecordListEntity
);
if
(
"FAILD"
.
equals
(
callRecordListEntity
.
getEndStatus
()))
{
if
(
entity
.
size
()>
0
){
List
<
CallRecordListEntity
>
entity
=
dao
.
get
(
callRecordListEntity
);
templist
.
add
(
callRecordListEntity
);
if
(
entity
.
size
()>
0
&&
"SUCCESS"
.
equals
(
entity
.
get
(
0
).
getEndStatus
())){
}
templist
.
add
(
callRecordListEntity
);
}
}
}
}
if
(
templist
.
size
()>
0
){
if
(
templist
.
size
()>
0
){
list
.
removeAll
(
templist
);
list
.
removeAll
(
templist
);
}
pageInfo
.
setSize
(
list
.
size
());
pageInfo
.
setTotal
(
list
.
size
());
}
PageEntity
<
CallRecordListEntity
>
page
=
new
PageEntity
<
CallRecordListEntity
>();
PageEntity
<
CallRecordListEntity
>
page
=
new
PageEntity
<
CallRecordListEntity
>();
page
.
setPageNo
(
pageInfo
.
getPageNum
());
page
.
setPageNo
(
pageInfo
.
getPageNum
());
page
.
setPageSize
(
pageInfo
.
getPageSize
());
page
.
setPageSize
(
pageInfo
.
getPageSize
());
...
...
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