ソースを参照

用户信息调整

huangguoce 1 日 前
コミット
7755fcbbab

+ 30 - 0
jeeplus-modules/jeeplus-human/src/main/java/com/jeeplus/human/enrollment/enrollmentRegistration/service/EnrollmentCertificateInfoService.java

@@ -168,4 +168,34 @@ public class EnrollmentCertificateInfoService extends ServiceImpl<EnrollmentCert
 
     }
 
+    public void saveOrUpdateWorkAttachment(EnrollmentCertificateInfo info){
+        UserDTO userDTO = SpringUtil.getBean(IUserApi.class).getByToken(TokenProvider.getCurrentToken());
+        // 资质证书附件
+        if (ObjectUtil.isNotEmpty(info.getCertificateAttachment())) {
+            SpringUtil.getBean ( IWorkAttachmentApi.class ).deleteByAttachmentId(info.getId());
+            AtomicInteger sort = new AtomicInteger(1);
+            info.getCertificateAttachment().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 = info.getId();
+                String attachmentFlag = "certificate";
+                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();
+            });
+        }
+
+    }
+
 }

+ 53 - 0
jeeplus-modules/jeeplus-human/src/main/java/com/jeeplus/human/enrollment/enrollmentRegistration/service/EnrollmentEduInfoService.java

@@ -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();
+            });
+        }
+    }
+
     /**
      * 新增或者更新教育经历数据
      *

+ 30 - 0
jeeplus-modules/jeeplus-human/src/main/java/com/jeeplus/human/enrollment/enrollmentRegistration/service/EnrollmentLanguageInfoService.java

@@ -168,4 +168,34 @@ public class EnrollmentLanguageInfoService extends ServiceImpl<EnrollmentLanguag
 
     }
 
+    public void saveOrUpdateWorkAttachment(EnrollmentLanguageInfo info){
+        UserDTO userDTO = SpringUtil.getBean(IUserApi.class).getByToken(TokenProvider.getCurrentToken());
+        // 附件
+        if (ObjectUtil.isNotEmpty(info.getFiles())) {
+            SpringUtil.getBean ( IWorkAttachmentApi.class ).deleteByAttachmentId(info.getId());
+            AtomicInteger sort = new AtomicInteger(1);
+            info.getFiles().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 = info.getId();
+                String attachmentFlag = "language";
+                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();
+            });
+        }
+
+    }
+
 }

+ 6 - 0
jeeplus-modules/jeeplus-human/src/main/java/com/jeeplus/human/enrollment/enrollmentRegistration/service/EnrollmentRegistrationService.java

@@ -1107,6 +1107,7 @@ public class EnrollmentRegistrationService extends ServiceImpl<EnrollmentRegistr
             eduList.forEach(item -> {
                 item.setStatus(status);
                 eduInfoService.saveOrUpdate(item);
+                eduInfoService.saveOrUpdateEduWorkAttachment(item);
             });
         }
 
@@ -1126,6 +1127,7 @@ public class EnrollmentRegistrationService extends ServiceImpl<EnrollmentRegistr
             trainingList.forEach(item -> {
                 item.setStatus(status);
                 trainingInfoService.saveOrUpdate(item);
+                trainingInfoService.saveOrUpdateWorkAttachment(item);
             });
         }
 
@@ -1135,6 +1137,7 @@ public class EnrollmentRegistrationService extends ServiceImpl<EnrollmentRegistr
             certificateList.forEach(item -> {
                 item.setStatus(status);
                 certificateInfoService.saveOrUpdate(item);
+                certificateInfoService.saveOrUpdateWorkAttachment(item);
             });
         }
 
@@ -1144,6 +1147,7 @@ public class EnrollmentRegistrationService extends ServiceImpl<EnrollmentRegistr
             skillList.forEach(item -> {
                 item.setStatus(status);
                 skillInfoService.saveOrUpdate(item);
+                skillInfoService.saveOrUpdateWorkAttachment(item);
             });
         }
 
@@ -1153,6 +1157,7 @@ public class EnrollmentRegistrationService extends ServiceImpl<EnrollmentRegistr
             languageList.forEach(item -> {
                 item.setStatus(status);
                 languageInfoService.saveOrUpdate(item);
+                languageInfoService.saveOrUpdateWorkAttachment(item);
             });
 
         }
@@ -1172,6 +1177,7 @@ public class EnrollmentRegistrationService extends ServiceImpl<EnrollmentRegistr
             rewardList.forEach(item -> {
                 item.setStatus(status);
                 rewardInfoService.saveOrUpdate(item);
+                rewardInfoService.saveOrUpdateWorkAttachment(item);
             });
 
         }

+ 30 - 0
jeeplus-modules/jeeplus-human/src/main/java/com/jeeplus/human/enrollment/enrollmentRegistration/service/EnrollmentRewardInfoService.java

@@ -168,4 +168,34 @@ public class EnrollmentRewardInfoService extends ServiceImpl<EnrollmentRewardInf
 
     }
 
+    public void saveOrUpdateWorkAttachment(EnrollmentRewardInfo info){
+        UserDTO userDTO = SpringUtil.getBean(IUserApi.class).getByToken(TokenProvider.getCurrentToken());
+        // 附件
+        if (ObjectUtil.isNotEmpty(info.getFiles())) {
+            SpringUtil.getBean ( IWorkAttachmentApi.class ).deleteByAttachmentId(info.getId());
+            AtomicInteger sort = new AtomicInteger(1);
+            info.getFiles().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 = info.getId();
+                String attachmentFlag = "reward";
+                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();
+            });
+        }
+
+    }
+
 }

+ 30 - 0
jeeplus-modules/jeeplus-human/src/main/java/com/jeeplus/human/enrollment/enrollmentRegistration/service/EnrollmentSkillInfoService.java

@@ -167,4 +167,34 @@ public class EnrollmentSkillInfoService extends ServiceImpl<EnrollmentSkillInfoM
 
     }
 
+    public void saveOrUpdateWorkAttachment(EnrollmentSkillInfo info){
+        UserDTO userDTO = SpringUtil.getBean(IUserApi.class).getByToken(TokenProvider.getCurrentToken());
+        // 资质证书附件
+        if (ObjectUtil.isNotEmpty(info.getFiles())) {
+            SpringUtil.getBean ( IWorkAttachmentApi.class ).deleteByAttachmentId(info.getId());
+            AtomicInteger sort = new AtomicInteger(1);
+            info.getFiles().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 = info.getId();
+                String attachmentFlag = "skill";
+                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();
+            });
+        }
+
+    }
+
 }

+ 30 - 0
jeeplus-modules/jeeplus-human/src/main/java/com/jeeplus/human/enrollment/enrollmentRegistration/service/EnrollmentTrainingInfoService.java

@@ -166,4 +166,34 @@ public class EnrollmentTrainingInfoService extends ServiceImpl<EnrollmentTrainin
 
     }
 
+    public void saveOrUpdateWorkAttachment(EnrollmentTrainingInfo info){
+        UserDTO userDTO = SpringUtil.getBean(IUserApi.class).getByToken(TokenProvider.getCurrentToken());
+        // 保存附件
+        if (ObjectUtil.isNotEmpty(info.getFiles())) {
+            SpringUtil.getBean ( IWorkAttachmentApi.class ).deleteByAttachmentId(info.getId());
+            AtomicInteger sort = new AtomicInteger(1);
+            info.getFiles().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 = info.getId();
+                String attachmentFlag = "training";
+                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();
+            });
+        }
+
+    }
+
 }