Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
dj
/
rpc-dj-supervisor
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit d47dbc6d
authored
Mar 23, 2026
by
谢海旭
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
v5.7.0版本 飞行督导
1 parent
a08de2fb
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
4 deletions
rpc-dj-supervisor/src/main/java/cn/com/glsx/dj/supervisor/service/SupervisorEmployeeTrainingInfoService.java
rpc-dj-supervisor/src/test/java/cn/com/glsx/dj/supervisor/service/SupervisorEmployeeTrainingInfoServiceTest.java
rpc-dj-supervisor/src/main/java/cn/com/glsx/dj/supervisor/service/SupervisorEmployeeTrainingInfoService.java
View file @
d47dbc6
...
...
@@ -86,10 +86,26 @@ public class SupervisorEmployeeTrainingInfoService {
}
List
<
BeiSenEmployeeListResonseDTO
>
beiSenEmployeeList
=
supervisorLearningCenterService
.
listEmployeeInfoByStaffPhone
(
phoneList
);
List
<
Integer
>
beiSenUserIdList
=
beiSenEmployeeList
.
stream
().
map
(
beiSenEmployeeListResonseDTO
->
beiSenEmployeeListResonseDTO
.
getUserID
()).
collect
(
Collectors
.
toList
());
// Bug修复:listEmployeeInfoByStaffPhone 可能返回 null,需做空判断,防止 NPE
if
(
CollectionUtils
.
isEmpty
(
beiSenEmployeeList
))
{
log
.
warn
(
"北森未找到对应员工信息,supervisorPhone={}"
,
request
.
getSupervisorPhone
());
return
new
ArrayList
<>();
}
List
<
Integer
>
beiSenUserIdList
=
beiSenEmployeeList
.
stream
()
.
map
(
BeiSenEmployeeListResonseDTO:
:
getUserID
)
.
filter
(
id
->
id
!=
null
)
.
collect
(
Collectors
.
toList
());
Map
<
Integer
,
MapperQueryEmployeeTrainingInfoDTO
>
studyHoursMap
=
supervisorTaskInfoMapper
.
queryStudyHours
(
beiSenUserIdList
,
request
.
getStartDate
(),
request
.
getEndDate
());
Map
<
Integer
,
MapperQueryEmployeeTrainingInfoDTO
>
completedCoursesMap
=
supervisorTaskInfoMapper
.
queryCompletedCourses
(
beiSenUserIdList
,
request
.
getStartDate
(),
request
.
getEndDate
());
Map
<
Integer
,
MapperQueryEmployeeTrainingInfoDTO
>
studyHoursMap
;
Map
<
Integer
,
MapperQueryEmployeeTrainingInfoDTO
>
completedCoursesMap
;
// Bug修复:beiSenUserIdList 可能为空,避免传空列表到 SQL 的 IN 子句导致语法错误
if
(
CollectionUtils
.
isEmpty
(
beiSenUserIdList
))
{
studyHoursMap
=
new
java
.
util
.
HashMap
<>();
completedCoursesMap
=
new
java
.
util
.
HashMap
<>();
}
else
{
studyHoursMap
=
supervisorTaskInfoMapper
.
queryStudyHours
(
beiSenUserIdList
,
request
.
getStartDate
(),
request
.
getEndDate
());
completedCoursesMap
=
supervisorTaskInfoMapper
.
queryCompletedCourses
(
beiSenUserIdList
,
request
.
getStartDate
(),
request
.
getEndDate
());
}
Map
<
String
,
MapperQueryEmployeeTrainingInfoDTO
>
coachingTimesMap
=
supervisorTaskInfoMapper
.
queryCoachingTimes
(
phoneList
,
request
.
getStartDate
(),
request
.
getEndDate
());
List
<
EmployeeTrainingInfoDTO
>
employeeTrainingInfoList
=
beiSenEmployeeList
.
stream
().
map
(
beiSenEmployeeListResonseDTO
->
{
...
...
rpc-dj-supervisor/src/test/java/cn/com/glsx/dj/supervisor/service/SupervisorEmployeeTrainingInfoServiceTest.java
View file @
d47dbc6
...
...
@@ -25,9 +25,10 @@ public class SupervisorEmployeeTrainingInfoServiceTest extends BaseServiceTest {
@Test
public
void
testGetAllEmployeeTrainingInfo
()
{
EmployeeTrainingInfoRequestDTO
request
=
new
EmployeeTrainingInfoRequestDTO
();
request
.
setSupervisorPhone
(
"13603070903"
);
request
.
setStartDate
(
"2021-03-12"
);
request
.
setEndDate
(
"2026-03-12"
);
request
.
setStoreManagerPhone
(
"1313211212
6
"
);
request
.
setStoreManagerPhone
(
"1313211212
5
"
);
request
.
setSortField
(
1
);
request
.
setSortOrder
(
1
);
List
<
EmployeeTrainingInfoDTO
>
trainingInfo
=
supervisorEmployeeTrainingInfoService
.
getAllEmployeeTrainingInfo
(
request
);
...
...
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