Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
dj
/
rpc-mindworkplate
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit d3821d2f
authored
Jan 06, 2026
by
林永健
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
refactor(digitalmanagement): 优化员工信息查询逻辑
- 去除轻改模板和督导查询的条件判断,统一通过staffRecordMapper获取员工信息
1 parent
c18875f8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
28 deletions
rpc-dj-mindworkplate/src/main/java/cn/com/glsx/dj/mindworkplate/service/digitalmanagement/DigitalManagementTemplateService.java
rpc-dj-mindworkplate/src/main/java/cn/com/glsx/dj/mindworkplate/service/digitalmanagement/DigitalManagementTemplateService.java
View file @
d3821d2
...
@@ -274,37 +274,17 @@ public class DigitalManagementTemplateService {
...
@@ -274,37 +274,17 @@ public class DigitalManagementTemplateService {
p
->
DigitalManagementStaffInfoDTO
.
buildByMerchantStaff
(
p
),
p
->
DigitalManagementStaffInfoDTO
.
buildByMerchantStaff
(
p
),
(
p1
,
p2
)
->
p2
));
(
p1
,
p2
)
->
p2
));
}
else
{
}
else
{
boolean
isLightChangeTemplate
=
staffRecordService
.
isLightChangeTemplate
(
templateDTO
.
getCode
());
DigitalManagementStaffRequestDTO
staffRequestDTO
=
new
DigitalManagementStaffRequestDTO
();
// 轻改模板:查所有驻店
staffRequestDTO
.
setStaffUuidList
(
staffUuids
);
if
(
isLightChangeTemplate
)
{
List
<
DigitalManagementStaffResponseDTO
>
staffResponseDTOS
=
staffRecordMapper
.
selectStaffInfo
(
staffRequestDTO
);
DigitalManagementStaffRequestDTO
staffRequestDTO
=
new
DigitalManagementStaffRequestDTO
();
if
(
CollectionUtils
.
isEmpty
(
staffResponseDTOS
))
{
staffRequestDTO
.
setStaffUuidList
(
staffUuids
);
log
.
error
(
"获取轻改驻店员工信息失败! req:{}"
,
staffRequestDTO
);
List
<
DigitalManagementStaffResponseDTO
>
staffResponseDTOS
=
staffRecordMapper
.
selectStaffInfo
(
staffRequestDTO
);
if
(
CollectionUtils
.
isEmpty
(
staffResponseDTOS
))
{
log
.
error
(
"获取轻改驻店员工信息失败! req:{}"
,
staffRequestDTO
);
return
new
HashMap
<>();
}
return
staffResponseDTOS
.
stream
()
.
collect
(
Collectors
.
toMap
(
p
->
p
.
getStaffUuid
(),
p
->
new
DigitalManagementStaffInfoDTO
(
p
.
getStaffUuid
(),
p
.
getStaffName
(),
p
.
getStaffPhone
(),
p
.
getMerchantId
(),
p
.
getMerchantName
()),
(
p1
,
p2
)
->
p2
));
}
// 驻店管理查督导
ShopMerchantDirectorConfigDTO
req
=
ShopMerchantDirectorConfigDTO
.
builder
()
.
directorTypes
(
Lists
.
newArrayList
(
DirectorTypeEnum
.
AREA_SUPERVISION_1_1
.
getValue
(),
DirectorTypeEnum
.
AREA_SUPERVISION_2_1
.
getValue
()))
.
directorUserIdList
(
staffUuids
)
.
build
();
RpcResponse
<
List
<
ShopMerchantDirectorConfigDTO
>>
staffRes
=
shopMerchantDirectorConfigRemote
.
list
(
req
);
if
(
staffRes
.
isFailed
()
||
CollectionUtils
.
isEmpty
(
staffRes
.
getResult
()))
{
log
.
error
(
"获取员工信息失败! req:{},msg:{}"
,
req
,
staffRes
.
getMessage
());
return
new
HashMap
<>();
return
new
HashMap
<>();
}
}
return
staffRes
.
getResult
().
stream
()
return
staffResponseDTOS
.
stream
()
.
filter
(
p
->
StringUtils
.
hasLength
(
p
.
getDirectorUserId
())
&&
staffUuids
.
contains
(
p
.
getDirectorUserId
()))
.
collect
(
Collectors
.
toMap
(
.
collect
(
Collectors
.
toMap
(
p
->
p
.
get
DirectorUserI
d
(),
p
->
p
.
get
StaffUui
d
(),
p
->
new
DigitalManagementStaffInfoDTO
(
p
.
get
DirectorUserId
(),
p
.
getDirectorName
(),
p
.
getDirector
Phone
(),
p
.
getMerchantId
(),
p
.
getMerchantName
()),
p
->
new
DigitalManagementStaffInfoDTO
(
p
.
get
StaffUuid
(),
p
.
getStaffName
(),
p
.
getStaff
Phone
(),
p
.
getMerchantId
(),
p
.
getMerchantName
()),
(
p1
,
p2
)
->
p2
));
(
p1
,
p2
)
->
p2
));
}
}
}
}
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment