|
|
@@ -12,16 +12,20 @@ import org.springframework.ui.ModelMap;
|
|
|
|
|
|
import com.kingdee.bos.BOSException;
|
|
|
import com.kingdee.bos.Context;
|
|
|
+import com.kingdee.bos.dao.ormapping.ObjectUuidPK;
|
|
|
+import com.kingdee.eas.base.permission.util.ToolUtils;
|
|
|
import com.kingdee.eas.basedata.person.PersonInfo;
|
|
|
+import com.kingdee.eas.common.EASBizException;
|
|
|
import com.kingdee.eas.util.app.DbUtil;
|
|
|
import com.kingdee.jdbc.rowset.IRowSet;
|
|
|
import com.kingdee.shr.base.syssetting.context.SHRContext;
|
|
|
import com.kingdee.shr.base.syssetting.exception.ShrWebBizException;
|
|
|
+import com.kingdee.shr.recuritment.FocusOnSource;
|
|
|
import com.kingdee.shr.recuritment.ISmartImportTask;
|
|
|
import com.kingdee.shr.recuritment.ISmartImportTaskDetail;
|
|
|
import com.kingdee.shr.recuritment.RecuritmentDemandInfo;
|
|
|
+import com.kingdee.shr.recuritment.ResumeFocusOnFactory;
|
|
|
import com.kingdee.shr.recuritment.ResumeSourceInfo;
|
|
|
-import com.kingdee.shr.recuritment.SmartImportTaskCollection;
|
|
|
import com.kingdee.shr.recuritment.SmartImportTaskDetailCollection;
|
|
|
import com.kingdee.shr.recuritment.SmartImportTaskDetailFactory;
|
|
|
import com.kingdee.shr.recuritment.SmartImportTaskDetailInfo;
|
|
|
@@ -76,15 +80,19 @@ public class ResumeBaseRecListHandlerEx extends ResumeBaseRecListHandler {
|
|
|
|
|
|
try {
|
|
|
String taskIds = request.getParameter("taskIds");
|
|
|
- ISmartImportTask taskIns = SmartImportTaskFactory.getLocalInstance(ctx);
|
|
|
+ String[] split = taskIds.split(",");
|
|
|
+ ISmartImportTask taskIns = SmartImportTaskFactory.getLocalInstance(ctx);
|
|
|
+
|
|
|
ISmartImportTaskDetail detailIns = SmartImportTaskDetailFactory.getLocalInstance(ctx);
|
|
|
- SmartImportTaskCollection taskCol = taskIns.getSmartImportTaskCollection("where fid in ("+taskIds+")");
|
|
|
- for(int j =0;j<taskCol.size();j++) {
|
|
|
- SmartImportTaskInfo taskInfo = taskCol.get(j);
|
|
|
+ SmartImportTaskDetailCollection detailCol = detailIns
|
|
|
+ .getSmartImportTaskDetailCollection("where id in (" + ToolUtils.aryToStr(split, true) + ")");
|
|
|
+
|
|
|
+ for (int i = 0; i < detailCol.size(); i++) {
|
|
|
+ SmartImportTaskDetailInfo detailInfo = detailCol.get(i);
|
|
|
+ SmartImportTaskInfo taskInfo = detailInfo.getTask();
|
|
|
if (taskInfo != null) {
|
|
|
- String taskId = taskInfo.getId().toString();
|
|
|
- SmartImportTaskDetailCollection detailCol = detailIns
|
|
|
- .getSmartImportTaskDetailCollection(" where task.id = '" + taskId + "'");
|
|
|
+ taskInfo = taskIns.getSmartImportTaskInfo(new ObjectUuidPK(taskInfo.getId()));
|
|
|
+
|
|
|
//招聘需求
|
|
|
RecuritmentDemandInfo recDemand = taskInfo.getRecDemand();
|
|
|
String recStr = recDemand == null ? "": recDemand.getId().toString();
|
|
|
@@ -93,53 +101,63 @@ public class ResumeBaseRecListHandlerEx extends ResumeBaseRecListHandler {
|
|
|
// 简历来源
|
|
|
ResumeSourceInfo resumeSource = taskInfo.getResumeSource();
|
|
|
String souStr = resumeSource == null ? "" : resumeSource.getId().toString();
|
|
|
- //taskInfo
|
|
|
+ // taskInfo 手机号
|
|
|
String phoneModify = com.kingdee.util.StringUtils.cnulls(taskInfo.get("phoneModify"));
|
|
|
-
|
|
|
- for (int i = 0; i < detailCol.size(); i++) {
|
|
|
- SmartImportTaskDetailInfo detailInfo = detailCol.get(i);
|
|
|
- // 附件名
|
|
|
- String resumeFileName = detailInfo.getResumeFileName();
|
|
|
- StringBuffer sbu = new StringBuffer();
|
|
|
- sbu.append(" select TOP 1 fid , FMobilePhone ");
|
|
|
- sbu.append(" from T_REC_ResumeBaseRec where ");
|
|
|
- sbu.append(" FCreatorID = '" + userId + "' ");
|
|
|
- sbu.append(" and FRecuritmentDemandID = '" + recStr + "' ");
|
|
|
- // 附件名称 FResumeFileName
|
|
|
- sbu.append(" and ( fid in ( select fboid from T_BAS_BoAttchAsso ");
|
|
|
- sbu.append(" where FAttachmentID in ( select fid from T_BAS_Attachment where fname_l2 ='"
|
|
|
- + resumeFileName + "' ) )");
|
|
|
- sbu.append(" or fid in ( select fboid from T_HR_SHRATTACHMENTEXT ");
|
|
|
- sbu.append(" where FAttachment in ( select fid from T_BAS_Attachment where fname_l2 ='"
|
|
|
- + resumeFileName + "' ) ) )");
|
|
|
- //内部推荐人
|
|
|
- if (!StringUtils.isEmpty(inPersonStr)) {
|
|
|
- sbu.append(" and FInterRecomendationID = '" + inPersonStr + "' ");
|
|
|
- }
|
|
|
- // 简历来源
|
|
|
- if (!StringUtils.isEmpty(souStr)) {
|
|
|
- sbu.append(" and FResSourceID = '" + souStr + "' ");
|
|
|
- }
|
|
|
+ // 是否重点人才
|
|
|
+ boolean isKeyTalent = taskInfo.getBoolean("isKeyTalent");
|
|
|
+
|
|
|
+ // 附件名
|
|
|
+ String resumeFileName = detailInfo.getResumeFileName();
|
|
|
+ StringBuffer sbu = new StringBuffer();
|
|
|
+ sbu.append(" select TOP 1 fid , FMobilePhone ");
|
|
|
+ sbu.append(" from T_REC_ResumeBaseRec where ");
|
|
|
+ sbu.append(" FCreatorID = '" + userId + "' ");
|
|
|
+ sbu.append(" and FRecuritmentDemandID = '" + recStr + "' ");
|
|
|
+ // 附件名称 FResumeFileName
|
|
|
+ sbu.append(" and ( fid in ( select fboid from T_BAS_BoAttchAsso ");
|
|
|
+ sbu.append(" where FAttachmentID in ( select fid from T_BAS_Attachment where fname_l2 ='"
|
|
|
+ + resumeFileName + "' ) )");
|
|
|
+ sbu.append(" or fid in ( select fboid from T_HR_SHRATTACHMENTEXT ");
|
|
|
+ sbu.append(" where FAttachment in ( select fid from T_BAS_Attachment where fname_l2 ='"
|
|
|
+ + resumeFileName + "' ) ) )");
|
|
|
+ //内部推荐人
|
|
|
+ if (!StringUtils.isEmpty(inPersonStr)) {
|
|
|
+ sbu.append(" and FInterRecomendationID = '" + inPersonStr + "' ");
|
|
|
+ }
|
|
|
+ // 简历来源
|
|
|
+ if (!StringUtils.isEmpty(souStr)) {
|
|
|
+ sbu.append(" and FResSourceID = '" + souStr + "' ");
|
|
|
+ }
|
|
|
+ IRowSet executeQuery = null;
|
|
|
|
|
|
- if (!StringUtils.isEmpty(phoneModify)) {
|
|
|
- IRowSet executeQuery = DbUtil.executeQuery(ctx, sbu.toString());
|
|
|
- if (executeQuery.next()) {
|
|
|
- String fid = executeQuery.getString("fid");
|
|
|
- String FMobilePhone = executeQuery.getString("FMobilePhone");
|
|
|
- if (!StringUtils.equals(FMobilePhone, phoneModify)) {
|
|
|
- String upsql = " update T_REC_ResumeBaseRec set FMobilePhone = '" + phoneModify
|
|
|
- + "' where fid = '" + fid + "'";
|
|
|
- DbUtil.execute(ctx, upsql);
|
|
|
- }
|
|
|
+ if (!StringUtils.isEmpty(phoneModify) || isKeyTalent) {
|
|
|
+ executeQuery = DbUtil.executeQuery(ctx, sbu.toString());
|
|
|
+ if (executeQuery.next()) {
|
|
|
+ String resumeId = executeQuery.getString("fid");
|
|
|
+ String FMobilePhone = executeQuery.getString("FMobilePhone");
|
|
|
+ if (!StringUtils.equals(FMobilePhone, phoneModify) && !StringUtils.isEmpty(phoneModify)) {
|
|
|
+ String upsql = " update T_REC_ResumeBaseRec set FMobilePhone = '" + phoneModify
|
|
|
+ + "' where fid = '" + resumeId + "'";
|
|
|
+ DbUtil.execute(ctx, upsql);
|
|
|
+ }
|
|
|
+ // 如果是重点人才
|
|
|
+ if (isKeyTalent && !ResumeFocusOnFactory.getLocalInstance(ctx).isTalent(resumeId,
|
|
|
+ FocusOnSource.resume)) {
|
|
|
+ ResumeFocusOnFactory.getLocalInstance(ctx).joinFocusOn(resumeId, FocusOnSource.resume,
|
|
|
+ "简历筛选重点关注");
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
} catch (SQLException e) {
|
|
|
e.printStackTrace();
|
|
|
} catch (BOSException e) {
|
|
|
e.printStackTrace();
|
|
|
+ } catch (EASBizException e) {
|
|
|
+ e.printStackTrace();
|
|
|
}
|
|
|
|
|
|
}
|