|
@@ -35,13 +35,14 @@ import org.apache.log4j.Logger;
|
|
|
import org.apache.logging.log4j.util.TriConsumer;
|
|
|
|
|
|
import java.io.IOException;
|
|
|
+import java.text.ParseException;
|
|
|
import java.time.LocalDate;
|
|
|
import java.time.LocalDateTime;
|
|
|
import java.time.format.DateTimeFormatter;
|
|
|
import java.util.*;
|
|
|
|
|
|
public class RecuritmentFacadeControllerBean extends AbstractRecuritmentFacadeControllerBean {
|
|
|
- private static Logger logger = Logger.getLogger(RecuritmentFacadeControllerBean.class);
|
|
|
+ private static final Logger logger = Logger.getLogger(RecuritmentFacadeControllerBean.class);
|
|
|
|
|
|
|
|
|
// 北京时区/shanghai时区
|
|
@@ -210,7 +211,7 @@ public class RecuritmentFacadeControllerBean extends AbstractRecuritmentFacadeCo
|
|
|
throw new BOSException("获取{}文件信息失败: 返回结果为null" + fileType);
|
|
|
}
|
|
|
Integer code = fileInfo.getInteger("code");
|
|
|
- if (code == null || !Integer.valueOf(200).equals(code)) {
|
|
|
+ if (!Integer.valueOf(200).equals(code)) {
|
|
|
throw new BOSException("获取{" + fileType + "}文件失败: 返回code={" + code + "}");
|
|
|
}
|
|
|
JSONObject data = fileInfo.getJSONObject("data");
|
|
@@ -243,13 +244,16 @@ public class RecuritmentFacadeControllerBean extends AbstractRecuritmentFacadeCo
|
|
|
/**
|
|
|
* 处理简历各部分数据
|
|
|
*/
|
|
|
- private void processResumeSections(Context ctx, JSONObject resumeJson, ResumeBaseRecInfo resumeInfo) {
|
|
|
-
|
|
|
+ private void processResumeSections(Context ctx, JSONObject resumeJson, ResumeBaseRecInfo resumeInfo) throws BOSException, EASBizException, ParseException, IOException {
|
|
|
+ JSONArray personProfile = resumeJson.getJSONArray("personProfile");
|
|
|
+ saveResumeBaseRec(ctx, personProfile, resumeInfo);
|
|
|
+ JSONArray education = resumeJson.getJSONArray("education");
|
|
|
+ saveEducationExpRE(ctx, education, resumeInfo);
|
|
|
// 使用Map定义简历部分与处理方法的对应关系
|
|
|
Map<String, TriConsumer<Context, JSONArray, ResumeBaseRecInfo>> sectionHandlers = new LinkedHashMap<>();
|
|
|
- sectionHandlers.put("personProfile", this::saveResumeBaseRec);
|
|
|
+ //sectionHandlers.put("personProfile", this::saveResumeBaseRec);
|
|
|
sectionHandlers.put("workExperience", this::saveWorkingExp);
|
|
|
- sectionHandlers.put("education", this::saveEducationExpRE);
|
|
|
+ //sectionHandlers.put("education", this::saveEducationExpRE);
|
|
|
sectionHandlers.put("project", this::saveProjectExp);
|
|
|
sectionHandlers.put("train", this::saveTrainingExp);
|
|
|
sectionHandlers.put("certificate", this::saveCredential);
|
|
@@ -315,249 +319,255 @@ public class RecuritmentFacadeControllerBean extends AbstractRecuritmentFacadeCo
|
|
|
*
|
|
|
* @param personProfile
|
|
|
*/
|
|
|
- public void saveResumeBaseRec(Context ctx, JSONArray personProfile, ResumeBaseRecInfo resumeBaseRecInfo) {
|
|
|
+ public void saveResumeBaseRec(Context ctx, JSONArray personProfile, ResumeBaseRecInfo resumeBaseRecInfo) throws BOSException, EASBizException, ParseException, IOException {
|
|
|
logger.error("personProfile--" + personProfile);
|
|
|
- try {
|
|
|
- BeisenParamByProperties beisenParamByProperties = new BeisenParamByProperties();
|
|
|
- Map<String, String> config = beisenParamByProperties.getConfig();
|
|
|
- //招聘业务组织
|
|
|
- HROrgUnitInfo hrOrgUnitInfo = new HROrgUnitInfo();
|
|
|
- hrOrgUnitInfo.setId(BOSUuid.read("00000000-0000-0000-0000-000000000000CCE7AED4"));
|
|
|
- resumeBaseRecInfo.setHrOrgUnit(hrOrgUnitInfo);
|
|
|
- //来源方式 INTEGRATESYSTEM=集成系统
|
|
|
- resumeBaseRecInfo.setSourceMethod(ResumeSourceMethod.INTEGRATESYSTEM);
|
|
|
- //招聘状态 WAITING 待筛选
|
|
|
- resumeBaseRecInfo.setResumeStatus(ResumeStatusEnum.WAITING);
|
|
|
- //招聘状态 0001 待筛选
|
|
|
- IResumeState iResumeState = ResumeStateFactory.getLocalInstance(ctx);
|
|
|
- ResumeStateInfo resumeStateInfo = iResumeState.getResumeStateInfo("where number = '0001'");
|
|
|
- resumeBaseRecInfo.setResumeState(resumeStateInfo);
|
|
|
- //入库时间
|
|
|
- resumeBaseRecInfo.setWarehouseEntry(new Date());
|
|
|
- //国籍
|
|
|
- INationality iNationality = NationalityFactory.getLocalInstance(ctx);
|
|
|
- //学历
|
|
|
- IDiploma iDiploma = DiplomaFactory.getLocalInstance(ctx);
|
|
|
- //政治面貌
|
|
|
- IPoliticalFace iPoliticalFace = PoliticalFaceFactory.getLocalInstance(ctx);
|
|
|
- //民族
|
|
|
- IFolk iFolk = FolkFactory.getLocalInstance(ctx);
|
|
|
- //婚姻状况
|
|
|
- IWed iWed = WedFactory.getLocalInstance(ctx);
|
|
|
- //血型
|
|
|
- Map<String, String> bloodTypeMap = InitialValueUtils.bloodTypeMap;
|
|
|
- Map<String, String> getbloodTypeMap = InitialValueUtils.getBloodTypeMap();
|
|
|
-
|
|
|
- String carType = "";//证件类型
|
|
|
- String carno = "";//证件号
|
|
|
- for (int i = 0; i < personProfile.size(); i++) {
|
|
|
- JSONObject data = personProfile.getJSONObject(i);
|
|
|
- String name = data.getString("name");
|
|
|
- String value = data.getString("value");
|
|
|
- String text = data.getString("text");
|
|
|
- //姓名
|
|
|
- if ("Name".equals(name)) {
|
|
|
- resumeBaseRecInfo.setName(text);
|
|
|
- }
|
|
|
- //参加工作时间
|
|
|
- if ("WorkStartTime".equals(name)) {
|
|
|
- resumeBaseRecInfo.setWorkDate(DateTimeUtils.parseDate(text, "yyyy/MM/dd"));
|
|
|
- }
|
|
|
- //参加工作年限 workSeniority
|
|
|
- if ("YearsOfWork".equals(name)) {
|
|
|
- resumeBaseRecInfo.setWorkSeniority(text);
|
|
|
- }
|
|
|
- //身份证号码 identityCardNo
|
|
|
- if ("CertificateNumber".equals(name)) {
|
|
|
- carno = text;
|
|
|
- if ("身份证".equals(carType)) {
|
|
|
- resumeBaseRecInfo.setIdentityCardNo(carno);
|
|
|
- resumeBaseRecInfo.setPassportNo("");
|
|
|
- } else {
|
|
|
- resumeBaseRecInfo.setPassportNo(carno);
|
|
|
- }
|
|
|
- }
|
|
|
- //证件类型
|
|
|
- if ("CertificateType".equals(name)) {
|
|
|
- carType = text;
|
|
|
- if ("身份证".equals(text)) {
|
|
|
- resumeBaseRecInfo.setIdentityCardNo(carno);
|
|
|
- resumeBaseRecInfo.setPassportNo("");
|
|
|
- } else {
|
|
|
- resumeBaseRecInfo.setPassportNo(carno);
|
|
|
- }
|
|
|
- }
|
|
|
- //出生年月 birthday
|
|
|
- if ("Birthday".equals(name)) {
|
|
|
- resumeBaseRecInfo.setBirthday(DateTimeUtils.parseDate(text, "yyyy/MM/dd"));
|
|
|
- }
|
|
|
- //户口所在地 domicilePlace
|
|
|
- if ("AccountArea".equals(name)) {
|
|
|
- resumeBaseRecInfo.setDomicilePlace(text);
|
|
|
- }
|
|
|
- //QQ QQ
|
|
|
- if ("QQ".equals(name)) {
|
|
|
- resumeBaseRecInfo.setQQ(text);
|
|
|
- }
|
|
|
- //身高 stature
|
|
|
- if ("Height".equals(name)) {
|
|
|
- resumeBaseRecInfo.setStature(text);
|
|
|
- }
|
|
|
- //现居住地 nowResidence
|
|
|
- if ("LivingArea".equals(name)) {
|
|
|
- resumeBaseRecInfo.setNowResidence(text);
|
|
|
- }
|
|
|
- //手机号 mobilePhone
|
|
|
- if ("Mobile".equals(name)) {
|
|
|
- resumeBaseRecInfo.setMobilePhone(text);
|
|
|
- }
|
|
|
- //家庭电话 fixedPhone
|
|
|
- if ("Telephone".equals(name)) {
|
|
|
- resumeBaseRecInfo.setFixedPhone(text);
|
|
|
- }
|
|
|
- //邮件 email
|
|
|
- if ("Email".equals(name)) {
|
|
|
- resumeBaseRecInfo.setEmail(text);
|
|
|
- }
|
|
|
- //目前年薪 annualPay
|
|
|
- if ("Salary".equals(name)) {
|
|
|
- resumeBaseRecInfo.setAnnualPay(text);
|
|
|
- }
|
|
|
- //目前工作状态 currentWorkingStatus
|
|
|
- if ("JobHunting".equals(name)) {
|
|
|
- resumeBaseRecInfo.setCurrentWorkingStatus(CurrentWorkingStatusEnum.getEnum(Integer.parseInt(value) - 1));
|
|
|
- }
|
|
|
- //期望年薪 expectantPay
|
|
|
- if ("ExpectSalary".equals(name)) {
|
|
|
- resumeBaseRecInfo.setExpectantPay(Integer.parseInt(text));
|
|
|
- }
|
|
|
- //职业目标 careerGoal
|
|
|
- if ("CareerGoals".equals(name)) {
|
|
|
- resumeBaseRecInfo.setCareerGoal(text);
|
|
|
- }
|
|
|
- //自我评价 selfEvaluation
|
|
|
- if ("Evaluation".equals(name)) {
|
|
|
- resumeBaseRecInfo.setSelfEvaluation(text);
|
|
|
- }
|
|
|
- //国籍 national
|
|
|
- if ("Nationality".equals(name)) {
|
|
|
- NationalityCollection nationalityCollection = iNationality.getNationalityCollection("where name like '%" + text + "%'");
|
|
|
- if (nationalityCollection.size() > 0) {
|
|
|
- resumeBaseRecInfo.setNational(nationalityCollection.get(0));
|
|
|
- }
|
|
|
- }
|
|
|
- //籍贯 nativePlace
|
|
|
- if ("NativeArea".equals(name)) {
|
|
|
- resumeBaseRecInfo.setNativePlace(text);
|
|
|
- }
|
|
|
- //年龄 age
|
|
|
- if ("OceanAge".equals(name)) {
|
|
|
- resumeBaseRecInfo.setAge(Integer.parseInt(text));
|
|
|
- }
|
|
|
- //最高学历 hDegree
|
|
|
- if ("EducationLevel".equals(name)) {
|
|
|
- DiplomaCollection diplomaCollection = iDiploma.getDiplomaCollection("where beisenVal = '" + value + "'");
|
|
|
- if (!diplomaCollection.isEmpty()) {
|
|
|
- resumeBaseRecInfo.setHDegree(diplomaCollection.get(0));
|
|
|
- }
|
|
|
- }
|
|
|
- //政治面貌 politicalFace
|
|
|
- if ("Polity".equals(name)) {
|
|
|
- PoliticalFaceCollection politicalFaceCollection = iPoliticalFace.getPoliticalFaceCollection("where beisenVal = '" + value + "'");
|
|
|
- if (!politicalFaceCollection.isEmpty()) {
|
|
|
- resumeBaseRecInfo.setPoliticalFace(politicalFaceCollection.get(0));
|
|
|
- }
|
|
|
- }
|
|
|
- //婚姻状况 wed 北森已停用字段
|
|
|
- if (config.get("WedState").equals(name)) {
|
|
|
- WedCollection wedCollection = iWed.getWedCollection("where beisenVal = '" + value + "'");
|
|
|
- if (!wedCollection.isEmpty()) {
|
|
|
- resumeBaseRecInfo.setWed(wedCollection.get(0));
|
|
|
- }
|
|
|
- }
|
|
|
- //民族 folk
|
|
|
- if ("Nation".equals(name)) {
|
|
|
- FolkCollection folkCollection = iFolk.getFolkCollection("where beisenVal = '" + value + "'");
|
|
|
- if (!folkCollection.isEmpty()) {
|
|
|
- resumeBaseRecInfo.setFolk(folkCollection.get(0));
|
|
|
- }
|
|
|
- }
|
|
|
- //毕业学校 school
|
|
|
- if ("LastSchool".equals(name)) {
|
|
|
- resumeBaseRecInfo.setName(text);
|
|
|
- }
|
|
|
- //血型 bloodType
|
|
|
- if ("BloodType".equals(name)) {
|
|
|
- String hDegree = bloodTypeMap.getOrDefault(value, "90");
|
|
|
- resumeBaseRecInfo.setBloodType(BloodType.getEnum(hDegree));
|
|
|
- }
|
|
|
- //紧急联系人 emergencyContact
|
|
|
- if ("EmergencyContact".equals(name)) {
|
|
|
- resumeBaseRecInfo.setEmergencyContact(text);
|
|
|
- }
|
|
|
- //紧急联系人电话 emergencyContactPhone
|
|
|
- if ("EmergencyPhone".equals(name)) {
|
|
|
- resumeBaseRecInfo.setEmergencyContactPhone(text);
|
|
|
- }
|
|
|
- //期望月薪 expectantPayStr
|
|
|
- if ("ExpectSalary".equals(name)) {
|
|
|
- resumeBaseRecInfo.setExpectantPayStr(text);
|
|
|
- }
|
|
|
- //最近工作单位 lastCompany
|
|
|
- if ("LastCompany".equals(name)) {
|
|
|
- resumeBaseRecInfo.setLastCompany(text);
|
|
|
- }
|
|
|
- //最近工作行业 lastIndustry
|
|
|
- if ("LastIndustry".equals(name)) {
|
|
|
- resumeBaseRecInfo.setLastIndustry(text);
|
|
|
- }
|
|
|
- //专业 major
|
|
|
- if ("LastDiscipline".equals(name)) {
|
|
|
- resumeBaseRecInfo.setMajor(text);
|
|
|
+ BeisenParamByProperties beisenParamByProperties = new BeisenParamByProperties();
|
|
|
+ Map<String, String> config = beisenParamByProperties.getConfig();
|
|
|
+ //招聘业务组织
|
|
|
+ HROrgUnitInfo hrOrgUnitInfo = new HROrgUnitInfo();
|
|
|
+ hrOrgUnitInfo.setId(BOSUuid.read("00000000-0000-0000-0000-000000000000CCE7AED4"));
|
|
|
+ resumeBaseRecInfo.setHrOrgUnit(hrOrgUnitInfo);
|
|
|
+ //来源方式 INTEGRATESYSTEM=集成系统
|
|
|
+ resumeBaseRecInfo.setSourceMethod(ResumeSourceMethod.INTEGRATESYSTEM);
|
|
|
+ //招聘状态 WAITING 待筛选
|
|
|
+ resumeBaseRecInfo.setResumeStatus(ResumeStatusEnum.WAITING);
|
|
|
+ //招聘状态 0001 待筛选
|
|
|
+ IResumeState iResumeState = ResumeStateFactory.getLocalInstance(ctx);
|
|
|
+ ResumeStateInfo resumeStateInfo = iResumeState.getResumeStateInfo("where number = '0001'");
|
|
|
+ resumeBaseRecInfo.setResumeState(resumeStateInfo);
|
|
|
+ //入库时间
|
|
|
+ resumeBaseRecInfo.setWarehouseEntry(new Date());
|
|
|
+ //国籍
|
|
|
+ INationality iNationality = NationalityFactory.getLocalInstance(ctx);
|
|
|
+ //学历
|
|
|
+ IDiploma iDiploma = DiplomaFactory.getLocalInstance(ctx);
|
|
|
+ //政治面貌
|
|
|
+ IPoliticalFace iPoliticalFace = PoliticalFaceFactory.getLocalInstance(ctx);
|
|
|
+ //民族
|
|
|
+ IFolk iFolk = FolkFactory.getLocalInstance(ctx);
|
|
|
+ //婚姻状况
|
|
|
+ IWed iWed = WedFactory.getLocalInstance(ctx);
|
|
|
+ //血型
|
|
|
+ Map<String, String> bloodTypeMap = InitialValueUtils.bloodTypeMap;
|
|
|
+ String carType = "";//证件类型
|
|
|
+ String carno = "";//证件号
|
|
|
+ for (int i = 0; i < personProfile.size(); i++) {
|
|
|
+ JSONObject data = personProfile.getJSONObject(i);
|
|
|
+ String name = data.getString("name");
|
|
|
+ String value = data.getString("value");
|
|
|
+ String text = data.getString("text");
|
|
|
+ //姓名
|
|
|
+ if ("Name".equals(name)) {
|
|
|
+ resumeBaseRecInfo.setName(text);
|
|
|
+ }
|
|
|
+ //参加工作时间
|
|
|
+ if ("WorkStartTime".equals(name)) {
|
|
|
+ resumeBaseRecInfo.setWorkDate(DateTimeUtils.parseDate(text, "yyyy/MM/dd"));
|
|
|
+ }
|
|
|
+ //参加工作年限 workSeniority
|
|
|
+ if ("YearsOfWork".equals(name)) {
|
|
|
+ resumeBaseRecInfo.setWorkSeniority(text);
|
|
|
+ }
|
|
|
+ //身份证号码 identityCardNo
|
|
|
+ if ("CertificateNumber".equals(name)) {
|
|
|
+ carno = text;
|
|
|
+ if ("身份证".equals(carType)) {
|
|
|
+ resumeBaseRecInfo.setIdentityCardNo(carno);
|
|
|
+ resumeBaseRecInfo.setPassportNo("");
|
|
|
+ } else {
|
|
|
+ resumeBaseRecInfo.setPassportNo(carno);
|
|
|
}
|
|
|
- //性别 gender
|
|
|
- if ("Gender".equals(name)) {
|
|
|
- if ("1".equals(value) || "0".equals(value)) {
|
|
|
- resumeBaseRecInfo.setGender(Genders.getEnum(Integer.parseInt(value) + 1));
|
|
|
- }
|
|
|
+ }
|
|
|
+ //证件类型
|
|
|
+ if ("CertificateType".equals(name)) {
|
|
|
+ carType = text;
|
|
|
+ if ("身份证".equals(text)) {
|
|
|
+ resumeBaseRecInfo.setIdentityCardNo(carno);
|
|
|
+ resumeBaseRecInfo.setPassportNo("");
|
|
|
+ } else {
|
|
|
+ resumeBaseRecInfo.setPassportNo(carno);
|
|
|
}
|
|
|
- //更新简历时间 updateResumeDate
|
|
|
- if ("ResumeUpdateTime".equals(name)) {
|
|
|
- resumeBaseRecInfo.setUpdateResumeDate(DateTimeUtils.parseDate(text, "yyyy/MM/dd"));
|
|
|
+ }
|
|
|
+ //出生年月 birthday
|
|
|
+ if ("Birthday".equals(name)) {
|
|
|
+ resumeBaseRecInfo.setBirthday(DateTimeUtils.parseDate(text, "yyyy/MM/dd"));
|
|
|
+ }
|
|
|
+ //户口所在地 domicilePlace
|
|
|
+ if ("AccountArea".equals(name)) {
|
|
|
+ resumeBaseRecInfo.setDomicilePlace(text);
|
|
|
+ }
|
|
|
+ //QQ QQ
|
|
|
+ if ("QQ".equals(name)) {
|
|
|
+ resumeBaseRecInfo.setQQ(text);
|
|
|
+ }
|
|
|
+ //身高 stature
|
|
|
+ if ("Height".equals(name)) {
|
|
|
+ resumeBaseRecInfo.setStature(text);
|
|
|
+ }
|
|
|
+ //现居住地 nowResidence
|
|
|
+ if ("LivingArea".equals(name)) {
|
|
|
+ resumeBaseRecInfo.setNowResidence(text);
|
|
|
+ }
|
|
|
+ //手机号 mobilePhone
|
|
|
+ if ("Mobile".equals(name)) {
|
|
|
+ resumeBaseRecInfo.setMobilePhone(text);
|
|
|
+ }
|
|
|
+ //家庭电话 fixedPhone
|
|
|
+ if ("Telephone".equals(name)) {
|
|
|
+ resumeBaseRecInfo.setFixedPhone(text);
|
|
|
+ }
|
|
|
+ //邮件 email
|
|
|
+ if ("Email".equals(name)) {
|
|
|
+ resumeBaseRecInfo.setEmail(text);
|
|
|
+ }
|
|
|
+ //目前年薪 annualPay
|
|
|
+ if ("Salary".equals(name)) {
|
|
|
+ resumeBaseRecInfo.setAnnualPay(text);
|
|
|
+ }
|
|
|
+ //目前工作状态 currentWorkingStatus
|
|
|
+ if ("JobHunting".equals(name)) {
|
|
|
+ resumeBaseRecInfo.setCurrentWorkingStatus(CurrentWorkingStatusEnum.getEnum(Integer.parseInt(value) - 1));
|
|
|
+ }
|
|
|
+ //期望年薪 expectantPay
|
|
|
+ if ("ExpectSalary".equals(name)) {
|
|
|
+ resumeBaseRecInfo.setExpectantPay(Integer.parseInt(text));
|
|
|
+ }
|
|
|
+ //职业目标 careerGoal
|
|
|
+ if ("CareerGoals".equals(name)) {
|
|
|
+ resumeBaseRecInfo.setCareerGoal(text);
|
|
|
+ }
|
|
|
+ //自我评价 selfEvaluation
|
|
|
+ if ("Evaluation".equals(name)) {
|
|
|
+ resumeBaseRecInfo.setSelfEvaluation(text);
|
|
|
+ }
|
|
|
+ //国籍 national
|
|
|
+ if ("Nationality".equals(name)) {
|
|
|
+ NationalityCollection nationalityCollection = iNationality.getNationalityCollection("where name like '%" + text + "%'");
|
|
|
+ if (nationalityCollection.size() > 0) {
|
|
|
+ resumeBaseRecInfo.setNational(nationalityCollection.get(0));
|
|
|
}
|
|
|
- //签发机关 idCardIssueOrg
|
|
|
- if ("CertificateGrantUnit".equals(name)) {
|
|
|
- resumeBaseRecInfo.setIdentityCardNo(text);
|
|
|
+ }
|
|
|
+ //籍贯 nativePlace
|
|
|
+ if ("NativeArea".equals(name)) {
|
|
|
+ resumeBaseRecInfo.setNativePlace(text);
|
|
|
+ }
|
|
|
+ //年龄 age
|
|
|
+ if ("OceanAge".equals(name)) {
|
|
|
+ resumeBaseRecInfo.setAge(Integer.parseInt(text));
|
|
|
+ }
|
|
|
+ //最高学历 hDegree
|
|
|
+ if ("EducationLevel".equals(name)) {
|
|
|
+ DiplomaCollection diplomaCollection = iDiploma.getDiplomaCollection("where beisenVal = '" + value + "'");
|
|
|
+ if (!diplomaCollection.isEmpty()) {
|
|
|
+ resumeBaseRecInfo.setHDegree(diplomaCollection.get(0));
|
|
|
}
|
|
|
- //证件有效期-开始时间 idCardBeginDate
|
|
|
- if ("CertificateValidityDate".equals(name)) {
|
|
|
- resumeBaseRecInfo.setIdCardBeginDate(DateTimeUtils.parseDate(text, "yyyy/MM/dd"));
|
|
|
+ }
|
|
|
+ //政治面貌 politicalFace
|
|
|
+ if ("Polity".equals(name)) {
|
|
|
+ PoliticalFaceCollection politicalFaceCollection = iPoliticalFace.getPoliticalFaceCollection("where beisenVal = '" + value + "'");
|
|
|
+ if (!politicalFaceCollection.isEmpty()) {
|
|
|
+ resumeBaseRecInfo.setPoliticalFace(politicalFaceCollection.get(0));
|
|
|
}
|
|
|
- //证件有效期-结束时间 idCardEndDate
|
|
|
- if ("CertificateValidityOverDate".equals(name)) {
|
|
|
- resumeBaseRecInfo.setIdCardEndDate(DateTimeUtils.parseDate(text, "yyyy/MM/dd"));
|
|
|
+ }
|
|
|
+ //婚姻状况 wed 北森已停用字段
|
|
|
+ if (config.get("WedState").equals(name)) {
|
|
|
+ WedCollection wedCollection = iWed.getWedCollection("where beisenVal = '" + value + "'");
|
|
|
+ if (!wedCollection.isEmpty()) {
|
|
|
+ resumeBaseRecInfo.setWed(wedCollection.get(0));
|
|
|
}
|
|
|
- //到岗时间 arrivalTime
|
|
|
- if ("AvailableDate".equals(name)) {
|
|
|
- resumeBaseRecInfo.setArrivalTime(DateTimeUtils.parseDate(text, "yyyy/MM/dd"));
|
|
|
+ }
|
|
|
+ //民族 folk
|
|
|
+ if ("Nation".equals(name)) {
|
|
|
+ FolkCollection folkCollection = iFolk.getFolkCollection("where beisenVal = '" + value + "'");
|
|
|
+ if (!folkCollection.isEmpty()) {
|
|
|
+ resumeBaseRecInfo.setFolk(folkCollection.get(0));
|
|
|
}
|
|
|
- //英文名 EnglishName
|
|
|
- if ("NameEn".equals(name)) {
|
|
|
- resumeBaseRecInfo.setEnglishName(text);
|
|
|
+ }
|
|
|
+ //毕业学校 school
|
|
|
+ if ("LastSchool".equals(name)) {
|
|
|
+ if (StringUtils.isEmpty(text)) {
|
|
|
+ throw new BOSException("毕业学校不能为空!");
|
|
|
}
|
|
|
- //户籍地址 domicileAddress
|
|
|
- if ("Address".equals(name)) {
|
|
|
- resumeBaseRecInfo.setDomicileAddress(text);
|
|
|
+ resumeBaseRecInfo.setName(text);
|
|
|
+ }
|
|
|
+ //血型 bloodType
|
|
|
+ if ("BloodType".equals(name)) {
|
|
|
+ String hDegree = bloodTypeMap.getOrDefault(value, "90");
|
|
|
+ resumeBaseRecInfo.setBloodType(BloodType.getEnum(hDegree));
|
|
|
+ }
|
|
|
+ //紧急联系人 emergencyContact
|
|
|
+ if ("EmergencyContact".equals(name)) {
|
|
|
+ resumeBaseRecInfo.setEmergencyContact(text);
|
|
|
+ }
|
|
|
+ //紧急联系人电话 emergencyContactPhone
|
|
|
+ if ("EmergencyPhone".equals(name)) {
|
|
|
+ resumeBaseRecInfo.setEmergencyContactPhone(text);
|
|
|
+ }
|
|
|
+ //期望月薪 expectantPayStr
|
|
|
+ if ("ExpectSalary".equals(name)) {
|
|
|
+ resumeBaseRecInfo.setExpectantPayStr(text);
|
|
|
+ }
|
|
|
+ //最近工作单位 lastCompany
|
|
|
+ if ("LastCompany".equals(name)) {
|
|
|
+ resumeBaseRecInfo.setLastCompany(text);
|
|
|
+ }
|
|
|
+ //最近工作行业 lastIndustry
|
|
|
+ if ("LastIndustry".equals(name)) {
|
|
|
+ resumeBaseRecInfo.setLastIndustry(text);
|
|
|
+ }
|
|
|
+ //专业 major
|
|
|
+ if ("LastDiscipline".equals(name)) {
|
|
|
+ resumeBaseRecInfo.setMajor(text);
|
|
|
+ }
|
|
|
+ //性别 gender
|
|
|
+ if ("Gender".equals(name)) {
|
|
|
+ if ("1".equals(value) || "0".equals(value)) {
|
|
|
+ resumeBaseRecInfo.setGender(Genders.getEnum(Integer.parseInt(value) + 1));
|
|
|
}
|
|
|
-
|
|
|
}
|
|
|
- IResumeBaseRec iResumeBaseRec = ResumeBaseRecFactory.getLocalInstance(ctx);
|
|
|
- IObjectPK save = iResumeBaseRec.save(resumeBaseRecInfo);
|
|
|
- logger.error("resumeBaseRecId--" + save);
|
|
|
- } catch (Exception e) {
|
|
|
- logger.error("简历基本信息报错信息:" + e.getMessage());
|
|
|
- throw new RuntimeException(e);
|
|
|
+ //更新简历时间 updateResumeDate
|
|
|
+ if ("ResumeUpdateTime".equals(name)) {
|
|
|
+ resumeBaseRecInfo.setUpdateResumeDate(DateTimeUtils.parseDate(text, "yyyy/MM/dd"));
|
|
|
+ }
|
|
|
+ //签发机关 idCardIssueOrg
|
|
|
+ if ("CertificateGrantUnit".equals(name)) {
|
|
|
+ resumeBaseRecInfo.setIdentityCardNo(text);
|
|
|
+ }
|
|
|
+ //证件有效期-开始时间 idCardBeginDate
|
|
|
+ if ("CertificateValidityDate".equals(name)) {
|
|
|
+ resumeBaseRecInfo.setIdCardBeginDate(DateTimeUtils.parseDate(text, "yyyy/MM/dd"));
|
|
|
+ }
|
|
|
+ //证件有效期-结束时间 idCardEndDate
|
|
|
+ if ("CertificateValidityOverDate".equals(name)) {
|
|
|
+ resumeBaseRecInfo.setIdCardEndDate(DateTimeUtils.parseDate(text, "yyyy/MM/dd"));
|
|
|
+ }
|
|
|
+ //到岗时间 arrivalTime
|
|
|
+ if ("AvailableDate".equals(name)) {
|
|
|
+ resumeBaseRecInfo.setArrivalTime(DateTimeUtils.parseDate(text, "yyyy/MM/dd"));
|
|
|
+ }
|
|
|
+ //英文名 EnglishName
|
|
|
+ if ("NameEn".equals(name)) {
|
|
|
+ resumeBaseRecInfo.setEnglishName(text);
|
|
|
+ }
|
|
|
+ //户籍地址 domicileAddress
|
|
|
+ if ("Address".equals(name)) {
|
|
|
+ resumeBaseRecInfo.setDomicileAddress(text);
|
|
|
+ }
|
|
|
}
|
|
|
+ String errorMsg = ",身份证号码、手机号为必填数据,请在北森维护数据后再次同步!";
|
|
|
+ if (StringUtils.isEmpty(resumeBaseRecInfo.getIdentityCardNo()) && StringUtils.isEmpty(resumeBaseRecInfo.getPassportNo())) {
|
|
|
+ throw new BOSException("身份证号码不能为空" + errorMsg);
|
|
|
+ }
|
|
|
+ if (StringUtils.isEmpty(resumeBaseRecInfo.getMobilePhone())) {
|
|
|
+ throw new BOSException("手机号码不能为空" + errorMsg);
|
|
|
+ }
|
|
|
+ IResumeBaseRec iResumeBaseRec = ResumeBaseRecFactory.getLocalInstance(ctx);
|
|
|
+ IObjectPK save = iResumeBaseRec.save(resumeBaseRecInfo);
|
|
|
+ logger.error("resumeBaseRecId--" + save);
|
|
|
+// } catch (Exception e) {
|
|
|
+// logger.error("简历基本信息报错信息:" + e.getMessage());
|
|
|
+// throw new RuntimeException(e);
|
|
|
+// }
|
|
|
|
|
|
|
|
|
}
|
|
@@ -659,7 +669,7 @@ public class RecuritmentFacadeControllerBean extends AbstractRecuritmentFacadeCo
|
|
|
*
|
|
|
* @param education
|
|
|
*/
|
|
|
- public void saveEducationExpRE(Context ctx, JSONArray education, ResumeBaseRecInfo resumeBaseRecInfo) {
|
|
|
+ public void saveEducationExpRE(Context ctx, JSONArray education, ResumeBaseRecInfo resumeBaseRecInfo) throws BOSException, EASBizException {
|
|
|
logger.error("education--" + education);
|
|
|
try {
|
|
|
IEducationExpREC iEducationExpREC = EducationExpRECFactory.getLocalInstance(ctx);
|
|
@@ -679,7 +689,6 @@ public class RecuritmentFacadeControllerBean extends AbstractRecuritmentFacadeCo
|
|
|
//简历基本信息
|
|
|
educationExpRECInfo.setResumeBase(resumeBaseRecInfo);
|
|
|
for (int j = 0; j < array.size(); j++) {
|
|
|
-
|
|
|
JSONObject data = array.getJSONObject(j);
|
|
|
String name = data.getString("name");
|
|
|
String value = data.getString("value");
|
|
@@ -724,10 +733,25 @@ public class RecuritmentFacadeControllerBean extends AbstractRecuritmentFacadeCo
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ String errorMsg = ",入学时间、专业、学历、毕业院校为必填数据,请在北森维护数据后再次同步!";
|
|
|
+ Date dateStart = educationExpRECInfo.getDateStart();
|
|
|
+ if (dateStart == null) {
|
|
|
+ throw new BOSException("教育经历:入学时间不能为空" + errorMsg);
|
|
|
+ }
|
|
|
+ if (StringUtils.isEmpty(educationExpRECInfo.getMajor())) {
|
|
|
+ throw new BOSException("教育经历:专业不能为空" + errorMsg);
|
|
|
+ }
|
|
|
+ if (StringUtils.isEmpty(educationExpRECInfo.getSchool())) {
|
|
|
+ throw new BOSException("教育经历:毕业院校不能为空" + errorMsg);
|
|
|
+ }
|
|
|
+ if (educationExpRECInfo.getDegreeF7() == null) {
|
|
|
+ throw new BOSException("教育经历:学历不能为空" + errorMsg);
|
|
|
+ }
|
|
|
iEducationExpREC.save(educationExpRECInfo);
|
|
|
-
|
|
|
}
|
|
|
} catch (Exception e) {
|
|
|
+ IResumeBaseRec iResumeBaseRec = ResumeBaseRecFactory.getLocalInstance(ctx);
|
|
|
+ iResumeBaseRec.delete(new ObjectUuidPK(resumeBaseRecInfo.getId()));
|
|
|
logger.error("简历-教育经历保存失败!" + e.getMessage());
|
|
|
throw new RuntimeException(e);
|
|
|
}
|