diff --git a/src/com/engine/recruit/conn/CheckRepeatResume.java b/src/com/engine/recruit/conn/CheckRepeatResume.java index 605d378..2d5d8ad 100644 --- a/src/com/engine/recruit/conn/CheckRepeatResume.java +++ b/src/com/engine/recruit/conn/CheckRepeatResume.java @@ -2,6 +2,7 @@ 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; @@ -53,7 +54,6 @@ public class CheckRepeatResume { } /** - * * @param name * @param mobile * @param positionId @@ -63,7 +63,13 @@ public class CheckRepeatResume { public static List> getRepeatPositionResumeList(String name, String mobile, String positionId, String billId) { 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 = ? and id != ? order by zt", name, mobile, positionId, billId); + String whereSql = ""; + if (StringUtils.isBlank(positionId)) { + whereSql = " and (ypzw = ? or ypzw is null) "; + } else { + whereSql = " and ypzw = ? "; + } + rs.executeQuery("select * from uf_jcl_yppc where formmodeid is not null and zt != 2 and zt != 3 and xm = ? and sjhm = ? " + whereSql + " and id != ? order by zt", name, mobile, positionId, billId); return RecruitRecordSet.getRecordMapList(rs); } diff --git a/src/com/engine/recruit/service/impl/ApplicantResumeServiceImpl.java b/src/com/engine/recruit/service/impl/ApplicantResumeServiceImpl.java index 1edbbea..f1f39e1 100644 --- a/src/com/engine/recruit/service/impl/ApplicantResumeServiceImpl.java +++ b/src/com/engine/recruit/service/impl/ApplicantResumeServiceImpl.java @@ -351,6 +351,9 @@ public class ApplicantResumeServiceImpl extends Service implements ApplicantResu } List> repeatPositionResumeList = CheckRepeatResume.getRepeatPositionResumeList(name, mobile, positionId, billId); if (CollectionUtils.isNotEmpty(repeatPositionResumeList)) { + if (StringUtils.isBlank(positionId)) { + throw new CustomizeRunTimeException("保存失败,该人员已有待分配状态数据"); + } throw new CustomizeRunTimeException("保存失败,该人员已有相同的应聘中的职位"); } return returnMap;