Explorar el Código

更新 同步北森简历facade

Heyuan hace 2 semanas
padre
commit
0c6d09089a

+ 11 - 2
src/com/kingdee/eas/custom/recuritment/task/RecuritmentFacadeControllerBean.java

@@ -683,6 +683,8 @@ public class RecuritmentFacadeControllerBean extends AbstractRecuritmentFacadeCo
             IDegree iDegree = DegreeFactory.getLocalInstance(ctx);
             //学院类型
             Map<String, String> bchoolTypeMap = InitialValueUtils.getBchoolTypeMap();
+            //最晚开始日期
+            Date maxStartDate = null;
             for (int i = 0; i < education.size(); i++) {
                 JSONArray array = education.getJSONArray(i);
                 EducationExpRECInfo educationExpRECInfo = new EducationExpRECInfo();
@@ -695,7 +697,8 @@ public class RecuritmentFacadeControllerBean extends AbstractRecuritmentFacadeCo
                     String text = data.getString("text");
                     //dateStart	开始时间
                     if ("StartDate".equals(name)) {
-                        educationExpRECInfo.setDateStart(DateTimeUtils.parseDate(text, "yyyy/MM"));
+                        Date date = DateTimeUtils.parseDate(text, "yyyy/MM");
+                        educationExpRECInfo.setDateStart(date);
                     }
                     //dateEnd	结束时间
                     if ("EndDate".equals(name)) {
@@ -747,6 +750,11 @@ public class RecuritmentFacadeControllerBean extends AbstractRecuritmentFacadeCo
                 if (educationExpRECInfo.getDegreeF7() == null) {
                     throw new BOSException("教育经历:学历不能为空" + errorMsg);
                 }
+                if (maxStartDate == null || maxStartDate.before(dateStart)) {
+                    maxStartDate = dateStart;
+                    resumeBaseRecInfo.setMajor(educationExpRECInfo.getMajor());
+                    resumeBaseRecInfo.setSchool(educationExpRECInfo.getSchool());
+                }
                 iEducationExpREC.save(educationExpRECInfo);
             }
         } catch (Exception e) {
@@ -755,7 +763,8 @@ public class RecuritmentFacadeControllerBean extends AbstractRecuritmentFacadeCo
             logger.error("简历-教育经历保存失败!" + e.getMessage());
             throw new RuntimeException(e);
         }
-
+        IResumeBaseRec iResumeBaseRec = ResumeBaseRecFactory.getLocalInstance(ctx);
+        iResumeBaseRec.save(resumeBaseRecInfo);
     }
 
     /**