generated from dxfeng/secondev-chapanda-feishu
#3338307 逸安启项目支持
This commit is contained in:
parent
8747e4fdf1
commit
bb2d09a640
|
|
@ -1,9 +1,5 @@
|
||||||
package com.engine.hrm.cmd.jobset;
|
package com.engine.hrm.cmd.jobset;
|
||||||
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
import com.engine.common.biz.AbstractCommonCommand;
|
import com.engine.common.biz.AbstractCommonCommand;
|
||||||
import com.engine.common.biz.SimpleBizLogger;
|
import com.engine.common.biz.SimpleBizLogger;
|
||||||
import com.engine.common.constant.BizLogSmallType4Hrm;
|
import com.engine.common.constant.BizLogSmallType4Hrm;
|
||||||
|
|
@ -15,7 +11,6 @@ import com.engine.hrm.util.CodeRuleManager;
|
||||||
import com.engine.hrm.util.face.HrmFaceCheckManager;
|
import com.engine.hrm.util.face.HrmFaceCheckManager;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import weaver.conn.RecordSet;
|
import weaver.conn.RecordSet;
|
||||||
import weaver.general.BaseBean;
|
|
||||||
import weaver.general.Util;
|
import weaver.general.Util;
|
||||||
import weaver.hrm.HrmUserVarify;
|
import weaver.hrm.HrmUserVarify;
|
||||||
import weaver.hrm.User;
|
import weaver.hrm.User;
|
||||||
|
|
@ -23,9 +18,12 @@ import weaver.hrm.common.DbFunctionUtil;
|
||||||
import weaver.hrm.common.database.dialect.DialectUtil;
|
import weaver.hrm.common.database.dialect.DialectUtil;
|
||||||
import weaver.hrm.job.JobTitlesComInfo;
|
import weaver.hrm.job.JobTitlesComInfo;
|
||||||
import weaver.interfaces.hrm.HrmServiceManager;
|
import weaver.interfaces.hrm.HrmServiceManager;
|
||||||
import weaver.systeminfo.SysMaintenanceLog;
|
|
||||||
import weaver.systeminfo.SystemEnv;
|
import weaver.systeminfo.SystemEnv;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
|
||||||
public class AddJobTitleCmd extends AbstractCommonCommand<Map<String, Object>> {
|
public class AddJobTitleCmd extends AbstractCommonCommand<Map<String, Object>> {
|
||||||
|
|
||||||
|
|
@ -68,6 +66,7 @@ public class AddJobTitleCmd extends AbstractCommonCommand<Map<String, Object>> {
|
||||||
String jobtitleremark = Util.null2String(params.get("jobtitleremark"));
|
String jobtitleremark = Util.null2String(params.get("jobtitleremark"));
|
||||||
String jobdoc = Util.null2String(params.get("jobdoc"));
|
String jobdoc = Util.null2String(params.get("jobdoc"));
|
||||||
String jobtitlecode = Util.null2String(params.get("jobtitlecode"));
|
String jobtitlecode = Util.null2String(params.get("jobtitlecode"));
|
||||||
|
String englishname = Util.null2String(params.get("englishname"));
|
||||||
String[] strObj = {jobtitlemark, jobtitlename, jobactivityid,
|
String[] strObj = {jobtitlemark, jobtitlename, jobactivityid,
|
||||||
Util.null2String(params.get("jobresponsibility")),
|
Util.null2String(params.get("jobresponsibility")),
|
||||||
Util.null2String(params.get("jobcompetency")),
|
Util.null2String(params.get("jobcompetency")),
|
||||||
|
|
@ -129,6 +128,10 @@ public class AddJobTitleCmd extends AbstractCommonCommand<Map<String, Object>> {
|
||||||
String sql = "update HrmJobTitles set " + DbFunctionUtil.getInsertUpdateSetSql(RecordSet.getDBType(), user.getUID()) + " where id=" + id;
|
String sql = "update HrmJobTitles set " + DbFunctionUtil.getInsertUpdateSetSql(RecordSet.getDBType(), user.getUID()) + " where id=" + id;
|
||||||
RecordSet.executeUpdate(sql);
|
RecordSet.executeUpdate(sql);
|
||||||
|
|
||||||
|
// 更新英文名称
|
||||||
|
sql = "update HrmJobTitles set englishname = ? where id= ?";
|
||||||
|
RecordSet.executeUpdate(sql,englishname,id);
|
||||||
|
|
||||||
HrmServiceManager HrmServiceManager = new HrmServiceManager();
|
HrmServiceManager HrmServiceManager = new HrmServiceManager();
|
||||||
HrmServiceManager.SynInstantJobtitle("" + id, "1");
|
HrmServiceManager.SynInstantJobtitle("" + id, "1");
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,5 @@
|
||||||
package com.engine.hrm.cmd.jobset;
|
package com.engine.hrm.cmd.jobset;
|
||||||
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
import com.engine.common.biz.AbstractCommonCommand;
|
import com.engine.common.biz.AbstractCommonCommand;
|
||||||
import com.engine.common.biz.SimpleBizLogger;
|
import com.engine.common.biz.SimpleBizLogger;
|
||||||
import com.engine.common.constant.BizLogSmallType4Hrm;
|
import com.engine.common.constant.BizLogSmallType4Hrm;
|
||||||
|
|
@ -15,7 +11,6 @@ import com.engine.hrm.util.CodeRuleManager;
|
||||||
import com.engine.hrm.util.face.HrmFaceCheckManager;
|
import com.engine.hrm.util.face.HrmFaceCheckManager;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import weaver.conn.RecordSet;
|
import weaver.conn.RecordSet;
|
||||||
import weaver.general.BaseBean;
|
|
||||||
import weaver.general.Util;
|
import weaver.general.Util;
|
||||||
import weaver.hrm.HrmUserVarify;
|
import weaver.hrm.HrmUserVarify;
|
||||||
import weaver.hrm.User;
|
import weaver.hrm.User;
|
||||||
|
|
@ -23,9 +18,12 @@ import weaver.hrm.common.DbFunctionUtil;
|
||||||
import weaver.hrm.common.database.dialect.DialectUtil;
|
import weaver.hrm.common.database.dialect.DialectUtil;
|
||||||
import weaver.hrm.job.JobTitlesComInfo;
|
import weaver.hrm.job.JobTitlesComInfo;
|
||||||
import weaver.interfaces.hrm.HrmServiceManager;
|
import weaver.interfaces.hrm.HrmServiceManager;
|
||||||
import weaver.systeminfo.SysMaintenanceLog;
|
|
||||||
import weaver.systeminfo.SystemEnv;
|
import weaver.systeminfo.SystemEnv;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
|
||||||
public class EditJobTitleCmd extends AbstractCommonCommand<Map<String, Object>> {
|
public class EditJobTitleCmd extends AbstractCommonCommand<Map<String, Object>> {
|
||||||
|
|
||||||
|
|
@ -68,6 +66,7 @@ public class EditJobTitleCmd extends AbstractCommonCommand<Map<String, Object>>
|
||||||
String jobdoc = Util.null2String(params.get("jobdoc"));
|
String jobdoc = Util.null2String(params.get("jobdoc"));
|
||||||
String id = Util.null2String(params.get("id"));
|
String id = Util.null2String(params.get("id"));
|
||||||
String jobtitlecode = Util.null2String(params.get("jobtitlecode"));
|
String jobtitlecode = Util.null2String(params.get("jobtitlecode"));
|
||||||
|
String englishname = Util.null2String(params.get("englishname"));
|
||||||
try {
|
try {
|
||||||
// jobtitlecode = CodeRuleManager.getCodeRuleManager().generateRuleCode(RuleCodeType.JOBTITLES, jobtitlecode);
|
// jobtitlecode = CodeRuleManager.getCodeRuleManager().generateRuleCode(RuleCodeType.JOBTITLES, jobtitlecode);
|
||||||
if (StringUtils.isNotEmpty(jobtitlecode)) {
|
if (StringUtils.isNotEmpty(jobtitlecode)) {
|
||||||
|
|
@ -128,6 +127,10 @@ public class EditJobTitleCmd extends AbstractCommonCommand<Map<String, Object>>
|
||||||
String sql = "update HrmJobTitles set "+ DbFunctionUtil.getUpdateSetSql(RecordSet.getDBType(),user.getUID())+" where id="+id;
|
String sql = "update HrmJobTitles set "+ DbFunctionUtil.getUpdateSetSql(RecordSet.getDBType(),user.getUID())+" where id="+id;
|
||||||
RecordSet.executeUpdate(sql);
|
RecordSet.executeUpdate(sql);
|
||||||
|
|
||||||
|
// 更新英文名称
|
||||||
|
sql = "update HrmJobTitles set englishname = ? where id= ?";
|
||||||
|
RecordSet.executeUpdate(sql,englishname,id);
|
||||||
|
|
||||||
HrmServiceManager HrmServiceManager = new HrmServiceManager();
|
HrmServiceManager HrmServiceManager = new HrmServiceManager();
|
||||||
JobTitlesComInfo JobTitlesComInfo = new JobTitlesComInfo();
|
JobTitlesComInfo JobTitlesComInfo = new JobTitlesComInfo();
|
||||||
HrmServiceManager.SynInstantJobtitle("" + id, "2");
|
HrmServiceManager.SynInstantJobtitle("" + id, "2");
|
||||||
|
|
|
||||||
|
|
@ -107,6 +107,10 @@ public class GetJobDetailCmd extends AbstractCommonCommand<Map<String, Object>>
|
||||||
datas.put("value", rs.getString(3));
|
datas.put("value", rs.getString(3));
|
||||||
list.add(datas);
|
list.add(datas);
|
||||||
|
|
||||||
|
datas = new HashMap<String, Object>();
|
||||||
|
datas.put("label", SystemEnv.getHtmlLabelName(548239, Util.getIntValue(user.getLanguage())));
|
||||||
|
datas.put("value", rs.getString("englishname"));
|
||||||
|
list.add(datas);
|
||||||
datas = new HashMap<String, Object>();
|
datas = new HashMap<String, Object>();
|
||||||
datas.put("label", SystemEnv.getHtmlLabelName(524944, Util.getIntValue(user.getLanguage())));
|
datas.put("label", SystemEnv.getHtmlLabelName(524944, Util.getIntValue(user.getLanguage())));
|
||||||
datas.put("value", rs.getString("jobtitlecode"));
|
datas.put("value", rs.getString("jobtitlecode"));
|
||||||
|
|
|
||||||
|
|
@ -125,7 +125,7 @@ public class GetJobTitleFormCmd extends AbstractCommonCommand<Map<String, Object
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
String[] fields = new String[]{"jobtitlemark,382413,1,1", "jobtitlename,382414,1,1", "jobtitlecode,524944,1,1", "jobactivityid,15855,3,282", "jobresponsibility,15856,2,1", "jobdoc,857,3,9", "jobcompetency,895,2,1", "jobtitleremark,454,2,1"};
|
String[] fields = new String[]{"jobtitlemark,382413,1,1", "jobtitlename,382414,1,1", "englishname,548239,1,1","jobtitlecode,524944,1,1", "jobactivityid,15855,3,282", "jobresponsibility,15856,2,1", "jobdoc,857,3,9", "jobcompetency,895,2,1", "jobtitleremark,454,2,1"};
|
||||||
HrmFieldSearchConditionComInfo hrmFieldSearchConditionComInfo = new HrmFieldSearchConditionComInfo();
|
HrmFieldSearchConditionComInfo hrmFieldSearchConditionComInfo = new HrmFieldSearchConditionComInfo();
|
||||||
SearchConditionItem searchConditionItem = null;
|
SearchConditionItem searchConditionItem = null;
|
||||||
HrmFieldBean hrmFieldBean = null;
|
HrmFieldBean hrmFieldBean = null;
|
||||||
|
|
|
||||||
|
|
@ -37,13 +37,15 @@ public class RecruitFlowServiceImpl extends Service implements RecruitFlowServic
|
||||||
// 招聘流程ID
|
// 招聘流程ID
|
||||||
int recruitFlowId = -1;
|
int recruitFlowId = -1;
|
||||||
String zt = "";
|
String zt = "";
|
||||||
|
String dqypjd = "";
|
||||||
|
|
||||||
RecordSet rs = new RecordSet();
|
RecordSet rs = new RecordSet();
|
||||||
rs.executeQuery("select zplc,zpjd,zt from uf_jcl_yppc where id = ?", billId);
|
rs.executeQuery("select zplc,zpjd,zt,dqypjd from uf_jcl_yppc where id = ?", billId);
|
||||||
if (rs.next()) {
|
if (rs.next()) {
|
||||||
recruitFlowId = rs.getInt("zplc");
|
recruitFlowId = rs.getInt("zplc");
|
||||||
stageId = rs.getString("zpjd");
|
stageId = rs.getString("zpjd");
|
||||||
zt = rs.getString("zt");
|
zt = rs.getString("zt");
|
||||||
|
dqypjd = rs.getString("dqypjd");
|
||||||
}
|
}
|
||||||
if (StringUtils.isBlank(zt) || ApplicationStatusEnum.DISTRIBUTION.getValue().equals(zt)) {
|
if (StringUtils.isBlank(zt) || ApplicationStatusEnum.DISTRIBUTION.getValue().equals(zt)) {
|
||||||
returnMap.put("redirect", true);
|
returnMap.put("redirect", true);
|
||||||
|
|
@ -61,6 +63,15 @@ public class RecruitFlowServiceImpl extends Service implements RecruitFlowServic
|
||||||
throw new CustomizeRunTimeException("未设置对应招聘流程");
|
throw new CustomizeRunTimeException("未设置对应招聘流程");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
List<String> offerFilterButton = new ArrayList<>();
|
||||||
|
offerFilterButton.add("创建offer");
|
||||||
|
offerFilterButton.add("转推其他职位");
|
||||||
|
|
||||||
|
boolean offerFilter = false;
|
||||||
|
if ("6".equals(dqypjd)) {
|
||||||
|
rs.executeQuery("select id from uf_jcl_offer where xm = ?", billId);
|
||||||
|
offerFilter = rs.next();
|
||||||
|
}
|
||||||
|
|
||||||
if (StringUtils.isBlank(stageId)) {
|
if (StringUtils.isBlank(stageId)) {
|
||||||
// 查询开始环节
|
// 查询开始环节
|
||||||
|
|
@ -76,12 +87,16 @@ public class RecruitFlowServiceImpl extends Service implements RecruitFlowServic
|
||||||
|
|
||||||
List<RecruitButton> buttonList = new ArrayList<>();
|
List<RecruitButton> buttonList = new ArrayList<>();
|
||||||
List<RecruitTabPo> tabList = new ArrayList<>();
|
List<RecruitTabPo> tabList = new ArrayList<>();
|
||||||
|
rs.writeLog("offerFilter==" + offerFilter + ",dqypjd==" + dqypjd);
|
||||||
while (rs.next()) {
|
while (rs.next()) {
|
||||||
String anmc = rs.getString("anmc");
|
String anmc = rs.getString("anmc");
|
||||||
if (!isCandidate && !filterButton.contains(anmc)) {
|
if (!isCandidate && !filterButton.contains(anmc)) {
|
||||||
// 非候选中,隐藏按钮
|
// 非候选中,隐藏按钮
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
if(offerFilter && offerFilterButton.contains(anmc)){
|
||||||
|
continue;
|
||||||
|
}
|
||||||
buttonList.add(RecruitButton.builder()
|
buttonList.add(RecruitButton.builder()
|
||||||
.key(rs.getString("id"))
|
.key(rs.getString("id"))
|
||||||
.buttonName(rs.getString("buttonName"))
|
.buttonName(rs.getString("buttonName"))
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,7 @@ import com.engine.recruit.enums.InterviewOperateTypeEnum;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import weaver.formmode.customjavacode.AbstractModeExpandJavaCodeNew;
|
import weaver.formmode.customjavacode.AbstractModeExpandJavaCodeNew;
|
||||||
import weaver.formmode.recruit.modeexpand.util.RecruitModeUtil;
|
import weaver.formmode.recruit.modeexpand.util.RecruitModeUtil;
|
||||||
|
import weaver.formmode.yaq.modeexpand.util.AutoNextStepUtil;
|
||||||
import weaver.general.BaseBean;
|
import weaver.general.BaseBean;
|
||||||
import weaver.general.Util;
|
import weaver.general.Util;
|
||||||
import weaver.hrm.User;
|
import weaver.hrm.User;
|
||||||
|
|
@ -71,6 +72,9 @@ public class CreateInterviewModeExpand extends AbstractModeExpandJavaCodeNew {
|
||||||
boolean needFeedback = "1".equals(Util.null2String(mainDataMap.get("sfxyfk")));
|
boolean needFeedback = "1".equals(Util.null2String(mainDataMap.get("sfxyfk")));
|
||||||
// 发送邮件、短信
|
// 发送邮件、短信
|
||||||
InterviewMsgUtil.sendEmailAndMsg(user, mainDataMap, billId, needFeedback);
|
InterviewMsgUtil.sendEmailAndMsg(user, mainDataMap, billId, needFeedback);
|
||||||
|
String ypz = Util.null2String(mainDataMap.get("ypz"));
|
||||||
|
// 更新到面试阶段
|
||||||
|
AutoNextStepUtil.currentStep(ypz, "2");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,7 @@ import org.apache.commons.lang3.StringUtils;
|
||||||
import weaver.conn.RecordSet;
|
import weaver.conn.RecordSet;
|
||||||
import weaver.formmode.customjavacode.AbstractModeExpandJavaCodeNew;
|
import weaver.formmode.customjavacode.AbstractModeExpandJavaCodeNew;
|
||||||
import weaver.formmode.recruit.modeexpand.util.RecruitModeUtil;
|
import weaver.formmode.recruit.modeexpand.util.RecruitModeUtil;
|
||||||
|
import weaver.formmode.yaq.modeexpand.util.AutoNextStepUtil;
|
||||||
import weaver.general.BaseBean;
|
import weaver.general.BaseBean;
|
||||||
import weaver.general.Util;
|
import weaver.general.Util;
|
||||||
import weaver.hrm.User;
|
import weaver.hrm.User;
|
||||||
|
|
@ -70,6 +71,11 @@ public class UpdateInterviewModeExpand extends AbstractModeExpandJavaCodeNew {
|
||||||
messageType = RecruitConstant.INTERVIEW_MESSAGE_TYPE;
|
messageType = RecruitConstant.INTERVIEW_MESSAGE_TYPE;
|
||||||
title = RecruitConstant.INTERVIEW_EVALUATE_MESSAGE_TITLE;
|
title = RecruitConstant.INTERVIEW_EVALUATE_MESSAGE_TITLE;
|
||||||
evaluateInterview(params, requestInfo.getCreatorid(), mainDataMap);
|
evaluateInterview(params, requestInfo.getCreatorid(), mainDataMap);
|
||||||
|
String jg = Util.null2String(mainDataMap.get("jg"));
|
||||||
|
if ("0".equals(jg)) {
|
||||||
|
String ypz = Util.null2String(mainDataMap.get("ypz"));
|
||||||
|
AutoNextStepUtil.nextStep(ypz, "2");
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case CANCEL:
|
case CANCEL:
|
||||||
// 面试取消
|
// 面试取消
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,51 @@
|
||||||
|
package weaver.formmode.yaq.modeexpand.departmentscreening;
|
||||||
|
|
||||||
|
import weaver.conn.RecordSet;
|
||||||
|
import weaver.formmode.customjavacode.AbstractModeExpandJavaCodeNew;
|
||||||
|
import weaver.formmode.yaq.modeexpand.util.AutoNextStepUtil;
|
||||||
|
import weaver.general.Util;
|
||||||
|
import weaver.soa.workflow.request.MainTableInfo;
|
||||||
|
import weaver.soa.workflow.request.Property;
|
||||||
|
import weaver.soa.workflow.request.RequestInfo;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author:dxfeng
|
||||||
|
* @createTime: 2024/11/04
|
||||||
|
* @version: 1.0
|
||||||
|
*/
|
||||||
|
public class SubmitScreenExpand extends AbstractModeExpandJavaCodeNew {
|
||||||
|
@Override
|
||||||
|
public Map<String, String> doModeExpand(Map<String, Object> param) {
|
||||||
|
Map<String, String> result = new HashMap<>();
|
||||||
|
RecordSet rs = new RecordSet();
|
||||||
|
try {
|
||||||
|
RequestInfo requestInfo = (RequestInfo) param.get("RequestInfo");
|
||||||
|
if (requestInfo != null) {
|
||||||
|
MainTableInfo mainTableInfo = requestInfo.getMainTableInfo();
|
||||||
|
Property[] properties = mainTableInfo.getProperty();
|
||||||
|
Map<String, Object> mainDataMap = new HashMap<>();
|
||||||
|
for (Property property : properties) {
|
||||||
|
mainDataMap.put(property.getName(), property.getValue());
|
||||||
|
}
|
||||||
|
|
||||||
|
String jg = Util.null2String(mainDataMap.get("jg"));
|
||||||
|
rs.writeLog("SubmitScreenExpand---jg", jg);
|
||||||
|
if ("0".equals(jg)) {
|
||||||
|
String ypz = Util.null2String(mainDataMap.get("ypz"));
|
||||||
|
rs.writeLog("SubmitScreenExpand---ypz", ypz);
|
||||||
|
AutoNextStepUtil.nextStep(ypz, "0");
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
rs.writeLog("SubmitScreenExpand---Exception", e.getMessage());
|
||||||
|
result.put("errmsg", "自定义出错信息");
|
||||||
|
result.put("flag", "false");
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,94 @@
|
||||||
|
package weaver.formmode.yaq.modeexpand.util;
|
||||||
|
|
||||||
|
import com.engine.recruit.entity.recruitflow.po.RecruitStepPo;
|
||||||
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
import weaver.conn.RecordSet;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author:dxfeng
|
||||||
|
* @createTime: 2024/11/04
|
||||||
|
* @version: 1.0
|
||||||
|
*/
|
||||||
|
public class AutoNextStepUtil {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param pcid
|
||||||
|
* @param stepType 0初筛 1笔试 2面试 3测评 4薪酬谈判 5背调 6offer
|
||||||
|
*/
|
||||||
|
public static void nextStep(String pcid, String stepType) {
|
||||||
|
RecordSet rs = new RecordSet();
|
||||||
|
// 筛选反馈通过 阶段更新为下一阶段
|
||||||
|
String sql = "select a.id,a.zplc from uf_jcl_zpjdsz a " +
|
||||||
|
"inner join uf_jcl_zplc b on a.zplc = b.id " +
|
||||||
|
"inner join uf_jcl_yppc c on c.zplc = b.id " +
|
||||||
|
" where c.id = ? and a.jdlx = ?";
|
||||||
|
rs.writeLog("sql--" + sql + ",pcid--" + pcid + ",stepType--" + stepType);
|
||||||
|
rs.executeQuery(sql, pcid, stepType);
|
||||||
|
if (rs.next()) {
|
||||||
|
String stageId = rs.getString("id");
|
||||||
|
String recruitFlowId = rs.getString("zplc");
|
||||||
|
rs.writeLog("stageId--" + stageId + ",recruitFlowId--" + recruitFlowId);
|
||||||
|
rs.executeQuery("select id,jdmc,hj from uf_jcl_zpjdsz where sfqy = 0 and zplc = ? order by hj,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.writeLog("target--" + target);
|
||||||
|
rs.executeQuery("select jdlx from uf_jcl_zpjdsz where id = ?", target);
|
||||||
|
if (rs.next()) {
|
||||||
|
String jdlx = rs.getString("jdlx");
|
||||||
|
rs.writeLog("jdlx--" + jdlx);
|
||||||
|
// 更新应聘者简历为下一阶段
|
||||||
|
rs.executeUpdate("update uf_jcl_yppc set zpjd = ?,dqypjd = ? where id = ?", target, jdlx, pcid);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 0初筛 1笔试 2面试 3测评 4薪酬谈判 5背调 6offer
|
||||||
|
*
|
||||||
|
* @param pcid
|
||||||
|
* @param stepType
|
||||||
|
*/
|
||||||
|
public static void currentStep(String pcid, String stepType) {
|
||||||
|
{
|
||||||
|
RecordSet rs = new RecordSet();
|
||||||
|
// 筛选反馈通过 阶段更新为下一阶段
|
||||||
|
String sql = "select a.id from uf_jcl_zpjdsz a " +
|
||||||
|
"inner join uf_jcl_zplc b on a.zplc = b.id " +
|
||||||
|
"inner join uf_jcl_yppc c on c.zplc = b.id " +
|
||||||
|
"where c.id = ? and jdlx = ?";
|
||||||
|
rs.executeQuery(sql, pcid, stepType);
|
||||||
|
rs.writeLog("sql--" + sql + ",pcid--" + pcid + ",stepType--" + stepType);
|
||||||
|
if (rs.next()) {
|
||||||
|
String stageId = rs.getString("id");
|
||||||
|
rs.writeLog("stageId--" + stageId);
|
||||||
|
rs.executeUpdate("update uf_jcl_yppc set zpjd = ?,dqypjd = ? where id = ?", stageId, stepType, pcid);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue