Browse Source

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

tags/24080901
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; package com.ningdatech.pmapi.expert.assembler;




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


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



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


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


public ExpertBasicInfo buildExpertBasicInfo(ExpertUserFullInfoDTO expertUserInfoDTO public ExpertBasicInfo buildExpertBasicInfo(ExpertUserFullInfoDTO expertUserInfoDTO
@@ -239,10 +241,8 @@ public class ExpertUserInfoAssembler {
basicInfo.setHometown(expertUserInfoDTO.getHometown()); basicInfo.setHometown(expertUserInfoDTO.getHometown());
basicInfo.setNationality(expertUserInfoDTO.getNationality()); basicInfo.setNationality(expertUserInfoDTO.getNationality());
basicInfo.setExpertSource(tagFieldInfoMap.get(ExpertTagEnum.EXPERT_SOURCE.getKey())); 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 -> { basicInfo.setExpertIntentionWorkRegions(expertIntentionWorkRegionInfo.stream().map(r -> {
ExpertRegionInfo expertIntentionWorkRegion = new ExpertRegionInfo(); ExpertRegionInfo expertIntentionWorkRegion = new ExpertRegionInfo();
@@ -282,7 +282,7 @@ public class ExpertUserInfoAssembler {


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


Loading…
Cancel
Save