|
@@ -5,6 +5,16 @@ import java.util.List;
|
|
|
|
|
|
import org.fouram.core.base.service.BaseService;
|
|
|
import org.fouram.core.base.service.RequestService;
|
|
|
+import org.fouram.entity.SapCertificates;
|
|
|
+import org.fouram.entity.SapLanguages;
|
|
|
+import org.fouram.entity.SapOverallPerformance;
|
|
|
+import org.fouram.entity.SapPerEmail;
|
|
|
+import org.fouram.entity.SapPerGlobalInfoCHN;
|
|
|
+import org.fouram.entity.SapPerNationalId;
|
|
|
+import org.fouram.entity.SapPerPerson;
|
|
|
+import org.fouram.entity.SapPerPersonal;
|
|
|
+import org.fouram.entity.SapPerPhone;
|
|
|
+import org.fouram.entity.SapPerSocialAccount;
|
|
|
import org.fouram.entity.SapUser;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.http.HttpHeaders;
|
|
@@ -63,9 +73,12 @@ public class SapReportService extends BaseService {
|
|
|
String dateOfBirth = userNode.get("dateOfBirth").asText().trim();// 出生日期
|
|
|
String placeOfBirth = userNode.get("placeOfBirth").asText().trim();// 籍贯
|
|
|
String customString1Code = userNode.get("customString1Nav").get("externalCode").asText().trim();// 最高学历
|
|
|
+ SapPerPerson entity = SapPerPerson.builder().personId(personId).dateOfBirth(dateOfBirth)
|
|
|
+ .placeOfBirth(placeOfBirth).customString1Code(customString1Code).build();
|
|
|
+ System.out.println(entity);
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
url = "https://api15.sapsf.cn/odata/v2/PerPersonal?$filter=personIdExternal in %s&$format=json&$expand=maritalStatusNav";
|
|
|
url = String.format(url, personIds);
|
|
|
node = requestService.getForObject(url, headers);
|
|
@@ -85,6 +98,11 @@ public class SapReportService extends BaseService {
|
|
|
String lastNameAlt1 = userNode.get("lastNameAlt1").asText().trim();// 英文姓
|
|
|
String firstNameAlt2 = userNode.get("firstNameAlt2").asText().trim();// 拼音名
|
|
|
String lastNameAlt2 = userNode.get("lastNameAlt2").asText().trim();// 拼音姓
|
|
|
+ SapPerPersonal entity = SapPerPersonal.builder().personId(personId).firstName(firstName)
|
|
|
+ .lastName(lastName).displayName(displayName).formalName(formalName).nationality(nationality)
|
|
|
+ .gender(gender).maritalStatusCode(maritalStatusCode).firstNameAlt1(firstNameAlt1)
|
|
|
+ .lastNameAlt1(lastNameAlt1).firstNameAlt2(firstNameAlt2).lastNameAlt2(lastNameAlt2).build();
|
|
|
+ System.out.println(entity);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -104,6 +122,11 @@ public class SapReportService extends BaseService {
|
|
|
String customString6Code = userNode.get("customString6Nav").get("externalCode").asText().trim();// 政治面貌
|
|
|
String customString1 = userNode.get("customString1").asText().trim();// 组织关系所在地
|
|
|
String customString2 = userNode.get("customString2").asText().trim();// 社保所在地
|
|
|
+ SapPerGlobalInfoCHN entity = SapPerGlobalInfoCHN.builder().personId(personId)
|
|
|
+ .genericNumber1Code(genericNumber1Code).genericNumber4Code(genericNumber4Code)
|
|
|
+ .customString6Code(customString6Code).customString1(customString1).customString2(customString2)
|
|
|
+ .build();
|
|
|
+ System.out.println(entity);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -118,9 +141,12 @@ public class SapReportService extends BaseService {
|
|
|
while (iterator.hasNext()) {
|
|
|
JsonNode userNode = iterator.next();
|
|
|
String personId = userNode.get("personIdExternal").asText().trim();
|
|
|
- String countryName = userNode.get("countryNav").get("territoryName").asText().trim();// 国家/地区
|
|
|
- String cardType = userNode.get("cardType").asText().trim();// 国民身份证类型
|
|
|
- String nationalId = userNode.get("nationalId").asText().trim();// 国民身份证
|
|
|
+ String countryName = userNode.get("countryNav").get("territoryName").asText().trim();// 国家/地区
|
|
|
+ String cardType = userNode.get("cardType").asText().trim();// 国民身份证类型
|
|
|
+ String nationalId = userNode.get("nationalId").asText().trim();// 国民身份证
|
|
|
+ SapPerNationalId entity = SapPerNationalId.builder().personId(personId).countryName(countryName)
|
|
|
+ .cardType(cardType).nationalId(nationalId).build();
|
|
|
+ System.out.println(entity);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -135,9 +161,12 @@ public class SapReportService extends BaseService {
|
|
|
while (iterator.hasNext()) {
|
|
|
JsonNode userNode = iterator.next();
|
|
|
String personId = userNode.get("personIdExternal").asText().trim();
|
|
|
- String emailTypeCode = userNode.get("emailTypeNav").get("externalCode").asText().trim();// 电子邮件类型
|
|
|
- String emailAddress = userNode.get("emailAddress").asText().trim();// 电子邮件地址
|
|
|
- String isPrimary = userNode.get("isPrimary").asText().trim();// 主要
|
|
|
+ String emailTypeCode = userNode.get("emailTypeNav").get("externalCode").asText().trim();// 电子邮件类型
|
|
|
+ String emailAddress = userNode.get("emailAddress").asText().trim();// 电子邮件地址
|
|
|
+ String isPrimary = userNode.get("isPrimary").asText().trim();// 主要
|
|
|
+ SapPerEmail entity = SapPerEmail.builder().personId(personId).emailTypeCode(emailTypeCode)
|
|
|
+ .emailAddress(emailAddress).isPrimary(isPrimary).build();
|
|
|
+ System.out.println(entity);
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -153,9 +182,12 @@ public class SapReportService extends BaseService {
|
|
|
while (iterator.hasNext()) {
|
|
|
JsonNode userNode = iterator.next();
|
|
|
String personId = userNode.get("personIdExternal").asText().trim();
|
|
|
- String phoneTypeCode = userNode.get("phoneTypeNav").get("externalCode").asText().trim();//电话类型
|
|
|
- String phoneNumber = userNode.get("phoneNumber").asText().trim();//电话号码
|
|
|
- String isPrimary = userNode.get("isPrimary").asText().trim();//主要
|
|
|
+ String phoneTypeCode = userNode.get("phoneTypeNav").get("externalCode").asText().trim();// 电话类型
|
|
|
+ String phoneNumber = userNode.get("phoneNumber").asText().trim();// 电话号码
|
|
|
+ String isPrimary = userNode.get("isPrimary").asText().trim();// 主要
|
|
|
+ SapPerPhone entity = SapPerPhone.builder().personId(personId).phoneNumber(phoneNumber)
|
|
|
+ .phoneTypeCode(phoneTypeCode).isPrimary(isPrimary).build();
|
|
|
+ System.out.println(entity);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -170,8 +202,11 @@ public class SapReportService extends BaseService {
|
|
|
while (iterator.hasNext()) {
|
|
|
JsonNode userNode = iterator.next();
|
|
|
String personId = userNode.get("personIdExternal").asText().trim();
|
|
|
- String domainCode = userNode.get("domainNav").get("externalCode").asText().trim();//微信
|
|
|
- String imId = userNode.get("imId").asText().trim();//微信号
|
|
|
+ String domainCode = userNode.get("domainNav").get("externalCode").asText().trim();// 微信
|
|
|
+ String imId = userNode.get("imId").asText().trim();// 微信号
|
|
|
+ SapPerSocialAccount entity = SapPerSocialAccount.builder().personId(personId).domainCode(domainCode)
|
|
|
+ .imId(imId).build();
|
|
|
+ System.out.println(entity);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -186,21 +221,21 @@ public class SapReportService extends BaseService {
|
|
|
while (iterator.hasNext()) {
|
|
|
JsonNode userNode = iterator.next();
|
|
|
String personId = userNode.get("personIdExternal").asText().trim();
|
|
|
- //最近一次入职日期
|
|
|
- //首次工作日期
|
|
|
- //进入集团日期
|
|
|
- //公司
|
|
|
- //司龄计算日
|
|
|
- //社会工龄
|
|
|
- //司龄(最近入职)
|
|
|
- //离职日期
|
|
|
- //离职原因
|
|
|
- //可以再雇佣
|
|
|
- //工资单结束日期
|
|
|
- //最后工作日期
|
|
|
- //最后结薪日期
|
|
|
- //福利结算日期
|
|
|
- //离职详细原因
|
|
|
+ // 最近一次入职日期
|
|
|
+ // 首次工作日期
|
|
|
+ // 进入集团日期
|
|
|
+ // 公司
|
|
|
+ // 司龄计算日
|
|
|
+ // 社会工龄
|
|
|
+ // 司龄(最近入职)
|
|
|
+ // 离职日期
|
|
|
+ // 离职原因
|
|
|
+ // 可以再雇佣
|
|
|
+ // 工资单结束日期
|
|
|
+ // 最后工作日期
|
|
|
+ // 最后结薪日期
|
|
|
+ // 福利结算日期
|
|
|
+ // 离职详细原因
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -353,6 +388,9 @@ public class SapReportService extends BaseService {
|
|
|
String institution = userNode.get("institution").asText().trim();// 证书颁发机构
|
|
|
String startDate = userNode.get("startDate").asText().trim();// 证书颁发日期
|
|
|
String endDate = userNode.get("endDate").asText().trim();// 证书到期日期
|
|
|
+ SapCertificates entity = SapCertificates.builder().userId(userId).name(name).description(description)
|
|
|
+ .institution(institution).startDate(startDate).endDate(endDate).build();
|
|
|
+ System.out.println(entity);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -371,6 +409,10 @@ public class SapReportService extends BaseService {
|
|
|
String speakingProfCode = userNode.get("speakingProfNav").asText().trim();// 口语能力
|
|
|
String readingProfCode = userNode.get("readingProfNav").asText().trim();// 阅读能力
|
|
|
String writingProfCode = userNode.get("writingProfNav").asText().trim();// 书写能力
|
|
|
+ SapLanguages entity = SapLanguages.builder().userId(userId).languageCode(languageCode)
|
|
|
+ .speakingProfCode(speakingProfCode).readingProfCode(readingProfCode)
|
|
|
+ .writingProfCode(writingProfCode).build();
|
|
|
+ System.out.println(entity);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -390,6 +432,9 @@ public class SapReportService extends BaseService {
|
|
|
String module = userNode.get("module").asText().trim(); // 模块
|
|
|
String name = userNode.get("name").asText().trim(); // 名称
|
|
|
String description = userNode.get("description").asText().trim();// 描述
|
|
|
+ SapOverallPerformance entity = SapOverallPerformance.builder().userId(userId).startDate(startDate)
|
|
|
+ .endDate(endDate).module(module).name(name).description(description).build();
|
|
|
+ System.out.println(entity);
|
|
|
}
|
|
|
}
|
|
|
}
|