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
9d215b68
Commit
9d215b68
authored
Feb 01, 2024
by
徐高华
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
成员列表导购查询
parent
2e013cfa
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
66 additions
and
0 deletions
+66
-0
StaffListDTO.java
...main/java/com/gic/haoban/manage/api/dto/StaffListDTO.java
+20
-0
StaffListBO.java
...va/com/gic/haoban/manage/service/pojo/bo/StaffListBO.java
+10
-0
StaffApiServiceImpl.java
.../manage/service/service/out/impl/StaffApiServiceImpl.java
+15
-0
StaffMapper.xml
...manage3-service/src/main/resources/mapper/StaffMapper.xml
+3
-0
StaffController.java
...com/gic/haoban/manage/web/controller/StaffController.java
+8
-0
StaffListQO.java
...c/main/java/com/gic/haoban/manage/web/qo/StaffListQO.java
+10
-0
No files found.
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/dto/StaffListDTO.java
View file @
9d215b68
...
...
@@ -69,6 +69,26 @@ public class StaffListDTO implements Serializable {
*/
private
String
endTime
;
private
String
staffId
;
private
String
loginEnterpriseId
;
public
String
getLoginEnterpriseId
()
{
return
loginEnterpriseId
;
}
public
void
setLoginEnterpriseId
(
String
loginEnterpriseId
)
{
this
.
loginEnterpriseId
=
loginEnterpriseId
;
}
public
String
getStaffId
()
{
return
staffId
;
}
public
void
setStaffId
(
String
staffId
)
{
this
.
staffId
=
staffId
;
}
public
String
getStartTime
()
{
return
startTime
;
}
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/pojo/bo/StaffListBO.java
View file @
9d215b68
...
...
@@ -73,6 +73,16 @@ public class StaffListBO implements Serializable {
*/
private
String
endTime
;
private
String
staffId
;
public
String
getStaffId
()
{
return
staffId
;
}
public
void
setStaffId
(
String
staffId
)
{
this
.
staffId
=
staffId
;
}
public
String
getStartTime
()
{
return
startTime
;
}
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/StaffApiServiceImpl.java
View file @
9d215b68
...
...
@@ -212,6 +212,13 @@ public class StaffApiServiceImpl implements StaffApiService {
//解决空指针异常问题
Map
<
String
,
String
>
map
=
list
.
stream
().
collect
(
HashMap:
:
new
,(
k
,
v
)
->
k
.
put
(
v
.
getEnterpriseId
(),
v
.
getEnterpriseName
()),
HashMap:
:
putAll
);
List
<
StaffClerkRelationDTO
>
relationDTOList
=
staffClerkRelationService
.
listByWxEnterpriseIdAndStaffId
(
wxEnterpriseId
,
staffIdList
);
String
loginEnterpriseId
=
staffListDTO
.
getLoginEnterpriseId
()
;
Map
<
String
,
ClerkDTO
>
clerkMap
=
new
HashMap
<>()
;
if
(
CollectionUtils
.
isNotEmpty
(
relationDTOList
))
{
Set
<
String
>
clerkIdSet
=
relationDTOList
.
stream
().
filter
(
o
->
o
.
getEnterpriseId
().
equals
(
loginEnterpriseId
)).
map
(
o
->
o
.
getClerkId
()).
collect
(
Collectors
.
toSet
())
;
List
<
ClerkDTO
>
clerkDTOS
=
this
.
clerkService
.
getClerkByIds
(
clerkIdSet
)
;
clerkMap
.
putAll
(
clerkDTOS
.
stream
().
collect
(
Collectors
.
toMap
(
o
->
o
.
getClerkId
(),
o
->
o
,(
k1
,
k2
)->
k1
)));
}
staffDTOList
.
forEach
(
one
->
{
if
(
relationIdList
.
contains
(
one
.
getStaffId
())){
one
.
setRelationFlag
(
1
);
...
...
@@ -220,6 +227,14 @@ public class StaffApiServiceImpl implements StaffApiService {
for
(
StaffClerkRelationDTO
dto
:
relationDTOList
){
if
(
dto
.
getStaffId
().
equals
(
one
.
getStaffId
())){
enterpriseNameList
.
add
(
map
.
get
(
dto
.
getEnterpriseId
()));
if
(
null
!=
clerkMap
.
get
(
dto
.
getClerkId
()))
{
String
c
=
one
.
getClerkCode
()
;
if
(
StringUtils
.
isBlank
(
c
))
{
one
.
setClerkCode
(
clerkMap
.
get
(
dto
.
getClerkId
()).
getClerkCode
());
}
else
{
one
.
setClerkCode
(
c
+
"、"
+
clerkMap
.
get
(
dto
.
getClerkId
()).
getClerkCode
());
}
}
}
}
if
(
CollUtil
.
isNotEmpty
(
enterpriseNameList
)){
...
...
haoban-manage3-service/src/main/resources/mapper/StaffMapper.xml
View file @
9d215b68
...
...
@@ -308,6 +308,9 @@
left join tab_haoban_staff_department_related b on a.staff_id = b.staff_id and b.status_flag = 1
</if>
where a.wx_enterprise_id = #{wxEnterpriseId}
<if
test=
"null != staffId"
>
and a.staff_id = #{staffId}
</if>
<if
test=
"occupy == null or 1!=occupy"
>
and a.status_flag = 1
</if>
...
...
haoban-manage3-web/src/main/java/com/gic/haoban/manage/web/controller/StaffController.java
View file @
9d215b68
...
...
@@ -135,6 +135,13 @@ public class StaffController extends WebBaseController {
}
//员工
StaffListDTO
dto
=
EntityUtil
.
changeEntityByJSON
(
StaffListDTO
.
class
,
qo
);
if
(
StringUtils
.
isNotBlank
(
qo
.
getClerkId
()))
{
StaffClerkRelationDTO
clerkRelationDTO
=
this
.
staffClerkRelationApiService
.
getByClerkId
(
qo
.
getClerkId
())
;
if
(
null
==
clerkRelationDTO
)
{
return
resultResponse
(
HaoBanErrCode
.
ERR_1
,
PageUtil
.
getPageInfo
(
new
Page
<>()));
}
dto
.
setStaffId
(
clerkRelationDTO
.
getStaffId
());
}
dto
.
setWxEnterpriseId
(
wxEnterpriseId
);
dto
.
setDepartmentIds
(
departmentIds
);
if
(
qo
.
getGetAllFlag
()
==
1
){
...
...
@@ -144,6 +151,7 @@ public class StaffController extends WebBaseController {
basePageInfo
.
setPageSize
(
Integer
.
MAX_VALUE
);
dto
.
setPageInfo
(
basePageInfo
);
}
dto
.
setLoginEnterpriseId
(
login
.
getEnterpriseId
());
Page
<
StaffDTO
>
page
=
staffApiService
.
pageStaff
(
dto
);
logger
.
info
(
"pages={},totalPage={}"
,
page
.
getCurrentPage
(),
page
.
getTotalPage
());
...
...
haoban-manage3-web/src/main/java/com/gic/haoban/manage/web/qo/StaffListQO.java
View file @
9d215b68
...
...
@@ -63,6 +63,16 @@ public class StaffListQO implements Serializable {
*/
private
Integer
getAllFlag
=
0
;
private
String
clerkId
;
public
String
getClerkId
()
{
return
clerkId
;
}
public
void
setClerkId
(
String
clerkId
)
{
this
.
clerkId
=
clerkId
;
}
public
Integer
getGetAllFlag
()
{
return
getAllFlag
;
}
...
...
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