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
1
Merge Requests
1
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
c954244f
Commit
c954244f
authored
Jun 04, 2020
by
qwmqiuwenmin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
a2aca17e
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
32 additions
and
15 deletions
+32
-15
StaffClerkRelationService.java
...ban/manage/service/service/StaffClerkRelationService.java
+2
-0
StaffClerkRelationServiceImpl.java
...e/service/service/impl/StaffClerkRelationServiceImpl.java
+4
-0
StaffApiServiceImpl.java
.../manage/service/service/out/impl/StaffApiServiceImpl.java
+26
-15
No files found.
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/StaffClerkRelationService.java
View file @
c954244f
...
...
@@ -53,4 +53,6 @@ public interface StaffClerkRelationService {
StaffClerkRelationDTO
getByClerkId
(
String
clerkId
);
List
<
StaffClerkRelationDTO
>
listByClerkIds
(
List
<
String
>
clerkList
);
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/impl/StaffClerkRelationServiceImpl.java
View file @
c954244f
...
...
@@ -104,4 +104,8 @@ public class StaffClerkRelationServiceImpl implements StaffClerkRelationService
public
StaffClerkRelationDTO
getByClerkId
(
String
clerkId
)
{
return
EntityUtil
.
changeEntityByJSON
(
StaffClerkRelationDTO
.
class
,
mapper
.
getByClerkId
(
clerkId
));
}
@Override
public
List
<
StaffClerkRelationDTO
>
listByClerkIds
(
List
<
String
>
clerkList
)
{
return
EntityUtil
.
changeEntityListByJSON
(
StaffClerkRelationDTO
.
class
,
mapper
.
listByClerkIds
(
clerkList
));
}
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/StaffApiServiceImpl.java
View file @
c954244f
...
...
@@ -1107,17 +1107,15 @@ public class StaffApiServiceImpl implements StaffApiService {
@Override
public
List
<
String
>
listUnBindClerk
(
String
storeId
)
{
TabHaobanDepartment
department
=
departmentService
.
selectByRelatedId
(
storeId
);
if
(
department
==
null
){
return
Collections
.
EMPTY_LIST
;
}
List
<
TabHaobanStaffDepartmentRelated
>
list
=
staffDepartmentRelatedService
.
listByDepartmentId
(
department
.
getDepartmentId
());
List
<
String
>
clerkCodes
=
list
.
stream
().
filter
(
s
->
s
.
getClerkCode
()!=
null
).
map
(
s
->
s
.
getClerkCode
()).
collect
(
Collectors
.
toList
());
List
<
String
>
storeIds
=
new
ArrayList
<
String
>();
storeIds
.
add
(
storeId
);
List
<
String
>
clerkList
=
clerkService
.
getclerkListByStoreIds
(
storeIds
);
List
<
StaffClerkRelationDTO
>
staffRelationList
=
staffClerkRelationService
.
listByClerkIds
(
clerkList
);
List
<
String
>
clerkIds
=
staffRelationList
.
stream
().
filter
(
s
->
s
.
getClerkId
()!=
null
).
map
(
s
->
s
.
getClerkId
()).
collect
(
Collectors
.
toList
());
List
<
String
>
unBindList
=
new
ArrayList
<>();
if
(
CollectionUtil
.
isNotEmpty
(
clerkCodes
)){
List
<
ClerkDTO
>
clerkList
=
clerkService
.
listClerk
(
storeId
,
clerkCodes
,
false
);
for
(
ClerkDTO
clerkDTO
:
clerkList
)
{
unBindList
.
add
(
clerkDTO
.
getClerkId
());
for
(
String
clerkId
:
clerkList
)
{
if
(!
clerkIds
.
contains
(
clerkId
)){
unBindList
.
add
(
clerkId
);
}
}
return
unBindList
;
...
...
@@ -1370,12 +1368,25 @@ public class StaffApiServiceImpl implements StaffApiService {
@Override
public
List
<
String
>
listBindClerkUserId
(
String
storeId
)
{
TabHaobanDepartment
department
=
departmentService
.
selectByRelatedId
(
storeId
);
if
(
department
==
null
){
return
Collections
.
EMPTY_LIST
;
// TabHaobanDepartment department = departmentService.selectByRelatedId(storeId);
// if(department == null){
// return Collections.EMPTY_LIST;
// }
// List<TabHaobanStaffDepartmentRelated> list = staffDepartmentRelatedService.listByDepartmentId(department.getDepartmentId());
// List<String> userIdList = list.stream().filter(s->StringUtils.isNotBlank(s.getClerkCode())).map(s->s.getWxUserId()).collect(Collectors.toList());
List
<
String
>
userIdList
=
new
ArrayList
<
String
>();
List
<
String
>
storeIds
=
new
ArrayList
<
String
>();
storeIds
.
add
(
storeId
);
List
<
String
>
clerkList
=
clerkService
.
getclerkListByStoreIds
(
storeIds
);
List
<
StaffClerkRelationDTO
>
staffRelationList
=
staffClerkRelationService
.
listByClerkIds
(
clerkList
);
Map
<
String
,
StaffClerkRelationDTO
>
clerkIdMap
=
staffRelationList
.
stream
().
filter
(
s
->
s
.
getClerkId
()!=
null
).
collect
(
Collectors
.
toMap
(
StaffClerkRelationDTO:
:
getClerkId
,
s
->
s
));
Set
<
String
>
keySet
=
clerkIdMap
.
keySet
();
for
(
String
clerkId
:
clerkList
)
{
if
(
keySet
.
contains
(
clerkId
)){
userIdList
.
add
(
clerkIdMap
.
get
(
clerkId
).
getWxUserId
());
}
}
List
<
TabHaobanStaffDepartmentRelated
>
list
=
staffDepartmentRelatedService
.
listByDepartmentId
(
department
.
getDepartmentId
());
List
<
String
>
userIdList
=
list
.
stream
().
filter
(
s
->
StringUtils
.
isNotBlank
(
s
.
getClerkCode
())).
map
(
s
->
s
.
getWxUserId
()).
collect
(
Collectors
.
toList
());
return
userIdList
;
}
...
...
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