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 246fcf22
authored
Mar 13, 2026
by
zhouhaibao
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
[+]督导内容调整
1 parent
6e5b7b05
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
72 additions
and
35 deletions
rpc-dj-supervisor/pom.xml
rpc-dj-supervisor/src/main/java/cn/com/glsx/dj/supervisor/mapper/ExcellentCaseReviewMapper.java
rpc-dj-supervisor/src/main/java/cn/com/glsx/dj/supervisor/remote/ExcellentCaseReviewRemoteImpl.java
rpc-dj-supervisor/src/main/java/cn/com/glsx/dj/supervisor/remote/SupervisorDashboardRemoteImpl.java
rpc-dj-supervisor/src/main/java/cn/com/glsx/dj/supervisor/service/ExcellentCaseReviewService.java
rpc-dj-supervisor/src/main/java/cn/com/glsx/dj/supervisor/service/SupervisorDashboardService.java
rpc-dj-supervisor/pom.xml
View file @
246fcf2
...
...
@@ -57,7 +57,7 @@
<dependency>
<groupId>
cn.com.glsx.merchants
</groupId>
<artifactId>
platform-merchants-api
</artifactId>
<version>
5.6.
1
-SNAPSHOT
</version>
<version>
5.6.
0
-SNAPSHOT
</version>
</dependency>
<dependency>
<groupId>
cn.hutool
</groupId>
...
...
rpc-dj-supervisor/src/main/java/cn/com/glsx/dj/supervisor/mapper/ExcellentCaseReviewMapper.java
View file @
246fcf2
...
...
@@ -18,7 +18,7 @@ import java.util.List;
* - 客户类别列表查询
* </p>
*
* @author
fanfr
* @author
zhouhb
* @since 2026-03-12
*/
@Mapper
...
...
rpc-dj-supervisor/src/main/java/cn/com/glsx/dj/supervisor/remote/ExcellentCaseReviewRemoteImpl.java
View file @
246fcf2
...
...
@@ -24,7 +24,7 @@ import java.util.List;
* 统一处理异常并返回标准的RPC响应
* </p>
*
* @author
fanfr
* @author
zhouhb
* @since 2026-03-12
*/
@Slf4j
...
...
rpc-dj-supervisor/src/main/java/cn/com/glsx/dj/supervisor/remote/SupervisorDashboardRemoteImpl.java
View file @
246fcf2
...
...
@@ -5,7 +5,12 @@ import cn.com.glsx.dj.supervisor.service.SupervisorDashboardService;
import
cn.com.glsx.framework.core.beans.rpc.RpcResponse
;
import
cn.com.glsx.framework.core.enums.DefaultErrorEnum
;
import
cn.com.glsx.framework.core.exception.RpcServiceException
;
import
cn.com.glsx.framework.core.util.DateUtils
;
import
cn.com.glsx.merchants.dto.beisen.BeisenEmployeeInfoDTO
;
import
cn.com.glsx.merchants.remote.MerchantUserRemote
;
import
cn.hutool.core.date.DateUtil
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.dubbo.config.annotation.DubboReference
;
import
org.apache.dubbo.config.annotation.DubboService
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -22,7 +27,7 @@ import java.util.Map;
* 统一处理异常并返回标准的RPC响应
* </p>
*
* @author
fanfr
* @author
zhouhb
* @since 2026-03-12
*/
@Slf4j
...
...
@@ -32,6 +37,10 @@ public class SupervisorDashboardRemoteImpl implements SupervisorDashboardRemote
@Autowired
private
SupervisorDashboardService
supervisorDashboardService
;
// 北森员工信息服务
@DubboReference
(
version
=
"2.0.0"
,
check
=
false
,
timeout
=
5000
)
private
MerchantUserRemote
merchantUserRemote
;
/**
* 获取督导首页数据
* <p>
...
...
@@ -97,20 +106,56 @@ public class SupervisorDashboardRemoteImpl implements SupervisorDashboardRemote
try
{
log
.
info
(
"开始远程调用获取人员基础信息,请求参数:{}"
,
req
);
// 构建人员基础信息
// 1. 从员工ID中提取手机号(假设员工ID格式为:id_phone)
String
employeeId
=
req
.
getEmployeeId
();
String
phoneNumber
=
employeeId
.
split
(
"_"
)[
1
];
log
.
info
(
"提取员工手机号:{}"
,
phoneNumber
);
// 2. 调用北森接口获取人员基本信息
log
.
info
(
"调用北森接口获取人员基本信息,手机号:{}"
,
phoneNumber
);
List
<
String
>
phoneNumbers
=
new
ArrayList
<>();
phoneNumbers
.
add
(
phoneNumber
);
RpcResponse
<
List
<
BeisenEmployeeInfoDTO
>>
beisenResponse
=
merchantUserRemote
.
selectByPhones
(
phoneNumbers
);
// 3. 构建人员基础信息
EmployeeBasicInfoDTO
basicInfo
=
new
EmployeeBasicInfoDTO
();
basicInfo
.
setName
(
"周芳"
);
basicInfo
.
setPhone
(
"13812345678"
);
basicInfo
.
setBusiness
(
"延保"
);
basicInfo
.
setEntryDate
(
"2025-12-12"
);
basicInfo
.
setAge
(
33
);
basicInfo
.
setBirthday
(
"1993-03-26"
);
basicInfo
.
setEthnicity
(
"汉"
);
basicInfo
.
setOrigin
(
"陕西省/延安市"
);
basicInfo
.
setDepartment
(
"运营零售部门"
);
basicInfo
.
setPosition
(
"延保门店销售"
);
basicInfo
.
setManager
(
"XXX"
);
basicInfo
.
setGender
(
"女"
);
if
(
beisenResponse
.
isSuccess
()
&&
beisenResponse
.
getResult
()
!=
null
&&
!
beisenResponse
.
getResult
().
isEmpty
())
{
BeisenEmployeeInfoDTO
beisenInfo
=
beisenResponse
.
getResult
().
get
(
0
);
// 从北森信息中获取数据
basicInfo
.
setName
(
beisenInfo
.
getName
());
// 北森-人员-姓名
basicInfo
.
setPhone
(
beisenInfo
.
getMobilePhone
());
// 北森-人员-手机号码
if
(
beisenInfo
.
getEntryDate
()
!=
null
)
{
basicInfo
.
setEntryDate
(
DateUtils
.
formatDate
(
beisenInfo
.
getEntryDate
()));
// 北森-人员-入职日期
}
basicInfo
.
setAge
(
beisenInfo
.
getAge
());
// 北森-人员-年龄
if
(
beisenInfo
.
getBirthday
()
!=
null
)
{
basicInfo
.
setBirthday
(
DateUtils
.
formatDate
(
beisenInfo
.
getBirthday
()));
// 北森-人员-生日
}
basicInfo
.
setPosition
(
beisenInfo
.
getOIdJobPost
());
// 北森-人员-职位
basicInfo
.
setManager
(
beisenInfo
.
getDirectLeaderName
());
// 北森-人员-上级
log
.
info
(
"成功获取北森员工信息:{}"
,
beisenInfo
.
getName
());
}
else
{
log
.
warn
(
"未获取到北森员工信息,使用默认数据"
);
// 使用默认数据
basicInfo
.
setName
(
"周芳"
);
basicInfo
.
setPhone
(
phoneNumber
);
basicInfo
.
setEntryDate
(
"2025-12-12"
);
basicInfo
.
setAge
(
33
);
basicInfo
.
setBirthday
(
"1993-03-26"
);
basicInfo
.
setEthnicity
(
"汉"
);
basicInfo
.
setOrigin
(
"陕西省/延安市"
);
basicInfo
.
setDepartment
(
"运营零售部门"
);
basicInfo
.
setPosition
(
"延保门店销售"
);
basicInfo
.
setManager
(
"XXX"
);
basicInfo
.
setGender
(
"女"
);
}
// 4. 调用D+后台接口获取业务信息
log
.
info
(
"调用D+后台接口获取业务信息,员工ID:{}"
,
employeeId
);
// 模拟调用D+后台API获取业务信息
basicInfo
.
setBusiness
(
"延保"
);
// D+后台-人员管理-驻店管理-适配业务
log
.
info
(
"远程调用获取人员基础信息成功"
);
return
RpcResponse
.
success
(
basicInfo
);
...
...
@@ -120,27 +165,18 @@ public class SupervisorDashboardRemoteImpl implements SupervisorDashboardRemote
}
}
/**
* 获取个人业绩数据
* <p>
* 接收远程调用请求,返回个人业绩数据
* 包含门店数据和人员数据
* </p>
*
* @param req 查询参数
* @return RPC响应,包含个人业绩数据
*/
@Override
public
RpcResponse
<
EmployeePerformanceDTO
>
getEmployeePerformanceData
(
EmployeePerformanceReq
req
)
{
public
RpcResponse
<
EmployeePerformanceDTO
>
getEmployeePerformanceData
(
EmployeePerformanceReq
req
)
{
try
{
log
.
info
(
"开始远程调用获取个人业绩数据,请求参数:{}"
,
req
);
// 构建个人业绩数据
EmployeePerformanceDTO
performanceData
=
new
EmployeePerformanceDTO
();
// AI建议
performanceData
.
setAiSuggestion
(
"该员工学习时长领先但线索转化率低于平均水平,建议加强成交环节的实操带教"
);
// 门店数据
EmployeePerformanceDTO
.
StorePerformanceData
storeData
=
new
EmployeePerformanceDTO
.
StorePerformanceData
();
storeData
.
setTotalValue
(
15000
);
// 总产值(指标A036)
...
...
@@ -148,14 +184,14 @@ public class SupervisorDashboardRemoteImpl implements SupervisorDashboardRemote
storeData
.
setTotalCustomers
(
129
);
// 总触客数(指标A084)
storeData
.
setTotalDeals
(
101
);
// 总成交数(指标A075)
performanceData
.
setStoreData
(
storeData
);
// 人员数据
EmployeePerformanceDTO
.
EmployeeData
employeeData
=
new
EmployeePerformanceDTO
.
EmployeeData
();
employeeData
.
setTotalValue
(
93196
);
employeeData
.
setAveragePrice
(
11649.5
);
employeeData
.
setDailyPerformanceRate
(
"100%"
);
performanceData
.
setEmployeeData
(
employeeData
);
// 个人产值趋势
List
<
EmployeePerformanceDTO
.
TrendData
>
trendData
=
new
ArrayList
<>();
EmployeePerformanceDTO
.
TrendData
trend1
=
new
EmployeePerformanceDTO
.
TrendData
();
...
...
@@ -187,7 +223,7 @@ public class SupervisorDashboardRemoteImpl implements SupervisorDashboardRemote
trend7
.
setValue
(
20000
);
trendData
.
add
(
trend7
);
performanceData
.
setTrendData
(
trendData
);
log
.
info
(
"远程调用获取个人业绩数据成功"
);
return
RpcResponse
.
success
(
performanceData
);
}
catch
(
Exception
e
)
{
...
...
@@ -196,6 +232,7 @@ public class SupervisorDashboardRemoteImpl implements SupervisorDashboardRemote
}
}
/**
* 获取个人行为分析数据
* <p>
...
...
rpc-dj-supervisor/src/main/java/cn/com/glsx/dj/supervisor/service/ExcellentCaseReviewService.java
View file @
246fcf2
...
...
@@ -31,7 +31,7 @@ import java.util.List;
* 支持案例的生命周期管理:提交 -> 待审核 -> 通过/驳回
* </p>
*
* @author
fanfr
* @author
zhouhb
* @since 2026-03-12
*/
@Service
...
...
rpc-dj-supervisor/src/main/java/cn/com/glsx/dj/supervisor/service/SupervisorDashboardService.java
View file @
246fcf2
This diff is collapsed.
Click to expand it.
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