From f9304adb14e9400d3cdf8e9c870994e959b0d13e Mon Sep 17 00:00:00 2001 From: WendyYang Date: Thu, 21 Dec 2023 23:47:06 +0800 Subject: [PATCH] =?UTF-8?q?=E9=87=8D=E6=96=B0expert=5Fuser=5Ffull=5Finfo?= =?UTF-8?q?=E7=B1=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../hz/pm/api/common/util/ExpertRegisterUtil.java | 5 +- .../dashboard/controller/StatisticsController.java | 75 ----- .../dashboard/manage/DashboardExpertManage.java | 16 +- .../dashboard/manage/ExpertStatisticsManage.java | 348 --------------------- .../expert/assembler/ExpertInfoCmdAssembler.java | 30 +- .../expert/assembler/ExpertUserInfoAssembler.java | 148 ++++----- .../expert/assembler/RegionWrapperAssembler.java | 27 -- .../pm/api/expert/entity/ExpertUserFullInfo.java | 191 ++++++++--- .../pm/api/expert/entity/ExpertUserFullInfoV1.java | 214 ------------- .../api/expert/helper/ExpertInfoCommonHelper.java | 29 +- .../ExpertInfoSensitiveFieldModifyCheckHelper.java | 4 +- .../com/hz/pm/api/expert/manage/ExpertManage.java | 21 +- .../api/expert/manage/ExpertMetaApplyManage.java | 23 -- .../api/expert/mapper/ExpertAdminManageMapper.xml | 8 - .../expert/mapper/ExpertUserFullInfoMapper.java | 16 + .../api/expert/mapper/ExpertUserFullInfoMapper.xml | 5 + .../expert/mapper/NdExpertUserFullInfoMapper.java | 16 - .../expert/mapper/NdExpertUserFullInfoMapper.xml | 5 - .../hz/pm/api/expert/model/ExpertBasicInfo.java | 8 +- .../com/hz/pm/api/expert/model/ExpertEduInfo.java | 7 +- .../com/hz/pm/api/expert/model/ExpertJobInfo.java | 3 +- .../pm/api/expert/model/ExpertRecommendInfo.java | 2 +- .../model/dto/ExpertAdminExpertManageListDTO.java | 5 +- .../expert/model/dto/ExpertUserFullInfoDTO.java | 45 +-- .../expert/model/vo/ExpertLibraryListItemVO.java | 2 +- .../expert/service/IExpertUserFullInfoService.java | 9 - .../service/impl/ExpertAdminManageServiceImpl.java | 8 +- .../expert/service/impl/ExpertInfoServiceImpl.java | 57 +--- .../impl/ExpertUserFullInfoServiceImpl.java | 9 +- .../pm/api/meeting/entity/dto/ExpertChooseDTO.java | 2 +- .../pm/api/meeting/helper/ExpertInviteHelper.java | 4 +- .../helper/ExpertRandomInviteAlgorithm.java | 2 +- .../pm/api/meeting/helper/MeetingManageHelper.java | 7 +- .../pm/api/meeting/manage/ExpertExportManage.java | 10 +- .../pm/api/meeting/manage/ExpertInviteManage.java | 4 +- .../scheduler/task/CockpitStatsStatisticsTask.java | 3 +- .../hz/pm/api/sys/manage/UserGuidanceManage.java | 5 +- .../test/java/com/hz/pm/api/expert/ExpertTest.java | 5 +- 38 files changed, 313 insertions(+), 1065 deletions(-) delete mode 100644 hz-pm-api/src/main/java/com/hz/pm/api/dashboard/controller/StatisticsController.java delete mode 100644 hz-pm-api/src/main/java/com/hz/pm/api/dashboard/manage/ExpertStatisticsManage.java delete mode 100644 hz-pm-api/src/main/java/com/hz/pm/api/expert/assembler/RegionWrapperAssembler.java delete mode 100644 hz-pm-api/src/main/java/com/hz/pm/api/expert/entity/ExpertUserFullInfoV1.java create mode 100644 hz-pm-api/src/main/java/com/hz/pm/api/expert/mapper/ExpertUserFullInfoMapper.java create mode 100644 hz-pm-api/src/main/java/com/hz/pm/api/expert/mapper/ExpertUserFullInfoMapper.xml delete mode 100644 hz-pm-api/src/main/java/com/hz/pm/api/expert/mapper/NdExpertUserFullInfoMapper.java delete mode 100644 hz-pm-api/src/main/java/com/hz/pm/api/expert/mapper/NdExpertUserFullInfoMapper.xml 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 5d2fd2c..c609bc4 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 @@ -22,7 +22,7 @@ import com.hz.pm.api.organization.service.IDingOrganizationService; import com.hz.pm.api.sys.model.dto.RegionDTO; import java.io.File; -import java.time.LocalDateTime; +import java.time.LocalDate; import java.util.ArrayList; import java.util.List; import java.util.Map; @@ -77,7 +77,7 @@ public class ExpertRegisterUtil { ExpertEduInfo eduInfo = new ExpertEduInfo(); eduInfo.setSchool("暂无"); eduInfo.setAcademicTitle("暂无"); - eduInfo.setGraduatedAt(LocalDateTime.now()); + eduInfo.setGraduatedAt(LocalDate.now()); eduInfo.setEdu(new ArrayList<>()); eduInfo.setDegree(new ArrayList<>()); // 学历 @@ -256,7 +256,6 @@ public class ExpertRegisterUtil { request.setProfessionalInfo(professionalInfo); ExpertRecommendInfo recommendInfo = new ExpertRecommendInfo(); recommendInfo.setRecommendedWay(new ArrayList<>()); - recommendInfo.setRecommendationProofFile(new ArrayList<>()); request.setRecommendInfo(recommendInfo); try { expertController.expertBasicInfoSubmit(request); diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/dashboard/controller/StatisticsController.java b/hz-pm-api/src/main/java/com/hz/pm/api/dashboard/controller/StatisticsController.java deleted file mode 100644 index c9fe1a5..0000000 --- a/hz-pm-api/src/main/java/com/hz/pm/api/dashboard/controller/StatisticsController.java +++ /dev/null @@ -1,75 +0,0 @@ -package com.hz.pm.api.dashboard.controller; - -import com.hz.pm.api.dashboard.manage.*; -import com.hz.pm.api.dashboard.model.vo.*; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; -import lombok.RequiredArgsConstructor; -import org.springframework.validation.annotation.Validated; -import org.springframework.web.bind.annotation.*; - -/** - * @author ZPF - * @date 2023/11/25 上午10:36 - */ -@RestController -@RequestMapping("/api/v1/statistics") -@Validated -@RequiredArgsConstructor -@Api(value = "StatisticsController", tags = "统计") -public class StatisticsController { - - private final FundStatisticsManage fundStatisticsManage; - - private final ExpertStatisticsManage expertStatisticsManage; - - private final MeetingStatisticsManage meetingStatisticsManage; - - private final ProjectCostStatisticsManage costStatisticsManage; - - private final EarlyWarningStatisticsManage earlyWarningStatisticsManage; - - private final PerformanceStatisticsManage performanceStatisticsManage; - - @GetMapping("/fund") - @ApiOperation("项目资金统计") - public FundStatisticsVO fund(@RequestParam(required = false) Integer year) { - return fundStatisticsManage.statistics(year); - } - - @GetMapping("/expert") - @ApiOperation("专家统计") - public ExpertStatisticsVO expert(@RequestParam(required = false) Integer year) { - return expertStatisticsManage.statistics(year); - } - - @GetMapping("/meeting") - @ApiOperation("评审会议统计") - public MeetingStatisticsVO meeting(@RequestParam(required = false) Integer year) { - return meetingStatisticsManage.statistics(year); - } - - @GetMapping("/project-cost") - @ApiOperation("项目成本统计") - public CostStatisticsVO projectCost() { - return costStatisticsManage.statistics(); - } - - @GetMapping("/early-warning") - @ApiOperation("预警统计") - public EarlyWarningStatisticsVO earlyWarning(@RequestParam(required = false) Integer year) { - return earlyWarningStatisticsManage.statistics(year); - } - - @GetMapping("/performance") - @ApiOperation("绩效统计") - public PerformanceStatisticsVO performance(@RequestParam(required = false) Integer year) { - return performanceStatisticsManage.statistics(year); - } - - @GetMapping("/project") - @ApiOperation("项目统计") - public EarlyWarningStatisticsVO project(@RequestParam(required = false) Integer year) { - return earlyWarningStatisticsManage.statistics(year); - } -} diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/dashboard/manage/DashboardExpertManage.java b/hz-pm-api/src/main/java/com/hz/pm/api/dashboard/manage/DashboardExpertManage.java index d139e09..5c26fe3 100644 --- a/hz-pm-api/src/main/java/com/hz/pm/api/dashboard/manage/DashboardExpertManage.java +++ b/hz-pm-api/src/main/java/com/hz/pm/api/dashboard/manage/DashboardExpertManage.java @@ -11,7 +11,6 @@ import com.hz.pm.api.dashboard.model.basic.AnalysisData; import com.hz.pm.api.dashboard.model.basic.StarExpertBO; import com.hz.pm.api.dashboard.model.po.QueryYearPO; import com.hz.pm.api.dashboard.model.vo.ExpertDashboardSummaryVO; -import com.hz.pm.api.expert.constant.ExpertUserInfoStepEnum; import com.hz.pm.api.expert.entity.ExpertUserFullInfo; import com.hz.pm.api.expert.service.IExpertUserFullInfoService; import com.hz.pm.api.meeting.entity.domain.Meeting; @@ -41,22 +40,19 @@ public class DashboardExpertManage { private final DashboardHelper dashboardHelper; private final IExpertUserFullInfoService iExpertUserFullInfoService; private final IMeetingService iMeetingService; - // private final DictionaryCache dictionaryCache; private final IMeetingExpertJudgeService iMeetingExpertJudgeService; private final IExpertDictionaryService iExpertDictionaryService; private final DashboardChartAssembler dashboardChartAssembler; - public ExpertDashboardSummaryVO getExpertDashboardSummary(QueryYearPO queryYearPO) { - String queryRegionCode = queryYearPO.getRegionCode(); + public ExpertDashboardSummaryVO getExpertDashboardSummary(QueryYearPO req) { + String queryRegionCode = req.getRegionCode(); List analysisChartList = new ArrayList<>(); // 获取丽水区域 code name Map Map liShuiRegionCodeNameMap = dashboardHelper.getLiShuiRegionCodeNameMap(); // 获取库内所有的专家列表 - List evidenceHasBeenSubmittedExpertInfoList = iExpertUserFullInfoService.list(Wrappers.lambdaQuery(ExpertUserFullInfo.class) - .eq(ExpertUserFullInfo::getUserInfoStep, ExpertUserInfoStepEnum.EVIDENCE_HAS_BEEN_SUBMITTED.getKey())); - + List evidenceHasBeenSubmittedExpertInfoList = iExpertUserFullInfoService.list(); // 专家regionCode分组map列表 Map> regionCodeExpertMap = evidenceHasBeenSubmittedExpertInfoList.stream() .collect(Collectors.groupingBy(ExpertUserFullInfo::getRegionCode)); @@ -70,7 +66,7 @@ public class DashboardExpertManage { AnalysisData analysisData = new AnalysisData(); String regionName = liShuiRegionCodeNameMap.get(regionCode); List expertUserFullInfoList = regionCodeExpertMap.get(regionCode); - Integer expertCnt = 0; + int expertCnt = 0; if (CollectionUtil.isNotEmpty(expertUserFullInfoList)) { expertCnt = expertUserFullInfoList.size(); } @@ -140,8 +136,8 @@ public class DashboardExpertManage { String expertName = expertIdExpertNameMap.get(expertId); List expertMeetingExpertJudgeList = expertIdMeetingExpertJudgeMap.get(expertId); DoubleSummaryStatistics statistics = expertMeetingExpertJudgeList - .stream().filter(r -> Objects.nonNull(r.getScore())) - .map(MeetingExpertJudge::getScore).mapToDouble(Number::doubleValue).summaryStatistics(); + .stream().map(MeetingExpertJudge::getScore) + .filter(Objects::nonNull).mapToDouble(Number::doubleValue).summaryStatistics(); double average = statistics.getAverage(); StarExpertBO starExpertBO = new StarExpertBO(); starExpertBO.setAveragePerformanceScore(average); diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/dashboard/manage/ExpertStatisticsManage.java b/hz-pm-api/src/main/java/com/hz/pm/api/dashboard/manage/ExpertStatisticsManage.java deleted file mode 100644 index 859998c..0000000 --- a/hz-pm-api/src/main/java/com/hz/pm/api/dashboard/manage/ExpertStatisticsManage.java +++ /dev/null @@ -1,348 +0,0 @@ -package com.hz.pm.api.dashboard.manage; - -import com.baomidou.mybatisplus.core.toolkit.Wrappers; -import com.google.common.collect.Lists; -import com.google.common.collect.Maps; -import com.google.common.collect.Sets; -import com.hz.pm.api.common.constant.RegionConst; -import com.hz.pm.api.common.helper.RegionCacheHelper; -import com.hz.pm.api.common.model.entity.DataDTO; -import com.hz.pm.api.dashboard.constant.DashboardConstant; -import com.hz.pm.api.dashboard.model.vo.ExpertStatisticsVO; -import com.hz.pm.api.expert.constant.ExpertUserInfoStepEnum; -import com.hz.pm.api.expert.entity.ExpertIntentionWorkRegion; -import com.hz.pm.api.expert.entity.ExpertUserFullInfo; -import com.hz.pm.api.expert.service.IExpertIntentionWorkRegionService; -import com.hz.pm.api.expert.service.IExpertUserFullInfoService; -import com.hz.pm.api.meta.model.dto.DictDTO; -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.hz.pm.api.meta.service.IExpertDictionaryService; -import com.hz.pm.api.meta.service.IExpertTagService; -import com.hz.pm.api.meta.service.IMetaDictionaryService; -import com.hz.pm.api.meta.service.IMetaTagService; -import com.hz.pm.api.sys.model.dto.RegionDTO; -import lombok.RequiredArgsConstructor; -import lombok.extern.slf4j.Slf4j; -import org.springframework.stereotype.Component; - -import java.time.LocalDateTime; -import java.util.*; -import java.util.concurrent.CompletableFuture; -import java.util.concurrent.ForkJoinPool; -import java.util.stream.Collectors; - -/** - * @Classname ExpertStatisticsManage - * @Description - * @Date 2023/12/04 17:44 - * @Author PoffyZhang - */ -@Component -@RequiredArgsConstructor -@Slf4j -public class ExpertStatisticsManage { - - private final RegionCacheHelper regionCacheHelper; - - private final IExpertUserFullInfoService userFullInfoService; - - private final IExpertIntentionWorkRegionService expertIntentionWorkRegionService; - - private final IExpertTagService expertTagService; - - private final IMetaTagService metaTagService; - - private final IExpertDictionaryService expertDictionaryService; - - private final IMetaDictionaryService metaDictionaryService; - - private Integer[] years = new Integer[]{LocalDateTime.now().getYear() - 2, - LocalDateTime.now().getYear() - 1, LocalDateTime.now().getYear(), - LocalDateTime.now().getYear() + 1, LocalDateTime.now().getYear() + 2}; - - private Integer[] threeYears = new Integer[]{LocalDateTime.now().getYear() - 2, - LocalDateTime.now().getYear() - 1, LocalDateTime.now().getYear()}; - - private String[] SHENGWEIDU = new String[]{DashboardConstant.Expert.NETWORK_CODE, - DashboardConstant.Expert.DANGZHENG_CODE, DashboardConstant.Expert.FANGAN_CODE, - DashboardConstant.Expert.JISHU_CODE, DashboardConstant.Expert.XINCHUANG_CODE, - DashboardConstant.Expert.RUANYING_CODE}; - - private String[] SHIWEIDU = new String[]{DashboardConstant.Expert.CAIWU_CODE, - DashboardConstant.Expert.XINXIHUA_CODE, DashboardConstant.Expert.XINCHUANG_OTTHER_CODE}; - - private String[] TYPES = new String[]{DashboardConstant.Expert.EXPERT_TYPE_INNER, - DashboardConstant.Expert.EXPERT_TYPE_OUT}; - - private String[] LEVELS = new String[]{DashboardConstant.Expert.EXPERT_LEVEL_ZHENGGAO, - DashboardConstant.Expert.EXPERT_LEVEL_FUGAO, DashboardConstant.Expert.EXPERT_LEVEL_MID, - DashboardConstant.Expert.EXPERT_LEVEL_CHUJI, DashboardConstant.Expert.EXPERT_LEVEL_NULL}; - - /** - * 专家统计 - * - * @param year - * @return - */ - public ExpertStatisticsVO statistics(Integer year) { - List experts = userFullInfoService.list(Wrappers.lambdaQuery(ExpertUserFullInfo.class) - .eq(ExpertUserFullInfo::getExpertAccountStatus, DashboardConstant.Expert.ACCOUNT_STATUS_OK) - .eq(ExpertUserFullInfo::getUserInfoStep, ExpertUserInfoStepEnum.EVIDENCE_HAS_BEEN_SUBMITTED.getKey())); - List intentionWorkRegions = expertIntentionWorkRegionService.list(); - - List expertTags = expertTagService.list(); - - List tags = metaTagService.queryAll(); - - List dictionaries = metaDictionaryService.queryAll(); - Set code = Sets.newHashSet(); - Map dictionMap = dictionaries.stream().filter(d -> code.add(d.getDictionaryCode())) - .collect(Collectors.toMap(DictDTO::getDictionaryCode, DictDTO::getName)); - - List expertDictionaries = expertDictionaryService.list(Wrappers.lambdaQuery(ExpertDictionary.class) - .eq(ExpertDictionary::getExpertInfoField, DashboardConstant.Expert.EXPERT_TYPE)); - - ExpertStatisticsVO res = new ExpertStatisticsVO(); - CompletableFuture.allOf( - CompletableFuture.runAsync(() -> { - //选择的年份去计算的数据 - yearCompleteExpert(res, year, experts, intentionWorkRegions, expertTags, - tags, expertDictionaries, dictionMap); - }, ForkJoinPool.commonPool()), - CompletableFuture.runAsync(() -> { - //近三年 - threeYearsCompleteExpert(res, experts); - }, ForkJoinPool.commonPool()), - CompletableFuture.runAsync(() -> { - //近一年 - lastYearsCompleteExpert(res, experts); - }, ForkJoinPool.commonPool()) - ).join(); - - return res; - } - - /** - * 近一年 - * - * @param res - */ - private void lastYearsCompleteExpert(ExpertStatisticsVO res, List experts) { - List lastYear = experts.stream().filter(expert -> { - if (expert.getCreateOn().compareTo(LocalDateTime.now().plusYears(-1)) >= 0 && - expert.getCreateOn().compareTo(LocalDateTime.now()) <= 0) { - return Boolean.TRUE; - } - return Boolean.FALSE; - }).collect(Collectors.toList()); - res.setThisYearAdded(lastYear.size()); - } - - /** - * 近三年 - * - * @param res - */ - private void threeYearsCompleteExpert(ExpertStatisticsVO res, List experts) { - List threeYearsAdds = Lists.newArrayList(); - for (Integer year : threeYears) { - threeYearsAdds.add(DataDTO.of(year.toString(), year.toString(), - experts.stream().filter(e -> { - if (Objects.nonNull(e.getCreateOn()) && year.equals(e.getCreateOn().getYear())) { - return Boolean.TRUE; - } - return Boolean.FALSE; - }).collect(Collectors.toList()).size())); - } - res.setThreeYearsAdded(threeYearsAdds); - } - - /** - * 选择年份或者全部 - * - * @param res \ - * @param year \ - */ - private void yearCompleteExpert(ExpertStatisticsVO res, Integer year, - List experts, List intentionWorkRegions, - List expertTags, List tags, List expertDictionaries, - Map dictionMap) { - res.setTotal(experts.size()); - - Set userSet = Sets.newHashSet(); - Map expertMap = experts.stream().filter(e -> userSet.add(e.getUserId())) - .collect(Collectors.toMap(ExpertUserFullInfo::getUserId, e -> e)); - - List regions = regionCacheHelper.listChildren(RegionConst.RC_LS, RegionConst.RL_CITY) - .stream().filter(r -> r.getRegionLevel().equals(RegionConst.RL_COUNTY)) - .sorted(Comparator.comparing(RegionDTO::getRegionCode)).collect(Collectors.toList()); - - //是否要筛选年 - experts = experts.stream().filter(e -> { - if (Objects.nonNull(e.getCreateOn()) && - (Objects.isNull(year) || year.equals(e.getCreateOn().getYear()))) { - return Boolean.TRUE; - } - return Boolean.FALSE; - }).collect(Collectors.toList()); - - //计算区域专家 - computeRegionExperts(res, intentionWorkRegions, expertMap, regions); - - //计算专家特长 - computeRegionDistribution(res, experts, expertTags, tags); - - //计算专家类型 - computeTypes(res, experts, expertDictionaries, dictionMap); - - //计算专家等级 - computeLevels(res, experts, expertDictionaries, dictionMap); - } - - /** - * 计算 专家等级 - * - * @param res - * @param experts - */ - private void computeLevels(ExpertStatisticsVO res, List experts, - List expertDictionaries, Map dictionMap) { - List levels = Lists.newArrayList(); - - Set userSets = Sets.newHashSet(); - Map expertUserFullInfoMap = experts.stream() - .filter(u -> userSets.add(u.getUserId())) - .collect(Collectors.toMap(ExpertUserFullInfo::getUserId, e -> e)); - - Map> dictionaryMap = expertDictionaries.stream() - .collect(Collectors.groupingBy(ExpertDictionary::getDictionaryCode)); - for (String levelCode : LEVELS) { - int num = 0; - if (dictionaryMap.containsKey(levelCode)) { - List dictionaries = dictionaryMap.get(levelCode); - num = dictionaries.stream().filter(d -> { - if (expertUserFullInfoMap.containsKey(d.getUserId())) { - return Boolean.TRUE; - } - return Boolean.FALSE; - }).collect(Collectors.toList()).size(); - } - levels.add(DataDTO.of(dictionMap.get(levelCode), levelCode, num)); - } - - res.setLevels(levels); - } - - /** - * 计算 专家类型 - * - * @param res - * @param experts - */ - private void computeTypes(ExpertStatisticsVO res, List experts, - List expertDictionaries, Map dictionMap) { - List types = Lists.newArrayList(); - - Set userSets = Sets.newHashSet(); - Map expertUserFullInfoMap = experts.stream() - .filter(u -> userSets.add(u.getUserId())) - .collect(Collectors.toMap(ExpertUserFullInfo::getUserId, e -> e)); - - Map> dictionaryMap = expertDictionaries.stream() - .collect(Collectors.groupingBy(ExpertDictionary::getDictionaryCode)); - for (String typeCode : TYPES) { - int num = 0; - if (dictionaryMap.containsKey(typeCode)) { - List dictionaries = dictionaryMap.get(typeCode); - num = dictionaries.stream().filter(d -> { - if (expertUserFullInfoMap.containsKey(d.getUserId())) { - return Boolean.TRUE; - } - return Boolean.FALSE; - }).collect(Collectors.toList()).size(); - } - types.add(DataDTO.of(dictionMap.get(typeCode), typeCode, num)); - } - - res.setTypes(types); - } - - //计算专家特长 - private void computeRegionDistribution(ExpertStatisticsVO res, List experts, - List expertTags, List tags) { - Set userSets = Sets.newHashSet(); - Map expertUserFullInfoMap = experts.stream() - .filter(u -> userSets.add(u.getUserId())) - .collect(Collectors.toMap(ExpertUserFullInfo::getUserId, e -> e)); - - Map> typeDistribution = Maps.newHashMap(); - - Map> tagsMap = - expertTags.stream().filter(e -> Objects.nonNull(e.getTagCode())) - .collect(Collectors.groupingBy(ExpertTag::getTagCode)); - - Set tagSets = Sets.newHashSet(); - Map tagNameMap = tags.stream().filter(t -> tagSets.add(t.getTagCode())) - .collect(Collectors.toMap(TagDTO::getTagCode, TagDTO::getTagName)); - - //1.省维度 - List shengWeidu = Lists.newArrayList(); - for (String code : SHENGWEIDU) { - shengWeidu.add(getExpertData(expertUserFullInfoMap, - tagsMap, tagNameMap, code)); - } - - //2.市维度 - List shiWeidu = Lists.newArrayList(); - for (String code : SHIWEIDU) { - shiWeidu.add(getExpertData(expertUserFullInfoMap, - tagsMap, tagNameMap, code)); - } - - typeDistribution.put(DashboardConstant.Expert.DISTRIBUTION_SHENG, shengWeidu); - typeDistribution.put(DashboardConstant.Expert.DISTRIBUTION_SHI, shiWeidu); - res.setTypeDistribution(typeDistribution); - } - - /** - * 包装 - * - * @param expertUserFullInfoMap - * @param tagsMap - * @param tagNameMap - * @param code - * @return - */ - private static DataDTO getExpertData(Map expertUserFullInfoMap, Map> tagsMap, Map tagNameMap, String code) { - int num = 0; - if (tagsMap.containsKey(code)) { - List ets = tagsMap.get(code); - num = ets.stream().filter(e -> { - if (expertUserFullInfoMap.containsKey(e.getUserId())) { - return Boolean.TRUE; - } - return Boolean.FALSE; - }).collect(Collectors.toList()).size(); - } - return DataDTO.of(tagNameMap.get(code), code, num); - } - - //计算区域专家 - private static void computeRegionExperts(ExpertStatisticsVO res, List intentionWorkRegions, Map expertMap, List regions) { - List regionExpert = Lists.newArrayList(); - for (RegionDTO region : regions) { - regionExpert.add(DataDTO.of(region.getRegionName(), region.getRegionCode(), - intentionWorkRegions.stream().filter(w -> { - if (Objects.nonNull(w) && Objects.nonNull(w.getRegionCode()) && - w.getRegionCode().equals(region.getRegionCode()) && - expertMap.containsKey(w.getUserId())) { - return Boolean.TRUE; - } - return Boolean.FALSE; - }).collect(Collectors.toList()).size())); - } - res.setRegionExpert(regionExpert); - } -} 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 6815d9d..e42f6e4 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 @@ -2,7 +2,6 @@ package com.hz.pm.api.expert.assembler; import cn.hutool.core.collection.CollUtil; -import com.ningdatech.basic.util.CollUtils; import com.hz.pm.api.common.model.FileBasicInfo; import com.hz.pm.api.expert.model.*; import com.hz.pm.api.expert.model.bo.ExpertInfoSensitiveFieldCheckBO; @@ -12,6 +11,7 @@ import com.hz.pm.api.expert.model.dto.*; import com.hz.pm.api.meta.constant.ExpertDictTypeEnum; import com.hz.pm.api.meta.constant.ExpertTagEnum; import com.hz.pm.api.meta.model.ExpertRegionInfo; +import com.ningdatech.basic.util.CollUtils; import org.apache.commons.collections4.CollectionUtils; import java.util.ArrayList; @@ -171,12 +171,10 @@ public class ExpertInfoCmdAssembler { expertFullInfo.setPhoneNo(basicInfo.getPhoneNo()); expertFullInfo.setGender(basicInfo.getGender()); expertFullInfo.setName(basicInfo.getName()); - if (Objects.nonNull(basicInfo.getAvatarFile())) { - expertFullInfo.setAvatarFileId(basicInfo.getAvatarFile().getFileId()); - } + expertFullInfo.setIdCard(basicInfo.getIdCard()); expertFullInfo.setOfficePhone(basicInfo.getOfficePhone()); - expertFullInfo.setBirth(basicInfo.getBirth()); + expertFullInfo.setBirthday(basicInfo.getBirthday()); expertFullInfo.setBankNo(basicInfo.getBankNo()); expertFullInfo.setBank(basicInfo.getBank()); expertFullInfo.setEmail(basicInfo.getEmail()); @@ -185,22 +183,12 @@ public class ExpertInfoCmdAssembler { if (Objects.nonNull(otherInfo)) { expertFullInfo.setRemark(otherInfo.getRemark()); } - expertFullInfo.setSchool(eduInfo.getSchool()); + expertFullInfo.setSchoolMajor(eduInfo.getSchool()); expertFullInfo.setGraduatedAt(eduInfo.getGraduatedAt()); expertFullInfo.setAcademicTitle(eduInfo.getAcademicTitle()); - if (CollectionUtils.isNotEmpty(eduInfo.getGraduationCertificateFile())) { - expertFullInfo.setGraduationCertificateFileIdList(eduInfo.getGraduationCertificateFile().stream().map(FileBasicInfo::getFileId).collect(Collectors.toList())); - } - if (CollectionUtils.isNotEmpty(eduInfo.getDegreeCertificateFile())) { - - expertFullInfo.setDegreeCertificateFileIdList(eduInfo.getDegreeCertificateFile().stream().map(FileBasicInfo::getFileId).collect(Collectors.toList())); - } - - expertFullInfo.setRetiredAt(jobInfo.getRetiredAt()); expertFullInfo.setCompany(jobInfo.getCompany()); expertFullInfo.setCompanyUniqCode(jobInfo.getCompanyUniqCode()); - expertFullInfo.setLegalEntityCode(jobInfo.getLegalEntityCode()); expertFullInfo.setAdministrativeDuties(jobInfo.getAdministrativeDuties()); expertFullInfo.setStartWorkAt(jobInfo.getStartWorkAt()); expertFullInfo.setAddress(jobInfo.getAddress()); @@ -210,21 +198,11 @@ public class ExpertInfoCmdAssembler { if (CollectionUtils.isNotEmpty(professionalInfo.getTitleCertificateFile())) { expertFullInfo.setTitleCertificateFileIdList(CollUtils.fieldList(professionalInfo.getTitleCertificateFile(), FileBasicInfo::getFileId)); } - expertFullInfo.setAwards(professionalInfo.getAwards()); - expertFullInfo.setRecognitionReward(professionalInfo.getRecognitionReward()); if (Objects.nonNull(basicInfo.getExpertRegionInfo())) { expertFullInfo.setRegionCode(basicInfo.getExpertRegionInfo().getRegionCode()); expertFullInfo.setRegionLevel(basicInfo.getExpertRegionInfo().getRegionLevel()); } - // 推荐证明材料单独装配 - if (Objects.nonNull(recommendInfo)) { - List recommendationProofFile = recommendInfo.getRecommendationProofFile(); - if (CollectionUtils.isNotEmpty(recommendationProofFile)) { - expertFullInfo.setRecommendationProofFileIdList(CollUtils.fieldList(recommendationProofFile, FileBasicInfo::getFileId)); - - } - } return expertFullInfo; } 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 2b9a6f8..8b170c7 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 @@ -4,9 +4,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.alibaba.fastjson.JSONObject; -import com.ningdatech.file.entity.vo.result.AttachFileVo; -import com.hz.pm.api.common.enumeration.BoolDisplayEnum; import com.hz.pm.api.common.helper.RegionCacheHelper; import com.hz.pm.api.common.model.FileBasicInfo; import com.hz.pm.api.expert.constant.ExpertApplyTypeEnum; @@ -24,6 +21,7 @@ import com.hz.pm.api.meta.model.dto.DictDTO; 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.file.entity.vo.result.AttachFileVo; import lombok.RequiredArgsConstructor; import org.apache.commons.lang3.StringUtils; import org.springframework.stereotype.Component; @@ -57,9 +55,9 @@ public class ExpertUserInfoAssembler { // 专家回避单位列表 List avoidCompanies = expertFullInfoAll.getExpertAvoidCompanyList(); // 基本信息 - ExpertBasicInfo basicInfo = buildExpertBasicInfo(expertUserInfo, dictMap, tagMap, intentionWorkRegions, fileMap); + ExpertBasicInfo basicInfo = convert(expertUserInfo, dictMap, tagMap, intentionWorkRegions); // 学历信息 - ExpertEduInfo eduInfo = buildExpertEduInfo(expertUserInfo, dictMap, fileMap); + ExpertEduInfo eduInfo = buildExpertEduInfo(expertUserInfo, dictMap); // 职业信息 ExpertJobInfo jobInfo = buildExpertJobInfo(expertUserInfo, dictMap); jobInfo.setBusinessStrips(expertFullInfoAll.getBusinessStrips()); @@ -68,7 +66,7 @@ public class ExpertUserInfoAssembler { // 推荐信息 ExpertRecommendInfo recommendInfo = new ExpertRecommendInfo(); recommendInfo.setRecommendedWay(dictMap.get(ExpertDictTypeEnum.RECOMMENDED_WAY.getKey())); - recommendInfo.setRecommendationProofFile(getFileBasicInfoList(fileMap, expertUserInfo.getRecommendationProofFileIdList())); + recommendInfo.setRecommendFile(expertUserInfo.getRecommendFile()); // 其他信息 ExpertOtherInfo otherInfo = new ExpertOtherInfo(); otherInfo.setOther(tagMap.get(ExpertTagEnum.OTHER.getKey())); @@ -142,9 +140,7 @@ public class ExpertUserInfoAssembler { professionalInfo.setTitleCertificateFile(getFileBasicInfoList(fileInfoMap, expertUserInfoDTO.getTitleCertificateFileIdList())); professionalInfo.setGoodAt(tagFieldInfoMap.get(ExpertTagEnum.GOOD_AT.getKey())); professionalInfo.setTechnicalExpertise(tagFieldInfoMap.get(ExpertTagEnum.TECHNICAL_EXPERTISE.getKey())); - professionalInfo.setAwards(expertUserInfoDTO.getAwards()); professionalInfo.setIndustrySector(tagFieldInfoMap.get(ExpertTagEnum.INDUSTRY_SECTOR.getKey())); - professionalInfo.setRecognitionReward(expertUserInfoDTO.getRecognitionReward()); professionalInfo.setAvoidCompanyList(expertAvoidCompanyList.stream().map(r -> { ExpertAvoidCompanyInfo avoidCompanyInfo = new ExpertAvoidCompanyInfo(); avoidCompanyInfo.setCompanyName(r.getCompanyName()); @@ -158,10 +154,8 @@ public class ExpertUserInfoAssembler { Map> dictInfoMap) { ExpertJobInfo jobInfo = new ExpertJobInfo(); jobInfo.setJobStatus(dictInfoMap.get(ExpertDictTypeEnum.JOB_STATUS.getKey())); - jobInfo.setRetiredAt(expertUserInfoDTO.getRetiredAt()); jobInfo.setCompany(expertUserInfoDTO.getCompany()); jobInfo.setCompanyUniqCode(expertUserInfoDTO.getCompanyUniqCode()); - jobInfo.setLegalEntityCode(expertUserInfoDTO.getLegalEntityCode()); jobInfo.setAdministrativeDuties(expertUserInfoDTO.getAdministrativeDuties()); jobInfo.setStartWorkAt(expertUserInfoDTO.getStartWorkAt()); jobInfo.setAdministrativeRank(dictInfoMap.get(ExpertDictTypeEnum.ADMINISTRATIVE_RANK.getKey())); @@ -172,17 +166,16 @@ public class ExpertUserInfoAssembler { } public static ExpertEduInfo buildExpertEduInfo(ExpertUserFullInfoDTO expertFullInfo, - Map> dictInfoMap, - Map fileInfoMap) { + Map> dictInfoMap) { // 学历信息 ExpertEduInfo eduInfo = new ExpertEduInfo(); - eduInfo.setSchool(expertFullInfo.getSchool()); + eduInfo.setSchool(expertFullInfo.getSchoolMajor()); eduInfo.setGraduatedAt(expertFullInfo.getGraduatedAt()); eduInfo.setAcademicTitle(expertFullInfo.getAcademicTitle()); eduInfo.setEdu(dictInfoMap.get(ExpertDictTypeEnum.EDU.getKey())); - eduInfo.setGraduationCertificateFile(getFileBasicInfoList(fileInfoMap, expertFullInfo.getGraduationCertificateFileIdList())); + eduInfo.setGraduationCertFile(expertFullInfo.getGraduationCertFile()); eduInfo.setDegree(dictInfoMap.get(ExpertDictTypeEnum.DEGREE.getKey())); - eduInfo.setDegreeCertificateFile(getFileBasicInfoList(fileInfoMap, expertFullInfo.getDegreeCertificateFileIdList())); + eduInfo.setDegreeCertFile(expertFullInfo.getDegreeCertFile()); return eduInfo; } @@ -200,18 +193,10 @@ public class ExpertUserInfoAssembler { return fileBasicInfoList; } - public static FileBasicInfo getFileBasicInfo(Map fileBasicInfoMap, Long fileId) { - if (Objects.isNull(fileId)) { - return null; - } - return fileBasicInfoMap.get(fileId); - } - - public ExpertBasicInfo buildExpertBasicInfo(ExpertUserFullInfoDTO expertUserInfoDTO + public ExpertBasicInfo convert(ExpertUserFullInfoDTO expertUserInfoDTO , Map> dictionaryFieldInfoMap , Map> tagFieldInfoMap - , List expertIntentionWorkRegionInfo - , Map fileBasicInfoMap) { + , List expertIntentionWorkRegionInfo) { //专家层级 ExpertRegionInfo expertRegionInfo = new ExpertRegionInfo(); expertRegionInfo.setRegionLevel(expertUserInfoDTO.getRegionLevel()); @@ -222,12 +207,12 @@ public class ExpertUserInfoAssembler { basicInfo.setIsDingUser(expertUserInfoDTO.getIsDingUser()); basicInfo.setPhoneNo(expertUserInfoDTO.getPhoneNo()); basicInfo.setName(expertUserInfoDTO.getName()); - basicInfo.setAvatarFile(getFileBasicInfo(fileBasicInfoMap, expertUserInfoDTO.getAvatarFileId())); + basicInfo.setAvatarFile(expertUserInfoDTO.getAvatarFile()); basicInfo.setGender(expertUserInfoDTO.getGender()); basicInfo.setPolitical(dictionaryFieldInfoMap.get(ExpertDictTypeEnum.POLITICAL.getKey())); basicInfo.setIdCard(expertUserInfoDTO.getIdCard()); basicInfo.setOfficePhone(expertUserInfoDTO.getPhoneNo()); - basicInfo.setBirth(expertUserInfoDTO.getBirth()); + basicInfo.setBirthday(expertUserInfoDTO.getBirthday()); basicInfo.setBank(expertUserInfoDTO.getBank()); basicInfo.setBankNo(expertUserInfoDTO.getBankNo()); basicInfo.setEmail(expertUserInfoDTO.getEmail()); @@ -248,14 +233,14 @@ public class ExpertUserInfoAssembler { return basicInfo; } - public static ExpertFullInfoAllDTO buildExpertFullInfoAllDTO(ExpertUserFullInfo expertUserFullInfo, - List expertTagList, - List expertDictionaryList, - List intentionWorkRegionList, - List expertMetaApplyList, - List expertAvoidCompanyList, - List businessStrips) { - ExpertUserFullInfoDTO expertFullInfoDto = buildExpertUserFullInfoDTO(expertUserFullInfo); + public static ExpertFullInfoAllDTO convert(ExpertUserFullInfo expertUserFullInfo, + List expertTagList, + List expertDictionaryList, + List intentionWorkRegionList, + List expertMetaApplyList, + List expertAvoidCompanyList, + List businessStrips) { + ExpertUserFullInfoDTO expertFullInfoDto = convert(expertUserFullInfo); List expertDicts = buildExpertDictionaryDTOList(expertDictionaryList); List expertTags = buildExpertTagDTOList(expertTagList); List intentionWorkRegions = buildExpertIntentionWorkRegionInfo(intentionWorkRegionList); @@ -352,71 +337,48 @@ public class ExpertUserInfoAssembler { }).collect(Collectors.toList()); } - public static ExpertUserFullInfoDTO buildExpertUserFullInfoDTO(ExpertUserFullInfo expertUserFullInfo) { - ExpertUserFullInfoDTO expertUserFullInfoDTO = new ExpertUserFullInfoDTO(); - expertUserFullInfoDTO.setIsDingUser(BoolDisplayEnum.judgeBoolean(expertUserFullInfo.getIsDingUser())); - expertUserFullInfoDTO.setPhoneNo(expertUserFullInfo.getPhoneNo()); - expertUserFullInfoDTO.setGender(expertUserFullInfo.getGender()); - expertUserFullInfoDTO.setName(expertUserFullInfo.getExpertName()); - expertUserFullInfoDTO.setAvatarFileId(expertUserFullInfo.getAvatarFileId()); - expertUserFullInfoDTO.setIdCard(expertUserFullInfo.getIdCard()); - expertUserFullInfoDTO.setOfficePhone(expertUserFullInfo.getOfficePhone()); - expertUserFullInfoDTO.setBirth(expertUserFullInfo.getBirth()); - expertUserFullInfoDTO.setBankNo(expertUserFullInfo.getBankNo()); - expertUserFullInfoDTO.setBank(expertUserFullInfo.getBank()); - expertUserFullInfoDTO.setEmail(expertUserFullInfo.getEmail()); - expertUserFullInfoDTO.setHometown(expertUserFullInfo.getHometown()); - expertUserFullInfoDTO.setNationality(expertUserFullInfo.getNationality()); - - expertUserFullInfoDTO.setSchool(expertUserFullInfo.getSchool()); - expertUserFullInfoDTO.setGraduatedAt(expertUserFullInfo.getGraduatedAt()); - expertUserFullInfoDTO.setAcademicTitle(expertUserFullInfo.getAcademicTitle()); - if (StringUtils.isNotBlank(expertUserFullInfo.getGraduationCertificateFileIdList())) { - expertUserFullInfoDTO.setGraduationCertificateFileIdList(JSONObject.parseArray(expertUserFullInfo.getGraduationCertificateFileIdList(), Long.class)); - } - if (StringUtils.isNotBlank(expertUserFullInfo.getDegreeCertificateFileIdList())) { - expertUserFullInfoDTO.setDegreeCertificateFileIdList(JSONObject.parseArray(expertUserFullInfo.getDegreeCertificateFileIdList(), Long.class)); - } - expertUserFullInfoDTO.setRetiredAt(expertUserFullInfo.getRetiredAt()); - expertUserFullInfoDTO.setCompany(expertUserFullInfo.getCompany()); - expertUserFullInfoDTO.setCompanyUniqCode(expertUserFullInfo.getCompanyUniqCode()); - expertUserFullInfoDTO.setLegalEntityCode(expertUserFullInfo.getLegalEntityCode()); - expertUserFullInfoDTO.setAdministrativeDuties(expertUserFullInfo.getAdministrativeDuties()); - expertUserFullInfoDTO.setStartWorkAt(expertUserFullInfo.getStartWorkAt()); - expertUserFullInfoDTO.setAddress(expertUserFullInfo.getAddress()); - expertUserFullInfoDTO.setExperience(expertUserFullInfo.getExperience()); - - expertUserFullInfoDTO.setTechnicalTitles(expertUserFullInfo.getTechnicalTitles()); - if (StringUtils.isNotBlank(expertUserFullInfo.getTitleCertificateFileIdList())) { - expertUserFullInfoDTO.setTitleCertificateFileIdList(JSONObject.parseArray(expertUserFullInfo.getTitleCertificateFileIdList(), Long.class)); - } - expertUserFullInfoDTO.setAwards(expertUserFullInfo.getAwards()); - expertUserFullInfoDTO.setRecognitionReward(expertUserFullInfo.getRecognitionReward()); - - expertUserFullInfoDTO.setRegionCode(expertUserFullInfo.getRegionCode()); - expertUserFullInfoDTO.setRegionLevel(expertUserFullInfo.getRegionLevel()); - - if (StringUtils.isNotBlank(expertUserFullInfo.getRecommendationProofFileIdList())) { - expertUserFullInfoDTO.setRecommendationProofFileIdList(JSONObject.parseArray(expertUserFullInfo.getRecommendationProofFileIdList(), Long.class)); - } - expertUserFullInfoDTO.setRemark(expertUserFullInfo.getRemark()); - - return expertUserFullInfoDTO; + public static ExpertUserFullInfoDTO convert(ExpertUserFullInfo expertFullInfo) { + ExpertUserFullInfoDTO expert = new ExpertUserFullInfoDTO(); + expert.setIsDingUser(expertFullInfo.getIsDingUser()); + expert.setPhoneNo(expertFullInfo.getPhoneNo()); + expert.setGender(expertFullInfo.getGender()); + expert.setName(expertFullInfo.getExpertName()); + expert.setAvatarFile(expertFullInfo.getAvatarFile()); + expert.setIdCard(expertFullInfo.getIdCard()); + expert.setOfficePhone(expertFullInfo.getOfficePhone()); + expert.setBirthday(expertFullInfo.getBirthday()); + expert.setBankNo(expertFullInfo.getBankNo()); + expert.setBank(expertFullInfo.getBank()); + expert.setEmail(expertFullInfo.getEmail()); + expert.setHometown(expertFullInfo.getHometown()); + expert.setNationality(expertFullInfo.getNationality()); + expert.setSchoolMajor(expertFullInfo.getSchoolMajor()); + expert.setGraduatedAt(expertFullInfo.getGraduatedAt()); + expert.setAcademicTitle(expertFullInfo.getAcademicTitle()); + expert.setGraduationCertFile(expertFullInfo.getGraduationCertFile()); + expert.setDegreeCertFile(expertFullInfo.getDegreeCertFile()); + expert.setCompany(expertFullInfo.getCompany()); + expert.setCompanyUniqCode(expertFullInfo.getCompanyUniqCode()); + expert.setStartWorkAt(expertFullInfo.getStartWorkAt()); + expert.setAddress(expertFullInfo.getAddress()); + expert.setExperience(expertFullInfo.getExperience()); + expert.setAcademicTitle(expertFullInfo.getAcademicTitle()); + expert.setRegionCode(expertFullInfo.getRegionCode()); + expert.setRegionLevel(expertFullInfo.getRegionLevel()); + expert.setRecommendFile(expertFullInfo.getRecommendFile()); + return expert; } - public static ExpertAdminExpertManageListDTO buildExpertAdminExpertManageListDTO(ExpertUserFullInfo expertUserFullInfo, - Map> expertDictMap, - Map> expertTagMap) { + 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(BoolDisplayEnum.judgeBoolean(expertUserFullInfo.getIsDingUser())); + adminManageExpertListItem.setIsDingUser(expertUserFullInfo.getIsDingUser()); adminManageExpertListItem.setCompany(expertUserFullInfo.getCompany()); - adminManageExpertListItem.setLegalEntityCode(expertUserFullInfo.getLegalEntityCode()); - adminManageExpertListItem.setExpertAccountStatus(expertUserFullInfo.getExpertAccountStatus()); - // 装配字典数据 List userExpertDictList = expertDictMap.getOrDefault(userId, Collections.emptyList()); Map> fieldExpertDictMap = userExpertDictList.stream().collect(Collectors.groupingBy(ExpertDictionary::getExpertInfoField)); @@ -440,7 +402,7 @@ public class ExpertUserInfoAssembler { // 以下数据为专家excel导出使用 adminManageExpertListItem.setGender(expertUserFullInfo.getGender()); - adminManageExpertListItem.setBirth(expertUserFullInfo.getBirth()); + adminManageExpertListItem.setBirthday(expertUserFullInfo.getBirthday()); adminManageExpertListItem.setHometown(expertUserFullInfo.getHometown()); adminManageExpertListItem.setNationality(expertUserFullInfo.getNationality()); adminManageExpertListItem.setPolitical( diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/expert/assembler/RegionWrapperAssembler.java b/hz-pm-api/src/main/java/com/hz/pm/api/expert/assembler/RegionWrapperAssembler.java deleted file mode 100644 index f707d2c..0000000 --- a/hz-pm-api/src/main/java/com/hz/pm/api/expert/assembler/RegionWrapperAssembler.java +++ /dev/null @@ -1,27 +0,0 @@ -package com.hz.pm.api.expert.assembler; - -import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; -import com.baomidou.mybatisplus.core.toolkit.CollectionUtils; -import com.hz.pm.api.expert.entity.ExpertUserFullInfo; -import com.hz.pm.api.meta.model.bo.RegionContainsBO; - -import java.util.List; - -/** - * @author liuxinxin - * @date 2022/8/10 下午5:36 - */ - -public class RegionWrapperAssembler { - - public static void expertUserFullInfoRegionContainsWrapperAssembler(LambdaQueryWrapper wrapperQuery, List containsRegionList) { - for (RegionContainsBO regionContainsBO : containsRegionList) { - List containsRegionCodeList = regionContainsBO.getContainsRegionCodeList(); - Integer parentRegionTreeLevel = regionContainsBO.getParentRegionTreeLevel(); - if (CollectionUtils.isNotEmpty(containsRegionCodeList)) { - wrapperQuery.and(wrapper -> wrapper.in(ExpertUserFullInfo::getRegionCode, containsRegionCodeList) - .ge(ExpertUserFullInfo::getRegionLevel, parentRegionTreeLevel)); - } - } - } -} diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/expert/entity/ExpertUserFullInfo.java b/hz-pm-api/src/main/java/com/hz/pm/api/expert/entity/ExpertUserFullInfo.java index b1ab27e..12340d9 100644 --- a/hz-pm-api/src/main/java/com/hz/pm/api/expert/entity/ExpertUserFullInfo.java +++ b/hz-pm-api/src/main/java/com/hz/pm/api/expert/entity/ExpertUserFullInfo.java @@ -1,17 +1,19 @@ package com.hz.pm.api.expert.entity; import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; import io.swagger.annotations.ApiModel; import lombok.Data; import java.io.Serializable; +import java.time.LocalDate; import java.time.LocalDateTime; /** *

- * + * 专家信息 *

* * @author Liuxinxin @@ -19,7 +21,7 @@ import java.time.LocalDateTime; */ @Data @TableName("nd_expert_user_full_info") -@ApiModel(value = "NdExpertUserFullInfo对象") +@ApiModel(value = "ExpertUserFullInfo对象") public class ExpertUserFullInfo implements Serializable { private static final long serialVersionUID = 1L; @@ -31,80 +33,197 @@ public class ExpertUserFullInfo implements Serializable { private LocalDateTime updateOn; + /** + * 用户ID + */ private Long userId; - private String expertAccountStatus; + /** + * 信创用户ID + */ + private String mhUserId; - private String isDingUser; + /** + * 专家编号 + */ + private String mhExpertNo; - private String userInfoStep; + /** + * 是否是浙政钉用户 + */ + private String isDingUser; + /** + * 手机号 + */ private String phoneNo; + /** + * 性别 + */ private String gender; + /** + * 专家姓名 + */ private String expertName; - private Long avatarFileId; + /** + * 头像 + */ + private String avatarFile; private String idCard; + private String idCardFile; + private String officePhone; + private String wechatOpenId; + private String bankNo; private String bank; private String email; - private String school; - - private LocalDateTime graduatedAt; - - private String academicTitle; - - private String graduationCertificateFileIdList; - - private String degreeCertificateFileIdList; - - private LocalDateTime retiredAt; - - private String company; + private String regionCode; - private String companyUniqCode; + private Integer regionLevel; - private String legalEntityCode; + /** + * 企业ID + */ + private String mhCompanyId; - private String administrativeDuties; + /** + * 所在单位 + */ + private String unit; - private LocalDateTime startWorkAt; + /** + * 单位性质 + */ + private String unitType; + /** + * 通讯地址 + */ private String address; - private String experience; - - private String technicalTitles; + /** + * 1:绿码 2:黄码 3:红码 + */ + private Integer star; - private String titleCertificateFileIdList; + /** + * 学校及专业 + */ + private String schoolMajor; - private String awards; + /** + * 毕业时间 + */ + private LocalDate graduatedAt; - private String recognitionReward; + /** + * 技术职称及评定时间 + */ + private String academicTitle; - private String recommendationProofFileIdList; + /** + * 毕业证书 + */ + private String graduationCertFile; - private String regionCode; + /** + * 学位证书 + */ + private String degreeCertFile; - private Integer regionLevel; + /** + * 开始工作时间 + */ + private LocalDate startWorkAt; - private String recommendedWay; + /** + * 经历 + */ + private String experience; - private String remark; + /** + * 政治面貌 + */ + private String political; + /** + * 籍贯 + */ private String hometown; - + /** + * 民族 + */ private String nationality; + /** + * 出生日期 + */ + private LocalDate birthday; + + /** + * 入库时间 + */ + private LocalDateTime inPutTime; + + /** + * 是否入库 + */ + private String isPut; + + /** + * 发证日期 + */ + private LocalDateTime awardCertDate; + + private String mhCreateBy; + + private LocalDateTime mhCreateOn; + + /** + * 专业技术资格 + */ + private String majorCredentials; + + /** + * 信创技术资格 + */ + private String itaicCredentials; + + /** + * 专家来源 + */ + private String expertSource; + + /** + * 其他附件 + */ + private String otherFile; + + /** + * 专家推荐表 + */ + private String recommendFile; + + /** + * 社保记录 + */ + private String socialInsureFile; + + // TODO 重新处理单位 + @TableField(exist = false) + private String companyUniqCode; - private LocalDateTime birth; + // TODO 重新处理单位 + @TableField(exist = false) + private String company; } diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/expert/entity/ExpertUserFullInfoV1.java b/hz-pm-api/src/main/java/com/hz/pm/api/expert/entity/ExpertUserFullInfoV1.java deleted file mode 100644 index 29c3a21..0000000 --- a/hz-pm-api/src/main/java/com/hz/pm/api/expert/entity/ExpertUserFullInfoV1.java +++ /dev/null @@ -1,214 +0,0 @@ -package com.hz.pm.api.expert.entity; - -import com.baomidou.mybatisplus.annotation.IdType; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; -import io.swagger.annotations.ApiModel; -import lombok.Data; - -import java.io.Serializable; -import java.time.LocalDate; -import java.time.LocalDateTime; - -/** - *

- * - *

- * - * @author Liuxinxin - * @since 2023-02-22 - */ -@Data -@TableName("nd_expert_user_full_info") -@ApiModel(value = "NdExpertUserFullInfo对象") -public class ExpertUserFullInfoV1 implements Serializable { - - private static final long serialVersionUID = 1L; - - @TableId(type = IdType.AUTO) - private Long id; - - private LocalDateTime createOn; - - private LocalDateTime updateOn; - /** - * 用户ID - */ - private Long userId; - /** - * 信创用户ID - */ - private String mhUserId; - - /** - * 专家编号 - */ - private String mhExpertNo; - - /** - * 是否是浙政钉用户 - */ - private Boolean isZwddUser; - - /** - * 手机号 - */ - private String phoneNo; - - /** - * 性别 - */ - private String gender; - - /** - * 专家姓名 - */ - private String expertName; - - /** - * 头像 - */ - private String avatarFile; - - private String idCard; - - private String idCardFile; - - private String officePhone; - - private String wechatOpenId; - - private String bankNo; - - private String bank; - - private String email; - - /** - * 企业ID - */ - private String mhCompanyId; - - /** - * 所在单位 - */ - private String unit; - - /** - * 单位性质 - */ - private String unitType; - - /** - * 通讯地址 - */ - private String address; - - /** - * 1:绿码 2:黄码 3:红码 - */ - private Integer star; - - /** - * 学校及专业 - */ - private String schoolMajor; - - /** - * 毕业时间 - */ - private LocalDate graduatedAt; - - /** - * 技术职称及评定时间 - */ - private String academicTitle; - - /** - * 毕业证书 - */ - private String graduationCertFile; - - /** - * 学位证书 - */ - private String degreeCertFile; - - /** - * 开始工作时间 - */ - private LocalDate startWorkAt; - - /** - * 经历 - */ - private String experience; - - /** - * 政治面貌 - */ - private String political; - - /** - * 籍贯 - */ - private String hometown; - /** - * 民族 - */ - private String nationality; - /** - * 出生日期 - */ - private LocalDate birthday; - - /** - * 入库时间 - */ - private LocalDateTime inPutTime; - - /** - * 是否入库 - */ - private String isPut; - - /** - * 发证日期 - */ - private LocalDateTime awardCertDate; - - private String mhCreateBy; - - private LocalDateTime mhCreateOn; - - /** - * 专业技术资格 - */ - private String majorCredentials; - - /** - * 信创技术资格 - */ - private String itaicCredentials; - - /** - * 专家来源 - */ - private String expertSource; - - /** - * 其他附件 - */ - private String otherFile; - - /** - * 专家推荐表 - */ - private String recommendFile; - - /** - * 社保记录 - */ - private String socialInsureFile; - -} diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/expert/helper/ExpertInfoCommonHelper.java b/hz-pm-api/src/main/java/com/hz/pm/api/expert/helper/ExpertInfoCommonHelper.java index a095430..f48368d 100644 --- a/hz-pm-api/src/main/java/com/hz/pm/api/expert/helper/ExpertInfoCommonHelper.java +++ b/hz-pm-api/src/main/java/com/hz/pm/api/expert/helper/ExpertInfoCommonHelper.java @@ -1,13 +1,10 @@ package com.hz.pm.api.expert.helper; import com.hz.pm.api.expert.model.dto.ExpertFullInfoAllDTO; -import com.hz.pm.api.expert.model.dto.ExpertUserFullInfoDTO; -import org.apache.commons.collections4.CollectionUtils; import org.springframework.stereotype.Component; -import java.util.ArrayList; +import java.util.Collections; import java.util.List; -import java.util.Objects; /** * @author liuxinxin @@ -20,27 +17,11 @@ public class ExpertInfoCommonHelper { * 获取专家的所有文件id * 头像,学位证书,毕业证书,推荐证明材料,职称证明 * - * @param expertUserFullInfoAll - * @return + * @param expertUserFullInfoAll \ + * @return \ */ public List getExpertFileIdList(ExpertFullInfoAllDTO expertUserFullInfoAll) { - ExpertUserFullInfoDTO expertUserInfoDTO = expertUserFullInfoAll.getExpertUserInfoDTO(); - List fileIdList = new ArrayList<>(); - if (Objects.nonNull(expertUserInfoDTO.getAvatarFileId())) { - fileIdList.add(expertUserInfoDTO.getAvatarFileId()); - } - if (CollectionUtils.isNotEmpty(expertUserInfoDTO.getDegreeCertificateFileIdList())) { - fileIdList.addAll(expertUserInfoDTO.getDegreeCertificateFileIdList()); - } - if (CollectionUtils.isNotEmpty(expertUserInfoDTO.getGraduationCertificateFileIdList())) { - fileIdList.addAll(expertUserInfoDTO.getGraduationCertificateFileIdList()); - } - if (CollectionUtils.isNotEmpty(expertUserInfoDTO.getRecommendationProofFileIdList())) { - fileIdList.addAll(expertUserInfoDTO.getRecommendationProofFileIdList()); - } - if (CollectionUtils.isNotEmpty(expertUserInfoDTO.getTitleCertificateFileIdList())) { - fileIdList.addAll(expertUserInfoDTO.getTitleCertificateFileIdList()); - } - return fileIdList; + // TODO 后续可能会删除 + return Collections.emptyList(); } } 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 99d2453..c374285 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 @@ -59,8 +59,8 @@ public class ExpertInfoSensitiveFieldModifyCheckHelper { // 专家标签字段map Map> tagFieldInfoMap = expertUserInfoAssembler.buildTagFieldInfoMap(expertUserFullInfoAll.getExpertTagList()); ExpertBasicInfo originalBasicInfo = expertUserInfoAssembler - .buildExpertBasicInfo(expertUserInfoDTO, dictionaryFieldInfoMap - , tagFieldInfoMap, expertUserFullInfoAll.getExpertIntentionWorkRegionInfo(), fileBasicInfoMap); + .convert(expertUserInfoDTO, dictionaryFieldInfoMap + , tagFieldInfoMap, expertUserFullInfoAll.getExpertIntentionWorkRegionInfo()); ExpertJobInfo originalJobInfo = ExpertUserInfoAssembler.buildExpertJobInfo(expertUserInfoDTO, dictionaryFieldInfoMap); ExpertProfessionalInfo originalProfessionalInfo = ExpertUserInfoAssembler.buildExpertProfessionalInfo(expertUserInfoDTO diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/expert/manage/ExpertManage.java b/hz-pm-api/src/main/java/com/hz/pm/api/expert/manage/ExpertManage.java index 907e860..9fd306a 100644 --- a/hz-pm-api/src/main/java/com/hz/pm/api/expert/manage/ExpertManage.java +++ b/hz-pm-api/src/main/java/com/hz/pm/api/expert/manage/ExpertManage.java @@ -9,8 +9,6 @@ import com.hz.pm.api.common.model.entity.KeyValDTO; import com.hz.pm.api.common.util.BizUtils; import com.hz.pm.api.expert.assembler.ExpertInfoCmdAssembler; 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.entity.ExpertUserFullInfo; import com.hz.pm.api.expert.helper.ExpertInfoCommonHelper; import com.hz.pm.api.expert.helper.ExpertManageHelper; @@ -129,7 +127,7 @@ public class ExpertManage { response.setContentType(MediaType.TEXT_PLAIN_VALUE); response.setCharacterEncoding(StandardCharsets.UTF_8.name()); try { - if (cachePlusOps.exists(cacheKey)) { + if (Boolean.TRUE.equals(cachePlusOps.exists(cacheKey))) { response.sendRedirect(WebProperties.webUrl + WebProperties.expertRegistrationUrl); } else { response.getWriter().write("专家报名链接已失效"); @@ -166,15 +164,6 @@ public class ExpertManage { } private void expertRecommendProofSubmit(List recommendedWay, List recommendProofFile, Long expertUserId) { - // 用户id - ExpertUserFullInfo expertUserFullInfo = expertUserFullInfoService.getByUserId(expertUserId); - // 判断专家状态,是否可以进行证明材料提交 - if (Objects.isNull(expertUserFullInfo) - || !ExpertAccountStatusEnum.APPLYING.getKey().equals(expertUserFullInfo.getExpertAccountStatus()) - || ExpertUserInfoStepEnum.EVIDENCE_HAS_BEEN_SUBMITTED.getKey().equals(expertUserFullInfo.getUserInfoStep())) { - throw new BizException("当前状态无法提交证明材料"); - } - // 证明材料提交 ExpertRecommendProofSaveCmd expertRecommendProofSaveCmd = new ExpertRecommendProofSaveCmd(); if (CollectionUtils.isNotEmpty(recommendProofFile)) { @@ -287,9 +276,7 @@ public class ExpertManage { // 判断专家提交状态,判断是否可以进行此操作 ExpertUserFullInfo expertUserFullInfo = expertUserFullInfoService.getByUserId(userId); - boolean submitBasicInfoStatusEnable = Objects.isNull(expertUserFullInfo) - || (ExpertAccountStatusEnum.APPLYING.getKey().equals(expertUserFullInfo.getExpertAccountStatus()) - && !ExpertUserInfoStepEnum.EVIDENCE_HAS_BEEN_SUBMITTED.getKey().equals(expertUserFullInfo.getUserInfoStep())); + boolean submitBasicInfoStatusEnable = Objects.isNull(expertUserFullInfo); if (submitBasicInfoStatusEnable) { // 新建 保存 ExpertFullInfoSaveCmd expertFullInfoSaveCmd = ExpertInfoCmdAssembler @@ -301,8 +288,8 @@ public class ExpertManage { // 推荐证明材料 List recommendedWay = recommendInfo.getRecommendedWay(); // 推荐方式 - List recommendProofFile = recommendInfo.getRecommendationProofFile(); - expertRecommendProofSubmit(recommendedWay, recommendProofFile, userId); + // List recommendProofFile = recommendInfo.getRecommendationProofFile(); + // expertRecommendProofSubmit(recommendedWay, recommendProofFile, userId); return userId; } 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 c6df747..31c7e41 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 @@ -32,7 +32,6 @@ import com.hz.pm.api.expert.service.IExpertMetaApplyService; import com.hz.pm.api.expert.service.IExpertUserFullInfoService; import com.hz.pm.api.meta.constant.ExpertDictTypeEnum; import com.hz.pm.api.meta.helper.DictionaryCache; -import com.hz.pm.api.meta.helper.ExpertUserInfoHelper; import com.hz.pm.api.meta.model.ExpertRegionInfo; import com.hz.pm.api.meta.model.bo.RegionContainsBO; import com.hz.pm.api.meta.model.dto.DictDTO; @@ -69,7 +68,6 @@ public class ExpertMetaApplyManage { private final ExpertInfoService expertInfoService; private final UserInfoHelper userInfoHelper; private final RegionLimitHelper regionLimitHelper; - private final ExpertUserInfoHelper expertUserInfoHelper; private final ExpertAdminManageService expertAdminManageService; private final IExpertDictionaryService iExpertDictionaryService; @@ -211,30 +209,9 @@ public class ExpertMetaApplyManage { .auditStatus(metaApply.getApplyStatus()) .auditTime(metaApply.getReviewTime()) .build(); - String extraMaterialStr = metaApply.getExtraMaterial(); -// if (StringUtils.isNotBlank(extraMaterialStr)) { -// ExtraMaterialDO extraMaterialDO = JSONObject.parseObject(extraMaterialStr, ExtraMaterialDO.class); -// ModifyApplyExtraInfo modifyApplyExtraInfo = new ModifyApplyExtraInfo(); -// BizUtils.notEmpty(extraMaterialDO.getEvidenceList(), list -> { -// List fileIdList = CollUtils.fieldList(list, FileBasicInfo::getFileId); -// List attachFiles = fileService.getByIds(fileIdList); -// List tempList = attachFiles.stream().map(r -> { -// FileBasicInfo fileBasicInfo = new FileBasicInfo(); -// fileBasicInfo.setFileId(r.getFileId()); -// fileBasicInfo.setFileName(r.getOriginalFileName()); -// return fileBasicInfo; -// }).collect(Collectors.toList()); -// modifyApplyExtraInfo.setEvidenceList(tempList); -// }); -// modifyApplyExtraInfo.setFactSheet(extraMaterialDO.getFactSheet()); -// metaApplyResultVo.setModifyApplyExtraInfo(modifyApplyExtraInfo); -// } String applyType = metaApply.getApplyType(); ExpertApplyTypeEnum applyTypeEnum = ExpertApplyTypeEnum.of(applyType); switch (applyTypeEnum) { -// case EXPERT_INFO_MODIFY: -// buildInfoModifyApplyDisplayVO(metaApplyResultVo, metaApply); -// break; case EXPERT_INTENTION_JOIN: case EXPERT_INTENTION_LEAVE: buildIntentionApplyDisplayVO(metaApplyResultVo, metaApply, applyTypeEnum); diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/expert/mapper/ExpertAdminManageMapper.xml b/hz-pm-api/src/main/java/com/hz/pm/api/expert/mapper/ExpertAdminManageMapper.xml index cf2e4c9..9e018fd 100644 --- a/hz-pm-api/src/main/java/com/hz/pm/api/expert/mapper/ExpertAdminManageMapper.xml +++ b/hz-pm-api/src/main/java/com/hz/pm/api/expert/mapper/ExpertAdminManageMapper.xml @@ -11,14 +11,6 @@ AND company LIKE CONCAT('%',#{query.company, jdbcType=BIGINT},'%') - - AND expert_account_status IN - - #{expertAccountStatus} - - AND region_code = #{query.regionCode} AND region_level = #{query.regionLevel} diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/expert/mapper/ExpertUserFullInfoMapper.java b/hz-pm-api/src/main/java/com/hz/pm/api/expert/mapper/ExpertUserFullInfoMapper.java new file mode 100644 index 0000000..4c06685 --- /dev/null +++ b/hz-pm-api/src/main/java/com/hz/pm/api/expert/mapper/ExpertUserFullInfoMapper.java @@ -0,0 +1,16 @@ +package com.hz.pm.api.expert.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.hz.pm.api.expert.entity.ExpertUserFullInfo; + +/** + *

+ * Mapper 接口 + *

+ * + * @author Liuxinxin + * @since 2023-02-22 + */ +public interface ExpertUserFullInfoMapper extends BaseMapper { + +} diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/expert/mapper/ExpertUserFullInfoMapper.xml b/hz-pm-api/src/main/java/com/hz/pm/api/expert/mapper/ExpertUserFullInfoMapper.xml new file mode 100644 index 0000000..1a4fe9a --- /dev/null +++ b/hz-pm-api/src/main/java/com/hz/pm/api/expert/mapper/ExpertUserFullInfoMapper.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/expert/mapper/NdExpertUserFullInfoMapper.java b/hz-pm-api/src/main/java/com/hz/pm/api/expert/mapper/NdExpertUserFullInfoMapper.java deleted file mode 100644 index 5730a96..0000000 --- a/hz-pm-api/src/main/java/com/hz/pm/api/expert/mapper/NdExpertUserFullInfoMapper.java +++ /dev/null @@ -1,16 +0,0 @@ -package com.hz.pm.api.expert.mapper; - -import com.hz.pm.api.expert.entity.ExpertUserFullInfo; -import com.baomidou.mybatisplus.core.mapper.BaseMapper; - -/** - *

- * Mapper 接口 - *

- * - * @author Liuxinxin - * @since 2023-02-22 - */ -public interface NdExpertUserFullInfoMapper extends BaseMapper { - -} diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/expert/mapper/NdExpertUserFullInfoMapper.xml b/hz-pm-api/src/main/java/com/hz/pm/api/expert/mapper/NdExpertUserFullInfoMapper.xml deleted file mode 100644 index 392c8ce..0000000 --- a/hz-pm-api/src/main/java/com/hz/pm/api/expert/mapper/NdExpertUserFullInfoMapper.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - - 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 85613bc..0713da6 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 @@ -1,6 +1,5 @@ package com.hz.pm.api.expert.model; -import com.hz.pm.api.common.model.FileBasicInfo; import com.hz.pm.api.meta.model.ExpertRegionInfo; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @@ -10,6 +9,7 @@ import javax.validation.constraints.Email; 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; @@ -27,7 +27,7 @@ public class ExpertBasicInfo { */ @NotNull @ApiModelProperty(value = "是否浙政钉用户Y/N") - private Boolean isDingUser; + private String isDingUser; /** * 手机号 @@ -48,7 +48,7 @@ public class ExpertBasicInfo { */ @NotBlank @ApiModelProperty(value = "免冠照图片文件") - private FileBasicInfo avatarFile; + private String avatarFile; /** * 性别 0,1:女,男 @@ -82,7 +82,7 @@ public class ExpertBasicInfo { */ @NotNull @ApiModelProperty(value = "出生日期") - private LocalDateTime birth; + private LocalDate birthday; /** * 开户银行 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 08315bf..3975a07 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 @@ -7,6 +7,7 @@ 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; @@ -30,7 +31,7 @@ public class ExpertEduInfo { */ @NotNull @ApiModelProperty("毕业时间") - private LocalDateTime graduatedAt; + private LocalDate graduatedAt; /** * 所学专业 @@ -50,7 +51,7 @@ public class ExpertEduInfo { * 毕业证附件信息 */ @ApiModelProperty("毕业证附件信息") - private List graduationCertificateFile; + private String graduationCertFile; /** * 学位(字典code) @@ -63,5 +64,5 @@ public class ExpertEduInfo { * 学位证附件信息 */ @ApiModelProperty("学位证附件信息") - private List degreeCertificateFile; + private String degreeCertFile; } 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 9114f5c..16718d4 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 @@ -7,6 +7,7 @@ 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; @@ -60,7 +61,7 @@ public class ExpertJobInfo { */ @NotNull @ApiModelProperty("开始工作时间") - private LocalDateTime startWorkAt; + private LocalDate startWorkAt; /** * 行政职级(字典code) 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 a74f1d9..c772042 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 @@ -22,5 +22,5 @@ public class ExpertRecommendInfo { private List recommendedWay; @ApiModelProperty("推荐证明材料") - private List recommendationProofFile; + private String recommendFile; } 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 index c974f3b..5170703 100644 --- 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 @@ -6,6 +6,7 @@ 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; @@ -49,7 +50,7 @@ public class ExpertAdminExpertManageListDTO { /** * 出生日期 */ - private LocalDateTime birth; + private LocalDate birthday; /** * 籍贯 @@ -119,7 +120,7 @@ public class ExpertAdminExpertManageListDTO { /** * 是否浙政钉用户 */ - private Boolean isDingUser; + private String isDingUser; /** * 账号状态 diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/expert/model/dto/ExpertUserFullInfoDTO.java b/hz-pm-api/src/main/java/com/hz/pm/api/expert/model/dto/ExpertUserFullInfoDTO.java index 12921d6..5a7ef4e 100644 --- a/hz-pm-api/src/main/java/com/hz/pm/api/expert/model/dto/ExpertUserFullInfoDTO.java +++ b/hz-pm-api/src/main/java/com/hz/pm/api/expert/model/dto/ExpertUserFullInfoDTO.java @@ -2,6 +2,7 @@ package com.hz.pm.api.expert.model.dto; import lombok.Data; +import java.time.LocalDate; import java.time.LocalDateTime; import java.util.List; @@ -27,7 +28,7 @@ public class ExpertUserFullInfoDTO { /** * 是否浙政钉用户Y/N */ - private Boolean isDingUser; + private String isDingUser; /** * 专家信息提交步骤 @@ -55,7 +56,7 @@ public class ExpertUserFullInfoDTO { /** * 免冠照图片文件地址 */ - private Long avatarFileId; + private String avatarFile; /** * 身份证号码 @@ -70,7 +71,7 @@ public class ExpertUserFullInfoDTO { /** * 出生日期 */ - private LocalDateTime birth; + private LocalDate birthday; /** * 银行卡号 @@ -90,12 +91,12 @@ public class ExpertUserFullInfoDTO { /** * 毕业院校 */ - private String school; + private String schoolMajor; /** * 毕业时间 */ - private LocalDateTime graduatedAt; + private LocalDate graduatedAt; /** * 所学专业 @@ -105,17 +106,12 @@ public class ExpertUserFullInfoDTO { /** * 毕业证 文件id */ - private List graduationCertificateFileIdList; + private String graduationCertFile; /** * 学位证 文件id */ - private List degreeCertificateFileIdList; - - /** - * 退休时间 - */ - private LocalDateTime retiredAt; + private String degreeCertFile; /** * 工作单位 @@ -128,11 +124,6 @@ public class ExpertUserFullInfoDTO { private String companyUniqCode; /** - * 单位法人编号 - */ - private String legalEntityCode; - - /** * 行政职务 */ private String administrativeDuties; @@ -140,7 +131,7 @@ public class ExpertUserFullInfoDTO { /** * 开始工作时间 */ - private LocalDateTime startWorkAt; + private LocalDate startWorkAt; /** * 工作地址 @@ -164,21 +155,6 @@ public class ExpertUserFullInfoDTO { private List titleCertificateFileIdList; /** - * 获奖情况 - */ - private String awards; - - /** - * 表彰奖励 - */ - private String recognitionReward; - - /** - * 推荐证明材料文件id - */ - private List recommendationProofFileIdList; - - /** * 专家层级(区域编码) */ private String regionCode; @@ -202,4 +178,7 @@ public class ExpertUserFullInfoDTO { * 民族 */ private String nationality; + + private String recommendFile; + } 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 e141dd7..d5b3512 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 @@ -47,7 +47,7 @@ public class ExpertLibraryListItemVO { private ExpertRegionInfo expertRegionInfo; @ApiModelProperty(value = "是否浙政钉用户") - private Boolean isDingUser; + private String isDingUser; @ApiModelProperty(value = "专家账号状态", allowableValues = "冻结:freezing,正常:normal") private String expertAccountStatus; diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/expert/service/IExpertUserFullInfoService.java b/hz-pm-api/src/main/java/com/hz/pm/api/expert/service/IExpertUserFullInfoService.java index bb5bf2d..5ad918c 100644 --- a/hz-pm-api/src/main/java/com/hz/pm/api/expert/service/IExpertUserFullInfoService.java +++ b/hz-pm-api/src/main/java/com/hz/pm/api/expert/service/IExpertUserFullInfoService.java @@ -29,15 +29,6 @@ public interface IExpertUserFullInfoService extends IService ExpertUserFullInfo getByUserId(Long userId); /** - * 查询用户信息 - * - * @param userId 用户ID - * @return / - **/ - List listByUserId(List userId); - - - /** * 批量查询专家用户信息 * * @param userIds 用户ID 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 1d0b870..b4d0496 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 @@ -4,12 +4,12 @@ import cn.hutool.core.collection.CollUtil; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.toolkit.CollectionUtils; import com.baomidou.mybatisplus.core.toolkit.Wrappers; +import com.hz.pm.api.expert.entity.ExpertUserFullInfo; 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.entity.ExpertUserFullInfo; 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; @@ -67,8 +67,7 @@ public class ExpertAdminManageServiceImpl implements ExpertAdminManageService { ListExpertQuery listExpertQuery = buildListExpertQuery(req); List userIdList = listExpertUserId(listExpertQuery); - List evidenceHasBeenSubmittedExpertInfoList = iExpertUserFullInfoService.list(Wrappers.lambdaQuery(ExpertUserFullInfo.class) - .eq(ExpertUserFullInfo::getUserInfoStep, ExpertUserInfoStepEnum.EVIDENCE_HAS_BEEN_SUBMITTED.getKey())); + List evidenceHasBeenSubmittedExpertInfoList = iExpertUserFullInfoService.list(); List evidenceHasBeenSubmittedExpertUserIdList = evidenceHasBeenSubmittedExpertInfoList .stream().map(ExpertUserFullInfo::getUserId) .distinct().collect(Collectors.toList()); @@ -102,8 +101,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.buildExpertAdminExpertManageListDTO(expertUserFullInfo, expertDictMap, expertTagMap); + ExpertAdminExpertManageListDTO expertAdminExpertManageListDTO = ExpertUserInfoAssembler.convert(expertUserFullInfo, expertDictMap, expertTagMap); 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 8e58635..725c9ed 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 @@ -7,14 +7,14 @@ import com.alibaba.fastjson.JSONObject; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; import com.baomidou.mybatisplus.core.toolkit.Wrappers; -import com.ningdatech.basic.exception.BizException; -import com.ningdatech.basic.util.CollUtils; import com.hz.pm.api.common.enumeration.BoolDisplayEnum; import com.hz.pm.api.common.model.ExpertRegionModifyDiffBO; import com.hz.pm.api.common.util.ExpertRegionInfoUtils; import com.hz.pm.api.common.util.GzipUtil; import com.hz.pm.api.expert.assembler.ExpertUserInfoAssembler; -import com.hz.pm.api.expert.constant.*; +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.SensitiveModifySegment; @@ -41,6 +41,8 @@ import com.hz.pm.api.user.entity.enumeration.RoleEnum; import com.hz.pm.api.user.security.auth.model.UserInfoDetails; import com.hz.pm.api.user.service.IUserInfoService; import com.hz.pm.api.user.util.LoginUserUtil; +import com.ningdatech.basic.exception.BizException; +import com.ningdatech.basic.util.CollUtils; import com.ningdatech.yxt.utils.JSONUtils; import lombok.RequiredArgsConstructor; import org.apache.commons.collections4.CollectionUtils; @@ -118,8 +120,6 @@ public class ExpertInfoServiceImpl implements ExpertInfoService { iExpertAvoidCompanyService.removeByUserId(userId); } saveExpertUserFullInfo.setUserId(userId); - saveExpertUserFullInfo.setExpertAccountStatus(ExpertAccountStatusEnum.APPLYING.getKey()); - saveExpertUserFullInfo.setUserInfoStep(ExpertUserInfoStepEnum.BASIC_INFORMATION_SUBMITTED.getKey()); saveExpertUserFullInfo.setUpdateOn(LocalDateTime.now()); saveExpertUserFullInfo.setCreateOn(LocalDateTime.now()); iExpertUserFullInfoService.save(saveExpertUserFullInfo); @@ -151,53 +151,34 @@ public class ExpertInfoServiceImpl implements ExpertInfoService { private ExpertUserFullInfo buildSaveExpertUserFullInfo(ExpertUserFullInfoDTO expertUserInfoDTO) { ExpertUserFullInfo expertUserFullInfo = new ExpertUserFullInfo(); if (Objects.nonNull(expertUserInfoDTO.getIsDingUser())) { - expertUserFullInfo.setIsDingUser(expertUserInfoDTO.getIsDingUser() ? BoolDisplayEnum.Y.name() : BoolDisplayEnum.N.name()); + expertUserFullInfo.setIsDingUser(expertUserInfoDTO.getIsDingUser()); } expertUserFullInfo.setPhoneNo(expertUserInfoDTO.getPhoneNo()); expertUserFullInfo.setGender(expertUserInfoDTO.getGender()); expertUserFullInfo.setExpertName(expertUserInfoDTO.getName()); - expertUserFullInfo.setAvatarFileId(expertUserInfoDTO.getAvatarFileId()); expertUserFullInfo.setIdCard(expertUserInfoDTO.getIdCard()); expertUserFullInfo.setOfficePhone(expertUserInfoDTO.getOfficePhone()); - expertUserFullInfo.setBirth(expertUserInfoDTO.getBirth()); + expertUserFullInfo.setBirthday(expertUserInfoDTO.getBirthday()); expertUserFullInfo.setBankNo(expertUserInfoDTO.getBankNo()); expertUserFullInfo.setBank(expertUserInfoDTO.getBank()); expertUserFullInfo.setEmail(expertUserInfoDTO.getEmail()); expertUserFullInfo.setHometown(expertUserInfoDTO.getHometown()); expertUserFullInfo.setNationality(expertUserInfoDTO.getNationality()); - expertUserFullInfo.setSchool(expertUserInfoDTO.getSchool()); + expertUserFullInfo.setSchoolMajor(expertUserInfoDTO.getSchoolMajor()); expertUserFullInfo.setGraduatedAt(expertUserInfoDTO.getGraduatedAt()); expertUserFullInfo.setAcademicTitle(expertUserInfoDTO.getAcademicTitle()); - if (CollectionUtils.isNotEmpty(expertUserInfoDTO.getGraduationCertificateFileIdList())) { - expertUserFullInfo.setGraduationCertificateFileIdList(JSONObject.toJSONString(expertUserInfoDTO.getGraduationCertificateFileIdList())); - } - if (CollectionUtils.isNotEmpty(expertUserInfoDTO.getDegreeCertificateFileIdList())) { - expertUserFullInfo.setDegreeCertificateFileIdList(JSONObject.toJSONString(expertUserInfoDTO.getDegreeCertificateFileIdList())); - } - expertUserFullInfo.setRetiredAt(expertUserInfoDTO.getRetiredAt()); expertUserFullInfo.setCompany(expertUserInfoDTO.getCompany()); expertUserFullInfo.setCompanyUniqCode(expertUserInfoDTO.getCompanyUniqCode()); - expertUserFullInfo.setLegalEntityCode(expertUserInfoDTO.getLegalEntityCode()); - expertUserFullInfo.setAdministrativeDuties(expertUserInfoDTO.getAdministrativeDuties()); expertUserFullInfo.setStartWorkAt(expertUserInfoDTO.getStartWorkAt()); expertUserFullInfo.setAddress(expertUserInfoDTO.getAddress()); expertUserFullInfo.setExperience(expertUserInfoDTO.getExperience()); - expertUserFullInfo.setTechnicalTitles(expertUserInfoDTO.getTechnicalTitles()); - if (CollectionUtils.isNotEmpty(expertUserInfoDTO.getTitleCertificateFileIdList())) { - expertUserFullInfo.setTitleCertificateFileIdList(JSONObject.toJSONString(expertUserInfoDTO.getTitleCertificateFileIdList())); - } - expertUserFullInfo.setAwards(expertUserInfoDTO.getAwards()); - expertUserFullInfo.setRecognitionReward(expertUserInfoDTO.getRecognitionReward()); + expertUserFullInfo.setAcademicTitle(expertUserInfoDTO.getAcademicTitle()); expertUserFullInfo.setRegionCode(expertUserInfoDTO.getRegionCode()); expertUserFullInfo.setRegionLevel(expertUserInfoDTO.getRegionLevel()); - if (CollectionUtils.isNotEmpty(expertUserInfoDTO.getRecommendationProofFileIdList())) { - expertUserFullInfo.setRecommendationProofFileIdList(JSONObject.toJSONString(expertUserInfoDTO.getRecommendationProofFileIdList())); - } - expertUserFullInfo.setRemark(expertUserInfoDTO.getRemark()); expertUserFullInfo.setCompanyUniqCode(expertUserFullInfo.getCompanyUniqCode()); return expertUserFullInfo; } @@ -255,9 +236,7 @@ public class ExpertInfoServiceImpl implements ExpertInfoService { // 保存专家证明材料 Long userId = cmd.getUserId(); ExpertUserFullInfo expertUserFullInfo = iExpertUserFullInfoService.getByUserId(userId); - expertUserFullInfo.setRecommendationProofFileIdList(JSONObject.toJSONString(cmd.getRecommendationProofFileIdList())); expertUserFullInfo.setUpdateOn(LocalDateTime.now()); - expertUserFullInfo.setUserInfoStep(ExpertUserInfoStepEnum.EVIDENCE_HAS_BEEN_SUBMITTED.getKey()); iExpertUserFullInfoService.saveOrUpdate(expertUserFullInfo); List recommendedWayList = cmd.getRecommendedWay(); @@ -317,7 +296,7 @@ public class ExpertInfoServiceImpl implements ExpertInfoService { List businessStrips = expertGovBusinessStripService.listByUserIds(Collections.singletonList(userId)); - return ExpertUserInfoAssembler.buildExpertFullInfoAllDTO(expertUserFullInfo, expertTagList, expertDictionaryList + return ExpertUserInfoAssembler.convert(expertUserFullInfo, expertTagList, expertDictionaryList , expertIntentionWorkRegionList, expertMetaApplyList, expertAvoidCompanyList, businessStrips); } @@ -399,8 +378,6 @@ public class ExpertInfoServiceImpl implements ExpertInfoService { String content; if (cmd.getApplyResult()) { // 修改专家状态为可用 - expertInfo.setExpertAccountStatus(ExpertAccountStatusEnum.AVAILABLE.getKey()); - expertInfo.setRemark(cmd.getRemark()); expertInfo.setRegionCode(cmd.getJoinRegionCode()); expertInfo.setRegionLevel(cmd.getJoinRegionLevel()); // 账号启用 @@ -432,7 +409,6 @@ public class ExpertInfoServiceImpl implements ExpertInfoService { } content = String.format(EXPERT_AUDIT_PASS, expertInfo.getExpertName(), loginUrl, userDetail.getRealName(), userDetail.getMobile()); } else { - expertInfo.setUserInfoStep(ExpertUserInfoStepEnum.INFORMATION_TO_BE_SUBMITTED.getKey()); content = String.format(EXPERT_AUDIT_FAIL, expertInfo.getExpertName(), userDetail.getRealName(), userDetail.getMobile()); } iExpertUserFullInfoService.saveOrUpdate(expertInfo); @@ -473,7 +449,7 @@ public class ExpertInfoServiceImpl implements ExpertInfoService { List expertAvoidCompanyList = iExpertAvoidCompanyService.list(Wrappers.lambdaQuery(ExpertAvoidCompany.class) .in(ExpertAvoidCompany::getUserId, userIds)); Map> avoidInfoMap = CollUtils.group(expertAvoidCompanyList, ExpertAvoidCompany::getUserId); - return expertUserFullInfos.stream().map(w -> ExpertUserInfoAssembler.buildExpertFullInfoAllDTO(w, + return expertUserFullInfos.stream().map(w -> ExpertUserInfoAssembler.convert(w, expertTagListMap.getOrDefault(w.getUserId(), Collections.emptyList()), expertDictMap.getOrDefault(w.getUserId(), Collections.emptyList()), intentionRegionMap.getOrDefault(w.getUserId(), Collections.emptyList()), @@ -508,21 +484,16 @@ public class ExpertInfoServiceImpl implements ExpertInfoService { if (CollUtil.isNotEmpty(expertTagList)) { // 删除专家来源标签 重新存入 iExpertTagService.remove(Wrappers.lambdaQuery(ExpertTag.class) - .eq(ExpertTag::getUserId, userId) -// .eq(ExpertTag::getExpertInfoField, ExpertTagEnum.EXPERT_SOURCE.getKey()) - ); + .eq(ExpertTag::getUserId, userId)); List saveExpertTagList = buildSaveExpertTagList(userId, expertTagList); - saveExpertTagList = saveExpertTagList.stream() -// .filter(r -> ExpertTagEnum.EXPERT_SOURCE.getKey().equals(r.getExpertInfoField())) - .collect(Collectors.toList()); + saveExpertTagList = new ArrayList<>(saveExpertTagList); if (CollUtil.isNotEmpty(saveExpertTagList)) { iExpertTagService.saveBatch(saveExpertTagList); } } } - saveExpertUserFullInfo.setRecommendationProofFileIdList(JSONObject.toJSONString(expertUserInfoDTO.getRecommendationProofFileIdList())); saveExpertUserFullInfo.setUserId(userId); // 专家提交修改,以下字段需要审批后才能更新 saveExpertUserFullInfo.setPhoneNo(null); @@ -531,7 +502,6 @@ public class ExpertInfoServiceImpl implements ExpertInfoService { saveExpertUserFullInfo.setRegionCode(null); saveExpertUserFullInfo.setCompany(null); saveExpertUserFullInfo.setCompanyUniqCode(null); - saveExpertUserFullInfo.setLegalEntityCode(null); iExpertUserFullInfoService.saveOrUpdate(saveExpertUserFullInfo); // 保存所有专家字典字段 @@ -824,7 +794,6 @@ public class ExpertInfoServiceImpl implements ExpertInfoService { originalInfo.setCompanyUniqCode(segmentApplyValue); break; case legal_entity_code: - originalInfo.setLegalEntityCode(segmentApplyValue); break; default: break; diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/expert/service/impl/ExpertUserFullInfoServiceImpl.java b/hz-pm-api/src/main/java/com/hz/pm/api/expert/service/impl/ExpertUserFullInfoServiceImpl.java index ce11e53..7bf5e48 100644 --- a/hz-pm-api/src/main/java/com/hz/pm/api/expert/service/impl/ExpertUserFullInfoServiceImpl.java +++ b/hz-pm-api/src/main/java/com/hz/pm/api/expert/service/impl/ExpertUserFullInfoServiceImpl.java @@ -3,7 +3,7 @@ package com.hz.pm.api.expert.service.impl; import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.hz.pm.api.expert.entity.ExpertUserFullInfo; -import com.hz.pm.api.expert.mapper.NdExpertUserFullInfoMapper; +import com.hz.pm.api.expert.mapper.ExpertUserFullInfoMapper; import com.hz.pm.api.expert.service.IExpertUserFullInfoService; import org.springframework.stereotype.Service; @@ -18,7 +18,7 @@ import java.util.List; * @since 2023-02-22 */ @Service -public class ExpertUserFullInfoServiceImpl extends ServiceImpl implements IExpertUserFullInfoService { +public class ExpertUserFullInfoServiceImpl extends ServiceImpl implements IExpertUserFullInfoService { @Override public ExpertUserFullInfo getByUserId(Long userId) { @@ -26,11 +26,6 @@ public class ExpertUserFullInfoServiceImpl extends ServiceImpl listByUserId(List userIds) { - return list(Wrappers.lambdaQuery().in(ExpertUserFullInfo::getUserId, userIds)); - } - - @Override public List listByUserIds(List userIds) { return list(Wrappers.lambdaQuery().in(ExpertUserFullInfo::getUserId, userIds)); } diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/meeting/entity/dto/ExpertChooseDTO.java b/hz-pm-api/src/main/java/com/hz/pm/api/meeting/entity/dto/ExpertChooseDTO.java index 2ef4e8f..86acf64 100644 --- a/hz-pm-api/src/main/java/com/hz/pm/api/meeting/entity/dto/ExpertChooseDTO.java +++ b/hz-pm-api/src/main/java/com/hz/pm/api/meeting/entity/dto/ExpertChooseDTO.java @@ -8,7 +8,7 @@ import java.util.List; /** *

- * ExpertChooseDto + * ExpertChooseDTO *

* * @author WendyYang diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/meeting/helper/ExpertInviteHelper.java b/hz-pm-api/src/main/java/com/hz/pm/api/meeting/helper/ExpertInviteHelper.java index b810275..cc6554a 100644 --- a/hz-pm-api/src/main/java/com/hz/pm/api/meeting/helper/ExpertInviteHelper.java +++ b/hz-pm-api/src/main/java/com/hz/pm/api/meeting/helper/ExpertInviteHelper.java @@ -3,8 +3,8 @@ package com.hz.pm.api.meeting.helper; import com.alibaba.fastjson.JSONObject; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.toolkit.Wrappers; -import com.ningdatech.basic.util.CollUtils; import com.hz.pm.api.expert.entity.ExpertUserFullInfo; +import com.ningdatech.basic.util.CollUtils; import com.hz.pm.api.expert.service.IExpertUserFullInfoService; import com.hz.pm.api.meeting.entity.domain.ExpertInviteRule; import com.hz.pm.api.meeting.entity.domain.Meeting; @@ -86,7 +86,7 @@ public class ExpertInviteHelper { if (appointRule == null) { return Collections.emptyMap(); } - List expertInfos = expertUserFullInfoService.listByUserId(appointRule.getExpertIdList()); + List expertInfos = expertUserFullInfoService.listByUserIds(appointRule.getExpertIdList()); return CollUtils.listToMap(expertInfos, ExpertUserFullInfo::getUserId); } diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/meeting/helper/ExpertRandomInviteAlgorithm.java b/hz-pm-api/src/main/java/com/hz/pm/api/meeting/helper/ExpertRandomInviteAlgorithm.java index c35406a..7854d85 100644 --- a/hz-pm-api/src/main/java/com/hz/pm/api/meeting/helper/ExpertRandomInviteAlgorithm.java +++ b/hz-pm-api/src/main/java/com/hz/pm/api/meeting/helper/ExpertRandomInviteAlgorithm.java @@ -1,9 +1,9 @@ package com.hz.pm.api.meeting.helper; import cn.hutool.core.util.RandomUtil; +import com.hz.pm.api.expert.entity.ExpertUserFullInfo; import com.ningdatech.basic.util.CollUtils; import com.hz.pm.api.expert.entity.ExpertGovBusinessStrip; -import com.hz.pm.api.expert.entity.ExpertUserFullInfo; import com.hz.pm.api.meeting.entity.domain.MeetingExpert; import org.apache.commons.collections4.MapUtils; import org.apache.commons.lang3.RandomUtils; diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/meeting/helper/MeetingManageHelper.java b/hz-pm-api/src/main/java/com/hz/pm/api/meeting/helper/MeetingManageHelper.java index 7b07520..4a85922 100644 --- a/hz-pm-api/src/main/java/com/hz/pm/api/meeting/helper/MeetingManageHelper.java +++ b/hz-pm-api/src/main/java/com/hz/pm/api/meeting/helper/MeetingManageHelper.java @@ -206,7 +206,7 @@ public class MeetingManageHelper { * @author WendyYang **/ public List appointExpertCheck(Long meetingId, Integer inviteType, List expertIds) { - List experts = expertUserFullInfoService.listByUserId(expertIds); + List experts = expertUserFullInfoService.listByUserIds(expertIds); AvoidRuleDTO avoidRule; if (ExpertInviteTypeEnum.RANDOM.eq(inviteType)) { avoidRule = getAvoidInfoDto(meetingId); @@ -222,11 +222,6 @@ public class MeetingManageHelper { throw BizException.wrap("请移除已回避的专家"); } } - // 校验专家状态 - ExpertAccountStatusEnum accountStatus = ExpertAccountStatusEnum.of(expert.getExpertAccountStatus()); - if (!accountStatus.equals(ExpertAccountStatusEnum.AVAILABLE)) { - throw BizException.wrap("专家%s不可被抽取", expert.getExpertName()); - } }); Map expertMap = CollUtils.listToMap(experts, ExpertUserFullInfo::getUserId); List meetingExperts = meetingExpertService.listByMeetingId(meetingId); diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/meeting/manage/ExpertExportManage.java b/hz-pm-api/src/main/java/com/hz/pm/api/meeting/manage/ExpertExportManage.java index e067492..cce6d3f 100644 --- a/hz-pm-api/src/main/java/com/hz/pm/api/meeting/manage/ExpertExportManage.java +++ b/hz-pm-api/src/main/java/com/hz/pm/api/meeting/manage/ExpertExportManage.java @@ -4,11 +4,11 @@ import cn.hutool.core.lang.Assert; import cn.hutool.core.lang.UUID; import cn.hutool.core.util.StrUtil; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.hz.pm.api.expert.entity.ExpertUserFullInfo; import com.ningdatech.basic.exception.BizException; import com.ningdatech.basic.util.CollUtils; import com.hz.pm.api.common.model.FreemarkerBatchExportDTO; import com.hz.pm.api.common.util.FreemarkerWordUtil; -import com.hz.pm.api.expert.entity.ExpertUserFullInfo; import com.hz.pm.api.expert.manage.ExpertReviewManage; import com.hz.pm.api.expert.service.IExpertUserFullInfoService; import com.hz.pm.api.meeting.entity.domain.Meeting; @@ -118,7 +118,7 @@ public class ExpertExportManage { // 设置专家信息 List experts = meetingExpertService.listAgreedExperts(meetingId); List expertIds = CollUtils.fieldList(experts, MeetingExpert::getExpertId); - List expertInfos = expertUserInfoService.listByUserId(expertIds); + List expertInfos = expertUserInfoService.listByUserIds(expertIds); Map expertMap = CollUtils.listToMap(expertInfos, ExpertUserFullInfo::getUserId); AtomicInteger integer = new AtomicInteger(0); experts.forEach(w -> { @@ -211,7 +211,7 @@ public class ExpertExportManage { // 设置专家信息 List experts = listExpertsByAgreeOrLeave(meetingId); List expertIds = CollUtils.fieldList(experts, MeetingExpert::getExpertId); - List expertInfos = expertUserInfoService.listByUserId(expertIds); + List expertInfos = expertUserInfoService.listByUserIds(expertIds); Map expertMap = CollUtils.listToMap(expertInfos, ExpertUserFullInfo::getUserId); experts.forEach(w -> { ExpertInfoDTO expert = new ExpertInfoDTO(); @@ -223,7 +223,7 @@ public class ExpertExportManage { ExpertUserFullInfo expertUser = expertMap.get(w.getExpertId()); if (expertUser != null) { expert.setCompany(expertUser.getCompany()); - expert.setJob(expertUser.getAdministrativeDuties()); + expert.setJob(""); } else { expert.setCompany(StrUtil.EMPTY); expert.setJob(StrUtil.EMPTY); @@ -264,7 +264,7 @@ public class ExpertExportManage { // 设置专家信息 List experts = listExpertsByAgreeOrLeave(meetingId); List expertIds = CollUtils.fieldList(experts, MeetingExpert::getExpertId); - List expertInfos = expertUserInfoService.listByUserId(expertIds); + List expertInfos = expertUserInfoService.listByUserIds(expertIds); Map expertMap = CollUtils.listToMap(expertInfos, ExpertUserFullInfo::getUserId); AtomicInteger integer = new AtomicInteger(0); experts.forEach(w -> { diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/meeting/manage/ExpertInviteManage.java b/hz-pm-api/src/main/java/com/hz/pm/api/meeting/manage/ExpertInviteManage.java index 900c5c5..d0e4e37 100644 --- a/hz-pm-api/src/main/java/com/hz/pm/api/meeting/manage/ExpertInviteManage.java +++ b/hz-pm-api/src/main/java/com/hz/pm/api/meeting/manage/ExpertInviteManage.java @@ -4,7 +4,6 @@ import cn.hutool.core.collection.CollUtil; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.hz.pm.api.common.util.BizUtils; -import com.hz.pm.api.expert.constant.ExpertAccountStatusEnum; import com.hz.pm.api.expert.entity.ExpertAvoidCompany; import com.hz.pm.api.expert.entity.ExpertGovBusinessStrip; import com.hz.pm.api.expert.entity.ExpertUserFullInfo; @@ -87,8 +86,7 @@ public class ExpertInviteManage { ExpertUserFullInfo::getCompany, ExpertUserFullInfo::getExpertName, ExpertUserFullInfo::getCompanyUniqCode, - ExpertUserFullInfo::getPhoneNo) - .eq(ExpertUserFullInfo::getExpertAccountStatus, ExpertAccountStatusEnum.AVAILABLE.getKey()); + ExpertUserFullInfo::getPhoneNo); } private void buildAvoidCompanyAndBusinessStrip(LambdaQueryWrapper query, List units, List strips) { diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/scheduler/task/CockpitStatsStatisticsTask.java b/hz-pm-api/src/main/java/com/hz/pm/api/scheduler/task/CockpitStatsStatisticsTask.java index 05f33de..f04423f 100644 --- a/hz-pm-api/src/main/java/com/hz/pm/api/scheduler/task/CockpitStatsStatisticsTask.java +++ b/hz-pm-api/src/main/java/com/hz/pm/api/scheduler/task/CockpitStatsStatisticsTask.java @@ -386,8 +386,7 @@ public class CockpitStatsStatisticsTask { List userIds = intentions.stream().map(ExpertIntentionWorkRegion::getUserId) .collect(Collectors.toList()); experts = expertUserFullInfoService.list(Wrappers.lambdaQuery(ExpertUserFullInfo.class) - .in(ExpertUserFullInfo::getUserId, userIds) - .eq(ExpertUserFullInfo::getExpertAccountStatus,"available")); + .in(ExpertUserFullInfo::getUserId, userIds)); } List goodAt = expertTagService.list(Wrappers.lambdaQuery(ExpertTag.class)); diff --git a/hz-pm-api/src/main/java/com/hz/pm/api/sys/manage/UserGuidanceManage.java b/hz-pm-api/src/main/java/com/hz/pm/api/sys/manage/UserGuidanceManage.java index 6d15526..a69a50f 100644 --- a/hz-pm-api/src/main/java/com/hz/pm/api/sys/manage/UserGuidanceManage.java +++ b/hz-pm-api/src/main/java/com/hz/pm/api/sys/manage/UserGuidanceManage.java @@ -3,13 +3,10 @@ package com.hz.pm.api.sys.manage; import cn.hutool.core.collection.CollUtil; import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.google.common.collect.Lists; +import com.hz.pm.api.expert.entity.ExpertUserFullInfo; import com.ningdatech.basic.function.VUtils; import com.hz.pm.api.common.constant.BizConst; -import com.hz.pm.api.expert.entity.ExpertUserFullInfo; -import com.hz.pm.api.expert.service.ExpertInfoService; import com.hz.pm.api.expert.service.IExpertUserFullInfoService; -import com.hz.pm.api.fiscal.entity.CompanyFiscalCode; -import com.hz.pm.api.fiscal.service.ICompanyFiscalCodeService; import com.hz.pm.api.signature.entity.CompanySignature; import com.hz.pm.api.signature.service.ICompanySignatureService; import com.hz.pm.api.sys.contants.UserGuidanceContant; diff --git a/hz-pm-api/src/test/java/com/hz/pm/api/expert/ExpertTest.java b/hz-pm-api/src/test/java/com/hz/pm/api/expert/ExpertTest.java index 949530f..da4d794 100644 --- a/hz-pm-api/src/test/java/com/hz/pm/api/expert/ExpertTest.java +++ b/hz-pm-api/src/test/java/com/hz/pm/api/expert/ExpertTest.java @@ -4,12 +4,10 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.google.common.collect.Lists; import com.hz.pm.api.AppTests; import com.hz.pm.api.common.constant.RegionConst; -import com.hz.pm.api.dashboard.constant.DashboardConstant; import com.hz.pm.api.expert.entity.ExpertUserFullInfo; import com.hz.pm.api.expert.service.IExpertUserFullInfoService; import com.hz.pm.api.meta.model.entity.ExpertTag; import com.hz.pm.api.meta.service.IExpertTagService; -import org.apache.commons.lang3.StringUtils; import org.junit.Test; import org.springframework.beans.factory.annotation.Autowired; @@ -35,8 +33,7 @@ public class ExpertTest extends AppTests { public void test(){ List lsRegionCodes = RegionConst.LS_ARR; List experts = expertUserFullInfoService.list(Wrappers.lambdaQuery(ExpertUserFullInfo.class) - .in(ExpertUserFullInfo::getRegionCode,lsRegionCodes) - .eq(ExpertUserFullInfo::getExpertAccountStatus,"available")); + .in(ExpertUserFullInfo::getRegionCode,lsRegionCodes)); List goodAt = expertTagService.list(Wrappers.lambdaQuery(ExpertTag.class)); Map> tagMap = goodAt.stream()