Procházet zdrojové kódy

修改专家详情履职意向不展示

tags/24080901
WendyYang před 1 rokem
rodič
revize
5e0b40ca60
1 změnil soubory, kde provedl 25 přidání a 31 odebrání
  1. +25
    -31
      pmapi/src/main/java/com/ningdatech/pmapi/expert/assembler/ExpertUserInfoAssembler.java

+ 25
- 31
pmapi/src/main/java/com/ningdatech/pmapi/expert/assembler/ExpertUserInfoAssembler.java Zobrazit soubor

@@ -45,43 +45,38 @@ public class ExpertUserInfoAssembler {
private final DictionaryCache dictionaryCache;
private final RegionCacheHelper regionCacheHelper;

public ExpertFullInfoVO buildExpertFullInfoVO(List<AttachFileVo> attachFiles
, ExpertFullInfoAllDTO expertUserFullInfoAll) {
ExpertUserFullInfoDTO expertUserInfoDTO = expertUserFullInfoAll.getExpertUserInfoDTO();
public ExpertFullInfoVO buildExpertFullInfoVO(List<AttachFileVo> attachFiles, ExpertFullInfoAllDTO expertFullInfoAll) {
ExpertUserFullInfoDTO expertUserInfo = expertFullInfoAll.getExpertUserInfoDTO();
// 字典字典段map
Map<String, List<DictionaryFieldInfo>> dictionaryFieldInfoMap =
buildDictionaryFieldInfoMap(expertUserFullInfoAll.getExpertDictionaryList());
Map<String, List<DictionaryFieldInfo>> dictFieldInfoMap = buildDictionaryFieldInfoMap(expertFullInfoAll.getExpertDictionaryList());
// 专家文件资料map
Map<Long, FileBasicInfo> fileBasicInfoMap = buildFileBasicInfoMap(attachFiles);
// 专家标签字段map
Map<String, List<TagFieldInfo>> tagFieldInfoMap = buildTagFieldInfoMap(expertUserFullInfoAll.getExpertTagList());
Map<String, List<TagFieldInfo>> tagFieldInfoMap = buildTagFieldInfoMap(expertFullInfoAll.getExpertTagList());
// 专家履职意向地
List<ExpertRegionDTO> expertIntentionWorkRegionInfo =
expertUserFullInfoAll.getExpertIntentionWorkRegionInfo();
List<ExpertRegionDTO> expertIntentionWorkRegionInfo = expertFullInfoAll.getExpertIntentionWorkRegionInfo();
// 专家回避单位列表
List<ExpertAvoidCompanyDTO> expertAvoidCompanyList = expertUserFullInfoAll.getExpertAvoidCompanyList();
List<ExpertAvoidCompanyDTO> expertAvoidCompanyList = expertFullInfoAll.getExpertAvoidCompanyList();
// 基本信息
ExpertBasicInfo basicInfo = buildExpertBasicInfo(expertUserInfoDTO, dictionaryFieldInfoMap, tagFieldInfoMap, expertIntentionWorkRegionInfo, fileBasicInfoMap);
ExpertBasicInfo basicInfo = buildExpertBasicInfo(expertUserInfo, dictFieldInfoMap, tagFieldInfoMap, expertIntentionWorkRegionInfo, fileBasicInfoMap);
// 学历信息
ExpertEduInfo eduInfo = buildExpertEduInfo(expertUserInfoDTO, dictionaryFieldInfoMap, fileBasicInfoMap);
ExpertEduInfo eduInfo = buildExpertEduInfo(expertUserInfo, dictFieldInfoMap, fileBasicInfoMap);
// 职业信息
ExpertJobInfo jobInfo = buildExpertJobInfo(expertUserInfoDTO, dictionaryFieldInfoMap);
ExpertJobInfo jobInfo = buildExpertJobInfo(expertUserInfo, dictFieldInfoMap);
// 专业信息
ExpertProfessionalInfo professionalInfo =
buildExpertProfessionalInfo(expertUserInfoDTO, dictionaryFieldInfoMap, tagFieldInfoMap
, fileBasicInfoMap, expertAvoidCompanyList);
ExpertProfessionalInfo professionalInfo = buildExpertProfessionalInfo(expertUserInfo, dictFieldInfoMap
, tagFieldInfoMap, fileBasicInfoMap, expertAvoidCompanyList);
// 推荐信息
ExpertRecommendInfo recommendInfo = new ExpertRecommendInfo();
recommendInfo.setRecommendedWay(dictionaryFieldInfoMap.get(DictExpertInfoTypeEnum.RECOMMENDED_WAY.getKey()));
recommendInfo.setRecommendationProofFile(
getFileBasicInfoList(fileBasicInfoMap, expertUserInfoDTO.getRecommendationProofFileIdList()));
recommendInfo.setRecommendedWay(dictFieldInfoMap.get(DictExpertInfoTypeEnum.RECOMMENDED_WAY.getKey()));
recommendInfo.setRecommendationProofFile(getFileBasicInfoList(fileBasicInfoMap, expertUserInfo.getRecommendationProofFileIdList()));
// 其他信息
ExpertOtherInfo otherInfo = new ExpertOtherInfo();
otherInfo.setOther(tagFieldInfoMap.get(ExpertTagEnum.OTHER.getKey()));
otherInfo.setRemark(expertUserInfoDTO.getRemark());
otherInfo.setRemark(expertUserInfo.getRemark());

// 专家申请履职意向展示列表
List<ExpertRegionInfo> applyIntentionWorkRegions = expertUserFullInfoAll.getExpertApplyIntentionWorkRegionInfo().stream().map(r -> {
List<ExpertRegionInfo> applyIntentionWorkRegions = expertFullInfoAll.getExpertApplyIntentionWorkRegionInfo().stream().map(r -> {
ExpertRegionInfo expertApplyIntentionWorkRegion = new ExpertRegionInfo();
expertApplyIntentionWorkRegion.setRegionLevel(r.getRegionLevel());
expertApplyIntentionWorkRegion.setRegionCode(r.getRegionCode());
@@ -92,17 +87,16 @@ public class ExpertUserInfoAssembler {
if (CollUtil.isEmpty(basicInfo.getExpertIntentionWorkRegions())) {
basicInfo.setExpertIntentionWorkRegions(applyIntentionWorkRegions);
}
ExpertFullInfoVO expertFullInfoVO = new ExpertFullInfoVO();
expertFullInfoVO.setUserId(expertUserInfoDTO.getUserId());
expertFullInfoVO.setBasicInfo(basicInfo);
expertFullInfoVO.setEduInfo(eduInfo);
expertFullInfoVO.setJobInfo(jobInfo);
expertFullInfoVO.setProfessionalInfo(professionalInfo);
expertFullInfoVO.setRecommendInfo(recommendInfo);
expertFullInfoVO.setExpertOtherInfo(otherInfo);
expertFullInfoVO.setExpertApplyIntentionWorkRegions(applyIntentionWorkRegions);

return expertFullInfoVO;
ExpertFullInfoVO resExpertFullInfo = new ExpertFullInfoVO();
resExpertFullInfo.setUserId(expertUserInfo.getUserId());
resExpertFullInfo.setBasicInfo(basicInfo);
resExpertFullInfo.setEduInfo(eduInfo);
resExpertFullInfo.setJobInfo(jobInfo);
resExpertFullInfo.setProfessionalInfo(professionalInfo);
resExpertFullInfo.setRecommendInfo(recommendInfo);
resExpertFullInfo.setExpertOtherInfo(otherInfo);
resExpertFullInfo.setExpertApplyIntentionWorkRegions(applyIntentionWorkRegions);
return resExpertFullInfo;
}

public static Map<Long, FileBasicInfo> buildFileBasicInfoMap(List<AttachFileVo> attachFiles) {


Načítá se…
Zrušit
Uložit