generated from dxfeng/secondev-chapanda-feishu
测试BUG修复
This commit is contained in:
parent
f56c118978
commit
94f139f6b1
|
|
@ -2,7 +2,6 @@ package com.engine.recruit.conn;
|
|||
|
||||
import com.engine.recruit.enums.ApplicationStatusEnum;
|
||||
import org.apache.commons.collections.CollectionUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import weaver.conn.RecordSet;
|
||||
import weaver.general.Util;
|
||||
|
||||
|
|
@ -50,12 +49,7 @@ public class CheckRepeatResume {
|
|||
public static List<Map<String, Object>> getRepeatPositionResumeList(String name, String mobile, String positionId, String billId) {
|
||||
RecordSet rs = new RecordSet();
|
||||
// 查询状态为待分配、候选中的且未隐藏的数据
|
||||
if (StringUtils.isNotBlank(billId)) {
|
||||
rs.executeQuery("select * from uf_jcl_yppc where formmodeid is not null and zt != 2 and zt != 3 and xm = ? and sjhm = ? and ypzw = ? and id != ? order by zt", name, mobile, positionId, billId);
|
||||
|
||||
} else {
|
||||
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);
|
||||
}
|
||||
rs.executeQuery("select * from uf_jcl_yppc where formmodeid is not null and zt != 2 and zt != 3 and xm = ? and sjhm = ? and ypzw = ? and id != ? order by zt", name, mobile, positionId, billId);
|
||||
return RecruitRecordSet.getRecordMapList(rs);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -43,4 +43,13 @@ public class InductionManageController {
|
|||
Map<String, Object> params = ParamUtil.request2Map(request);
|
||||
return new ResponseResult<Map<String, Object>, Map<String, Object>>(user).run(getInductionManageWrapper(user)::sendCollectInfo, params);
|
||||
}
|
||||
|
||||
@POST
|
||||
@Path("/verifyIDCard")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public String verifyIDCard(@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)::verifyIDCard, params);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -25,6 +25,14 @@ public interface InductionManageService {
|
|||
*/
|
||||
Map<String, Object> sendCollectInfo(Map<String, Object> param);
|
||||
|
||||
/**
|
||||
* 提交前,校验身份证号
|
||||
*
|
||||
* @param params
|
||||
* @return
|
||||
*/
|
||||
Map<String, Object> verifyIDCard(Map<String, Object> params);
|
||||
|
||||
/**
|
||||
* 校验登录信息
|
||||
*
|
||||
|
|
@ -38,7 +46,7 @@ public interface InductionManageService {
|
|||
* @Author: liang.cheng
|
||||
* @Date: 2023/10/25 10:30 AM
|
||||
* @param: [id]
|
||||
* @return: java.util.Map<java.lang.String,java.lang.Object>
|
||||
* @return: java.util.Map<java.lang.String, java.lang.Object>
|
||||
*/
|
||||
Map<String, Object> infoSubmit(String id);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ import com.engine.recruit.conn.ApplicantCommonInfo;
|
|||
import com.engine.recruit.conn.RecruitDataMap;
|
||||
import com.engine.recruit.conn.RecruitRecordSet;
|
||||
import com.engine.recruit.entity.record.ApplicantRecordPo;
|
||||
import com.engine.recruit.enums.EntryStatusEnum;
|
||||
import com.engine.recruit.enums.InfoCollectEnum;
|
||||
import com.engine.recruit.enums.PositionOperateEnum;
|
||||
import com.engine.recruit.enums.RecordOperateEnum;
|
||||
|
|
@ -127,13 +128,13 @@ public class InductionManageServiceImpl extends Service implements InductionMana
|
|||
String email = Util.null2String(dataMap.get("yx"));
|
||||
|
||||
String messageLink = RecruitModeUtil.getRecruitPropValue("COLLECT_MESSAGE_LINK");
|
||||
messageLink += "&billId=" + id + "&manageId=" + billId;
|
||||
//messageLink += "&billId=" + id;
|
||||
|
||||
yjnr = yjnr.replace("{链接地址}", messageLink);
|
||||
yjnr = yjnr.replace("{初始密码}", password);
|
||||
String msgContent = RecruitModeUtil.getReplaceContent(yjnr, fieldMapList, mainDataMap);
|
||||
// 发送邮件
|
||||
boolean sendEmail = RecruitMessageUtils.SendEmail(email, mbmc, msgContent);
|
||||
boolean sendEmail = RecruitMessageUtils.sendEmail(email, mbmc, msgContent);
|
||||
// 发送短信
|
||||
boolean sendSMS = RecruitMessageUtils.sendSMS(mobile, msgContent);
|
||||
|
||||
|
|
@ -162,6 +163,26 @@ public class InductionManageServiceImpl extends Service implements InductionMana
|
|||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> verifyIDCard(Map<String, Object> params) {
|
||||
RecordSet rs = new RecordSet();
|
||||
String sfzh = Util.null2String(params.get("sfzh"));
|
||||
String rzzt = Util.null2String(params.get("rzzt"));
|
||||
String billId = Util.null2String(params.get("billId"));
|
||||
// 根据身份证号,判定,只能有一个状态为待入职的数据
|
||||
if (EntryStatusEnum.PENDING.getValue().equals(rzzt)) {
|
||||
rs.executeQuery("select count(id) as num from uf_jcl_rzgl where sfzh = ? and id != ? and rzzt = ? ", sfzh, billId, rzzt);
|
||||
int countNum = 0;
|
||||
if (rs.next()) {
|
||||
countNum = rs.getInt("num");
|
||||
}
|
||||
if (countNum > 0) {
|
||||
throw new CustomizeRunTimeException("当前身份证号已存在待入职状态数据");
|
||||
}
|
||||
}
|
||||
return new HashMap<>();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> checkLoginInfo(Map<String, Object> param) {
|
||||
RecordSet rs = new RecordSet();
|
||||
|
|
|
|||
|
|
@ -12,11 +12,11 @@ import java.util.Map;
|
|||
* @version: 1.0
|
||||
*/
|
||||
public class RecruitMessageUtils {
|
||||
public static boolean SendEmail(Map<String, Object> param) {
|
||||
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);
|
||||
return sendEmail(sendTo, emailTitle, emailContent);
|
||||
}
|
||||
|
||||
public static boolean sendSMS(Map<String, Object> param) {
|
||||
|
|
@ -25,7 +25,7 @@ public class RecruitMessageUtils {
|
|||
return sendSMS(receiver, content);
|
||||
}
|
||||
|
||||
public static boolean SendEmail(String sendTo, String emailTitle, String emailContent) {
|
||||
public static boolean sendEmail(String sendTo, String emailTitle, String emailContent) {
|
||||
return MessageUtil.sendEmail(sendTo, emailTitle, emailContent);
|
||||
}
|
||||
|
||||
|
|
@ -36,7 +36,7 @@ public class RecruitMessageUtils {
|
|||
* @param imageFileIds 邮件附件,imageFile表记录id,多个时英文逗号分隔
|
||||
* @return
|
||||
*/
|
||||
public static boolean SendEmailWithFile(String sendTo, String emailTitle, String emailContent, String imageFileIds) {
|
||||
public static boolean sendEmailWithFile(String sendTo, String emailTitle, String emailContent, String imageFileIds) {
|
||||
EmailWorkRunnable emailWorkRunnable = new EmailWorkRunnable(sendTo, Util.toHtmlMode(emailTitle), Util.toHtmlMode(emailContent));
|
||||
emailWorkRunnable.setImagefileids(imageFileIds);
|
||||
return emailWorkRunnable.emailCommonRemind();
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@ 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;
|
||||
|
|
@ -27,6 +26,10 @@ public class InductionManageWrapper extends Service {
|
|||
return getInductionManageService(user).sendCollectInfo(param);
|
||||
}
|
||||
|
||||
public Map<String, Object> verifyIDCard(Map<String, Object> param) {
|
||||
return getInductionManageService(user).verifyIDCard(param);
|
||||
}
|
||||
|
||||
public Map<String, Object> checkLoginInfo(Map<String, Object> param) {
|
||||
return getInductionManageService(user).checkLoginInfo(param);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,67 +0,0 @@
|
|||
package weaver.formmode.recruit.modeexpand.entrymanager;
|
||||
|
||||
import com.engine.recruit.enums.EntryStatusEnum;
|
||||
import weaver.conn.RecordSet;
|
||||
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/10/07
|
||||
* @version: 1.0
|
||||
*/
|
||||
public class AddEntryModeExpand 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) {
|
||||
MainTableInfo mainTableInfo = requestInfo.getMainTableInfo();
|
||||
Property[] properties = mainTableInfo.getProperty();
|
||||
Map<String, String> mainDataMap = new HashMap<>();
|
||||
for (Property property : properties) {
|
||||
mainDataMap.put(property.getName(), property.getValue());
|
||||
}
|
||||
RecordSet rs = new RecordSet();
|
||||
String pcid = mainDataMap.get("pcid");
|
||||
String sfzh = mainDataMap.get("sfzh");
|
||||
String rzzt = mainDataMap.get("rzzt");
|
||||
// 根据身份证号,判定,只能有一个状态为待入职的数据
|
||||
if (EntryStatusEnum.PENDING.getValue().equals(rzzt)) {
|
||||
rs.executeQuery("select count(id) as num from uf_jcl_rzgl where sfzh = ? and id != ? and rzzt = ? ", sfzh, billId, rzzt);
|
||||
int countNum = 0;
|
||||
if (rs.next()) {
|
||||
countNum = rs.getInt("num");
|
||||
}
|
||||
if (countNum > 0) {
|
||||
result.put("errmsg", "当前身份证号已存在待入职状态数据");
|
||||
result.put("flag", "false");
|
||||
return result;
|
||||
}
|
||||
}
|
||||
//// 更新应聘者当前应聘阶段
|
||||
//String dqypjd = Util.null2String(param.get("dqypjd"));
|
||||
//if (StringUtils.isNotBlank(dqypjd)) {
|
||||
// rs.executeUpdate("update uf_jcl_yppc set dqypjd = ? where id = ?", dqypjd, pcid);
|
||||
//}
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
result.put("errmsg", "自定义出错信息");
|
||||
result.put("flag", "false");
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
|
@ -127,7 +127,7 @@ public class BatchAddInterviewResultModeExpand extends AbstractModeExpandJavaCod
|
|||
String yx = Util.null2String(detailDataMap.get("dzyx"));
|
||||
String sjh = Util.null2String(detailDataMap.get("sjhm"));
|
||||
if (sendEmail) {
|
||||
RecruitMessageUtils.SendEmail(yx, emailTitle, msgContent);
|
||||
RecruitMessageUtils.sendEmail(yx, emailTitle, msgContent);
|
||||
|
||||
}
|
||||
if (sendSms) {
|
||||
|
|
|
|||
|
|
@ -82,7 +82,7 @@ public class CreateInterviewModeExpand extends AbstractModeExpandJavaCodeNew {
|
|||
String yx = Util.null2String(mainDataMap.get("dzyx"));
|
||||
String sjh = Util.null2String(mainDataMap.get("sjhm"));
|
||||
if (sendEmail) {
|
||||
RecruitMessageUtils.SendEmail(yx, emailTitle, msgContent);
|
||||
RecruitMessageUtils.sendEmail(yx, emailTitle, msgContent);
|
||||
|
||||
}
|
||||
if (sendSms) {
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@ public class CreateOfferModeExpand extends AbstractModeExpandJavaCodeNew {
|
|||
|
||||
if (sendEmail) {
|
||||
String offerAttach = RecruitModeUtil.getImageFileIdsByDocIds(Util.null2String(mainDataMap.get("offerfj")));
|
||||
RecruitMessageUtils.SendEmailWithFile(yx, emailTitle, msgContent, offerAttach);
|
||||
RecruitMessageUtils.sendEmailWithFile(yx, emailTitle, msgContent, offerAttach);
|
||||
}
|
||||
if (sendSms) {
|
||||
String name = Util.null2String(mainDataMap.get("xm"));
|
||||
|
|
|
|||
|
|
@ -98,7 +98,7 @@ public class BatchAddWrittenResultModeExpand extends AbstractModeExpandJavaCodeN
|
|||
String yx = Util.null2String(detailDataMap.get("yx"));
|
||||
String sjh = Util.null2String(detailDataMap.get("sjh"));
|
||||
if (sendEmail) {
|
||||
RecruitMessageUtils.SendEmail(yx, emailTitle, msgContent);
|
||||
RecruitMessageUtils.sendEmail(yx, emailTitle, msgContent);
|
||||
|
||||
}
|
||||
if (sendSms) {
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ public class CreateWrittenModeExpand extends AbstractModeExpandJavaCodeNew {
|
|||
String yx = Util.null2String(mainDataMap.get("yx"));
|
||||
String sjh = Util.null2String(mainDataMap.get("sjh"));
|
||||
if (sendEmail) {
|
||||
RecruitMessageUtils.SendEmail(yx, emailTitle, msgContent);
|
||||
RecruitMessageUtils.sendEmail(yx, emailTitle, msgContent);
|
||||
|
||||
}
|
||||
if (sendSms) {
|
||||
|
|
|
|||
|
|
@ -1,88 +0,0 @@
|
|||
package weaver.interfaces.recruit.thread;
|
||||
|
||||
import com.engine.recruit.conn.*;
|
||||
import com.engine.recruit.entity.resume.OcrResumePo;
|
||||
import com.engine.recruit.enums.ApplicationStatusEnum;
|
||||
import com.engine.recruit.util.RecruitUtil;
|
||||
import org.apache.commons.collections.CollectionUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import weaver.common.DateUtil;
|
||||
import weaver.conn.RecordSet;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author:dxfeng
|
||||
* @createTime: 2023/11/10
|
||||
* @version: 1.0
|
||||
*/
|
||||
@Deprecated
|
||||
public class ExtractOcrResumeThread extends Thread {
|
||||
@Override
|
||||
public void run() {
|
||||
RecordSet rs = new RecordSet();
|
||||
rs.executeQuery("select id,xm, xb, csrq, jg, yx, wx, qq, xjzd, ah, grys , jyjl , bysj , zgxl , zyjn , sxjl , yysp , zs, gzjl, ypzw, gzjy, xmjl, sjhm, nl, sfz, jlfj from uf_jcl_jlzjb where ocr = 1 and cqzt is null order by modedatacreatedate, modedatacreatetime");
|
||||
List<Map<String, Object>> mapList = RecruitRecordSet.getRecordMapList(rs);
|
||||
if (CollectionUtils.isEmpty(mapList)) {
|
||||
return;
|
||||
}
|
||||
for (Map<String, Object> map : mapList) {
|
||||
OcrResumePo ocrResumePo = RecruitUtil.parseMap2Object(map, OcrResumePo.class);
|
||||
RecruitDataMap<Object> dataMap = buildApplicantMap(ocrResumePo);
|
||||
// 校验简历信息、并插入
|
||||
CheckRepeatResume.getInstance().insertResumeMainTable(dataMap);
|
||||
rs.executeUpdate("update uf_jcl_jlzjb set cqzt = 1 where id = ? ", ocrResumePo.getId());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 构建应聘者数据集合
|
||||
*
|
||||
* @param ocrResumePo
|
||||
* @return
|
||||
*/
|
||||
private RecruitDataMap<Object> buildApplicantMap(OcrResumePo ocrResumePo) {
|
||||
RecruitDataMap<Object> insertMap = new RecruitDataMap<>();
|
||||
// 姓名
|
||||
insertMap.put("xm", ocrResumePo.getXm());
|
||||
// 电子邮箱
|
||||
insertMap.put("dzyx", ocrResumePo.getYx());
|
||||
// 年龄
|
||||
insertMap.put("nl", ocrResumePo.getNl());
|
||||
// 手机号码
|
||||
insertMap.put("sjhm", ocrResumePo.getSjhm());
|
||||
// 自我评价
|
||||
insertMap.put("zwpj", ocrResumePo.getGrys());
|
||||
// 身份证号
|
||||
insertMap.put("sfz", ocrResumePo.getSfz());
|
||||
// 原始简历
|
||||
insertMap.put("ysjl", ocrResumePo.getJlfj());
|
||||
// 性别
|
||||
insertMap.put("xb",ocrResumePo.getXb());
|
||||
// 投递时间
|
||||
insertMap.put("tdsj", DateUtil.getDateTime());
|
||||
String zt = ApplicationStatusEnum.DISTRIBUTION.getValue();
|
||||
// 应聘职位
|
||||
String ypzw = ocrResumePo.getYpzw();
|
||||
if (StringUtils.isNotBlank(ypzw)) {
|
||||
String flowId = PositionCommonInfo.getRecruitFlowId(ypzw);
|
||||
Map<String, String> initialStage = ApplicantCommonInfo.getInitialStage(flowId);
|
||||
if (null != initialStage) {
|
||||
String zpjd = initialStage.get("id");
|
||||
String dqypjd = initialStage.get("jdlx");
|
||||
if (StringUtils.isNotBlank(zpjd) && StringUtils.isNotBlank(dqypjd)) {
|
||||
insertMap.put("ypzw", ypzw);
|
||||
insertMap.put("zplc", flowId);
|
||||
insertMap.put("zpjd", zpjd);
|
||||
insertMap.put("dqypjd", dqypjd);
|
||||
zt = ApplicationStatusEnum.CANDIDATE.getValue();
|
||||
}
|
||||
}
|
||||
}
|
||||
// 应聘状态
|
||||
insertMap.put("zt", zt);
|
||||
return insertMap;
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue