|
|
@@ -44,43 +44,43 @@ public class ExpertUserInfoAssembler { |
|
|
|
private final DictionaryCache dictionaryCache; |
|
|
|
private final RegionCacheHelper regionCacheHelper; |
|
|
|
|
|
|
|
public ExpertFullInfoVO buildExpertFullInfoVO(List<AttachFileVo> attachFiles, ExpertFullInfoAllDTO expertFullInfoAll) { |
|
|
|
public ExpertFullInfoVO buildExpertFullInfo(List<AttachFileVo> attachFiles, ExpertFullInfoAllDTO expertFullInfoAll) { |
|
|
|
ExpertUserFullInfoDTO expertUserInfo = expertFullInfoAll.getExpertUserInfoDTO(); |
|
|
|
// 字典字典段map |
|
|
|
Map<String, List<DictionaryFieldInfo>> dictInfoMap = buildDictInfoMap(expertFullInfoAll.getExpertDictionaryList()); |
|
|
|
Map<String, List<DictionaryFieldInfo>> dictMap = buildDictInfoMap(expertFullInfoAll.getExpertDictionaryList()); |
|
|
|
// 专家文件资料map |
|
|
|
Map<Long, FileBasicInfo> fileInfoMap = buildFileBasicInfoMap(attachFiles); |
|
|
|
Map<Long, FileBasicInfo> fileMap = buildFileBasicInfoMap(attachFiles); |
|
|
|
// 专家标签字段map |
|
|
|
Map<String, List<TagFieldInfo>> tagInfoMap = buildTagFieldInfoMap(expertFullInfoAll.getExpertTagList()); |
|
|
|
Map<String, List<TagFieldInfo>> tagMap = buildTagFieldInfoMap(expertFullInfoAll.getExpertTagList()); |
|
|
|
// 专家履职意向地 |
|
|
|
List<ExpertRegionDTO> intentionWorkRegion = expertFullInfoAll.getExpertIntentionWorkRegionInfo(); |
|
|
|
List<ExpertRegionDTO> intentionWorkRegions = expertFullInfoAll.getExpertIntentionWorkRegionInfo(); |
|
|
|
// 专家回避单位列表 |
|
|
|
List<ExpertAvoidCompanyDTO> expertAvoidCompanyList = expertFullInfoAll.getExpertAvoidCompanyList(); |
|
|
|
List<ExpertAvoidCompanyDTO> avoidCompanies = expertFullInfoAll.getExpertAvoidCompanyList(); |
|
|
|
// 基本信息 |
|
|
|
ExpertBasicInfo basicInfo = buildExpertBasicInfo(expertUserInfo, dictInfoMap, tagInfoMap, intentionWorkRegion, fileInfoMap); |
|
|
|
ExpertBasicInfo basicInfo = buildExpertBasicInfo(expertUserInfo, dictMap, tagMap, intentionWorkRegions, fileMap); |
|
|
|
// 学历信息 |
|
|
|
ExpertEduInfo eduInfo = buildExpertEduInfo(expertUserInfo, dictInfoMap, fileInfoMap); |
|
|
|
ExpertEduInfo eduInfo = buildExpertEduInfo(expertUserInfo, dictMap, fileMap); |
|
|
|
// 职业信息 |
|
|
|
ExpertJobInfo jobInfo = buildExpertJobInfo(expertUserInfo, dictInfoMap); |
|
|
|
ExpertJobInfo jobInfo = buildExpertJobInfo(expertUserInfo, dictMap); |
|
|
|
jobInfo.setBusinessStrips(expertFullInfoAll.getBusinessStrips()); |
|
|
|
// 专业信息 |
|
|
|
ExpertProfessionalInfo professionalInfo = buildExpertProfessionalInfo(expertUserInfo, dictInfoMap |
|
|
|
, tagInfoMap, fileInfoMap, expertAvoidCompanyList); |
|
|
|
ExpertProfessionalInfo profession = buildExpertProfessionalInfo(expertUserInfo, dictMap, tagMap, fileMap, avoidCompanies); |
|
|
|
// 推荐信息 |
|
|
|
ExpertRecommendInfo recommendInfo = new ExpertRecommendInfo(); |
|
|
|
recommendInfo.setRecommendedWay(dictInfoMap.get(DictExpertInfoTypeEnum.RECOMMENDED_WAY.getKey())); |
|
|
|
recommendInfo.setRecommendationProofFile(getFileBasicInfoList(fileInfoMap, expertUserInfo.getRecommendationProofFileIdList())); |
|
|
|
recommendInfo.setRecommendedWay(dictMap.get(DictExpertInfoTypeEnum.RECOMMENDED_WAY.getKey())); |
|
|
|
recommendInfo.setRecommendationProofFile(getFileBasicInfoList(fileMap, expertUserInfo.getRecommendationProofFileIdList())); |
|
|
|
// 其他信息 |
|
|
|
ExpertOtherInfo otherInfo = new ExpertOtherInfo(); |
|
|
|
otherInfo.setOther(tagInfoMap.get(ExpertTagEnum.OTHER.getKey())); |
|
|
|
otherInfo.setOther(tagMap.get(ExpertTagEnum.OTHER.getKey())); |
|
|
|
otherInfo.setRemark(expertUserInfo.getRemark()); |
|
|
|
|
|
|
|
// 专家申请履职意向展示列表 |
|
|
|
List<ExpertRegionInfo> applyIntentionWorkRegions = expertFullInfoAll.getExpertApplyIntentionWorkRegionInfo().stream().map(r -> { |
|
|
|
ExpertRegionInfo expertApplyIntentionWorkRegion = new ExpertRegionInfo(); |
|
|
|
expertApplyIntentionWorkRegion.setRegionLevel(r.getRegionLevel()); |
|
|
|
expertApplyIntentionWorkRegion.setRegionCode(r.getRegionCode()); |
|
|
|
expertApplyIntentionWorkRegion.setRegionName(regionCacheHelper.getUnionPathStr(r.getRegionCode(), r.getRegionLevel())); |
|
|
|
return expertApplyIntentionWorkRegion; |
|
|
|
ExpertRegionInfo intentionWorkRegion = new ExpertRegionInfo(); |
|
|
|
intentionWorkRegion.setRegionLevel(r.getRegionLevel()); |
|
|
|
intentionWorkRegion.setRegionCode(r.getRegionCode()); |
|
|
|
intentionWorkRegion.setRegionName(regionCacheHelper.getUnionPath(r.getRegionCode(), r.getRegionLevel())); |
|
|
|
return intentionWorkRegion; |
|
|
|
}).collect(Collectors.toList()); |
|
|
|
|
|
|
|
if (CollUtil.isEmpty(basicInfo.getExpertIntentionWorkRegions())) { |
|
|
@@ -91,7 +91,7 @@ public class ExpertUserInfoAssembler { |
|
|
|
resExpertFullInfo.setBasicInfo(basicInfo); |
|
|
|
resExpertFullInfo.setEduInfo(eduInfo); |
|
|
|
resExpertFullInfo.setJobInfo(jobInfo); |
|
|
|
resExpertFullInfo.setProfessionalInfo(professionalInfo); |
|
|
|
resExpertFullInfo.setProfessionalInfo(profession); |
|
|
|
resExpertFullInfo.setRecommendInfo(recommendInfo); |
|
|
|
resExpertFullInfo.setExpertOtherInfo(otherInfo); |
|
|
|
resExpertFullInfo.setExpertApplyIntentionWorkRegions(applyIntentionWorkRegions); |
|
|
@@ -236,14 +236,14 @@ public class ExpertUserInfoAssembler { |
|
|
|
basicInfo.setHometown(expertUserInfoDTO.getHometown()); |
|
|
|
basicInfo.setNationality(expertUserInfoDTO.getNationality()); |
|
|
|
basicInfo.setExpertSource(tagFieldInfoMap.get(ExpertTagEnum.EXPERT_SOURCE.getKey())); |
|
|
|
expertRegionInfo.setRegionName(regionCacheHelper.getUnionPathStr(expertRegionInfo.getRegionCode(), expertRegionInfo.getRegionLevel())); |
|
|
|
expertRegionInfo.setRegionName(regionCacheHelper.getUnionPath(expertRegionInfo.getRegionCode(), expertRegionInfo.getRegionLevel())); |
|
|
|
basicInfo.setExpertRegionInfo(expertRegionInfo); |
|
|
|
|
|
|
|
basicInfo.setExpertIntentionWorkRegions(expertIntentionWorkRegionInfo.stream().map(r -> { |
|
|
|
ExpertRegionInfo expertIntentionWorkRegion = new ExpertRegionInfo(); |
|
|
|
expertIntentionWorkRegion.setRegionCode(r.getRegionCode()); |
|
|
|
expertIntentionWorkRegion.setRegionLevel(r.getRegionLevel()); |
|
|
|
expertIntentionWorkRegion.setRegionName(regionCacheHelper.getUnionPathStr(r.getRegionCode(), r.getRegionLevel())); |
|
|
|
expertIntentionWorkRegion.setRegionName(regionCacheHelper.getUnionPath(r.getRegionCode(), r.getRegionLevel())); |
|
|
|
return expertIntentionWorkRegion; |
|
|
|
}).collect(Collectors.toList())); |
|
|
|
basicInfo.setExpertType(dictionaryFieldInfoMap.get(DictExpertInfoTypeEnum.EXPERT_TYPE.getKey())); |
|
|
|