ソースを参照

加离职原因校验

qingwu 4 ヶ月 前
コミット
3954d47284

+ 10 - 3
src/com/kingdee/eas/custom/recuritment/task/RecuritmentFacadeControllerBean.java

@@ -579,10 +579,12 @@ public class RecuritmentFacadeControllerBean extends AbstractRecuritmentFacadeCo
         saveResumeBaseRec(ctx, personProfile, resumeInfo, mapData);
         JSONArray education = resumeJson.getJSONArray("education");
         saveEducationExpRE(ctx, education, resumeInfo);
-        // 使用Map定义简历部分与处理方法的对应关系
+        JSONArray workExperience = resumeJson.getJSONArray("workExperience");
+        saveWorkingExp(ctx, workExperience, resumeInfo);
+        //使用Map定义简历部分与处理方法的对应关系
         Map<String, TriConsumer<Context, JSONArray, ResumeBaseRecInfo>> sectionHandlers = new LinkedHashMap<>();
         //sectionHandlers.put("personProfile", this::saveResumeBaseRec);
-        sectionHandlers.put("workExperience", this::saveWorkingExp);
+        //sectionHandlers.put("workExperience", this::saveWorkingExp);
         //sectionHandlers.put("education", this::saveEducationExpRE);
         sectionHandlers.put("project", this::saveProjectExp);
         sectionHandlers.put("train", this::saveTrainingExp);
@@ -912,7 +914,7 @@ public class RecuritmentFacadeControllerBean extends AbstractRecuritmentFacadeCo
      *
      * @param workExperience
      */
-    public void saveWorkingExp(Context ctx, JSONArray workExperience, ResumeBaseRecInfo resumeBaseRecInfo) {
+    public void saveWorkingExp(Context ctx, JSONArray workExperience, ResumeBaseRecInfo resumeBaseRecInfo) throws BOSException {
         logger.error("workExperience--" + workExperience);
         try {
             IWorkingExp iWorkingExp = WorkingExpFactory.getLocalInstance(ctx);
@@ -991,11 +993,16 @@ public class RecuritmentFacadeControllerBean extends AbstractRecuritmentFacadeCo
                         workingExpInfo.setUnitAddress(text);
                     }
                 }
+                String leavingReason = workingExpInfo.getLeavingReason();
+                if (com.kingdee.bos.rabbitmq.util.StringUtils.isEmpty(leavingReason)) {
+                    throw new BOSException("工作经历:离职原因不能为空!!");
+                }
                 iWorkingExp.save(workingExpInfo);
 
             }
         } catch (Exception e) {
             logger.error("简历-工作经历保存失败!" + e.getMessage());
+            throw new BOSException(e);
         }
     }