diff --git a/src/com/engine/recruit/conn/CheckRepeatResume.java b/src/com/engine/recruit/conn/CheckRepeatResume.java index 4f773e3..81b697d 100644 --- a/src/com/engine/recruit/conn/CheckRepeatResume.java +++ b/src/com/engine/recruit/conn/CheckRepeatResume.java @@ -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> 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); } diff --git a/src/com/engine/recruit/controller/InductionManageController.java b/src/com/engine/recruit/controller/InductionManageController.java index 21e2b22..eecfa2b 100644 --- a/src/com/engine/recruit/controller/InductionManageController.java +++ b/src/com/engine/recruit/controller/InductionManageController.java @@ -43,4 +43,13 @@ public class InductionManageController { Map params = ParamUtil.request2Map(request); return new ResponseResult, Map>(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 params = ParamUtil.request2Map(request); + return new ResponseResult, Map>(user).run(getInductionManageWrapper(user)::verifyIDCard, params); + } } diff --git a/src/com/engine/recruit/service/InductionManageService.java b/src/com/engine/recruit/service/InductionManageService.java index 4d2cbd6..8e50e18 100644 --- a/src/com/engine/recruit/service/InductionManageService.java +++ b/src/com/engine/recruit/service/InductionManageService.java @@ -25,6 +25,14 @@ public interface InductionManageService { */ Map sendCollectInfo(Map param); + /** + * 提交前,校验身份证号 + * + * @param params + * @return + */ + Map verifyIDCard(Map params); + /** * 校验登录信息 * @@ -38,7 +46,7 @@ public interface InductionManageService { * @Author: liang.cheng * @Date: 2023/10/25 10:30 AM * @param: [id] - * @return: java.util.Map + * @return: java.util.Map */ Map infoSubmit(String id); } diff --git a/src/com/engine/recruit/service/impl/InductionManageServiceImpl.java b/src/com/engine/recruit/service/impl/InductionManageServiceImpl.java index 45afdce..0f4b04b 100644 --- a/src/com/engine/recruit/service/impl/InductionManageServiceImpl.java +++ b/src/com/engine/recruit/service/impl/InductionManageServiceImpl.java @@ -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 verifyIDCard(Map 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 checkLoginInfo(Map param) { RecordSet rs = new RecordSet(); diff --git a/src/com/engine/recruit/util/RecruitMessageUtils.java b/src/com/engine/recruit/util/RecruitMessageUtils.java index daef8e5..190e280 100644 --- a/src/com/engine/recruit/util/RecruitMessageUtils.java +++ b/src/com/engine/recruit/util/RecruitMessageUtils.java @@ -12,11 +12,11 @@ import java.util.Map; * @version: 1.0 */ public class RecruitMessageUtils { - public static boolean SendEmail(Map param) { + public static boolean sendEmail(Map 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 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(); diff --git a/src/com/engine/recruit/wrapper/InductionManageWrapper.java b/src/com/engine/recruit/wrapper/InductionManageWrapper.java index 4b195ea..72cdaed 100644 --- a/src/com/engine/recruit/wrapper/InductionManageWrapper.java +++ b/src/com/engine/recruit/wrapper/InductionManageWrapper.java @@ -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 verifyIDCard(Map param) { + return getInductionManageService(user).verifyIDCard(param); + } + public Map checkLoginInfo(Map param) { return getInductionManageService(user).checkLoginInfo(param); } diff --git a/src/weaver/formmode/recruit/modeexpand/entrymanager/AddEntryModeExpand.java b/src/weaver/formmode/recruit/modeexpand/entrymanager/AddEntryModeExpand.java deleted file mode 100644 index c5569aa..0000000 --- a/src/weaver/formmode/recruit/modeexpand/entrymanager/AddEntryModeExpand.java +++ /dev/null @@ -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 doModeExpand(Map param) { - Map 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 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; - } -} diff --git a/src/weaver/formmode/recruit/modeexpand/interview/BatchAddInterviewResultModeExpand.java b/src/weaver/formmode/recruit/modeexpand/interview/BatchAddInterviewResultModeExpand.java index 3671e5d..a69e47a 100644 --- a/src/weaver/formmode/recruit/modeexpand/interview/BatchAddInterviewResultModeExpand.java +++ b/src/weaver/formmode/recruit/modeexpand/interview/BatchAddInterviewResultModeExpand.java @@ -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) { diff --git a/src/weaver/formmode/recruit/modeexpand/interview/CreateInterviewModeExpand.java b/src/weaver/formmode/recruit/modeexpand/interview/CreateInterviewModeExpand.java index b460eaa..b21a39a 100644 --- a/src/weaver/formmode/recruit/modeexpand/interview/CreateInterviewModeExpand.java +++ b/src/weaver/formmode/recruit/modeexpand/interview/CreateInterviewModeExpand.java @@ -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) { diff --git a/src/weaver/formmode/recruit/modeexpand/offer/CreateOfferModeExpand.java b/src/weaver/formmode/recruit/modeexpand/offer/CreateOfferModeExpand.java index 3b37798..fb32b06 100644 --- a/src/weaver/formmode/recruit/modeexpand/offer/CreateOfferModeExpand.java +++ b/src/weaver/formmode/recruit/modeexpand/offer/CreateOfferModeExpand.java @@ -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")); diff --git a/src/weaver/formmode/recruit/modeexpand/written/BatchAddWrittenResultModeExpand.java b/src/weaver/formmode/recruit/modeexpand/written/BatchAddWrittenResultModeExpand.java index ee5500d..41ffff7 100644 --- a/src/weaver/formmode/recruit/modeexpand/written/BatchAddWrittenResultModeExpand.java +++ b/src/weaver/formmode/recruit/modeexpand/written/BatchAddWrittenResultModeExpand.java @@ -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) { diff --git a/src/weaver/formmode/recruit/modeexpand/written/CreateWrittenModeExpand.java b/src/weaver/formmode/recruit/modeexpand/written/CreateWrittenModeExpand.java index 888f686..b4ae0af 100644 --- a/src/weaver/formmode/recruit/modeexpand/written/CreateWrittenModeExpand.java +++ b/src/weaver/formmode/recruit/modeexpand/written/CreateWrittenModeExpand.java @@ -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) { diff --git a/src/weaver/interfaces/recruit/thread/ExtractOcrResumeThread.java b/src/weaver/interfaces/recruit/thread/ExtractOcrResumeThread.java deleted file mode 100644 index e917eab..0000000 --- a/src/weaver/interfaces/recruit/thread/ExtractOcrResumeThread.java +++ /dev/null @@ -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> mapList = RecruitRecordSet.getRecordMapList(rs); - if (CollectionUtils.isEmpty(mapList)) { - return; - } - for (Map map : mapList) { - OcrResumePo ocrResumePo = RecruitUtil.parseMap2Object(map, OcrResumePo.class); - RecruitDataMap 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 buildApplicantMap(OcrResumePo ocrResumePo) { - RecruitDataMap 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 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; - } -}