From ddca2acd3074a5bb06a2bfbdb4807c4ee44371e3 Mon Sep 17 00:00:00 2001 From: WendyYang Date: Wed, 27 Dec 2023 16:24:52 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=93=E5=AE=B6=E5=88=97=E8=A1=A8=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/hz/pm/api/common/util/DictUtils.java | 8 +- .../hz/pm/api/common/util/ExpertRegisterUtil.java | 12 +- .../hz/pm/api/expert/assembler/DictAssembler.java | 10 +- .../ExpertAdminExpertManageAssembler.java | 115 ++++------------- .../expert/assembler/ExpertInfoCmdAssembler.java | 24 ++-- .../expert/assembler/ExpertUserInfoAssembler.java | 80 ++++-------- .../constant/ExpertUserInfoSensitiveFieldEnum.java | 6 +- .../ExpertInfoSensitiveFieldModifyCheckHelper.java | 4 +- .../pm/api/expert/helper/ExpertManageHelper.java | 16 +-- .../hz/pm/api/expert/manage/ExpertAdminManage.java | 6 +- .../api/expert/manage/ExpertMetaApplyManage.java | 10 +- .../hz/pm/api/expert/model/DictFieldInfoDTO.java | 34 +++++ .../pm/api/expert/model/DictionaryFieldInfo.java | 34 ----- .../hz/pm/api/expert/model/ExpertBasicInfo.java | 5 +- .../com/hz/pm/api/expert/model/ExpertEduInfo.java | 6 +- .../com/hz/pm/api/expert/model/ExpertJobInfo.java | 6 +- .../api/expert/model/ExpertProfessionalInfo.java | 2 +- .../pm/api/expert/model/ExpertRecommendInfo.java | 3 +- .../api/expert/model/SensitiveModifySegment.java | 4 +- .../api/expert/model/cmd/MetaApplyListQuery.java | 4 +- .../expert/model/dto/ExpertAdminExpertListDTO.java | 76 +++++++++++ .../model/dto/ExpertAdminExpertManageListDTO.java | 139 --------------------- .../expert/model/req/MetaApplyResultRequest.java | 4 +- .../pm/api/expert/model/vo/ExpertApplyMetaVO.java | 6 +- .../expert/model/vo/ExpertLibraryListItemVO.java | 33 ++--- .../expert/service/ExpertAdminManageService.java | 4 +- .../service/impl/ExpertAdminManageServiceImpl.java | 24 +--- .../expert/service/impl/ExpertInfoServiceImpl.java | 6 +- .../expert/utils/SensitiveModifySegmentUtils.java | 6 +- .../api/meeting/controller/MeetingController.java | 4 +- 30 files changed, 255 insertions(+), 436 deletions(-) create mode 100644 hz-pm-api/src/main/java/com/hz/pm/api/expert/model/DictFieldInfoDTO.java delete mode 100644 hz-pm-api/src/main/java/com/hz/pm/api/expert/model/DictionaryFieldInfo.java create mode 100644 hz-pm-api/src/main/java/com/hz/pm/api/expert/model/dto/ExpertAdminExpertListDTO.java delete mode 100644 hz-pm-api/src/main/java/com/hz/pm/api/expert/model/dto/ExpertAdminExpertManageListDTO.java diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/common/util/DictUtils.java b/hz-pm-api/src/main/java/com/hz/pm/api/common/util/DictUtils.java index 5874fb6..41c5262 100644 --- a/hz-pm-api/src/main/java/com/hz/pm/api/common/util/DictUtils.java +++ b/hz-pm-api/src/main/java/com/hz/pm/api/common/util/DictUtils.java @@ -1,7 +1,7 @@ package com.hz.pm.api.common.util; import cn.hutool.core.collection.CollUtil; -import com.hz.pm.api.expert.model.DictionaryFieldInfo; +import com.hz.pm.api.expert.model.DictFieldInfoDTO; import java.util.Comparator; import java.util.List; @@ -15,7 +15,7 @@ public class DictUtils { private DictUtils() { } - public static Boolean isValueEquals(List list1, List list2) { + public static Boolean isValueEquals(List list1, List list2) { if (CollUtil.isEmpty(list1) && CollUtil.isEmpty(list2)) { return true; } @@ -27,8 +27,8 @@ public class DictUtils { if (list1.size() != list2.size()) { return false; } - list1.sort(Comparator.comparing(DictionaryFieldInfo::getDictionaryFieldName).thenComparing(DictionaryFieldInfo::getDictionaryCode)); - list2.sort(Comparator.comparing(DictionaryFieldInfo::getDictionaryFieldName).thenComparing(DictionaryFieldInfo::getDictionaryCode)); + list1.sort(Comparator.comparing(DictFieldInfoDTO::getDictionaryFieldName).thenComparing(DictFieldInfoDTO::getDictionaryCode)); + list2.sort(Comparator.comparing(DictFieldInfoDTO::getDictionaryFieldName).thenComparing(DictFieldInfoDTO::getDictionaryCode)); for (int i = 0; i < list1.size(); i++) { if (!StrUtils.trimEquals(list1.get(i).getDictionaryFieldName(), list2.get(i).getDictionaryFieldName()) diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/common/util/ExpertRegisterUtil.java b/hz-pm-api/src/main/java/com/hz/pm/api/common/util/ExpertRegisterUtil.java index 3f113b1..124150f 100644 --- a/hz-pm-api/src/main/java/com/hz/pm/api/common/util/ExpertRegisterUtil.java +++ b/hz-pm-api/src/main/java/com/hz/pm/api/common/util/ExpertRegisterUtil.java @@ -67,7 +67,7 @@ public class ExpertRegisterUtil { politicalDicts.stream() .filter(dict -> dict.getName().equals(political)) .findFirst().ifPresent(dictionary -> { - DictionaryFieldInfo dict = new DictionaryFieldInfo(); + DictFieldInfoDTO dict = new DictFieldInfoDTO(); dict.setDictionaryName(dictionary.getName()); dict.setDictionaryCode(dictionary.getDictionaryCode()); dict.setDictionaryFieldName(dictionary.getDictionaryType()); @@ -87,7 +87,7 @@ public class ExpertRegisterUtil { eduDicts.stream() .filter(dict -> dict.getName().equals(eduStr)) .findFirst().ifPresent(dictionary -> { - DictionaryFieldInfo dict = new DictionaryFieldInfo(); + DictFieldInfoDTO dict = new DictFieldInfoDTO(); dict.setDictionaryName(dictionary.getName()); dict.setDictionaryCode(dictionary.getDictionaryCode()); dict.setDictionaryFieldName(dictionary.getDictionaryType()); @@ -101,7 +101,7 @@ public class ExpertRegisterUtil { degreeDicts.stream() .filter(dict -> dict.getName().equals(degreeStr)) .findFirst().ifPresent(dictionary -> { - DictionaryFieldInfo dict = new DictionaryFieldInfo(); + DictFieldInfoDTO dict = new DictFieldInfoDTO(); dict.setDictionaryName(dictionary.getName()); dict.setDictionaryCode(dictionary.getDictionaryCode()); dict.setDictionaryFieldName(dictionary.getDictionaryType()); @@ -144,7 +144,7 @@ public class ExpertRegisterUtil { administrativeRankDicts.stream() .filter(dict -> dict.getName().equals(administrativeRankStr)) .findFirst().ifPresent(dictionary -> { - DictionaryFieldInfo dict = new DictionaryFieldInfo(); + DictFieldInfoDTO dict = new DictFieldInfoDTO(); dict.setDictionaryName(dictionary.getName()); dict.setDictionaryCode(dictionary.getDictionaryCode()); dict.setDictionaryFieldName(dictionary.getDictionaryType()); @@ -158,7 +158,7 @@ public class ExpertRegisterUtil { companyTypeDicts.stream() .filter(dict -> dict.getName().equals(companyTypeStr)) .findFirst().ifPresent(dictionary -> { - DictionaryFieldInfo dict = new DictionaryFieldInfo(); + DictFieldInfoDTO dict = new DictFieldInfoDTO(); dict.setDictionaryName(dictionary.getName()); dict.setDictionaryCode(dictionary.getDictionaryCode()); dict.setDictionaryFieldName(dictionary.getDictionaryType()); @@ -245,7 +245,7 @@ public class ExpertRegisterUtil { titleLevelDicts.stream() .filter(dict -> dict.getName().equals(titleLevel)) .findFirst().ifPresent(dictionary -> { - DictionaryFieldInfo dict = new DictionaryFieldInfo(); + DictFieldInfoDTO dict = new DictFieldInfoDTO(); dict.setDictionaryName(dictionary.getName()); dict.setDictionaryCode(dictionary.getDictionaryCode()); dict.setDictionaryFieldName(dictionary.getDictionaryType()); diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/expert/assembler/DictAssembler.java b/hz-pm-api/src/main/java/com/hz/pm/api/expert/assembler/DictAssembler.java index 61752dc..c498e3e 100644 --- a/hz-pm-api/src/main/java/com/hz/pm/api/expert/assembler/DictAssembler.java +++ b/hz-pm-api/src/main/java/com/hz/pm/api/expert/assembler/DictAssembler.java @@ -1,10 +1,10 @@ package com.hz.pm.api.expert.assembler; import cn.hutool.core.collection.CollUtil; -import com.hz.pm.api.expert.model.DictionaryFieldInfo; +import com.hz.pm.api.expert.model.DictFieldInfoDTO; import com.hz.pm.api.meta.model.entity.ExpertDictionary; -import java.util.ArrayList; +import java.util.Collections; import java.util.List; import java.util.stream.Collectors; @@ -17,12 +17,12 @@ public class DictAssembler { private DictAssembler() { } - public static List toDictFieldInfoList(List expertDictList) { + public static List convert(List expertDictList) { if (CollUtil.isEmpty(expertDictList)) { - return new ArrayList<>(); + return Collections.emptyList(); } return expertDictList.stream().map(r -> { - DictionaryFieldInfo dictionaryFieldInfo = new DictionaryFieldInfo(); + DictFieldInfoDTO dictionaryFieldInfo = new DictFieldInfoDTO(); dictionaryFieldInfo.setDictionaryFieldName(r.getExpertInfoField()); dictionaryFieldInfo.setDictionaryCode(r.getDictionaryCode()); return dictionaryFieldInfo; diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/expert/assembler/ExpertAdminExpertManageAssembler.java b/hz-pm-api/src/main/java/com/hz/pm/api/expert/assembler/ExpertAdminExpertManageAssembler.java index 3ce707b..bac253a 100644 --- a/hz-pm-api/src/main/java/com/hz/pm/api/expert/assembler/ExpertAdminExpertManageAssembler.java +++ b/hz-pm-api/src/main/java/com/hz/pm/api/expert/assembler/ExpertAdminExpertManageAssembler.java @@ -1,22 +1,17 @@ package com.hz.pm.api.expert.assembler; +import cn.hutool.core.collection.CollUtil; import cn.hutool.core.collection.CollectionUtil; import com.hz.pm.api.common.helper.RegionCacheHelper; -import com.hz.pm.api.expert.constant.ExpertAccountStatusEnum; -import com.hz.pm.api.expert.constant.QueryExpertAccountStatusEnum; -import com.hz.pm.api.expert.model.DictionaryFieldInfo; +import com.hz.pm.api.expert.model.DictFieldInfoDTO; import com.hz.pm.api.expert.model.TagFieldInfo; -import com.hz.pm.api.expert.model.dto.ExpertAdminExpertManageListDTO; +import com.hz.pm.api.expert.model.dto.ExpertAdminExpertListDTO; import com.hz.pm.api.expert.model.vo.ExpertLibraryListItemVO; import com.hz.pm.api.meta.helper.DictionaryCache; import com.hz.pm.api.meta.helper.impl.TagsCacheImpl; -import com.hz.pm.api.meta.model.ExpertRegionInfo; import com.hz.pm.api.meta.model.dto.DictionaryDTO; import com.hz.pm.api.meta.model.dto.TagDTO; -import com.hz.pm.api.sys.model.dto.RegionDTO; import lombok.RequiredArgsConstructor; -import org.apache.commons.collections4.CollectionUtils; -import org.apache.commons.lang3.StringUtils; import org.springframework.stereotype.Component; import java.util.*; @@ -31,96 +26,38 @@ import java.util.stream.Collectors; public class ExpertAdminExpertManageAssembler { private final DictionaryCache dictionaryCache; - private final TagsCacheImpl tagCache; - private final RegionCacheHelper regionCache; - public List toExpertAdminExpertManageListVOList( - List expertManageListDTOList) { - if (CollectionUtil.isEmpty(expertManageListDTOList)) { - return new ArrayList<>(); + public List toViews( + List experts) { + if (CollUtil.isEmpty(experts)) { + return Collections.emptyList(); } - return expertManageListDTOList.stream().map(r -> { - ExpertLibraryListItemVO expertLibraryListItemVO = new ExpertLibraryListItemVO(); - expertLibraryListItemVO.setUserId(r.getUserId()); - expertLibraryListItemVO.setExpertName(r.getExpertName()); - expertLibraryListItemVO.setPhoneNo(r.getPhoneNo()); - expertLibraryListItemVO.setIsDingUser(r.getIsDingUser()); - expertLibraryListItemVO.setCompany(r.getCompany()); - expertLibraryListItemVO.setLegalEntityCode(r.getLegalEntityCode()); - - if (StringUtils.isNotBlank(r.getExpertAccountStatus())) { - ExpertAccountStatusEnum statusEnum = ExpertAccountStatusEnum.of(r.getExpertAccountStatus()); - switch (statusEnum) { - case FREEZE: - expertLibraryListItemVO.setExpertAccountStatus(QueryExpertAccountStatusEnum.FREEZING.getKey()); - break; - case AVAILABLE: - expertLibraryListItemVO.setExpertAccountStatus(QueryExpertAccountStatusEnum.NORMAL.getKey()); - break; - default: - break; - } - } - ExpertRegionInfo expertRegionInfo = r.getExpertRegionInfo(); - if (Objects.nonNull(expertRegionInfo)) { - Integer regionLevel = expertRegionInfo.getRegionLevel(); - String regionCode = expertRegionInfo.getRegionCode(); - RegionDTO regionDTO = regionCache.getByCodeAndLevel(regionCode, regionLevel); - if (Objects.nonNull(regionDTO)) { - expertRegionInfo.setRegionCode(regionDTO.getRegionCode()); - expertRegionInfo.setRegionLevel(regionDTO.getRegionLevel()); - expertRegionInfo.setRegionName(regionDTO.getRegionName()); - expertLibraryListItemVO.setExpertRegionInfo(expertRegionInfo); - } - } - List expertType = r.getExpertType(); - if (CollectionUtils.isNotEmpty(expertType)) { - expertType = assembleDictionaryName(expertType); - expertLibraryListItemVO.setExpertType(expertType); - } - List companyAttribute = r.getCompanyAttribute(); - if (CollectionUtils.isNotEmpty(companyAttribute)) { - companyAttribute = assembleDictionaryName(companyAttribute); - expertLibraryListItemVO.setCompanyAttribute(companyAttribute); - } - List titleLevel = r.getTitleLevel(); - if (CollectionUtils.isNotEmpty(titleLevel)) { - titleLevel = assembleDictionaryName(titleLevel); - expertLibraryListItemVO.setTitleLevel(titleLevel); - } - - List expertSource = r.getExpertSource(); - if (CollectionUtils.isNotEmpty(expertSource)) { - expertSource = assembleTagName(expertSource); - expertLibraryListItemVO.setExpertSource(expertSource); - } - expertLibraryListItemVO.setCreateTime(r.getCreateTime()); - return expertLibraryListItemVO; + return experts.stream().map(r -> { + ExpertLibraryListItemVO item = new ExpertLibraryListItemVO(); + item.setUserId(r.getUserId()); + item.setExpertName(r.getExpertName()); + item.setPhoneNo(r.getPhoneNo()); + item.setCompany(r.getCompany()); + item.setExpertType(fillDictName(r.getExpertType())); + item.setExpertSource(fillDictName(r.getExpertSource())); + item.setExpertLibrary(fillDictName(r.getExpertLibrary())); + item.setExpertSpecialty(fillDictName(r.getExpertSpecialty())); + item.setInPutTime(r.getInPutTime()); + item.setCreateTime(r.getCreateTime()); + return item; }).collect(Collectors.toList()); } - public List assembleDictionaryName(List collect) { - if (CollectionUtil.isEmpty(collect)){ - return Collections.emptyList(); + private List fillDictName(List dicts) { + if (CollectionUtil.isEmpty(dicts)) { + return dicts; } - return collect.stream().peek(r -> { + dicts.forEach(r -> { Optional dict = dictionaryCache.getByCode(r.getDictionaryCode()); dict.ifPresent(dictDTO -> r.setDictionaryName(dictDTO.getName())); - }).collect(Collectors.toList()); - } - - - public List assembleTagName(List collect) { - if (CollectionUtil.isEmpty(collect)){ - return new ArrayList<>(); - } - return collect.stream().peek(r -> { - TagDTO tagDTO = tagCache.getByTagCode(r.getTagCode()); - if (Objects.nonNull(tagDTO)) { - r.setTagName(tagDTO.getTagName()); - } - }).collect(Collectors.toList()); + }); + return dicts; } } diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/expert/assembler/ExpertInfoCmdAssembler.java b/hz-pm-api/src/main/java/com/hz/pm/api/expert/assembler/ExpertInfoCmdAssembler.java index e42f6e4..1546504 100644 --- a/hz-pm-api/src/main/java/com/hz/pm/api/expert/assembler/ExpertInfoCmdAssembler.java +++ b/hz-pm-api/src/main/java/com/hz/pm/api/expert/assembler/ExpertInfoCmdAssembler.java @@ -119,20 +119,20 @@ public class ExpertInfoCmdAssembler { private static List buildExpertDictionaryList(ExpertBasicInfo basicInfo, ExpertEduInfo eduInfo , ExpertJobInfo jobInfo, ExpertProfessionalInfo professionalInfo, ExpertRecommendInfo recommendInfo) { - List political = basicInfo.getPolitical(); - List expertType = basicInfo.getExpertType(); - List edu = eduInfo.getEdu(); - List degree = eduInfo.getDegree(); - List jobStatus = jobInfo.getJobStatus(); - List companyAttribute = jobInfo.getCompanyAttribute(); - List administrativeRank = jobInfo.getAdministrativeRank(); - List titleLevel = professionalInfo.getTitleLevel(); - - List recommendedWay = new ArrayList<>(); + List political = basicInfo.getPolitical(); + List expertType = basicInfo.getExpertType(); + List edu = eduInfo.getEdu(); + List degree = eduInfo.getDegree(); + List jobStatus = jobInfo.getJobStatus(); + List companyAttribute = jobInfo.getCompanyAttribute(); + List administrativeRank = jobInfo.getAdministrativeRank(); + List titleLevel = professionalInfo.getTitleLevel(); + + List recommendedWay = new ArrayList<>(); if (Objects.nonNull(recommendInfo)) { recommendedWay = recommendInfo.getRecommendedWay(); } - List dictionaryFieldInfoList = new ArrayList<>(); + List dictionaryFieldInfoList = new ArrayList<>(); assemblerDictionaryFieldName(dictionaryFieldInfoList, political, ExpertDictTypeEnum.POLITICAL); assemblerDictionaryFieldName(dictionaryFieldInfoList, expertType, ExpertDictTypeEnum.EXPERT_TYPE); assemblerDictionaryFieldName(dictionaryFieldInfoList, edu, ExpertDictTypeEnum.EDU); @@ -152,7 +152,7 @@ public class ExpertInfoCmdAssembler { } private static void assemblerDictionaryFieldName( - List allDictionaryFieldInfoList, List originalDictionaryFieldInfoList + List allDictionaryFieldInfoList, List originalDictionaryFieldInfoList , ExpertDictTypeEnum dictExpertInfoTypeEnum) { if (CollectionUtils.isNotEmpty(originalDictionaryFieldInfoList)) { originalDictionaryFieldInfoList = originalDictionaryFieldInfoList.stream().map(r -> { diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/expert/assembler/ExpertUserInfoAssembler.java b/hz-pm-api/src/main/java/com/hz/pm/api/expert/assembler/ExpertUserInfoAssembler.java index 546ccc1..ff67fed 100644 --- a/hz-pm-api/src/main/java/com/hz/pm/api/expert/assembler/ExpertUserInfoAssembler.java +++ b/hz-pm-api/src/main/java/com/hz/pm/api/expert/assembler/ExpertUserInfoAssembler.java @@ -3,7 +3,6 @@ package com.hz.pm.api.expert.assembler; import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.collection.CollUtil; -import cn.hutool.core.util.StrUtil; import com.hz.pm.api.common.helper.RegionCacheHelper; import com.hz.pm.api.common.model.FileBasicInfo; import com.hz.pm.api.expert.constant.ExpertApplyTypeEnum; @@ -21,6 +20,7 @@ import com.hz.pm.api.meta.model.dto.DictionaryDTO; import com.hz.pm.api.meta.model.dto.TagDTO; import com.hz.pm.api.meta.model.entity.ExpertDictionary; import com.hz.pm.api.meta.model.entity.ExpertTag; +import com.ningdatech.basic.util.CollUtils; import com.ningdatech.file.entity.vo.result.AttachFileVo; import lombok.RequiredArgsConstructor; import org.apache.commons.lang3.StringUtils; @@ -45,7 +45,7 @@ public class ExpertUserInfoAssembler { public ExpertFullInfoVO buildExpertDetail(List attachFiles, ExpertFullInfoAllDTO expertFullInfoAll) { ExpertUserFullInfoDTO expertUserInfo = expertFullInfoAll.getExpertUserInfoDTO(); // 字典字典段map - Map> dictMap = buildDictInfoMap(expertFullInfoAll.getExpertDictionaryList()); + Map> dictMap = buildDictInfoMap(expertFullInfoAll.getExpertDictionaryList()); // 专家文件资料map Map fileMap = buildFileBasicInfoMap(attachFiles); // 专家标签字段map @@ -118,19 +118,19 @@ public class ExpertUserInfoAssembler { }).collect(Collectors.groupingBy(TagFieldInfo::getTagFieldName)); } - public Map> buildDictInfoMap(List expertDictList) { + public Map> buildDictInfoMap(List expertDictList) { return expertDictList.stream().map(r -> { - DictionaryFieldInfo dictionaryFieldInfo = new DictionaryFieldInfo(); + DictFieldInfoDTO dictionaryFieldInfo = new DictFieldInfoDTO(); dictionaryFieldInfo.setDictionaryFieldName(r.getExpertInfoField()); dictionaryFieldInfo.setDictionaryCode(r.getDictionaryCode()); Optional dictionaryDTO = dictionaryCache.getByCode(r.getDictionaryCode()); dictionaryDTO.ifPresent(dictDTO -> dictionaryFieldInfo.setDictionaryName(dictDTO.getName())); return dictionaryFieldInfo; - }).collect(Collectors.groupingBy(DictionaryFieldInfo::getDictionaryFieldName)); + }).collect(Collectors.groupingBy(DictFieldInfoDTO::getDictionaryFieldName)); } public static ExpertProfessionalInfo buildExpertProfessionalInfo(ExpertUserFullInfoDTO expertUserInfoDTO, - Map> dictInfoMap, + Map> dictInfoMap, Map> tagFieldInfoMap, Map fileInfoMap, List expertAvoidCompanyList) { @@ -151,7 +151,7 @@ public class ExpertUserInfoAssembler { } public static ExpertJobInfo buildExpertJobInfo(ExpertUserFullInfoDTO expertUserInfoDTO, - Map> dictInfoMap) { + Map> dictInfoMap) { ExpertJobInfo jobInfo = new ExpertJobInfo(); jobInfo.setJobStatus(dictInfoMap.get(ExpertDictTypeEnum.JOB_STATUS.getKey())); jobInfo.setCompany(expertUserInfoDTO.getCompany()); @@ -166,7 +166,7 @@ public class ExpertUserInfoAssembler { } public static ExpertEduInfo buildExpertEduInfo(ExpertUserFullInfoDTO expertFullInfo, - Map> dictInfoMap) { + Map> dictInfoMap) { // 学历信息 ExpertEduInfo eduInfo = new ExpertEduInfo(); eduInfo.setSchool(expertFullInfo.getSchoolMajor()); @@ -194,7 +194,7 @@ public class ExpertUserInfoAssembler { } public ExpertBasicInfo convert(ExpertUserFullInfoDTO expertUserInfoDTO - , Map> dictionaryFieldInfoMap + , Map> dictionaryFieldInfoMap , Map> tagFieldInfoMap , List expertIntentionWorkRegionInfo) { //专家层级 @@ -369,53 +369,27 @@ public class ExpertUserInfoAssembler { return expert; } - public static ExpertAdminExpertManageListDTO convert(ExpertUserFullInfo expertUserFullInfo, - Map> expertDictMap, - Map> expertTagMap) { - Long userId = expertUserFullInfo.getUserId(); - ExpertAdminExpertManageListDTO adminManageExpertListItem = new ExpertAdminExpertManageListDTO(); - adminManageExpertListItem.setUserId(expertUserFullInfo.getUserId()); - adminManageExpertListItem.setExpertName(expertUserFullInfo.getExpertName()); - adminManageExpertListItem.setPhoneNo(expertUserFullInfo.getPhoneNo()); - adminManageExpertListItem.setIsDingUser(expertUserFullInfo.getIsDingUser()); - adminManageExpertListItem.setCompany(expertUserFullInfo.getCompany()); + public static ExpertAdminExpertListDTO convert(ExpertUserFullInfo eui, + Map> expertDictMap) { + ExpertAdminExpertListDTO item = new ExpertAdminExpertListDTO(); + item.setUserId(eui.getUserId()); + item.setExpertName(eui.getExpertName()); + item.setPhoneNo(eui.getPhoneNo()); + item.setCompany(eui.getCompany()); + Long userId = eui.getUserId(); // 装配字典数据 - List userExpertDictList = expertDictMap.getOrDefault(userId, Collections.emptyList()); - Map> fieldExpertDictMap = userExpertDictList.stream().collect(Collectors.groupingBy(ExpertDictionary::getExpertInfoField)); - adminManageExpertListItem.setExpertType( - DictAssembler.toDictFieldInfoList(fieldExpertDictMap.get(ExpertDictTypeEnum.EXPERT_TYPE.getKey()))); - adminManageExpertListItem.setCompanyAttribute( - DictAssembler.toDictFieldInfoList(fieldExpertDictMap.get(ExpertDictTypeEnum.COMPANY_ATTRIBUTE.getKey()))); - adminManageExpertListItem.setTitleLevel( - DictAssembler.toDictFieldInfoList(fieldExpertDictMap.get(ExpertDictTypeEnum.TITLE_LEVEL.getKey()))); - // 装配标签数据 - List expertTagList = Objects.isNull(expertTagMap.get(userId)) ? new ArrayList<>() : expertTagMap.get(userId); - Map> fieldExpertTagMap = expertTagList.stream().collect(Collectors.groupingBy(ExpertTag::getExpertInfoField)); - adminManageExpertListItem.setExpertSource(TagAssembler.toTagFieldInfoList(fieldExpertTagMap.get(ExpertTagEnum.EXPERT_SOURCE.getKey()))); - - if (StrUtil.isNotBlank(expertUserFullInfo.getRegionCode()) && Objects.nonNull(expertUserFullInfo.getRegionLevel())) { - ExpertRegionInfo expertRegionInfo = new ExpertRegionInfo(); - expertRegionInfo.setRegionLevel(expertUserFullInfo.getRegionLevel()); - expertRegionInfo.setRegionCode(expertUserFullInfo.getRegionCode()); - adminManageExpertListItem.setExpertRegionInfo(expertRegionInfo); + List currUserDicts = expertDictMap.get(userId); + if (CollUtil.isNotEmpty(currUserDicts)) { + Map> currDictMap = CollUtils.group(currUserDicts, ExpertDictionary::getExpertInfoField); + item.setExpertType(DictAssembler.convert(currDictMap.get(ExpertDictTypeEnum.EXPERT_TYPE.getKey()))); + item.setExpertSpecialty(DictAssembler.convert(currDictMap.get(ExpertDictTypeEnum.EXPERT_SPECIALTY.getKey()))); + item.setExpertSource(DictAssembler.convert(currDictMap.get(ExpertDictTypeEnum.EXPERT_SOURCE.getKey()))); } - // 以下数据为专家excel导出使用 - adminManageExpertListItem.setGender(expertUserFullInfo.getGender()); - adminManageExpertListItem.setBirthday(expertUserFullInfo.getBirthday()); - adminManageExpertListItem.setHometown(expertUserFullInfo.getHometown()); - adminManageExpertListItem.setNationality(expertUserFullInfo.getNationality()); - adminManageExpertListItem.setPolitical( - DictAssembler.toDictFieldInfoList(fieldExpertDictMap.get(ExpertDictTypeEnum.POLITICAL.getKey()))); - adminManageExpertListItem.setIdCard(expertUserFullInfo.getIdCard()); - adminManageExpertListItem.setBankNo(expertUserFullInfo.getBankNo()); - adminManageExpertListItem.setEdu( - DictAssembler.toDictFieldInfoList(fieldExpertDictMap.get(ExpertDictTypeEnum.EDU.getKey()))); - adminManageExpertListItem.setRecommendedWay( - DictAssembler.toDictFieldInfoList(fieldExpertDictMap.get(ExpertDictTypeEnum.RECOMMENDED_WAY.getKey()))); - - adminManageExpertListItem.setCreateTime(expertUserFullInfo.getCreateOn()); - return adminManageExpertListItem; + item.setGender(eui.getGender()); + item.setInPutTime(eui.getInPutTime()); + item.setCreateTime(eui.getCreateOn()); + return item; } diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/expert/constant/ExpertUserInfoSensitiveFieldEnum.java b/hz-pm-api/src/main/java/com/hz/pm/api/expert/constant/ExpertUserInfoSensitiveFieldEnum.java index d6a01c9..ea367be 100644 --- a/hz-pm-api/src/main/java/com/hz/pm/api/expert/constant/ExpertUserInfoSensitiveFieldEnum.java +++ b/hz-pm-api/src/main/java/com/hz/pm/api/expert/constant/ExpertUserInfoSensitiveFieldEnum.java @@ -1,7 +1,7 @@ package com.hz.pm.api.expert.constant; -import com.hz.pm.api.expert.model.DictionaryFieldInfo; +import com.hz.pm.api.expert.model.DictFieldInfoDTO; import com.hz.pm.api.expert.model.TagFieldInfo; import com.hz.pm.api.meta.model.ExpertRegionInfo; import lombok.AllArgsConstructor; @@ -33,9 +33,9 @@ public enum ExpertUserInfoSensitiveFieldEnum { company_uniq_code("company_uniq_code", "工作单位编码", String.class, UnitType.single), legal_entity_code("legal_entity_code", "单位法人编号", String.class, UnitType.single), // 行政职级 - administrative_rank("administrative_rank", "行政职级", DictionaryFieldInfo.class, UnitType.list), + administrative_rank("administrative_rank", "行政职级", DictFieldInfoDTO.class, UnitType.list), // 职称级别 - title_level("title_level", "职称级别", DictionaryFieldInfo.class, UnitType.list), + title_level("title_level", "职称级别", DictFieldInfoDTO.class, UnitType.list), // 擅长方向 good_at("good_at", "擅长方向", TagFieldInfo.class, UnitType.list), // 技术专长 diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/expert/helper/ExpertInfoSensitiveFieldModifyCheckHelper.java b/hz-pm-api/src/main/java/com/hz/pm/api/expert/helper/ExpertInfoSensitiveFieldModifyCheckHelper.java index c374285..b09c194 100644 --- a/hz-pm-api/src/main/java/com/hz/pm/api/expert/helper/ExpertInfoSensitiveFieldModifyCheckHelper.java +++ b/hz-pm-api/src/main/java/com/hz/pm/api/expert/helper/ExpertInfoSensitiveFieldModifyCheckHelper.java @@ -52,7 +52,7 @@ public class ExpertInfoSensitiveFieldModifyCheckHelper { ExpertUserFullInfoDTO expertUserInfoDTO = expertUserFullInfoAll.getExpertUserInfoDTO(); // 字典字典段map - Map> dictionaryFieldInfoMap = + Map> dictionaryFieldInfoMap = expertUserInfoAssembler.buildDictInfoMap(expertUserFullInfoAll.getExpertDictionaryList()); // 专家文件资料map Map fileBasicInfoMap = ExpertUserInfoAssembler.buildFileBasicInfoMap(attachFiles); @@ -148,7 +148,7 @@ public class ExpertInfoSensitiveFieldModifyCheckHelper { } - private List assemblerDictionaryFieldInfoList(List dictionaryFieldInfoList, String fieldName) { + private List assemblerDictionaryFieldInfoList(List dictionaryFieldInfoList, String fieldName) { if (CollUtil.isNotEmpty(dictionaryFieldInfoList)) { dictionaryFieldInfoList.forEach(r -> r.setDictionaryFieldName(fieldName)); } diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/expert/helper/ExpertManageHelper.java b/hz-pm-api/src/main/java/com/hz/pm/api/expert/helper/ExpertManageHelper.java index d6a7118..6b035ed 100644 --- a/hz-pm-api/src/main/java/com/hz/pm/api/expert/helper/ExpertManageHelper.java +++ b/hz-pm-api/src/main/java/com/hz/pm/api/expert/helper/ExpertManageHelper.java @@ -64,14 +64,14 @@ public class ExpertManageHelper { * @param jobInfo \ */ public void dictionaryFieldCheck(ExpertBasicInfo basicInfo, ExpertEduInfo eduInfo, ExpertJobInfo jobInfo) { - List political = basicInfo.getPolitical(); - List edu = eduInfo.getEdu(); - List degree = eduInfo.getDegree(); - List jobStatus = jobInfo.getJobStatus(); - List companyAttribute = jobInfo.getCompanyAttribute(); - List administrativeRank = jobInfo.getAdministrativeRank(); + List political = basicInfo.getPolitical(); + List edu = eduInfo.getEdu(); + List degree = eduInfo.getDegree(); + List jobStatus = jobInfo.getJobStatus(); + List companyAttribute = jobInfo.getCompanyAttribute(); + List administrativeRank = jobInfo.getAdministrativeRank(); - List dictFieldList = new ArrayList<>(); + List dictFieldList = new ArrayList<>(); dictFieldList.addAll(political); dictFieldList.addAll(edu); dictFieldList.addAll(degree); @@ -79,7 +79,7 @@ public class ExpertManageHelper { dictFieldList.addAll(companyAttribute); dictFieldList.addAll(administrativeRank); - for (DictionaryFieldInfo dictField : dictFieldList) { + for (DictFieldInfoDTO dictField : dictFieldList) { String dictCode = dictField.getDictionaryCode(); Optional dict = dictionaryCache.getByCode(dictCode); if (!dict.isPresent()) { diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/expert/manage/ExpertAdminManage.java b/hz-pm-api/src/main/java/com/hz/pm/api/expert/manage/ExpertAdminManage.java index fc300db..8091654 100644 --- a/hz-pm-api/src/main/java/com/hz/pm/api/expert/manage/ExpertAdminManage.java +++ b/hz-pm-api/src/main/java/com/hz/pm/api/expert/manage/ExpertAdminManage.java @@ -23,7 +23,7 @@ import com.hz.pm.api.expert.model.*; import com.hz.pm.api.expert.model.bo.ExpertInfoSensitiveFieldCheckBO; import com.hz.pm.api.expert.model.cmd.ExpertAdminExpertManageQueryCmd; import com.hz.pm.api.expert.model.cmd.ExpertInfoModifyCmd; -import com.hz.pm.api.expert.model.dto.ExpertAdminExpertManageListDTO; +import com.hz.pm.api.expert.model.dto.ExpertAdminExpertListDTO; import com.hz.pm.api.expert.model.query.ExpertDictionaryQuery; import com.hz.pm.api.expert.model.query.ExpertTagQuery; import com.hz.pm.api.expert.model.req.AdminExpertBasicInfoModifyRequest; @@ -83,11 +83,11 @@ public class ExpertAdminManage { if (queryCmd.isHasNonData()) { return PageVo.empty(); } - CommonPage pageResult = expertAdminManageService.getExpertLibraryList(queryCmd); + CommonPage pageResult = expertAdminManageService.getExpertLibraryList(queryCmd); PageVo pageVo = new PageVo<>(); pageVo.setTotal(pageResult.getItemsTotal()); - pageVo.setRecords(expertAdminExpertManageAssembler.toExpertAdminExpertManageListVOList(pageResult.getItems())); + pageVo.setRecords(expertAdminExpertManageAssembler.toViews(pageResult.getItems())); return pageVo; } diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/expert/manage/ExpertMetaApplyManage.java b/hz-pm-api/src/main/java/com/hz/pm/api/expert/manage/ExpertMetaApplyManage.java index cb06e94..e92612b 100644 --- a/hz-pm-api/src/main/java/com/hz/pm/api/expert/manage/ExpertMetaApplyManage.java +++ b/hz-pm-api/src/main/java/com/hz/pm/api/expert/manage/ExpertMetaApplyManage.java @@ -16,7 +16,7 @@ import com.hz.pm.api.expert.constant.ExpertApplyTypeEnum; import com.hz.pm.api.expert.constant.ExpertApplyTypeQueryEnum; import com.hz.pm.api.expert.entity.ExpertMetaApply; import com.hz.pm.api.expert.entity.ExpertUserFullInfo; -import com.hz.pm.api.expert.model.DictionaryFieldInfo; +import com.hz.pm.api.expert.model.DictFieldInfoDTO; import com.hz.pm.api.expert.model.TagFieldInfo; import com.hz.pm.api.expert.model.cmd.*; import com.hz.pm.api.expert.model.dto.ExpertDictionaryDTO; @@ -74,7 +74,7 @@ public class ExpertMetaApplyManage { public PageVo metaApplyListQuery(MetaApplyListQuery req) { // 筛选符合专家类型的用户id List filterExpertTypeUserIdList = null; - DictionaryFieldInfo expertType = req.getExpertType(); + DictFieldInfoDTO expertType = req.getExpertType(); if (Objects.nonNull(expertType) && StringUtils.isNotBlank(expertType.getDictionaryCode())) { List expertTypeDictionaryList = iExpertDictionaryService.list(Wrappers.lambdaQuery(ExpertDictionary.class) .eq(ExpertDictionary::getDictionaryCode, expertType.getDictionaryCode())); @@ -397,7 +397,7 @@ public class ExpertMetaApplyManage { if (CollectionUtils.isNotEmpty(titleLevelDictionaryList)) { expertApplyMetaVO.setTitleLevel(titleLevelDictionaryList.stream().map(r -> { Optional dictionaryDTO = dictionaryCache.getByCode(r.getDictionaryCode()); - DictionaryFieldInfo dictionaryFieldInfo = new DictionaryFieldInfo(); + DictFieldInfoDTO dictionaryFieldInfo = new DictFieldInfoDTO(); dictionaryFieldInfo.setDictionaryCode(r.getDictionaryCode()); dictionaryFieldInfo.setDictionaryFieldName(r.getExpertInfoField()); dictionaryDTO.ifPresent(dictDTO -> dictionaryFieldInfo.setDictionaryName(dictDTO.getName())); @@ -410,7 +410,7 @@ public class ExpertMetaApplyManage { if (CollectionUtils.isNotEmpty(titleLevelDictionaryList)) { expertApplyMetaVO.setExpertType(expertTypeDictionaryList.stream().map(r -> { Optional dictionaryDTO = dictionaryCache.getByCode(r.getDictionaryCode()); - DictionaryFieldInfo dictionaryFieldInfo = new DictionaryFieldInfo(); + DictFieldInfoDTO dictionaryFieldInfo = new DictFieldInfoDTO(); dictionaryFieldInfo.setDictionaryCode(r.getDictionaryCode()); dictionaryFieldInfo.setDictionaryFieldName(r.getExpertInfoField()); dictionaryDTO.ifPresent(dictDTO -> dictionaryFieldInfo.setDictionaryName(dictDTO.getName())); @@ -468,7 +468,7 @@ public class ExpertMetaApplyManage { expertStorageDealCmd.setApplyResult(applyResult); if (Objects.nonNull(extraInfo)) { - List expertType = extraInfo.getExpertType(); + List expertType = extraInfo.getExpertType(); if (CollUtil.isNotEmpty(expertType)) { expertStorageDealCmd.setExpertType(extraInfo.getExpertType().stream().map(r -> { ExpertDictionaryDTO expertDictionaryDTO = new ExpertDictionaryDTO(); diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/expert/model/DictFieldInfoDTO.java b/hz-pm-api/src/main/java/com/hz/pm/api/expert/model/DictFieldInfoDTO.java new file mode 100644 index 0000000..23c091e --- /dev/null +++ b/hz-pm-api/src/main/java/com/hz/pm/api/expert/model/DictFieldInfoDTO.java @@ -0,0 +1,34 @@ +package com.hz.pm.api.expert.model; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import javax.validation.constraints.NotBlank; + +/** + * @author liuxinxin + * @date 2022/7/25 下午2:03 + * 专家信息字典字段信息 + */ +@Data +@ApiModel("字典字段信息") +public class DictFieldInfoDTO { + + /** + * 字段名称 + */ + @NotBlank + @ApiModelProperty("字典字段名称") + private String dictionaryFieldName; + + /** + * 字典code + */ + @ApiModelProperty(value = "字典code") + private String dictionaryCode; + + + @ApiModelProperty(value = "字典code含义") + private String dictionaryName; +} diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/expert/model/DictionaryFieldInfo.java b/hz-pm-api/src/main/java/com/hz/pm/api/expert/model/DictionaryFieldInfo.java deleted file mode 100644 index 48e9ffa..0000000 --- a/hz-pm-api/src/main/java/com/hz/pm/api/expert/model/DictionaryFieldInfo.java +++ /dev/null @@ -1,34 +0,0 @@ -package com.hz.pm.api.expert.model; - -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; - -import javax.validation.constraints.NotBlank; - -/** - * @author liuxinxin - * @date 2022/7/25 下午2:03 - * 专家信息字典字段信息 - */ -@Data -@ApiModel("字典字段信息") -public class DictionaryFieldInfo { - - /** - * 字段名称 - */ - @NotBlank - @ApiModelProperty("字典字段名称") - private String dictionaryFieldName; - - /** - * 字典code - */ - @ApiModelProperty(value = "字典code") - private String dictionaryCode; - - - @ApiModelProperty(value = "字典code含义", required = false) - private String dictionaryName; -} diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/expert/model/ExpertBasicInfo.java b/hz-pm-api/src/main/java/com/hz/pm/api/expert/model/ExpertBasicInfo.java index 0713da6..bc4b493 100644 --- a/hz-pm-api/src/main/java/com/hz/pm/api/expert/model/ExpertBasicInfo.java +++ b/hz-pm-api/src/main/java/com/hz/pm/api/expert/model/ExpertBasicInfo.java @@ -10,7 +10,6 @@ import javax.validation.constraints.NotBlank; import javax.validation.constraints.NotEmpty; import javax.validation.constraints.NotNull; import java.time.LocalDate; -import java.time.LocalDateTime; import java.util.List; /** @@ -62,7 +61,7 @@ public class ExpertBasicInfo { */ @NotNull @ApiModelProperty(value = "政治面貌(字典code)") - private List political; + private List political; /** * 身份证号码 @@ -131,7 +130,7 @@ public class ExpertBasicInfo { * 专家类型(内外围) */ @ApiModelProperty(value = "专家类型(内外围)") - private List expertType; + private List expertType; /** * 籍贯 diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/expert/model/ExpertEduInfo.java b/hz-pm-api/src/main/java/com/hz/pm/api/expert/model/ExpertEduInfo.java index 3975a07..32981ef 100644 --- a/hz-pm-api/src/main/java/com/hz/pm/api/expert/model/ExpertEduInfo.java +++ b/hz-pm-api/src/main/java/com/hz/pm/api/expert/model/ExpertEduInfo.java @@ -1,6 +1,5 @@ package com.hz.pm.api.expert.model; -import com.hz.pm.api.common.model.FileBasicInfo; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; @@ -8,7 +7,6 @@ import lombok.Data; import javax.validation.constraints.NotBlank; import javax.validation.constraints.NotNull; import java.time.LocalDate; -import java.time.LocalDateTime; import java.util.List; /** @@ -45,7 +43,7 @@ public class ExpertEduInfo { */ @NotNull @ApiModelProperty("学历(字典code)") - private List edu; + private List edu; /** * 毕业证附件信息 @@ -58,7 +56,7 @@ public class ExpertEduInfo { */ @NotNull @ApiModelProperty("学位(字典code)") - private List degree; + private List degree; /** * 学位证附件信息 diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/expert/model/ExpertJobInfo.java b/hz-pm-api/src/main/java/com/hz/pm/api/expert/model/ExpertJobInfo.java index 16718d4..e971231 100644 --- a/hz-pm-api/src/main/java/com/hz/pm/api/expert/model/ExpertJobInfo.java +++ b/hz-pm-api/src/main/java/com/hz/pm/api/expert/model/ExpertJobInfo.java @@ -24,7 +24,7 @@ public class ExpertJobInfo { */ @NotNull @ApiModelProperty("在职状态(字典code)") - private List jobStatus; + private List jobStatus; /** * 退休时间 @@ -68,14 +68,14 @@ public class ExpertJobInfo { */ @NotNull @ApiModelProperty("行政职级(字典code)") - private List administrativeRank; + private List administrativeRank; /** * 单位类型(字典code) */ @NotNull @ApiModelProperty("单位类型(字典code)") - private List companyAttribute; + private List companyAttribute; /** * 工作地址 diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/expert/model/ExpertProfessionalInfo.java b/hz-pm-api/src/main/java/com/hz/pm/api/expert/model/ExpertProfessionalInfo.java index bf51d15..5972d70 100644 --- a/hz-pm-api/src/main/java/com/hz/pm/api/expert/model/ExpertProfessionalInfo.java +++ b/hz-pm-api/src/main/java/com/hz/pm/api/expert/model/ExpertProfessionalInfo.java @@ -23,7 +23,7 @@ public class ExpertProfessionalInfo { @NotNull @ApiModelProperty(value = "职称级别") - private List titleLevel; + private List titleLevel; @ApiModelProperty(value = "职称证明") private List titleCertificateFile; diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/expert/model/ExpertRecommendInfo.java b/hz-pm-api/src/main/java/com/hz/pm/api/expert/model/ExpertRecommendInfo.java index c772042..83f2138 100644 --- a/hz-pm-api/src/main/java/com/hz/pm/api/expert/model/ExpertRecommendInfo.java +++ b/hz-pm-api/src/main/java/com/hz/pm/api/expert/model/ExpertRecommendInfo.java @@ -1,6 +1,5 @@ package com.hz.pm.api.expert.model; -import com.hz.pm.api.common.model.FileBasicInfo; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; @@ -19,7 +18,7 @@ public class ExpertRecommendInfo { * 推荐方式 */ @ApiModelProperty("推荐方式") - private List recommendedWay; + private List recommendedWay; @ApiModelProperty("推荐证明材料") private String recommendFile; diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/expert/model/SensitiveModifySegment.java b/hz-pm-api/src/main/java/com/hz/pm/api/expert/model/SensitiveModifySegment.java index a6b4c37..7748dcf 100644 --- a/hz-pm-api/src/main/java/com/hz/pm/api/expert/model/SensitiveModifySegment.java +++ b/hz-pm-api/src/main/java/com/hz/pm/api/expert/model/SensitiveModifySegment.java @@ -55,8 +55,8 @@ public class SensitiveModifySegment { } case administrative_rank: case title_level: { - return DictUtils.isValueEquals((List) this.original - , (List) this.apply); + return DictUtils.isValueEquals((List) this.original + , (List) this.apply); } case good_at: case technical_expertise: diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/expert/model/cmd/MetaApplyListQuery.java b/hz-pm-api/src/main/java/com/hz/pm/api/expert/model/cmd/MetaApplyListQuery.java index 8c04b02..89a7361 100644 --- a/hz-pm-api/src/main/java/com/hz/pm/api/expert/model/cmd/MetaApplyListQuery.java +++ b/hz-pm-api/src/main/java/com/hz/pm/api/expert/model/cmd/MetaApplyListQuery.java @@ -3,7 +3,7 @@ package com.hz.pm.api.expert.model.cmd; import com.ningdatech.basic.model.PagePo; import com.hz.pm.api.expert.constant.ExpertApplyStatusEnum; import com.hz.pm.api.expert.constant.ExpertApplyTypeQueryEnum; -import com.hz.pm.api.expert.model.DictionaryFieldInfo; +import com.hz.pm.api.expert.model.DictFieldInfoDTO; import com.hz.pm.api.meta.model.ExpertRegionInfo; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @@ -45,6 +45,6 @@ public class MetaApplyListQuery extends PagePo { private LocalDateTime applyEndTime; @ApiModelProperty("专家类型") - private DictionaryFieldInfo expertType; + private DictFieldInfoDTO expertType; } diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/expert/model/dto/ExpertAdminExpertListDTO.java b/hz-pm-api/src/main/java/com/hz/pm/api/expert/model/dto/ExpertAdminExpertListDTO.java new file mode 100644 index 0000000..2221f42 --- /dev/null +++ b/hz-pm-api/src/main/java/com/hz/pm/api/expert/model/dto/ExpertAdminExpertListDTO.java @@ -0,0 +1,76 @@ +package com.hz.pm.api.expert.model.dto; + + +import com.hz.pm.api.expert.model.DictFieldInfoDTO; +import lombok.Data; + +import java.time.LocalDateTime; +import java.util.List; + +/** + * @author liuxinxin + * @date 2022/8/4 上午11:36 + */ +@Data +public class ExpertAdminExpertListDTO { + + /** + * 用户id + */ + private Long userId; + + /** + * 专家姓名 + */ + private String expertName; + + /** + * 工作单位 + */ + private String company; + + /** + * 专家联系方式 + */ + private String phoneNo; + + /** + * 性别 + */ + private String gender; + + /** + * 专家类型(内外围) + */ + private List expertType; + + /** + * 账号状态 + */ + private String expertAccountStatus; + + /** + * 专家来源 + */ + private List expertSource; + + /** + * 所属专家库 + */ + private List expertLibrary; + + /** + * 专业特长 + */ + private List expertSpecialty; + + /** + * 入库时间 + */ + private LocalDateTime inPutTime; + + /** + * 创建时间 + */ + private LocalDateTime createTime; +} diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/expert/model/dto/ExpertAdminExpertManageListDTO.java b/hz-pm-api/src/main/java/com/hz/pm/api/expert/model/dto/ExpertAdminExpertManageListDTO.java deleted file mode 100644 index 5170703..0000000 --- a/hz-pm-api/src/main/java/com/hz/pm/api/expert/model/dto/ExpertAdminExpertManageListDTO.java +++ /dev/null @@ -1,139 +0,0 @@ -package com.hz.pm.api.expert.model.dto; - - -import com.hz.pm.api.expert.model.DictionaryFieldInfo; -import com.hz.pm.api.expert.model.TagFieldInfo; -import com.hz.pm.api.meta.model.ExpertRegionInfo; -import lombok.Data; - -import java.time.LocalDate; -import java.time.LocalDateTime; -import java.util.List; - -/** - * @author liuxinxin - * @date 2022/8/4 上午11:36 - */ -@Data -public class ExpertAdminExpertManageListDTO { - - /** - * 用户id - */ - private Long userId; - - /** - * 专家姓名 - */ - private String expertName; - - /** - * 工作单位 - */ - private String company; - - /** - * 单位属性(字典code) - */ - private List companyAttribute; - - /** - * 专家联系方式 - */ - private String phoneNo; - - /** - * 性别 - */ - private String gender; - - /** - * 出生日期 - */ - private LocalDate birthday; - - /** - * 籍贯 - */ - private String hometown; - - /** - * 民族 - */ - private String nationality; - - /** - * 政治面貌(字典code) - */ - private List political; - - /** - * 身份证号码 - */ - private String idCard; - - /** - * 专家层级 - */ - private ExpertRegionInfo expertRegionInfo; - - /** - * 银行卡号 - */ - private String bankNo; - - /** - * 开户银行 - */ - private String bank; - - /** - * 学历(字典code) - */ - private List edu; - - /** - * 学位(字典code) - */ - private List degree; - - /** - * 职称级别 - */ - private List titleLevel; - - /** - * 推荐方式 - */ - private List recommendedWay; - - /** - * 单位法人编号 - */ - private String legalEntityCode; - - /** - * 专家类型(内外围) - */ - private List expertType; - - /** - * 是否浙政钉用户 - */ - private String isDingUser; - - /** - * 账号状态 - */ - private String expertAccountStatus; - - /** - * 专家来源 - */ - private List expertSource; - - /** - * 创建时间 - */ - private LocalDateTime createTime; -} diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/expert/model/req/MetaApplyResultRequest.java b/hz-pm-api/src/main/java/com/hz/pm/api/expert/model/req/MetaApplyResultRequest.java index 50e5988..3d1e2b6 100644 --- a/hz-pm-api/src/main/java/com/hz/pm/api/expert/model/req/MetaApplyResultRequest.java +++ b/hz-pm-api/src/main/java/com/hz/pm/api/expert/model/req/MetaApplyResultRequest.java @@ -1,6 +1,6 @@ package com.hz.pm.api.expert.model.req; -import com.hz.pm.api.expert.model.DictionaryFieldInfo; +import com.hz.pm.api.expert.model.DictFieldInfoDTO; import com.hz.pm.api.expert.model.TagFieldInfo; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @@ -38,7 +38,7 @@ public class MetaApplyResultRequest { @ApiModel("入库审核额外参数") public static class StorageApplyResultExtraInfo { @ApiModelProperty("专家类型-内外围") - private List expertType; + private List expertType; @ApiModelProperty("其他标签(标签code)") private List other; diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/expert/model/vo/ExpertApplyMetaVO.java b/hz-pm-api/src/main/java/com/hz/pm/api/expert/model/vo/ExpertApplyMetaVO.java index 74a2b74..a3fb4a9 100644 --- a/hz-pm-api/src/main/java/com/hz/pm/api/expert/model/vo/ExpertApplyMetaVO.java +++ b/hz-pm-api/src/main/java/com/hz/pm/api/expert/model/vo/ExpertApplyMetaVO.java @@ -1,6 +1,6 @@ package com.hz.pm.api.expert.model.vo; -import com.hz.pm.api.expert.model.DictionaryFieldInfo; +import com.hz.pm.api.expert.model.DictFieldInfoDTO; import com.hz.pm.api.meta.model.ExpertRegionInfo; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @@ -52,7 +52,7 @@ public class ExpertApplyMetaVO { * 职称级别 */ @ApiModelProperty("职称级别") - private List titleLevel; + private List titleLevel; /** * 工作单位 @@ -73,7 +73,7 @@ public class ExpertApplyMetaVO { private LocalDateTime applyTime; @ApiModelProperty("专家类型") - private List expertType; + private List expertType; } diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/expert/model/vo/ExpertLibraryListItemVO.java b/hz-pm-api/src/main/java/com/hz/pm/api/expert/model/vo/ExpertLibraryListItemVO.java index d5b3512..1886be7 100644 --- a/hz-pm-api/src/main/java/com/hz/pm/api/expert/model/vo/ExpertLibraryListItemVO.java +++ b/hz-pm-api/src/main/java/com/hz/pm/api/expert/model/vo/ExpertLibraryListItemVO.java @@ -1,9 +1,7 @@ package com.hz.pm.api.expert.model.vo; -import com.hz.pm.api.expert.model.DictionaryFieldInfo; -import com.hz.pm.api.expert.model.TagFieldInfo; -import com.hz.pm.api.meta.model.ExpertRegionInfo; +import com.hz.pm.api.expert.model.DictFieldInfoDTO; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; @@ -25,35 +23,26 @@ public class ExpertLibraryListItemVO { @ApiModelProperty(value = "专家姓名") private String expertName; - @ApiModelProperty(value = "职称级别") - private List titleLevel; - @ApiModelProperty("工作单位") private String company; - @ApiModelProperty(" 单位法人编号") - private String legalEntityCode; - - @ApiModelProperty("单位类型(字典code)") - private List companyAttribute; - @ApiModelProperty(value = "手机号") private String phoneNo; - @ApiModelProperty(value = "专家类型(内外围)") - private List expertType; + @ApiModelProperty(value = "所属专家库") + private List expertLibrary; - @ApiModelProperty(value = "专家层级") - private ExpertRegionInfo expertRegionInfo; + @ApiModelProperty(value = "专家专业特长") + private List expertSpecialty; - @ApiModelProperty(value = "是否浙政钉用户") - private String isDingUser; - - @ApiModelProperty(value = "专家账号状态", allowableValues = "冻结:freezing,正常:normal") - private String expertAccountStatus; + @ApiModelProperty(value = "专家类型(内外围)") + private List expertType; @ApiModelProperty(value = "专家来源") - private List expertSource; + private List expertSource; + + @ApiModelProperty(value = "入库时间") + private LocalDateTime inPutTime; @ApiModelProperty(value = "创建时间") private LocalDateTime createTime; diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/expert/service/ExpertAdminManageService.java b/hz-pm-api/src/main/java/com/hz/pm/api/expert/service/ExpertAdminManageService.java index 9290012..699fc5b 100644 --- a/hz-pm-api/src/main/java/com/hz/pm/api/expert/service/ExpertAdminManageService.java +++ b/hz-pm-api/src/main/java/com/hz/pm/api/expert/service/ExpertAdminManageService.java @@ -3,7 +3,7 @@ package com.hz.pm.api.expert.service; import com.hz.pm.api.common.model.CommonPage; import com.hz.pm.api.expert.model.cmd.ExpertAdminExpertManageQueryCmd; -import com.hz.pm.api.expert.model.dto.ExpertAdminExpertManageListDTO; +import com.hz.pm.api.expert.model.dto.ExpertAdminExpertListDTO; import java.util.List; @@ -19,7 +19,7 @@ public interface ExpertAdminManageService { * @param expertAdminExpertManageQueryCmd * @return */ - CommonPage getExpertLibraryList(ExpertAdminExpertManageQueryCmd expertAdminExpertManageQueryCmd); + CommonPage getExpertLibraryList(ExpertAdminExpertManageQueryCmd expertAdminExpertManageQueryCmd); /** diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/expert/service/impl/ExpertAdminManageServiceImpl.java b/hz-pm-api/src/main/java/com/hz/pm/api/expert/service/impl/ExpertAdminManageServiceImpl.java index b4d0496..d8f6d08 100644 --- a/hz-pm-api/src/main/java/com/hz/pm/api/expert/service/impl/ExpertAdminManageServiceImpl.java +++ b/hz-pm-api/src/main/java/com/hz/pm/api/expert/service/impl/ExpertAdminManageServiceImpl.java @@ -9,10 +9,9 @@ import com.ningdatech.basic.util.CollUtils; import com.hz.pm.api.common.model.CommonPage; import com.hz.pm.api.expert.assembler.ExpertUserInfoAssembler; import com.hz.pm.api.expert.constant.ExpertAccountStatusEnum; -import com.hz.pm.api.expert.constant.ExpertUserInfoStepEnum; import com.hz.pm.api.expert.mapper.ExpertAdminManageMapper; import com.hz.pm.api.expert.model.cmd.ExpertAdminExpertManageQueryCmd; -import com.hz.pm.api.expert.model.dto.ExpertAdminExpertManageListDTO; +import com.hz.pm.api.expert.model.dto.ExpertAdminExpertListDTO; import com.hz.pm.api.expert.model.query.ExpertDictionaryQuery; import com.hz.pm.api.expert.model.query.ExpertTagQuery; import com.hz.pm.api.expert.model.query.ListExpertQuery; @@ -26,7 +25,6 @@ import lombok.RequiredArgsConstructor; import org.springframework.stereotype.Service; import java.util.ArrayList; -import java.util.Iterator; import java.util.List; import java.util.Map; import java.util.stream.Collectors; @@ -63,27 +61,15 @@ public class ExpertAdminManageServiceImpl implements ExpertAdminManageService { @Override - public CommonPage getExpertLibraryList(ExpertAdminExpertManageQueryCmd req) { + public CommonPage getExpertLibraryList(ExpertAdminExpertManageQueryCmd req) { ListExpertQuery listExpertQuery = buildListExpertQuery(req); List userIdList = listExpertUserId(listExpertQuery); - List evidenceHasBeenSubmittedExpertInfoList = iExpertUserFullInfoService.list(); - List evidenceHasBeenSubmittedExpertUserIdList = evidenceHasBeenSubmittedExpertInfoList - .stream().map(ExpertUserFullInfo::getUserId) - .distinct().collect(Collectors.toList()); - - Iterator iterator = userIdList.iterator(); - while (iterator.hasNext()) { - if (!evidenceHasBeenSubmittedExpertUserIdList.contains(iterator.next())) { - userIdList.remove(iterator.next()); - } - } - - CommonPage commonPage = new CommonPage<>(); + CommonPage commonPage = new CommonPage<>(); commonPage.setCurrentPageNumber(req.getPageNumber()); commonPage.setItemsTotal((long) userIdList.size()); - List recordList = new ArrayList<>(); + List recordList = new ArrayList<>(); if (!userIdList.isEmpty()) { List currPageUserIdList = CollUtil.page(req.getPageNumber() - 1, req.getPageSize(), userIdList); @@ -101,7 +87,7 @@ public class ExpertAdminManageServiceImpl implements ExpertAdminManageService { List expertTagList = iExpertTagService.list(tagIn); Map> expertTagMap = CollUtils.group(expertTagList, ExpertTag::getUserId); for (ExpertUserFullInfo expertUserFullInfo : expertUserList) { - ExpertAdminExpertManageListDTO expertAdminExpertManageListDTO = ExpertUserInfoAssembler.convert(expertUserFullInfo, expertDictMap, expertTagMap); + ExpertAdminExpertListDTO expertAdminExpertManageListDTO = ExpertUserInfoAssembler.convert(expertUserFullInfo, expertDictMap); recordList.add(expertAdminExpertManageListDTO); } } diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/expert/service/impl/ExpertInfoServiceImpl.java b/hz-pm-api/src/main/java/com/hz/pm/api/expert/service/impl/ExpertInfoServiceImpl.java index 725c9ed..45f89f2 100644 --- a/hz-pm-api/src/main/java/com/hz/pm/api/expert/service/impl/ExpertInfoServiceImpl.java +++ b/hz-pm-api/src/main/java/com/hz/pm/api/expert/service/impl/ExpertInfoServiceImpl.java @@ -16,7 +16,7 @@ import com.hz.pm.api.expert.constant.ExpertApplyStatusEnum; import com.hz.pm.api.expert.constant.ExpertApplyTypeEnum; import com.hz.pm.api.expert.constant.ExpertUserInfoSensitiveFieldEnum; import com.hz.pm.api.expert.entity.*; -import com.hz.pm.api.expert.model.DictionaryFieldInfo; +import com.hz.pm.api.expert.model.DictFieldInfoDTO; import com.hz.pm.api.expert.model.SensitiveModifySegment; import com.hz.pm.api.expert.model.TagFieldInfo; import com.hz.pm.api.expert.model.bo.ExpertInfoSensitiveFieldCheckBO; @@ -735,7 +735,7 @@ public class ExpertInfoServiceImpl implements ExpertInfoService { case title_level: { SensitiveModifySegment segment = collectMap.get(sensitiveFieldEnum); if (Objects.nonNull(segment)) { - List dictionaryFieldInfoList = SensitiveModifySegmentUtils.getDictionaryFieldInfoListApply(segment); + List dictionaryFieldInfoList = SensitiveModifySegmentUtils.getDictionaryFieldInfoListApply(segment); updateExpertDictionaryList(expertUserId, dictionaryFieldInfoList, sensitiveFieldEnum.getKey()); } } @@ -820,7 +820,7 @@ public class ExpertInfoServiceImpl implements ExpertInfoService { } } - private void updateExpertDictionaryList(Long expertUserId, List dictionaryFieldInfoList, String... dictionaryExpertInfoTypeArr) { + private void updateExpertDictionaryList(Long expertUserId, List dictionaryFieldInfoList, String... dictionaryExpertInfoTypeArr) { if (CollectionUtils.isNotEmpty(dictionaryFieldInfoList)) { // 删除专家字典字段 LambdaQueryWrapper expertDictionaryRemove = Wrappers.lambdaQuery(ExpertDictionary.class) diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/expert/utils/SensitiveModifySegmentUtils.java b/hz-pm-api/src/main/java/com/hz/pm/api/expert/utils/SensitiveModifySegmentUtils.java index 41d1b29..ed56edb 100644 --- a/hz-pm-api/src/main/java/com/hz/pm/api/expert/utils/SensitiveModifySegmentUtils.java +++ b/hz-pm-api/src/main/java/com/hz/pm/api/expert/utils/SensitiveModifySegmentUtils.java @@ -2,7 +2,7 @@ package com.hz.pm.api.expert.utils; import com.ningdatech.basic.exception.BizException; -import com.hz.pm.api.expert.model.DictionaryFieldInfo; +import com.hz.pm.api.expert.model.DictFieldInfoDTO; import com.hz.pm.api.expert.model.SensitiveModifySegment; import com.hz.pm.api.expert.model.TagFieldInfo; import com.ningdatech.yxt.utils.JSONUtils; @@ -37,12 +37,12 @@ public class SensitiveModifySegmentUtils { } - public static List getDictionaryFieldInfoListApply(SensitiveModifySegment segment) { + public static List getDictionaryFieldInfoListApply(SensitiveModifySegment segment) { switch (segment.getFieldName()) { case administrative_rank: case title_level: { if (Objects.nonNull(segment.getApply())) { - return JSONUtils.parseArray(segment.getApply().toString(), DictionaryFieldInfo.class); + return JSONUtils.parseArray(segment.getApply().toString(), DictFieldInfoDTO.class); } return new ArrayList<>(); } diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/meeting/controller/MeetingController.java b/hz-pm-api/src/main/java/com/hz/pm/api/meeting/controller/MeetingController.java index 107f21d..4fa1ada 100644 --- a/hz-pm-api/src/main/java/com/hz/pm/api/meeting/controller/MeetingController.java +++ b/hz-pm-api/src/main/java/com/hz/pm/api/meeting/controller/MeetingController.java @@ -206,8 +206,8 @@ public class MeetingController { @GetMapping("/{meetingId}/result/detail") @ApiOperation("会议结果详情") @WebLog("会议结详情") - public void uploadMeetingResult(@PathVariable Long meetingId) { - meetingManage.meetingResultDetail(meetingId); + public MeetingResultUploadReq uploadMeetingResult(@PathVariable Long meetingId) { + return meetingManage.meetingResultDetail(meetingId); } @PostMapping("/project/result/upload")