|
@@ -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
|