Browse Source

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

master
WendyYang 1 year ago
parent
commit
18f6107607
1 changed files with 10 additions and 10 deletions
  1. +10
    -10
      pmapi/src/main/java/com/ningdatech/pmapi/expert/assembler/ExpertUserInfoAssembler.java

+ 10
- 10
pmapi/src/main/java/com/ningdatech/pmapi/expert/assembler/ExpertUserInfoAssembler.java View File

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


import cn.hutool.core.collection.CollUtil;
import com.alibaba.fastjson.JSONObject;
import com.ningdatech.file.entity.vo.result.AttachFileVo;
import com.ningdatech.pmapi.common.enumeration.BoolDisplayEnum;
@@ -80,7 +81,7 @@ public class ExpertUserInfoAssembler {
otherInfo.setRemark(expertUserInfoDTO.getRemark());

// 专家申请履职意向展示列表
List<ExpertRegionInfo> expertApplyIntentionWorkRegions = expertUserFullInfoAll.getExpertApplyIntentionWorkRegionInfo().stream().map(r -> {
List<ExpertRegionInfo> applyIntentionWorkRegions = expertUserFullInfoAll.getExpertApplyIntentionWorkRegionInfo().stream().map(r -> {
ExpertRegionInfo expertApplyIntentionWorkRegion = new ExpertRegionInfo();
expertApplyIntentionWorkRegion.setRegionLevel(r.getRegionLevel());
expertApplyIntentionWorkRegion.setRegionCode(r.getRegionCode());
@@ -88,7 +89,9 @@ public class ExpertUserInfoAssembler {
return expertApplyIntentionWorkRegion;
}).collect(Collectors.toList());


if (CollUtil.isEmpty(basicInfo.getExpertIntentionWorkRegions())) {
basicInfo.setExpertIntentionWorkRegions(applyIntentionWorkRegions);
}
ExpertFullInfoVO expertFullInfoVO = new ExpertFullInfoVO();
expertFullInfoVO.setUserId(expertUserInfoDTO.getUserId());
expertFullInfoVO.setBasicInfo(basicInfo);
@@ -97,7 +100,7 @@ public class ExpertUserInfoAssembler {
expertFullInfoVO.setProfessionalInfo(professionalInfo);
expertFullInfoVO.setRecommendInfo(recommendInfo);
expertFullInfoVO.setExpertOtherInfo(otherInfo);
expertFullInfoVO.setExpertApplyIntentionWorkRegions(expertApplyIntentionWorkRegions);
expertFullInfoVO.setExpertApplyIntentionWorkRegions(applyIntentionWorkRegions);

return expertFullInfoVO;
}
@@ -208,8 +211,7 @@ public class ExpertUserInfoAssembler {
if (Objects.isNull(fileId)) {
return null;
}
FileBasicInfo fileBasicInfo = fileBasicInfoMap.get(fileId);
return fileBasicInfo;
return fileBasicInfoMap.get(fileId);
}

public ExpertBasicInfo buildExpertBasicInfo(ExpertUserFullInfoDTO expertUserInfoDTO
@@ -239,10 +241,8 @@ public class ExpertUserInfoAssembler {
basicInfo.setHometown(expertUserInfoDTO.getHometown());
basicInfo.setNationality(expertUserInfoDTO.getNationality());
basicInfo.setExpertSource(tagFieldInfoMap.get(ExpertTagEnum.EXPERT_SOURCE.getKey()));
if (Objects.nonNull(expertRegionInfo)) {
expertRegionInfo.setRegionName(regionCacheHelper.getUnionPathStr(expertRegionInfo.getRegionCode(), expertRegionInfo.getRegionLevel()));
basicInfo.setExpertRegionInfo(expertRegionInfo);
}
expertRegionInfo.setRegionName(regionCacheHelper.getUnionPathStr(expertRegionInfo.getRegionCode(), expertRegionInfo.getRegionLevel()));
basicInfo.setExpertRegionInfo(expertRegionInfo);

basicInfo.setExpertIntentionWorkRegions(expertIntentionWorkRegionInfo.stream().map(r -> {
ExpertRegionInfo expertIntentionWorkRegion = new ExpertRegionInfo();
@@ -282,7 +282,7 @@ public class ExpertUserInfoAssembler {

private static List<ExpertRegionDTO> buildExpertApplyIntentionWorkRegionInfo(List<ExpertIntentionWorkRegion> expertIntentionWorkRegionList
, List<ExpertMetaApply> expertMetaApplyList) {
HashSet<RegionDtoMapKey> set = new HashSet();
Set<RegionDtoMapKey> set = new HashSet<>();
for (ExpertIntentionWorkRegion expertIntentionWorkRegion : expertIntentionWorkRegionList) {
RegionDtoMapKey regionDtoMapKey = new RegionDtoMapKey();
regionDtoMapKey.setRegionCode(expertIntentionWorkRegion.getRegionCode());


Loading…
Cancel
Save