浏览代码

Merge branch 'master' of http://47.92.104.23:3000/project/guyitang

yuanzhi_kuang 2 周之前
父节点
当前提交
9c70826580

+ 4 - 1
metadata/entity_pkmapping.properties

@@ -1,3 +1,6 @@
 #
-#Thu Nov 21 14:09:26 CST 2024
+#Thu Jul 17 10:52:59 CST 2025
+0E34C69B=com.kingdee.eas.custom.recuritment.app.BeisenTalentPool
+D413A099=com.kingdee.eas.custom.recuritment.app.ApplicantBeisen
+06D5D0E3=com.kingdee.eas.custom.offerbatch.app.OfferBatch
 1C714FA2=com.kingdee.eas.custom.logs.app.MessageLogs

+ 5 - 1
metadata/facade_pkmapping.properties

@@ -1,2 +1,6 @@
 #
-#Thu Nov 21 14:09:26 CST 2024
+#Thu Jul 17 10:52:59 CST 2025
+3B6AFD99=com.kingdee.eas.custom.recuritment.task.ResignBeisenFacade
+49A51C3B=com.kingdee.eas.custom.recuritment.task.BeisenTransferPhaseFacade
+CF176C44=com.kingdee.eas.custom.recuritment.task.OnboardingBeisenFacade
+38763AD7=com.kingdee.eas.custom.recuritment.task.RecuritmentFacade

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

@@ -35,7 +35,7 @@ public class BeisenTransferPhaseFacade extends AbstractBizCtrl implements IBeise
         return (BeisenTransferPhaseFacadeController)getBizController();
     }
     /**
-     *syncRecApprovalToBeisen-User defined method
+     *同步录用报批状态到北森-User defined method
      *@param billId 单据id
      *@param preponeHours 提前小时数
      */
@@ -49,7 +49,7 @@ public class BeisenTransferPhaseFacade extends AbstractBizCtrl implements IBeise
         }
     }
     /**
-     *syncOfferToBeisen-User defined method
+     *同步offer状态到北森-User defined method
      *@param billId offer单据id
      *@param preponeHours 提前小时数
      */

+ 35 - 10
websrc/com/kingdee/eas/custom/recuritment/task/osf/BeisenFacadeOSFService.java

@@ -145,6 +145,8 @@ public class BeisenFacadeOSFService implements IHRMsfService {
     protected JSONObject removeApplicantFromTalentPool(Context ctx, String resignBizBillID) throws Exception {
 
         JSONObject result = new JSONObject();
+        result.put("code", "ses");
+        result.put("msg", "成功");
         ExecuteResultEnum syncStatus = ExecuteResultEnum.SUCCESS;
         try {
             IRowSet rowSet = DbUtil.executeQuery(ctx,"select CFCandidateId,CFSyncBeisenResult from T_HR_ResignBizBillEntry where fbillid=?",new String[]{resignBizBillID});
@@ -200,8 +202,18 @@ public class BeisenFacadeOSFService implements IHRMsfService {
         } finally {
             List<String> candidateIds = (List<String>) result.get("candidateIds");
             if(null!=candidateIds&&(!candidateIds.isEmpty())) {
-                updateSyncBeisenResultBillId(ctx, resignBizBillID, syncStatus, candidateIds.get(0), result.getJSONObject("POST_TRANSFERPHASE_DATA"));
+                JSONObject jsonData = result.getJSONObject("POST_TRANSFERPHASE_DATA");
+                if(null==jsonData){
+                    jsonData=new JSONObject();
+                }
+                jsonData.put("resultMsg",result.get("msg"));
+                updateSyncBeisenResultBillId(ctx, resignBizBillID, syncStatus, candidateIds.get(0), jsonData);
             }else {
+                JSONObject jsonData = result.getJSONObject("POST_TRANSFERPHASE_DATA");
+                if(null==jsonData){
+                    jsonData=new JSONObject();
+                }
+                jsonData.put("resultMsg",result.get("msg"));
                 updateSyncBeisenResultBillId(ctx, resignBizBillID, syncStatus, "", result.getJSONObject("POST_TRANSFERPHASE_DATA"));
             }
         }
@@ -247,6 +259,11 @@ public class BeisenFacadeOSFService implements IHRMsfService {
             syncStatus = ExecuteResultEnum.ERROR;
             throw e;
         } finally {
+            JSONObject jsonData = result.getJSONObject("POST_TRANSFERPHASE_DATA");
+            if(null==jsonData){
+                jsonData=new JSONObject();
+            }
+            jsonData.put("resultMsg",syncStatus.getAlias());
             updateSyncBeisenResultBillId(ctx,resignBizBillID,syncStatus,candidateId,result.getJSONObject("POST_TRANSFERPHASE_DATA"));
         }
         return result;
@@ -270,7 +287,9 @@ public class BeisenFacadeOSFService implements IHRMsfService {
             Map<String, String> objectMap = this.getBeisenTalentPool(ctx);
             BeisenApiClient client = BeisenApiClient.getInstance();
             Map<String, Object> personData = this.getPersonData(ctx, resignBizBillID);
-            String code = (String) result.get("code");
+            String code = (String) personData.get("code");
+            result.put("code",personData.get("code"));
+            result.put("msg",personData.get("msg"));
             if ("ses".equals(code)) {
                 Map<String, Object> data = (Map<String, Object>) personData.get("data");
                 if(null!=data&&(!data.isEmpty())) {
@@ -281,7 +300,7 @@ public class BeisenFacadeOSFService implements IHRMsfService {
                     Map<String, String> config = byProperties.getConfig();
                     jsonData.put("channelId", config.get(BeisenParam.BEISEN_CONFIG_CHANNELID));
                     //jsonData.put("acquireMannerId",2);
-                    System.out.println(jsonData.toJSONString());
+                    System.out.println("同步北森参数:"+jsonData.toJSONString());
                     JSONObject jsonObject = client.callApi(BeisenParam.POST_CREATEORUPDATEAPPLICANT_URL, jsonData);
                     result.put("POST_CREATEORUPDATEAPPLICANT_DATA", jsonObject);
                     result.put("personData", personData);
@@ -305,7 +324,12 @@ public class BeisenFacadeOSFService implements IHRMsfService {
             result.put("code", "err");
             throw e;
         } finally {
-            updateSyncBeisenResultBillId(ctx, resignBizBillID, syncStatus, candidateId, result.getJSONObject("POST_CREATEORUPDATEAPPLICANT_DATA"));
+            JSONObject jsonData = result.getJSONObject("POST_CREATEORUPDATEAPPLICANT_DATA");
+            if(null==jsonData){
+                jsonData=new JSONObject();
+            }
+            jsonData.put("resultMsg",result.get("msg"));
+            updateSyncBeisenResultBillId(ctx, resignBizBillID, syncStatus, candidateId, jsonData);
         }
         return result;
     }
@@ -425,12 +449,12 @@ public class BeisenFacadeOSFService implements IHRMsfService {
             String pNumber = rowSet.getString("pNumber");
             personProfile.put("Name", this.setValue(pName));
             //personProfile.put("JobNumber", this.setValue(pNumber));
-            //出生日期	OgBirthday
-            Date birthday = rowSet.getDate("birthday");
-            if (null != birthday) {
-                personProfile.put("birthday", this.setValue(birthday));
-                personProfile.put("OgBirthday", this.setValue(birthday));
-            }
+//            //出生日期	OgBirthday
+//            Date birthday = rowSet.getDate("birthday");
+//            if (null != birthday) {
+//                personProfile.put("birthday", this.setValue(birthday));
+//                personProfile.put("OgBirthday", this.setValue(birthday));
+//            }
             //手机号
             String NCell = rowSet.getString("NCell");
             if (StringUtils.isNotBlank(NCell)) {
@@ -549,6 +573,7 @@ public class BeisenFacadeOSFService implements IHRMsfService {
             );
 
     }
+
     /**
      * syncStatus	同步北森状态	业务枚举	CFSyncStatus
      * syncBeisenResult	同步北森结果	字符串	CFSyncBeisenResult

+ 63 - 3
websrc/com/kingdee/shr/recuritment/web/handler/OfferListHandlerEx.java

@@ -18,6 +18,40 @@ import javax.servlet.http.HttpServletResponse;
  * @Created by Heyuan
  */
 public class OfferListHandlerEx extends OfferListHandler {
+    private Context ctx = SHRContext.getInstance().getContext();
+
+    /**
+     * 终止入职
+     *
+     * @param request
+     * @param response
+     * @param modelMap
+     * @throws SHRWebException
+     */
+    public void executeSyncBeisenAction(
+            HttpServletRequest request,
+            HttpServletResponse response,
+            ModelMap modelMap
+    ) throws SHRWebException {
+        String billIds = this.getBillId(request);
+        if (org.apache.commons.lang3.StringUtils.isEmpty(billIds)) {
+            throw new ShrWebBizException("单据id不能为空!");
+        } else if (billIds.split(",").length > 1) {
+            throw new ShrWebBizException("只能选中单行!");
+        }
+        try {
+            if (!StringUtils.isEmpty(billIds)) {
+                //同步录用报批状态至北森
+                IBeisenTransferPhaseFacade iBeisenTransferPhaseFacade =
+                        BeisenTransferPhaseFacadeFactory.getLocalInstance(ctx);
+                iBeisenTransferPhaseFacade.syncOfferToBeisen(billIds, 0);
+            }
+        } catch (Exception e) {
+            e.printStackTrace();
+            throw new ShrWebBizException(e);
+        }
+    }
+
     /**
      * 终止入职
      *
@@ -33,7 +67,35 @@ public class OfferListHandlerEx extends OfferListHandler {
             ModelMap modelMap
     ) throws SHRWebException {
         super.stopOfferAction(request, response, modelMap);
-        Context ctx = SHRContext.getInstance().getContext();
+        String billIds = request.getParameter("billId");
+        try {
+            if (!StringUtils.isEmpty(billIds)) {
+                //同步录用报批状态至北森
+                IBeisenTransferPhaseFacade iBeisenTransferPhaseFacade =
+                        BeisenTransferPhaseFacadeFactory.getLocalInstance(ctx);
+                iBeisenTransferPhaseFacade.syncOfferToBeisen(billIds, 0);
+            }
+        } catch (Exception e) {
+            e.printStackTrace();
+            throw new ShrWebBizException(e);
+        }
+    }
+
+    /**
+     * 转标准预备入职
+     *
+     * @param request
+     * @param response
+     * @param modelMap
+     * @throws SHRWebException
+     */
+    @Override
+    public void toPrePersonAction(
+            HttpServletRequest request,
+            HttpServletResponse response,
+            ModelMap modelMap
+    ) throws SHRWebException {
+        super.toPrePersonAction(request, response, modelMap);
         String billIds = request.getParameter("billId");
         try {
             if (!StringUtils.isEmpty(billIds)) {
@@ -63,7 +125,6 @@ public class OfferListHandlerEx extends OfferListHandler {
             ModelMap modelMap
     ) throws SHRWebException {
         super.noStopOfferAction(request, response, modelMap);
-        Context ctx = SHRContext.getInstance().getContext();
         String billIds = request.getParameter("billId");
         try {
             if (!StringUtils.isEmpty(billIds)) {
@@ -93,7 +154,6 @@ public class OfferListHandlerEx extends OfferListHandler {
             ModelMap modelMap
     ) throws SHRWebException {
         super.abondonEntryAction(request, response, modelMap);
-        Context ctx = SHRContext.getInstance().getContext();
         String billIds = request.getParameter("billId");
         try {
             if (!StringUtils.isEmpty(billIds)) {

+ 32 - 0
websrc/com/kingdee/shr/recuritment/web/handler/recApproval/RecApprovalListHandlerEx.java

@@ -22,6 +22,38 @@ import javax.servlet.http.HttpServletResponse;
 public class RecApprovalListHandlerEx extends RecApprovalListHandler {
     private Context ctx = SHRContext.getInstance().getContext();
 
+    /**
+     * 终止入职
+     *
+     * @param request
+     * @param response
+     * @param modelMap
+     * @throws SHRWebException
+     */
+    public void executeSyncBeisenAction(
+            HttpServletRequest request,
+            HttpServletResponse response,
+            ModelMap modelMap
+    ) throws SHRWebException {
+        String billIds = this.getBillId(request);
+        if (StringUtils.isEmpty(billIds)) {
+            throw new ShrWebBizException("单据id不能为空!");
+        } else if (billIds.split(",").length > 1) {
+            throw new ShrWebBizException("只能选中单行!");
+        }
+        try {
+            if (!com.kingdee.util.StringUtils.isEmpty(billIds)) {
+                //同步录用报批状态至北森
+                IBeisenTransferPhaseFacade iBeisenTransferPhaseFacade =
+                        BeisenTransferPhaseFacadeFactory.getLocalInstance(ctx);
+                iBeisenTransferPhaseFacade.syncRecApprovalToBeisen(billIds, 0);
+            }
+        } catch (Exception e) {
+            e.printStackTrace();
+            throw new ShrWebBizException(e);
+        }
+    }
+
     /**
      * 终止报批
      *