Browse Source

Merge remote-tracking branch 'origin/master'

tags/24080901
CMM 1 year ago
parent
commit
5f816dc5aa
2 changed files with 45 additions and 46 deletions
  1. +37
    -37
      pmapi/src/main/java/com/ningdatech/pmapi/expert/assembler/ExpertInfoCmdAssembler.java
  2. +8
    -9
      pmapi/src/main/java/com/ningdatech/pmapi/expert/manage/ExpertManage.java

+ 37
- 37
pmapi/src/main/java/com/ningdatech/pmapi/expert/assembler/ExpertInfoCmdAssembler.java View File

@@ -1,6 +1,7 @@
package com.ningdatech.pmapi.expert.assembler;


import com.ningdatech.basic.util.CollUtils;
import com.ningdatech.pmapi.common.model.FileBasicInfo;
import com.ningdatech.pmapi.expert.model.*;
import com.ningdatech.pmapi.expert.model.bo.ExpertInfoSensitiveFieldCheckBO;
@@ -160,68 +161,67 @@ public class ExpertInfoCmdAssembler {

private static ExpertUserFullInfoDTO buildExpertUserFullInfoDTO(ExpertBasicInfo basicInfo, ExpertEduInfo eduInfo
, ExpertJobInfo jobInfo, ExpertProfessionalInfo professionalInfo, ExpertRecommendInfo recommendInfo, ExpertOtherInfo otherInfo) {
ExpertUserFullInfoDTO expertUserFullInfoDTO = new ExpertUserFullInfoDTO();
ExpertUserFullInfoDTO expertFullInfo = new ExpertUserFullInfoDTO();

expertUserFullInfoDTO.setIsDingUser(basicInfo.getIsDingUser());
expertUserFullInfoDTO.setPhoneNo(basicInfo.getPhoneNo());
expertUserFullInfoDTO.setGender(basicInfo.getGender());
expertUserFullInfoDTO.setName(basicInfo.getName());
expertFullInfo.setIsDingUser(basicInfo.getIsDingUser());
expertFullInfo.setPhoneNo(basicInfo.getPhoneNo());
expertFullInfo.setGender(basicInfo.getGender());
expertFullInfo.setName(basicInfo.getName());
if (Objects.nonNull(basicInfo.getAvatarFile())) {
expertUserFullInfoDTO.setAvatarFileId(basicInfo.getAvatarFile().getFileId());
expertFullInfo.setAvatarFileId(basicInfo.getAvatarFile().getFileId());
}
expertUserFullInfoDTO.setIdCard(basicInfo.getIdCard());
expertUserFullInfoDTO.setOfficePhone(basicInfo.getOfficePhone());
expertUserFullInfoDTO.setBirth(basicInfo.getBirth());
expertUserFullInfoDTO.setBankNo(basicInfo.getBankNo());
expertUserFullInfoDTO.setBank(basicInfo.getBank());
expertUserFullInfoDTO.setEmail(basicInfo.getEmail());
expertUserFullInfoDTO.setHometown(basicInfo.getHometown());
expertUserFullInfoDTO.setNationality(basicInfo.getNationality());
expertFullInfo.setIdCard(basicInfo.getIdCard());
expertFullInfo.setOfficePhone(basicInfo.getOfficePhone());
expertFullInfo.setBirth(basicInfo.getBirth());
expertFullInfo.setBankNo(basicInfo.getBankNo());
expertFullInfo.setBank(basicInfo.getBank());
expertFullInfo.setEmail(basicInfo.getEmail());
expertFullInfo.setHometown(basicInfo.getHometown());
expertFullInfo.setNationality(basicInfo.getNationality());
if (Objects.nonNull(otherInfo)) {
expertUserFullInfoDTO.setRemark(otherInfo.getRemark());
expertFullInfo.setRemark(otherInfo.getRemark());
}
expertUserFullInfoDTO.setSchool(eduInfo.getSchool());
expertUserFullInfoDTO.setGraduatedAt(eduInfo.getGraduatedAt());
expertUserFullInfoDTO.setAcademicTitle(eduInfo.getAcademicTitle());
expertFullInfo.setSchool(eduInfo.getSchool());
expertFullInfo.setGraduatedAt(eduInfo.getGraduatedAt());
expertFullInfo.setAcademicTitle(eduInfo.getAcademicTitle());

if (CollectionUtils.isNotEmpty(eduInfo.getGraduationCertificateFile())) {
expertUserFullInfoDTO.setGraduationCertificateFileIdList(eduInfo.getGraduationCertificateFile().stream().map(FileBasicInfo::getFileId).collect(Collectors.toList()));
expertFullInfo.setGraduationCertificateFileIdList(eduInfo.getGraduationCertificateFile().stream().map(FileBasicInfo::getFileId).collect(Collectors.toList()));
}
if (CollectionUtils.isNotEmpty(eduInfo.getDegreeCertificateFile())) {

expertUserFullInfoDTO.setDegreeCertificateFileIdList(eduInfo.getDegreeCertificateFile().stream().map(FileBasicInfo::getFileId).collect(Collectors.toList()));
expertFullInfo.setDegreeCertificateFileIdList(eduInfo.getDegreeCertificateFile().stream().map(FileBasicInfo::getFileId).collect(Collectors.toList()));
}

expertUserFullInfoDTO.setRetiredAt(jobInfo.getRetiredAt());
expertUserFullInfoDTO.setCompany(jobInfo.getCompany());
expertUserFullInfoDTO.setLegalEntityCode(jobInfo.getLegalEntityCode());
expertUserFullInfoDTO.setAdministrativeDuties(jobInfo.getAdministrativeDuties());
expertUserFullInfoDTO.setStartWorkAt(jobInfo.getStartWorkAt());
expertUserFullInfoDTO.setAddress(jobInfo.getAddress());
expertUserFullInfoDTO.setExperience(jobInfo.getExperience());
expertFullInfo.setRetiredAt(jobInfo.getRetiredAt());
expertFullInfo.setCompany(jobInfo.getCompany());
expertFullInfo.setCompanyUniqCode(jobInfo.getCompanyUniqCode());
expertFullInfo.setLegalEntityCode(jobInfo.getLegalEntityCode());
expertFullInfo.setAdministrativeDuties(jobInfo.getAdministrativeDuties());
expertFullInfo.setStartWorkAt(jobInfo.getStartWorkAt());
expertFullInfo.setAddress(jobInfo.getAddress());
expertFullInfo.setExperience(jobInfo.getExperience());

expertUserFullInfoDTO.setTechnicalTitles(professionalInfo.getTechnicalTitles());
expertFullInfo.setTechnicalTitles(professionalInfo.getTechnicalTitles());
if (CollectionUtils.isNotEmpty(professionalInfo.getTitleCertificateFile())) {
expertUserFullInfoDTO.setTitleCertificateFileIdList(professionalInfo.getTitleCertificateFile().stream().map(FileBasicInfo::getFileId).collect(Collectors.toList()));
expertFullInfo.setTitleCertificateFileIdList(CollUtils.fieldList(professionalInfo.getTitleCertificateFile(), FileBasicInfo::getFileId));
}
expertUserFullInfoDTO.setAwards(professionalInfo.getAwards());
expertUserFullInfoDTO.setRecognitionReward(professionalInfo.getRecognitionReward());
expertFullInfo.setAwards(professionalInfo.getAwards());
expertFullInfo.setRecognitionReward(professionalInfo.getRecognitionReward());

if (Objects.nonNull(basicInfo.getExpertRegionInfo())) {
expertUserFullInfoDTO.setRegionCode(basicInfo.getExpertRegionInfo().getRegionCode());
expertUserFullInfoDTO.setRegionLevel(basicInfo.getExpertRegionInfo().getRegionLevel());
expertFullInfo.setRegionCode(basicInfo.getExpertRegionInfo().getRegionCode());
expertFullInfo.setRegionLevel(basicInfo.getExpertRegionInfo().getRegionLevel());
}
// 推荐证明材料单独装配
if (Objects.nonNull(recommendInfo)) {
List<FileBasicInfo> recommendationProofFile = recommendInfo.getRecommendationProofFile();
if (CollectionUtils.isNotEmpty(recommendationProofFile)) {
expertUserFullInfoDTO
.setRecommendationProofFileIdList(
recommendationProofFile.stream().map(FileBasicInfo::getFileId).collect(Collectors.toList()));
expertFullInfo.setRecommendationProofFileIdList(CollUtils.fieldList(recommendationProofFile, FileBasicInfo::getFileId));

}
}
return expertUserFullInfoDTO;
return expertFullInfo;
}

public static ExpertInfoModifyCmd buildExpertInfoModifyCmd(Long userId


+ 8
- 9
pmapi/src/main/java/com/ningdatech/pmapi/expert/manage/ExpertManage.java View File

@@ -60,12 +60,12 @@ public class ExpertManage {
/**
* 填写基本信息,只有专家自己可用
*
* @param request
* @param req /
*/
@Transactional(rollbackFor = Exception.class)
public void expertBasicInfoSubmit(ExpertUserBasicInfoSubmitRequest request) {
public void expertBasicInfoSubmit(ExpertUserBasicInfoSubmitRequest req) {
// 用户id
ExpertBasicInfo basicInfo = request.getBasicInfo();
ExpertBasicInfo basicInfo = req.getBasicInfo();
Long userId = generateOrGetUserId(basicInfo);

// 校验区域编码合法性 校验履职意向编码合法性
@@ -75,9 +75,9 @@ public class ExpertManage {
for (ExpertRegionInfo expertIntentionWorkRegion : expertIntentionWorkRegions) {
expertManageHelper.expertRegionInfoCheck(expertIntentionWorkRegion);
}
ExpertEduInfo eduInfo = request.getEduInfo();
ExpertJobInfo jobInfo = request.getJobInfo();
ExpertProfessionalInfo professionalInfo = request.getProfessionalInfo();
ExpertEduInfo eduInfo = req.getEduInfo();
ExpertJobInfo jobInfo = req.getJobInfo();
ExpertProfessionalInfo professionalInfo = req.getProfessionalInfo();
// 校验标签字段
expertManageHelper.tagFieldCheck(professionalInfo, basicInfo);
// 校验字典字段
@@ -95,7 +95,7 @@ public class ExpertManage {
expertInfoService.saveExpertInfo(expertFullInfoSaveCmd);
}

ExpertRecommendInfo recommendInfo = request.getRecommendInfo();
ExpertRecommendInfo recommendInfo = req.getRecommendInfo();
// 推荐证明材料
List<DictionaryFieldInfo> recommendedWay = recommendInfo.getRecommendedWay();
// 推荐方式
@@ -138,8 +138,7 @@ public class ExpertManage {
}
expertRecommendProofSaveCmd.setRecommendedWay(recommendedWayDictionaryDTOList);
expertRecommendProofSaveCmd.setUserId(expertUserId);
Long applyId = expertInfoService.expertRecommendProofSave(expertRecommendProofSaveCmd);
return applyId;
return expertInfoService.expertRecommendProofSave(expertRecommendProofSaveCmd);
}

public ExpertFullInfoVO getExpertFullInfoDetail(Long expertUserId) {


Loading…
Cancel
Save