generated from dxfeng/secondev-chapanda-feishu
新增简历,重复简历校验
This commit is contained in:
parent
46e2ee525a
commit
c6998cf827
|
|
@ -23,13 +23,20 @@ public class CheckRepeatResume {
|
|||
* @param mobile 手机号
|
||||
* @return
|
||||
*/
|
||||
private boolean joinBlackList(String name, String mobile) {
|
||||
public static 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();
|
||||
}
|
||||
|
||||
public static List<Map<String, Object>> getRepeatPositionResumeList(String name, String mobile, String positionId) {
|
||||
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 = ? and ypzw = ? order by zt", name, mobile, positionId);
|
||||
return RecruitRecordSet.getRecordMapList(rs);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据姓名、手机号查询重复的简历数据
|
||||
*
|
||||
|
|
|
|||
|
|
@ -64,6 +64,7 @@ public class ApplicantResumeController {
|
|||
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)
|
||||
|
|
@ -81,4 +82,13 @@ public class ApplicantResumeController {
|
|||
Map<String, Object> param = ParamUtil.request2Map(request);
|
||||
return new ResponseResult<Map<String, Object>, Map<String, Object>>(user).run(getApplicantResumeWrapper(user)::fullOriginalResumeId, param);
|
||||
}
|
||||
|
||||
@POST
|
||||
@Path("/checkRepeatResume")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public String checkRepeatResume(@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)::checkRepeatResume, param);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -62,4 +62,12 @@ public interface ApplicantResumeService {
|
|||
* @return
|
||||
*/
|
||||
Map<String, Object> fullOriginalResumeId(Map<String, Object> params);
|
||||
|
||||
/**
|
||||
* 判断是否重复简历,是否可以新增
|
||||
*
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
Map<String, Object> checkRepeatResume(Map<String, Object> param);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ package com.engine.recruit.service.impl;
|
|||
import cn.hutool.core.convert.Convert;
|
||||
import com.engine.core.impl.Service;
|
||||
import com.engine.recruit.conn.ApplicantCommonInfo;
|
||||
import com.engine.recruit.conn.CheckRepeatResume;
|
||||
import com.engine.recruit.conn.RecruitDataMap;
|
||||
import com.engine.recruit.conn.RecruitRecordSet;
|
||||
import com.engine.recruit.entity.record.ApplicantRecordPo;
|
||||
|
|
@ -11,6 +12,7 @@ import com.engine.recruit.enums.ApplicationStatusEnum;
|
|||
import com.engine.recruit.enums.RecordOperateEnum;
|
||||
import com.engine.recruit.exception.CustomizeRunTimeException;
|
||||
import com.engine.recruit.service.ApplicantResumeService;
|
||||
import org.apache.commons.collections.CollectionUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import weaver.common.DateUtil;
|
||||
import weaver.conn.RecordSet;
|
||||
|
|
@ -280,7 +282,6 @@ public class ApplicantResumeServiceImpl extends Service implements ApplicantResu
|
|||
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);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -306,6 +307,24 @@ public class ApplicantResumeServiceImpl extends Service implements ApplicantResu
|
|||
return new HashMap<>();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> checkRepeatResume(Map<String, Object> param) {
|
||||
String name = Util.null2String(param.get("xm"));
|
||||
String mobile = Util.null2String(param.get("sjhm"));
|
||||
String positionId = Util.null2String(param.get("ypzw"));
|
||||
Map<String, Object> returnMap = new HashMap<>();
|
||||
// 判断是否黑名单
|
||||
boolean joinBlackList = CheckRepeatResume.joinBlackList(name, mobile);
|
||||
if (joinBlackList) {
|
||||
throw new CustomizeRunTimeException("保存失败,当前录入应聘者为黑名单人员");
|
||||
}
|
||||
List<Map<String, Object>> repeatPositionResumeList = CheckRepeatResume.getRepeatPositionResumeList(name, mobile, positionId);
|
||||
if (CollectionUtils.isNotEmpty(repeatPositionResumeList)) {
|
||||
throw new CustomizeRunTimeException("保存失败,该人员已有相同的应聘中的职位");
|
||||
}
|
||||
return returnMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* 构建普通数据格式
|
||||
*
|
||||
|
|
|
|||
|
|
@ -41,4 +41,8 @@ public class ApplicantResumeWrapper extends Service {
|
|||
public Map<String, Object> fullOriginalResumeId(Map<String, Object> params) {
|
||||
return getApplicantResumeService(user).fullOriginalResumeId(params);
|
||||
}
|
||||
|
||||
public Map<String, Object> checkRepeatResume(Map<String, Object> params) {
|
||||
return getApplicantResumeService(user).checkRepeatResume(params);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,52 @@
|
|||
package weaver.formmode.recruit.modeexpand.applicant;
|
||||
|
||||
import com.engine.recruit.conn.RecruitDataMap;
|
||||
import com.engine.recruit.exception.CustomizeRunTimeException;
|
||||
import weaver.formmode.customjavacode.AbstractModeExpandJavaCodeNew;
|
||||
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: 2023/11/13
|
||||
* @version: 1.0
|
||||
*/
|
||||
public class AddApplicantModeExpand 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) {
|
||||
Map<String, Object> dataMap = new RecruitDataMap<>();
|
||||
MainTableInfo mainTableInfo = requestInfo.getMainTableInfo();
|
||||
Property[] properties = mainTableInfo.getProperty();
|
||||
for (Property property : properties) {
|
||||
dataMap.put(property.getName(), property.getValue());
|
||||
}
|
||||
|
||||
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"));
|
||||
}else{
|
||||
throw new CustomizeRunTimeException("新增失败");
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
result.put("errmsg", "完成需求操作失败");
|
||||
result.put("flag", "false");
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue