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 1194611e
authored
Mar 18, 2026
by
谢海旭
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
v5.7.0版本 飞行督导:AI分析生成调整
1 parent
6a98a448
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
24 deletions
rpc-dj-supervisor/src/main/java/cn/com/glsx/dj/supervisor/service/SupervisorAiAnalysisRecordService.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/SupervisorAiAnalysisRecordService.java
View file @
1194611
...
@@ -189,6 +189,7 @@ public class SupervisorAiAnalysisRecordService {
...
@@ -189,6 +189,7 @@ public class SupervisorAiAnalysisRecordService {
dashboardReq
.
setStartDate
(
date
);
dashboardReq
.
setStartDate
(
date
);
dashboardReq
.
setEndDate
(
date
);
dashboardReq
.
setEndDate
(
date
);
dashboardReq
.
setDateType
(
DATE_TYPE_RANGE
);
dashboardReq
.
setDateType
(
DATE_TYPE_RANGE
);
dashboardReq
.
setNeedAiAnalysis
(
Boolean
.
FALSE
);
// 3. 查询业绩数据
// 3. 查询业绩数据
SupervisorDashboardVO
performanceVO
=
supervisorDashboardService
.
getDashboardData
(
dashboardReq
);
SupervisorDashboardVO
performanceVO
=
supervisorDashboardService
.
getDashboardData
(
dashboardReq
);
...
@@ -318,14 +319,14 @@ public class SupervisorAiAnalysisRecordService {
...
@@ -318,14 +319,14 @@ public class SupervisorAiAnalysisRecordService {
// ============================= 内容格式化 =============================
// ============================= 内容格式化 =============================
/**
/**
* 组装单个员工的个人综合数据为纯文本格式:
* 组装单个员工的个人综合数据为纯文本格式
,所有字段直接取 EmployeeRanking 原始值
:
* <pre>
* <pre>
* name:张三,
* name:张三,
* 个人产值:2000,
* 个人产值:2000,
* 个人客单价:600,
* 个人客单价:600,
* 转化率:70%,
* 转化率:70%,
* 成交数:28,
* 成交数:28,
*
录音缺失
数:22,
*
战败
数:22,
* 总录音数:46,
* 总录音数:46,
* 录音缺失率:8%,
* 录音缺失率:8%,
* 学习时长:2h36,
* 学习时长:2h36,
...
@@ -341,42 +342,31 @@ public class SupervisorAiAnalysisRecordService {
...
@@ -341,42 +342,31 @@ public class SupervisorAiAnalysisRecordService {
// 姓名
// 姓名
sb
.
append
(
"name:"
).
append
(
employeeName
!=
null
?
employeeName
:
""
).
append
(
",\n"
);
sb
.
append
(
"name:"
).
append
(
employeeName
!=
null
?
employeeName
:
""
).
append
(
",\n"
);
// 业绩数据
// 业绩数据
(直接取原始值)
BigDecimal
personalOutput
=
perf
!=
null
&&
perf
.
getPersonalOutput
()
!=
null
BigDecimal
personalOutput
=
perf
!=
null
&&
perf
.
getPersonalOutput
()
!=
null
?
perf
.
getPersonalOutput
()
:
BigDecimal
.
ZERO
;
?
perf
.
getPersonalOutput
()
:
BigDecimal
.
ZERO
;
BigDecimal
personalUnitPrice
=
perf
!=
null
&&
perf
.
getPersonalUnitPrice
()
!=
null
BigDecimal
personalUnitPrice
=
perf
!=
null
&&
perf
.
getPersonalUnitPrice
()
!=
null
?
perf
.
getPersonalUnitPrice
()
:
BigDecimal
.
ZERO
;
?
perf
.
getPersonalUnitPrice
()
:
BigDecimal
.
ZERO
;
// personalConversion 为小数(如 0.70),格式化为百分比
BigDecimal
personalConversion
=
perf
!=
null
&&
perf
.
getPersonalConversion
()
!=
null
BigDecimal
personalConversion
=
perf
!=
null
&&
perf
.
getPersonalConversion
()
!=
null
?
perf
.
getPersonalConversion
()
:
BigDecimal
.
ZERO
;
?
perf
.
getPersonalConversion
()
:
BigDecimal
.
ZERO
;
sb
.
append
(
"个人产值:"
).
append
(
personalOutput
.
setScale
(
0
,
BigDecimal
.
ROUND_HALF_UP
).
toPlainString
()).
append
(
",\n"
);
sb
.
append
(
"个人产值:"
).
append
(
personalOutput
.
toPlainString
()).
append
(
",\n"
);
sb
.
append
(
"个人客单价:"
).
append
(
personalUnitPrice
.
setScale
(
0
,
BigDecimal
.
ROUND_HALF_UP
).
toPlainString
()).
append
(
",\n"
);
sb
.
append
(
"个人客单价:"
).
append
(
personalUnitPrice
.
toPlainString
()).
append
(
",\n"
);
sb
.
append
(
"转化率:"
).
append
(
formatPercent
(
personalConversion
)).
append
(
",\n"
);
sb
.
append
(
"转化率:"
).
append
(
formatPercent
(
personalConversion
)).
append
(
",\n"
);
// 行为数据
// 行为数据
(直接取 EmployeeRanking 原始字段,不做任何计算)
int
dealCount
=
behav
!=
null
&&
behav
.
getDealCount
()
!=
null
?
behav
.
getDealCount
()
:
0
;
int
dealCount
=
behav
!=
null
&&
behav
.
getDealCount
()
!=
null
?
behav
.
getDealCount
()
:
0
;
int
defeatCount
=
behav
!=
null
&&
behav
.
getDefeatCount
()
!=
null
?
behav
.
getDefeatCount
()
:
0
;
int
recordingCount
=
behav
!=
null
&&
behav
.
getRecordingCount
()
!=
null
?
behav
.
getRecordingCount
()
:
0
;
int
recordingCount
=
behav
!=
null
&&
behav
.
getRecordingCount
()
!=
null
?
behav
.
getRecordingCount
()
:
0
;
// missingRate 已是百分比数值(如 8.00 表示 8%),直接拼 % 后缀
BigDecimal
missingRate
=
behav
!=
null
&&
behav
.
getMissingRate
()
!=
null
BigDecimal
missingRate
=
behav
!=
null
&&
behav
.
getMissingRate
()
!=
null
?
behav
.
getMissingRate
()
:
BigDecimal
.
ZERO
;
?
behav
.
getMissingRate
()
:
BigDecimal
.
ZERO
;
// 录音缺失数 = 录音缺失率 * (总录音数 / (1 - 录音缺失率)),
// 由于 missingRate 已经是 (缺失数/线索数)*100,总录音数即已知,
// 简化为:缺失数 ≈ recordingCount * missingRate / (100 - missingRate),不精确时直接展示率
// 实际取 getRecordingStats 里的 leadCount - recordingCount;此处用 missingRate 反推近似值
int
missingCount
=
0
;
BigDecimal
hundred
=
new
BigDecimal
(
"100"
);
BigDecimal
denominator
=
hundred
.
subtract
(
missingRate
);
if
(
denominator
.
compareTo
(
BigDecimal
.
ZERO
)
>
0
&&
recordingCount
>
0
)
{
missingCount
=
missingRate
.
multiply
(
new
BigDecimal
(
recordingCount
))
.
divide
(
denominator
,
0
,
BigDecimal
.
ROUND_HALF_UP
).
intValue
();
}
int
totalRecording
=
recordingCount
+
missingCount
;
sb
.
append
(
"成交数:"
).
append
(
dealCount
).
append
(
",\n"
);
sb
.
append
(
"成交数:"
).
append
(
dealCount
).
append
(
",\n"
);
sb
.
append
(
"
录音缺失数:"
).
append
(
missing
Count
).
append
(
",\n"
);
sb
.
append
(
"
战败数:"
).
append
(
defeat
Count
).
append
(
",\n"
);
sb
.
append
(
"总录音数:"
).
append
(
totalRecording
).
append
(
",\n"
);
sb
.
append
(
"总录音数:"
).
append
(
recordingCount
).
append
(
",\n"
);
sb
.
append
(
"录音缺失率:"
).
append
(
formatPercent
(
missingRate
.
divide
(
hundred
,
4
,
BigDecimal
.
ROUND_HALF_UP
))
).
append
(
",\n"
);
sb
.
append
(
"录音缺失率:"
).
append
(
missingRate
.
setScale
(
0
,
BigDecimal
.
ROUND_HALF_UP
).
toPlainString
()).
append
(
"%"
).
append
(
",\n"
);
// 培训数据
// 培训数据
(直接取原始值)
BigDecimal
studyHours
=
train
!=
null
?
train
.
getStudyHours
()
:
null
;
BigDecimal
studyHours
=
train
!=
null
?
train
.
getStudyHours
()
:
null
;
int
completedCourses
=
train
!=
null
&&
train
.
getCompletedCourses
()
!=
null
?
train
.
getCompletedCourses
()
:
0
;
int
completedCourses
=
train
!=
null
&&
train
.
getCompletedCourses
()
!=
null
?
train
.
getCompletedCourses
()
:
0
;
int
coachingTimes
=
train
!=
null
&&
train
.
getCoachingTimes
()
!=
null
?
train
.
getCoachingTimes
()
:
0
;
int
coachingTimes
=
train
!=
null
&&
train
.
getCoachingTimes
()
!=
null
?
train
.
getCoachingTimes
()
:
0
;
...
...
rpc-dj-supervisor/src/main/java/cn/com/glsx/dj/supervisor/service/SupervisorTaskInfoService.java
View file @
1194611
...
@@ -759,6 +759,7 @@ public class SupervisorTaskInfoService {
...
@@ -759,6 +759,7 @@ public class SupervisorTaskInfoService {
req
.
setDateType
(
request
.
getDateType
());
req
.
setDateType
(
request
.
getDateType
());
req
.
setStartDate
(
request
.
getStartDate
());
req
.
setStartDate
(
request
.
getStartDate
());
req
.
setEndDate
(
request
.
getEndDate
());
req
.
setEndDate
(
request
.
getEndDate
());
req
.
setNeedAiAnalysis
(
false
);
SupervisorDashboardVO
dashboardData
=
supervisorDashboardService
.
getDashboardData
(
req
);
SupervisorDashboardVO
dashboardData
=
supervisorDashboardService
.
getDashboardData
(
req
);
DashboardMetrics
metrics
=
dashboardData
.
getMetrics
();
DashboardMetrics
metrics
=
dashboardData
.
getMetrics
();
...
@@ -814,6 +815,7 @@ public class SupervisorTaskInfoService {
...
@@ -814,6 +815,7 @@ public class SupervisorTaskInfoService {
req
.
setDateType
(
request
.
getDateType
());
req
.
setDateType
(
request
.
getDateType
());
req
.
setStartDate
(
request
.
getStartDate
());
req
.
setStartDate
(
request
.
getStartDate
());
req
.
setEndDate
(
request
.
getEndDate
());
req
.
setEndDate
(
request
.
getEndDate
());
req
.
setNeedAiAnalysis
(
false
);
SupervisorDashboardVO
dashboardData
=
supervisorDashboardService
.
getDashboardData
(
req
);
SupervisorDashboardVO
dashboardData
=
supervisorDashboardService
.
getDashboardData
(
req
);
List
<
EmployeeRanking
>
employeeList
=
dashboardData
.
getEmployeeList
();
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