|
@@ -223,6 +223,59 @@ public class EnrollmentEduInfoService extends ServiceImpl<EnrollmentEduInfoMappe
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ public void saveOrUpdateEduWorkAttachment(EnrollmentEduInfo enrollmentEduInfo) {
|
|
|
+ UserDTO userDTO = SpringUtil.getBean(IUserApi.class).getByToken(TokenProvider.getCurrentToken());
|
|
|
+ SpringUtil.getBean(IWorkAttachmentApi.class).deleteByAttachmentId(enrollmentEduInfo.getId());
|
|
|
+ // 保存学历证明
|
|
|
+ if (ObjectUtil.isNotEmpty(enrollmentEduInfo.getEducationFile())) {
|
|
|
+ AtomicInteger sort = new AtomicInteger(1);
|
|
|
+ enrollmentEduInfo.getEducationFile().stream().forEach(item -> {
|
|
|
+ //保存附件信息
|
|
|
+ WorkAttachmentInfo workAttachmentDto = new WorkAttachmentInfo();
|
|
|
+ workAttachmentDto.setName(item.getName());
|
|
|
+ workAttachmentDto.setSize(item.getSize());
|
|
|
+ workAttachmentDto.setUrl(item.getUrl());
|
|
|
+ Map<String, String> map = new HashMap<>();
|
|
|
+ String workAttachmentDtoInfo = JSON.toJSONString(workAttachmentDto);
|
|
|
+ String userDTOInfo = JSON.toJSONString(userDTO);
|
|
|
+ String attachmentId = enrollmentEduInfo.getId();
|
|
|
+ String attachmentFlag = "education";
|
|
|
+ String sortInfo = Integer.toString(sort.get());
|
|
|
+ map.put("workAttachmentDtoInfo", workAttachmentDtoInfo);
|
|
|
+ map.put("userDTOInfo", userDTOInfo);
|
|
|
+ map.put("attachmentId", attachmentId);
|
|
|
+ map.put("attachmentFlag", attachmentFlag);
|
|
|
+ map.put("sortInfo", sortInfo);
|
|
|
+ String fileId = SpringUtil.getBean(IWorkAttachmentApi.class).saveFile(map);
|
|
|
+ sort.getAndIncrement();
|
|
|
+ });
|
|
|
+ }
|
|
|
+ // 保存学位证明
|
|
|
+ if (ObjectUtil.isNotEmpty(enrollmentEduInfo.getDegreeFile())) {
|
|
|
+ AtomicInteger sort = new AtomicInteger(1);
|
|
|
+ enrollmentEduInfo.getDegreeFile().stream().forEach(item -> {
|
|
|
+ //保存附件信息
|
|
|
+ WorkAttachmentInfo workAttachmentDto = new WorkAttachmentInfo();
|
|
|
+ workAttachmentDto.setName(item.getName());
|
|
|
+ workAttachmentDto.setSize(item.getSize());
|
|
|
+ workAttachmentDto.setUrl(item.getUrl());
|
|
|
+ Map<String, String> map = new HashMap<>();
|
|
|
+ String workAttachmentDtoInfo = JSON.toJSONString(workAttachmentDto);
|
|
|
+ String userDTOInfo = JSON.toJSONString(userDTO);
|
|
|
+ String attachmentId = enrollmentEduInfo.getId();
|
|
|
+ String attachmentFlag = "degree";
|
|
|
+ String sortInfo = Integer.toString(sort.get());
|
|
|
+ map.put("workAttachmentDtoInfo", workAttachmentDtoInfo);
|
|
|
+ map.put("userDTOInfo", userDTOInfo);
|
|
|
+ map.put("attachmentId", attachmentId);
|
|
|
+ map.put("attachmentFlag", attachmentFlag);
|
|
|
+ map.put("sortInfo", sortInfo);
|
|
|
+ String fileId = SpringUtil.getBean(IWorkAttachmentApi.class).saveFile(map);
|
|
|
+ sort.getAndIncrement();
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 新增或者更新教育经历数据
|
|
|
*
|