|
@@ -59,6 +59,9 @@ public class EnrollmentRegistrationController {
|
|
|
private EnrollmentRegistrationService service;
|
|
private EnrollmentRegistrationService service;
|
|
|
|
|
|
|
|
@Resource
|
|
@Resource
|
|
|
|
|
+ private EnrollmentEduInfoService eduInfoService;
|
|
|
|
|
+
|
|
|
|
|
+ @Resource
|
|
|
private EnrollmentSocialSecurityCardService securityCardService;
|
|
private EnrollmentSocialSecurityCardService securityCardService;
|
|
|
|
|
|
|
|
@Resource
|
|
@Resource
|
|
@@ -797,6 +800,7 @@ public class EnrollmentRegistrationController {
|
|
|
page.setCurrent (0);
|
|
page.setCurrent (0);
|
|
|
result = service.exportList(page,exportTemplate).getRecords();
|
|
result = service.exportList(page,exportTemplate).getRecords();
|
|
|
}
|
|
}
|
|
|
|
|
+ fillEducationInfoForExport(result);
|
|
|
EasyPoiUtil.exportExcel ( result, sheetName, sheetName, ExportDTO.class, fileName, response );
|
|
EasyPoiUtil.exportExcel ( result, sheetName, sheetName, ExportDTO.class, fileName, response );
|
|
|
|
|
|
|
|
}
|
|
}
|
|
@@ -808,6 +812,57 @@ public class EnrollmentRegistrationController {
|
|
|
dingTalkSyncUtil.getUserByMobileSyncData();
|
|
dingTalkSyncUtil.getUserByMobileSyncData();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 导出添加教育经历信息
|
|
|
|
|
+ * @param result
|
|
|
|
|
+ */
|
|
|
|
|
+ private void fillEducationInfoForExport(List<ExportDTO> result) {
|
|
|
|
|
+ if (result == null || result.isEmpty()) {
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+ Map<String, Optional<EnrollmentEduInfo>> eduInfoMap = new HashMap<>();
|
|
|
|
|
+ for (ExportDTO item : result) {
|
|
|
|
|
+ if (item == null || StringUtils.isBlank(item.getUserId())) {
|
|
|
|
|
+ continue;
|
|
|
|
|
+ }
|
|
|
|
|
+ Optional<EnrollmentEduInfo> eduInfoOptional = eduInfoMap.computeIfAbsent(item.getUserId(), this::getExportEduInfo);
|
|
|
|
|
+ if (!eduInfoOptional.isPresent()) {
|
|
|
|
|
+ continue;
|
|
|
|
|
+ }
|
|
|
|
|
+ EnrollmentEduInfo eduInfo = eduInfoOptional.get();
|
|
|
|
|
+ item.setGraduatedFrom(eduInfo.getGraduatedFrom());
|
|
|
|
|
+ item.setSpeciality(eduInfo.getSpeciality());
|
|
|
|
|
+ item.setDegree(eduInfo.getDegree());
|
|
|
|
|
+ item.setEducation(eduInfo.getEducation());
|
|
|
|
|
+ item.setEducationStartDate(eduInfo.getStartDate());
|
|
|
|
|
+ item.setEducationEndDate(eduInfo.getEndDate());
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ private Optional<EnrollmentEduInfo> getExportEduInfo(String userId) {
|
|
|
|
|
+ List<EnrollmentEduInfo> list = eduInfoService.findByUserId(userId, "5");
|
|
|
|
|
+ if (list == null || list.isEmpty()) {
|
|
|
|
|
+ return Optional.empty();
|
|
|
|
|
+ }
|
|
|
|
|
+ EnrollmentEduInfo eduInfo = list.stream()
|
|
|
|
|
+ .filter(this::isHighestEducation)
|
|
|
|
|
+ .findFirst()
|
|
|
|
|
+ .orElse(list.get(0));
|
|
|
|
|
+ return Optional.ofNullable(eduInfo);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ private boolean isHighestEducation(EnrollmentEduInfo eduInfo) {
|
|
|
|
|
+ if (eduInfo == null || StringUtils.isBlank(eduInfo.getIsHighestEducation())) {
|
|
|
|
|
+ return false;
|
|
|
|
|
+ }
|
|
|
|
|
+ String flag = eduInfo.getIsHighestEducation().trim();
|
|
|
|
|
+ return "1".equals(flag)
|
|
|
|
|
+ || "是".equals(flag)
|
|
|
|
|
+ || "Y".equalsIgnoreCase(flag)
|
|
|
|
|
+ || "YES".equalsIgnoreCase(flag)
|
|
|
|
|
+ || "TRUE".equalsIgnoreCase(flag);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
* 根据选中的用户批量下载附件
|
|
* 根据选中的用户批量下载附件
|