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
1be155f3
Commit
1be155f3
authored
Jun 11, 2020
by
fudahua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
绑定的staff信息
parent
7d5aeb4e
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
2 deletions
+28
-2
StaffController.java
...com/gic/haoban/manage/web/controller/StaffController.java
+8
-2
ClerkInfoVo.java
...c/main/java/com/gic/haoban/manage/web/vo/ClerkInfoVo.java
+20
-0
No files found.
haoban-manage3-web/src/main/java/com/gic/haoban/manage/web/controller/StaffController.java
View file @
1be155f3
...
@@ -33,6 +33,7 @@ import org.springframework.web.bind.annotation.RestController;
...
@@ -33,6 +33,7 @@ import org.springframework.web.bind.annotation.RestController;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
...
@@ -316,15 +317,20 @@ public class StaffController extends WebBaseController{
...
@@ -316,15 +317,20 @@ public class StaffController extends WebBaseController{
List
<
String
>
clerkIds
=
retList
.
stream
().
map
(
ClerkInfoVo:
:
getClerkId
).
collect
(
Collectors
.
toList
());
List
<
String
>
clerkIds
=
retList
.
stream
().
map
(
ClerkInfoVo:
:
getClerkId
).
collect
(
Collectors
.
toList
());
List
<
StaffClerkRelationDTO
>
dtos
=
staffClerkRelationApiService
.
listByClerkIds
(
clerkIds
);
List
<
StaffClerkRelationDTO
>
dtos
=
staffClerkRelationApiService
.
listByClerkIds
(
clerkIds
);
if
(
CollectionUtils
.
isNotEmpty
(
dtos
))
{
if
(
CollectionUtils
.
isNotEmpty
(
dtos
))
{
List
<
String
>
hasRelationClerkIds
=
dtos
.
stream
().
map
(
StaffClerkRelationDTO:
:
getClerkId
).
collect
(
Collectors
.
toList
(
));
Map
<
String
,
StaffClerkRelationDTO
>
hasRelationClerkIds
=
dtos
.
stream
().
collect
(
Collectors
.
toMap
(
StaffClerkRelationDTO:
:
getClerkId
,
mid
->
mid
));
retList
.
forEach
(
clerkInfoVo
->
{
retList
.
forEach
(
clerkInfoVo
->
{
if
(
hasRelationClerkIds
.
contains
(
clerkInfoVo
.
getClerkId
()))
{
if
(
hasRelationClerkIds
.
contains
Key
(
clerkInfoVo
.
getClerkId
()))
{
clerkInfoVo
.
setRelationStatus
(
1
);
clerkInfoVo
.
setRelationStatus
(
1
);
StaffDTO
staffDTO
=
staffApiService
.
selectById
(
hasRelationClerkIds
.
get
(
clerkInfoVo
.
getClerkId
()).
getStaffId
());
if
(
staffDTO
!=
null
)
{
clerkInfoVo
.
setStaffName
(
staffDTO
.
getStaffName
());
}
}
}
StoreDTO
store
=
storeService
.
getStore
(
clerkInfoVo
.
getStoreId
());
StoreDTO
store
=
storeService
.
getStore
(
clerkInfoVo
.
getStoreId
());
if
(
null
!=
store
)
{
if
(
null
!=
store
)
{
clerkInfoVo
.
setStoreName
(
store
.
getStoreName
());
clerkInfoVo
.
setStoreName
(
store
.
getStoreName
());
}
}
});
});
}
}
...
...
haoban-manage3-web/src/main/java/com/gic/haoban/manage/web/vo/ClerkInfoVo.java
View file @
1be155f3
...
@@ -16,6 +16,26 @@ public class ClerkInfoVo implements Serializable {
...
@@ -16,6 +16,26 @@ public class ClerkInfoVo implements Serializable {
private
String
storeId
;
private
String
storeId
;
private
String
storeName
;
private
String
storeName
;
private
Integer
relationStatus
=
0
;
private
Integer
relationStatus
=
0
;
private
String
staffId
;
private
String
staffName
;
public
String
getStaffId
()
{
return
staffId
;
}
public
void
setStaffId
(
String
staffId
)
{
this
.
staffId
=
staffId
;
}
public
String
getStaffName
()
{
return
staffName
;
}
public
void
setStaffName
(
String
staffName
)
{
this
.
staffName
=
staffName
;
}
public
String
getStoreId
()
{
public
String
getStoreId
()
{
return
storeId
;
return
storeId
;
...
...
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