Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
haoban-manage3.0
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
haoban3.0
haoban-manage3.0
Commits
a5234234
Commit
a5234234
authored
Jul 23, 2025
by
徐高华
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
离职在职继承
parent
8e72fca8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
16 deletions
+27
-16
HaobanHandoverServiceImpl.java
...anage/service/service/impl/HaobanHandoverServiceImpl.java
+27
-16
No files found.
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/impl/HaobanHandoverServiceImpl.java
View file @
a5234234
...
...
@@ -24,6 +24,7 @@ import com.gic.haoban.manage.service.service.HaobanHandoverService;
import
com.github.pagehelper.PageHelper
;
import
com.github.pagehelper.PageInfo
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
...
...
@@ -56,31 +57,40 @@ public class HaobanHandoverServiceImpl implements HaobanHandoverService {
String
wxEnterpriseId
=
qdto
.
getWxEnterpriseId
()
;
// 0离职继承 1在职继承
int
handoverType
=
qdto
.
getHandoverType
()
;
List
<
HandoverStaffDTO
>
retList
=
null
;
if
(
handoverType
==
0
)
{
List
<
TabHandoverStaff
>
list
=
this
.
handoverStaffMapper
.
listByHandover
(
wxEnterpriseId
,
storeId
)
;
retList
=
EntityUtil
.
changeEntityListByJSON
(
HandoverStaffDTO
.
class
,
list
)
;
}
else
{
List
<
StaffClerkRelationDTO
>
list
=
this
.
staffClerkRelationMapper
.
listByStoreIds
(
wxEnterpriseId
,
Arrays
.
asList
(
storeId
))
;
retList
=
EntityUtil
.
changeEntityListByJSON
(
HandoverStaffDTO
.
class
,
list
)
;
}
if
(
CollectionUtils
.
isNotEmpty
(
retList
))
{
List
<
String
>
staffIdList
=
retList
.
stream
().
map
(
HandoverStaffDTO:
:
getStaffId
).
collect
(
Collectors
.
toList
());
List
<
FriendCountBO
>
numList
=
this
.
externalClerkRelatedMapper
.
friendNum
(
staffIdList
,
storeId
)
;
Map
<
String
,
Integer
>
map
=
numList
.
stream
().
collect
(
Collectors
.
toMap
(
FriendCountBO:
:
getStaffId
,
FriendCountBO:
:
getNum
,
(
e
,
x
)
->
e
));
List
<
HandoverStaffDTO
>
retList
=
EntityUtil
.
changeEntityListByJSON
(
HandoverStaffDTO
.
class
,
list
)
;
for
(
HandoverStaffDTO
handoverStaffDTO
:
retList
)
{
handoverStaffDTO
.
setFriendCount
(
map
.
get
(
handoverStaffDTO
.
getStaffId
()));
handoverStaffDTO
.
setHaobanFriendCount
(
handoverStaffDTO
.
getFriendCount
());
if
(
qdto
.
getNoClerkInfoFlag
()==
0
)
{
ClerkDTO
clerk
=
this
.
clerkService
.
getClerkByClerkIdNodel
(
handoverStaffDTO
.
getClerkId
())
;
if
(
null
!=
clerk
)
{
if
(
StringUtils
.
isNotBlank
(
handoverStaffDTO
.
getClerkId
()))
{
ClerkDTO
clerk
=
this
.
clerkService
.
getClerkByClerkIdNodel
(
handoverStaffDTO
.
getClerkId
());
if
(
null
!=
clerk
)
{
handoverStaffDTO
.
setClerkName
(
clerk
.
getClerkName
());
handoverStaffDTO
.
setClerkCode
(
clerk
.
getClerkCode
());
}
}
}
return
retList
;
}
else
{
List
<
StaffClerkRelationDTO
>
list
=
this
.
staffClerkRelationMapper
.
listByStoreIds
(
wxEnterpriseId
,
Arrays
.
asList
(
storeId
))
;
List
<
HandoverStaffDTO
>
retList
=
EntityUtil
.
changeEntityListByJSON
(
HandoverStaffDTO
.
class
,
list
)
;
if
(
CollectionUtils
.
isNotEmpty
(
retList
))
{
List
<
String
>
staffIdList
=
retList
.
stream
().
map
(
HandoverStaffDTO:
:
getStaffId
).
collect
(
Collectors
.
toList
());
List
<
FriendCountBO
>
numList
=
this
.
externalClerkRelatedMapper
.
friendNum
(
staffIdList
,
storeId
)
;
Map
<
String
,
Integer
>
map
=
numList
.
stream
().
collect
(
Collectors
.
toMap
(
FriendCountBO:
:
getStaffId
,
FriendCountBO:
:
getNum
,
(
e
,
x
)
->
e
));
for
(
HandoverStaffDTO
handoverStaffDTO
:
retList
)
{
handoverStaffDTO
.
setFriendCount
(
map
.
get
(
handoverStaffDTO
.
getStaffId
()));
handoverStaffDTO
.
setHaobanFriendCount
(
handoverStaffDTO
.
getFriendCount
());
if
(
qdto
.
getNoClerkInfoFlag
()==
0
)
{
ClerkDTO
clerk
=
this
.
clerkService
.
getClerkByClerkIdNodel
(
handoverStaffDTO
.
getClerkId
());
if
(
null
!=
clerk
)
{
handoverStaffDTO
.
setClerkName
(
clerk
.
getClerkName
());
handoverStaffDTO
.
setClerkCode
(
clerk
.
getClerkCode
());
}
}
}
}
return
retList
;
}
return
retList
;
}
@Override
...
...
@@ -114,6 +124,7 @@ public class HaobanHandoverServiceImpl implements HaobanHandoverService {
this
.
memberTransferLogMapper
.
insertBatch
(
transferList
)
;
}
@Override
public
void
saveHandover
(
HandoverSaveDTO
dto
)
{
TabHandoverTransfer
transfer
=
EntityUtil
.
changeEntityByJSON
(
TabHandoverTransfer
.
class
,
dto
)
;
...
...
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