generated from dxfeng/secondev-chapanda-feishu
Compare commits
No commits in common. "main" and "develop" have entirely different histories.
|
|
@ -1,4 +1,4 @@
|
|||
.iml
|
||||
/weaver-hrm-recruit.iml
|
||||
/out/
|
||||
/.idea/
|
||||
|
||||
|
|
@ -8,12 +8,19 @@ target/
|
|||
|
||||
### IntelliJ IDEA ###
|
||||
.idea
|
||||
|
||||
HELP.md
|
||||
target/
|
||||
|
||||
/src/test
|
||||
/src/rebel.xml
|
||||
/src/META-INF
|
||||
### IntelliJ IDEA ###
|
||||
.idea
|
||||
|
||||
/log
|
||||
|
||||
/src/test
|
||||
/src/rebel.xml
|
||||
/src/META-INF
|
||||
|
||||
/log
|
||||
/build/
|
||||
|
|
|
|||
|
|
@ -0,0 +1,24 @@
|
|||
#\u805A\u624D\u6797\u62DB\u8058\u6D88\u606F\u63D0\u9192\uFF0C\u6D88\u606F\u6765\u6E90
|
||||
RECRUIT_MESSAGE_TYPE=2022061063
|
||||
|
||||
|
||||
#\u9762\u8BD5\u76F8\u5173\u6D88\u606F\u63D0\u9192\uFF0C\u6D88\u606F\u6765\u6E90
|
||||
INTERVIEW_MESSAGE_TYPE=2022061063
|
||||
#\u6DFB\u52A0\u9762\u8BD5\u6D88\u606F\u63D0\u9192\u6807\u9898
|
||||
INTERVIEW_ADD_MESSAGE_TITLE=\u9762\u8BD5\u5B89\u6392\u63D0\u9192
|
||||
#\u53D6\u6D88\u9762\u8BD5\u6D88\u606F\u63D0\u9192\u6807\u9898
|
||||
INTERVIEW_CANCEL_MESSAGE_TITLE=\u53D6\u6D88\u9762\u8BD5\u63D0\u9192
|
||||
#\u9762\u8BD5\u8BC4\u4EF7\u6D88\u606F\u63D0\u9192\u6807\u9898
|
||||
INTERVIEW_EVALUATE_MESSAGE_TITLE=\u9762\u8BD5\u8BC4\u4EF7\u63D0\u9192
|
||||
|
||||
|
||||
#\u4EBA\u624D\u9ED1\u540D\u5355\u901A\u77E5
|
||||
JOIN_BLACKLIST_MESSAGE_TITLE=\u4EBA\u624D\u9ED1\u540D\u5355\u901A\u77E5
|
||||
|
||||
#\u7B5B\u9009\u53CD\u9988
|
||||
SCREENING_MESSAGE_TYPE=2022061063
|
||||
SCREENING_MESSAGE_TITLE=\u7B80\u5386\u7B5B\u9009
|
||||
SCREENING_MESSAGE_URL=/wui/index.html#/main/cube/search?customid=65
|
||||
|
||||
#\u5E94\u8058\u8005\u7B80\u5386\u5B58\u653E\u76EE\u5F55ID
|
||||
APPLICANTS_RESUMES_CATEGORY=110
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
description = "子模块demo项目"
|
||||
|
||||
dependencies {
|
||||
// 子项目私有依赖添加
|
||||
implementation project(':secondev-chapanda-portal')
|
||||
}
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
package com.api.recruit.controller;
|
||||
|
||||
import javax.ws.rs.Path;
|
||||
|
||||
/**
|
||||
* @author:dxfeng
|
||||
* @createTime: 2023/09/20
|
||||
* @version: 1.0
|
||||
*/
|
||||
@Path("/jcl/recruit/applicant")
|
||||
public class ApplicantResumeController extends com.engine.recruit.controller.ApplicantResumeController{
|
||||
}
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
package com.api.recruit.controller;
|
||||
|
||||
import javax.ws.rs.Path;
|
||||
|
||||
/**
|
||||
* @author:dxfeng
|
||||
* @createTime: 2023/10/23
|
||||
* @version: 1.0
|
||||
*/
|
||||
@Path("/jcl/recruit/induction")
|
||||
public class InductionManageController extends com.engine.recruit.controller.InductionManageController{
|
||||
}
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
package com.api.recruit.controller;
|
||||
|
||||
import javax.ws.rs.Path;
|
||||
|
||||
/**
|
||||
* @author:dxfeng
|
||||
* @createTime: 2023/09/26
|
||||
* @version: 1.0
|
||||
*/
|
||||
@Path("/jcl/recruit/message")
|
||||
public class MessageTemplateController extends com.engine.recruit.controller.MessageTemplateController {
|
||||
}
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
package com.api.recruit.controller;
|
||||
|
||||
import javax.ws.rs.Path;
|
||||
|
||||
/**
|
||||
* @author:dxfeng
|
||||
* @createTime: 2023/09/18
|
||||
* @version: 1.0
|
||||
*/
|
||||
@Path("/jcl/recruit/button")
|
||||
public class RecruitButtonController extends com.engine.recruit.controller.RecruitButtonController{
|
||||
}
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
package com.api.recruit.controller;
|
||||
|
||||
import javax.ws.rs.Path;
|
||||
|
||||
/**
|
||||
* @author:dxfeng
|
||||
* @createTime: 2023/09/20
|
||||
* @version: 1.0
|
||||
*/
|
||||
@Path("/jcl/recruit/recruitflow")
|
||||
public class RecruitFlowController extends com.engine.recruit.controller.RecruitFlowController{
|
||||
}
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
package com.api.recruit.controller;
|
||||
|
||||
import javax.ws.rs.Path;
|
||||
|
||||
/**
|
||||
* @author:dxfeng
|
||||
* @createTime: 2023/10/09
|
||||
* @version: 1.0
|
||||
*/
|
||||
@Path("/jcl/recruit/position")
|
||||
public class RecruitPositionController extends com.engine.recruit.controller.RecruitPositionController{
|
||||
}
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
package com.api.recruit.controller;
|
||||
|
||||
import javax.ws.rs.Path;
|
||||
|
||||
/**
|
||||
* @author:dxfeng
|
||||
* @createTime: 2023/10/27
|
||||
* @version: 1.0
|
||||
*/
|
||||
@Path("/jcl/recruit/rpa")
|
||||
public class RpaJclController extends com.engine.recruit.controller.RpaJclController {
|
||||
}
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
package com.api.recruit.controller;
|
||||
|
||||
import javax.ws.rs.Path;
|
||||
|
||||
/**
|
||||
* @author:dxfeng
|
||||
* @createTime: 2023/10/20
|
||||
* @version: 1.0
|
||||
*/
|
||||
@Path("/jcl/recruit/talentpool")
|
||||
public class TalentPoolController extends com.engine.recruit.controller.TalentPoolController{
|
||||
}
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
package com.api.recruit.controller;
|
||||
|
||||
import javax.ws.rs.Path;
|
||||
|
||||
/**
|
||||
* @Author liang.cheng
|
||||
* @Date 2023/10/18 4:31 PM
|
||||
* @Description: 招聘工作台
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Path("/jcl/recruit/workbench")
|
||||
public class WorkBenchPortalController extends com.engine.recruit.controller.WorkBenchPortalController {
|
||||
}
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
package com.api.recruit.controller;
|
||||
|
||||
import javax.ws.rs.Path;
|
||||
|
||||
/**
|
||||
* @Author liang.cheng
|
||||
* @Date 2023/10/17 10:49 AM
|
||||
* @Description: TODO
|
||||
* @Version 1.0
|
||||
*/
|
||||
|
||||
@Path("/jcl/recruit/workplan")
|
||||
public class WorkPlanController extends com.engine.recruit.controller.WorkPlanController {
|
||||
}
|
||||
|
|
@ -0,0 +1,126 @@
|
|||
package com.engine.recruit.conn;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import weaver.conn.RecordSet;
|
||||
import weaver.formmode.setup.ModeRightInfo;
|
||||
import weaver.general.Util;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author:dxfeng
|
||||
* @createTime: 2023/09/27
|
||||
* @version: 1.0
|
||||
*/
|
||||
public class ApplicantCommonInfo {
|
||||
/**
|
||||
* 获取应聘者姓名
|
||||
*
|
||||
* @param applicantId 应聘者ID
|
||||
* @return 应聘者姓名
|
||||
*/
|
||||
public static String getApplicantName(String applicantId) {
|
||||
RecordSet rs = new RecordSet();
|
||||
rs.executeQuery("select xm from uf_jcl_yppc where id = ?", applicantId);
|
||||
if (rs.next()) {
|
||||
return rs.getString("xm");
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取应聘职位名称
|
||||
*
|
||||
* @param positionId 职位ID
|
||||
* @return 职位名称
|
||||
*/
|
||||
public static String getApplicantPosition(String positionId) {
|
||||
RecordSet rs = new RecordSet();
|
||||
rs.executeQuery("select zpzwmc from uf_jcl_zp_zpzw where id = ?", positionId);
|
||||
if (rs.next()) {
|
||||
return rs.getString("zpzwmc");
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取表单下拉框展示文本
|
||||
*
|
||||
* @param formId 表单ID
|
||||
* @param fieldName 字段明湖曾
|
||||
* @param value 下拉框值
|
||||
* @return
|
||||
*/
|
||||
public static String getSelectName(String formId, String fieldName, String value) {
|
||||
String cancelReason = "";
|
||||
RecordSet rs = new RecordSet();
|
||||
rs.executeQuery("select selectname from workflow_selectitem where fieldid =( select id from workflow_billfield where billid = ? and fieldname = ? ) and selectvalue = ?", formId, fieldName, value);
|
||||
if (rs.next()) {
|
||||
cancelReason = rs.getString("selectname");
|
||||
}
|
||||
return cancelReason;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取招聘通用浏览按钮展示内容
|
||||
*
|
||||
* @param id 浏览按钮ID
|
||||
* @return 浏览按钮展示文本
|
||||
*/
|
||||
public static String getRecruitCommonBrowserValue(String id) {
|
||||
if (StringUtils.isBlank(id)) {
|
||||
return "";
|
||||
}
|
||||
List<String> value = new ArrayList<>();
|
||||
RecordSet rs = new RecordSet();
|
||||
String[] split = id.split(",");
|
||||
for (String s : split) {
|
||||
rs.executeQuery("select xxnr from uf_sjzd where id = ?", id);
|
||||
if (rs.next()) {
|
||||
value.add(rs.getString("xxnr"));
|
||||
}
|
||||
}
|
||||
return StringUtils.join(value, ",");
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据建模表名,获取建模ID
|
||||
*
|
||||
* @param modeTable
|
||||
* @return
|
||||
*/
|
||||
public static int getModeIdByTableName(String modeTable) {
|
||||
int formModeId = -1;
|
||||
RecordSet rs = new RecordSet();
|
||||
rs.executeQuery("select id from modeinfo where formid =( select id from workflow_bill where tablename = ? )", modeTable);
|
||||
if (rs.next()) {
|
||||
formModeId = rs.getInt("id");
|
||||
}
|
||||
return formModeId;
|
||||
}
|
||||
|
||||
/**
|
||||
* 建模表数据权限重构
|
||||
*
|
||||
* @param rs
|
||||
* @param uuid
|
||||
* @param modeTable
|
||||
* @param formModeId
|
||||
*/
|
||||
public static int refreshRight(RecordSet rs, String uuid, String modeTable, int formModeId) {
|
||||
rs.executeQuery("select id from " + modeTable + " where modeuuid='" + uuid + "'");
|
||||
if (rs.next()) {
|
||||
//建模数据的id
|
||||
int bid = Util.getIntValue(rs.getString("id"));
|
||||
ModeRightInfo modeRightInfo = new ModeRightInfo();
|
||||
modeRightInfo.setNewRight(true);
|
||||
//新建的时候添加共享
|
||||
modeRightInfo.editModeDataShare(1, formModeId, bid);
|
||||
return bid;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,179 @@
|
|||
package com.engine.recruit.conn;
|
||||
|
||||
import com.engine.recruit.enums.ApplicationStatusEnum;
|
||||
import org.apache.commons.collections.CollectionUtils;
|
||||
import weaver.conn.RecordSet;
|
||||
import weaver.general.Util;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author:dxfeng
|
||||
* @createTime: 2023/10/26
|
||||
* @version: 1.0
|
||||
*/
|
||||
public class CheckRepeatResume {
|
||||
|
||||
/**
|
||||
* 校验简历是否加入黑名单
|
||||
*
|
||||
* @param name 姓名
|
||||
* @param mobile 手机号
|
||||
* @return
|
||||
*/
|
||||
private boolean joinBlackList(String name, String mobile) {
|
||||
// 在这里编写你的方法逻辑
|
||||
RecordSet rs = new RecordSet();
|
||||
rs.executeQuery("select id from uf_jcl_rck where sfjrhmd =0 and xm = ? and sjhm = ?", name, mobile);
|
||||
return rs.next();
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据姓名、手机号查询重复的简历数据
|
||||
*
|
||||
* @param name 姓名
|
||||
* @param mobile 手机号
|
||||
* @return
|
||||
*/
|
||||
private List<Map<String, Object>> getRepeatResumeList(String name, String mobile) {
|
||||
RecordSet rs = new RecordSet();
|
||||
// 查询状态为待分配、候选中的且未隐藏的数据
|
||||
rs.executeQuery("select * from uf_jcl_yppc where formmodeid is not null and zt != 2 and zt != 3 and xm = ? and sjhm =? order by zt", name, mobile);
|
||||
return RecruitRecordSet.getRecordMapList(rs);
|
||||
}
|
||||
|
||||
/**
|
||||
* 插入简历数据
|
||||
*
|
||||
* @param param 数据集合
|
||||
* @return
|
||||
*/
|
||||
public synchronized int insertResumeMainTable(Map<String, Object> param) {
|
||||
String name = Util.null2String(param.get("xm"));
|
||||
String mobile = Util.null2String(param.get("sjhm"));
|
||||
String status = Util.null2String(param.get("zt"));
|
||||
String positionId = Util.null2String(param.get("ypzw"));
|
||||
// 黑名单校验,黑名单人员不入库
|
||||
boolean joinBlackList = joinBlackList(name, mobile);
|
||||
if (joinBlackList) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
// 按照姓名+手机号查询正常展示的简历数据
|
||||
List<Map<String, Object>> repeatResumeList = getRepeatResumeList(name, mobile);
|
||||
if (CollectionUtils.isEmpty(repeatResumeList)) {
|
||||
// 不存在重复数据,直接插入数据库
|
||||
return insertData(param);
|
||||
}
|
||||
|
||||
// 新接收的简历为待分配
|
||||
if (ApplicationStatusEnum.DISTRIBUTION.getValue().equals(status)) {
|
||||
Map<String, Object> sourceResume = repeatResumeList.get(0);
|
||||
if (ApplicationStatusEnum.DISTRIBUTION.getValue().equals(Util.null2String(sourceResume.get("zt")))) {
|
||||
// 当前存在待分配的简历
|
||||
//取新简历有值的字段,更新已入库简历没有值的字段,已入库简历有值的字段不做更新,新简历入库并隐藏
|
||||
updateSourceResume(param, sourceResume);
|
||||
return -1;
|
||||
} else {
|
||||
// 直接入库,不做任何处理
|
||||
return insertData(param);
|
||||
}
|
||||
} else if (ApplicationStatusEnum.CANDIDATE.getValue().equals(status)) {
|
||||
// 新简历为候选中
|
||||
boolean hasSamePosition = false;
|
||||
for (Map<String, Object> sourceResume : repeatResumeList) {
|
||||
if (positionId.equals(Util.null2String(sourceResume.get("ypzw")))) {
|
||||
hasSamePosition = true;
|
||||
}
|
||||
}
|
||||
if (hasSamePosition) {
|
||||
// 若有相同职位的数据,新简历直接入库并隐藏
|
||||
return insertHideData(param);
|
||||
} else {
|
||||
// 没有相同职位的数据,新简历直接入库,不做任何处理
|
||||
return insertData(param);
|
||||
}
|
||||
}
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 直接插入简历信息
|
||||
*
|
||||
* @param dataMap 数据集合
|
||||
* @return
|
||||
*/
|
||||
private int insertData(Map<String, Object> dataMap) {
|
||||
String uuid = UUID.randomUUID().toString();
|
||||
dataMap.put("modeuuid", uuid);
|
||||
RecordSet rs = new RecordSet();
|
||||
int formModeId = -1;
|
||||
rs.executeQuery("select id from modeinfo where formid =( select id from workflow_bill where tablename = 'uf_jcl_yppc' )");
|
||||
if (rs.next()) {
|
||||
formModeId = rs.getInt("id");
|
||||
}
|
||||
dataMap.put("formmodeid", formModeId);
|
||||
RecruitRecordSet.buildModeBaseFields(dataMap, 1);
|
||||
return RecruitRecordSet.refreshRight(uuid, "uf_jcl_yppc", formModeId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 插入数据库并隐藏
|
||||
*
|
||||
* @param dataMap 数据集合
|
||||
* @return
|
||||
*/
|
||||
private int insertHideData(Map<String, Object> dataMap) {
|
||||
String uuid = UUID.randomUUID().toString();
|
||||
dataMap.put("modeuuid", uuid);
|
||||
RecordSet rs = new RecordSet();
|
||||
RecruitRecordSet.buildModeBaseFields(dataMap, 1);
|
||||
rs.executeQuery("select id from uf_jcl_yppc where modeuuid='" + uuid + "'");
|
||||
if (rs.next()) {
|
||||
return Util.getIntValue(rs.getString("id"));
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新简历信息
|
||||
*
|
||||
* @param param 新简历数据集合
|
||||
* @param sourceResume 源简历数据集合
|
||||
* @return
|
||||
*/
|
||||
private int updateSourceResume(Map<String, Object> param, Map<String, Object> sourceResume) {
|
||||
replaceNullValues(param, sourceResume);
|
||||
// 处理操作人员、操作时间
|
||||
RecruitRecordSet.buildModeBaseFields(sourceResume, 1);
|
||||
RecruitRecordSet.updateDataById(sourceResume, "uf_jcl_yppc");
|
||||
// 更新数据
|
||||
return insertHideData(param);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 替换sourceResume中为null或者为空的值
|
||||
*
|
||||
* @param param 新简历数据集合
|
||||
* @param sourceResume 源简历数据集合
|
||||
*/
|
||||
private void replaceNullValues(Map<String, Object> param, Map<String, Object> sourceResume) {
|
||||
for (Map.Entry<String, Object> entry : sourceResume.entrySet()) {
|
||||
String key = entry.getKey();
|
||||
Object value = entry.getValue();
|
||||
|
||||
if (value == null || "".equals(value)) {
|
||||
if (param.containsKey(key)) {
|
||||
sourceResume.put(key, param.get(key));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,47 @@
|
|||
package com.engine.recruit.conn;
|
||||
|
||||
import weaver.conn.RecordSet;
|
||||
|
||||
/**
|
||||
* 招聘职位信息
|
||||
*
|
||||
* @author:dxfeng
|
||||
* @createTime: 2023/10/26
|
||||
* @version: 1.0
|
||||
*/
|
||||
public class PositionCommonInfo {
|
||||
|
||||
/**
|
||||
* 根据千里聆岗位ID,获取招聘职位ID
|
||||
*
|
||||
* @param qllGwId
|
||||
* @return
|
||||
*/
|
||||
public static String getPositionIdByQll(Long qllGwId) {
|
||||
String positionId = "";
|
||||
RecordSet rs = new RecordSet();
|
||||
rs.executeQuery("select id from uf_jcl_zp_zpzw where qllgwid = ?", qllGwId);
|
||||
if (rs.next()) {
|
||||
positionId = rs.getString("id");
|
||||
}
|
||||
return positionId;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取招聘职位关联的招聘流程
|
||||
*
|
||||
* @param positionId
|
||||
* @return
|
||||
*/
|
||||
public static String getRecruitFlowId(String positionId) {
|
||||
String recruitFlowId = "";
|
||||
RecordSet rs = new RecordSet();
|
||||
rs.executeQuery("select zplc from uf_jcl_zp_zpzw where id = ?", positionId);
|
||||
if (rs.next()) {
|
||||
recruitFlowId = rs.getString("zplc");
|
||||
}
|
||||
return recruitFlowId;
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
package com.engine.recruit.conn;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
/**
|
||||
* 聚才林数据集合
|
||||
* </p>
|
||||
* key忽略大小写
|
||||
*
|
||||
* @author:dxfeng
|
||||
* @createTime: 2023/10/19
|
||||
* @version: 1.0
|
||||
*/
|
||||
public class RecruitDataMap<V> extends HashMap<String, V> {
|
||||
@Override
|
||||
public V get(Object key) {
|
||||
if (key instanceof String) {
|
||||
// 将键转为小写形式再进行查找
|
||||
return super.get(((String) key).toLowerCase());
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public V put(String key, V value) {
|
||||
// 将键转为小写形式后作为真正的键
|
||||
return super.put(key.toLowerCase(), value);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,141 @@
|
|||
package com.engine.recruit.conn;
|
||||
|
||||
import com.engine.recruit.exception.CustomizeRunTimeException;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import weaver.common.DateUtil;
|
||||
import weaver.conn.RecordSet;
|
||||
import weaver.formmode.recruit.modeexpand.util.RecruitModeUtil;
|
||||
import weaver.formmode.setup.ModeRightInfo;
|
||||
import weaver.general.Util;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author:dxfeng
|
||||
* @createTime: 2023/10/19
|
||||
* @version: 1.0
|
||||
*/
|
||||
public class RecruitRecordSet {
|
||||
|
||||
/**
|
||||
* 获取单个记录映射
|
||||
*
|
||||
* @param rs RecordSet
|
||||
* @return
|
||||
*/
|
||||
public static Map<String, Object> getSingleRecordMap(RecordSet rs) {
|
||||
Map<String, Object> dataMap = new RecruitDataMap<>();
|
||||
if (rs.next()) {
|
||||
String[] columnNames = rs.getColumnName();
|
||||
for (String columnName : columnNames) {
|
||||
dataMap.put(columnName.toLowerCase(), RecruitModeUtil.parseBlankToNull(rs.getString(columnName)));
|
||||
}
|
||||
}
|
||||
return dataMap;
|
||||
}
|
||||
|
||||
public static List<Map<String, Object>> getRecordMapList(RecordSet rs) {
|
||||
List<Map<String, Object>> list = new ArrayList<>();
|
||||
while (rs.next()) {
|
||||
String[] columnNames = rs.getColumnName();
|
||||
Map<String, Object> dataMap = new RecruitDataMap<>();
|
||||
for (String columnName : columnNames) {
|
||||
dataMap.put(columnName.toLowerCase(), RecruitModeUtil.parseBlankToNull(rs.getString(columnName)));
|
||||
}
|
||||
list.add(dataMap);
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
/**
|
||||
* 插入数据
|
||||
*
|
||||
* @param dataMap 数据集合
|
||||
* @param tableName 表名
|
||||
*/
|
||||
public static void insertData(Map<String, Object> dataMap, String tableName) {
|
||||
List<String> fieldList = new ArrayList<>();
|
||||
List<Object> dataList = new ArrayList<>();
|
||||
List<String> paramList = new ArrayList<>();
|
||||
|
||||
dataMap.forEach((key, value) -> {
|
||||
fieldList.add(key);
|
||||
dataList.add(value);
|
||||
paramList.add("?");
|
||||
});
|
||||
String insertSql = " insert into " + tableName + "(" + StringUtils.join(fieldList, ",") + ") values (" + StringUtils.join(paramList, ",") + ")";
|
||||
RecordSet rs = new RecordSet();
|
||||
rs.executeUpdate(insertSql, dataList);
|
||||
if (StringUtils.isNotBlank(rs.getExceptionMsg())) {
|
||||
throw new CustomizeRunTimeException(rs.getExceptionMsg());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据ID更新数据
|
||||
*
|
||||
* @param dataMap
|
||||
* @param tableName
|
||||
*/
|
||||
public static void updateDataById(Map<String, Object> dataMap, String tableName) {
|
||||
List<String> fieldList = new ArrayList<>();
|
||||
List<Object> dataList = new ArrayList<>();
|
||||
List<String> paramList = new ArrayList<>();
|
||||
String id = Util.null2String(dataMap.get("id"));
|
||||
dataMap.remove("id");
|
||||
|
||||
dataMap.forEach((key, value) -> {
|
||||
fieldList.add(key + " = ? ");
|
||||
dataList.add(value);
|
||||
paramList.add("?");
|
||||
});
|
||||
dataList.add(id);
|
||||
String updateSql = "update " + tableName + " set " + StringUtils.join(fieldList, ",") + " where id = ? ";
|
||||
RecordSet rs = new RecordSet();
|
||||
rs.executeUpdate(updateSql, dataList);
|
||||
if (StringUtils.isNotBlank(rs.getExceptionMsg())) {
|
||||
throw new CustomizeRunTimeException(rs.getExceptionMsg());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 构建建模表基本数据
|
||||
*
|
||||
* @param mainDataMap 参数集合
|
||||
*/
|
||||
public static void buildModeBaseFields(Map<String, Object> mainDataMap, int userId) {
|
||||
String dateTime = DateUtil.getFullDate();
|
||||
String[] dateSplit = dateTime.split(" ");
|
||||
mainDataMap.put("modedatacreater", userId);
|
||||
mainDataMap.put("modedatacreatedate", dateSplit[0]);
|
||||
mainDataMap.put("modedatacreatetime", dateSplit[1]);
|
||||
mainDataMap.put("modedatamodifier", userId);
|
||||
mainDataMap.put("modedatamodifydatetime", dateTime);
|
||||
mainDataMap.put("modedatacreatertype", "0");
|
||||
}
|
||||
|
||||
/**
|
||||
* 建模表数据权限重构
|
||||
*
|
||||
* @param uuid
|
||||
* @param modeTable
|
||||
* @param formModeId
|
||||
*/
|
||||
public static int refreshRight(String uuid, String modeTable, int formModeId) {
|
||||
RecordSet rs = new RecordSet();
|
||||
rs.executeQuery("select id from " + modeTable + " where modeuuid='" + uuid + "'");
|
||||
if (rs.next()) {
|
||||
//建模数据的id
|
||||
int bid = Util.getIntValue(rs.getString("id"));
|
||||
ModeRightInfo modeRightInfo = new ModeRightInfo();
|
||||
modeRightInfo.setNewRight(true);
|
||||
//新建的时候添加共享
|
||||
modeRightInfo.editModeDataShare(1, formModeId, bid);
|
||||
return bid;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,84 @@
|
|||
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.ApplicantResumeWrapper;
|
||||
import weaver.general.Util;
|
||||
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: 2023/09/20
|
||||
* @version: 1.0
|
||||
*/
|
||||
public class ApplicantResumeController {
|
||||
public ApplicantResumeWrapper getApplicantResumeWrapper(User user) {
|
||||
return ServiceUtil.getService(ApplicantResumeWrapper.class, user);
|
||||
}
|
||||
|
||||
@POST
|
||||
@Path("/getApplicantsName")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public String getApplicantsName(@Context HttpServletRequest request, @Context HttpServletResponse response) {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
Map<String, Object> params = ParamUtil.request2Map(request);
|
||||
String ids = Util.null2String(params.get("ids"));
|
||||
return new ResponseResult<String, Map<String, Object>>(user).run(getApplicantResumeWrapper(user)::getApplicantsName, ids);
|
||||
}
|
||||
|
||||
@POST
|
||||
@Path("/getInterviewInfoById")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public String getInterviewInfoById(@Context HttpServletRequest request, @Context HttpServletResponse response) {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
Map<String, Object> params = ParamUtil.request2Map(request);
|
||||
String id = Util.null2String(params.get("id"));
|
||||
return new ResponseResult<String, Map<String, Object>>(user).run(getApplicantResumeWrapper(user)::getInterviewInfoById, id);
|
||||
}
|
||||
|
||||
@POST
|
||||
@Path("/getDisplayLayoutId")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public String getDisplayLayoutId(@Context HttpServletRequest request, @Context HttpServletResponse response) {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
Map<String, Object> params = ParamUtil.request2Map(request);
|
||||
return new ResponseResult<Map<String, Object>, Map<String, Object>>(user).run(getApplicantResumeWrapper(user)::getDisplayLayoutId, params);
|
||||
}
|
||||
|
||||
@POST
|
||||
@Path("/getTabCount")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public String getTabCount(@Context HttpServletRequest request, @Context HttpServletResponse response) {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
Map<String, Object> params = ParamUtil.request2Map(request);
|
||||
return new ResponseResult<Map<String, Object>, Map<String, Object>>(user).run(getApplicantResumeWrapper(user)::getTabCount, params);
|
||||
}
|
||||
@POST
|
||||
@Path("/updateApplicantsInfo")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public String updateApplicantsInfo(@Context HttpServletRequest request, @Context HttpServletResponse response) {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
Map<String, Object> params = ParamUtil.request2Map(request);
|
||||
return new ResponseResult<Map<String, Object>, Map<String, Object>>(user).run(getApplicantResumeWrapper(user)::updateApplicantsInfo, params);
|
||||
}
|
||||
|
||||
@POST
|
||||
@Path("/fullOriginalResumeId")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public String fullOriginalResumeId(@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(getApplicantResumeWrapper(user)::fullOriginalResumeId, param);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,63 @@
|
|||
package com.engine.recruit.controller;
|
||||
|
||||
import com.engine.common.util.ParamUtil;
|
||||
import com.engine.common.util.ServiceUtil;
|
||||
import com.engine.recruit.entity.workbench.OptionVO;
|
||||
import com.engine.recruit.util.ResponseResult;
|
||||
import com.engine.recruit.wrapper.InductionManageWrapper;
|
||||
import com.icbc.api.internal.apache.http.impl.cookie.S;
|
||||
import weaver.hrm.HrmUserVarify;
|
||||
import weaver.hrm.User;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.ws.rs.*;
|
||||
import javax.ws.rs.core.Context;
|
||||
import javax.ws.rs.core.MediaType;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author:dxfeng
|
||||
* @createTime: 2023/10/23
|
||||
* @version: 1.0
|
||||
*/
|
||||
public class InductionManageController {
|
||||
public InductionManageWrapper getInductionManageWrapper(User user) {
|
||||
return ServiceUtil.getService(InductionManageWrapper.class, user);
|
||||
}
|
||||
|
||||
@POST
|
||||
@Path("/updateInductionManageInfo")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public String updateInductionManageInfo(@Context HttpServletRequest request, @Context HttpServletResponse response) {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
Map<String, Object> params = ParamUtil.request2Map(request);
|
||||
return new ResponseResult<Map<String, Object>, Map<String, Object>>(user).run(getInductionManageWrapper(user)::updateInductionManageInfo, params);
|
||||
}
|
||||
|
||||
@POST
|
||||
@Path("/sendCollectInfo")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public String sendCollectInfo(@Context HttpServletRequest request, @Context HttpServletResponse response) {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
Map<String, Object> params = ParamUtil.request2Map(request);
|
||||
return new ResponseResult<Map<String, Object>, Map<String, Object>>(user).run(getInductionManageWrapper(user)::sendCollectInfo, params);
|
||||
}
|
||||
|
||||
@POST
|
||||
@Path("/checkLoginInfo")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public String checkLoginInfo(@Context HttpServletRequest request, @Context HttpServletResponse response) {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
Map<String, Object> params = ParamUtil.request2Map(request);
|
||||
return new ResponseResult<Map<String, Object>, Map<String, Object>>(user).run(getInductionManageWrapper(user)::checkLoginInfo, params);
|
||||
}
|
||||
|
||||
@GET
|
||||
@Path("/infoSubmit")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public String infoSubmit(@Context HttpServletRequest request, @Context HttpServletResponse response, @QueryParam("id") String id) {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
return new ResponseResult<String, Map<String, Object>>(user).run(getInductionManageWrapper(user) :: infoSubmit,id);
|
||||
}
|
||||
}
|
||||
|
|
@ -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.MessageTemplateWrapper;
|
||||
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: 2023/09/26
|
||||
* @version: 1.0
|
||||
*/
|
||||
public class MessageTemplateController {
|
||||
public MessageTemplateWrapper getMessageTemplateWrapper(User user) {
|
||||
return ServiceUtil.getService(MessageTemplateWrapper.class, user);
|
||||
}
|
||||
|
||||
@POST
|
||||
@Path("/getMessageContent")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public String getMessageContent(@Context HttpServletRequest request, @Context HttpServletResponse response) {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
Map<String, Object> params = ParamUtil.request2Map(request);
|
||||
return new ResponseResult<Map<String, Object>, Map<String, Object>>(user).run(getMessageTemplateWrapper(user)::getMessageContent, params);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,38 @@
|
|||
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.RecruitButtonWrapper;
|
||||
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: 2023/09/18
|
||||
* @version: 1.0
|
||||
*/
|
||||
public class RecruitButtonController {
|
||||
|
||||
public RecruitButtonWrapper getRecruitButtonWrapper(User user) {
|
||||
return ServiceUtil.getService(RecruitButtonWrapper.class, user);
|
||||
}
|
||||
|
||||
@POST
|
||||
@Path("/executeButtonAction")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public String executeButtonAction(@Context HttpServletRequest request, @Context HttpServletResponse response) {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
Map<String, Object> params = ParamUtil.request2Map(request);
|
||||
return new ResponseResult<Map<String, Object>, Map<String, Object>>(user).run(getRecruitButtonWrapper(user)::execute, params);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,46 @@
|
|||
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.RecruitFlowWrapper;
|
||||
import weaver.hrm.HrmUserVarify;
|
||||
import weaver.hrm.User;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.ws.rs.GET;
|
||||
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: 2023/09/20
|
||||
* @version: 1.0
|
||||
*/
|
||||
public class RecruitFlowController {
|
||||
public RecruitFlowWrapper getRecruitFlowWrapper(User user) {
|
||||
return ServiceUtil.getService(RecruitFlowWrapper.class, user);
|
||||
}
|
||||
|
||||
@GET
|
||||
@Path("/getButtonList")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public String getButtonList(@Context HttpServletRequest request, @Context HttpServletResponse response) {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
Map<String, Object> params = ParamUtil.request2Map(request);
|
||||
return new ResponseResult<Map<String, Object>, Map<String, Object>>(user).run(getRecruitFlowWrapper(user)::getButtonList, params);
|
||||
}
|
||||
|
||||
@GET
|
||||
@Path("/getRecruitStepList")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public String getRecruitStepList(@Context HttpServletRequest request, @Context HttpServletResponse response) {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
Map<String, Object> params = ParamUtil.request2Map(request);
|
||||
return new ResponseResult<Map<String, Object>, Map<String, Object>>(user).run(getRecruitFlowWrapper(user)::getRecruitStepList, params);
|
||||
}
|
||||
}
|
||||
|
|
@ -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.RecruitPositionWrapper;
|
||||
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: 2023/10/09
|
||||
* @version: 1.0
|
||||
*/
|
||||
public class RecruitPositionController {
|
||||
public RecruitPositionWrapper getRecruitPositionWrapper(User user) {
|
||||
return ServiceUtil.getService(RecruitPositionWrapper.class, user);
|
||||
}
|
||||
|
||||
@POST
|
||||
@Path("/updatePostInfo")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public String updatePostInfo(@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(getRecruitPositionWrapper(user)::updatePostInfo, param);
|
||||
}
|
||||
}
|
||||
|
|
@ -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.RpaJclWrapper;
|
||||
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: 2023/10/27
|
||||
* @version: 1.0
|
||||
*/
|
||||
public class RpaJclController {
|
||||
public RpaJclWrapper getRpaJclWrapper(User user) {
|
||||
return ServiceUtil.getService(RpaJclWrapper.class, user);
|
||||
}
|
||||
|
||||
@POST
|
||||
@Path("/setEmailSetting")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public String setEmailSetting(@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(getRpaJclWrapper(user)::setEmailSetting, param);
|
||||
}
|
||||
}
|
||||
|
|
@ -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.TalentPoolWrapper;
|
||||
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: 2023/10/20
|
||||
* @version: 1.0
|
||||
*/
|
||||
public class TalentPoolController {
|
||||
public TalentPoolWrapper getTalentPoolWrapper(User user) {
|
||||
return ServiceUtil.getService(TalentPoolWrapper.class, user);
|
||||
}
|
||||
|
||||
@POST
|
||||
@Path("/removeBlacklist")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public String removeBlacklist(@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(getTalentPoolWrapper(user)::removeBlacklist, param);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,85 @@
|
|||
package com.engine.recruit.controller;
|
||||
|
||||
import com.engine.common.util.ServiceUtil;
|
||||
import com.engine.recruit.entity.workbench.OptionVO;
|
||||
import com.engine.recruit.entity.workbench.RecruitPortalCommonVO;
|
||||
import com.engine.recruit.service.WorkBenchPortalService;
|
||||
import com.engine.recruit.service.impl.WorkBenchPortalServiceImpl;
|
||||
import com.engine.recruit.util.ResponseResult;
|
||||
import weaver.hrm.HrmUserVarify;
|
||||
import weaver.hrm.User;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.ws.rs.GET;
|
||||
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.List;
|
||||
|
||||
/**
|
||||
* @Author liang.cheng
|
||||
* @Date 2023/10/18 4:34 PM
|
||||
* @Description: TODO
|
||||
* @Version 1.0
|
||||
*/
|
||||
public class WorkBenchPortalController {
|
||||
|
||||
public WorkBenchPortalService getWorkBenchPortal(User user) {
|
||||
return ServiceUtil.getService(WorkBenchPortalServiceImpl.class, user);
|
||||
}
|
||||
|
||||
|
||||
@GET
|
||||
@Path("/top")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public String getRecruitPortalTop(@Context HttpServletRequest request, @Context HttpServletResponse response) {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
return new ResponseResult<String, List<RecruitPortalCommonVO>>(user).run(getWorkBenchPortal(user) :: getRecruitPortalTop);
|
||||
}
|
||||
|
||||
|
||||
@GET
|
||||
@Path("/jobTenure")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public String getJobTenure(@Context HttpServletRequest request, @Context HttpServletResponse response) {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
return new ResponseResult<String, OptionVO>(user).run(getWorkBenchPortal(user) :: getJobTenure);
|
||||
}
|
||||
|
||||
@GET
|
||||
@Path("/waitStepPerson")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public String getWaitStepPerson(@Context HttpServletRequest request, @Context HttpServletResponse response) {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
return new ResponseResult<String, OptionVO>(user).run(getWorkBenchPortal(user) :: getWaitStepPerson);
|
||||
}
|
||||
|
||||
@GET
|
||||
@Path("/recruitTransform")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public String getRecruitTransform(@Context HttpServletRequest request, @Context HttpServletResponse response) {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
return new ResponseResult<String, OptionVO>(user).run(getWorkBenchPortal(user) :: getRecruitTransform);
|
||||
}
|
||||
|
||||
|
||||
@GET
|
||||
@Path("/peopleFrom")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public String getPeopleFrom(@Context HttpServletRequest request, @Context HttpServletResponse response) {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
return new ResponseResult<String, OptionVO>(user).run(getWorkBenchPortal(user) :: getPeopleFrom);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@GET
|
||||
@Path("/recruitProgress")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public String getRecruitProgress(@Context HttpServletRequest request, @Context HttpServletResponse response) {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
return new ResponseResult<String, List<RecruitPortalCommonVO>>(user).run(getWorkBenchPortal(user) :: getRecruitProgress);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,41 @@
|
|||
package com.engine.recruit.controller;
|
||||
|
||||
import com.engine.common.util.ServiceUtil;
|
||||
import com.engine.recruit.entity.workplan.WorkPlanCreateParams;
|
||||
import com.engine.recruit.service.WorkPlanSerivice;
|
||||
import com.engine.recruit.service.impl.WorkPlanServiceImpl;
|
||||
import com.engine.recruit.util.ResponseResult;
|
||||
import io.swagger.v3.oas.annotations.parameters.RequestBody;
|
||||
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;
|
||||
|
||||
/**
|
||||
* @Author liang.cheng
|
||||
* @Date 2023/10/17 10:48 AM
|
||||
* @Description: 面试生成日程
|
||||
* @Version 1.0
|
||||
*/
|
||||
public class WorkPlanController {
|
||||
|
||||
public WorkPlanSerivice getWorkPlan(User user) {
|
||||
return ServiceUtil.getService(WorkPlanServiceImpl.class, user);
|
||||
}
|
||||
|
||||
@POST
|
||||
@Path("/operate")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public String operateWorkPlan(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody WorkPlanCreateParams workPlanCreateParams) {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
return new ResponseResult<WorkPlanCreateParams, String>(user).run(getWorkPlan(user)::operate, workPlanCreateParams);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
package com.engine.recruit.entity.recruitflow.po;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* 招聘流程按钮实体类
|
||||
*
|
||||
* @author:dxfeng
|
||||
* @createTime: 2023/09/25
|
||||
* @version: 1.0
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Builder
|
||||
public class RecruitButton {
|
||||
private String key;
|
||||
private String buttonName;
|
||||
private String tabName;
|
||||
private String tabLink;
|
||||
private String buttonKey;
|
||||
private String buttonType;
|
||||
private Integer orderNum;
|
||||
}
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
package com.engine.recruit.entity.recruitflow.po;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* @author:dxfeng
|
||||
* @createTime: 2023/10/12
|
||||
* @version: 1.0
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Builder
|
||||
public class RecruitStepPo {
|
||||
private int key;
|
||||
private String description;
|
||||
private String type;
|
||||
}
|
||||
|
|
@ -0,0 +1,64 @@
|
|||
package com.engine.recruit.entity.recruitflow.po;
|
||||
|
||||
import com.engine.recruit.util.RecruitFlowUtil;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import weaver.conn.RecordSet;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author:dxfeng
|
||||
* @createTime: 2023/10/11
|
||||
* @version: 1.0
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Builder
|
||||
public class RecruitTabPo {
|
||||
private static final String SEARCH_URL = "/main/cube/search";
|
||||
private String key;
|
||||
private String title;
|
||||
private String url;
|
||||
private String viewcondition;
|
||||
|
||||
private String billId;
|
||||
|
||||
public String getUrl() {
|
||||
return url;
|
||||
}
|
||||
|
||||
public String getTitle() {
|
||||
if (StringUtils.isNotBlank(url) && url.contains(SEARCH_URL)) {
|
||||
Map<String, String> paramMap = RecruitFlowUtil.parseURL(getUrl());
|
||||
String customId = paramMap.get("customid");
|
||||
if (StringUtils.isBlank(customId)) {
|
||||
return title;
|
||||
}
|
||||
// 查询对应查询列表的表名
|
||||
RecordSet rs = new RecordSet();
|
||||
rs.executeQuery("select tablename from workflow_bill where id = (select formid from mode_customsearch where id = ?)", customId);
|
||||
if (rs.next()) {
|
||||
String tableName = rs.getString("tablename");
|
||||
String tabCount = "0";
|
||||
if ("uf_jcl_yppc".equalsIgnoreCase(tableName)) {
|
||||
rs.executeQuery("select xm,sjhm from uf_jcl_yppc where id = ?", billId);
|
||||
if (rs.next()) {
|
||||
rs.executeQuery("select count(id) as num from uf_jcl_yppc where xm=? and sjhm =?", rs.getString("xm"), rs.getString("sjhm"));
|
||||
}
|
||||
} else {
|
||||
rs.executeQuery("select count(1) as num from " + tableName + " where ypz = ? ", billId);
|
||||
}
|
||||
if (rs.next()) {
|
||||
tabCount = rs.getString("num");
|
||||
}
|
||||
title += "(" + tabCount + ")";
|
||||
}
|
||||
}
|
||||
return title;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,32 @@
|
|||
package com.engine.recruit.entity.workbench;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author liang.cheng
|
||||
* @Date 2023/10/19 3:03 PM
|
||||
* @Description: TODO
|
||||
* @Version 1.0
|
||||
*/
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Builder
|
||||
public class OptionVO {
|
||||
|
||||
private String text;
|
||||
|
||||
private List<String> xData;
|
||||
|
||||
private List<Integer> barSeriesData;
|
||||
|
||||
private LinkedList<SeriesParam> seriesData;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
package com.engine.recruit.entity.workbench;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* @Author liang.cheng
|
||||
* @Date 2023/10/19 11:39 AM
|
||||
* @Description: TODO
|
||||
* @Version 1.0
|
||||
*/
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Builder
|
||||
public class RecruitInterviewPO {
|
||||
|
||||
private String ids;
|
||||
|
||||
private String interviewDate;
|
||||
}
|
||||
|
|
@ -0,0 +1,34 @@
|
|||
package com.engine.recruit.entity.workbench;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* @Author liang.cheng
|
||||
* @Date 2023/10/19 10:31 AM
|
||||
* @Description: TODO
|
||||
* @Version 1.0
|
||||
*/
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Builder
|
||||
public class RecruitPortalCommonVO {
|
||||
|
||||
private Integer id;
|
||||
|
||||
private String title;
|
||||
|
||||
private Integer count;
|
||||
|
||||
private String icon;
|
||||
|
||||
private String color;
|
||||
|
||||
private Double scale;
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
package com.engine.recruit.entity.workbench;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* @Author liang.cheng
|
||||
* @Date 2023/9/28 2:02 PM
|
||||
* @Description: TODO
|
||||
* @Version 1.0
|
||||
*/
|
||||
|
||||
@Data
|
||||
@Builder
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class SeriesParam {
|
||||
|
||||
private Double value;
|
||||
|
||||
private String name;
|
||||
|
||||
private String color;
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,39 @@
|
|||
package com.engine.recruit.entity.workplan;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* @Author liang.cheng
|
||||
* @Date 2023/10/17 3:01 PM
|
||||
* @Description:
|
||||
* @Version 1.0
|
||||
*/
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Builder
|
||||
public class WorkPlanCreateParams {
|
||||
|
||||
private String operateType;
|
||||
|
||||
private String billId;
|
||||
|
||||
private String workPlanType;
|
||||
|
||||
private String planName;
|
||||
|
||||
private String memberIds;
|
||||
|
||||
private String urgentLevel;
|
||||
|
||||
private String beginDateTime;
|
||||
|
||||
private String endDateTime;
|
||||
|
||||
private String workId;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,52 @@
|
|||
package com.engine.recruit.enums;
|
||||
|
||||
/**
|
||||
* @author:dxfeng
|
||||
* @createTime: 2023/09/27
|
||||
* @version: 1.0
|
||||
*/
|
||||
public enum ApplicantOperateEnum {
|
||||
|
||||
/**
|
||||
* 应聘者相关操作类型
|
||||
*/
|
||||
ELIMINATE("eliminate", "淘汰"),
|
||||
REFERRAL("referral", "转推其他职位"),
|
||||
TRANSFER("transfer", "转移阶段"),
|
||||
ASSIGN("assign", "分配职位"),
|
||||
ARCHIVE("archive", "归档人才库"),
|
||||
;
|
||||
|
||||
ApplicantOperateEnum(String operateType, String operateDesc) {
|
||||
this.operateType = operateType;
|
||||
this.operateDesc = operateDesc;
|
||||
}
|
||||
|
||||
private String operateType;
|
||||
private String operateDesc;
|
||||
|
||||
public String getOperateType() {
|
||||
return operateType;
|
||||
}
|
||||
|
||||
public void setOperateType(String operateType) {
|
||||
this.operateType = operateType;
|
||||
}
|
||||
|
||||
public String getOperateDesc() {
|
||||
return operateDesc;
|
||||
}
|
||||
|
||||
public void setOperateDesc(String operateDesc) {
|
||||
this.operateDesc = operateDesc;
|
||||
}
|
||||
|
||||
public static ApplicantOperateEnum getOperateType(String operateType) {
|
||||
for (ApplicantOperateEnum item : ApplicantOperateEnum.values()) {
|
||||
if (item.operateType.equalsIgnoreCase(operateType)) {
|
||||
return item;
|
||||
}
|
||||
}
|
||||
throw new RuntimeException("不支持的操作类型");
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,49 @@
|
|||
package com.engine.recruit.enums;
|
||||
|
||||
/**
|
||||
* @author:dxfeng
|
||||
* @createTime: 2023/09/27
|
||||
* @version: 1.0
|
||||
*/
|
||||
public enum ApplicationStatusEnum {
|
||||
/**
|
||||
* 应聘状态
|
||||
*/
|
||||
DISTRIBUTION("待分配", "0"),
|
||||
CANDIDATE("候选中", "1"),
|
||||
ARCHIVED("已归档", "2"),
|
||||
OBSOLETE("已淘汰", "3");
|
||||
|
||||
ApplicationStatusEnum(String name, String value) {
|
||||
this.name = name;
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public static ApplicationStatusEnum getStatus(String value) {
|
||||
for (ApplicationStatusEnum item : ApplicationStatusEnum.values()) {
|
||||
if (item.value.equalsIgnoreCase(value)) {
|
||||
return item;
|
||||
}
|
||||
}
|
||||
throw new RuntimeException("不支持的应聘状态");
|
||||
}
|
||||
|
||||
private String name;
|
||||
private String value;
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public void setValue(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,38 @@
|
|||
package com.engine.recruit.enums;
|
||||
|
||||
/**
|
||||
* @author:dxfeng
|
||||
* @createTime: 2023/10/16
|
||||
* @version: 1.0
|
||||
*/
|
||||
public enum CommonBrowserTypeEnum {
|
||||
/**
|
||||
* 聚才林招聘常用浏览按钮类型
|
||||
*/
|
||||
GENDER("性别"),
|
||||
RESUME_SOURCE("简历来源"),
|
||||
RECRUITMENT_CHANNELS("招聘渠道"),
|
||||
JOB_NATURE("职位性质"),
|
||||
JOB_EDUCATION_REQUIREMENTS("职位学历要求"),
|
||||
MARITAL_STATUS("婚姻状况"),
|
||||
ON_JOB_STATUS("在职状态"),
|
||||
RECRUITMENT_REASONS("招聘原因"),
|
||||
YEARS_OF_WORK("工作年限"),
|
||||
WORK_EXPERIENCE("工作经验"),
|
||||
POLITICAL_LANDSCAPE("政治面貌"),
|
||||
DEGREE("学位");
|
||||
|
||||
CommonBrowserTypeEnum(String desc) {
|
||||
this.desc = desc;
|
||||
}
|
||||
|
||||
private String desc;
|
||||
|
||||
public String getDesc() {
|
||||
return desc;
|
||||
}
|
||||
|
||||
public void setDesc(String desc) {
|
||||
this.desc = desc;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,55 @@
|
|||
package com.engine.recruit.enums;
|
||||
|
||||
/**
|
||||
* @author:dxfeng
|
||||
* @createTime: 2023/09/28
|
||||
* @version: 1.0
|
||||
*/
|
||||
public enum CurrentApplicationStageEnum {
|
||||
|
||||
/**
|
||||
* 当前操作阶段
|
||||
*/
|
||||
SCREENING("初筛", "0"),
|
||||
WRITTEN("笔试", "1"),
|
||||
INTERVIEW("面试", "2"),
|
||||
EVALUATION("测评", "3"),
|
||||
SALARY("薪酬谈判", "4"),
|
||||
BACK("背调", "5"),
|
||||
offer("offer", "6"),
|
||||
EMPLOYMENT("待入职", "8"),
|
||||
ENTRY("入职", "9 ");
|
||||
|
||||
CurrentApplicationStageEnum(String stageName, String stageValue) {
|
||||
this.stageName = stageName;
|
||||
this.stageValue = stageValue;
|
||||
}
|
||||
|
||||
private String stageName;
|
||||
private String stageValue;
|
||||
|
||||
public String getStageName() {
|
||||
return stageName;
|
||||
}
|
||||
|
||||
public void setStageName(String stageName) {
|
||||
this.stageName = stageName;
|
||||
}
|
||||
|
||||
public String getStageValue() {
|
||||
return stageValue;
|
||||
}
|
||||
|
||||
public void setStageValue(String stageValue) {
|
||||
this.stageValue = stageValue;
|
||||
}
|
||||
|
||||
public static CurrentApplicationStageEnum getOperateType(String operateType) {
|
||||
for (CurrentApplicationStageEnum item : CurrentApplicationStageEnum.values()) {
|
||||
if (item.stageValue.equalsIgnoreCase(operateType)) {
|
||||
return item;
|
||||
}
|
||||
}
|
||||
throw new RuntimeException("不支持的操作类型");
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,41 @@
|
|||
package com.engine.recruit.enums;
|
||||
|
||||
/**
|
||||
* 入职状态枚举类
|
||||
*
|
||||
* @author:dxfeng
|
||||
* @createTime: 2023/10/10
|
||||
* @version: 1.0
|
||||
*/
|
||||
public enum EntryStatusEnum {
|
||||
/**
|
||||
* 入职状态
|
||||
*/
|
||||
PENDING("0", "待入职"),
|
||||
EMPLOYED("0", "已入职"),
|
||||
CANCEL("0", "取消入职");
|
||||
|
||||
EntryStatusEnum(String value, String desc) {
|
||||
this.value = value;
|
||||
this.desc = desc;
|
||||
}
|
||||
|
||||
private String value;
|
||||
private String desc;
|
||||
|
||||
public String getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public void setValue(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public String getDesc() {
|
||||
return desc;
|
||||
}
|
||||
|
||||
public void setDesc(String desc) {
|
||||
this.desc = desc;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,59 @@
|
|||
package com.engine.recruit.enums;
|
||||
|
||||
/**
|
||||
* 学历浏览按钮枚举类
|
||||
*
|
||||
* @author:dxfeng
|
||||
* @createTime: 2023/10/17
|
||||
* @version: 1.0
|
||||
*/
|
||||
public enum HighestDegreeEnum {
|
||||
/**
|
||||
* 学历浏览按钮枚举类
|
||||
*/
|
||||
OTHER(1, "其他"),
|
||||
JUNIOR_MIDDLE_SCHOOL(2, "初中"),
|
||||
HIGH_SCHOOL(2, "高中"),
|
||||
SECONDARY_TECHNOLOGY(2, "中技"),
|
||||
SECONDARY_SPECIALIZED_SCHOOL(2, "中专"),
|
||||
JUNIOR_COLLEGE(2, "大专"),
|
||||
UNDERGRADUATE(2, "本科"),
|
||||
MASTER_DEGREE(2, "硕士研究生"),
|
||||
DOCTORAL_STUDENTS(2, "博士研究生"),
|
||||
MBA(2, "MBA"),
|
||||
EMBA(2, "EMBA"),
|
||||
POST_DOCTORAL(2, "博士后");
|
||||
|
||||
HighestDegreeEnum(Integer id, String name) {
|
||||
this.id = id;
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public static HighestDegreeEnum getDegreeId(String name) {
|
||||
for (HighestDegreeEnum item : HighestDegreeEnum.values()) {
|
||||
if (item.name.equalsIgnoreCase(name)) {
|
||||
return item;
|
||||
}
|
||||
}
|
||||
return HighestDegreeEnum.OTHER;
|
||||
}
|
||||
|
||||
private Integer id;
|
||||
private String name;
|
||||
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,40 @@
|
|||
package com.engine.recruit.enums;
|
||||
|
||||
/**
|
||||
* @author:dxfeng
|
||||
* @createTime: 2023/10/24
|
||||
* @version: 1.0
|
||||
*/
|
||||
public enum InfoCollectEnum {
|
||||
/**
|
||||
* 信息采集状态
|
||||
*/
|
||||
NOT_SENT(0, "未发送"),
|
||||
HAS_SENT(1, "已发送"),
|
||||
NOT_SUBMITTED(2, "未提交"),
|
||||
SUBMITTED(3, "已提交");
|
||||
|
||||
InfoCollectEnum(Integer id, String name) {
|
||||
this.id = id;
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
private Integer id;
|
||||
private String name;
|
||||
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,49 @@
|
|||
package com.engine.recruit.enums;
|
||||
|
||||
/**
|
||||
* @author:dxfeng
|
||||
* @createTime: 2023/09/27
|
||||
* @version: 1.0
|
||||
*/
|
||||
public enum InterviewOperateTypeEnum {
|
||||
/**
|
||||
* 面试操作类型
|
||||
*/
|
||||
EVALUATE("evaluate", "面试评价"),
|
||||
CANCEL("cancel", "取消面试"),
|
||||
ARRANGE("arrange", "安排面试"),
|
||||
ADJUSTMENT("adjustment", "调整面试");
|
||||
|
||||
InterviewOperateTypeEnum(String operateType, String operateDesc) {
|
||||
this.operateType = operateType;
|
||||
this.operateDesc = operateDesc;
|
||||
}
|
||||
|
||||
private String operateType;
|
||||
private String operateDesc;
|
||||
|
||||
public String getOperateType() {
|
||||
return operateType;
|
||||
}
|
||||
|
||||
public void setOperateType(String operateType) {
|
||||
this.operateType = operateType;
|
||||
}
|
||||
|
||||
public String getOperateDesc() {
|
||||
return operateDesc;
|
||||
}
|
||||
|
||||
public void setOperateDesc(String operateDesc) {
|
||||
this.operateDesc = operateDesc;
|
||||
}
|
||||
|
||||
public static InterviewOperateTypeEnum getOperateType(String operateType) {
|
||||
for (InterviewOperateTypeEnum item : InterviewOperateTypeEnum.values()) {
|
||||
if (item.operateType.equalsIgnoreCase(operateType)) {
|
||||
return item;
|
||||
}
|
||||
}
|
||||
throw new RuntimeException("不支持的操作类型");
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,48 @@
|
|||
package com.engine.recruit.enums;
|
||||
|
||||
/**
|
||||
* @author:dxfeng
|
||||
* @createTime: 2023/10/23
|
||||
* @version: 1.0
|
||||
*/
|
||||
public enum PositionOperateEnum {
|
||||
/**
|
||||
* 入职管理相关操作
|
||||
*/
|
||||
PREPARE("prepare", "入职准备"),
|
||||
HANDLE("prepare", "办理入职"),
|
||||
;
|
||||
|
||||
PositionOperateEnum(String operateType, String operateDesc) {
|
||||
this.operateType = operateType;
|
||||
this.operateDesc = operateDesc;
|
||||
}
|
||||
|
||||
private String operateType;
|
||||
private String operateDesc;
|
||||
|
||||
public String getOperateType() {
|
||||
return operateType;
|
||||
}
|
||||
|
||||
public void setOperateType(String operateType) {
|
||||
this.operateType = operateType;
|
||||
}
|
||||
|
||||
public String getOperateDesc() {
|
||||
return operateDesc;
|
||||
}
|
||||
|
||||
public void setOperateDesc(String operateDesc) {
|
||||
this.operateDesc = operateDesc;
|
||||
}
|
||||
|
||||
public static PositionOperateEnum getOperateType(String operateType) {
|
||||
for (PositionOperateEnum item : PositionOperateEnum.values()) {
|
||||
if (item.operateType.equalsIgnoreCase(operateType)) {
|
||||
return item;
|
||||
}
|
||||
}
|
||||
throw new RuntimeException("不支持的操作类型");
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,54 @@
|
|||
package com.engine.recruit.enums;
|
||||
|
||||
import com.engine.recruit.exception.CustomizeRunTimeException;
|
||||
|
||||
/**
|
||||
* 发布渠道枚举类
|
||||
*
|
||||
* @author:dxfeng
|
||||
* @createTime: 2023/10/08
|
||||
* @version: 1.0
|
||||
*/
|
||||
public enum PositionThirdChannelEnum {
|
||||
/**
|
||||
* 发布渠道
|
||||
*/
|
||||
BOSSZHIPIN("0", "BOSS直聘"),
|
||||
ZHILIANZHAOPIN("1", "智联"),
|
||||
QIANCHENGWUYOU("2", "前程无忧"),
|
||||
LAGO("3", "拉勾"),
|
||||
LIEPIN("4", "猎聘");
|
||||
|
||||
PositionThirdChannelEnum(String value, String desc) {
|
||||
this.value = value;
|
||||
this.desc = desc;
|
||||
}
|
||||
|
||||
private String value;
|
||||
private String desc;
|
||||
|
||||
public String getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public void setValue(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public String getDesc() {
|
||||
return desc;
|
||||
}
|
||||
|
||||
public void setDesc(String desc) {
|
||||
this.desc = desc;
|
||||
}
|
||||
|
||||
public static PositionThirdChannelEnum getEnum(String value) {
|
||||
for (PositionThirdChannelEnum item : PositionThirdChannelEnum.values()) {
|
||||
if (item.value.equalsIgnoreCase(value)) {
|
||||
return item;
|
||||
}
|
||||
}
|
||||
throw new CustomizeRunTimeException("不支持的发布渠道");
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,55 @@
|
|||
package com.engine.recruit.enums;
|
||||
|
||||
/**
|
||||
* <p>聚才林招聘</p>
|
||||
* 需求状态枚举类
|
||||
*
|
||||
* @author:dxfeng
|
||||
* @createTime: 2023/09/13
|
||||
* @version: 1.0
|
||||
*/
|
||||
public enum RecruitStatusEnum {
|
||||
/**
|
||||
* 进行中(0)
|
||||
*/
|
||||
RECRUITMENT_PROGRESS(0, "进行中"),
|
||||
/**
|
||||
* 招聘完成(1)
|
||||
*/
|
||||
RECRUITMENT_COMPLETED(1, "招聘完成"),
|
||||
/**
|
||||
* 招聘停止(2)
|
||||
*/
|
||||
RECRUITMENT_STOPS(2, "招聘停止");
|
||||
|
||||
RecruitStatusEnum(Integer value, String desc) {
|
||||
this.value = value;
|
||||
this.desc = desc;
|
||||
}
|
||||
|
||||
/**
|
||||
* 选择框对应ID
|
||||
*/
|
||||
private Integer value;
|
||||
|
||||
/**
|
||||
* 选择框对应描述
|
||||
*/
|
||||
private String desc;
|
||||
|
||||
public Integer getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public void setValue(Integer value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public String getDesc() {
|
||||
return desc;
|
||||
}
|
||||
|
||||
public void setDesc(String desc) {
|
||||
this.desc = desc;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
package com.engine.recruit.exception;
|
||||
|
||||
/**
|
||||
* @author:dxfeng
|
||||
* @createTime: 2023/09/18
|
||||
* @version: 1.0
|
||||
*/
|
||||
public class CustomizeRunTimeException extends RuntimeException{
|
||||
|
||||
public CustomizeRunTimeException(String message) {
|
||||
super(message);
|
||||
}
|
||||
|
||||
public CustomizeRunTimeException(Throwable cause) {
|
||||
super(cause);
|
||||
}
|
||||
|
||||
public CustomizeRunTimeException(String message, Throwable cause) {
|
||||
super(message, cause);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,37 @@
|
|||
package com.engine.recruit.factory;
|
||||
|
||||
import com.engine.core.impl.Service;
|
||||
import com.engine.recruit.service.RecruitButtonService;
|
||||
|
||||
/**
|
||||
* <p>聚才林招聘</p>
|
||||
* 招聘按钮工厂类
|
||||
*
|
||||
* @author:dxfeng
|
||||
* @createTime: 2023/09/18
|
||||
* @version: 1.0
|
||||
*/
|
||||
public class RecruitButtonFactory {
|
||||
|
||||
/**
|
||||
* 根据类的全路径获取类对象
|
||||
*
|
||||
* @param className 类全路径
|
||||
* @param <T>
|
||||
* @return
|
||||
*/
|
||||
public static <T extends Service> Class<T> getClass(String className) {
|
||||
Class<?> clazz;
|
||||
try {
|
||||
clazz = Class.forName(className);
|
||||
if (!RecruitButtonService.class.isAssignableFrom(clazz)) {
|
||||
throw new IllegalArgumentException("该类未实现RecruitButtonService");
|
||||
}
|
||||
return (Class<T>) clazz;
|
||||
} catch (ClassNotFoundException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,65 @@
|
|||
package com.engine.recruit.service;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* <p>聚才林招聘</p>
|
||||
* <p>
|
||||
* 应聘者简历服务类
|
||||
*
|
||||
* @author:dxfeng
|
||||
* @createTime: 2023/09/20
|
||||
* @version: 1.0
|
||||
*/
|
||||
public interface ApplicantResumeService {
|
||||
|
||||
/**
|
||||
* 获取应聘者姓名
|
||||
*
|
||||
* @param ids 应聘者ID
|
||||
* @return 应聘者姓名
|
||||
*/
|
||||
Map<String, Object> getApplicantsName(String ids);
|
||||
|
||||
/**
|
||||
* 根据ID获取面试信息
|
||||
*
|
||||
* @param id
|
||||
* @return 面试信息
|
||||
*/
|
||||
Map<String, Object> getInterviewInfoById(String id);
|
||||
|
||||
/**
|
||||
* 获取编辑布局对应的显示布局ID
|
||||
*
|
||||
* @param params 入参
|
||||
* @return 显示布局ID
|
||||
*/
|
||||
Map<String, Object> getDisplayLayoutId(Map<String, Object> params);
|
||||
|
||||
/**
|
||||
* 获取关联Tab页,数据统计条数
|
||||
*
|
||||
* @param params 入参
|
||||
* @return 据统计条数
|
||||
*/
|
||||
Map<String, Object> getTabCount(Map<String, Object> params);
|
||||
|
||||
|
||||
/**
|
||||
* 更新应聘者信息
|
||||
*
|
||||
* @param params 入参
|
||||
* @return
|
||||
*/
|
||||
Map<String, Object> updateApplicantsInfo(Map<String, Object> params);
|
||||
|
||||
|
||||
/**
|
||||
* 完善OCR导入的简历,原始简历字段
|
||||
*
|
||||
* @param params
|
||||
* @return
|
||||
*/
|
||||
Map<String, Object> fullOriginalResumeId(Map<String, Object> params);
|
||||
}
|
||||
|
|
@ -0,0 +1,44 @@
|
|||
package com.engine.recruit.service;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author:dxfeng
|
||||
* @createTime: 2023/10/23
|
||||
* @version: 1.0
|
||||
*/
|
||||
public interface InductionManageService {
|
||||
/**
|
||||
* 更新入职管理信息
|
||||
*
|
||||
* @param param 参数
|
||||
* @return
|
||||
*/
|
||||
Map<String, Object> updateInductionManageInfo(Map<String, Object> param);
|
||||
|
||||
|
||||
/**
|
||||
* 发送信息采集
|
||||
*
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
Map<String, Object> sendCollectInfo(Map<String, Object> param);
|
||||
|
||||
/**
|
||||
* 校验登录信息
|
||||
*
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
Map<String, Object> checkLoginInfo(Map<String, Object> param);
|
||||
|
||||
/**
|
||||
* @Description:
|
||||
* @Author: liang.cheng
|
||||
* @Date: 2023/10/25 10:30 AM
|
||||
* @param: [id]
|
||||
* @return: java.util.Map<java.lang.String,java.lang.Object>
|
||||
*/
|
||||
Map<String, Object> infoSubmit(String id);
|
||||
}
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
package com.engine.recruit.service;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* <p>聚才林招聘</p>
|
||||
* 消息模板接口
|
||||
*
|
||||
* @author:dxfeng
|
||||
* @createTime: 2023/09/26
|
||||
* @version: 1.0
|
||||
*/
|
||||
public interface MessageTemplateService {
|
||||
|
||||
/**
|
||||
* 获取邮件模板内容
|
||||
*
|
||||
* @param params 入参
|
||||
* @return 模板内容
|
||||
*/
|
||||
Map<String, Object> getMessageContent(Map<String, Object> params);
|
||||
}
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
package com.engine.recruit.service;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* <p>聚才林招聘</p>
|
||||
* 招聘流程按钮功能实现接口
|
||||
*
|
||||
* @author:dxfeng
|
||||
* @createTime: 2023/09/18
|
||||
* @version: 1.0
|
||||
*/
|
||||
public interface RecruitButtonService {
|
||||
|
||||
/**
|
||||
* 按钮执行的业务逻辑
|
||||
*
|
||||
* @param params 参数集合
|
||||
* @return 响应结果
|
||||
*/
|
||||
Map<String, Object> execute(Map<String, Object> params);
|
||||
}
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
package com.engine.recruit.service;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* <p>聚才林招聘</p>
|
||||
* 招聘流程接口
|
||||
*
|
||||
* @author:dxfeng
|
||||
* @createTime: 2023/09/22
|
||||
* @version: 1.0
|
||||
*/
|
||||
public interface RecruitFlowService {
|
||||
/**
|
||||
* 获取当前阶段操作按钮
|
||||
*
|
||||
* @param param 参数
|
||||
* @return 操作按钮
|
||||
*/
|
||||
Map<String, Object> getButtonList(Map<String, Object> param);
|
||||
|
||||
/**
|
||||
* 获取招聘阶段信息
|
||||
*
|
||||
* @param param 参数
|
||||
* @return 招聘阶段
|
||||
*/
|
||||
Map<String, Object> getRecruitStepList(Map<String, Object> param);
|
||||
}
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
package com.engine.recruit.service;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author:dxfeng
|
||||
* @createTime: 2023/10/09
|
||||
* @version: 1.0
|
||||
*/
|
||||
public interface RecruitPositionService {
|
||||
|
||||
/**
|
||||
* 更新职位信息
|
||||
*
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
Map<String, Object> updatePostInfo(Map<String, Object> param);
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
package com.engine.recruit.service;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author:dxfeng
|
||||
* @createTime: 2023/10/27
|
||||
* @version: 1.0
|
||||
*/
|
||||
public interface RpaJclService {
|
||||
|
||||
/**
|
||||
* 配置简历采集邮箱设置
|
||||
*
|
||||
* @param param 前段传参
|
||||
* @return
|
||||
*/
|
||||
Map<String, Object> setEmailSetting(Map<String, Object> param);
|
||||
}
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
package com.engine.recruit.service;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author:dxfeng
|
||||
* @createTime: 2023/10/20
|
||||
* @version: 1.0
|
||||
*/
|
||||
public interface TalentPoolService {
|
||||
|
||||
/**
|
||||
* 移出黑名单
|
||||
*
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
Map<String, Object> removeBlacklist(Map<String, Object> param);
|
||||
}
|
||||
|
|
@ -0,0 +1,72 @@
|
|||
package com.engine.recruit.service;
|
||||
|
||||
import com.engine.recruit.entity.workbench.OptionVO;
|
||||
import com.engine.recruit.entity.workbench.RecruitPortalCommonVO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author liang.cheng
|
||||
* @Date 2023/10/18 4:43 PM
|
||||
* @Description:
|
||||
* @Version 1.0
|
||||
*/
|
||||
public interface WorkBenchPortalService {
|
||||
|
||||
/**
|
||||
* @Description: 顶部元素
|
||||
* @Author: liang.cheng
|
||||
* @Date: 2023/10/19 10:47 AM
|
||||
* @param: []
|
||||
* @return: com.engine.recruit.entity.workbench.RecruitPortalCommonVO
|
||||
*/
|
||||
List<RecruitPortalCommonVO> getRecruitPortalTop();
|
||||
|
||||
/**
|
||||
* @Description: 职位年限要求分布
|
||||
* @Author: liang.cheng
|
||||
* @Date: 2023/10/19 3:15 PM
|
||||
* @param: []
|
||||
* @return: com.engine.recruit.entity.workbench.OptionVO
|
||||
*/
|
||||
OptionVO getJobTenure();
|
||||
|
||||
|
||||
/**
|
||||
* @Description: 候选中应聘者各阶段数
|
||||
* @Author: liang.cheng
|
||||
* @Date: 2023/10/20 9:35 AM
|
||||
* @param: []
|
||||
* @return: com.engine.recruit.entity.workbench.OptionVO
|
||||
*/
|
||||
OptionVO getWaitStepPerson();
|
||||
|
||||
/**
|
||||
* @Description: 招聘转化
|
||||
* @Author: liang.cheng
|
||||
* @Date: 2023/10/20 10:04 AM
|
||||
* @param: []
|
||||
* @return: com.engine.recruit.entity.workbench.OptionVO
|
||||
*/
|
||||
OptionVO getRecruitTransform();
|
||||
|
||||
/**
|
||||
* @Description: 人才来源
|
||||
* @Author: liang.cheng
|
||||
* @Date: 2023/10/20 11:07 AM
|
||||
* @param: []
|
||||
* @return: com.engine.recruit.entity.workbench.OptionVO
|
||||
*/
|
||||
OptionVO getPeopleFrom();
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @Description: 招聘进度
|
||||
* @Author: liang.cheng
|
||||
* @Date: 2023/10/23 11:07 AM
|
||||
* @param: []
|
||||
* @return:
|
||||
*/
|
||||
List<RecruitPortalCommonVO> getRecruitProgress();
|
||||
}
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
package com.engine.recruit.service;
|
||||
|
||||
import com.engine.recruit.entity.workplan.WorkPlanCreateParams;
|
||||
|
||||
|
||||
/**
|
||||
* @Author liang.cheng
|
||||
* @Date 2023/10/17 10:50 AM
|
||||
* @Description: TODO
|
||||
* @Version 1.0
|
||||
*/
|
||||
public interface WorkPlanSerivice {
|
||||
|
||||
/**
|
||||
* @Description: 面试操作日程
|
||||
* @Author: liang.cheng
|
||||
* @Date: 2023/10/17 11:03 AM
|
||||
*/
|
||||
void operate(WorkPlanCreateParams workPlanCreateParams);
|
||||
}
|
||||
|
|
@ -0,0 +1,536 @@
|
|||
package com.engine.recruit.service.impl;
|
||||
|
||||
import cn.hutool.core.convert.Convert;
|
||||
import com.engine.core.impl.Service;
|
||||
import com.engine.recruit.conn.RecruitDataMap;
|
||||
import com.engine.recruit.conn.RecruitRecordSet;
|
||||
import com.engine.recruit.enums.ApplicantOperateEnum;
|
||||
import com.engine.recruit.enums.ApplicationStatusEnum;
|
||||
import com.engine.recruit.exception.CustomizeRunTimeException;
|
||||
import com.engine.recruit.service.ApplicantResumeService;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import weaver.conn.RecordSet;
|
||||
import weaver.formmode.recruit.modeexpand.util.RecruitModeUtil;
|
||||
import weaver.formmode.setup.ModeRightInfo;
|
||||
import weaver.general.Util;
|
||||
import weaver.hrm.resource.ResourceComInfo;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* @author:dxfeng
|
||||
* @createTime: 2023/09/20
|
||||
* @version: 1.0
|
||||
*/
|
||||
public class ApplicantResumeServiceImpl extends Service implements ApplicantResumeService {
|
||||
@Override
|
||||
public Map<String, Object> getApplicantsName(String ids) {
|
||||
Map<String, Object> returnMap = new HashMap<>(1);
|
||||
RecordSet rs = new RecordSet();
|
||||
String[] split = ids.split(",");
|
||||
List<Map<String, Object>> list = new ArrayList<>();
|
||||
for (String id : split) {
|
||||
rs.executeQuery("select xm from uf_jcl_yppc where id = ?", id);
|
||||
if (rs.next()) {
|
||||
Map<String, Object> rowMap = new HashMap<>();
|
||||
rowMap.put("id", id);
|
||||
rowMap.put("name", rs.getString("xm"));
|
||||
list.add(rowMap);
|
||||
}
|
||||
}
|
||||
returnMap.put("rows", list);
|
||||
return returnMap;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> getInterviewInfoById(String id) {
|
||||
Map<String, Object> returnMap = new HashMap<>(16);
|
||||
String sql = "select a.ypz,b.xm,a.ypzw,b.tdsj,b.sjhm,b.dzyx,a.msfs,a.mshj ,a.msc,a.msg ,a.ptmsg,a.msrq,a.msdd ,a.msfkr from uf_jcl_ms a inner join uf_jcl_yppc b on a.ypz = b.id where a.id = ?";
|
||||
RecordSet rs = new RecordSet();
|
||||
rs.executeQuery(sql, id);
|
||||
if (rs.next()) {
|
||||
// 应聘者
|
||||
returnMap.put("ypz", createApplicantBrowserMap(rs.getString("ypz"), rs.getString("xm")));
|
||||
// 应聘职位
|
||||
returnMap.put("ypzw", createAppliedPositionBrowserMap(rs.getString("ypzw")));
|
||||
// 投递时间
|
||||
returnMap.put("tdsj", createApplicantBrowserMap(rs.getString("tdsj")));
|
||||
// 手机号码
|
||||
returnMap.put("sjhm", createApplicantBrowserMap(rs.getString("sjhm")));
|
||||
// 电子邮箱
|
||||
returnMap.put("dzyx", createApplicantBrowserMap(rs.getString("dzyx")));
|
||||
// 面试方式
|
||||
returnMap.put("msfs", createApplicantBrowserMap(rs.getString("msfs")));
|
||||
// 面试环节
|
||||
returnMap.put("mshj", createApplicantBrowserMap(rs.getString("mshj")));
|
||||
// 面试轮次
|
||||
returnMap.put("msc", createApplicantBrowserMap(rs.getString("msc")));
|
||||
// 面试官
|
||||
returnMap.put("msg", createResourceBrowserMap(rs.getString("msg")));
|
||||
// 陪同面试官
|
||||
returnMap.put("ptmsg", createResourceBrowserMap(rs.getString("ptmsg")));
|
||||
// 面试日期
|
||||
returnMap.put("msrq", createApplicantBrowserMap(rs.getString("msrq")));
|
||||
// 面试地址
|
||||
returnMap.put("msdd", createApplicantBrowserMap(rs.getString("msdd")));
|
||||
}
|
||||
return returnMap;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> getDisplayLayoutId(Map<String, Object> params) {
|
||||
Map<String, Object> returnMap = new HashMap<>();
|
||||
String layoutId = Util.null2String(params.get("layoutid"));
|
||||
String modeId = Util.null2String(params.get("modeId"));
|
||||
returnMap.put("layoutId", layoutId);
|
||||
RecordSet rs = new RecordSet();
|
||||
rs.executeQuery("select layoutname from modehtmllayout where modeid = ? and id = ?", modeId, layoutId);
|
||||
if (rs.next()) {
|
||||
String layoutName = rs.getString("layoutname");
|
||||
// 获取相同名称的显示布局ID
|
||||
rs.executeQuery("select id from modehtmllayout where type = 0 and modeid = ? and layoutname =?", modeId, layoutName);
|
||||
if (rs.next()) {
|
||||
returnMap.put("layoutId", rs.getString("id"));
|
||||
}
|
||||
}
|
||||
return returnMap;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> getTabCount(Map<String, Object> params) {
|
||||
Map<String, Object> returnMap = new HashMap<>();
|
||||
String billId = Util.null2String(params.get("billid"));
|
||||
List<Integer> countList = new ArrayList<>();
|
||||
RecordSet rs = new RecordSet();
|
||||
// 部门筛选反馈
|
||||
rs.executeQuery("select count(id) as num from uf_jcl_bmsxfk where ypz = ?", billId);
|
||||
if (rs.next()) {
|
||||
countList.add(rs.getInt("num"));
|
||||
}
|
||||
// 笔试
|
||||
rs.executeQuery("select count(id) as num from uf_jcl_bs where ypz = ?", billId);
|
||||
if (rs.next()) {
|
||||
countList.add(rs.getInt("num"));
|
||||
}
|
||||
// 面试
|
||||
rs.executeQuery("select count(id) as num from uf_jcl_ms where ypz = ?", billId);
|
||||
if (rs.next()) {
|
||||
countList.add(rs.getInt("num"));
|
||||
}
|
||||
// 背调
|
||||
rs.executeQuery("select count(id) as num from uf_jcl_bd where ypz = ?", billId);
|
||||
if (rs.next()) {
|
||||
countList.add(rs.getInt("num"));
|
||||
}
|
||||
// 薪酬谈判
|
||||
rs.executeQuery("select count(id) as num from uf_jcl_xctp where ypz = ?", billId);
|
||||
if (rs.next()) {
|
||||
countList.add(rs.getInt("num"));
|
||||
}
|
||||
// 历史投递记录
|
||||
rs.executeQuery("select xm,sjhm from uf_jcl_yppc where id = ?", billId);
|
||||
if (rs.next()) {
|
||||
rs.executeQuery("select count(id) as num from uf_jcl_yppc where xm=? and sjhm =?", rs.getString("xm"), rs.getString("sjhm"));
|
||||
if (rs.next()) {
|
||||
countList.add(rs.getInt("num"));
|
||||
}
|
||||
} else {
|
||||
countList.add(0);
|
||||
}
|
||||
|
||||
|
||||
returnMap.put("countList", countList);
|
||||
return returnMap;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> updateApplicantsInfo(Map<String, Object> params) {
|
||||
Map<String, Object> returnMap = new HashMap<>();
|
||||
String operateType = Util.null2String(params.get("operateType"));
|
||||
RecordSet rs = new RecordSet();
|
||||
if (ApplicantOperateEnum.ELIMINATE.getOperateType().equals(operateType)) {
|
||||
// 淘汰
|
||||
String ids = Util.null2String(params.get("ids"));
|
||||
rs.executeUpdate("update uf_jcl_yppc set zt = ? where id in (" + ids + ")", ApplicationStatusEnum.OBSOLETE.getValue());
|
||||
returnMap.put("msg", "操作成功");
|
||||
} else if (ApplicantOperateEnum.TRANSFER.getOperateType().equals(operateType)) {
|
||||
// 转移阶段
|
||||
String dqypjd = Util.null2String(params.get("dqypjd"));
|
||||
String billid = Util.null2String(params.get("billid"));
|
||||
// 查询当前阶段的阶段类型
|
||||
rs.executeQuery("select jdlx from uf_jcl_zpjdsz where id = ?", dqypjd);
|
||||
if (rs.next()) {
|
||||
String jdlx = rs.getString("jdlx");
|
||||
rs.executeUpdate("update uf_jcl_yppc set zpjd = ?,dqypjd = ? where id = ?", dqypjd, jdlx, billid);
|
||||
returnMap.put("msg", "操作成功");
|
||||
} else {
|
||||
throw new CustomizeRunTimeException("转移阶段失败");
|
||||
}
|
||||
} else if (ApplicantOperateEnum.ASSIGN.getOperateType().equals(operateType)) {
|
||||
// 分配职位
|
||||
String billid = Util.null2String(params.get("billid"));
|
||||
String ypzw = Util.null2String(params.get("ypzw"));
|
||||
rs.executeUpdate("update uf_jcl_yppc set ypzw = ? where id = ?", ypzw, billid);
|
||||
returnMap.put("msg", "操作成功");
|
||||
} else if (ApplicantOperateEnum.ARCHIVE.getOperateType().equals(operateType)) {
|
||||
// 归档人才库
|
||||
String gdyy = Util.null2String(params.get("gdyy"));
|
||||
String gdxxyy = Util.null2String(params.get("gdxxyy"));
|
||||
String ids = Util.null2String(params.get("ids"));
|
||||
if (StringUtils.isNotBlank(ids)) {
|
||||
String[] split = ids.split(",");
|
||||
for (String id : split) {
|
||||
rs.executeUpdate("update uf_jcl_yppc set gdyy = ?,gdxxyy = ? where id = ? ", gdyy, gdxxyy, id);
|
||||
// 建模推送建模
|
||||
archiveTalentPool(id, false);
|
||||
// 更新应聘状态为已归档
|
||||
rs.executeUpdate("update uf_jcl_yppc set zt = ? where id = ? ", ApplicationStatusEnum.ARCHIVED.getValue(), id);
|
||||
}
|
||||
} else {
|
||||
returnMap.put("msg", "请至少选择一条数据");
|
||||
}
|
||||
} else if (ApplicantOperateEnum.REFERRAL.getOperateType().equals(operateType)) {
|
||||
// 转推其他职位
|
||||
String sourceId = Util.null2String(params.get("sourceId"));
|
||||
String ypzw = Util.null2String(params.get("ypzw"));
|
||||
String zplc = null;
|
||||
rs.executeQuery("select zplc from uf_jcl_zp_zpzw where id = ?", ypzw);
|
||||
if (rs.next()) {
|
||||
zplc = rs.getString("zplc");
|
||||
}
|
||||
|
||||
rs.executeQuery("select * from uf_jcl_yppc where id = ?", sourceId);
|
||||
Map<String, Object> mainDataMap = RecruitRecordSet.getSingleRecordMap(rs);
|
||||
// 构建新数据
|
||||
mainDataMap.put("ypzw", ypzw);
|
||||
mainDataMap.put("zplc", zplc);
|
||||
mainDataMap.put("zpjd", null);
|
||||
mainDataMap.put("dqypjd", null);
|
||||
mainDataMap.put("zt", ApplicationStatusEnum.CANDIDATE.getValue());
|
||||
RecruitRecordSet.buildModeBaseFields(mainDataMap, user.getUID());
|
||||
String uuid = UUID.randomUUID().toString();
|
||||
mainDataMap.put("modeuuid", uuid);
|
||||
// 移除不需要插入的字段
|
||||
mainDataMap.remove("id");
|
||||
mainDataMap.remove("requestId");
|
||||
mainDataMap.remove("form_biz_id");
|
||||
|
||||
// 插入数据
|
||||
RecruitRecordSet.insertData(mainDataMap, "uf_jcl_yppc");
|
||||
// 权限重构
|
||||
rs.executeQuery("select id,formmodeid from uf_jcl_yppc where modeuuid='" + uuid + "'");
|
||||
if (rs.next()) {
|
||||
//建模数据的id
|
||||
int targetId = Util.getIntValue(rs.getString("id"));
|
||||
int formModeId = Util.getIntValue(rs.getString("formmodeid"));
|
||||
ModeRightInfo modeRightInfo = new ModeRightInfo();
|
||||
modeRightInfo.setNewRight(true);
|
||||
//新建的时候添加共享
|
||||
modeRightInfo.editModeDataShare(1, formModeId, targetId);
|
||||
|
||||
// 复制明细表数据
|
||||
rs.executeUpdate("insert into uf_jcl_yppc_dt1 (mainid,xxmc,xl,zy,kssj,jssj) select ?,xxmc,xl,zy,kssj,jssj from uf_jcl_yppc_dt1 where mainid = ?", targetId, sourceId);
|
||||
rs.executeUpdate("insert into uf_jcl_yppc_dt2 (mainid,gsmc,kssj,jssj,gw,sqyxk,lzyy,gzzz) select ?,gsmc,kssj,jssj,gw,sqyxk,lzyy,gzzz from uf_jcl_yppc_dt2 where mainid = ?", targetId, sourceId);
|
||||
rs.executeUpdate("insert into uf_jcl_yppc_dt3 (mainid,xmmc,kssj,jssj,drjs,xmms) select ?,xmmc,kssj,jssj,drjs,xmms from uf_jcl_yppc_dt3 where mainid = ?", targetId, sourceId);
|
||||
rs.executeUpdate("insert into uf_jcl_yppc_dt4 (mainid,yylx,zwcd) select ?,yylx,zwcd from uf_jcl_yppc_dt4 where mainid = ?", targetId, sourceId);
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
return returnMap;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> fullOriginalResumeId(Map<String, Object> params) {
|
||||
int imageFileId = Convert.toInt(params.get("imageFileId"));
|
||||
int resumeId = Convert.toInt(params.get("resumeId"));
|
||||
int secCategory = Convert.toInt(RecruitModeUtil.getRecruitPropValue("APPLICANTS_RESUMES_CATEGORY"));
|
||||
RecordSet rs = new RecordSet();
|
||||
try {
|
||||
int docId = RecruitModeUtil.createDocId(secCategory, imageFileId, user);
|
||||
// TODO 更新原始简历信息,设置应聘状态未待分配
|
||||
rs.executeUpdate("update uf_jcl_yppc set ysjl=?,zt=? where id = ?", docId, ApplicationStatusEnum.DISTRIBUTION.getValue(), resumeId);
|
||||
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
|
||||
return new HashMap<>();
|
||||
}
|
||||
|
||||
/**
|
||||
* 构建普通数据格式
|
||||
*
|
||||
* @param value
|
||||
* @return
|
||||
*/
|
||||
private Map<String, Object> createApplicantBrowserMap(String value) {
|
||||
if (StringUtils.isBlank(value)) {
|
||||
return null;
|
||||
}
|
||||
Map<String, Object> browserMap = new HashMap<>(1);
|
||||
browserMap.put("value", value);
|
||||
return browserMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* 构建应聘者浏览按钮值
|
||||
*
|
||||
* @param id
|
||||
* @param name
|
||||
* @return
|
||||
*/
|
||||
private Map<String, Object> createApplicantBrowserMap(String id, String name) {
|
||||
Map<String, Object> browserMap = new HashMap<>(2);
|
||||
if (StringUtils.isBlank(id)) {
|
||||
return browserMap;
|
||||
}
|
||||
browserMap.put("value", id);
|
||||
List<Map<String, Object>> objList = new ArrayList<>();
|
||||
Map<String, Object> obj = new HashMap<>(2);
|
||||
obj.put("id", id);
|
||||
obj.put("name", name);
|
||||
objList.add(obj);
|
||||
browserMap.put("specialobj", objList);
|
||||
return browserMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* 构建应聘职位浏览按钮
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
private Map<String, Object> createAppliedPositionBrowserMap(String id) {
|
||||
Map<String, Object> browserMap = new HashMap<>(2);
|
||||
if (StringUtils.isBlank(id)) {
|
||||
return browserMap;
|
||||
}
|
||||
browserMap.put("value", id);
|
||||
RecordSet rs = new RecordSet();
|
||||
rs.executeQuery("select zpzwmc from uf_jcl_zp_zpzw where id = ?", id);
|
||||
if (rs.next()) {
|
||||
List<Map<String, Object>> objList = new ArrayList<>();
|
||||
Map<String, Object> obj = new HashMap<>(2);
|
||||
obj.put("id", id);
|
||||
obj.put("name", rs.getString("zpzwmc"));
|
||||
objList.add(obj);
|
||||
browserMap.put("specialobj", objList);
|
||||
}
|
||||
return browserMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* 构建人员浏览按钮值
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
private Map<String, Object> createResourceBrowserMap(String ids) {
|
||||
Map<String, Object> browserMap = new HashMap<>(2);
|
||||
if (StringUtils.isBlank(ids)) {
|
||||
return browserMap;
|
||||
}
|
||||
browserMap.put("value", ids);
|
||||
List<Map<String, Object>> objList = new ArrayList<>();
|
||||
String[] split = ids.split(",");
|
||||
try {
|
||||
ResourceComInfo resourceComInfo = new ResourceComInfo();
|
||||
for (String s : split) {
|
||||
Map<String, Object> obj = new HashMap<>(2);
|
||||
obj.put("id", s);
|
||||
obj.put("name", resourceComInfo.getLastname(s));
|
||||
objList.add(obj);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
browserMap.put("specialobj", objList);
|
||||
return browserMap;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 归档人才库
|
||||
*
|
||||
* @param applicantId 应聘者ID
|
||||
* @param joinBlacklist 是否加入黑名单
|
||||
*/
|
||||
public void archiveTalentPool(String applicantId, boolean joinBlacklist) {
|
||||
RecordSet rs = new RecordSet();
|
||||
String name = "";
|
||||
String mobile = "";
|
||||
String talentPoolId = "";
|
||||
rs.executeQuery("select xm,sjhm from uf_jcl_yppc where id = ?", applicantId);
|
||||
if (rs.next()) {
|
||||
name = rs.getString("xm");
|
||||
mobile = rs.getString("sjhm");
|
||||
}
|
||||
|
||||
rs.executeQuery("select id from uf_jcl_rck where xm = ? and sjhm = ?", name, mobile);
|
||||
if (rs.next()) {
|
||||
talentPoolId = rs.getString("id");
|
||||
}
|
||||
|
||||
// 推送建模主表数据
|
||||
Map<String, Object> dataMap = new RecruitDataMap<>();
|
||||
String uuid = UUID.randomUUID().toString();
|
||||
dataMap.put("modeuuid", uuid);
|
||||
int formModeId = -1;
|
||||
rs.executeQuery("select id from modeinfo where formid =( select id from workflow_bill where tablename = 'uf_jcl_rck' )");
|
||||
if (rs.next()) {
|
||||
formModeId = rs.getInt("id");
|
||||
}
|
||||
dataMap.put("formmodeid", formModeId);
|
||||
// 构建建模表基本数据
|
||||
RecruitRecordSet.buildModeBaseFields(dataMap, user.getUID());
|
||||
rs.executeQuery("select * from uf_jcl_yppc where id = ?", applicantId);
|
||||
if (rs.next()) {
|
||||
dataMap.put("sfz", RecruitModeUtil.parseBlankToNull(rs.getString("sfz")));
|
||||
dataMap.put("jlzp", RecruitModeUtil.parseBlankToNull(rs.getString("jlzp")));
|
||||
dataMap.put("zhypzw", RecruitModeUtil.parseBlankToNull(rs.getString("ypzw")));
|
||||
dataMap.put("ysjl", RecruitModeUtil.parseBlankToNull(rs.getString("ysjl")));
|
||||
dataMap.put("jlly", RecruitModeUtil.parseBlankToNull(rs.getString("jlly")));
|
||||
dataMap.put("xm", RecruitModeUtil.parseBlankToNull(rs.getString("xm")));
|
||||
dataMap.put("xb", RecruitModeUtil.parseBlankToNull(rs.getString("xb")));
|
||||
dataMap.put("sjhm", RecruitModeUtil.parseBlankToNull(rs.getString("sjhm")));
|
||||
dataMap.put("dzyx", RecruitModeUtil.parseBlankToNull(rs.getString("dzyx")));
|
||||
dataMap.put("csrq", RecruitModeUtil.parseBlankToNull(rs.getString("csrq")));
|
||||
dataMap.put("nl", RecruitModeUtil.parseBlankToNull(rs.getString("nl")));
|
||||
dataMap.put("zgxl", RecruitModeUtil.parseBlankToNull(rs.getString("zgxl")));
|
||||
dataMap.put("zgxw", RecruitModeUtil.parseBlankToNull(rs.getString("zgxw")));
|
||||
dataMap.put("byyx", RecruitModeUtil.parseBlankToNull(rs.getString("byyx")));
|
||||
dataMap.put("zy", RecruitModeUtil.parseBlankToNull(rs.getString("zy")));
|
||||
dataMap.put("hyzk", RecruitModeUtil.parseBlankToNull(rs.getString("hyzk")));
|
||||
dataMap.put("gzjy", RecruitModeUtil.parseBlankToNull(rs.getString("gzjy")));
|
||||
dataMap.put("zzzt", RecruitModeUtil.parseBlankToNull(rs.getString("zzzt")));
|
||||
dataMap.put("dqszd", RecruitModeUtil.parseBlankToNull(rs.getString("dqszd")));
|
||||
dataMap.put("zhtdsj", RecruitModeUtil.parseBlankToNull(rs.getString("tdsj")));
|
||||
dataMap.put("cjr", RecruitModeUtil.parseBlankToNull(rs.getString("cjr")));
|
||||
dataMap.put("zwpj", RecruitModeUtil.parseBlankToNull(rs.getString("zwpj")));
|
||||
dataMap.put("mz", RecruitModeUtil.parseBlankToNull(rs.getString("mz")));
|
||||
dataMap.put("jg", RecruitModeUtil.parseBlankToNull(rs.getString("jg")));
|
||||
dataMap.put("zzmm", RecruitModeUtil.parseBlankToNull(rs.getString("zzmm")));
|
||||
dataMap.put("sgcm", RecruitModeUtil.parseBlankToNull(rs.getString("sgcm")));
|
||||
dataMap.put("tzkg", RecruitModeUtil.parseBlankToNull(rs.getString("tzkg")));
|
||||
// 归档阶段
|
||||
dataMap.put("gdjd", null);
|
||||
dataMap.put("gdyy", RecruitModeUtil.parseBlankToNull(rs.getString("gdyy")));
|
||||
dataMap.put("gdxxyy", RecruitModeUtil.parseBlankToNull(rs.getString("gdxxyy")));
|
||||
}
|
||||
// 历史投递次数
|
||||
rs.executeQuery("select count(id) as num from uf_jcl_yppc where xm=? and sjhm =?", rs.getString("xm"), rs.getString("sjhm"));
|
||||
if (rs.next()) {
|
||||
dataMap.put("lstdcs", rs.getInt("num"));
|
||||
}
|
||||
// 是否加入黑名单
|
||||
if (joinBlacklist) {
|
||||
dataMap.put("sfjrhmd", 0);
|
||||
// 归档原因黑名单
|
||||
dataMap.put("gdyy", 16);
|
||||
} else {
|
||||
dataMap.put("sfjrhmd", 1);
|
||||
}
|
||||
|
||||
RecruitRecordSet.insertData(dataMap, "uf_jcl_rck");
|
||||
refreshRight(uuid, formModeId, applicantId);
|
||||
|
||||
|
||||
// 删除人才库原来的数据
|
||||
rs.executeUpdate("delete from uf_jcl_rck where id = ? ", talentPoolId);
|
||||
rs.executeUpdate("delete from uf_jcl_rck_dt1 where mainid = ? ", talentPoolId);
|
||||
rs.executeUpdate("delete from uf_jcl_rck_dt2 where mainid = ? ", talentPoolId);
|
||||
rs.executeUpdate("delete from uf_jcl_rck_dt3 where mainid = ? ", talentPoolId);
|
||||
rs.executeUpdate("delete from uf_jcl_rck_dt4 where mainid = ? ", talentPoolId);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 权限重构
|
||||
*
|
||||
* @param uuid UUID
|
||||
* @param formModeId 建模ID
|
||||
* @param applicantId 应聘者ID
|
||||
*/
|
||||
private void refreshRight(String uuid, int formModeId, String applicantId) {
|
||||
RecordSet rs = new RecordSet();
|
||||
rs.executeQuery("select id from uf_jcl_rck where modeuuid='" + uuid + "'");
|
||||
if (rs.next()) {
|
||||
//建模数据的id
|
||||
int bid = Util.getIntValue(rs.getString("id"));
|
||||
ModeRightInfo modeRightInfo = new ModeRightInfo();
|
||||
modeRightInfo.setNewRight(true);
|
||||
//新建的时候添加共享
|
||||
modeRightInfo.editModeDataShare(1, formModeId, bid);
|
||||
|
||||
// 插入明细表数据
|
||||
rs.executeQuery("select * from uf_jcl_yppc_dt1 where mainid = ? ", applicantId);
|
||||
List<List<Object>> insertList = new ArrayList<>();
|
||||
while (rs.next()) {
|
||||
List<Object> paramList = new ArrayList<>();
|
||||
// mainid
|
||||
paramList.add(bid);
|
||||
paramList.add(RecruitModeUtil.parseBlankToNull(rs.getString("xxmc")));
|
||||
paramList.add(RecruitModeUtil.parseBlankToNull(rs.getString("xl")));
|
||||
paramList.add(RecruitModeUtil.parseBlankToNull(rs.getString("zy")));
|
||||
paramList.add(RecruitModeUtil.parseBlankToNull(rs.getString("kssj")));
|
||||
paramList.add(RecruitModeUtil.parseBlankToNull(rs.getString("jssj")));
|
||||
insertList.add(paramList);
|
||||
}
|
||||
for (List<Object> list : insertList) {
|
||||
rs.executeUpdate("insert into uf_jcl_rck_dt1 (mainid, xxmc, xl, zy, kssj, jssj) values (?, ?, ?, ?, ?, ?)", list);
|
||||
}
|
||||
|
||||
rs.executeQuery("select * from uf_jcl_yppc_dt2 where mainid = ? ", applicantId);
|
||||
insertList = new ArrayList<>();
|
||||
while (rs.next()) {
|
||||
List<Object> paramList = new ArrayList<>();
|
||||
// mainid
|
||||
paramList.add(bid);
|
||||
paramList.add(RecruitModeUtil.parseBlankToNull(rs.getString("gsmc")));
|
||||
paramList.add(RecruitModeUtil.parseBlankToNull(rs.getString("kssj")));
|
||||
paramList.add(RecruitModeUtil.parseBlankToNull(rs.getString("jssj")));
|
||||
paramList.add(RecruitModeUtil.parseBlankToNull(rs.getString("gw")));
|
||||
paramList.add(RecruitModeUtil.parseBlankToNull(rs.getString("gzzz")));
|
||||
paramList.add(RecruitModeUtil.parseBlankToNull(rs.getString("sqyxk")));
|
||||
paramList.add(RecruitModeUtil.parseBlankToNull(rs.getString("lzyy")));
|
||||
insertList.add(paramList);
|
||||
}
|
||||
for (List<Object> list : insertList) {
|
||||
rs.executeUpdate("insert into uf_jcl_rck_dt2 (mainid, gsmc, kssj, jssj, gw, gzzz, sqyxk, lzyy) values (?, ?, ?, ?, ?, ?, ?, ?)", list);
|
||||
}
|
||||
|
||||
rs.executeQuery("select * from uf_jcl_yppc_dt3 where mainid = ? ", applicantId);
|
||||
insertList = new ArrayList<>();
|
||||
while (rs.next()) {
|
||||
List<Object> paramList = new ArrayList<>();
|
||||
// mainid
|
||||
paramList.add(bid);
|
||||
paramList.add(RecruitModeUtil.parseBlankToNull(rs.getString("xmmc")));
|
||||
paramList.add(RecruitModeUtil.parseBlankToNull(rs.getString("kssj")));
|
||||
paramList.add(RecruitModeUtil.parseBlankToNull(rs.getString("jssj")));
|
||||
paramList.add(RecruitModeUtil.parseBlankToNull(rs.getString("drjs")));
|
||||
paramList.add(RecruitModeUtil.parseBlankToNull(rs.getString("xmms")));
|
||||
insertList.add(paramList);
|
||||
}
|
||||
for (List<Object> list : insertList) {
|
||||
rs.executeUpdate("insert into uf_jcl_rck_dt3 (mainid, xmmc, kssj, jssj, drjs, xmms) values (?, ?, ?, ?, ?, ?)", list);
|
||||
}
|
||||
|
||||
rs.executeQuery("select * from uf_jcl_yppc_dt4 where mainid = ? ", applicantId);
|
||||
insertList = new ArrayList<>();
|
||||
while (rs.next()) {
|
||||
List<Object> paramList = new ArrayList<>();
|
||||
// mainid
|
||||
paramList.add(bid);
|
||||
paramList.add(RecruitModeUtil.parseBlankToNull(rs.getString("yylx")));
|
||||
paramList.add(RecruitModeUtil.parseBlankToNull(rs.getString("zwcd")));
|
||||
insertList.add(paramList);
|
||||
}
|
||||
for (List<Object> list : insertList) {
|
||||
rs.executeUpdate("insert into uf_jcl_rck_dt4 (mainid, yylx, zwcd) values (?, ?, ?)", list);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
package com.engine.recruit.service.impl;
|
||||
|
||||
import com.engine.core.impl.Service;
|
||||
import com.engine.recruit.enums.ApplicationStatusEnum;
|
||||
import com.engine.recruit.service.RecruitButtonService;
|
||||
import weaver.conn.RecordSet;
|
||||
import weaver.general.Util;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* <p>聚才林招聘</p>
|
||||
* "淘汰"按钮实现类
|
||||
*
|
||||
* @author:dxfeng
|
||||
* @createTime: 2023/09/18
|
||||
* @version: 1.0
|
||||
*/
|
||||
public class EliminateServiceImpl extends Service implements RecruitButtonService {
|
||||
@Override
|
||||
public Map<String, Object> execute(Map<String, Object> params) {
|
||||
String billId = Util.null2String(params.get("billId"));
|
||||
RecordSet rs = new RecordSet();
|
||||
rs.executeUpdate("update uf_jcl_yppc set zt = ? where id = ? ", ApplicationStatusEnum.OBSOLETE.getValue(), billId);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,165 @@
|
|||
package com.engine.recruit.service.impl;
|
||||
|
||||
import com.engine.core.impl.Service;
|
||||
import com.engine.recruit.conn.RecruitDataMap;
|
||||
import com.engine.recruit.conn.RecruitRecordSet;
|
||||
import com.engine.recruit.enums.InfoCollectEnum;
|
||||
import com.engine.recruit.enums.PositionOperateEnum;
|
||||
import com.engine.recruit.exception.CustomizeRunTimeException;
|
||||
import com.engine.recruit.service.InductionManageService;
|
||||
import com.engine.recruit.util.RecruitMessageUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import weaver.conn.RecordSet;
|
||||
import weaver.formmode.recruit.modeexpand.util.RecruitModeUtil;
|
||||
import weaver.general.Util;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* @author:dxfeng
|
||||
* @createTime: 2023/10/23
|
||||
* @version: 1.0
|
||||
*/
|
||||
public class InductionManageServiceImpl extends Service implements InductionManageService {
|
||||
@Override
|
||||
public Map<String, Object> updateInductionManageInfo(Map<String, Object> param) {
|
||||
String operateType = Util.null2String(param.get("operateType"));
|
||||
|
||||
if (PositionOperateEnum.PREPARE.getOperateType().equals(operateType)) {
|
||||
// 发起入职准备
|
||||
|
||||
// 反填流程信息到建模表
|
||||
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> sendCollectInfo(Map<String, Object> param) {
|
||||
String ids = Util.null2String(param.get("ids"));
|
||||
String[] split = ids.split(",");
|
||||
|
||||
RecordSet rs = new RecordSet();
|
||||
for (String billId : split) {
|
||||
// 判断是否已发送信息采集,已发送的不重复发送
|
||||
rs.executeQuery("select a.id from uf_jcl_xxcj a inner join uf_jcl_rzgl b on a.xm = b.xm and a.sjh = b.sjhm where b.id = ? ", billId);
|
||||
if (rs.next()) {
|
||||
if (StringUtils.isNotBlank(rs.getString("id"))) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
// 根据入职管理信息完善信息采集表单
|
||||
Map<String, Object> dataMap = new RecruitDataMap<>();
|
||||
String uuid = UUID.randomUUID().toString();
|
||||
dataMap.put("modeuuid", uuid);
|
||||
int formModeId = -1;
|
||||
rs.executeQuery("select id from modeinfo where formid =( select id from workflow_bill where tablename = 'uf_jcl_xxcj' )");
|
||||
if (rs.next()) {
|
||||
formModeId = rs.getInt("id");
|
||||
}
|
||||
dataMap.put("formmodeid", formModeId);
|
||||
// 构建建模表基本数据
|
||||
RecruitRecordSet.buildModeBaseFields(dataMap, user.getUID());
|
||||
|
||||
rs.executeQuery("select * from uf_jcl_rzgl where id = ? ", billId);
|
||||
if (rs.next()) {
|
||||
dataMap.put("xm", RecruitModeUtil.parseBlankToNull(rs.getString("xm")));
|
||||
dataMap.put("sfzh", RecruitModeUtil.parseBlankToNull(rs.getString("sfzh")));
|
||||
dataMap.put("nl", RecruitModeUtil.parseBlankToNull(rs.getString("nl")));
|
||||
dataMap.put("xb", RecruitModeUtil.parseBlankToNull(rs.getString("xb")));
|
||||
dataMap.put("sjh", RecruitModeUtil.parseBlankToNull(rs.getString("sjhm")));
|
||||
dataMap.put("yx", RecruitModeUtil.parseBlankToNull(rs.getString("dzyx")));
|
||||
}
|
||||
|
||||
|
||||
// 生成登录密码
|
||||
String password = generatePassword();
|
||||
dataMap.put("mm", password);
|
||||
|
||||
|
||||
// 发送短信
|
||||
String mobile = Util.null2String(dataMap.get("sjh"));
|
||||
String messageContent = RecruitModeUtil.getRecruitPropValue("COLLECT_MESSAGE_CONTENT");
|
||||
if (StringUtils.isBlank(messageContent)) {
|
||||
throw new CustomizeRunTimeException("未获取到短信内容,请检查配置");
|
||||
} else {
|
||||
RecruitMessageUtils.sendSMS(mobile, messageContent);
|
||||
}
|
||||
// 插入数据
|
||||
RecruitRecordSet.insertData(dataMap, "uf_jcl_xxcj");
|
||||
int id = RecruitRecordSet.refreshRight(uuid, "uf_jcl_xxcj", formModeId);
|
||||
|
||||
// 更新状态为已发送,反填信息采集ID
|
||||
rs.executeUpdate("update uf_jcl_rzgl set xxcj = ? ,xxcjid = ? where id = ? ", InfoCollectEnum.HAS_SENT.getId(), id, billId);
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> checkLoginInfo(Map<String, Object> param) {
|
||||
RecordSet rs = new RecordSet();
|
||||
HashMap<String, Object> map = new HashMap<>(2);
|
||||
String mobile = Util.null2String(param.get("mobile"));
|
||||
String pwd = Util.null2String(param.get("pwd"));
|
||||
rs.executeQuery("select count(1) as sum from uf_jcl_rzgl where sjhm = ? and rzzt != 2",mobile);
|
||||
rs.next();
|
||||
if (Util.getIntValue(rs.getString("sum")) == 0) {
|
||||
map.put("message","当前链接已失效且不可操作");
|
||||
return map;
|
||||
}
|
||||
|
||||
rs.executeQuery("select id from uf_jcl_xxcj where sjh = ? and mm = ?", mobile, pwd);
|
||||
if (rs.next()) {
|
||||
map.put("id", Util.getIntValue(rs.getString("id")));
|
||||
}else {
|
||||
map.put("message","手机号或密码错误");
|
||||
}
|
||||
|
||||
return map;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> infoSubmit(String id) {
|
||||
RecordSet rs = new RecordSet();
|
||||
rs.executeQuery("update uf_jcl_rzgl set xxcj = 2 where id = ?",id);
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 随机八位不重复登录密码,含数字、字母
|
||||
*
|
||||
* @return 登录密码
|
||||
*/
|
||||
private String generatePassword() {
|
||||
String letters = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
|
||||
String numbers = "0123456789";
|
||||
String characters = letters + numbers;
|
||||
|
||||
List<Character> randomChars = new ArrayList<>();
|
||||
Random random = new Random();
|
||||
|
||||
// 随机取得一个字母
|
||||
randomChars.add(letters.charAt(random.nextInt(letters.length())));
|
||||
|
||||
// 随机取得一个数字
|
||||
randomChars.add(numbers.charAt(random.nextInt(numbers.length())));
|
||||
|
||||
// 随机取得六个字符(字母或数字)
|
||||
for (int i = 0; i < 6; i++) {
|
||||
randomChars.add(characters.charAt(random.nextInt(characters.length())));
|
||||
}
|
||||
|
||||
// 打乱字符的顺序
|
||||
Collections.shuffle(randomChars);
|
||||
|
||||
// 将字符列表转为字符串
|
||||
StringBuilder sb = new StringBuilder();
|
||||
for (char c : randomChars) {
|
||||
sb.append(c);
|
||||
}
|
||||
|
||||
return sb.toString();
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,71 @@
|
|||
package com.engine.recruit.service.impl;
|
||||
|
||||
import com.engine.common.util.ServiceUtil;
|
||||
import com.engine.core.impl.Service;
|
||||
import com.engine.recruit.enums.ApplicationStatusEnum;
|
||||
import com.engine.recruit.service.RecruitButtonService;
|
||||
import weaver.conn.RecordSet;
|
||||
import com.engine.recruit.conn.ApplicantCommonInfo;
|
||||
import weaver.formmode.recruit.modeexpand.util.RecruitModeUtil;
|
||||
import weaver.general.Util;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.HashSet;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* <p>聚才林招聘</p>
|
||||
* "加入黑名单"按钮实现类
|
||||
*
|
||||
* @author:dxfeng
|
||||
* @createTime: 2023/09/18
|
||||
* @version: 1.0
|
||||
*/
|
||||
public class JoinBlacklistServiceImpl extends Service implements RecruitButtonService {
|
||||
@Override
|
||||
public Map<String, Object> execute(Map<String, Object> params) {
|
||||
// 当前应聘者ID
|
||||
String billId = Util.null2String(params.get("billId"));
|
||||
RecordSet rs = new RecordSet();
|
||||
|
||||
// 推人才表,建模推建模(更新人才表数据),是否加入黑名单字段值变更为“是”
|
||||
ServiceUtil.getService(ApplicantResumeServiceImpl.class, user).archiveTalentPool(billId, true);
|
||||
|
||||
// 更新当前应聘者关联的所有简历状态为已淘汰
|
||||
String name = "";
|
||||
String mobile = "";
|
||||
String positionId = "";
|
||||
rs.executeQuery("select xm, sjhm, ypzw from uf_jcl_yppc where id = ? ", billId);
|
||||
if (rs.next()) {
|
||||
name = rs.getString("xm");
|
||||
mobile = rs.getString("sjhm");
|
||||
positionId = rs.getString("ypzw");
|
||||
}
|
||||
// 更新当前应聘者关联的所有简历状态为已淘汰
|
||||
rs.executeUpdate("update uf_jcl_yppc set zt = ? where xm = ? and sjhm = ?", ApplicationStatusEnum.OBSOLETE.getValue(), name, mobile);
|
||||
|
||||
// 消息提醒当前人员简历的跟进者(应聘职位的负责人/协助人)
|
||||
String messageType = RecruitModeUtil.getRecruitPropValue("RECRUIT_MESSAGE_TYPE");
|
||||
String messageTitle = RecruitModeUtil.getRecruitPropValue("JOIN_BLACKLIST_MESSAGE_TITLE");
|
||||
String applicantName = ApplicantCommonInfo.getApplicantName(billId);
|
||||
String operatorName = RecruitModeUtil.getResourceNames(String.valueOf(user.getUID()));
|
||||
String messageContent = "应聘者:【" + applicantName + "】,已被【" + operatorName + "】加入黑名单,相关投递已自动淘汰,请知悉。";
|
||||
|
||||
// 消息提醒当前人员简历的跟进者(应聘职位的负责人/协助人)
|
||||
String zpzwfzr = "";
|
||||
String zpxzr = "";
|
||||
rs.executeQuery("select zpzwfzr , zpxzr from uf_jcl_zp_zpzw where id = ?", positionId);
|
||||
if (rs.next()) {
|
||||
zpzwfzr = rs.getString("zpzwfzr");
|
||||
zpxzr = rs.getString("zpxzr");
|
||||
}
|
||||
Set<String> userIdSet = new HashSet<>();
|
||||
userIdSet.addAll(Arrays.asList(zpzwfzr.split(",")));
|
||||
userIdSet.addAll(Arrays.asList(zpxzr.split(",")));
|
||||
RecruitModeUtil.messagePush(messageType, messageTitle, messageContent, userIdSet, user.getUID());
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,32 @@
|
|||
package com.engine.recruit.service.impl;
|
||||
|
||||
import com.engine.core.impl.Service;
|
||||
import com.engine.recruit.service.MessageTemplateService;
|
||||
import weaver.conn.RecordSet;
|
||||
import weaver.general.Util;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author:dxfeng
|
||||
* @createTime: 2023/09/26
|
||||
* @version: 1.0
|
||||
*/
|
||||
public class MessageTemplateServiceImpl extends Service implements MessageTemplateService {
|
||||
private static final String MESSAGE_TEMPLATE_TABLE = "uf_jcl_yjtzmb";
|
||||
|
||||
@Override
|
||||
public Map<String, Object> getMessageContent(Map<String, Object> params) {
|
||||
Map<String, Object> resMap = new HashMap<>();
|
||||
String id = Util.null2String(params.get("id"));
|
||||
String content = "";
|
||||
RecordSet rs = new RecordSet();
|
||||
rs.executeQuery("select yjnr from " + MESSAGE_TEMPLATE_TABLE + " where id = ?", id);
|
||||
if (rs.next()) {
|
||||
content = rs.getString("yjnr");
|
||||
}
|
||||
resMap.put("content", content);
|
||||
return resMap;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,73 @@
|
|||
package com.engine.recruit.service.impl;
|
||||
|
||||
import com.engine.core.impl.Service;
|
||||
import com.engine.recruit.entity.recruitflow.po.RecruitStepPo;
|
||||
import com.engine.recruit.exception.CustomizeRunTimeException;
|
||||
import com.engine.recruit.service.RecruitButtonService;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import weaver.conn.RecordSet;
|
||||
import weaver.general.Util;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* <p>聚才林招聘</p>
|
||||
* "进入下一阶段"按钮实现类
|
||||
*
|
||||
* @author:dxfeng
|
||||
* @createTime: 2023/09/18
|
||||
* @version: 1.0
|
||||
*/
|
||||
public class NextStageServiceImpl extends Service implements RecruitButtonService {
|
||||
@Override
|
||||
public Map<String, Object> execute(Map<String, Object> params) {
|
||||
Map<String, Object> returnMap = new HashMap<>();
|
||||
String billId = Util.null2String(params.get("billId"));
|
||||
// 招聘阶段ID
|
||||
String stageId = null;
|
||||
// 招聘流程ID
|
||||
int recruitFlowId = -1;
|
||||
RecordSet rs = new RecordSet();
|
||||
rs.executeQuery("select zplc,zpjd from uf_jcl_yppc where id = ?", billId);
|
||||
if (rs.next()) {
|
||||
recruitFlowId = rs.getInt("zplc");
|
||||
stageId = rs.getString("zpjd");
|
||||
}
|
||||
if (-1 == recruitFlowId) {
|
||||
throw new CustomizeRunTimeException("未设置对应招聘流程");
|
||||
}
|
||||
rs.executeQuery("select id,jdmc,hj from uf_jcl_zpjdsz where sfqy = 0 and zplc = ? order by zssx", recruitFlowId);
|
||||
List<RecruitStepPo> stepList = new ArrayList<>();
|
||||
while (rs.next()) {
|
||||
stepList.add(RecruitStepPo.builder().key(rs.getInt("id")).description(rs.getString("jdmc")).type(rs.getString("hj")).build());
|
||||
}
|
||||
boolean found = false;
|
||||
Integer target = null;
|
||||
if (StringUtils.isBlank(stageId)) {
|
||||
stageId = String.valueOf(stepList.get(0).getKey());
|
||||
}
|
||||
for (RecruitStepPo recruitStepPo : stepList) {
|
||||
if (found) {
|
||||
target = recruitStepPo.getKey();
|
||||
break;
|
||||
}
|
||||
|
||||
if (recruitStepPo.getKey() == Integer.parseInt(stageId)) {
|
||||
found = true;
|
||||
if ("2".equals(recruitStepPo.getType())) {
|
||||
target = -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// 更新应聘者简历为下一阶段
|
||||
rs.executeUpdate("update uf_jcl_yppc set zpjd = ? where id = ?", target, billId);
|
||||
|
||||
|
||||
return returnMap;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,130 @@
|
|||
package com.engine.recruit.service.impl;
|
||||
|
||||
import com.engine.core.impl.Service;
|
||||
import com.engine.recruit.entity.recruitflow.po.RecruitButton;
|
||||
import com.engine.recruit.entity.recruitflow.po.RecruitStepPo;
|
||||
import com.engine.recruit.entity.recruitflow.po.RecruitTabPo;
|
||||
import com.engine.recruit.exception.CustomizeRunTimeException;
|
||||
import com.engine.recruit.service.RecruitFlowService;
|
||||
import com.engine.recruit.util.RecruitFlowUtil;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import weaver.conn.RecordSet;
|
||||
import weaver.general.Util;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author:dxfeng
|
||||
* @createTime: 2023/09/22
|
||||
* @version: 1.0
|
||||
*/
|
||||
public class RecruitFlowServiceImpl extends Service implements RecruitFlowService {
|
||||
@Override
|
||||
public Map<String, Object> getButtonList(Map<String, Object> param) {
|
||||
Map<String, Object> returnMap = new HashMap<>();
|
||||
String billId = Util.null2String(param.get("billId"));
|
||||
|
||||
// 招聘阶段ID
|
||||
String stageId = "";
|
||||
// 招聘流程ID
|
||||
int recruitFlowId = -1;
|
||||
|
||||
RecordSet rs = new RecordSet();
|
||||
rs.executeQuery("select zplc,zpjd from uf_jcl_yppc where id = ?", billId);
|
||||
if (rs.next()) {
|
||||
recruitFlowId = rs.getInt("zplc");
|
||||
stageId = rs.getString("zpjd");
|
||||
}
|
||||
if (-1 == recruitFlowId) {
|
||||
throw new CustomizeRunTimeException("未设置对应招聘流程");
|
||||
}
|
||||
|
||||
|
||||
if (StringUtils.isBlank(stageId)) {
|
||||
// 查询开始环节
|
||||
rs.executeQuery("select id from uf_jcl_zpjdsz where zplc = ? and hj = 0", recruitFlowId);
|
||||
if (rs.next()) {
|
||||
stageId = rs.getString("id");
|
||||
}
|
||||
if (StringUtils.isBlank(stageId)) {
|
||||
throw new RuntimeException("未找到对应招聘阶段");
|
||||
}
|
||||
}
|
||||
rs.executeQuery("select a.id,a.zdyxsmc as buttonName, a.tzymbt as tabName, a.tzymdz as tabLink, a.zssx as orderNum, b.anbs as buttonKey, b.andz as buttonType from uf_jcl_zpjdsz_dt1 a inner join uf_jcl_lcczan b on a.czan = b.id where a.sfqy = 0 and mainid = ? order by zssx", stageId);
|
||||
|
||||
List<RecruitButton> buttonList = new ArrayList<>();
|
||||
List<RecruitTabPo> tabList = new ArrayList<>();
|
||||
while (rs.next()) {
|
||||
buttonList.add(RecruitButton.builder()
|
||||
.key(rs.getString("id"))
|
||||
.buttonName(rs.getString("buttonName"))
|
||||
.buttonKey(rs.getString("buttonKey"))
|
||||
.tabName(rs.getString("tabName"))
|
||||
.tabLink(RecruitFlowUtil.replaceURL(rs.getString("tabLink"), billId))
|
||||
.buttonType(rs.getString("buttonType"))
|
||||
.orderNum(rs.getInt("orderNum"))
|
||||
.build());
|
||||
}
|
||||
|
||||
rs.executeQuery("select ymbt as title,ymdz as url,zssx as orderNum from uf_jcl_zpjdsz_dt2 where mainid = ? order by orderNum", stageId);
|
||||
int tabIndex = 0;
|
||||
while (rs.next()) {
|
||||
tabList.add(RecruitTabPo.builder()
|
||||
.key(String.valueOf(tabIndex))
|
||||
.viewcondition(String.valueOf(tabIndex))
|
||||
.title(rs.getString("title"))
|
||||
.url(RecruitFlowUtil.replaceURL(rs.getString("url"), billId))
|
||||
.billId(billId)
|
||||
.build());
|
||||
tabIndex++;
|
||||
}
|
||||
|
||||
|
||||
// 当前阶段所有按钮信息
|
||||
returnMap.put("buttonList", buttonList);
|
||||
returnMap.put("tabList", tabList);
|
||||
return returnMap;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> getRecruitStepList(Map<String, Object> param) {
|
||||
Map<String, Object> returnMap = new HashMap<>();
|
||||
|
||||
String billId = Util.null2String(param.get("billId"));
|
||||
// 招聘阶段ID
|
||||
String stageId = "";
|
||||
int currentStageId = 0;
|
||||
// 招聘流程ID
|
||||
int recruitFlowId = -1;
|
||||
RecordSet rs = new RecordSet();
|
||||
rs.executeQuery("select zplc,zpjd from uf_jcl_yppc where id = ?", billId);
|
||||
if (rs.next()) {
|
||||
recruitFlowId = rs.getInt("zplc");
|
||||
stageId = rs.getString("zpjd");
|
||||
}
|
||||
if (-1 == recruitFlowId) {
|
||||
throw new CustomizeRunTimeException("未设置对应招聘流程");
|
||||
}
|
||||
rs.executeQuery("select id,jdmc from uf_jcl_zpjdsz where sfqy = 0 and zplc = ? order by zssx", recruitFlowId);
|
||||
int stepIndex = 0;
|
||||
List<RecruitStepPo> stepList = new ArrayList<>();
|
||||
while (rs.next()) {
|
||||
String id = rs.getString("id");
|
||||
if (stageId.equals(id)) {
|
||||
currentStageId = stepIndex;
|
||||
}
|
||||
stepList.add(RecruitStepPo.builder().key(stepIndex).description(rs.getString("jdmc")).build());
|
||||
stepIndex++;
|
||||
}
|
||||
if ("-1".equals(stageId)) {
|
||||
currentStageId = stepList.size();
|
||||
}
|
||||
|
||||
returnMap.put("stepList", stepList);
|
||||
returnMap.put("currentStageId", currentStageId);
|
||||
return returnMap;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,37 @@
|
|||
package com.engine.recruit.service.impl;
|
||||
|
||||
import com.engine.core.impl.Service;
|
||||
import com.engine.recruit.exception.CustomizeRunTimeException;
|
||||
import com.engine.recruit.service.RecruitPositionService;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import weaver.conn.RecordSet;
|
||||
import weaver.general.Util;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author:dxfeng
|
||||
* @createTime: 2023/10/09
|
||||
* @version: 1.0
|
||||
*/
|
||||
public class RecruitPositionServiceImpl extends Service implements RecruitPositionService {
|
||||
/**
|
||||
* 招聘职位建模表
|
||||
*/
|
||||
private static final String MODE_TABLE_NAME = "uf_jcl_zp_zpzw";
|
||||
|
||||
@Override
|
||||
public Map<String, Object> updatePostInfo(Map<String, Object> param) {
|
||||
Map<String, Object> returnMap = new HashMap<>();
|
||||
String zpzwfzr = Util.null2String(param.get("zpzwfzr"));
|
||||
String zpxzr = Util.null2String(param.get("zpxzr"));
|
||||
String ids = Util.null2String(param.get("ids"));
|
||||
if (StringUtils.isBlank(ids)) {
|
||||
throw new CustomizeRunTimeException("数据有误,请重试");
|
||||
}
|
||||
RecordSet rs = new RecordSet();
|
||||
rs.executeUpdate(" update " + MODE_TABLE_NAME + " set zpzwfzr = ? ,zpxzr = ? where id in (" + ids + ")", zpzwfzr, zpxzr);
|
||||
return returnMap;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,56 @@
|
|||
package com.engine.recruit.service.impl;
|
||||
|
||||
import com.engine.core.impl.Service;
|
||||
import com.engine.recruit.conn.RecruitRecordSet;
|
||||
import com.engine.recruit.service.RpaJclService;
|
||||
import com.weaver.rpa.sdk.clients.application.resume.ERPAResumeSDKClient;
|
||||
import com.weaver.rpa.sdk.clients.application.resume.entity.ResumeEmailSetting;
|
||||
import com.weaver.rpa.sdk.clients.core.ERPASDKClients;
|
||||
import weaver.conn.RecordSet;
|
||||
import weaver.general.Util;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author:dxfeng
|
||||
* @createTime: 2023/10/27
|
||||
* @version: 1.0
|
||||
*/
|
||||
public class RpaJclServiceImpl extends Service implements RpaJclService {
|
||||
@Override
|
||||
public Map<String, Object> setEmailSetting(Map<String, Object> param) {
|
||||
String billId = Util.null2String(param.get("billId"));
|
||||
RecordSet rs = new RecordSet();
|
||||
rs.executeQuery("select * from uf_jcl_qllyxpz where id = ? ", billId);
|
||||
Map<String, Object> dataMap = RecruitRecordSet.getSingleRecordMap(rs);
|
||||
|
||||
ERPAResumeSDKClient resumeSDKClient = ERPASDKClients.getResumeSDKClient();
|
||||
String userId = Util.null2String(dataMap.get("szr"));
|
||||
String status = Util.null2String(dataMap.get("zt"));
|
||||
String server = Util.null2String(dataMap.get("yjjsfwq"));
|
||||
String port = Util.null2String(dataMap.get("jsdk"));
|
||||
String protocol = Util.null2String(dataMap.get("csxy"));
|
||||
String site = Util.null2String(dataMap.get("yxdz"));
|
||||
String login = Util.null2String(dataMap.get("yxzh"));
|
||||
String password = Util.null2String(dataMap.get("yxsqmmm"));
|
||||
|
||||
ResumeEmailSetting emailSetting = new ResumeEmailSetting();
|
||||
|
||||
// 配置启用邮箱功能
|
||||
emailSetting.setSEMAILSTATUS(status);
|
||||
emailSetting.setSEMAILSERVER(server);
|
||||
emailSetting.setSEMAILPORT(port);
|
||||
emailSetting.setSEMAILPROTOCOL(protocol);
|
||||
//emailSetting.setSISSEND(isSend);
|
||||
emailSetting.setSEMAILSITE(site);
|
||||
emailSetting.setSEMAILLOGIN(login);
|
||||
emailSetting.setSEMAILPASSWORD(password);
|
||||
|
||||
// 禁用邮箱功能(只需要传递Status为0)
|
||||
// emailSetting.setSEMAILSTATUS("0");
|
||||
|
||||
// 调用方法更新简历机器人采集设置(在千里聆中会更新目标用户机器人配置)
|
||||
resumeSDKClient.setEmailSetting(userId, emailSetting);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
package com.engine.recruit.service.impl;
|
||||
|
||||
import com.engine.core.impl.Service;
|
||||
import com.engine.recruit.exception.CustomizeRunTimeException;
|
||||
import com.engine.recruit.service.TalentPoolService;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import weaver.conn.RecordSet;
|
||||
import weaver.general.Util;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author:dxfeng
|
||||
* @createTime: 2023/10/20
|
||||
* @version: 1.0
|
||||
*/
|
||||
public class TalentPoolServiceImpl extends Service implements TalentPoolService {
|
||||
@Override
|
||||
public Map<String, Object> removeBlacklist(Map<String, Object> param) {
|
||||
String ids = Util.null2String(param.get("ids"));
|
||||
if (StringUtils.isBlank(ids)) {
|
||||
throw new CustomizeRunTimeException("");
|
||||
}
|
||||
RecordSet rs = new RecordSet();
|
||||
rs.executeUpdate("update uf_jcl_rck set sfjrhmd = 1 where id in (" + ids + ")");
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,343 @@
|
|||
package com.engine.recruit.service.impl;
|
||||
|
||||
import com.engine.core.impl.Service;
|
||||
import com.engine.recruit.entity.workbench.OptionVO;
|
||||
import com.engine.recruit.entity.workbench.RecruitInterviewPO;
|
||||
import com.engine.recruit.entity.workbench.RecruitPortalCommonVO;
|
||||
import com.engine.recruit.entity.workbench.SeriesParam;
|
||||
import weaver.conn.RecordSet;
|
||||
import weaver.general.Util;
|
||||
|
||||
import java.text.DecimalFormat;
|
||||
import java.time.LocalDate;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @Author liang.cheng
|
||||
* @Date 2023/10/18 4:44 PM
|
||||
* @Description: TODO
|
||||
* @Version 1.0
|
||||
*/
|
||||
public class WorkBenchPortalServiceImpl extends Service implements com.engine.recruit.service.WorkBenchPortalService {
|
||||
|
||||
private final DecimalFormat df = new DecimalFormat("#.00");
|
||||
|
||||
@Override
|
||||
public List<RecruitPortalCommonVO> getRecruitPortalTop() {
|
||||
RecordSet rs = new RecordSet();
|
||||
List<RecruitPortalCommonVO> recruitList = new ArrayList<>();
|
||||
List<String> list = new ArrayList<>();
|
||||
rs.executeQuery("select b.zpzwfzr,b.zpxzr from uf_jcl_yppc a left join uf_jcl_zp_zpzw b on a.ypzw = b.id\n" +
|
||||
"where a.zt = 1");
|
||||
while (rs.next()) {
|
||||
String zpzwfzr = Util.null2String(rs.getString("zpzwfzr"));
|
||||
String zpxzr = Util.null2String(rs.getString("zpxzr"));
|
||||
list.add(mergeStrings(zpzwfzr, zpxzr));
|
||||
}
|
||||
String uId = String.valueOf(user.getUID());
|
||||
|
||||
List<String> filteredList = list.stream()
|
||||
.filter(s -> s.contains(uId))
|
||||
.collect(Collectors.toList());
|
||||
recruitList.add(RecruitPortalCommonVO.builder().title("待处理简历").count(filteredList.size()).icon("${appRes}/1.png").build());
|
||||
recruitList.add(selectRecruitInterview("select msg,ptmsg,msrq from uf_jcl_ms", "今日面试", "${appRes}/2.png", uId));
|
||||
recruitList.add(selectRecruitInterview("select msg,ptmsg,msrq from uf_jcl_ms where zt = 0", "待评价面试", "${appRes}/3.png", uId));
|
||||
recruitList.add(selectOffer("select b.zpzwfzr,b.zpxzr from uf_jcl_offer a left join uf_jcl_zp_zpzw b on a.ypzw = b.id where a.zt = 0",
|
||||
"待发offer", "${appRes}/4.png", uId));
|
||||
recruitList.add(selectOffer("select b.zpzwfzr,b.zpxzr from uf_jcl_offer a left join uf_jcl_zp_zpzw b on a.ypzw = b.id where a.zt = 1",
|
||||
"待反馈offer", "${appRes}/5.png", uId));
|
||||
recruitList.add(RecruitPortalCommonVO.builder().title("待入职").count(waitHired()).icon("${appRes}/6.png").build());
|
||||
|
||||
|
||||
return recruitList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public OptionVO getJobTenure() {
|
||||
RecordSet rs = new RecordSet();
|
||||
List<RecruitPortalCommonVO> list = new ArrayList<>();
|
||||
rs.executeQuery("select a.xxnr,b.sum from uf_sjzd a \n" +
|
||||
"left join (select gznx,count(1) as sum from uf_jcl_zp_zpzw group by gznx) b \n" +
|
||||
"on a.id = b.gznx where a.zdlxmc = 9");
|
||||
while (rs.next()) {
|
||||
list.add(RecruitPortalCommonVO.builder().count(Util.getIntValue(rs.getString("sum"),0)).title(Util.null2String(rs.getString("xxnr"))).build());
|
||||
}
|
||||
|
||||
|
||||
List<String> xData = list.stream()
|
||||
.map(RecruitPortalCommonVO::getTitle)
|
||||
.collect(Collectors.toList());
|
||||
|
||||
List<Integer> barSeriesData = list.stream()
|
||||
.map(RecruitPortalCommonVO::getCount)
|
||||
.collect(Collectors.toList());
|
||||
|
||||
return OptionVO.builder()
|
||||
.text("职位年限要求分布")
|
||||
.xData(xData)
|
||||
.barSeriesData(barSeriesData)
|
||||
.build();
|
||||
}
|
||||
|
||||
@Override
|
||||
public OptionVO getWaitStepPerson() {
|
||||
RecordSet rs = new RecordSet();
|
||||
rs.executeQuery("select dqypjd,count(1) as sum from uf_jcl_yppc where dqypjd is not null group by dqypjd");
|
||||
List<String> xData = new ArrayList<>();
|
||||
List<Integer> barSeriesData = new ArrayList<>();
|
||||
while (rs.next()) {
|
||||
|
||||
xData.add(Util.null2String(rs.getString("xxnr")));
|
||||
barSeriesData.add(Util.getIntValue(rs.getString("sum")),0);
|
||||
}
|
||||
|
||||
return OptionVO.builder()
|
||||
.text("候选中应聘者各阶段数")
|
||||
.xData(xData)
|
||||
.barSeriesData(barSeriesData)
|
||||
.build();
|
||||
}
|
||||
|
||||
@Override
|
||||
public OptionVO getRecruitTransform() {
|
||||
List<String> colorList = Arrays.asList("#6e94f3","#faf0e6","#7cfc00","#ao20f0","#00ced1","#83d8ae","#697695","#8ac9e9","#9933fa","#c0ff3e","#ffe4c4","#cd6090");
|
||||
RecordSet rs = new RecordSet();
|
||||
rs.executeQuery("select a.xxnr,b.sum from uf_sjzd a \n" +
|
||||
"left join (select gznx,count(1) as sum from uf_jcl_zp_zpzw group by gznx) b \n" +
|
||||
"on a.id = b.gznx where a.zdlxmc = 9");
|
||||
LinkedList<SeriesParam> seriesData = new LinkedList<>();
|
||||
while (rs.next()) {
|
||||
String name = Util.null2String(rs.getString("xxnr"));
|
||||
double value = Util.getDoubleValue(rs.getString("sum"), 0);
|
||||
Random r = new Random();
|
||||
seriesData.add(SeriesParam.builder().value(value).name(name).color(colorList.get(r.nextInt(colorList.size()))).build());
|
||||
|
||||
}
|
||||
|
||||
return OptionVO.builder()
|
||||
.text("招聘转化")
|
||||
.seriesData(seriesData)
|
||||
.build();
|
||||
}
|
||||
|
||||
@Override
|
||||
public OptionVO getPeopleFrom() {
|
||||
List<String> colorList = Arrays.asList("#6e94f3","#faf0e6","#7cfc00","#ao20f0","#00ced1","#83d8ae","#697695","#8ac9e9","#9933fa","#c0ff3e","#ffe4c4","#cd6090");
|
||||
RecordSet rs = new RecordSet();
|
||||
rs.executeQuery("select a.xxnr,b.sum from uf_sjzd a \n" +
|
||||
"left join (select jlly,count(1) as sum from uf_jcl_yppc group by jlly) b \n" +
|
||||
"on a.id = b.jlly where a.zdlxmc = 2");
|
||||
LinkedList<SeriesParam> seriesData = new LinkedList<>();
|
||||
while (rs.next()) {
|
||||
Random r = new Random();
|
||||
String name = Util.null2String(rs.getString("xxnr"));
|
||||
double value = Util.getDoubleValue(rs.getString("sum"), 0);
|
||||
seriesData.add(SeriesParam.builder().value(value).name(name).color(colorList.get(r.nextInt(colorList.size()))).build());
|
||||
}
|
||||
|
||||
List<Double> values = seriesData.stream().map(SeriesParam:: getValue).collect(Collectors.toList());
|
||||
double percentage = values.stream().mapToDouble(Double::doubleValue).sum();
|
||||
seriesData.forEach(item -> item.setValue(Double.valueOf(df.format((item.getValue() * 100) / percentage))));
|
||||
|
||||
return OptionVO.builder()
|
||||
.text("人才来源")
|
||||
.seriesData(seriesData)
|
||||
.build();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<RecruitPortalCommonVO> getRecruitProgress() {
|
||||
List<RecruitPortalCommonVO> recruitList = new ArrayList<>();
|
||||
//招聘需求完成进度
|
||||
recruitList.add(getProgress());
|
||||
//面试出席率
|
||||
recruitList.add(getInterview(1));
|
||||
//面试通过率
|
||||
recruitList.add(getInterview(2));
|
||||
//接受offer
|
||||
recruitList.add(getOffer());
|
||||
//取消入职
|
||||
recruitList.add(getEntry(1));
|
||||
//按期入职
|
||||
recruitList.add(getEntry(2));
|
||||
|
||||
return recruitList;
|
||||
}
|
||||
|
||||
|
||||
private RecruitPortalCommonVO getEntry(int type) {
|
||||
RecordSet rs = new RecordSet();
|
||||
String uId = String.valueOf(user.getUID());
|
||||
int complete;
|
||||
String title;
|
||||
String color;
|
||||
rs.executeQuery("select count(1) as sum from uf_jcl_rzgl where modedatacreater = ?",uId);
|
||||
rs.next();
|
||||
int all = Util.getIntValue(rs.getString("sum"));
|
||||
if (type == 1) {
|
||||
rs.executeQuery("select count(1) as complete from uf_jcl_rzgl where modedatacreater = ? and rzzt = 2",uId);
|
||||
rs.next();
|
||||
complete = Util.getIntValue(rs.getString("complete"));
|
||||
title = "取消入职";
|
||||
color = "#ff2516";
|
||||
}else {
|
||||
rs.executeQuery("select count(1) as complete from uf_jcl_rzgl where modedatacreater = ? and rzzt = 2 and rzrq = yjrzrq",uId);
|
||||
rs.next();
|
||||
complete = Util.getIntValue(rs.getString("complete"));
|
||||
title = "按期入职";
|
||||
color = "#a1e073";
|
||||
}
|
||||
|
||||
double progress = all == 0 ? 0 :((double) complete / all) * 100;
|
||||
return RecruitPortalCommonVO.builder().title(title).scale(progress).color(color).build();
|
||||
}
|
||||
|
||||
private RecruitPortalCommonVO getOffer() {
|
||||
RecordSet rs = new RecordSet();
|
||||
String uId = String.valueOf(user.getUID());
|
||||
rs.executeQuery("select count(1) as sum from uf_jcl_offer where sqr = ? and zt != 0",uId);
|
||||
rs.next();
|
||||
int all = Util.getIntValue(rs.getString("sum"));
|
||||
rs.executeQuery("select count(1) as complete from uf_jcl_offer where sqr = ? and zt = 3",uId);
|
||||
rs.next();
|
||||
int complete = Util.getIntValue(rs.getString("complete"));
|
||||
double progress = all == 0 ? 0 :((double) complete / all) * 100;
|
||||
return RecruitPortalCommonVO.builder().title("接受offer").scale(progress).color("#4cbadd").build();
|
||||
}
|
||||
|
||||
|
||||
private RecruitPortalCommonVO getProgress() {
|
||||
RecordSet rs = new RecordSet();
|
||||
List<String> all = new ArrayList<>();
|
||||
rs.executeQuery("select sqr,zpxqfzr from uf_jcl_zpxqjh");
|
||||
while (rs.next()) {
|
||||
String sqr = Util.null2String(rs.getString("sqr"));
|
||||
String zpxqfzr = Util.null2String(rs.getString("zpxqfzr"));
|
||||
all.add(mergeStrings(sqr, zpxqfzr));
|
||||
}
|
||||
String uId = String.valueOf(user.getUID());
|
||||
List<String> filterAll = all.stream()
|
||||
.filter(s -> s.contains(uId))
|
||||
.collect(Collectors.toList());
|
||||
List<String> complete = new ArrayList<>();
|
||||
rs.executeQuery("select sqr from uf_jcl_zpxqjh where xqzt = 1");
|
||||
while (rs.next()) {
|
||||
String sqr = Util.null2String(rs.getString("sqr"));
|
||||
String zpxqfzr = Util.null2String(rs.getString("zpxqfzr"));
|
||||
complete.add(mergeStrings(sqr, zpxqfzr));
|
||||
}
|
||||
List<String> filterComplete = complete.stream()
|
||||
.filter(s -> s.contains(uId))
|
||||
.collect(Collectors.toList());
|
||||
double progress = filterAll.size() == 0 ? 0 : ((double) filterComplete.size() / filterAll.size()) * 100;
|
||||
return RecruitPortalCommonVO.builder().title("招聘需求完成进度").scale(progress).color("#fdac3a").build();
|
||||
}
|
||||
|
||||
private RecruitPortalCommonVO getInterview(int type) {
|
||||
RecordSet rs = new RecordSet();
|
||||
String uId = String.valueOf(user.getUID());
|
||||
String title;
|
||||
String color;
|
||||
rs.executeQuery("select msg,ptmsg from uf_jcl_ms");
|
||||
List<String> all = new ArrayList<>();
|
||||
List<String> complete = new ArrayList<>();
|
||||
while (rs.next()) {
|
||||
String msg = Util.null2String(rs.getString("msg"));
|
||||
String ptmsg = Util.null2String(rs.getString("ptmsg"));
|
||||
all.add(mergeStrings(msg, ptmsg));
|
||||
}
|
||||
List<String> filterAll = all.stream()
|
||||
.filter(s -> s.contains(uId))
|
||||
.collect(Collectors.toList());
|
||||
if (type == 1) {
|
||||
title = "面试出席率";
|
||||
color = "#5671fb";
|
||||
rs.executeQuery("select msg,ptmsg from uf_jcl_ms where zt = 1");
|
||||
while (rs.next()) {
|
||||
String msg = Util.null2String(rs.getString("msg"));
|
||||
String ptmsg = Util.null2String(rs.getString("ptmsg"));
|
||||
complete.add(mergeStrings(msg, ptmsg));
|
||||
}
|
||||
}else {
|
||||
title = "面试通过率";
|
||||
color = "#42d39e";
|
||||
rs.executeQuery("select msg,ptmsg from uf_jcl_ms where zt = 1 and jg = 1");
|
||||
while (rs.next()) {
|
||||
String msg = Util.null2String(rs.getString("msg"));
|
||||
String ptmsg = Util.null2String(rs.getString("ptmsg"));
|
||||
complete.add(mergeStrings(msg, ptmsg));
|
||||
}
|
||||
|
||||
}
|
||||
List<String> filterComplete = complete.stream()
|
||||
.filter(s -> s.contains(uId))
|
||||
.collect(Collectors.toList());
|
||||
double progress = filterAll.size() == 0 ? 0 : ((double) filterComplete.size() / filterAll.size()) * 100;
|
||||
return RecruitPortalCommonVO.builder().title(title).scale(progress).color(color).build();
|
||||
|
||||
}
|
||||
|
||||
|
||||
private Integer waitHired() {
|
||||
RecordSet rs = new RecordSet();
|
||||
rs.executeQuery("select count(1) as sum from uf_jcl_rzgl where rzzt = 0");
|
||||
rs.next();
|
||||
return Util.getIntValue(rs.getString("sum"));
|
||||
}
|
||||
|
||||
|
||||
private RecruitPortalCommonVO selectOffer(String sql, String title, String icon, String uId) {
|
||||
RecordSet rs = new RecordSet();
|
||||
List<String> list = new ArrayList<>();
|
||||
rs.executeQuery(sql);
|
||||
while (rs.next()) {
|
||||
String zpzwfzr = Util.null2String(rs.getString("zpzwfzr"));
|
||||
String zpxzr = Util.null2String(rs.getString("zpxzr"));
|
||||
list.add(mergeStrings(zpzwfzr, zpxzr));
|
||||
}
|
||||
|
||||
List<String> filteredList = list.stream()
|
||||
.filter(s -> s.contains(uId))
|
||||
.collect(Collectors.toList());
|
||||
return RecruitPortalCommonVO.builder().title(title).count(filteredList.size()).icon(icon).build();
|
||||
}
|
||||
|
||||
|
||||
private RecruitPortalCommonVO selectRecruitInterview(String sql, String title, String icon, String uId) {
|
||||
RecordSet rs = new RecordSet();
|
||||
List<RecruitInterviewPO> recruitInterview = new ArrayList<>();
|
||||
rs.executeQuery(sql);
|
||||
while (rs.next()) {
|
||||
String msg = Util.null2String(rs.getString("msg"));
|
||||
String ptmsg = Util.null2String(rs.getString("ptmsg"));
|
||||
String msrq = Util.null2String(rs.getString("msrq")).substring(0,9);
|
||||
recruitInterview.add(RecruitInterviewPO.builder().ids(mergeStrings(msg, ptmsg)).interviewDate(msrq).build());
|
||||
}
|
||||
|
||||
LocalDate currentDate = LocalDate.now();
|
||||
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
|
||||
String dateString = currentDate.format(formatter);
|
||||
|
||||
List<RecruitInterviewPO> filterInterview = recruitInterview.stream()
|
||||
.filter(s -> s.getIds().contains(uId))
|
||||
.filter(s -> dateString.equals(s.getInterviewDate()))
|
||||
.collect(Collectors.toList());
|
||||
return RecruitPortalCommonVO.builder().title(title).count(filterInterview.size()).icon(icon).build();
|
||||
}
|
||||
|
||||
private String mergeStrings(String string1, String string2) {
|
||||
boolean isString1Empty = string1.isEmpty();
|
||||
boolean isString2Empty = string2.isEmpty();
|
||||
if (isString1Empty && isString2Empty) {
|
||||
return "";
|
||||
} else if (isString1Empty) {
|
||||
return string2;
|
||||
} else if (isString2Empty) {
|
||||
return string1;
|
||||
} else {
|
||||
return string1 + "," + string2;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,86 @@
|
|||
package com.engine.recruit.service.impl;
|
||||
|
||||
import com.engine.common.util.ServiceUtil;
|
||||
import com.engine.core.impl.Service;
|
||||
import com.engine.recruit.entity.workplan.WorkPlanCreateParams;
|
||||
import com.engine.recruit.enums.InterviewOperateTypeEnum;
|
||||
import com.engine.recruit.service.WorkPlanSerivice;
|
||||
import com.engine.workplan.service.WorkPlanBaseService;
|
||||
import com.engine.workplan.service.impl.WorkPlanBaseServiceImpl;
|
||||
import weaver.conn.RecordSet;
|
||||
import weaver.hrm.User;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @Author liang.cheng
|
||||
* @Date 2023/10/17 10:52 AM
|
||||
* @Description:
|
||||
* @Version 1.0
|
||||
*/
|
||||
public class WorkPlanServiceImpl extends Service implements WorkPlanSerivice {
|
||||
|
||||
private WorkPlanBaseService getService(User user) {
|
||||
return ServiceUtil.getService(WorkPlanBaseServiceImpl.class, user);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void operate(WorkPlanCreateParams workPlanCreateParams) {
|
||||
RecordSet rs = new RecordSet();
|
||||
|
||||
String operateType = workPlanCreateParams.getOperateType();
|
||||
String billId = workPlanCreateParams.getBillId();
|
||||
Map<String, Object> maps = new HashMap<>(16);
|
||||
|
||||
if (InterviewOperateTypeEnum.ARRANGE.getOperateType().equals(operateType) || InterviewOperateTypeEnum.ADJUSTMENT.getOperateType().equals(operateType)){
|
||||
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm");
|
||||
LocalDateTime dateTime = LocalDateTime.parse(workPlanCreateParams.getBeginDateTime(), formatter);
|
||||
LocalDateTime newDateTime = dateTime.plusHours(1);
|
||||
workPlanCreateParams.setEndDateTime(newDateTime.format(formatter));
|
||||
maps.put("workPlanType",workPlanCreateParams.getWorkPlanType());
|
||||
maps.put("planName",workPlanCreateParams.getPlanName());
|
||||
maps.put("memberIDs",workPlanCreateParams.getMemberIds());
|
||||
maps.put("urgentLevel",workPlanCreateParams.getUrgentLevel());
|
||||
maps.put("beginDateTime",workPlanCreateParams.getBeginDateTime());
|
||||
maps.put("endDateTime",workPlanCreateParams.getEndDateTime());
|
||||
maps.put("isEnableSecondAuth","0");
|
||||
//maps.put("from","workplan");
|
||||
}
|
||||
|
||||
|
||||
List<String> list = Arrays.stream(billId.split(","))
|
||||
.collect(Collectors.toList());
|
||||
list.forEach(id -> {
|
||||
// 取消面试
|
||||
if (InterviewOperateTypeEnum.CANCEL.getOperateType().equals(operateType)) {
|
||||
Map<String, Object> map = new HashMap<String, Object>(2){{
|
||||
put("workid", workPlanCreateParams.getWorkId());
|
||||
}};
|
||||
getService(user).deleteWorkPlan(map);
|
||||
|
||||
//完成面试
|
||||
}else if (InterviewOperateTypeEnum.EVALUATE.getOperateType().equals(operateType)) {
|
||||
Map<String, Object> map = new HashMap<String, Object>(2){{
|
||||
put("workid", workPlanCreateParams.getWorkId());
|
||||
}};
|
||||
getService(user).finishWorkPlan(map);
|
||||
// 调整面试
|
||||
}else if (InterviewOperateTypeEnum.ADJUSTMENT.getOperateType().equals(operateType)){
|
||||
maps.put("workid",workPlanCreateParams.getWorkId());
|
||||
getService(user).addWorkPlan(maps);
|
||||
// 安排面试
|
||||
}else if (InterviewOperateTypeEnum.ARRANGE.getOperateType().equals(operateType)) {
|
||||
Map<String, Object> result = getService(user).addWorkPlan(maps);
|
||||
Integer workplanId = (Integer)result.get("workplanid");
|
||||
rs.executeUpdate("update uf_jcl_ms set glrc = ? where id = ?",workplanId,id);
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,695 @@
|
|||
package com.engine.recruit.system;
|
||||
|
||||
import com.api.doc.detail.util.DocDownloadCheckUtil;
|
||||
import com.api.hrm.service.HrmResourceBaseService;
|
||||
import com.api.hrm.util.ServiceUtil;
|
||||
import com.engine.common.biz.SimpleBizLogger;
|
||||
import com.engine.common.constant.BizLogOperateAuditType;
|
||||
import com.engine.common.constant.BizLogOperateType;
|
||||
import com.engine.common.constant.BizLogSmallType4Hrm;
|
||||
import com.engine.common.constant.BizLogType;
|
||||
import com.engine.common.entity.BizLogContext;
|
||||
import com.engine.common.service.impl.HrmCommonServiceImpl;
|
||||
import com.engine.common.util.LogUtil;
|
||||
import com.engine.hrm.entity.RuleCodeType;
|
||||
import com.engine.hrm.util.CodeRuleManager;
|
||||
import com.engine.hrm.util.HrmWeakPasswordUtil;
|
||||
import com.engine.hrm.util.face.HrmFaceCheckManager;
|
||||
import com.engine.hrm.util.face.ValidateFieldManager;
|
||||
import com.engine.hrm.util.face.bean.CheckItemBean;
|
||||
import com.weaver.general.BaseBean;
|
||||
import ln.LN;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import weaver.common.DateUtil;
|
||||
import weaver.conn.RecordSet;
|
||||
import weaver.conn.RecordSetTrans;
|
||||
import weaver.file.Prop;
|
||||
import weaver.formmode.recruit.modeexpand.util.RecruitModeUtil;
|
||||
import weaver.general.GCONST;
|
||||
import weaver.general.PasswordUtil;
|
||||
import weaver.general.Util;
|
||||
import weaver.hrm.HrmUserVarify;
|
||||
import weaver.hrm.User;
|
||||
import weaver.hrm.common.DbFunctionUtil;
|
||||
import weaver.hrm.company.DepartmentComInfo;
|
||||
import weaver.hrm.companyvirtual.DepartmentVirtualComInfo;
|
||||
import weaver.hrm.finance.SalaryManager;
|
||||
import weaver.hrm.passwordprotection.manager.HrmResourceManager;
|
||||
import weaver.hrm.privacy.PrivacyComInfo;
|
||||
import weaver.hrm.privacy.UserPrivacyComInfo;
|
||||
import weaver.hrm.resource.ResourceComInfo;
|
||||
import weaver.hrm.settings.ChgPasswdReminder;
|
||||
import weaver.hrm.settings.RemindSettings;
|
||||
import weaver.hrm.tools.HrmDateCheck;
|
||||
import weaver.interfaces.hrm.HrmServiceManager;
|
||||
import weaver.license.PluginUserCheck;
|
||||
import weaver.rsa.security.RSA;
|
||||
import weaver.rtx.OrganisationCom;
|
||||
import weaver.rtx.OrganisationComRunnable;
|
||||
import weaver.system.SysRemindWorkflow;
|
||||
import weaver.systeminfo.SystemEnv;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author:dxfeng
|
||||
* @createTime: 2022/10/11
|
||||
* @version: 1.0
|
||||
*/
|
||||
public class ResourceSyncUtil {
|
||||
private static final char SEPARATOR = Util.getSeparator();
|
||||
private static final String TODAY = DateUtil.getCurrentDate();
|
||||
|
||||
public static Map<String, Object> addResource(User user, Map<String, Object> params) {
|
||||
|
||||
Map<String, Object> returnMap = new HashMap<>();
|
||||
RecordSet rs = new RecordSet();
|
||||
String sql;
|
||||
try {
|
||||
DepartmentComInfo departmentComInfo = new DepartmentComInfo();
|
||||
boolean canEdit = HrmUserVarify.checkUserRight("HrmResourceEdit:Edit", user);
|
||||
if (!canEdit) {
|
||||
returnMap.put("status", "-1");
|
||||
returnMap.put("message", SystemEnv.getHtmlLabelName(22620, user.getLanguage()));
|
||||
return returnMap;
|
||||
}
|
||||
String loginId = Util.null2String(params.get("loginid"));
|
||||
String accountType = Util.null2s(Util.fromScreen3(Util.null2String(params.get(("accounttype"))), user.getLanguage()), "0");
|
||||
if ("1".equals(accountType)) {
|
||||
//次账号没有loginId
|
||||
loginId = "";
|
||||
}
|
||||
boolean canSave = false;
|
||||
LN LN = new LN();
|
||||
int ckHrmnum = LN.CkHrmnum();
|
||||
if (loginId.length() > 0) {
|
||||
if (ckHrmnum < 0) {
|
||||
//只有License检查人数小于规定人数,才能修改。防止客户直接修改数据库数据
|
||||
canSave = true;
|
||||
}
|
||||
} else {
|
||||
canSave = true;
|
||||
}
|
||||
if (!canSave) {
|
||||
returnMap.put("status", "-1");
|
||||
returnMap.put("message", SystemEnv.getHtmlLabelName(84760, user.getLanguage()));
|
||||
return returnMap;
|
||||
}
|
||||
|
||||
|
||||
if (!"".equals(loginId) && "0".equals(accountType)) {
|
||||
sql = "select count(1) from hrmresourceallview where loginid='" + loginId + "' ";
|
||||
rs.execute(sql);
|
||||
if (rs.next()) {
|
||||
if (rs.getInt(1) > 0) {
|
||||
returnMap.put("status", "-1");
|
||||
returnMap.put("message", SystemEnv.getHtmlLabelName(15094, user.getLanguage()));
|
||||
return returnMap;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
String departmentid = Util.null2String(params.get("departmentid"));
|
||||
String subcompanyid = departmentComInfo.getSubcompanyid1(departmentid);
|
||||
if (!"".equals(loginId) && !"0".equals(subcompanyid) && new HrmResourceManager().noMore(subcompanyid)) {
|
||||
returnMap.put("status", "-1");
|
||||
returnMap.put("message", SystemEnv.getHtmlLabelName(81926, user.getLanguage()));
|
||||
return returnMap;
|
||||
}
|
||||
|
||||
|
||||
ResourceComInfo ResourceComInfo = new ResourceComInfo();
|
||||
Map<String, String> result = addResourceBase(user, params);
|
||||
|
||||
String addResourceBaseCode = result.get("status");
|
||||
if ("-1".equals(addResourceBaseCode)) {
|
||||
returnMap.put("status", "-1");
|
||||
returnMap.put("message", result.get("message"));
|
||||
return returnMap;
|
||||
}
|
||||
|
||||
|
||||
int id = Util.getIntValue(result.get("id"));
|
||||
String password = Util.null2String(params.get("password"));
|
||||
//是否开启了RSA加密
|
||||
String openRSA = Util.null2String(Prop.getPropValue("openRSA", "isrsaopen"));
|
||||
if ("1".equals(openRSA)) {
|
||||
password = new RSA().decrypt(password);
|
||||
}
|
||||
ChgPasswdReminder reminder = new ChgPasswdReminder();
|
||||
RemindSettings settings = reminder.getRemindSettings();
|
||||
|
||||
//判断是否开启了【启用初始密码】
|
||||
String defaultPasswordEnable = Util.null2String(settings.getDefaultPasswordEnable());
|
||||
//【初始密码】
|
||||
String defaultPassword = Util.null2String(settings.getDefaultPassword());
|
||||
//如果管理员设置的密码为空。并且开启了【启用初始密码】,且初始密码不为空,则默认取初始密码作为密码
|
||||
if ("".equals(password) && "1".equals(defaultPasswordEnable) && !"".equals(defaultPassword)) {
|
||||
password = defaultPassword;
|
||||
}
|
||||
|
||||
//判断是否开启了【禁止弱密码保存】
|
||||
String weakPasswordDisable = Util.null2s(settings.getWeakPasswordDisable(), "0");
|
||||
if ("1".equals(weakPasswordDisable)) {
|
||||
if (!"".equals(password)) {//密码为空的情况
|
||||
//判断是否为弱密码
|
||||
HrmWeakPasswordUtil hrmWeakPasswordUtil = new HrmWeakPasswordUtil();
|
||||
if (hrmWeakPasswordUtil.isWeakPsd(password)) {
|
||||
returnMap.put("status", "-1");
|
||||
returnMap.put("message", SystemEnv.getHtmlLabelName(515420, user.getLanguage()));
|
||||
return returnMap;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
int secLevel = Util.getIntValue(Util.null2String(params.get("seclevel")), 0);
|
||||
if (id > 0) {
|
||||
//保存系统信息
|
||||
SimpleBizLogger logger = new SimpleBizLogger();
|
||||
BizLogContext bizLogContext = new BizLogContext();
|
||||
bizLogContext.setLogType(BizLogType.HRM);//模块类型
|
||||
bizLogContext.setBelongType(BizLogSmallType4Hrm.HRM_RSOURCE_CARD);//所属大类型
|
||||
bizLogContext.setLogSmallType(BizLogSmallType4Hrm.HRM_RSOURCE_CARD_SYSTEM);//当前小类型
|
||||
bizLogContext.setOperateType(BizLogOperateType.ADD);
|
||||
bizLogContext.setOperateAuditType(BizLogOperateAuditType.WARNING);
|
||||
bizLogContext.setParams(params);//当前request请求参数
|
||||
logger.setUser(user);//当前操作人
|
||||
String mainSql = "select * from hrmresource where id=" + id;
|
||||
logger.setMainSql(mainSql, "id");//主表sql
|
||||
logger.setMainPrimarykey("id");//主日志表唯一key
|
||||
logger.setMainTargetNameColumn("lastname");//当前targetName对应的列(对应日志中的对象名)
|
||||
logger.before(bizLogContext);//写入操作前日志
|
||||
|
||||
String workStartDate = Util.null2String(params.get("workstartdate"));//参加工作日期
|
||||
String companyStartDate = Util.null2String(params.get("companystartdate"));//入职日期
|
||||
String certificateNum = Util.null2String(params.get("certificatenum"));//身份证号
|
||||
String probationEndDate = Util.null2String(params.get("probationenddate"));//试用期结束日期
|
||||
|
||||
String dspOrder = Util.fromScreen3(Util.null2String(params.get("dsporder")), user.getLanguage());
|
||||
if (dspOrder.length() == 0) {
|
||||
dspOrder = "" + id;
|
||||
}
|
||||
if ("0".equals(accountType)) {
|
||||
|
||||
String encrptPassword = "";
|
||||
String salt = "";
|
||||
if (StringUtils.isNotBlank(password)) {
|
||||
String[] encrypts = PasswordUtil.encrypt(password);
|
||||
encrptPassword = encrypts[0];
|
||||
salt = encrypts[1];
|
||||
}
|
||||
|
||||
sql = " update hrmresource set loginid='" + loginId + "', password='" + encrptPassword + "'," +
|
||||
"seclevel=" + secLevel + ",dsporder=" + dspOrder +
|
||||
",salt='" + salt + "',workstartdate='" + workStartDate + "',companystartdate='" + companyStartDate + "' where id = " + id;
|
||||
} else {
|
||||
sql = " update hrmresource set seclevel=" + secLevel + ",dsporder=" + dspOrder +
|
||||
" ,workstartdate='" + workStartDate + "',companystartdate='" + companyStartDate + "' where id = " + id;
|
||||
}
|
||||
// 计算工龄、司龄
|
||||
updateWorkInfo(String.valueOf(id), user, params);
|
||||
|
||||
rs.execute(sql);
|
||||
|
||||
// 更新身份证、试用期结束日期
|
||||
sql = " update hrmresource set certificatenum='" + certificateNum + "',probationenddate ='" + probationEndDate + "' where id = " + id;
|
||||
rs.executeUpdate(sql);
|
||||
|
||||
HrmFaceCheckManager.setUserPassowrd(id + "", password);
|
||||
HrmFaceCheckManager.sync(id + "", HrmFaceCheckManager.getOptUpdate(), "HrmResourceAddService_saveSimple_update", HrmFaceCheckManager.getOaResource());
|
||||
|
||||
LogUtil.writeBizLog(logger.getBizLogContexts());
|
||||
}
|
||||
|
||||
//同步RTX端的用户信息.
|
||||
new OrganisationCom().checkUser(id);
|
||||
new Thread(new OrganisationComRunnable("user", "add", "" + id)).start();
|
||||
ResourceComInfo.updateResourceInfoCache("" + id);
|
||||
new PluginUserCheck().clearPluginUserCache("messager");
|
||||
//OA与第三方接口单条数据同步方法开始
|
||||
new HrmServiceManager().SynInstantHrmResource("" + id, "1");
|
||||
//OA与第三方接口单条数据同步方法结束
|
||||
//BBS集成相关
|
||||
String bbsLingUrl = new weaver.general.BaseBean().getPropValue(GCONST.getConfigFile(), "ecologybbs.linkUrl");
|
||||
if (!"0".equals(password)) {
|
||||
if (!"".equals(bbsLingUrl)) {
|
||||
new Thread(new weaver.bbs.BBSRunnable(loginId, password)).start();
|
||||
}
|
||||
}
|
||||
|
||||
returnMap.put("id", id);
|
||||
returnMap.put("status", "1");
|
||||
} catch (Exception e) {
|
||||
new BaseBean().writeLog("保存新建人员simple错误:" + e);
|
||||
returnMap.put("status", "-1");
|
||||
returnMap.put("message", "" + weaver.systeminfo.SystemEnv.getHtmlLabelName(22620, weaver.general.ThreadVarLanguage.getLang()) + "");
|
||||
}
|
||||
return returnMap;
|
||||
}
|
||||
|
||||
private static Map<String, String> addResourceBase(User user, Map<String, Object> params) {
|
||||
Map<String, String> retmap = new HashMap<>();
|
||||
try {
|
||||
retmap.put("id", "0");
|
||||
RecordSet rs = new RecordSet();
|
||||
DepartmentComInfo DepartmentComInfo = new DepartmentComInfo();
|
||||
ResourceComInfo ResourceComInfo = new ResourceComInfo();
|
||||
SalaryManager SalaryManager = new SalaryManager();
|
||||
ChgPasswdReminder reminder = new ChgPasswdReminder();
|
||||
RemindSettings settings = reminder.getRemindSettings();
|
||||
SysRemindWorkflow SysRemindWorkflow = new SysRemindWorkflow();
|
||||
DepartmentVirtualComInfo DepartmentVirtualComInfo = new DepartmentVirtualComInfo();
|
||||
|
||||
StringBuilder para;
|
||||
String cmd = Util.null2String(params.get("cmd"));
|
||||
String id = Util.null2String(params.get("id"));
|
||||
String workcode = Util.fromScreen3(Util.null2String(params.get("workcode")), user.getLanguage());
|
||||
String lastname = Util.fromScreen3(Util.null2String(params.get("lastname")), user.getLanguage()).trim();
|
||||
String sex = Util.fromScreen3(Util.null2String(params.get("sex")), user.getLanguage());
|
||||
String resourceimageid = Util.null2String(params.get("resourceimageid"));
|
||||
if (resourceimageid.length() > 0) {
|
||||
resourceimageid = "" + DocDownloadCheckUtil.getDownloadfileidstr(resourceimageid);
|
||||
}
|
||||
String departmentid = Util.fromScreen3(Util.null2String(params.get("departmentid")), user.getLanguage());
|
||||
String costcenterid = Util.fromScreen3(Util.null2String(params.get("costcenterid")), user.getLanguage());
|
||||
String jobtitle = Util.fromScreen3(Util.null2String(params.get("jobtitle")), user.getLanguage());
|
||||
String joblevel = Util.fromScreen3(Util.null2String(params.get("joblevel")), user.getLanguage());
|
||||
String jobactivitydesc = Util.fromScreen3(Util.null2String(params.get("jobactivitydesc")), user.getLanguage());
|
||||
String managerid = Util.fromScreen3(Util.null2String(params.get("managerid")), user.getLanguage());
|
||||
String assistantid = Util.fromScreen3(Util.null2String(params.get("assistantid")), user.getLanguage());
|
||||
String status = Util.fromScreen3(Util.null2String(params.get("status")), user.getLanguage());
|
||||
if (StringUtils.isBlank(status)) {
|
||||
status = "0";
|
||||
}
|
||||
String locationid = Util.fromScreen3(Util.null2String(params.get("locationid")), user.getLanguage());
|
||||
String workroom = Util.fromScreen3(Util.null2String(params.get("workroom")), user.getLanguage());
|
||||
String telephone = Util.fromScreen3(Util.null2String(params.get("telephone")), user.getLanguage());
|
||||
String mobile = Util.fromScreen3(Util.null2String(params.get("mobile")), user.getLanguage());
|
||||
String mobileshowtype = Util.fromScreen3(Util.null2String(params.get("mobileshowtype")), user.getLanguage());
|
||||
String mobilecall = Util.fromScreen3(Util.null2String(params.get("mobilecall")), user.getLanguage());
|
||||
String fax = Util.fromScreen3(Util.null2String(params.get("fax")), user.getLanguage());
|
||||
String jobcall = Util.fromScreen3(Util.null2String(params.get("jobcall")), user.getLanguage());
|
||||
String email = Util.fromScreen3(Util.null2String(params.get("email")), user.getLanguage());
|
||||
String dsporder = Util.fromScreen3(Util.null2String(params.get("dsporder")), user.getLanguage());
|
||||
String accounttype = Util.fromScreen3(Util.null2String(params.get("accounttype")), user.getLanguage());
|
||||
String systemlanguage = Util.null2String(params.get("systemlanguage"));
|
||||
if ("".equals(systemlanguage) || "0".equals(systemlanguage)) {
|
||||
systemlanguage = "7";
|
||||
}
|
||||
String belongto = Util.fromScreen3(Util.null2String(params.get("belongto")), user.getLanguage());
|
||||
//应聘人员id
|
||||
String rcid = Util.null2String(params.get("rcId"));
|
||||
|
||||
CheckItemBean mobileBean = new CheckItemBean("mobile", mobile, id);
|
||||
ValidateFieldManager.validate(mobileBean);
|
||||
if (!mobileBean.isPass()) {
|
||||
retmap.put("status", "-1");
|
||||
retmap.put("message", mobileBean.getCheckMsg());
|
||||
return retmap;
|
||||
}
|
||||
|
||||
CheckItemBean telephoneBean = new CheckItemBean("telephone", telephone, id);
|
||||
ValidateFieldManager.validate(telephoneBean);
|
||||
if (!telephoneBean.isPass()) {
|
||||
retmap.put("status", "-1");
|
||||
retmap.put("message", telephoneBean.getCheckMsg());
|
||||
return retmap;
|
||||
}
|
||||
|
||||
|
||||
if (dsporder.length() == 0) {
|
||||
dsporder = id;
|
||||
}
|
||||
if ("0".equals(accounttype)) {
|
||||
belongto = "-1";
|
||||
}
|
||||
String departmentvirtualids = Util.null2String(params.get("departmentvirtualids"));//虚拟部门id;
|
||||
|
||||
//Td9325,解决多账号次账号没有登陆Id在浏览框组织结构中无法显示的问题。
|
||||
boolean falg = false;
|
||||
String loginid = "";
|
||||
if ("1".equals(accounttype)) {
|
||||
rs.execute("select loginid from HrmResource where id =" + belongto);
|
||||
if (rs.next()) {
|
||||
loginid = rs.getString("loginid");
|
||||
}
|
||||
if (!"".equals(loginid)) {
|
||||
String maxidsql = "select max(id) as id from HrmResource where loginid like '" + loginid + "%'";
|
||||
rs.execute(maxidsql);
|
||||
if (rs.next()) {
|
||||
loginid = loginid + (rs.getInt("id") + 1);
|
||||
falg = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
rs.executeProc("HrmResourceMaxId_Get", "");
|
||||
rs.next();
|
||||
id = "" + rs.getInt(1);
|
||||
if (!"".equals(rcid)) {
|
||||
id = rcid;
|
||||
}
|
||||
SimpleBizLogger logger = new SimpleBizLogger();
|
||||
BizLogContext bizLogContext = new BizLogContext();
|
||||
bizLogContext.setLogType(BizLogType.HRM);//模块类型
|
||||
bizLogContext.setBelongType(BizLogSmallType4Hrm.HRM_RSOURCE_CARD);//所属大类型
|
||||
bizLogContext.setBelongTypeTargetName(SystemEnv.getHtmlLabelName(1361, user.getLanguage()));
|
||||
bizLogContext.setLogSmallType(BizLogSmallType4Hrm.HRM_RSOURCE_CARD_BASE);//当前小类型
|
||||
bizLogContext.setOperateType(BizLogOperateType.ADD);
|
||||
bizLogContext.setParams(params);//当前request请求参数
|
||||
logger.setUser(user);//当前操作人
|
||||
String cusFieldNames = ServiceUtil.getCusFieldNames("HrmCustomFieldByInfoType", -1, "b");
|
||||
String mainSql = "select a.*" + (cusFieldNames.length() > 0 ? "," + cusFieldNames : "") + " from hrmresource a left join cus_fielddata b on a.id=b.id and b.scope='HrmCustomFieldByInfoType' and b.scopeid=-1 where a.id=" + id;
|
||||
logger.setMainSql(mainSql, "id");//主表sql
|
||||
logger.setMainPrimarykey("id");//主日志表唯一key
|
||||
logger.setMainTargetNameColumn("lastname");//当前targetName对应的列(对应日志中的对象名)
|
||||
logger.before(bizLogContext);//写入操作前日志
|
||||
|
||||
String sql = "select managerstr, seclevel from HrmResource where id = " + Util.getIntValue(managerid);
|
||||
rs.execute(sql);
|
||||
String managerstr = "";
|
||||
while (rs.next()) {
|
||||
String tmp_managerstr = rs.getString("managerstr");
|
||||
//处理managerstr 不以逗号开始或者结束的情况 形如 managerstr:8 begin
|
||||
if (!tmp_managerstr.startsWith(",")) {
|
||||
tmp_managerstr = "," + tmp_managerstr;
|
||||
}
|
||||
if (!tmp_managerstr.endsWith(",")) {
|
||||
tmp_managerstr = tmp_managerstr + ",";
|
||||
}
|
||||
//处理managerstr 不以逗号开始或者结束的情况 形如 managerstr:8 end
|
||||
managerstr += tmp_managerstr;
|
||||
managerstr = "," + managerid + managerstr;
|
||||
managerstr = managerstr.endsWith(",") ? managerstr : (managerstr + ",");
|
||||
}
|
||||
|
||||
String subcmpanyid1 = DepartmentComInfo.getSubcompanyid1(departmentid);
|
||||
RecordSetTrans rst = new RecordSetTrans();
|
||||
rst.setAutoCommit(false);
|
||||
try {
|
||||
if (resourceimageid.length() == 0) {
|
||||
resourceimageid = "null";
|
||||
}
|
||||
if (costcenterid.length() == 0) {
|
||||
costcenterid = "null";
|
||||
}
|
||||
if (managerid.length() == 0) {
|
||||
managerid = "null";
|
||||
}
|
||||
if (assistantid.length() == 0) {
|
||||
assistantid = "null";
|
||||
}
|
||||
if (accounttype.length() == 0) {
|
||||
accounttype = "null";
|
||||
}
|
||||
if (belongto.length() == 0) {
|
||||
belongto = "null";
|
||||
}
|
||||
if (jobcall.length() == 0) {
|
||||
jobcall = "null";
|
||||
}
|
||||
if (mobileshowtype.length() == 0) {
|
||||
mobileshowtype = "null";
|
||||
}
|
||||
if ("postgresql".equalsIgnoreCase(rst.getDBType())) {
|
||||
if (joblevel.length() == 0) {
|
||||
joblevel = null;
|
||||
}
|
||||
if (dsporder.length() == 0) {
|
||||
dsporder = null;
|
||||
}
|
||||
}
|
||||
workcode = CodeRuleManager.getCodeRuleManager().generateRuleCode(RuleCodeType.USER, subcmpanyid1, departmentid, jobtitle, workcode);
|
||||
para = new StringBuilder("" + id + SEPARATOR + workcode + SEPARATOR + lastname + SEPARATOR + sex + SEPARATOR + resourceimageid + SEPARATOR +
|
||||
departmentid + SEPARATOR + costcenterid + SEPARATOR + jobtitle + SEPARATOR + joblevel + SEPARATOR + jobactivitydesc + SEPARATOR +
|
||||
managerid + SEPARATOR + assistantid + SEPARATOR + status + SEPARATOR + locationid + SEPARATOR + workroom + SEPARATOR + telephone +
|
||||
SEPARATOR + mobile + SEPARATOR + mobilecall + SEPARATOR + fax + SEPARATOR + jobcall + SEPARATOR + subcmpanyid1 + SEPARATOR + managerstr +
|
||||
SEPARATOR + accounttype + SEPARATOR + belongto + SEPARATOR + systemlanguage + SEPARATOR + email + SEPARATOR + dsporder + SEPARATOR + mobileshowtype);
|
||||
|
||||
rst.executeProc("HrmResourceBasicInfo_Insert", para.toString());
|
||||
if (Util.null2String(locationid).length() > 0) {
|
||||
rst.executeSql("update hrmresource set countryid=(select countryid from HrmLocations where id=" + locationid + "),"
|
||||
+ DbFunctionUtil.getInsertUpdateSetSql(rst.getDBType(), user.getUID()) + " where id=" + id);
|
||||
}
|
||||
String logidsql, quickSearchStr = new HrmCommonServiceImpl().generateQuickSearchStr(lastname);
|
||||
if (falg) {
|
||||
logidsql = "update HrmResource set loginid = ?, pinyinlastname = ?, ecology_pinyin_search = ? where id = ?";
|
||||
rst.executeUpdate(logidsql, loginid, quickSearchStr, quickSearchStr, id);
|
||||
} else {
|
||||
logidsql = "update HrmResource set pinyinlastname = ?, ecology_pinyin_search = ? where id = ?";
|
||||
rst.executeUpdate(logidsql, quickSearchStr, quickSearchStr, id);
|
||||
}
|
||||
rst.commit();
|
||||
} catch (Exception e) {
|
||||
rst.rollback();
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
boolean formdefined = false;
|
||||
weaver.system.CusFormSettingComInfo CusFormSettingComInfo = new weaver.system.CusFormSettingComInfo();
|
||||
weaver.system.CusFormSetting CusFormSetting = CusFormSettingComInfo.getCusFormSetting("hrm", "HrmResourceBase");
|
||||
if (CusFormSetting != null) {
|
||||
if (CusFormSetting.getStatus() == 2) {
|
||||
//自定义布局页面
|
||||
formdefined = true;
|
||||
}
|
||||
}
|
||||
int userid = user.getUID();
|
||||
String userpara = "" + userid + SEPARATOR + TODAY;
|
||||
para = new StringBuilder("" + id);
|
||||
for (int i = 0; i < 5; i++) {
|
||||
int idx = i;
|
||||
if (formdefined) {
|
||||
idx++;
|
||||
}
|
||||
String datefield = Util.null2String(params.get("datefield" + idx));
|
||||
String numberfield = "" + Util.getDoubleValue(Util.null2String(params.get("numberfield" + idx)), 0);
|
||||
String textfield = Util.null2String(params.get("textfield" + idx));
|
||||
String tinyintfield = "" + Util.getIntValue(Util.null2String(params.get("tinyintfield" + idx)), 0);
|
||||
para.append(SEPARATOR).append(datefield).append(SEPARATOR).append(numberfield).append(SEPARATOR).append(textfield).append(SEPARATOR).append(tinyintfield);
|
||||
}
|
||||
rs.executeProc("HrmResourceDefine_Update", para.toString());
|
||||
rs.executeProc("HrmResource_CreateInfo", "" + id + SEPARATOR + userpara + SEPARATOR + userpara);
|
||||
|
||||
//421944 用户自定义隐私设置
|
||||
|
||||
UserPrivacyComInfo upc = new UserPrivacyComInfo();
|
||||
PrivacyComInfo pc = new PrivacyComInfo();
|
||||
Map<String, String> mapShowSets = pc.getMapShowSets();
|
||||
String insertSql;
|
||||
rs = new RecordSet();
|
||||
try {
|
||||
String deletePriSql = " delete from userprivacysetting where userid= '" + id + "'";
|
||||
rs.execute(deletePriSql);
|
||||
for (Map.Entry<String, String> me : mapShowSets.entrySet()) {
|
||||
String fieldName = me.getKey();
|
||||
String fieldVal = Util.null2String(mapShowSets.get(fieldName));
|
||||
if ("1".equals(fieldVal)) {
|
||||
String tmpPK = id + "__" + fieldName;
|
||||
String tmpPvalue = Util.null2String(params.get(fieldName + "showtype"));
|
||||
insertSql = "insert into userprivacysetting (combinedid,userid,ptype,pvalue) values('" + tmpPK + "','" + id + "','" + fieldName + "','" + tmpPvalue + "')";
|
||||
rs.execute(insertSql);
|
||||
}
|
||||
}
|
||||
upc.removeUserPrivacyCache();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
|
||||
// 改为只进行该人缓存信息的添加
|
||||
ResourceComInfo.addResourceInfoCache(id);
|
||||
SalaryManager.initResourceSalary(id);
|
||||
|
||||
para = new StringBuilder("" + id + SEPARATOR + managerid + SEPARATOR + departmentid + SEPARATOR + subcmpanyid1 + SEPARATOR + "0" + SEPARATOR + managerstr);
|
||||
rs.executeProc("HrmResource_Trigger_Insert", para.toString());
|
||||
|
||||
String sql_1 = ("insert into HrmInfoStatus (itemid,hrmid) values(1," + id + ")");
|
||||
rs.execute(sql_1);
|
||||
String sql_2 = ("insert into HrmInfoStatus (itemid,hrmid) values(2," + id + ")");
|
||||
rs.execute(sql_2);
|
||||
String sql_3 = ("insert into HrmInfoStatus (itemid,hrmid) values(3," + id + ")");
|
||||
rs.execute(sql_3);
|
||||
String sql_10 = ("insert into HrmInfoStatus (itemid,hrmid) values(10," + id + ")");
|
||||
rs.execute(sql_10);
|
||||
|
||||
String CurrentUser = "" + user.getUID();
|
||||
String CurrentUserName = "" + user.getUsername();
|
||||
String SWFAccepter;
|
||||
String SWFTitle;
|
||||
String SWFRemark;
|
||||
String SWFSubmiter;
|
||||
String Subject;
|
||||
Subject = SystemEnv.getHtmlLabelName(15670, user.getLanguage());
|
||||
Subject += ":" + lastname;
|
||||
|
||||
//modifier by lvyi 2013-12-31
|
||||
if ("1".equals(settings.getEntervalid())) {//入职提醒
|
||||
String thesql = "select hrmids from HrmInfoMaintenance where id<4 or id = 10";
|
||||
rs.execute(thesql);
|
||||
StringBuilder members = new StringBuilder();
|
||||
while (rs.next()) {
|
||||
String hrmid_tmp = Util.null2String(rs.getString("hrmids"));//TD9392
|
||||
if (hrmid_tmp.length() != 0) {
|
||||
members.append(",").append(rs.getString("hrmids"));
|
||||
}
|
||||
}
|
||||
if (!"".equals(members.toString())) {
|
||||
members = new StringBuilder(members.substring(1));
|
||||
members = new StringBuilder(new HrmResourceBaseService().duplicateRemoval(members.toString(), user.getUID() + ""));
|
||||
SWFAccepter = members.toString();
|
||||
SWFTitle = SystemEnv.getHtmlLabelName(15670, user.getLanguage());
|
||||
SWFTitle += ":" + lastname;
|
||||
SWFTitle += "-" + CurrentUserName;
|
||||
SWFTitle += "-" + TODAY;
|
||||
SWFRemark = "<a class='wea-hrm-new-employee-set' onClick=\"openHrmNewEmployeeSetDialog(" + id + ")\" style=\"cursor:pointer;\" id = '" + id + "'>" + Util.fromScreen2(Subject, user.getLanguage()) + "</a>";
|
||||
SWFSubmiter = CurrentUser;
|
||||
SysRemindWorkflow.setPrjSysRemind(SWFTitle, 0, Util.getIntValue(SWFSubmiter), SWFAccepter, SWFRemark);
|
||||
}
|
||||
}
|
||||
|
||||
//CustomFieldTreeManager.editCustomDataE9Add("HrmCustomFieldByInfoType", -1, fu, Util.getIntValue(id, 0));
|
||||
//应聘人员的个人信息18条
|
||||
if (!"".equals(rcid)) {
|
||||
sql = "select * from HrmCareerApply where id = ?";
|
||||
rs.executeQuery(sql, id);
|
||||
if (rs.next()) {
|
||||
String birthday = Util.null2String(rs.getString("birthday"));
|
||||
String folk = Util.null2String(rs.getString("folk"));
|
||||
String nativeplace = Util.null2String(rs.getString("nativeplace"));
|
||||
String regresidentplace = Util.null2String(rs.getString("regresidentplace"));
|
||||
|
||||
String certificatenum = Util.null2String(rs.getString("certificatenum"));
|
||||
String maritalstatus = Util.null2String(rs.getString("maritalstatus"));
|
||||
String policy = Util.null2String(rs.getString("policy"));
|
||||
String bememberdate = Util.null2String(rs.getString("bememberdate"));
|
||||
|
||||
String bepartydate = Util.null2String(rs.getString("bepartydate"));
|
||||
String islabouunion = Util.null2String(rs.getString("islabouunion"));
|
||||
String educationlevel = Util.null2String(rs.getString("educationlevel"));
|
||||
String degree = Util.null2String(rs.getString("degree"));
|
||||
|
||||
String healthinfo = Util.null2String(rs.getString("healthinfo"));
|
||||
|
||||
String height = Util.null2String(rs.getString("height"));
|
||||
if (height.contains(".")) {
|
||||
height = height.substring(0, height.indexOf("."));
|
||||
}
|
||||
String weight = Util.null2String(rs.getString("weight"));
|
||||
if (weight.contains(".")) {
|
||||
weight = weight.substring(0, weight.indexOf("."));
|
||||
}
|
||||
|
||||
String residentplace = Util.null2String(rs.getString("residentplace"));
|
||||
String homeaddress = Util.null2String(rs.getString("homeaddress"));
|
||||
String tempresidentnumber = Util.null2String(rs.getString("tempresidentnumber"));
|
||||
|
||||
para = new StringBuilder("" + id + SEPARATOR + birthday + SEPARATOR + folk + SEPARATOR + nativeplace + SEPARATOR + regresidentplace + SEPARATOR + maritalstatus + SEPARATOR + policy + SEPARATOR + bememberdate + SEPARATOR + bepartydate + SEPARATOR + islabouunion + SEPARATOR + educationlevel + SEPARATOR + degree + SEPARATOR + healthinfo + SEPARATOR + height + SEPARATOR + weight + SEPARATOR + residentplace + SEPARATOR + homeaddress + SEPARATOR + tempresidentnumber + SEPARATOR + certificatenum);
|
||||
RecordSet rs1 = new RecordSet();
|
||||
rs1.executeProc("HrmResourcePersonalInfo_Insert", para.toString());
|
||||
}
|
||||
}
|
||||
//更新虚拟组织部门id
|
||||
if (departmentvirtualids.length() > 0) {
|
||||
//保存前先删除需要删除的数据,因为有managerid 所以不能全部删除再保存
|
||||
sql = "delete from hrmresourcevirtual where resourceid=" + id + " and departmentid not in (" + departmentvirtualids + ")";
|
||||
rs.execute(sql);
|
||||
|
||||
String[] departmentvirtualid = departmentvirtualids.split(",");
|
||||
for (String s : departmentvirtualid) {
|
||||
rs.execute(" select count(*) from HrmResourceVirtual where departmentid ='" + s + "' and resourceid = " + id);
|
||||
if (rs.next()) {
|
||||
//如果已存在 无需处理
|
||||
if (rs.getInt(1) > 0) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
//写入
|
||||
int tmpid = 0;
|
||||
rs.execute("select max(id) from HrmResourceVirtual ");
|
||||
if (rs.next()) {
|
||||
tmpid = rs.getInt(1) + 1;
|
||||
}
|
||||
String subcompanyid = DepartmentVirtualComInfo.getSubcompanyid1(s);
|
||||
sql = " insert into HrmResourceVirtual (id,resourceid,subcompanyid,departmentid ) " +
|
||||
" values (" + tmpid + "," + id + "," + subcompanyid + "," + s + ")";
|
||||
rs.execute(sql);
|
||||
}
|
||||
}
|
||||
|
||||
LogUtil.writeBizLog(logger.getBizLogContexts());
|
||||
|
||||
HrmFaceCheckManager.sync(id, HrmFaceCheckManager.getOptInsert(), "hrm_e9_HrmResourceBaseService_addResourceBase", HrmFaceCheckManager.getOaResource());
|
||||
//同步RTX端的用户信息.
|
||||
new OrganisationCom().checkUser(Util.getIntValue(id));
|
||||
new Thread(new OrganisationComRunnable("user", "add", "" + id)).start();
|
||||
ResourceComInfo.updateResourceInfoCache("" + id);
|
||||
new PluginUserCheck().clearPluginUserCache("messager");
|
||||
//OA与第三方接口单条数据同步方法开始
|
||||
new HrmServiceManager().SynInstantHrmResource("" + id, "1");
|
||||
//OA与第三方接口单条数据同步方法结束
|
||||
|
||||
//新增人员实时同步到CoreMail邮件系统
|
||||
//CoreMailAPI.synUser(id);
|
||||
retmap.put("status", "1");
|
||||
retmap.put("id", id);
|
||||
} catch (Exception e) {
|
||||
new BaseBean().writeLog("新建人员基本信息错误:" + e);
|
||||
retmap.put("status", "-1");
|
||||
}
|
||||
return retmap;
|
||||
}
|
||||
|
||||
private static void updateWorkInfo(String id, User user, Map<String, Object> params) {
|
||||
try {
|
||||
RecordSet rs = new RecordSet();
|
||||
String sql;
|
||||
String companystartdate = Util.fromScreen3(Util.null2String(params.get("companystartdate")), user.getLanguage());
|
||||
String workstartdate = Util.fromScreen3(Util.null2String(params.get("workstartdate")), user.getLanguage());
|
||||
|
||||
List<String> lsParams = new ArrayList<>();
|
||||
lsParams.add(companystartdate.length() == 0 ? null : companystartdate);
|
||||
lsParams.add(workstartdate.length() == 0 ? null : workstartdate);
|
||||
lsParams.add(id);
|
||||
sql = " update hrmresource set companystartdate=?,workstartdate=? where id=?";
|
||||
rs.executeUpdate(sql, lsParams);
|
||||
HrmDateCheck hrmDateCheck = new HrmDateCheck();
|
||||
hrmDateCheck.calWorkInfo(id);
|
||||
} catch (Exception e) {
|
||||
new BaseBean().writeLog(e);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 建模表转换为人员表集合
|
||||
*
|
||||
* @param params 建模表数据集合
|
||||
* @return
|
||||
*/
|
||||
public static Map<String, Object> convertEcResourceParams(Map<String, Object> params) {
|
||||
Map<String, Object> convertParams = new HashMap<>();
|
||||
convertParams.put("lastname", RecruitModeUtil.parseBlankToNull(params.get("xm")));
|
||||
convertParams.put("sex", RecruitModeUtil.parseBlankToNull(params.get("xb")));
|
||||
convertParams.put("mobile", RecruitModeUtil.parseBlankToNull(params.get("sjhm")));
|
||||
convertParams.put("email", RecruitModeUtil.parseBlankToNull(params.get("dzyx")));
|
||||
convertParams.put("departmentid", RecruitModeUtil.parseBlankToNull(params.get("rzbm")));
|
||||
convertParams.put("managerid", RecruitModeUtil.parseBlankToNull(params.get("zjsj")));
|
||||
convertParams.put("jobtitle", RecruitModeUtil.parseBlankToNull(params.get("gw")));
|
||||
convertParams.put("password", RecruitModeUtil.parseBlankToNull(params.get("xtmm")));
|
||||
convertParams.put("loginid", RecruitModeUtil.parseBlankToNull(params.get("xtzh")));
|
||||
convertParams.put("status", RecruitModeUtil.parseBlankToNull(params.get("ygzt")));
|
||||
|
||||
// 个人信息
|
||||
convertParams.put("certificatenum", RecruitModeUtil.parseBlankToNull(params.get("sfzh")));
|
||||
|
||||
// 工作信息
|
||||
convertParams.put("companystartdate", RecruitModeUtil.parseBlankToNull(params.get("rzrq")));
|
||||
convertParams.put("probationenddate", RecruitModeUtil.parseBlankToNull(params.get("jhzzrq")));
|
||||
return convertParams;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,210 @@
|
|||
package com.engine.recruit.thread;
|
||||
|
||||
import cn.hutool.core.convert.Convert;
|
||||
import com.engine.recruit.conn.CheckRepeatResume;
|
||||
import com.engine.recruit.conn.PositionCommonInfo;
|
||||
import com.engine.recruit.conn.RecruitDataMap;
|
||||
import com.engine.recruit.enums.ApplicationStatusEnum;
|
||||
import com.engine.recruit.enums.CommonBrowserTypeEnum;
|
||||
import com.engine.recruit.enums.HighestDegreeEnum;
|
||||
import com.weaver.rpa.sdk.clients.application.resume.ERPAResumeSDKClient;
|
||||
import com.weaver.rpa.sdk.clients.core.ERPASDKClients;
|
||||
import com.weaver.util.threadPool.entity.LocalRunnable;
|
||||
import org.apache.commons.collections.CollectionUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import weaver.common.DateUtil;
|
||||
import weaver.conn.RecordSet;
|
||||
import weaver.erpa.apps.entity.application.resume.dto.*;
|
||||
import weaver.formmode.recruit.modeexpand.util.RecruitModeUtil;
|
||||
import weaver.hrm.User;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
/**
|
||||
* @author:dxfeng
|
||||
* @createTime: 2023/10/16
|
||||
* @version: 1.0
|
||||
*/
|
||||
public class SdkResumeSavedThread extends LocalRunnable {
|
||||
|
||||
private ResumeMqMessage resumeMqMessage;
|
||||
private static final int SEC_CATEGORY = Convert.toInt(RecruitModeUtil.getRecruitPropValue("APPLICANTS_RESUMES_CATEGORY"));
|
||||
|
||||
public SdkResumeSavedThread(ResumeMqMessage resumeMqMessage) {
|
||||
this.resumeMqMessage = resumeMqMessage;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void execute() throws Exception {
|
||||
parseResume(resumeMqMessage);
|
||||
}
|
||||
|
||||
/**
|
||||
* 解析建立,并入库
|
||||
*
|
||||
* @param resumeMqMessage
|
||||
* @throws Exception
|
||||
*/
|
||||
private void parseResume(ResumeMqMessage resumeMqMessage) throws Exception {
|
||||
String userId = resumeMqMessage.getUserId();
|
||||
User user = new User();
|
||||
if (StringUtils.isNotBlank(userId)) {
|
||||
user.setUid(Convert.toInt(userId));
|
||||
} else {
|
||||
user.setUid(1);
|
||||
}
|
||||
// 千里聆简历ID
|
||||
Long resumeId = resumeMqMessage.getResumeId();
|
||||
|
||||
ResumeInfoDto resumeInfoDto = resumeMqMessage.getResumeInfoDto();
|
||||
Map<String, Object> params = new RecruitDataMap<>();
|
||||
// 姓名
|
||||
params.put("xm", resumeInfoDto.getName());
|
||||
// 性别
|
||||
params.put("xb", resumeInfoDto.getSex());
|
||||
// 年龄
|
||||
params.put("nl", resumeInfoDto.getAge());
|
||||
// 工作经验
|
||||
params.put("gzjy", getCommonBrowserKey(getExperienceText(resumeInfoDto.getExperience()), CommonBrowserTypeEnum.WORK_EXPERIENCE.getDesc()));
|
||||
// 手机号码
|
||||
params.put("sjhm", resumeInfoDto.getPhone());
|
||||
// 电子邮箱
|
||||
params.put("dzyx", resumeInfoDto.getEmail());
|
||||
// 期望税前月薪
|
||||
params.put("qwsqyxk", resumeInfoDto.getExpectSalaryStart());
|
||||
// 最高学历
|
||||
params.put("zgxl", HighestDegreeEnum.getDegreeId(resumeInfoDto.getHighestDegree()).getId());
|
||||
// 原始简历
|
||||
params.put("ysjl", convertStreamToE9DocId(resumeMqMessage.getResumeInfoDto().getResumeFileId(), user));
|
||||
// 千里聆简历ID
|
||||
params.put("qlljl", resumeId);
|
||||
// 判断是否有发布职位信息,如有发布职位信息,完善招聘流程信息,并指定为待分配状态
|
||||
String positionId = PositionCommonInfo.getPositionIdByQll(resumeInfoDto.getJobId());
|
||||
if (StringUtils.isNotBlank(positionId)) {
|
||||
params.put("ypzw", "positionId");
|
||||
params.put("zplc", PositionCommonInfo.getRecruitFlowId(positionId));
|
||||
params.put("zt", ApplicationStatusEnum.CANDIDATE.getValue());
|
||||
} else {
|
||||
// 状态,指定待分配
|
||||
params.put("zt", ApplicationStatusEnum.DISTRIBUTION.getValue());
|
||||
}
|
||||
|
||||
// 判断简历是否重复,插入主表
|
||||
int mainId = new CheckRepeatResume().insertResumeMainTable(params);
|
||||
|
||||
Thread.sleep(1000);
|
||||
if (-1 == mainId) {
|
||||
return;
|
||||
}
|
||||
|
||||
RecordSet rs = new RecordSet();
|
||||
// 插入明细表数据
|
||||
List<ResumeInfoEducationExperienceDto> educationExperience = resumeInfoDto.getEducationExperience();
|
||||
String sql = "insert into uf_jcl_yppc_dt1 (mainId,xxmc,xl,zy,kssj,jssj) values (?,?,?,?,?,?) ";
|
||||
for (ResumeInfoEducationExperienceDto educationExperienceDto : educationExperience) {
|
||||
List<Object> data = new ArrayList<>();
|
||||
data.add(mainId);
|
||||
data.add(educationExperienceDto.getSchoolName());
|
||||
data.add(HighestDegreeEnum.getDegreeId(educationExperienceDto.getDegree()).getId());
|
||||
data.add(educationExperienceDto.getMajor());
|
||||
data.add(DateUtil.getDate(educationExperienceDto.getBeginTime()));
|
||||
data.add(DateUtil.getDate(educationExperienceDto.getEndTime()));
|
||||
rs.executeUpdate(sql, data);
|
||||
}
|
||||
sql = "insert into uf_jcl_yppc_dt2 (mainId,gsmc,gw,gzzz,kssj,jssj) values (?,?,?,?,?,?) ";
|
||||
List<ResumeInfoWorkExperienceDto> workExperience = resumeInfoDto.getWorkExperience();
|
||||
for (ResumeInfoWorkExperienceDto workExperienceDto : workExperience) {
|
||||
List<Object> data = new ArrayList<>();
|
||||
data.add(mainId);
|
||||
data.add(workExperienceDto.getCompanyName());
|
||||
data.add(workExperienceDto.getJobName());
|
||||
data.add(workExperienceDto.getContent());
|
||||
data.add(DateUtil.getDate(workExperienceDto.getBeginTime()));
|
||||
data.add(DateUtil.getDate(workExperienceDto.getEndTime()));
|
||||
rs.executeUpdate(sql, data);
|
||||
}
|
||||
sql = "insert into uf_jcl_yppc_dt3 (mainId,xmmc,xmms,kssj,jssj) values (?,?,?,?,?) ";
|
||||
List<ResumeInfoProjectExperienceDto> projectExperience = resumeInfoDto.getProjectExperience();
|
||||
for (ResumeInfoProjectExperienceDto projectExperienceDto : projectExperience) {
|
||||
List<Object> data = new ArrayList<>();
|
||||
data.add(mainId);
|
||||
data.add(projectExperienceDto.getProjectName());
|
||||
data.add(projectExperienceDto.getContent());
|
||||
data.add(DateUtil.getDate(projectExperienceDto.getBeginTime()));
|
||||
data.add(DateUtil.getDate(projectExperienceDto.getEndTime()));
|
||||
rs.executeUpdate(sql, data);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private String getCommonBrowserKey(String value, String commonBrowserType) {
|
||||
RecordSet rs = new RecordSet();
|
||||
rs.executeQuery("select id from uf_sjzd where zdlxmc = (select id from uf_zdlx where zdmc = ?) and xxnr =?", commonBrowserType, value);
|
||||
if (rs.next()) {
|
||||
return rs.getString("id");
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
private String getExperienceText(Integer experience) {
|
||||
String experienceText = "不限";
|
||||
switch (experience) {
|
||||
case -1:
|
||||
experienceText = "不限";
|
||||
break;
|
||||
case 1:
|
||||
experienceText = "1年以内";
|
||||
break;
|
||||
case 2:
|
||||
experienceText = "1-3年";
|
||||
break;
|
||||
case 3:
|
||||
experienceText = "3-5年";
|
||||
break;
|
||||
case 5:
|
||||
experienceText = "5-10年";
|
||||
break;
|
||||
case 6:
|
||||
experienceText = "10年以上";
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return experienceText;
|
||||
}
|
||||
|
||||
/**
|
||||
* 将文件流转换为文档ID
|
||||
*
|
||||
* @param resumeFileId
|
||||
* @param user
|
||||
* @return
|
||||
*/
|
||||
private String convertStreamToE9DocId(Long resumeFileId, User user) {
|
||||
List<Integer> docIdList = new ArrayList<>();
|
||||
ERPAResumeSDKClient client = ERPASDKClients.getResumeSDKClient();
|
||||
client.start();
|
||||
client.downloadResumeFile(resumeFileId, (fileName, stream) -> {
|
||||
try {
|
||||
int imageFileId = RecruitModeUtil.generateImageFileId(stream, fileName);
|
||||
docIdList.add(RecruitModeUtil.createDocId(SEC_CATEGORY, imageFileId, user));
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
});
|
||||
|
||||
return CollectionUtils.isNotEmpty(docIdList) ? Integer.toString(docIdList.get(0)) : "";
|
||||
}
|
||||
|
||||
|
||||
public ResumeMqMessage getResumeMqMessage() {
|
||||
return this.resumeMqMessage;
|
||||
}
|
||||
|
||||
public void setResumeMqMessage(ResumeMqMessage resumeMqMessage) {
|
||||
this.resumeMqMessage = resumeMqMessage;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
package com.engine.recruit.util;
|
||||
|
||||
/**
|
||||
* @author:dxfeng
|
||||
* @createTime: 2023/09/18
|
||||
* @version: 1.0
|
||||
*/
|
||||
public class ExceptionUtil {
|
||||
public static String getRealMessage(Throwable e) {
|
||||
while (e != null) {
|
||||
Throwable cause = e.getCause();
|
||||
if (cause == null) {
|
||||
return e.getMessage();
|
||||
}
|
||||
e = cause;
|
||||
}
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,81 @@
|
|||
package com.engine.recruit.util;
|
||||
|
||||
import com.engine.recruit.exception.CustomizeRunTimeException;
|
||||
import org.apache.commons.collections.CollectionUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import weaver.conn.RecordSet;
|
||||
import weaver.general.BaseBean;
|
||||
|
||||
import java.net.URLDecoder;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
/**
|
||||
* @author:dxfeng
|
||||
* @createTime: 2023/10/12
|
||||
* @version: 1.0
|
||||
*/
|
||||
public class RecruitFlowUtil {
|
||||
private static final Pattern URL_REG = Pattern.compile("\\$(.*?)\\$");
|
||||
|
||||
|
||||
/**
|
||||
* 解析url中参数信息
|
||||
*
|
||||
* @param urlString url地址
|
||||
* @return
|
||||
*/
|
||||
public static Map<String, String> parseURL(String urlString) {
|
||||
Map<String, String> params = new HashMap<>();
|
||||
try {
|
||||
if (StringUtils.isNotBlank(urlString)) {
|
||||
if (urlString.contains("?")) {
|
||||
urlString = urlString.split("\\?")[1];
|
||||
}
|
||||
String[] paramPairs = urlString.split("&");
|
||||
for (String paramPair : paramPairs) {
|
||||
String[] keyValue = paramPair.split("=");
|
||||
String key = URLDecoder.decode(keyValue[0], "UTF-8");
|
||||
String value = URLDecoder.decode(keyValue[1], "UTF-8");
|
||||
params.put(key, value);
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
new BaseBean().writeLog(e);
|
||||
throw new CustomizeRunTimeException(urlString + "解析失败");
|
||||
}
|
||||
|
||||
return params;
|
||||
}
|
||||
|
||||
/**
|
||||
* 替换URL中Id字段
|
||||
*
|
||||
* @param urlString
|
||||
* @param billId
|
||||
* @return
|
||||
*/
|
||||
public static String replaceURL(String urlString, String billId) {
|
||||
Matcher matcher = URL_REG.matcher(urlString);
|
||||
Set<String> matches = new HashSet<>();
|
||||
while (matcher.find()) {
|
||||
matches.add(matcher.group(1));
|
||||
}
|
||||
matches.remove("parentid");
|
||||
if (CollectionUtils.isNotEmpty(matches)) {
|
||||
String fields = StringUtils.join(matches, ",");
|
||||
RecordSet rs = new RecordSet();
|
||||
rs.executeQuery("select " + fields + " from uf_jcl_yppc where id = ? ", billId);
|
||||
if (rs.next()) {
|
||||
for (String match : matches) {
|
||||
urlString = urlString.replaceAll("\\$" + match + "\\$", rs.getString(match));
|
||||
}
|
||||
}
|
||||
}
|
||||
return urlString.replaceAll("\\$parentid\\$", billId);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,34 @@
|
|||
package com.engine.recruit.util;
|
||||
|
||||
import weaver.common.MessageUtil;
|
||||
import weaver.general.Util;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author:dxfeng
|
||||
* @createTime: 2023/10/13
|
||||
* @version: 1.0
|
||||
*/
|
||||
public class RecruitMessageUtils {
|
||||
public static boolean SendEmail(Map<String, Object> param) {
|
||||
String sendTo = Util.null2String(param.get("sendTo"));
|
||||
String emailTitle = Util.null2String(param.get("emailTitle"));
|
||||
String emailContent = Util.null2String(param.get("emailContent"));
|
||||
return SendEmail(sendTo, emailTitle, emailContent);
|
||||
}
|
||||
|
||||
public static boolean sendSMS(Map<String, Object> param) {
|
||||
String receiver = Util.null2String(param.get("receiver"));
|
||||
String content = Util.null2String(param.get("content"));
|
||||
return sendSMS(receiver, content);
|
||||
}
|
||||
|
||||
public static boolean SendEmail(String sendTo, String emailTitle, String emailContent) {
|
||||
return MessageUtil.sendEmail(sendTo, emailTitle, emailContent);
|
||||
}
|
||||
|
||||
public static boolean sendSMS(String receiver, String content) {
|
||||
return MessageUtil.sendSMS(receiver, content);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,187 @@
|
|||
package com.engine.recruit.util;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.alibaba.fastjson.serializer.SerializerFeature;
|
||||
import com.engine.core.exception.ECException;
|
||||
import com.engine.recruit.exception.CustomizeRunTimeException;
|
||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import weaver.general.BaseBean;
|
||||
import weaver.hrm.User;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.function.Consumer;
|
||||
import java.util.function.Function;
|
||||
import java.util.function.Supplier;
|
||||
|
||||
/**
|
||||
* @author:dxfeng
|
||||
* @createTime: 2023/09/18
|
||||
* @version: 1.0
|
||||
*/
|
||||
@Slf4j
|
||||
public class ResponseResult<T, R> {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private final User user;
|
||||
|
||||
private final BaseBean baseBean = new BaseBean();
|
||||
|
||||
private final Boolean isLog = "true".equals(baseBean.getPropValue("hrmSalary", "log"));
|
||||
|
||||
public ResponseResult(User user) {
|
||||
this.user = user;
|
||||
}
|
||||
|
||||
/**
|
||||
* 统一返回方法(自定义返回格式)
|
||||
*/
|
||||
public String customRun(Function<T, R> f, T t) {
|
||||
try {
|
||||
if (isLog) {
|
||||
log.info("run api , param {}", t);
|
||||
}
|
||||
return getJsonString(f.apply(t));
|
||||
} catch (CustomizeRunTimeException e) {
|
||||
log.error("api run fail", e);
|
||||
return Error(e.getMessage());
|
||||
} catch (ECException e) {
|
||||
log.error("api run fail", e);
|
||||
Throwable cause = e.getCause();
|
||||
return Error(cause.getMessage());
|
||||
} catch (Exception e) {
|
||||
log.error("api run fail", e);
|
||||
return Error("系统异常!");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 统一返回方法
|
||||
*/
|
||||
public String run(Function<T, R> f, T t) {
|
||||
try {
|
||||
if (isLog) {
|
||||
log.info("run api , param {}", t);
|
||||
}
|
||||
return Ok(f.apply(t));
|
||||
} catch (CustomizeRunTimeException e) {
|
||||
log.error("api run fail", e);
|
||||
return Error(e.getMessage());
|
||||
} catch (ECException e) {
|
||||
log.error("api run fail", e);
|
||||
Throwable cause = e.getCause();
|
||||
return Error(cause.getMessage());
|
||||
} catch (Exception e) {
|
||||
log.error("api run fail", e);
|
||||
return Error("系统异常!");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 统一返回方法(有参无返回)
|
||||
*/
|
||||
public String run(Consumer<T> f, T t) {
|
||||
try {
|
||||
if (isLog) {
|
||||
log.info("run api , param {}", t);
|
||||
}
|
||||
f.accept(t);
|
||||
return Ok();
|
||||
} catch (CustomizeRunTimeException e) {
|
||||
log.error("api run fail", e);
|
||||
return Error(e.getMessage());
|
||||
} catch (ECException e) {
|
||||
log.error("api run fail", e);
|
||||
return Error(ExceptionUtil.getRealMessage(e));
|
||||
} catch (Exception e) {
|
||||
log.error("api run fail", e);
|
||||
return Error("系统异常!", e);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 统一返回方法(无参有返回)
|
||||
*/
|
||||
public String run(Supplier<R> f) {
|
||||
try {
|
||||
if (isLog) {
|
||||
log.info("run api");
|
||||
}
|
||||
return Ok(f.get());
|
||||
} catch (CustomizeRunTimeException e) {
|
||||
log.error("api run fail", e);
|
||||
return Error(e.getMessage());
|
||||
} catch (ECException e) {
|
||||
log.error("api run fail", e);
|
||||
Throwable cause = e.getCause();
|
||||
return Error(cause.getMessage());
|
||||
} catch (Exception e) {
|
||||
log.error("api run fail", e);
|
||||
return Error("系统异常!", e);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private static String getJsonString(Object apidatas) {
|
||||
ObjectMapper mapper = new ObjectMapper();
|
||||
try {
|
||||
return mapper.writeValueAsString(apidatas);
|
||||
} catch (JsonProcessingException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 成功返回
|
||||
*/
|
||||
private String Ok() {
|
||||
Map<String, Object> apidatas = new HashMap<>();
|
||||
apidatas.put("api_status", true);
|
||||
return JSONObject.toJSONString(apidatas, SerializerFeature.DisableCircularReferenceDetect);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 成功返回
|
||||
*/
|
||||
private String Ok(R r) {
|
||||
Map<String, Object> apidatas = new HashMap<>();
|
||||
apidatas.put("api_status", true);
|
||||
apidatas.put("data", r);
|
||||
String success = getJsonString(apidatas);
|
||||
if (isLog) {
|
||||
log.info("run salary api success return {}", success);
|
||||
}
|
||||
return success;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 失败返回
|
||||
*/
|
||||
private static String Error(String message) {
|
||||
Map<String, Object> apidatas = new HashMap<>();
|
||||
apidatas.put("api_status", false);
|
||||
apidatas.put("errormsg", message);
|
||||
return JSONObject.toJSONString(apidatas, SerializerFeature.DisableCircularReferenceDetect);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 系统异常失败返回
|
||||
*/
|
||||
private static String Error(String message, Exception e) {
|
||||
Map<String, Object> apidatas = new HashMap<>();
|
||||
apidatas.put("api_status", false);
|
||||
apidatas.put("errormsg", message);
|
||||
apidatas.put("error", e.getMessage());
|
||||
return JSONObject.toJSONString(apidatas, SerializerFeature.DisableCircularReferenceDetect);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,44 @@
|
|||
package com.engine.recruit.wrapper;
|
||||
|
||||
import com.engine.common.util.ServiceUtil;
|
||||
import com.engine.core.impl.Service;
|
||||
import com.engine.recruit.service.ApplicantResumeService;
|
||||
import com.engine.recruit.service.impl.ApplicantResumeServiceImpl;
|
||||
import weaver.hrm.User;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author:dxfeng
|
||||
* @createTime: 2023/09/20
|
||||
* @version: 1.0
|
||||
*/
|
||||
public class ApplicantResumeWrapper extends Service {
|
||||
private ApplicantResumeService getApplicantResumeService(User user) {
|
||||
return ServiceUtil.getService(ApplicantResumeServiceImpl.class, user);
|
||||
}
|
||||
|
||||
public Map<String, Object> getApplicantsName(String ids) {
|
||||
return getApplicantResumeService(user).getApplicantsName(ids);
|
||||
}
|
||||
|
||||
public Map<String, Object> getInterviewInfoById(String id) {
|
||||
return getApplicantResumeService(user).getInterviewInfoById(id);
|
||||
}
|
||||
|
||||
public Map<String, Object> getDisplayLayoutId(Map<String, Object> params) {
|
||||
return getApplicantResumeService(user).getDisplayLayoutId(params);
|
||||
}
|
||||
|
||||
public Map<String, Object> getTabCount(Map<String, Object> params) {
|
||||
return getApplicantResumeService(user).getTabCount(params);
|
||||
}
|
||||
|
||||
public Map<String, Object> updateApplicantsInfo(Map<String, Object> params) {
|
||||
return getApplicantResumeService(user).updateApplicantsInfo(params);
|
||||
}
|
||||
|
||||
public Map<String, Object> fullOriginalResumeId(Map<String, Object> params) {
|
||||
return getApplicantResumeService(user).fullOriginalResumeId(params);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,37 @@
|
|||
package com.engine.recruit.wrapper;
|
||||
|
||||
import com.engine.common.util.ServiceUtil;
|
||||
import com.engine.core.impl.Service;
|
||||
import com.engine.recruit.entity.workbench.OptionVO;
|
||||
import com.engine.recruit.service.InductionManageService;
|
||||
import com.engine.recruit.service.impl.InductionManageServiceImpl;
|
||||
import weaver.hrm.User;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author:dxfeng
|
||||
* @createTime: 2023/10/23
|
||||
* @version: 1.0
|
||||
*/
|
||||
public class InductionManageWrapper extends Service {
|
||||
private InductionManageService getInductionManageService(User user) {
|
||||
return ServiceUtil.getService(InductionManageServiceImpl.class, user);
|
||||
}
|
||||
|
||||
public Map<String, Object> updateInductionManageInfo(Map<String, Object> param) {
|
||||
return getInductionManageService(user).updateInductionManageInfo(param);
|
||||
}
|
||||
|
||||
public Map<String, Object> sendCollectInfo(Map<String, Object> param) {
|
||||
return getInductionManageService(user).sendCollectInfo(param);
|
||||
}
|
||||
|
||||
public Map<String, Object> checkLoginInfo(Map<String, Object> param) {
|
||||
return getInductionManageService(user).checkLoginInfo(param);
|
||||
}
|
||||
|
||||
public Map<String, Object> infoSubmit(String id) {
|
||||
return getInductionManageService(user).infoSubmit(id);
|
||||
}
|
||||
}
|
||||
|
|
@ -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.MessageTemplateService;
|
||||
import com.engine.recruit.service.impl.MessageTemplateServiceImpl;
|
||||
import weaver.hrm.User;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author:dxfeng
|
||||
* @createTime: 2023/09/26
|
||||
* @version: 1.0
|
||||
*/
|
||||
public class MessageTemplateWrapper extends Service {
|
||||
private MessageTemplateService getMessageTemplateService(User user) {
|
||||
return ServiceUtil.getService(MessageTemplateServiceImpl.class, user);
|
||||
}
|
||||
|
||||
public Map<String, Object> getMessageContent(Map<String, Object> params) {
|
||||
return getMessageTemplateService(user).getMessageContent(params);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,43 @@
|
|||
package com.engine.recruit.wrapper;
|
||||
|
||||
|
||||
import com.engine.common.util.ServiceUtil;
|
||||
import com.engine.core.impl.Service;
|
||||
import com.engine.recruit.factory.RecruitButtonFactory;
|
||||
import com.engine.recruit.service.RecruitButtonService;
|
||||
import weaver.general.Util;
|
||||
import weaver.hrm.User;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* <p>聚才林招聘</p>
|
||||
*
|
||||
* @author:dxfeng
|
||||
* @createTime: 2023/09/18
|
||||
* @version: 1.0
|
||||
*/
|
||||
public class RecruitButtonWrapper extends Service {
|
||||
|
||||
/**
|
||||
* 根据类全路径,获取对应的实现类
|
||||
*
|
||||
* @param user 当前用户
|
||||
* @param classPath 类全路径
|
||||
* @return
|
||||
*/
|
||||
private RecruitButtonService getRecruitButtonService(User user, String classPath) {
|
||||
return ServiceUtil.getService(RecruitButtonFactory.getClass(classPath), user);
|
||||
}
|
||||
|
||||
/**
|
||||
* 执行对应实现类的方法
|
||||
*
|
||||
* @param params 参数集合
|
||||
*/
|
||||
public Map<String, Object> execute(Map<String, Object> params) {
|
||||
// 获取实现类全路径
|
||||
String buttonKey = Util.null2String(params.get("buttonKey"));
|
||||
return getRecruitButtonService(user, buttonKey).execute(params);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
package com.engine.recruit.wrapper;
|
||||
|
||||
import com.engine.common.util.ServiceUtil;
|
||||
import com.engine.core.impl.Service;
|
||||
import com.engine.recruit.service.RecruitFlowService;
|
||||
import com.engine.recruit.service.impl.RecruitFlowServiceImpl;
|
||||
import weaver.hrm.User;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author:dxfeng
|
||||
* @createTime: 2023/09/20
|
||||
* @version: 1.0
|
||||
*/
|
||||
public class RecruitFlowWrapper extends Service {
|
||||
private RecruitFlowService getRecruitFlowService(User user) {
|
||||
return ServiceUtil.getService(RecruitFlowServiceImpl.class, user);
|
||||
}
|
||||
|
||||
public Map<String, Object> getButtonList(Map<String, Object> param) {
|
||||
return getRecruitFlowService(user).getButtonList(param);
|
||||
}
|
||||
|
||||
public Map<String, Object> getRecruitStepList(Map<String, Object> param) {
|
||||
return getRecruitFlowService(user).getRecruitStepList(param);
|
||||
}
|
||||
}
|
||||
|
|
@ -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.RecruitPositionService;
|
||||
import com.engine.recruit.service.impl.RecruitPositionServiceImpl;
|
||||
import weaver.hrm.User;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author:dxfeng
|
||||
* @createTime: 2023/10/09
|
||||
* @version: 1.0
|
||||
*/
|
||||
public class RecruitPositionWrapper extends Service {
|
||||
private RecruitPositionService getRecruitPositionService(User user) {
|
||||
return ServiceUtil.getService(RecruitPositionServiceImpl.class, user);
|
||||
}
|
||||
|
||||
public Map<String, Object> updatePostInfo(Map<String, Object> param) {
|
||||
return getRecruitPositionService(user).updatePostInfo(param);
|
||||
}
|
||||
}
|
||||
|
|
@ -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.RpaJclService;
|
||||
import com.engine.recruit.service.impl.RpaJclServiceImpl;
|
||||
import weaver.hrm.User;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author:dxfeng
|
||||
* @createTime: 2023/10/27
|
||||
* @version: 1.0
|
||||
*/
|
||||
public class RpaJclWrapper extends Service {
|
||||
private RpaJclService getRpaJclService(User user) {
|
||||
return ServiceUtil.getService(RpaJclServiceImpl.class, user);
|
||||
}
|
||||
|
||||
public Map<String, Object> setEmailSetting(Map<String, Object> param) {
|
||||
return getRpaJclService(user).setEmailSetting(param);
|
||||
}
|
||||
}
|
||||
|
|
@ -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.TalentPoolService;
|
||||
import com.engine.recruit.service.impl.TalentPoolServiceImpl;
|
||||
import weaver.hrm.User;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author:dxfeng
|
||||
* @createTime: 2023/10/20
|
||||
* @version: 1.0
|
||||
*/
|
||||
public class TalentPoolWrapper extends Service {
|
||||
private TalentPoolService getTalentPoolService(User user) {
|
||||
return ServiceUtil.getService(TalentPoolServiceImpl.class, user);
|
||||
}
|
||||
|
||||
public Map<String, Object> removeBlacklist(Map<String, Object> param) {
|
||||
return getTalentPoolService(user).removeBlacklist(param);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,41 +0,0 @@
|
|||
package com.weaver.seconddev.feishu.controller;
|
||||
|
||||
import com.weaver.common.authority.annotation.WeaPermission;
|
||||
import com.weaver.seconddev.feishu.service.EmployeePanelService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author:dxfeng
|
||||
* @createTime: 2025/07/15
|
||||
* @version: 1.0
|
||||
*/
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/api/secondev/panel/employee")
|
||||
@WeaPermission(publicPermission = true)
|
||||
public class EmployeePanelController {
|
||||
|
||||
@Autowired
|
||||
EmployeePanelService employeePanelService;
|
||||
|
||||
@GetMapping("/getAttendInfo")
|
||||
public Object getAttendInfo(@RequestParam("beginDate") String beginDate,
|
||||
@RequestParam("endDate") String endDate,
|
||||
@RequestParam("jobNum") String jobNum) {
|
||||
log.error("beginDate:{},endDate:{},jobNum:{}", beginDate, endDate, jobNum);
|
||||
Map<String, Object> params = new HashMap<>();
|
||||
params.put("beginDate", beginDate);
|
||||
params.put("endDate", endDate);
|
||||
params.put("jobNum", jobNum);
|
||||
return employeePanelService.getAttendInfo(params);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,41 +0,0 @@
|
|||
package com.weaver.seconddev.feishu.controller;
|
||||
|
||||
import com.weaver.common.authority.annotation.WeaPermission;
|
||||
import com.weaver.seconddev.feishu.service.EmployeePanelService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author:dxfeng
|
||||
* @createTime: 2025/07/15
|
||||
* @version: 1.0
|
||||
*/
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/sapi/secondev/panel/employee")
|
||||
@WeaPermission(publicPermission = true)
|
||||
public class OutEmployeePanelController {
|
||||
|
||||
@Autowired
|
||||
EmployeePanelService employeePanelService;
|
||||
|
||||
@GetMapping("/getAttendInfo")
|
||||
public Object getAttendInfo(@RequestParam("beginDate") String beginDate,
|
||||
@RequestParam("endDate") String endDate,
|
||||
@RequestParam("jobNum") String jobNum) {
|
||||
log.error("beginDate:{},endDate:{},jobNum:{}", beginDate, endDate, jobNum);
|
||||
Map<String, Object> params = new HashMap<>();
|
||||
params.put("beginDate", beginDate);
|
||||
params.put("endDate", endDate);
|
||||
params.put("jobNum", jobNum);
|
||||
return employeePanelService.getAttendInfo(params);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,26 +0,0 @@
|
|||
package com.weaver.seconddev.feishu.entity.po;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author:dxfeng
|
||||
* @createTime: 2025/07/15
|
||||
* @version: 1.0
|
||||
*/
|
||||
@Data
|
||||
public class EmployeeAttendInfoPo {
|
||||
|
||||
/**
|
||||
* 工号
|
||||
*/
|
||||
private String workCode;
|
||||
|
||||
/**
|
||||
* 应出勤天数
|
||||
*/
|
||||
private String expectedAttendance;
|
||||
/**
|
||||
* 实际出勤
|
||||
*/
|
||||
private String actualAttendance;
|
||||
}
|
||||
|
|
@ -1,25 +0,0 @@
|
|||
package com.weaver.seconddev.feishu.mapper;
|
||||
|
||||
import com.weaver.seconddev.portal.entity.param.BaseParam;
|
||||
import org.apache.ibatis.annotations.MapKey;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author:dxfeng
|
||||
* @createTime: 2025/07/15
|
||||
* @version: 1.0
|
||||
*/
|
||||
@Mapper
|
||||
public interface EmployeePanelMapper {
|
||||
|
||||
@MapKey("employee")
|
||||
Map<BigDecimal, Map<String, Object>> statsWorkTimeLength(@Param("param") BaseParam param, @Param(value = "empIds") List<Long> empIds, @Param(value = "beginDate") Date beginDate, @Param(value = "endDate") Date endDate,
|
||||
@Param(value = "tenantKey") String tenantKey, @Param("extraAbsenteeism") boolean extraAbsenteeism, @Param("hasDetailExtend") boolean hasDetailExtend);
|
||||
|
||||
}
|
||||
|
|
@ -1,22 +0,0 @@
|
|||
package com.weaver.seconddev.feishu.service;
|
||||
|
||||
import com.weaver.common.base.entity.result.WeaResult;
|
||||
import com.weaver.seconddev.feishu.entity.po.EmployeeAttendInfoPo;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author:dxfeng
|
||||
* @createTime: 2025/07/15
|
||||
* @version: 1.0
|
||||
*/
|
||||
public interface EmployeePanelService {
|
||||
|
||||
/**
|
||||
* 获取考勤信息
|
||||
*
|
||||
* @param params
|
||||
* @return
|
||||
*/
|
||||
WeaResult<EmployeeAttendInfoPo> getAttendInfo(Map<String, Object> params);
|
||||
}
|
||||
|
|
@ -1,114 +0,0 @@
|
|||
package com.weaver.seconddev.feishu.service.impl;
|
||||
|
||||
import com.weaver.common.base.entity.result.WeaResult;
|
||||
import com.weaver.common.hr.util.Util;
|
||||
import com.weaver.seconddev.feishu.entity.po.EmployeeAttendInfoPo;
|
||||
import com.weaver.seconddev.feishu.mapper.EmployeePanelMapper;
|
||||
import com.weaver.seconddev.feishu.service.EmployeePanelService;
|
||||
import com.weaver.seconddev.portal.entity.param.BaseParam;
|
||||
import com.weaver.workflow.common.cfg.org.service.UserService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.math.RoundingMode;
|
||||
import java.time.LocalDate;
|
||||
import java.time.ZoneId;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author:dxfeng
|
||||
* @createTime: 2025/07/15
|
||||
* @version: 1.0
|
||||
*/
|
||||
@Slf4j
|
||||
@Service
|
||||
public class EmployeePanelServiceImpl implements EmployeePanelService {
|
||||
|
||||
@Autowired
|
||||
EmployeePanelMapper employeePanelMapper;
|
||||
|
||||
@Autowired
|
||||
UserService userService;
|
||||
|
||||
@Override
|
||||
public WeaResult<EmployeeAttendInfoPo> getAttendInfo(Map<String, Object> params) {
|
||||
String jobNum = Util.null2String(params.get("jobNum"));
|
||||
String beginDateStr = Util.null2String(params.get("beginDate"));
|
||||
String endDateStr = Util.null2String(params.get("endDate"));
|
||||
BaseParam baseParam = new BaseParam();
|
||||
|
||||
List<Long> userIdsByJobNum = userService.getUserIdsByJobNum(jobNum, baseParam.getTenantKey());
|
||||
if (CollectionUtils.isEmpty(userIdsByJobNum)) {
|
||||
return WeaResult.fail("未匹配到人员", true);
|
||||
}
|
||||
Long employeeId = userIdsByJobNum.get(0);
|
||||
//
|
||||
List<Long> empIds = new ArrayList<>();
|
||||
empIds.add(employeeId);
|
||||
|
||||
Date beginDate = parseDate(beginDateStr);
|
||||
Date endDate = parseDate(endDateStr);
|
||||
|
||||
Map<BigDecimal, Map<String, Object>> mapMap = employeePanelMapper.statsWorkTimeLength(baseParam, empIds, beginDate, endDate, baseParam.getTenantKey(), false, false);
|
||||
Map<String, Object> map = mapMap.get(BigDecimal.valueOf(employeeId));
|
||||
log.error("map===>{}", map);
|
||||
|
||||
EmployeeAttendInfoPo employeeAttendInfoPo = new EmployeeAttendInfoPo();
|
||||
employeeAttendInfoPo.setExpectedAttendance(formatNumber(map.get("period_length_day").toString()));
|
||||
employeeAttendInfoPo.setActualAttendance(formatNumber(map.get("work_length_day").toString()));
|
||||
return WeaResult.success(employeeAttendInfoPo);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 日期类型转换
|
||||
*
|
||||
* @param dateStr
|
||||
* @return
|
||||
*/
|
||||
private Date parseDate(String dateStr) {
|
||||
if (dateStr == null) {
|
||||
return null;
|
||||
}
|
||||
// 定义日期格式
|
||||
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
|
||||
|
||||
// 将字符串解析为LocalDate
|
||||
LocalDate localDate = LocalDate.parse(dateStr, formatter);
|
||||
|
||||
// 将LocalDate转换为java.util.Date
|
||||
return Date.from(localDate.atStartOfDay(ZoneId.systemDefault()).toInstant());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 格式化数字
|
||||
*
|
||||
* @param numberStr
|
||||
* @return
|
||||
*/
|
||||
public static String formatNumber(String numberStr) {
|
||||
if (numberStr == null || numberStr.isEmpty()) {
|
||||
return numberStr;
|
||||
}
|
||||
|
||||
BigDecimal bd = new BigDecimal(numberStr);
|
||||
// 向上取整,最多保留两位小数
|
||||
bd = bd.setScale(2, RoundingMode.HALF_UP);
|
||||
String formatted = bd.stripTrailingZeros().toPlainString();
|
||||
|
||||
// 如果结果为整数,则去掉小数点
|
||||
if (formatted.contains(".") && formatted.substring(formatted.indexOf('.') + 1).matches("0+")) {
|
||||
return formatted.substring(0, formatted.indexOf('.'));
|
||||
}
|
||||
|
||||
return formatted;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,186 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.weaver.seconddev.feishu.mapper.EmployeePanelMapper">
|
||||
|
||||
<sql id="lostAbsenteeismLengthHourSql">
|
||||
SUM(CASE DAY_TYPE WHEN 'WORK' THEN
|
||||
CASE WHEN FINAL_SIGN_IN_STATUS='SIGN_IN_ABSENCE' THEN
|
||||
ABSENCE_LENGTH_MSEC-IFNULL(abs.ABSENTEEISM_LENGTH_MESC,0)-IFNULL(EARLY_OUT_LENGTH_MESC,0) -
|
||||
IFNULL(SERIOUS_EARLY_LENGTH_MESC, 0)
|
||||
WHEN SIGN_IN_RECORD IS NOT NULL THEN
|
||||
CASE FINAL_SIGN_OUT_STATUS WHEN 'SIGN_OUT_ABSENCE' THEN
|
||||
ABSENCE_LENGTH_MSEC-IFNULL(abs.ABSENTEEISM_LENGTH_MESC,0)-IFNULL(LATE_LENGTH_MESC,0)
|
||||
-IFNULL(SERIOUS_LATE_LENGTH_MESC,0) ELSE 0 END
|
||||
ELSE 0 END
|
||||
ELSE 0 END)*1.00/3600000 AS lost_length_hour
|
||||
</sql>
|
||||
|
||||
<sql id="lostAbsenteeismLengthDaySql">
|
||||
SUM(CASE DAY_TYPE WHEN 'WORK' THEN
|
||||
CASE WHEN FINAL_SIGN_IN_STATUS='SIGN_IN_ABSENCE' THEN
|
||||
ABSENCE_LENGTH_DAY-IFNULL(abs.ABSENTEEISM_LENGTH_DAY,0)-IFNULL(EARLY_OUT_LENGTH_DAY,0)-IFNULL(SERIOUS_EARLY_LENGTH_DAY,0)
|
||||
WHEN SIGN_IN_RECORD IS NOT NULL THEN
|
||||
CASE FINAL_SIGN_OUT_STATUS WHEN 'SIGN_OUT_ABSENCE' THEN
|
||||
ABSENCE_LENGTH_DAY-IFNULL(abs.ABSENTEEISM_LENGTH_DAY,0)-IFNULL(LATE_LENGTH_DAY,0)-IFNULL(SERIOUS_LATE_LENGTH_DAY,0)
|
||||
ELSE 0 END
|
||||
ELSE 0 END
|
||||
ELSE 0 END) AS lost_length_day
|
||||
</sql>
|
||||
|
||||
<sql id="lostLengthHourSql">
|
||||
SUM(CASE DAY_TYPE WHEN 'WORK' THEN
|
||||
CASE WHEN FINAL_SIGN_IN_STATUS='SIGN_IN_ABSENCE' THEN
|
||||
ABSENCE_LENGTH_MSEC-IFNULL(AAD.ABSENTEEISM_LENGTH_MESC,0)-IFNULL(EARLY_OUT_LENGTH_MESC,0) -
|
||||
IFNULL(SERIOUS_EARLY_LENGTH_MESC, 0)
|
||||
WHEN SIGN_IN_RECORD IS NOT NULL THEN
|
||||
CASE FINAL_SIGN_OUT_STATUS WHEN 'SIGN_OUT_ABSENCE' THEN
|
||||
ABSENCE_LENGTH_MSEC-IFNULL(AAD.ABSENTEEISM_LENGTH_MESC,0)-IFNULL(LATE_LENGTH_MESC,0)
|
||||
-IFNULL(SERIOUS_LATE_LENGTH_MESC,0) ELSE 0 END
|
||||
ELSE 0 END
|
||||
ELSE 0 END)*1.00/3600000 AS lost_length_hour
|
||||
</sql>
|
||||
|
||||
<sql id="lateEarlyCountLengthSql">
|
||||
sum(case when month_late_length_mesc = 1 then 1 else 0 end) AS month_late_in_count,
|
||||
sum(case when month_late_length_mesc = 1 then AAD.LATE_LENGTH_MESC else 0 end)*1.00/3600000 AS
|
||||
month_late_in_hour,
|
||||
sum(case when month_late_length_mesc = 1 then AAD.LATE_LENGTH_DAY else 0 end) AS month_late_in_day,
|
||||
sum(case when month_late_length_mesc = 2 then 1 else 0 end) AS month_late_out_count,
|
||||
sum(case when month_late_length_mesc = 2 then AAD.LATE_LENGTH_MESC else 0 end)*1.00/3600000 AS
|
||||
month_late_out_hour,
|
||||
sum(case when month_late_length_mesc = 2 then AAD.LATE_LENGTH_DAY else 0 end) AS month_late_out_day,
|
||||
sum(case when month_early_length_mesc = 1 then 1 else 0 end) AS month_early_in_count,
|
||||
sum(case when month_early_length_mesc = 1 then AAD.EARLY_OUT_LENGTH_MESC else 0 end)*1.00/3600000 AS
|
||||
month_early_in_hour,
|
||||
sum(case when month_early_length_mesc = 1 then AAD.EARLY_OUT_LENGTH_DAY else 0 end) AS month_early_in_day,
|
||||
sum(case when month_early_length_mesc = 2 then 1 else 0 end) AS month_early_out_count,
|
||||
sum(case when month_early_length_mesc = 2 then AAD.EARLY_OUT_LENGTH_MESC else 0 end)*1.00/3600000 AS
|
||||
month_early_out_hour,
|
||||
sum(case when month_early_length_mesc = 2 then AAD.EARLY_OUT_LENGTH_DAY else 0 end) AS month_early_out_day
|
||||
</sql>
|
||||
|
||||
<sql id="lostLengthDaySql">
|
||||
SUM(CASE DAY_TYPE WHEN 'WORK' THEN
|
||||
CASE WHEN FINAL_SIGN_IN_STATUS='SIGN_IN_ABSENCE' THEN
|
||||
ABSENCE_LENGTH_DAY-IFNULL(AAD.ABSENTEEISM_LENGTH_DAY,0)-IFNULL(EARLY_OUT_LENGTH_DAY,0)-IFNULL(SERIOUS_EARLY_LENGTH_DAY,0)
|
||||
WHEN SIGN_IN_RECORD IS NOT NULL THEN
|
||||
CASE FINAL_SIGN_OUT_STATUS WHEN 'SIGN_OUT_ABSENCE' THEN
|
||||
ABSENCE_LENGTH_DAY-IFNULL(AAD.ABSENTEEISM_LENGTH_DAY,0)-IFNULL(LATE_LENGTH_DAY,0)-IFNULL(SERIOUS_LATE_LENGTH_DAY,0)
|
||||
ELSE 0 END
|
||||
ELSE 0 END
|
||||
ELSE 0 END) AS lost_length_day
|
||||
</sql>
|
||||
<select id="statsWorkTimeLength" resultType="java.util.Map">
|
||||
SELECT
|
||||
ASD.employee,
|
||||
COUNT(CASE WHEN SIGN_IN_RECORD IS NOT NULL THEN 1 END) AS sign_in_num,
|
||||
COUNT(CASE FINAL_SIGN_IN_STATUS WHEN 'SIGN_IN_LATE' THEN 1 END) AS late_num,
|
||||
COUNT(CASE WHEN SIGN_OUT_RECORD IS NOT NULL THEN 1 END) AS sign_out_num,
|
||||
COUNT(CASE FINAL_SIGN_OUT_STATUS WHEN 'SIGN_OUT_EARLY' THEN 1 END) AS early_num,
|
||||
COUNT(CASE FINAL_SIGN_IN_STATUS WHEN 'SERIOUSLY_LATE' THEN 1 END) AS seriously_late_num,
|
||||
COUNT(CASE FINAL_SIGN_OUT_STATUS WHEN 'SERIOUSLY_EARLY' THEN 1 END) AS seriously_early_num,
|
||||
<choose>
|
||||
<when test="extraAbsenteeism == true">
|
||||
COUNT(CASE WHEN abs.sign_in_absenteeism_status is not null AND (abs.sign_in_absenteeism_status !=
|
||||
'SIGN_IN_NORMAL') THEN 1 END) AS absent_num_of_sign_in,
|
||||
sum(abs.month_absent_countous) AS month_absent_countous,
|
||||
</when>
|
||||
<otherwise>
|
||||
COUNT(CASE FINAL_SIGN_IN_STATUS WHEN 'SIGN_IN_ABSENTEEISM' THEN 1 END) AS absent_num_of_sign_in,
|
||||
</otherwise>
|
||||
</choose>
|
||||
<choose>
|
||||
<when test="extraAbsenteeism == true">
|
||||
COUNT(CASE WHEN abs.sign_out_absenteeism_status is not null AND (abs.sign_out_absenteeism_status !=
|
||||
'SIGN_OUT_NORMAL') AND (SIGN_IN_RECORD IS NOT NULL OR SIGN_OUT_RECORD IS NOT NULL) THEN 1 END) AS
|
||||
absent_num_of_sign_out,
|
||||
</when>
|
||||
<otherwise>
|
||||
COUNT(CASE WHEN FINAL_SIGN_OUT_STATUS = 'SIGN_OUT_ABSENTEEISM' AND SIGN_IN_RECORD IS NOT NULL THEN 1
|
||||
END) AS absent_num_of_sign_out,
|
||||
</otherwise>
|
||||
</choose>
|
||||
SUM(CASE DAY_TYPE WHEN 'WORK' THEN PERIOD_LENGTH_MSEC ELSE 0 END)*1.00/3600000 AS period_length_hour,
|
||||
SUM(CASE DAY_TYPE WHEN 'WORK' THEN PERIOD_LENGTH_DAY ELSE 0 END) AS period_length_day,
|
||||
SUM(CASE DAY_TYPE WHEN 'WORK' THEN WORK_LENGTH_MSEC ELSE 0 END)*1.00/3600000 AS work_length_hour,
|
||||
SUM(CASE DAY_TYPE WHEN 'WORK' THEN WORK_LENGTH_DAY ELSE 0 END) AS work_length_day,
|
||||
SUM(CASE DAY_TYPE WHEN 'HOLIDAY' THEN WORK_LENGTH_MSEC ELSE 0 END)*1.00/3600000 AS holiday_work_length_hour,
|
||||
SUM(CASE DAY_TYPE WHEN 'HOLIDAY' THEN WORK_LENGTH_DAY ELSE 0 END) AS holiday_work_length_day,
|
||||
SUM(CASE DAY_TYPE WHEN 'WORK' THEN ACTUAL_WORK_LENGTH_MSEC ELSE 0 END)*1.00/3600000 AS actual_work_length_hour,
|
||||
SUM(CASE DAY_TYPE WHEN 'WORK' THEN ACTUAL_WORK_LENGTH_DAY ELSE 0 END) AS actual_work_length_day,
|
||||
SUM(CASE DAY_TYPE WHEN 'WORK' THEN ABSENCE_LENGTH_MSEC ELSE 0 END)*1.00/3600000 AS absence_length_hour,
|
||||
SUM(CASE DAY_TYPE WHEN 'WORK' THEN ABSENCE_LENGTH_DAY ELSE 0 END) AS absence_length_day,
|
||||
SUM(CASE DAY_TYPE WHEN 'WORK' THEN LATE_LENGTH_MESC ELSE 0 END)*1.00/3600000 AS late_length_hour,
|
||||
SUM(CASE DAY_TYPE WHEN 'WORK' THEN LATE_LENGTH_DAY ELSE 0 END) AS late_length_day,
|
||||
SUM(CASE DAY_TYPE WHEN 'WORK' THEN SERIOUS_LATE_LENGTH_MESC ELSE 0 END)*1.00/3600000 AS
|
||||
seriously_late_length_hour,
|
||||
SUM(CASE DAY_TYPE WHEN 'WORK' THEN SERIOUS_LATE_LENGTH_DAY ELSE 0 END) AS seriously_late_length_day,
|
||||
SUM(CASE DAY_TYPE WHEN 'WORK' THEN EARLY_OUT_LENGTH_MESC ELSE 0 END)*1.00/3600000 AS early_out_length_hour,
|
||||
SUM(CASE DAY_TYPE WHEN 'WORK' THEN EARLY_OUT_LENGTH_DAY ELSE 0 END) AS early_out_length_day,
|
||||
SUM(CASE DAY_TYPE WHEN 'WORK' THEN SERIOUS_EARLY_LENGTH_MESC ELSE 0 END)*1.00/3600000 AS
|
||||
seriously_early_length_hour,
|
||||
SUM(CASE DAY_TYPE WHEN 'WORK' THEN SERIOUS_EARLY_LENGTH_DAY ELSE 0 END) AS seriously_early_length_day,
|
||||
<choose>
|
||||
<when test="extraAbsenteeism == true">
|
||||
SUM(CASE DAY_TYPE WHEN 'WORK' THEN abs.ABSENTEEISM_LENGTH_MESC ELSE 0 END)*1.00/3600000 AS
|
||||
absenteeism_length_hour,
|
||||
</when>
|
||||
<otherwise>
|
||||
SUM(CASE DAY_TYPE WHEN 'WORK' THEN AAD.ABSENTEEISM_LENGTH_MESC ELSE 0 END)*1.00/3600000 AS
|
||||
absenteeism_length_hour,
|
||||
</otherwise>
|
||||
</choose>
|
||||
<choose>
|
||||
<when test="extraAbsenteeism == true">
|
||||
SUM(CASE DAY_TYPE WHEN 'WORK' THEN abs.ABSENTEEISM_LENGTH_DAY ELSE 0 END) AS absenteeism_length_day,
|
||||
</when>
|
||||
<otherwise>
|
||||
SUM(CASE DAY_TYPE WHEN 'WORK' THEN AAD.ABSENTEEISM_LENGTH_DAY ELSE 0 END) AS absenteeism_length_day,
|
||||
</otherwise>
|
||||
</choose>
|
||||
<choose>
|
||||
<when test="extraAbsenteeism == true">
|
||||
<include refid="lostAbsenteeismLengthHourSql"/>,
|
||||
<include refid="lostAbsenteeismLengthDaySql"/>,
|
||||
</when>
|
||||
<otherwise>
|
||||
<include refid="lostLengthHourSql"/>,
|
||||
<include refid="lostLengthDaySql"/>,
|
||||
</otherwise>
|
||||
</choose>
|
||||
<include refid="lateEarlyCountLengthSql"/>,
|
||||
<if test="hasDetailExtend == true">
|
||||
SUM(ADE.salary_length_day) as salary_length_day,
|
||||
SUM(ADE.salary_length_mesc)*1.00/3600000 as salary_length_hour,
|
||||
SUM(ADE.meal_length_day) as meal_length_day,
|
||||
SUM(ADE.meal_length_mesc)*1.00/3600000 as meal_length_hour,
|
||||
SUM(ADE.out_sign_length_day) as out_sign_length_day,
|
||||
SUM(ADE.out_sign_length_mesc)*1.00/3600000 as out_sign_length_hour,
|
||||
COUNT(CASE WHEN ADE.osign_in_record is not null THEN 1 END) as osign_in_num,
|
||||
COUNT(CASE WHEN ADE.osign_out_record is not null THEN 1 END) as osign_out_num,
|
||||
</if>
|
||||
COUNT(CASE WHEN FINAL_SIGN_IN_STATUS = 'SIGN_IN_ABSENCE' AND SIGN_OUT_RECORD IS NOT NULL THEN 1 END) AS
|
||||
un_sign_in_num,
|
||||
COUNT(CASE WHEN FINAL_SIGN_OUT_STATUS = 'SIGN_OUT_ABSENCE' AND SIGN_IN_RECORD IS NOT NULL THEN 1 END) AS
|
||||
un_sign_out_num,
|
||||
COUNT(CASE WHEN FINAL_SIGN_IN_STATUS = 'SIGN_IN_ABSENCE' AND SIGN_OUT_RECORD IS NULL THEN 1 END) AS un_sign_num
|
||||
FROM ${param.e10_other_business}.ATTEND_STATUS_DETAIL ASD
|
||||
LEFT JOIN ${param.e10_other_business}.attend_absence_detail AAD ON ASD.ID = AAD.ID and
|
||||
ASD.delete_type=AAD.delete_type
|
||||
<if test="extraAbsenteeism == true">
|
||||
LEFT JOIN ${param.e10_other_business}.attend_absenteeism_detail abs on abs.id = ASD.id and abs.delete_type=0
|
||||
</if>
|
||||
<if test="hasDetailExtend == true">
|
||||
LEFT JOIN ${param.e10_other_business}.attend_status_detail_extend ADE on ADE.id = ASD.id
|
||||
</if>
|
||||
WHERE ASD.TENANT_KEY = #{tenantKey} AND ASD.ATTEND_DATE BETWEEN #{beginDate} AND #{endDate} and
|
||||
ASD.delete_type=0
|
||||
<if test="empIds != null">
|
||||
AND ASD.EMPLOYEE IN
|
||||
<foreach collection="empIds" item="empId" index="index" separator="," open="(" close=")">#{empId}</foreach>
|
||||
</if>
|
||||
GROUP BY ASD.EMPLOYEE
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
package weaver.formmode.recruit.browser;
|
||||
|
||||
import weaver.formmode.customjavacode.AbstractCustomSqlConditionJavaCode;
|
||||
import weaver.hrm.User;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author:dxfeng
|
||||
* @createTime: 2023/10/18
|
||||
* @version: 1.0
|
||||
*/
|
||||
public class RecruitStageBrowser extends AbstractCustomSqlConditionJavaCode {
|
||||
@Override
|
||||
public String generateSqlCondition(Map<String, Object> param) throws Exception {
|
||||
User user = (User)param.get("user");
|
||||
Object extensionParam = param.get("extensionParam");//其他参数
|
||||
HashMap<String,Object> extensionMap = (HashMap<String,Object>)extensionParam;
|
||||
|
||||
//获取参数示例 "min" 只是示例 需要根据自己传入的参数名获取
|
||||
//String min = (String)extensionMap.get("min");
|
||||
|
||||
String sqlCondition = "";
|
||||
|
||||
return sqlCondition;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,32 @@
|
|||
package weaver.formmode.recruit.modeexpand;
|
||||
|
||||
import com.engine.common.util.ServiceUtil;
|
||||
import com.engine.recruit.service.WorkPlanSerivice;
|
||||
import com.engine.recruit.service.impl.WorkPlanServiceImpl;
|
||||
import weaver.formmode.customjavacode.AbstractModeExpandJavaCodeNew;
|
||||
import weaver.hrm.User;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @Author liang.cheng
|
||||
* @Date 2023/10/18 11:18 AM
|
||||
* @Description: 保存并新建触发日程
|
||||
* @Version 1.0
|
||||
*/
|
||||
public class CreateWorkPlanModeExpand extends AbstractModeExpandJavaCodeNew {
|
||||
|
||||
public WorkPlanSerivice getWorkPlan(User user) {
|
||||
return ServiceUtil.getService(WorkPlanServiceImpl.class, user);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, String> doModeExpand(Map<String, Object> map) {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,134 @@
|
|||
package weaver.formmode.recruit.modeexpand.applicant;
|
||||
|
||||
import com.engine.recruit.enums.ApplicantOperateEnum;
|
||||
import com.engine.recruit.enums.CurrentApplicationStageEnum;
|
||||
import com.engine.recruit.enums.InterviewOperateTypeEnum;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import weaver.formmode.customjavacode.AbstractModeExpandJavaCodeNew;
|
||||
import weaver.general.Util;
|
||||
import weaver.hrm.User;
|
||||
import weaver.soa.workflow.request.MainTableInfo;
|
||||
import weaver.soa.workflow.request.Property;
|
||||
import weaver.soa.workflow.request.RequestInfo;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author:dxfeng
|
||||
* @createTime: 2023/09/28
|
||||
* @version: 1.0
|
||||
*/
|
||||
public class UpdateApplicantModeExpand extends AbstractModeExpandJavaCodeNew {
|
||||
@Override
|
||||
public Map<String, String> doModeExpand(Map<String, Object> params) {
|
||||
Map<String, String> result = new HashMap<>();
|
||||
try {
|
||||
//数据id
|
||||
int billId;
|
||||
//模块id
|
||||
int modeId;
|
||||
RequestInfo requestInfo = (RequestInfo) params.get("RequestInfo");
|
||||
User user = (User) params.get("user");
|
||||
if (requestInfo != null) {
|
||||
billId = Util.getIntValue(requestInfo.getRequestid());
|
||||
modeId = Util.getIntValue(requestInfo.getWorkflowid());
|
||||
if (billId > 0 && modeId > 0) {
|
||||
MainTableInfo mainTableInfo = requestInfo.getMainTableInfo();
|
||||
Property[] properties = mainTableInfo.getProperty();
|
||||
Map<String, Object> mainDataMap = new HashMap<>(16);
|
||||
for (Property property : properties) {
|
||||
mainDataMap.put(property.getName(), property.getValue());
|
||||
}
|
||||
|
||||
String operateType = Util.null2String(params.get("operateType"));
|
||||
if (StringUtils.isBlank(operateType)) {
|
||||
operateType = InterviewOperateTypeEnum.ARRANGE.getOperateType();
|
||||
}
|
||||
ApplicantOperateEnum operateTypeEnum = ApplicantOperateEnum.getOperateType(operateType);
|
||||
switch (operateTypeEnum) {
|
||||
// 转移阶段
|
||||
case TRANSFER:
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
result.put("errmsg", "自定义出错信息");
|
||||
result.put("flag", "false");
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
private void transferApplicant(Map<String, Object> mainDataMap) {
|
||||
// 当前应聘阶段
|
||||
String currentApplicationStage = Util.null2String(mainDataMap.get("dqypjd"));
|
||||
// 待入职、入职状态,数据推入职管理建模
|
||||
if (CurrentApplicationStageEnum.EMPLOYMENT.getStageValue().equals(currentApplicationStage) || CurrentApplicationStageEnum.ENTRY.getStageValue().equals(currentApplicationStage)) {
|
||||
String modeTableName = "uf_jcl_rzgl";
|
||||
String insertSql = "insert into " + modeTableName + " () values ()";
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
private List<Object> buildParamList(Map<String, Object> map) {
|
||||
List<Object> param = new ArrayList<>();
|
||||
// 填充建模表相关字段
|
||||
param.add(map.get("modedatacreatertype"));
|
||||
param.add(map.get("formmodeid"));
|
||||
param.add(map.get("modedatacreater"));
|
||||
param.add(map.get("modedatacreatedate"));
|
||||
param.add(map.get("modedatacreatetime"));
|
||||
param.add(map.get("modedatamodifier"));
|
||||
param.add(map.get("modedatamodifydatetime"));
|
||||
|
||||
// 表单字段
|
||||
// 信息采集ID
|
||||
// param.add(map.get(""));
|
||||
// 姓名
|
||||
param.add(map.get("xm"));
|
||||
// 身份证号
|
||||
param.add(map.get("sfz"));
|
||||
// 年龄
|
||||
param.add(map.get("nl"));
|
||||
// 性别
|
||||
param.add(map.get("xb"));
|
||||
// 手机号码
|
||||
param.add(map.get("sjhm"));
|
||||
// 电子邮箱
|
||||
param.add(map.get("dzyx"));
|
||||
// 入职公司
|
||||
param.add(map.get("rzgs"));
|
||||
|
||||
//// 入职部门
|
||||
//param.add(map.get("rzbm"));
|
||||
//// 直接上级
|
||||
//param.add(map.get("zjsj"));
|
||||
//// 岗位
|
||||
//param.add(map.get("gw"));
|
||||
// 预计入职日期
|
||||
param.add(map.get("yjrzrq"));
|
||||
// 关联招聘需求
|
||||
param.add(map.get("glzpxq"));
|
||||
// 入职状态
|
||||
param.add(map.get("rzzt"));
|
||||
// 信息采集
|
||||
param.add(map.get("xxcj"));
|
||||
// 入职流程
|
||||
param.add(map.get("rzlc"));
|
||||
// 入职流程状态
|
||||
param.add(map.get("rzlczt"));
|
||||
// 批次ID
|
||||
param.add(map.get("pcid"));
|
||||
// 取消原因
|
||||
param.add(map.get("qxyy"));
|
||||
|
||||
return param;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,52 @@
|
|||
package weaver.formmode.recruit.modeexpand.demandmanage;
|
||||
|
||||
import com.engine.recruit.enums.RecruitStatusEnum;
|
||||
import weaver.common.DateUtil;
|
||||
import weaver.conn.RecordSet;
|
||||
import weaver.formmode.customjavacode.AbstractModeExpandJavaCodeNew;
|
||||
import weaver.general.BaseBean;
|
||||
import weaver.general.Util;
|
||||
import weaver.soa.workflow.request.RequestInfo;
|
||||
import weaver.workflow.workflow.WorkflowBillComInfo;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* <p>聚才林招聘</p>
|
||||
* 完成需求
|
||||
* <p>完成需求——更新状态为招聘完成,置空结束日期,完成日期取当前日期</p>
|
||||
*
|
||||
* @author:dxfeng
|
||||
* @createTime: 2023/09/13
|
||||
* @version: 1.0
|
||||
*/
|
||||
public class RecruitFinishModeExpand extends AbstractModeExpandJavaCodeNew {
|
||||
@Override
|
||||
public Map<String, String> doModeExpand(Map<String, Object> param) {
|
||||
Map<String, String> result = new HashMap<>();
|
||||
try {
|
||||
int billId;
|
||||
int modeId;
|
||||
RequestInfo requestInfo = (RequestInfo) param.get("RequestInfo");
|
||||
if (requestInfo != null) {
|
||||
billId = Util.getIntValue(requestInfo.getRequestid());
|
||||
modeId = Util.getIntValue(requestInfo.getWorkflowid());
|
||||
if (billId > 0 && modeId > 0) {
|
||||
// 获取表单名称
|
||||
String formId = Util.null2String(param.get("formid"));
|
||||
String tableName = new WorkflowBillComInfo().getTablename(formId);
|
||||
String sql = "update " + tableName + " set xqzt = ? ,jssj = ?,wcsj = ? where id = ?";
|
||||
RecordSet rs = new RecordSet();
|
||||
// 更新状态为招聘完成,置空结束日期,完成日期取当前日期
|
||||
rs.executeUpdate(sql, RecruitStatusEnum.RECRUITMENT_COMPLETED.getValue(), null, DateUtil.getCurrentDate(), billId);
|
||||
new BaseBean().writeLog("完成需求操作:billId=[" + billId + "]操作完成");
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
result.put("errmsg", "完成需求操作失败");
|
||||
result.put("flag", "false");
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,51 @@
|
|||
package weaver.formmode.recruit.modeexpand.demandmanage;
|
||||
|
||||
import com.engine.recruit.enums.RecruitStatusEnum;
|
||||
import weaver.conn.RecordSet;
|
||||
import weaver.formmode.customjavacode.AbstractModeExpandJavaCodeNew;
|
||||
import weaver.general.BaseBean;
|
||||
import weaver.general.Util;
|
||||
import weaver.soa.workflow.request.RequestInfo;
|
||||
import weaver.workflow.workflow.WorkflowBillComInfo;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* <p>聚才林招聘</p>
|
||||
* 开启需求
|
||||
* <p>开启需求——状态为进行中,置空完成日期和结束日期</p>
|
||||
*
|
||||
* @author:dxfeng
|
||||
* @createTime: 2023/09/13
|
||||
* @version: 1.0
|
||||
*/
|
||||
public class RecruitStartModeExpand extends AbstractModeExpandJavaCodeNew {
|
||||
@Override
|
||||
public Map<String, String> doModeExpand(Map<String, Object> param) {
|
||||
Map<String, String> result = new HashMap<>();
|
||||
try {
|
||||
int billId;
|
||||
int modeId;
|
||||
RequestInfo requestInfo = (RequestInfo) param.get("RequestInfo");
|
||||
if (requestInfo != null) {
|
||||
billId = Util.getIntValue(requestInfo.getRequestid());
|
||||
modeId = Util.getIntValue(requestInfo.getWorkflowid());
|
||||
if (billId > 0 && modeId > 0) {
|
||||
// 获取表单名称
|
||||
String formId = Util.null2String(param.get("formid"));
|
||||
String tableName = new WorkflowBillComInfo().getTablename(formId);
|
||||
String sql = "update " + tableName + " set xqzt = ? ,jssj = ?,wcsj = ? where id = ?";
|
||||
RecordSet rs = new RecordSet();
|
||||
// 状态为进行中,置空完成日期和结束日期
|
||||
rs.executeUpdate(sql, RecruitStatusEnum.RECRUITMENT_PROGRESS.getValue(), null, null, billId);
|
||||
new BaseBean().writeLog("开启需求操作:billId=[" + billId + "]操作完成");
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
result.put("errmsg", "开启需求操作失败");
|
||||
result.put("flag", "false");
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,52 @@
|
|||
package weaver.formmode.recruit.modeexpand.demandmanage;
|
||||
|
||||
import com.engine.recruit.enums.RecruitStatusEnum;
|
||||
import weaver.common.DateUtil;
|
||||
import weaver.conn.RecordSet;
|
||||
import weaver.formmode.customjavacode.AbstractModeExpandJavaCodeNew;
|
||||
import weaver.general.BaseBean;
|
||||
import weaver.general.Util;
|
||||
import weaver.soa.workflow.request.RequestInfo;
|
||||
import weaver.workflow.workflow.WorkflowBillComInfo;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* <p>聚才林招聘</p>
|
||||
* 关闭需求
|
||||
* <p>关闭需求——状态为招聘停止,置空完成日期结束日期取当前日期</p>
|
||||
*
|
||||
* @author:dxfeng
|
||||
* @createTime: 2023/09/13
|
||||
* @version: 1.0
|
||||
*/
|
||||
public class RecruitStopModeExpand extends AbstractModeExpandJavaCodeNew {
|
||||
@Override
|
||||
public Map<String, String> doModeExpand(Map<String, Object> param) {
|
||||
Map<String, String> result = new HashMap<>();
|
||||
try {
|
||||
int billId;
|
||||
int modeId;
|
||||
RequestInfo requestInfo = (RequestInfo) param.get("RequestInfo");
|
||||
if (requestInfo != null) {
|
||||
billId = Util.getIntValue(requestInfo.getRequestid());
|
||||
modeId = Util.getIntValue(requestInfo.getWorkflowid());
|
||||
if (billId > 0 && modeId > 0) {
|
||||
// 获取表单名称
|
||||
String formId = Util.null2String(param.get("formid"));
|
||||
String tableName = new WorkflowBillComInfo().getTablename(formId);
|
||||
String sql = "update " + tableName + " set xqzt = ? ,jssj = ?,wcsj = ? where id = ?";
|
||||
RecordSet rs = new RecordSet();
|
||||
// 状态为招聘停止,置空完成日期,结束日期取当前日期
|
||||
rs.executeUpdate(sql, RecruitStatusEnum.RECRUITMENT_STOPS.getValue(), DateUtil.getCurrentDate(), null, billId);
|
||||
new BaseBean().writeLog("关闭需求操作:billId=[" + billId + "]操作完成");
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
result.put("errmsg", "关闭需求操作失败");
|
||||
result.put("flag", "false");
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,174 @@
|
|||
package weaver.formmode.recruit.modeexpand.departmentscreening;
|
||||
|
||||
import org.apache.commons.collections.CollectionUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import weaver.common.DateUtil;
|
||||
import weaver.conn.RecordSet;
|
||||
import weaver.formmode.customjavacode.AbstractModeExpandJavaCodeNew;
|
||||
import com.engine.recruit.conn.ApplicantCommonInfo;
|
||||
import weaver.formmode.recruit.modeexpand.util.RecruitModeUtil;
|
||||
import weaver.formmode.setup.ModeRightInfo;
|
||||
import weaver.general.BaseBean;
|
||||
import weaver.general.Util;
|
||||
import weaver.hrm.User;
|
||||
import weaver.soa.workflow.request.*;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* <p>聚才林招聘</p>
|
||||
* 批量发起部门筛选,转部门筛选反馈数据
|
||||
*
|
||||
* @author:dxfeng
|
||||
* @createTime: 2023/09/18
|
||||
* @version: 1.0
|
||||
*/
|
||||
public class BatchAddDeptScreeningModeExpand extends AbstractModeExpandJavaCodeNew {
|
||||
/**
|
||||
* JCL_部门筛选反馈(uf_jcl_bmsxfk)
|
||||
*/
|
||||
private static final String MODE_TABLE_NAME = "uf_jcl_bmsxfk";
|
||||
|
||||
@Override
|
||||
public Map<String, String> doModeExpand(Map<String, Object> param) {
|
||||
Map<String, String> result = new HashMap<>();
|
||||
try {
|
||||
RequestInfo requestInfo = (RequestInfo) param.get("RequestInfo");
|
||||
if (requestInfo != null) {
|
||||
int formModeId = -1;
|
||||
RecordSet rs = new RecordSet();
|
||||
rs.executeQuery("select id from modeinfo where formid =( select id from workflow_bill where tablename = ? )", MODE_TABLE_NAME);
|
||||
if (rs.next()) {
|
||||
formModeId = rs.getInt("id");
|
||||
}
|
||||
MainTableInfo mainTableInfo = requestInfo.getMainTableInfo();
|
||||
Property[] properties = mainTableInfo.getProperty();
|
||||
Map<String, Object> mainDataMap = new HashMap<>();
|
||||
for (Property property : properties) {
|
||||
mainDataMap.put(property.getName(), property.getValue());
|
||||
}
|
||||
User user = (User) param.get("user");
|
||||
|
||||
// 部门筛选ID
|
||||
mainDataMap.put("bmsxid", requestInfo.getRequestid());
|
||||
// 状态
|
||||
mainDataMap.put("zt", "0");
|
||||
// 填充建模数据基本信息
|
||||
mainDataMap.put("formmodeid", formModeId);
|
||||
mainDataMap.put("modedatacreater", user.getUID());
|
||||
String dateTime = DateUtil.getFullDate();
|
||||
String[] split = dateTime.split(" ");
|
||||
mainDataMap.put("modedatacreatedate", split[0]);
|
||||
mainDataMap.put("modedatacreatetime", split[1]);
|
||||
mainDataMap.put("modedatamodifier", user.getUID());
|
||||
mainDataMap.put("modedatamodifydatetime", dateTime);
|
||||
mainDataMap.put("modedatacreatertype", "0");
|
||||
|
||||
List<Map<String, Object>> detailMapList = new ArrayList<>();
|
||||
DetailTableInfo detailTableInfo = requestInfo.getDetailTableInfo();
|
||||
DetailTable detailTable = detailTableInfo.getDetailTable(0);
|
||||
Row[] rows = detailTable.getRow();
|
||||
for (Row row : rows) {
|
||||
Map<String, Object> detailDataMap = new HashMap<>(mainDataMap);
|
||||
Cell[] cells = row.getCell();
|
||||
for (Cell cell : cells) {
|
||||
detailDataMap.put(cell.getName(), cell.getValue());
|
||||
}
|
||||
detailMapList.add(detailDataMap);
|
||||
}
|
||||
|
||||
StringBuilder msgBuilder = new StringBuilder();
|
||||
msgBuilder.append(user.getLastname()).append("给你发来简历进行筛选,请查看。<br/>");
|
||||
for (Map<String, Object> detailDataMap : detailMapList) {
|
||||
List<List<Object>> paramList = new ArrayList<>();
|
||||
buildParamList(detailDataMap, paramList);
|
||||
if (CollectionUtils.isNotEmpty(paramList)) {
|
||||
String insertSql = "insert into " + MODE_TABLE_NAME + " (modeuuid, modedatacreatertype, formmodeid, modedatacreater, modedatacreatedate, modedatacreatetime, modedatamodifier, modedatamodifydatetime, bmsxid, ypz, ypzw, tdsj, zt, pcid, fkr) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)";
|
||||
for (List<Object> objects : paramList) {
|
||||
String uuid = UUID.randomUUID().toString();
|
||||
objects.add(0, uuid);
|
||||
rs.executeUpdate(insertSql, objects);
|
||||
refreshRight(rs, uuid, formModeId);
|
||||
}
|
||||
}
|
||||
String applicantName = ApplicantCommonInfo.getApplicantName(Util.null2String(detailDataMap.get("ypz")));
|
||||
String applicantPosition = ApplicantCommonInfo.getApplicantPosition(Util.null2String(detailDataMap.get("ypzw")));
|
||||
msgBuilder.append("【应聘者:").append(applicantName).append(",应聘职位:").append(applicantPosition).append("】").append("<br/>");
|
||||
}
|
||||
|
||||
// 发送待办消息
|
||||
String messageType = RecruitModeUtil.getRecruitPropValue("SCREENING_MESSAGE_TYPE");
|
||||
String messageTitle = RecruitModeUtil.getRecruitPropValue("SCREENING_MESSAGE_TITLE");
|
||||
String linkUrl = RecruitModeUtil.getRecruitPropValue("SCREENING_MESSAGE_URL");
|
||||
String fkr = Util.null2String(mainDataMap.get("fkr"));
|
||||
Set<String> userIdSet = new HashSet<>(Arrays.asList(fkr.split(",")));
|
||||
RecruitModeUtil.messagePush(messageType, messageTitle, msgBuilder.toString(), userIdSet, user.getUID(), linkUrl, "");
|
||||
}
|
||||
} catch (Exception e) {
|
||||
new BaseBean().writeLog(e);
|
||||
result.put("errmsg", "自定义出错信息");
|
||||
result.put("flag", "false");
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 构建批量插入数据集合
|
||||
*
|
||||
* @param map 表单参数
|
||||
* @param paramList 待插入数据集合
|
||||
*/
|
||||
private void buildParamList(Map<String, Object> map, List<List<Object>> paramList) {
|
||||
List<Object> param = new ArrayList<>();
|
||||
// 填充建模表相关字段
|
||||
param.add(map.get("modedatacreatertype"));
|
||||
param.add(map.get("formmodeid"));
|
||||
param.add(map.get("modedatacreater"));
|
||||
param.add(map.get("modedatacreatedate"));
|
||||
param.add(map.get("modedatacreatetime"));
|
||||
param.add(map.get("modedatamodifier"));
|
||||
param.add(map.get("modedatamodifydatetime"));
|
||||
|
||||
//部门筛选ID
|
||||
param.add(map.get("bmsxid"));
|
||||
// 应聘者
|
||||
param.add(map.get("ypz"));
|
||||
// 应聘职位
|
||||
param.add(map.get("ypzw"));
|
||||
// 投递时间
|
||||
param.add(map.get("tdsj"));
|
||||
// 状态
|
||||
param.add(map.get("zt"));
|
||||
// 批次ID
|
||||
param.add(map.get("pcid"));
|
||||
// 反馈人
|
||||
String fkr = Util.null2String(map.get("fkr"));
|
||||
if (StringUtils.isNotBlank(fkr)) {
|
||||
String[] fkrArray = fkr.split(",");
|
||||
for (String fkrId : fkrArray) {
|
||||
ArrayList<Object> objects = new ArrayList<>(param);
|
||||
objects.add(fkrId);
|
||||
paramList.add(objects);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 权限重构
|
||||
*
|
||||
* @param rs RecordSet
|
||||
* @param uuid UUID
|
||||
* @param formModeId 建模ID
|
||||
*/
|
||||
private void refreshRight(RecordSet rs, String uuid, int formModeId) {
|
||||
rs.executeQuery("select id from " + MODE_TABLE_NAME + " where modeuuid='" + uuid + "'");
|
||||
if (rs.next()) {
|
||||
//建模数据的id
|
||||
int bid = Util.getIntValue(rs.getString("id"));
|
||||
ModeRightInfo modeRightInfo = new ModeRightInfo();
|
||||
modeRightInfo.setNewRight(true);
|
||||
//新建的时候添加共享
|
||||
modeRightInfo.editModeDataShare(1, formModeId, bid);
|
||||
}
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue