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 f0d9efa6
authored
Mar 23, 2026
by
谢海旭
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
v5.7.0版本 飞行督导
1 parent
64740ed3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
3 deletions
rpc-dj-supervisor/src/main/java/cn/com/glsx/dj/supervisor/service/SupervisorLearningCenterService.java
rpc-dj-supervisor/src/main/java/cn/com/glsx/dj/supervisor/service/SupervisorTaskInfoService.java
rpc-dj-supervisor/src/main/java/cn/com/glsx/dj/supervisor/service/SupervisorLearningCenterService.java
View file @
f0d9efa
...
...
@@ -44,7 +44,12 @@ public class SupervisorLearningCenterService {
private
MerchantStaffRemote
merchantStaffRemote
;
public
Page
<
CoursePageInfo
>
allCourse
(
RpcPagination
<
CourseSearchDTO
>
pagination
)
{
CourseSearchDTO
condition
=
pagination
.
getCondition
();
CourseSearchDTO
condition
=
pagination
.
getCondition
();
// Bug修复:condition 可能为 null,需初始化避免 NPE
if
(
condition
==
null
)
{
condition
=
new
CourseSearchDTO
();
pagination
.
setCondition
(
condition
);
}
condition
.
setCourseStatus
(
BeisenCourseStatusEnum
.
RELEASED
.
getCode
());
//分页查询
Page
<
CoursePageInfo
>
page
=
PageHelper
.
startPage
(
pagination
.
getPageNum
(),
pagination
.
getPageSize
());
...
...
@@ -65,8 +70,14 @@ public class SupervisorLearningCenterService {
return
false
;
}
List
<
String
>
phoneList
=
coursePushList
.
stream
().
map
(
CoursePushDTO:
:
getStoreManagerPhone
).
distinct
().
collect
(
Collectors
.
toList
());
List
<
BeiSenEmployeeListResonseDTO
>
employeeList
=
listEmployeeInfoByStaffPhone
(
phoneList
);
List
<
String
>
phoneList
=
coursePushList
.
stream
()
.
map
(
CoursePushDTO:
:
getStoreManagerPhone
)
// Bug修复:过滤掉 null 和空字符串的手机号,防止传入 listEmployeeInfoByStaffPhone 后引发断言异常
.
filter
(
phone
->
phone
!=
null
&&
!
phone
.
isEmpty
())
.
distinct
()
.
collect
(
Collectors
.
toList
());
List
<
BeiSenEmployeeListResonseDTO
>
employeeList
=
org
.
apache
.
commons
.
collections4
.
CollectionUtils
.
isEmpty
(
phoneList
)
?
null
:
listEmployeeInfoByStaffPhone
(
phoneList
);
Map
<
String
,
Integer
>
phoneUserIdMap
=
Collections
.
EMPTY_MAP
;
if
(
org
.
apache
.
commons
.
collections4
.
CollectionUtils
.
isNotEmpty
(
employeeList
))
{
//构建map
...
...
rpc-dj-supervisor/src/main/java/cn/com/glsx/dj/supervisor/service/SupervisorTaskInfoService.java
View file @
f0d9efa
...
...
@@ -211,6 +211,10 @@ public class SupervisorTaskInfoService {
req
.
setEndDate
(
DateUtil
.
endOfMonth
(
new
Date
()).
toDateStr
());
req
.
setMerchantIds
(
merchantIdList
);
List
<
EmployeeRanking
>
rawEmployeeData
=
supervisorDashboardService
.
getDashboardMetrics
(
req
);
// Bug修复:rawEmployeeData 可能为 null,直接 .stream() 会 NPE
if
(
rawEmployeeData
==
null
)
{
return
BigDecimal
.
ZERO
;
}
BigDecimal
monthlyOutput
=
rawEmployeeData
.
stream
()
.
map
(
EmployeeRanking:
:
getPersonalOutput
)
.
reduce
(
BigDecimal
.
ZERO
,
BigDecimal:
:
add
);
...
...
@@ -766,6 +770,11 @@ public class SupervisorTaskInfoService {
req
.
setEndDate
(
request
.
getEndDate
());
req
.
setNeedAiAnalysis
(
false
);
SupervisorDashboardVO
dashboardData
=
supervisorDashboardService
.
getDashboardData
(
req
);
// Bug修复:dashboardData 可能为 null,需做空判断,防止 NPE
if
(
dashboardData
==
null
)
{
log
.
warn
(
"获取Dashboard数据为null,supervisorPhone={}"
,
supervisorPhone
);
return
new
SupervisorDetailSummaryDTO
();
}
DashboardMetrics
metrics
=
dashboardData
.
getMetrics
();
SupervisorDetailSummaryDTO
summary
=
new
SupervisorDetailSummaryDTO
();
...
...
@@ -822,6 +831,11 @@ public class SupervisorTaskInfoService {
req
.
setEndDate
(
request
.
getEndDate
());
req
.
setNeedAiAnalysis
(
false
);
SupervisorDashboardVO
dashboardData
=
supervisorDashboardService
.
getDashboardData
(
req
);
// Bug修复:dashboardData 可能为 null,需做空判断,防止 NPE
if
(
dashboardData
==
null
)
{
log
.
warn
(
"获取Dashboard数据为null,supervisorPhone={}"
,
request
.
getSupervisorPhone
());
return
result
;
}
List
<
EmployeeRanking
>
employeeList
=
dashboardData
.
getEmployeeList
();
...
...
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