|
@@ -44,25 +44,25 @@ public class SapReportService extends BaseService {
|
|
public void saveSapAllReportData() throws Exception {
|
|
public void saveSapAllReportData() throws Exception {
|
|
HttpHeaders headers = getHttpHeaders();
|
|
HttpHeaders headers = getHttpHeaders();
|
|
List<SapUser> sapUsers = selectReportUserList();
|
|
List<SapUser> sapUsers = selectReportUserList();
|
|
- this.saveSapCertificates(headers, sapUsers);
|
|
|
|
- this.saveSapCourses(headers, sapUsers);
|
|
|
|
|
|
+// this.saveSapCertificates(headers, sapUsers);
|
|
|
|
+// this.saveSapCourses(headers, sapUsers);
|
|
this.saveSapEducation(headers, sapUsers);
|
|
this.saveSapEducation(headers, sapUsers);
|
|
- this.saveSapInsideWorkExperience(headers, sapUsers);
|
|
|
|
- this.saveSapLanguages(headers, sapUsers);
|
|
|
|
- this.saveSapOverallPerformance(headers, sapUsers);
|
|
|
|
- this.saveSapEmpJob(headers, sapUsers);
|
|
|
|
- this.saveSapOutsideWorkExperience(headers, sapUsers);
|
|
|
|
- this.saveSapEmpEmployment(headers, sapUsers);
|
|
|
|
- this.saveSapEmpJobRelationships(headers, sapUsers);
|
|
|
|
- this.saveSapPerEmail(headers, sapUsers);
|
|
|
|
- this.saveSapPerGlobalInfoCHN(headers, sapUsers);
|
|
|
|
- this.saveSapPerNationalId(headers, sapUsers);
|
|
|
|
- this.saveSapPerPersonal(headers, sapUsers);
|
|
|
|
- this.saveSapPerPerson(headers, sapUsers);
|
|
|
|
- this.saveSapPerPhone(headers, sapUsers);
|
|
|
|
- this.saveSapPerSocialAccount(headers, sapUsers);
|
|
|
|
|
|
+// this.saveSapInsideWorkExperience(headers, sapUsers);
|
|
|
|
+// this.saveSapLanguages(headers, sapUsers);
|
|
|
|
+// this.saveSapOverallPerformance(headers, sapUsers);
|
|
|
|
+// this.saveSapEmpJob(headers, sapUsers);
|
|
|
|
+// this.saveSapOutsideWorkExperience(headers, sapUsers);
|
|
|
|
+// this.saveSapEmpEmployment(headers, sapUsers);
|
|
|
|
+// this.saveSapEmpJobRelationships(headers, sapUsers);
|
|
|
|
+// this.saveSapPerEmail(headers, sapUsers);
|
|
|
|
+// this.saveSapPerGlobalInfoCHN(headers, sapUsers);
|
|
|
|
+// this.saveSapPerNationalId(headers, sapUsers);
|
|
|
|
+// this.saveSapPerPersonal(headers, sapUsers);
|
|
|
|
+// this.saveSapPerPerson(headers, sapUsers);
|
|
|
|
+// this.saveSapPerPhone(headers, sapUsers);
|
|
|
|
+// this.saveSapPerSocialAccount(headers, sapUsers);
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
private String getPersonIds(List<SapUser> sapUsers) {
|
|
private String getPersonIds(List<SapUser> sapUsers) {
|
|
String personIds = "";
|
|
String personIds = "";
|
|
for (SapUser sapUser : sapUsers) {
|
|
for (SapUser sapUser : sapUsers) {
|
|
@@ -70,7 +70,7 @@ public class SapReportService extends BaseService {
|
|
}
|
|
}
|
|
return personIds;
|
|
return personIds;
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
private String getUserIds(List<SapUser> sapUsers) {
|
|
private String getUserIds(List<SapUser> sapUsers) {
|
|
String userIds = "";
|
|
String userIds = "";
|
|
for (SapUser sapUser : sapUsers) {
|
|
for (SapUser sapUser : sapUsers) {
|
|
@@ -79,7 +79,7 @@ public class SapReportService extends BaseService {
|
|
return userIds;
|
|
return userIds;
|
|
}
|
|
}
|
|
|
|
|
|
- // 基本信息 PerPerson
|
|
|
|
|
|
+ // 基本信息 PerPerson
|
|
public void saveSapPerPerson(HttpHeaders headers, List<SapUser> sapUsers) throws Exception {
|
|
public void saveSapPerPerson(HttpHeaders headers, List<SapUser> sapUsers) throws Exception {
|
|
delete("SapReportMapper.deleteSapPerPerson", null);
|
|
delete("SapReportMapper.deleteSapPerPerson", null);
|
|
|
|
|
|
@@ -413,8 +413,8 @@ public class SapReportService extends BaseService {
|
|
String dueTime = JsonNodeUtil.getValue(userNode, "custom4");// 培训服务期到期时间
|
|
String dueTime = JsonNodeUtil.getValue(userNode, "custom4");// 培训服务期到期时间
|
|
String remark = JsonNodeUtil.getValue(userNode, "custom7");// 备注
|
|
String remark = JsonNodeUtil.getValue(userNode, "custom7");// 备注
|
|
SapCourses entity = SapCourses.builder().userId(userId).course(course).startDate(startDate)
|
|
SapCourses entity = SapCourses.builder().userId(userId).course(course).startDate(startDate)
|
|
- .endData(endData).lengthCode(lengthCode).place(place).duration(duration)
|
|
|
|
- .result(result).certificateOrNot(certificateOrNot).dueTime(dueTime).remark(remark).build();
|
|
|
|
|
|
+ .endData(endData).lengthCode(lengthCode).place(place).duration(duration).result(result)
|
|
|
|
+ .certificateOrNot(certificateOrNot).dueTime(dueTime).remark(remark).build();
|
|
save("SapReportMapper.saveSapCourses", entity);
|
|
save("SapReportMapper.saveSapCourses", entity);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -422,7 +422,7 @@ public class SapReportService extends BaseService {
|
|
|
|
|
|
// 学历教育 Background_Education
|
|
// 学历教育 Background_Education
|
|
public void saveSapEducation(HttpHeaders headers, List<SapUser> sapUsers) throws Exception {
|
|
public void saveSapEducation(HttpHeaders headers, List<SapUser> sapUsers) throws Exception {
|
|
- String url = "https://api15.sapsf.cn/odata/v2/Background_Education?$filter=userId in %s&$format=json";
|
|
|
|
|
|
+ String url = "https://api15.sapsf.cn/odata/v2/Background_Education?$filter=userId in %s&$format=json&$expand=degreeNav,custom1Nav";
|
|
url = String.format(url, getUserIds(sapUsers));
|
|
url = String.format(url, getUserIds(sapUsers));
|
|
JsonNode node = requestService.getForObject(url, headers);
|
|
JsonNode node = requestService.getForObject(url, headers);
|
|
if (node != null) {
|
|
if (node != null) {
|
|
@@ -434,10 +434,11 @@ public class SapReportService extends BaseService {
|
|
String endDate = JsonNodeUtil.getValue(userNode, "endDate");// 结束日期
|
|
String endDate = JsonNodeUtil.getValue(userNode, "endDate");// 结束日期
|
|
String school = JsonNodeUtil.getValue(userNode, "school");// 院校
|
|
String school = JsonNodeUtil.getValue(userNode, "school");// 院校
|
|
String major = JsonNodeUtil.getValue(userNode, "major");// 专业
|
|
String major = JsonNodeUtil.getValue(userNode, "major");// 专业
|
|
- String degree = JsonNodeUtil.getValue(userNode, "degreeNav", "externalCode");// 学历
|
|
|
|
- String qualification = JsonNodeUtil.getValue(userNode, "custom1Nav", "externalCode");// 学位
|
|
|
|
|
|
+ String degreeCode = JsonNodeUtil.getValue(userNode, "degreeNav", "externalCode");// 学历
|
|
|
|
+ String qualificationCode = JsonNodeUtil.getValue(userNode, "custom1Nav", "externalCode");// 学位
|
|
SapEducation entity = SapEducation.builder().userId(userId).startDate(startDate).endDate(endDate)
|
|
SapEducation entity = SapEducation.builder().userId(userId).startDate(startDate).endDate(endDate)
|
|
- .school(school).major(major).degree(degree).qualification(qualification).build();
|
|
|
|
|
|
+ .school(school).major(major).degreeCode(degreeCode).qualificationCode(qualificationCode)
|
|
|
|
+ .build();
|
|
save("SapReportMapper.saveSapEducation", entity);
|
|
save("SapReportMapper.saveSapEducation", entity);
|
|
}
|
|
}
|
|
}
|
|
}
|