generated from dxfeng/secondev-chapanda-feishu
简历订阅手动推送,功能开发
This commit is contained in:
parent
4c7ed4f8f0
commit
d17b097294
|
|
@ -0,0 +1,12 @@
|
|||
package com.api.recruit.controller;
|
||||
|
||||
import javax.ws.rs.Path;
|
||||
|
||||
/**
|
||||
* @author:dxfeng
|
||||
* @createTime: 2024/03/13
|
||||
* @version: 1.0
|
||||
*/
|
||||
@Path("/jcl/recruit/remind")
|
||||
public class ResumeRemindController extends com.engine.recruit.controller.ResumeRemindController {
|
||||
}
|
||||
|
|
@ -0,0 +1,94 @@
|
|||
package com.engine.recruit.constant;
|
||||
|
||||
/**
|
||||
* @author:dxfeng
|
||||
* @createTime: 2024/03/12
|
||||
* @version: 1.0
|
||||
*/
|
||||
public class ModeSearchCodeConstant {
|
||||
/**
|
||||
* 招聘需求管理
|
||||
*/
|
||||
public static final String RECRUITMENT_DEMAND_MANAGEMENT = "b129634bf72d46b8bed0291f84efd2e0";
|
||||
/**
|
||||
* 招聘职位
|
||||
*/
|
||||
public static final String RECRUITMENT_POSITIONS = "c024e527c964437bb568bebbb48d89a5";
|
||||
/**
|
||||
* 应聘者
|
||||
*/
|
||||
public static final String APPLICANTS = "1d48211cd1634b19bdc6f7df40cd1337";
|
||||
/**
|
||||
* 筛选反馈
|
||||
*/
|
||||
//public static final String SCREENING_FEEDBACK = "b746e3cf80454289a3ade2b17147e297";
|
||||
public static final String SCREENING_FEEDBACK = "669a72259c0c47e49a97f5b68692ed34";
|
||||
/**
|
||||
* 笔试结果
|
||||
*/
|
||||
public static final String WRITTEN_RESULTS = "1b56a7492fb84f2b9e5ae022fde333f0";
|
||||
/**
|
||||
* 面试
|
||||
*/
|
||||
public static final String INTERVIEW = "496ecc32a87045888f224ad3151e635b";
|
||||
/**
|
||||
* 薪酬谈判
|
||||
*/
|
||||
public static final String SALARY_NEGOTIATION = "ffe1bafcef5942f5853e68b76e5098d2";
|
||||
/**
|
||||
* 背调
|
||||
*/
|
||||
public static final String BACK_TONE = "33be832e81eb4cf5a5686213918e769b";
|
||||
/**
|
||||
* offer
|
||||
*/
|
||||
public static final String OFFER = "4d4d8f9761474333907bacb81d98fc3c";
|
||||
/**
|
||||
* 人才库
|
||||
*/
|
||||
public static final String TALENT_POOL = "bdeb379900e5475c87306862dfb9d0b9";
|
||||
/**
|
||||
* 简历库
|
||||
*/
|
||||
public static final String RESUME_LIBRARY = "9bc41dbc69ee43a1976910008d7fdfe3";
|
||||
/**
|
||||
* 工作地点
|
||||
*/
|
||||
public static final String WORK_LOCATION = "af9c9eee65a84e82bf3a423506ef1f38";
|
||||
/**
|
||||
* 数据字典类型名称
|
||||
*/
|
||||
public static final String DATA_DICTIONARY_TYPE_NAME = "034d7bcea5634e458854a1c70580ca6d";
|
||||
/**
|
||||
* 邮件通知模板
|
||||
*/
|
||||
public static final String EMAIL_NOTIFICATION_TEMPLATE = "ea3b7ae0e3134c65be740eee629070af";
|
||||
/**
|
||||
* 千里聆邮箱配置
|
||||
*/
|
||||
public static final String QLL_EMAIL_CONFIG = "a97c0154ea5b43c8b17fc7a1dfdb195f";
|
||||
/**
|
||||
* 我参与的面试
|
||||
*/
|
||||
public static final String PARTICIPATE_IN_INTERVIEWS = "b8c509d648124c068f11fca338b2eea2";
|
||||
/**
|
||||
* 招聘流程列表
|
||||
*/
|
||||
public static final String RECRUITMENT_PROCESS_LIST = "32cea1924ceb45d8aa8622dbdf935a58";
|
||||
/**
|
||||
* 招聘阶段列表
|
||||
*/
|
||||
public static final String RECRUITMENT_STAGE_LIST = "06443dd4afa84831ae9d9c1b76450313";
|
||||
/**
|
||||
* 操作按钮列表
|
||||
*/
|
||||
public static final String LIST_OF_OPERATION_BUTTONS = "e14a2ce232d844239c00a0b3ead1af04";
|
||||
/**
|
||||
* 入职管理
|
||||
*/
|
||||
public static final String ENTRY_MANAGEMENT = "073e0628016a46b588d76fdd872a7369";
|
||||
/**
|
||||
* 简历订阅
|
||||
*/
|
||||
public static final String RESUME_SUBSCRIPTION = "e672681f989f4ba18fdc02cb89049293";
|
||||
}
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
package com.engine.recruit.constant;
|
||||
|
||||
/**
|
||||
* @author:dxfeng
|
||||
* @createTime: 2024/03/13
|
||||
* @version: 1.0
|
||||
*/
|
||||
public class ModeTreeCodeConstant {
|
||||
/**
|
||||
* 数据字典树
|
||||
*/
|
||||
public static final String DATA_DICTIONARY_TREE = "31717568fca8435f9e55eb08c1fbed4b";
|
||||
}
|
||||
|
|
@ -0,0 +1,37 @@
|
|||
package com.engine.recruit.controller;
|
||||
|
||||
import com.engine.common.util.ParamUtil;
|
||||
import com.engine.common.util.ServiceUtil;
|
||||
import com.engine.recruit.util.ResponseResult;
|
||||
import com.engine.recruit.wrapper.ResumeRemindWrapper;
|
||||
import weaver.hrm.HrmUserVarify;
|
||||
import weaver.hrm.User;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.ws.rs.POST;
|
||||
import javax.ws.rs.Path;
|
||||
import javax.ws.rs.Produces;
|
||||
import javax.ws.rs.core.Context;
|
||||
import javax.ws.rs.core.MediaType;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author:dxfeng
|
||||
* @createTime: 2024/03/13
|
||||
* @version: 1.0
|
||||
*/
|
||||
public class ResumeRemindController {
|
||||
public ResumeRemindWrapper getResumeRemindWrapper(User user) {
|
||||
return ServiceUtil.getService(ResumeRemindWrapper.class, user);
|
||||
}
|
||||
|
||||
@POST
|
||||
@Path("/doRemindJob")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public String doRemindJob(@Context HttpServletRequest request, @Context HttpServletResponse response) {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
Map<String, Object> param = ParamUtil.request2Map(request);
|
||||
return new ResponseResult<Map<String, Object>, Map<String, Object>>(user).run(getResumeRemindWrapper(user)::doRemindJob, param);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
package com.engine.recruit.service;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author:dxfeng
|
||||
* @createTime: 2024/03/13
|
||||
* @version: 1.0
|
||||
*/
|
||||
public interface ResumeRemindService {
|
||||
|
||||
/**
|
||||
* doRemindJob
|
||||
*
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
Map<String, Object> doRemindJob(Map<String, Object> param);
|
||||
}
|
||||
|
|
@ -4,6 +4,8 @@ import com.engine.core.impl.Service;
|
|||
import com.engine.recruit.conn.ApplicantCommonInfo;
|
||||
import com.engine.recruit.conn.RecruitDataMap;
|
||||
import com.engine.recruit.conn.RecruitRecordSet;
|
||||
import com.engine.recruit.constant.ModeSearchCodeConstant;
|
||||
import com.engine.recruit.constant.ModeTreeCodeConstant;
|
||||
import com.engine.recruit.entity.init.po.*;
|
||||
import com.engine.recruit.exception.CustomizeRunTimeException;
|
||||
import com.engine.recruit.service.InitRecruitDataService;
|
||||
|
|
@ -69,82 +71,54 @@ public class InitRecruitDataServiceImpl extends Service implements InitRecruitDa
|
|||
* 更新招聘管理相关菜单地址
|
||||
*/
|
||||
private void refreshMenuUrl() {
|
||||
Map<String, String> searchCodeMap = new HashMap<>();
|
||||
searchCodeMap.put("招聘需求管理", "b129634bf72d46b8bed0291f84efd2e0");
|
||||
searchCodeMap.put("招聘职位", "c024e527c964437bb568bebbb48d89a5");
|
||||
searchCodeMap.put("应聘者", "1d48211cd1634b19bdc6f7df40cd1337");
|
||||
//searchCodeMap.put("筛选反馈", "b746e3cf80454289a3ade2b17147e297");
|
||||
// TODO 改造为筛选反馈树
|
||||
searchCodeMap.put("筛选反馈", "669a72259c0c47e49a97f5b68692ed34");
|
||||
searchCodeMap.put("笔试结果", "1b56a7492fb84f2b9e5ae022fde333f0");
|
||||
searchCodeMap.put("面试", "496ecc32a87045888f224ad3151e635b");
|
||||
searchCodeMap.put("薪酬谈判", "ffe1bafcef5942f5853e68b76e5098d2");
|
||||
searchCodeMap.put("背调", "33be832e81eb4cf5a5686213918e769b");
|
||||
searchCodeMap.put("offer", "4d4d8f9761474333907bacb81d98fc3c");
|
||||
searchCodeMap.put("人才库", "bdeb379900e5475c87306862dfb9d0b9");
|
||||
searchCodeMap.put("简历库", "9bc41dbc69ee43a1976910008d7fdfe3");
|
||||
searchCodeMap.put("工作地点", "af9c9eee65a84e82bf3a423506ef1f38");
|
||||
searchCodeMap.put("数据字典类型名称", "034d7bcea5634e458854a1c70580ca6d");
|
||||
searchCodeMap.put("邮件通知模板", "ea3b7ae0e3134c65be740eee629070af");
|
||||
searchCodeMap.put("千里聆邮箱配置", "a97c0154ea5b43c8b17fc7a1dfdb195f");
|
||||
searchCodeMap.put("我参与的面试", "b8c509d648124c068f11fca338b2eea2");
|
||||
searchCodeMap.put("招聘流程列表", "32cea1924ceb45d8aa8622dbdf935a58");
|
||||
searchCodeMap.put("招聘阶段列表", "06443dd4afa84831ae9d9c1b76450313");
|
||||
searchCodeMap.put("操作按钮列表", "e14a2ce232d844239c00a0b3ead1af04");
|
||||
|
||||
Map<String, String> customPageMap = new HashMap<>();
|
||||
customPageMap.put("入职管理", "073e0628016a46b588d76fdd872a7369");
|
||||
|
||||
Map<String, String> customTreeMap = new HashMap<>();
|
||||
customTreeMap.put("数据字典树", "31717568fca8435f9e55eb08c1fbed4b");
|
||||
|
||||
List<String> menuSqlList = new ArrayList<>();
|
||||
// 招聘需求
|
||||
menuSqlList.add("update LeftMenuInfo set fullrouteurl = '/spa/cube/index.html#/main/cube/search?customid=" + getCustomSearchId(searchCodeMap.get("招聘需求管理")) + "' where id = " + 100189);
|
||||
menuSqlList.add("update LeftMenuInfo set fullrouteurl = '/spa/cube/index.html#/main/cube/search?customid=" + getCustomSearchId(ModeSearchCodeConstant.RECRUITMENT_DEMAND_MANAGEMENT) + "' where id = " + 100189);
|
||||
// 招聘职位
|
||||
menuSqlList.add("update LeftMenuInfo set fullrouteurl = '/spa/cube/index.html#/main/cube/search?customid=" + getCustomSearchId(searchCodeMap.get("招聘职位")) + "' where id = " + 100190);
|
||||
menuSqlList.add("update LeftMenuInfo set fullrouteurl = '/spa/cube/index.html#/main/cube/search?customid=" + getCustomSearchId(ModeSearchCodeConstant.RECRUITMENT_POSITIONS) + "' where id = " + 100190);
|
||||
// 应聘者
|
||||
menuSqlList.add("update LeftMenuInfo set fullrouteurl = '/spa/cube/index.html#/main/cube/search?customid=" + getCustomSearchId(searchCodeMap.get("应聘者")) + "' where id = " + 100192);
|
||||
menuSqlList.add("update LeftMenuInfo set fullrouteurl = '/spa/cube/index.html#/main/cube/search?customid=" + getCustomSearchId(ModeSearchCodeConstant.APPLICANTS) + "' where id = " + 100192);
|
||||
// 部门筛选
|
||||
menuSqlList.add("update LeftMenuInfo set fullrouteurl = '/spa/cube/index.html#/main/cube/search?customid=" + getCustomSearchId(searchCodeMap.get("筛选反馈")) + "' where id = " + 100193);
|
||||
menuSqlList.add("update LeftMenuInfo set fullrouteurl = '/spa/cube/index.html#/main/cube/search?customid=" + getCustomSearchId(ModeSearchCodeConstant.SCREENING_FEEDBACK) + "' where id = " + 100193);
|
||||
// 笔试
|
||||
menuSqlList.add("update LeftMenuInfo set fullrouteurl = '/spa/cube/index.html#/main/cube/search?customid=" + getCustomSearchId(searchCodeMap.get("笔试结果")) + "' where id = " + 100194);
|
||||
menuSqlList.add("update LeftMenuInfo set fullrouteurl = '/spa/cube/index.html#/main/cube/search?customid=" + getCustomSearchId(ModeSearchCodeConstant.WRITTEN_RESULTS) + "' where id = " + 100194);
|
||||
// 面试
|
||||
menuSqlList.add("update LeftMenuInfo set fullrouteurl = '/spa/cube/index.html#/main/cube/search?customid=" + getCustomSearchId(searchCodeMap.get("面试")) + "' where id = " + 100195);
|
||||
menuSqlList.add("update LeftMenuInfo set fullrouteurl = '/spa/cube/index.html#/main/cube/search?customid=" + getCustomSearchId(ModeSearchCodeConstant.INTERVIEW) + "' where id = " + 100195);
|
||||
// 薪酬谈判
|
||||
menuSqlList.add("update LeftMenuInfo set fullrouteurl = '/spa/cube/index.html#/main/cube/search?customid=" + getCustomSearchId(searchCodeMap.get("薪酬谈判")) + "' where id = " + 100196);
|
||||
menuSqlList.add("update LeftMenuInfo set fullrouteurl = '/spa/cube/index.html#/main/cube/search?customid=" + getCustomSearchId(ModeSearchCodeConstant.SALARY_NEGOTIATION) + "' where id = " + 100196);
|
||||
// 背调
|
||||
menuSqlList.add("update LeftMenuInfo set fullrouteurl = '/spa/cube/index.html#/main/cube/search?customid=" + getCustomSearchId(searchCodeMap.get("背调")) + "' where id = " + 100197);
|
||||
menuSqlList.add("update LeftMenuInfo set fullrouteurl = '/spa/cube/index.html#/main/cube/search?customid=" + getCustomSearchId(ModeSearchCodeConstant.BACK_TONE) + "' where id = " + 100197);
|
||||
// offer
|
||||
menuSqlList.add("update LeftMenuInfo set fullrouteurl = '/spa/cube/index.html#/main/cube/search?customid=" + getCustomSearchId(searchCodeMap.get("offer")) + "' where id = " + 100198);
|
||||
menuSqlList.add("update LeftMenuInfo set fullrouteurl = '/spa/cube/index.html#/main/cube/search?customid=" + getCustomSearchId(ModeSearchCodeConstant.OFFER) + "' where id = " + 100198);
|
||||
// 人才库
|
||||
menuSqlList.add("update LeftMenuInfo set fullrouteurl = '/spa/cube/index.html#/main/cube/search?customid=" + getCustomSearchId(searchCodeMap.get("人才库")) + "' where id = " + 100200);
|
||||
menuSqlList.add("update LeftMenuInfo set fullrouteurl = '/spa/cube/index.html#/main/cube/search?customid=" + getCustomSearchId(ModeSearchCodeConstant.TALENT_POOL) + "' where id = " + 100200);
|
||||
// 简历库
|
||||
menuSqlList.add("update LeftMenuInfo set fullrouteurl = '/spa/cube/index.html#/main/cube/search?customid=" + getCustomSearchId(searchCodeMap.get("简历库")) + "' where id = " + 100201);
|
||||
menuSqlList.add("update LeftMenuInfo set fullrouteurl = '/spa/cube/index.html#/main/cube/search?customid=" + getCustomSearchId(ModeSearchCodeConstant.RESUME_LIBRARY) + "' where id = " + 100201);
|
||||
// 工作地点
|
||||
menuSqlList.add("update LeftMenuInfo set fullrouteurl = '/spa/cube/index.html#/main/cube/search?customid=" + getCustomSearchId(searchCodeMap.get("工作地点")) + "' where id = " + 100203);
|
||||
menuSqlList.add("update LeftMenuInfo set fullrouteurl = '/spa/cube/index.html#/main/cube/search?customid=" + getCustomSearchId(ModeSearchCodeConstant.WORK_LOCATION) + "' where id = " + 100203);
|
||||
// 字段类型名称
|
||||
menuSqlList.add("update LeftMenuInfo set fullrouteurl = '/spa/cube/index.html#/main/cube/search?customid=" + getCustomSearchId(searchCodeMap.get("数据字典类型名称")) + "' where id = " + 100205);
|
||||
menuSqlList.add("update LeftMenuInfo set fullrouteurl = '/spa/cube/index.html#/main/cube/search?customid=" + getCustomSearchId(ModeSearchCodeConstant.DATA_DICTIONARY_TYPE_NAME) + "' where id = " + 100205);
|
||||
// 邮件通知模板
|
||||
menuSqlList.add("update LeftMenuInfo set fullrouteurl = '/spa/cube/index.html#/main/cube/search?customid=" + getCustomSearchId(searchCodeMap.get("邮件通知模板")) + "' where id = " + 100206);
|
||||
menuSqlList.add("update LeftMenuInfo set fullrouteurl = '/spa/cube/index.html#/main/cube/search?customid=" + getCustomSearchId(ModeSearchCodeConstant.EMAIL_NOTIFICATION_TEMPLATE) + "' where id = " + 100206);
|
||||
// 千里聆邮箱配置
|
||||
menuSqlList.add("update LeftMenuInfo set fullrouteurl = '/spa/cube/index.html#/main/cube/search?customid=" + getCustomSearchId(searchCodeMap.get("千里聆邮箱配置")) + "' where id = " + 100207);
|
||||
menuSqlList.add("update LeftMenuInfo set fullrouteurl = '/spa/cube/index.html#/main/cube/search?customid=" + getCustomSearchId(ModeSearchCodeConstant.QLL_EMAIL_CONFIG) + "' where id = " + 100207);
|
||||
// 招聘需求
|
||||
menuSqlList.add("update LeftMenuInfo set fullrouteurl = '/spa/cube/index.html#/main/cube/search?customid=" + getCustomSearchId(searchCodeMap.get("招聘需求管理")) + "' where id = " + 100209);
|
||||
menuSqlList.add("update LeftMenuInfo set fullrouteurl = '/spa/cube/index.html#/main/cube/search?customid=" + getCustomSearchId(ModeSearchCodeConstant.RECRUITMENT_DEMAND_MANAGEMENT) + "' where id = " + 100209);
|
||||
// 我的筛选
|
||||
menuSqlList.add("update LeftMenuInfo set fullrouteurl = '/spa/cube/index.html#/main/cube/search?customid=" + getCustomSearchId(searchCodeMap.get("筛选反馈")) + "' where id = " + 100210);
|
||||
menuSqlList.add("update LeftMenuInfo set fullrouteurl = '/spa/cube/index.html#/main/cube/search?customid=" + getCustomSearchId(ModeSearchCodeConstant.SCREENING_FEEDBACK) + "' where id = " + 100210);
|
||||
// 我的面试
|
||||
menuSqlList.add("update LeftMenuInfo set fullrouteurl = '/spa/cube/index.html#/main/cube/search?customid=" + getCustomSearchId(searchCodeMap.get("我参与的面试")) + "' where id = " + 100211);
|
||||
menuSqlList.add("update LeftMenuInfo set fullrouteurl = '/spa/cube/index.html#/main/cube/search?customid=" + getCustomSearchId(ModeSearchCodeConstant.PARTICIPATE_IN_INTERVIEWS) + "' where id = " + 100211);
|
||||
// 招聘流程
|
||||
menuSqlList.add("update LeftMenuInfo set fullrouteurl = '/spa/cube/index.html#/main/cube/search?customid=" + getCustomSearchId(searchCodeMap.get("招聘流程列表")) + "' where id = " + 100213);
|
||||
menuSqlList.add("update LeftMenuInfo set fullrouteurl = '/spa/cube/index.html#/main/cube/search?customid=" + getCustomSearchId(ModeSearchCodeConstant.RECRUITMENT_PROCESS_LIST) + "' where id = " + 100213);
|
||||
// 招聘阶段
|
||||
menuSqlList.add("update LeftMenuInfo set fullrouteurl = '/spa/cube/index.html#/main/cube/search?customid=" + getCustomSearchId(searchCodeMap.get("招聘阶段列表")) + "' where id = " + 100214);
|
||||
menuSqlList.add("update LeftMenuInfo set fullrouteurl = '/spa/cube/index.html#/main/cube/search?customid=" + getCustomSearchId(ModeSearchCodeConstant.RECRUITMENT_STAGE_LIST) + "' where id = " + 100214);
|
||||
// 操作按钮
|
||||
menuSqlList.add("update LeftMenuInfo set fullrouteurl = '/spa/cube/index.html#/main/cube/search?customid=" + getCustomSearchId(searchCodeMap.get("操作按钮列表")) + "' where id = " + 100215);
|
||||
menuSqlList.add("update LeftMenuInfo set fullrouteurl = '/spa/cube/index.html#/main/cube/search?customid=" + getCustomSearchId(ModeSearchCodeConstant.LIST_OF_OPERATION_BUTTONS) + "' where id = " + 100215);
|
||||
// 入职管理
|
||||
menuSqlList.add("update LeftMenuInfo set fullrouteurl= '/spa/cube/index.html#/main/cube/viewCustomPage?id=" + getCustomPageId("入职管理", customPageMap.get("入职管理")) + "&noTitleShow=1' where id = " + 100199);
|
||||
menuSqlList.add("update LeftMenuInfo set fullrouteurl= '/spa/cube/index.html#/main/cube/viewCustomPage?id=" + getCustomPageId("入职管理", ModeSearchCodeConstant.ENTRY_MANAGEMENT) + "&noTitleShow=1' where id = " + 100199);
|
||||
// 数据字典
|
||||
menuSqlList.add("update LeftMenuInfo set fullrouteurl= '/spa/cube/index.html#/main/cube/tree?id=" + getCustomTreeId(customTreeMap.get("数据字典树")) + "&noTitleShow=1' where id = " + 100204);
|
||||
menuSqlList.add("update LeftMenuInfo set fullrouteurl= '/spa/cube/index.html#/main/cube/tree?id=" + getCustomTreeId(ModeTreeCodeConstant.DATA_DICTIONARY_TREE) + "&noTitleShow=1' where id = " + 100204);
|
||||
|
||||
RecordSet rs = new RecordSet();
|
||||
for (String sql : menuSqlList) {
|
||||
|
|
|
|||
|
|
@ -0,0 +1,62 @@
|
|||
package com.engine.recruit.service.impl;
|
||||
|
||||
import com.engine.core.impl.Service;
|
||||
import com.engine.integration.cmd.schedule.ImmediatelyRunCmd;
|
||||
import com.engine.recruit.exception.CustomizeRunTimeException;
|
||||
import com.engine.recruit.service.ResumeRemindService;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import weaver.general.Util;
|
||||
import weaver.interfaces.recruit.cronjob.ResumePushJob;
|
||||
import weaver.systeminfo.SystemEnv;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author:dxfeng
|
||||
* @createTime: 2024/03/13
|
||||
* @version: 1.0
|
||||
*/
|
||||
public class ResumeRemindServiceImpl extends Service implements ResumeRemindService {
|
||||
@Override
|
||||
public Map<String, Object> doRemindJob(Map<String, Object> param) {
|
||||
String pointId = "ResumePushJob";
|
||||
HashMap<String, Boolean> locks = ImmediatelyRunCmd.locks;
|
||||
boolean checkLock = true;
|
||||
if (locks.containsKey(pointId)) {
|
||||
checkLock = locks.get(pointId);
|
||||
} else {
|
||||
locks.put(pointId, checkLock);
|
||||
}
|
||||
|
||||
String dateStr = Util.null2String(param.get("dateStr"));
|
||||
if (StringUtils.isNotBlank(dateStr)) {
|
||||
String[] split = dateStr.split(",");
|
||||
if (split.length == 2) {
|
||||
String startDate = split[0];
|
||||
String endDate = split[1];
|
||||
if (StringUtils.isNoneBlank(startDate, endDate)) {
|
||||
if (checkLock) {
|
||||
checkLock = false;
|
||||
locks.put(pointId, checkLock);
|
||||
try {
|
||||
new ResumePushJob(startDate, endDate).execute();
|
||||
} catch (Exception e) {
|
||||
throw new CustomizeRunTimeException("ResumePushJob计划任务执行失败", e);
|
||||
} finally {
|
||||
checkLock = true;
|
||||
locks.put(pointId, checkLock);
|
||||
}
|
||||
return null;
|
||||
} else {
|
||||
locks.put(pointId, false);
|
||||
throw new CustomizeRunTimeException(SystemEnv.getHtmlLabelName(532655, Util.getIntValue(user.getLanguage())));
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
throw new CustomizeRunTimeException("请选择简历投递开始日期、结束日期");
|
||||
}
|
||||
throw new CustomizeRunTimeException("简历推送异常");
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
package com.engine.recruit.wrapper;
|
||||
|
||||
import com.engine.common.util.ServiceUtil;
|
||||
import com.engine.core.impl.Service;
|
||||
import com.engine.recruit.service.ResumeRemindService;
|
||||
import com.engine.recruit.service.impl.ResumeRemindServiceImpl;
|
||||
import weaver.hrm.User;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author:dxfeng
|
||||
* @createTime: 2024/03/13
|
||||
* @version: 1.0
|
||||
*/
|
||||
public class ResumeRemindWrapper extends Service {
|
||||
private ResumeRemindService getResumeRemindService(User user) {
|
||||
return ServiceUtil.getService(ResumeRemindServiceImpl.class, user);
|
||||
}
|
||||
|
||||
public Map<String, Object> doRemindJob(Map<String, Object> param) {
|
||||
return getResumeRemindService(user).doRemindJob(param);
|
||||
}
|
||||
}
|
||||
|
|
@ -5,6 +5,7 @@ import com.api.cube.util.CubeCipherUitl;
|
|||
import com.engine.recruit.conn.ApplicantCommonInfo;
|
||||
import com.engine.recruit.conn.RecruitDataMap;
|
||||
import com.engine.recruit.conn.RecruitRecordSet;
|
||||
import com.engine.recruit.constant.ModeSearchCodeConstant;
|
||||
import com.engine.recruit.constant.RecruitConstant;
|
||||
import com.engine.recruit.exception.CustomizeRunTimeException;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
|
@ -36,6 +37,18 @@ public class ResumePushJob extends BaseCronJob {
|
|||
private Map<Integer, Set<String>> checkRepeatMap;
|
||||
private int remindHistoryModeId;
|
||||
|
||||
private String startDate;
|
||||
private String endDate;
|
||||
|
||||
public ResumePushJob() {
|
||||
|
||||
}
|
||||
|
||||
public ResumePushJob(String startDate, String endDate) {
|
||||
this.startDate = startDate;
|
||||
this.endDate = endDate;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void execute() {
|
||||
BaseBean baseBean = new BaseBean();
|
||||
|
|
@ -44,13 +57,20 @@ public class ResumePushJob extends BaseCronJob {
|
|||
uuid = UUID.randomUUID().toString();
|
||||
checkRepeatMap = new HashMap<>();
|
||||
|
||||
Calendar calendar = Calendar.getInstance(Locale.CHINA);
|
||||
Calendar limitDate = DateUtil.addMonth(calendar, -1);
|
||||
Date time = limitDate.getTime();
|
||||
String date = DateUtil.getDate(time);
|
||||
|
||||
String sql = "";
|
||||
if (StringUtils.isNoneBlank(startDate, endDate)) {
|
||||
sql = "select t1.* from uf_jcl_yppc t1 where t1.tdsj >= '" + startDate + "' and t1.tdsj <='" + endDate + "'";
|
||||
} else {
|
||||
Calendar calendar = Calendar.getInstance(Locale.CHINA);
|
||||
Calendar limitDate = DateUtil.addMonth(calendar, -1);
|
||||
Date time = limitDate.getTime();
|
||||
String date = DateUtil.getDate(time);
|
||||
// 推送规则,针对一条简历订阅,首次设置订阅规则且启用的,筛选投递时间为一个月内的简历(简历表),后续为增量推送
|
||||
sql = "select t1.* from uf_jcl_yppc t1 where t1.tdsj >= '" + date + "' ";
|
||||
}
|
||||
RecordSet rs = new RecordSet();
|
||||
// 推送规则,针对一条简历订阅,首次设置订阅规则且启用的,筛选投递时间为一个月内的简历(简历表),后续为增量推送
|
||||
String sql = "select t1.* from uf_jcl_yppc t1 where t1.tdsj > '" + date + "' ";
|
||||
|
||||
|
||||
remindHistoryModeId = ApplicantCommonInfo.getModeIdByTableName(remindHistoryTable);
|
||||
// 建模ID
|
||||
|
|
@ -105,7 +125,7 @@ public class ResumePushJob extends BaseCronJob {
|
|||
|
||||
}
|
||||
// 简历订阅列表URL
|
||||
String remindSearchLink = ApplicantCommonInfo.getCustomSearchLink("df6f9744792840648c0c49991edb5112", RecruitConstant.REMIND_SEARCH_LINK);
|
||||
String remindSearchLink = ApplicantCommonInfo.getCustomSearchLink(ModeSearchCodeConstant.RESUME_SUBSCRIPTION, RecruitConstant.REMIND_SEARCH_LINK);
|
||||
if (StringUtils.isNotBlank(remindSearchLink)) {
|
||||
remindSearchLink += "&uuid=" + uuid;
|
||||
}
|
||||
|
|
@ -115,13 +135,10 @@ public class ResumePushJob extends BaseCronJob {
|
|||
for (Map.Entry<Integer, Integer> entry : remindCountJob.entrySet()) {
|
||||
Integer key = entry.getKey();
|
||||
Integer value = entry.getValue();
|
||||
String remindContent = "有{remindCount}条简历推送给您,请查阅。";
|
||||
String content = remindContent.replace("remindCount", value.toString());
|
||||
// 发送代办
|
||||
String remindTitle = "简历订阅推送提醒";
|
||||
Set<String> userIds = new HashSet<>(1);
|
||||
userIds.add(Integer.toString(key));
|
||||
RecruitModeUtil.messagePush(RecruitConstant.RECRUIT_MESSAGE_TYPE, remindTitle, content, userIds, 1, remindSearchLink, "");
|
||||
RecruitModeUtil.messagePush(RecruitConstant.RECRUIT_MESSAGE_TYPE, "简历订阅推送提醒", "有{" + value.toString() + "}条简历推送给您,请查阅。", userIds, 1, remindSearchLink, "");
|
||||
}
|
||||
baseBean.writeLog("简历订阅推送任务结束...");
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue