Commit 90206707 by 黄炜

feat(recruitment): 试岗计划字段调整

1 parent 37ef038c
...@@ -289,6 +289,8 @@ public class RecruitmentDemandRemoteImpl implements RecruitmentDemandRemote{ ...@@ -289,6 +289,8 @@ public class RecruitmentDemandRemoteImpl implements RecruitmentDemandRemote{
public RpcResponse<String> trialOnboardingAdd(RecruitmentTrialOnboardingDTO dto) { public RpcResponse<String> trialOnboardingAdd(RecruitmentTrialOnboardingDTO dto) {
try { try {
recruitmentDemandService.trialOnboardingAdd(dto); recruitmentDemandService.trialOnboardingAdd(dto);
//试岗审批-给区域运营关联的人力推送企微通知
recruitmentDemandService.sendTrialOnboardingApprovalQWMessage(dto);
return RpcResponse.success("success"); return RpcResponse.success("success");
} catch (RpcServiceException e) { } catch (RpcServiceException e) {
log.error(e.getMessage(), e); log.error(e.getMessage(), e);
......
...@@ -1990,6 +1990,16 @@ public class RecruitmentDemandService { ...@@ -1990,6 +1990,16 @@ public class RecruitmentDemandService {
record.setTrialTime(dto.getTrialTime()); record.setTrialTime(dto.getTrialTime());
record.setChannelType(dto.getChannelType()); record.setChannelType(dto.getChannelType());
record.setChannelName(dto.getChannelName()); record.setChannelName(dto.getChannelName());
// 试岗门店商户号(4s店或园区店)
record.setStoreNo(dto.getStoreNo());
// 试岗门店名称
record.setStoreName(dto.getStoreName());
// 业务场景信息,JSON数组格式
record.setBizSceneInfo(dto.getBizSceneInfo());
// 驻店类型字典值
record.setResidentType(dto.getResidentType());
// 驻店类型字典名
record.setResidentTypeName(dto.getResidentTypeName());
record.setConfirmFlag("Y"); record.setConfirmFlag("Y");
record.setCreatedPhone(dto.getCreatedPhone()); record.setCreatedPhone(dto.getCreatedPhone());
record.setCreatedBy(dto.getCreatedBy()); record.setCreatedBy(dto.getCreatedBy());
...@@ -2047,6 +2057,16 @@ public class RecruitmentDemandService { ...@@ -2047,6 +2057,16 @@ public class RecruitmentDemandService {
update.setTrialTime(dto.getTrialTime()); update.setTrialTime(dto.getTrialTime());
update.setChannelType(dto.getChannelType()); update.setChannelType(dto.getChannelType());
update.setChannelName(dto.getChannelName()); update.setChannelName(dto.getChannelName());
// 试岗门店商户号(4s店或园区店)
update.setStoreNo(dto.getStoreNo());
// 试岗门店名称
update.setStoreName(dto.getStoreName());
// 业务场景信息,JSON数组格式
update.setBizSceneInfo(dto.getBizSceneInfo());
// 驻店类型字典值
update.setResidentType(dto.getResidentType());
// 驻店类型字典名
update.setResidentTypeName(dto.getResidentTypeName());
update.setUpdatedBy(dto.getUpdatedBy()); update.setUpdatedBy(dto.getUpdatedBy());
update.setUpdatedDate(new Date()); update.setUpdatedDate(new Date());
recruitmentTrialOnboardingMapper.updateByPrimaryKeySelective(update); recruitmentTrialOnboardingMapper.updateByPrimaryKeySelective(update);
...@@ -2547,4 +2567,73 @@ public class RecruitmentDemandService { ...@@ -2547,4 +2567,73 @@ public class RecruitmentDemandService {
} }
return allowedNums; return allowedNums;
} }
/**
* 试岗审批-给区域运营关联的人力(HRBP)推送企微通知
* 模板:你好,【区域运营姓名】在【XX门店】对【XX场景】发起了试岗审批,请及时处理审批。
* 区域运营姓名取招聘需求 region_operation_name;门店取试岗门店 storeName;
* 场景取该需求关联的 dj_car_life_scene.name(多个用"、"拼接);
* 接收人按 region_operation_name 关联 dj_car_life_recruitment_region_operation_hrbp_relation 取 hrbpPhone。
*
*/
@Async
public void sendTrialOnboardingApprovalQWMessage(RecruitmentTrialOnboardingDTO dto) {
try {
Integer demandId = dto.getDemandId();
String storeName = dto.getStoreName();
String bizSceneInfo = dto.getBizSceneInfo();
// 业务场景信息为JSON数组格式:[{"sceneCode":"xxx","sceneName":"xxx"}],提取sceneName用、拼接
String sceneNames = "";
if (StringUtils.isNotBlank(bizSceneInfo)) {
try {
JSONArray sceneArray = JSON.parseArray(bizSceneInfo);
if (sceneArray != null && !sceneArray.isEmpty()) {
sceneNames = sceneArray.stream()
.map(obj -> ((JSONObject) obj).getString("sceneName"))
.filter(StringUtils::isNotBlank)
.collect(Collectors.joining("、"));
}
} catch (Exception parseEx) {
log.warn("试岗审批通知-业务场景信息解析失败,bizSceneInfo:{}", bizSceneInfo, parseEx);
}
}
RecruitmentDemand demand = recruitmentDemandMapper.selectByPrimaryKey(demandId);
if (demand == null) {
log.error("试岗审批通知-招聘需求不存在,demandId:{}", demandId);
return;
}
String regionOperationName = demand.getRegionOperationName();
if (StringUtils.isBlank(regionOperationName)) {
log.error("试岗审批通知-招聘需求区域运营为空,demandId:{}", demandId);
return;
}
// 区域运营关联的人力
Example ohRelationExample = new Example(RecruitmentRegionOperationHrbpRelation.class);
ohRelationExample.createCriteria()
.andEqualTo("deletedFlag", BaseModel.DeletedFlagEnum.N.name())
.andEqualTo("regionOperationName", regionOperationName);
RecruitmentRegionOperationHrbpRelation relation = operHrbpRelationMapper.selectOneByExample(ohRelationExample);
if (relation == null || StringUtils.isBlank(relation.getHrbpPhone())) {
log.error("试岗审批通知-未找到区域运营关联的人力,demandId:{}, regionOperationName:{}", demandId, regionOperationName);
return;
}
StringBuilder content = new StringBuilder("你好,");
content.append(regionOperationName).append("在");
content.append(StringUtils.isBlank(storeName) ? "" : storeName).append("对");
content.append(StringUtils.isBlank(sceneNames) ? "" : sceneNames);
content.append("发起了试岗审批,请及时处理审批。");
sendRecruitmentQWTextMessage(
relation.getHrbpPhone(),
"试岗审批通知",
content.toString(),
demandId,
relation.getHrbpName()
);
} catch (Exception e) {
log.error("试岗审批通知推送异常,demandId:{}", dto.getDemandId(), e);
}
}
} }
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!