Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
dj
/
rpc-dj-pe-analysis
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 af4017e1
authored
Jun 17, 2026
by
章家宝
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
feat:hrbp取数需求
1 parent
81801610
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
70 additions
and
38 deletions
rpc-dj-pe-analysis/pom.xml
rpc-dj-pe-analysis/src/main/java/cn/com/glsx/dj/peanalysis/config/DubboConfig.java
rpc-dj-pe-analysis/src/main/java/cn/com/glsx/dj/peanalysis/service/MerchantBiFollowService.java
rpc-dj-pe-analysis/src/main/java/cn/com/glsx/dj/peanalysis/service/MerchantHrbpRelationService.java
rpc-dj-pe-analysis/pom.xml
View file @
af4017e
...
...
@@ -48,6 +48,11 @@
<artifactId>
rpc-dj-smartcarlife-api
</artifactId>
<version>
${smartcarlife.api.version}
</version>
</dependency>
<dependency>
<groupId>
cn.com.glsx.dj
</groupId>
<artifactId>
rpc-dj-staff-api
</artifactId>
<version>
5.8.3-SNAPSHOT
</version>
</dependency>
<!--
<dependency>
<groupId>cn.com.glsx.dj</groupId>
...
...
rpc-dj-pe-analysis/src/main/java/cn/com/glsx/dj/peanalysis/config/DubboConfig.java
View file @
af4017e
package
cn
.
com
.
glsx
.
dj
.
peanalysis
.
config
;
import
cn.com.glsx.dj.smartcarlife.remote.StaffInfoRemote
;
import
cn.com.glsx.dj.staff.remote.RecruitmentDemandRemote
;
import
cn.com.glsx.dj.strategy.remote.StrategyInfoRemote
;
import
cn.com.glsx.dj.strategy.remote.WarningEngineRemote
;
import
cn.com.glsx.dj.supervisor.remote.SupervisorTaskInfoRemote
;
...
...
@@ -51,5 +52,14 @@ public class DubboConfig {
public
WarningEngineRemote
warningEngineRemote
(){
return
factory
.
builder
(
WarningEngineRemote
.
class
).
check
(
check
).
timeout
(
timeout
).
version
(
"1.0.0"
).
build
();
}
@Bean
public
RecruitmentDemandRemote
recruitmentDemandRemote
()
{
return
factory
.
builder
(
RecruitmentDemandRemote
.
class
)
.
check
(
check
)
.
timeout
(
timeout
)
.
version
(
"1.0.0"
)
.
build
();
}
}
rpc-dj-pe-analysis/src/main/java/cn/com/glsx/dj/peanalysis/service/MerchantBiFollowService.java
View file @
af4017e
...
...
@@ -544,18 +544,14 @@ public class MerchantBiFollowService {
?
new
HashMap
<>()
:
settings
.
stream
().
collect
(
Collectors
.
toMap
(
StoreSettingDTO:
:
getMerchantId
,
s
->
s
,
(
s1
,
s2
)
->
s1
));
// 查询招聘负责人
Set
<
String
>
regionalOperationUuids
=
new
LinkedHashSet
<>();
if
(
CollectionUtils
.
isNotEmpty
(
settings
))
{
settings
.
stream
()
.
map
(
StoreSettingDTO:
:
getRegionalOperationId
)
.
filter
(
StringUtils:
:
isNotBlank
)
.
forEach
(
ids
->
Arrays
.
stream
(
ids
.
split
(
","
))
.
map
(
String:
:
trim
)
.
filter
(
StringUtils:
:
isNotBlank
)
.
forEach
(
regionalOperationUuids:
:
add
));
}
Map
<
String
,
Pair
<
String
,
String
>>
uuidToHrbpMap
=
merchantHrbpRelationService
.
buildRegionalOperationUuidToHrbpMap
(
regionalOperationUuids
,
businessType
);
// 查询招聘负责人(基于省份)
List
<
String
>
provinceNames
=
items
.
stream
()
.
map
(
MyFollowResponse:
:
getProvinceName
)
.
filter
(
StringUtils:
:
isNotBlank
)
.
distinct
()
.
collect
(
Collectors
.
toList
());
Map
<
String
,
Pair
<
String
,
String
>>
provinceToHrbpMap
=
merchantHrbpRelationService
.
buildProvinceToHrbpMap
(
new
LinkedHashSet
<>(
provinceNames
));
log
.
info
(
"查询招聘负责人:省份数={}, 映射数={}"
,
provinceNames
.
size
(),
provinceToHrbpMap
.
size
());
// 根据省份名称匹配技师督导属性,通过查询表 dj_car_life_recruitment_technical_supervisor_mapping (仅轻改场景)
List
<
String
>
provinceNameList
=
items
.
stream
()
...
...
@@ -587,31 +583,12 @@ public class MerchantBiFollowService {
item
.
setRegionalSupervisorId
(
setting
.
getRegionalSupervisorId
());
}
if
(
setting
!=
null
&&
StringUtils
.
isNotBlank
(
setting
.
getRegionalOperationId
())
&&
!
uuidToHrbpMap
.
isEmpty
())
{
LinkedHashSet
<
String
>
hrbpNames
=
new
LinkedHashSet
<>();
LinkedHashSet
<
String
>
hrbpPhones
=
new
LinkedHashSet
<>();
Arrays
.
stream
(
setting
.
getRegionalOperationId
().
split
(
","
))
.
map
(
String:
:
trim
)
.
filter
(
StringUtils:
:
isNotBlank
)
.
forEach
(
uuid
->
{
Pair
<
String
,
String
>
hrbpInfo
=
uuidToHrbpMap
.
get
(
uuid
);
if
(
hrbpInfo
==
null
)
{
return
;
}
String
hrbpName
=
hrbpInfo
.
getKey
();
String
hrbpPhone
=
hrbpInfo
.
getValue
();
if
(
StringUtils
.
isNotBlank
(
hrbpName
))
{
hrbpNames
.
add
(
hrbpName
);
}
if
(
StringUtils
.
isNotBlank
(
hrbpPhone
))
{
hrbpPhones
.
add
(
hrbpPhone
);
}
});
if
(!
hrbpNames
.
isEmpty
())
{
item
.
setRecruitmentManager
(
String
.
join
(
"/"
,
hrbpNames
));
}
if
(!
hrbpPhones
.
isEmpty
())
{
item
.
setRecruitmentManagerId
(
String
.
join
(
"/"
,
hrbpPhones
));
// 基于省份填充招聘负责人
if
(
StringUtils
.
isNotBlank
(
item
.
getProvinceName
())
&&
!
provinceToHrbpMap
.
isEmpty
())
{
Pair
<
String
,
String
>
hrbpInfo
=
provinceToHrbpMap
.
get
(
item
.
getProvinceName
());
if
(
hrbpInfo
!=
null
)
{
item
.
setRecruitmentManager
(
hrbpInfo
.
getKey
());
item
.
setRecruitmentManagerId
(
hrbpInfo
.
getValue
());
}
}
...
...
rpc-dj-pe-analysis/src/main/java/cn/com/glsx/dj/peanalysis/service/MerchantHrbpRelationService.java
View file @
af4017e
package
cn
.
com
.
glsx
.
dj
.
peanalysis
.
service
;
import
cn.com.glsx.dj.peanalysis.mapper.ServiceMerchantMapper
;
import
cn.com.glsx.dj.staff.model.RecruitmentProvinceHrbpRelation
;
import
cn.com.glsx.dj.staff.remote.RecruitmentDemandRemote
;
import
cn.com.glsx.framework.core.beans.rpc.RpcResponse
;
import
cn.hutool.core.lang.Pair
;
import
cn.com.glsx.merchants.model.request.MerchantStaffRequest
;
...
...
@@ -25,6 +27,42 @@ public class MerchantHrbpRelationService {
@Autowired
private
ServiceMerchantMapper
serviceMerchantMapper
;
@Autowired
private
RecruitmentDemandRemote
recruitmentDemandRemote
;
/**
* 基于省份获取HRBP映射
*
* @param provinceNames 省份名称集合
* @return provinceName -> (hrbpName, hrbpPhone)
*/
public
Map
<
String
,
Pair
<
String
,
String
>>
buildProvinceToHrbpMap
(
Set
<
String
>
provinceNames
)
{
if
(
CollectionUtils
.
isEmpty
(
provinceNames
))
{
return
Collections
.
emptyMap
();
}
long
startMs
=
System
.
currentTimeMillis
();
Map
<
String
,
Pair
<
String
,
String
>>
result
=
new
HashMap
<>();
try
{
RecruitmentProvinceHrbpRelation
condition
=
new
RecruitmentProvinceHrbpRelation
();
RpcResponse
<
List
<
RecruitmentProvinceHrbpRelation
>>
response
=
recruitmentDemandRemote
.
listProvinceHrbpRelation
(
condition
);
if
(
response
!=
null
&&
response
.
isSuccess
()
&&
response
.
hasResult
())
{
response
.
getResult
().
forEach
(
relation
->
{
if
(
StringUtils
.
isNotBlank
(
relation
.
getProvinceName
())
&&
StringUtils
.
isNotBlank
(
relation
.
getHrbpName
()))
{
result
.
put
(
relation
.
getProvinceName
(),
Pair
.
of
(
relation
.
getHrbpName
(),
relation
.
getHrbpPhone
()));
}
});
}
}
catch
(
Exception
e
)
{
log
.
warn
(
"HRBP省份映射查询失败,provinceNames={}"
,
provinceNames
,
e
);
}
log
.
info
(
"HRBP省份映射查询完成:请求数={}, 返回数={}, 耗时={}ms"
,
provinceNames
.
size
(),
result
.
size
(),
System
.
currentTimeMillis
()
-
startMs
);
return
result
;
}
/**
* 招聘负责人关联:
* 区域运营 uuid -> 区域运营手机号 -> 招聘负责人(HRBP)信息。
...
...
@@ -34,7 +72,9 @@ public class MerchantHrbpRelationService {
* @param regionalOperationUuids 区域运营 uuid 集合
* @param businessType 业务类型,仅用于日志定位
* @return uuid -> (hrbpName, hrbpPhone)
* @deprecated 已改为基于省份映射,请使用 {@link #buildProvinceToHrbpMap(Set)}
*/
@Deprecated
public
Map
<
String
,
Pair
<
String
,
String
>>
buildRegionalOperationUuidToHrbpMap
(
Set
<
String
>
regionalOperationUuids
,
Byte
businessType
)
{
if
(
CollectionUtils
.
isEmpty
(
regionalOperationUuids
))
{
return
Collections
.
emptyMap
();
...
...
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