@@ -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); | |||
@@ -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); | |||
} | |||
} |
@@ -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<AnalysisChart> analysisChartList = new ArrayList<>(); | |||
// 获取丽水区域 code name Map | |||
Map<String, String> liShuiRegionCodeNameMap = dashboardHelper.getLiShuiRegionCodeNameMap(); | |||
// 获取库内所有的专家列表 | |||
List<ExpertUserFullInfo> evidenceHasBeenSubmittedExpertInfoList = iExpertUserFullInfoService.list(Wrappers.lambdaQuery(ExpertUserFullInfo.class) | |||
.eq(ExpertUserFullInfo::getUserInfoStep, ExpertUserInfoStepEnum.EVIDENCE_HAS_BEEN_SUBMITTED.getKey())); | |||
List<ExpertUserFullInfo> evidenceHasBeenSubmittedExpertInfoList = iExpertUserFullInfoService.list(); | |||
// 专家regionCode分组map列表 | |||
Map<String, List<ExpertUserFullInfo>> 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<ExpertUserFullInfo> 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<MeetingExpertJudge> 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); | |||
@@ -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<ExpertUserFullInfo> 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<ExpertIntentionWorkRegion> intentionWorkRegions = expertIntentionWorkRegionService.list(); | |||
List<ExpertTag> expertTags = expertTagService.list(); | |||
List<TagDTO> tags = metaTagService.queryAll(); | |||
List<DictDTO> dictionaries = metaDictionaryService.queryAll(); | |||
Set<String> code = Sets.newHashSet(); | |||
Map<String, String> dictionMap = dictionaries.stream().filter(d -> code.add(d.getDictionaryCode())) | |||
.collect(Collectors.toMap(DictDTO::getDictionaryCode, DictDTO::getName)); | |||
List<ExpertDictionary> 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<ExpertUserFullInfo> experts) { | |||
List<ExpertUserFullInfo> 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<ExpertUserFullInfo> experts) { | |||
List<DataDTO> 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<ExpertUserFullInfo> experts, List<ExpertIntentionWorkRegion> intentionWorkRegions, | |||
List<ExpertTag> expertTags, List<TagDTO> tags, List<ExpertDictionary> expertDictionaries, | |||
Map<String, String> dictionMap) { | |||
res.setTotal(experts.size()); | |||
Set<Long> userSet = Sets.newHashSet(); | |||
Map<Long, ExpertUserFullInfo> expertMap = experts.stream().filter(e -> userSet.add(e.getUserId())) | |||
.collect(Collectors.toMap(ExpertUserFullInfo::getUserId, e -> e)); | |||
List<RegionDTO> 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<ExpertUserFullInfo> experts, | |||
List<ExpertDictionary> expertDictionaries, Map<String, String> dictionMap) { | |||
List<DataDTO> levels = Lists.newArrayList(); | |||
Set<Long> userSets = Sets.newHashSet(); | |||
Map<Long, ExpertUserFullInfo> expertUserFullInfoMap = experts.stream() | |||
.filter(u -> userSets.add(u.getUserId())) | |||
.collect(Collectors.toMap(ExpertUserFullInfo::getUserId, e -> e)); | |||
Map<String, List<ExpertDictionary>> dictionaryMap = expertDictionaries.stream() | |||
.collect(Collectors.groupingBy(ExpertDictionary::getDictionaryCode)); | |||
for (String levelCode : LEVELS) { | |||
int num = 0; | |||
if (dictionaryMap.containsKey(levelCode)) { | |||
List<ExpertDictionary> 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<ExpertUserFullInfo> experts, | |||
List<ExpertDictionary> expertDictionaries, Map<String, String> dictionMap) { | |||
List<DataDTO> types = Lists.newArrayList(); | |||
Set<Long> userSets = Sets.newHashSet(); | |||
Map<Long, ExpertUserFullInfo> expertUserFullInfoMap = experts.stream() | |||
.filter(u -> userSets.add(u.getUserId())) | |||
.collect(Collectors.toMap(ExpertUserFullInfo::getUserId, e -> e)); | |||
Map<String, List<ExpertDictionary>> dictionaryMap = expertDictionaries.stream() | |||
.collect(Collectors.groupingBy(ExpertDictionary::getDictionaryCode)); | |||
for (String typeCode : TYPES) { | |||
int num = 0; | |||
if (dictionaryMap.containsKey(typeCode)) { | |||
List<ExpertDictionary> 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<ExpertUserFullInfo> experts, | |||
List<ExpertTag> expertTags, List<TagDTO> tags) { | |||
Set<Long> userSets = Sets.newHashSet(); | |||
Map<Long, ExpertUserFullInfo> expertUserFullInfoMap = experts.stream() | |||
.filter(u -> userSets.add(u.getUserId())) | |||
.collect(Collectors.toMap(ExpertUserFullInfo::getUserId, e -> e)); | |||
Map<String, List<DataDTO>> typeDistribution = Maps.newHashMap(); | |||
Map<String, List<ExpertTag>> tagsMap = | |||
expertTags.stream().filter(e -> Objects.nonNull(e.getTagCode())) | |||
.collect(Collectors.groupingBy(ExpertTag::getTagCode)); | |||
Set<String> tagSets = Sets.newHashSet(); | |||
Map<String, String> tagNameMap = tags.stream().filter(t -> tagSets.add(t.getTagCode())) | |||
.collect(Collectors.toMap(TagDTO::getTagCode, TagDTO::getTagName)); | |||
//1.省维度 | |||
List<DataDTO> shengWeidu = Lists.newArrayList(); | |||
for (String code : SHENGWEIDU) { | |||
shengWeidu.add(getExpertData(expertUserFullInfoMap, | |||
tagsMap, tagNameMap, code)); | |||
} | |||
//2.市维度 | |||
List<DataDTO> 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<Long, ExpertUserFullInfo> expertUserFullInfoMap, Map<String, List<ExpertTag>> tagsMap, Map<String, String> tagNameMap, String code) { | |||
int num = 0; | |||
if (tagsMap.containsKey(code)) { | |||
List<ExpertTag> 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<ExpertIntentionWorkRegion> intentionWorkRegions, Map<Long, ExpertUserFullInfo> expertMap, List<RegionDTO> regions) { | |||
List<DataDTO> 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); | |||
} | |||
} |
@@ -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<FileBasicInfo> recommendationProofFile = recommendInfo.getRecommendationProofFile(); | |||
if (CollectionUtils.isNotEmpty(recommendationProofFile)) { | |||
expertFullInfo.setRecommendationProofFileIdList(CollUtils.fieldList(recommendationProofFile, FileBasicInfo::getFileId)); | |||
} | |||
} | |||
return expertFullInfo; | |||
} | |||
@@ -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<ExpertAvoidCompanyDTO> 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<String, List<DictionaryFieldInfo>> 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<String, List<DictionaryFieldInfo>> dictInfoMap, | |||
Map<Long, FileBasicInfo> fileInfoMap) { | |||
Map<String, List<DictionaryFieldInfo>> 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<Long, FileBasicInfo> fileBasicInfoMap, Long fileId) { | |||
if (Objects.isNull(fileId)) { | |||
return null; | |||
} | |||
return fileBasicInfoMap.get(fileId); | |||
} | |||
public ExpertBasicInfo buildExpertBasicInfo(ExpertUserFullInfoDTO expertUserInfoDTO | |||
public ExpertBasicInfo convert(ExpertUserFullInfoDTO expertUserInfoDTO | |||
, Map<String, List<DictionaryFieldInfo>> dictionaryFieldInfoMap | |||
, Map<String, List<TagFieldInfo>> tagFieldInfoMap | |||
, List<ExpertRegionDTO> expertIntentionWorkRegionInfo | |||
, Map<Long, FileBasicInfo> fileBasicInfoMap) { | |||
, List<ExpertRegionDTO> 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<ExpertTag> expertTagList, | |||
List<ExpertDictionary> expertDictionaryList, | |||
List<ExpertIntentionWorkRegion> intentionWorkRegionList, | |||
List<ExpertMetaApply> expertMetaApplyList, | |||
List<ExpertAvoidCompany> expertAvoidCompanyList, | |||
List<ExpertGovBusinessStrip> businessStrips) { | |||
ExpertUserFullInfoDTO expertFullInfoDto = buildExpertUserFullInfoDTO(expertUserFullInfo); | |||
public static ExpertFullInfoAllDTO convert(ExpertUserFullInfo expertUserFullInfo, | |||
List<ExpertTag> expertTagList, | |||
List<ExpertDictionary> expertDictionaryList, | |||
List<ExpertIntentionWorkRegion> intentionWorkRegionList, | |||
List<ExpertMetaApply> expertMetaApplyList, | |||
List<ExpertAvoidCompany> expertAvoidCompanyList, | |||
List<ExpertGovBusinessStrip> businessStrips) { | |||
ExpertUserFullInfoDTO expertFullInfoDto = convert(expertUserFullInfo); | |||
List<ExpertDictionaryDTO> expertDicts = buildExpertDictionaryDTOList(expertDictionaryList); | |||
List<ExpertTagDTO> expertTags = buildExpertTagDTOList(expertTagList); | |||
List<ExpertRegionDTO> 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<Long, List<ExpertDictionary>> expertDictMap, | |||
Map<Long, List<ExpertTag>> expertTagMap) { | |||
public static ExpertAdminExpertManageListDTO convert(ExpertUserFullInfo expertUserFullInfo, | |||
Map<Long, List<ExpertDictionary>> expertDictMap, | |||
Map<Long, List<ExpertTag>> 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<ExpertDictionary> userExpertDictList = expertDictMap.getOrDefault(userId, Collections.emptyList()); | |||
Map<String, List<ExpertDictionary>> 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( | |||
@@ -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<ExpertUserFullInfo> wrapperQuery, List<RegionContainsBO> containsRegionList) { | |||
for (RegionContainsBO regionContainsBO : containsRegionList) { | |||
List<String> containsRegionCodeList = regionContainsBO.getContainsRegionCodeList(); | |||
Integer parentRegionTreeLevel = regionContainsBO.getParentRegionTreeLevel(); | |||
if (CollectionUtils.isNotEmpty(containsRegionCodeList)) { | |||
wrapperQuery.and(wrapper -> wrapper.in(ExpertUserFullInfo::getRegionCode, containsRegionCodeList) | |||
.ge(ExpertUserFullInfo::getRegionLevel, parentRegionTreeLevel)); | |||
} | |||
} | |||
} | |||
} |
@@ -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; | |||
/** | |||
* <p> | |||
* | |||
* 专家信息 | |||
* </p> | |||
* | |||
* @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; | |||
} |
@@ -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; | |||
/** | |||
* <p> | |||
* | |||
* </p> | |||
* | |||
* @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; | |||
} |
@@ -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<Long> getExpertFileIdList(ExpertFullInfoAllDTO expertUserFullInfoAll) { | |||
ExpertUserFullInfoDTO expertUserInfoDTO = expertUserFullInfoAll.getExpertUserInfoDTO(); | |||
List<Long> 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(); | |||
} | |||
} |
@@ -59,8 +59,8 @@ public class ExpertInfoSensitiveFieldModifyCheckHelper { | |||
// 专家标签字段map | |||
Map<String, List<TagFieldInfo>> 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 | |||
@@ -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<DictionaryFieldInfo> recommendedWay, List<FileBasicInfo> 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<DictionaryFieldInfo> recommendedWay = recommendInfo.getRecommendedWay(); | |||
// 推荐方式 | |||
List<FileBasicInfo> recommendProofFile = recommendInfo.getRecommendationProofFile(); | |||
expertRecommendProofSubmit(recommendedWay, recommendProofFile, userId); | |||
// List<FileBasicInfo> recommendProofFile = recommendInfo.getRecommendationProofFile(); | |||
// expertRecommendProofSubmit(recommendedWay, recommendProofFile, userId); | |||
return userId; | |||
} | |||
@@ -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<Long> fileIdList = CollUtils.fieldList(list, FileBasicInfo::getFileId); | |||
// List<AttachFileVo> attachFiles = fileService.getByIds(fileIdList); | |||
// List<FileBasicInfo> 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); | |||
@@ -11,14 +11,6 @@ | |||
<if test="query.company != null and query.company !='' "> | |||
AND company LIKE CONCAT('%',#{query.company, jdbcType=BIGINT},'%') | |||
</if> | |||
<if test="query.expertAccountStatusList != null and query.expertAccountStatusList.size >0 "> | |||
AND expert_account_status IN | |||
<foreach collection="query.expertAccountStatusList" item="expertAccountStatus" index="index" open="(" | |||
close=")" | |||
separator=","> | |||
#{expertAccountStatus} | |||
</foreach> | |||
</if> | |||
<if test="query.regionCode != null and query.regionCode != '' and query.regionLevel != null and query.regionLevel != '' "> | |||
AND region_code = #{query.regionCode} AND region_level = #{query.regionLevel} | |||
</if> | |||
@@ -1,7 +1,7 @@ | |||
package com.hz.pm.api.expert.mapper; | |||
import com.hz.pm.api.expert.entity.ExpertUserFullInfo; | |||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; | |||
import com.hz.pm.api.expert.entity.ExpertUserFullInfo; | |||
/** | |||
* <p> | |||
@@ -11,6 +11,6 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; | |||
* @author Liuxinxin | |||
* @since 2023-02-22 | |||
*/ | |||
public interface NdExpertUserFullInfoMapper extends BaseMapper<ExpertUserFullInfo> { | |||
public interface ExpertUserFullInfoMapper extends BaseMapper<ExpertUserFullInfo> { | |||
} |
@@ -1,5 +1,5 @@ | |||
<?xml version="1.0" encoding="UTF-8"?> | |||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | |||
<mapper namespace="com.hz.pm.api.expert.mapper.NdExpertUserFullInfoMapper"> | |||
<mapper namespace="com.hz.pm.api.expert.mapper.ExpertUserFullInfoMapper"> | |||
</mapper> |
@@ -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; | |||
/** | |||
* 开户银行 | |||
@@ -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<FileBasicInfo> graduationCertificateFile; | |||
private String graduationCertFile; | |||
/** | |||
* 学位(字典code) | |||
@@ -63,5 +64,5 @@ public class ExpertEduInfo { | |||
* 学位证附件信息 | |||
*/ | |||
@ApiModelProperty("学位证附件信息") | |||
private List<FileBasicInfo> degreeCertificateFile; | |||
private String degreeCertFile; | |||
} |
@@ -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) | |||
@@ -22,5 +22,5 @@ public class ExpertRecommendInfo { | |||
private List<DictionaryFieldInfo> recommendedWay; | |||
@ApiModelProperty("推荐证明材料") | |||
private List<FileBasicInfo> recommendationProofFile; | |||
private String recommendFile; | |||
} |
@@ -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; | |||
/** | |||
* 账号状态 | |||
@@ -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<Long> graduationCertificateFileIdList; | |||
private String graduationCertFile; | |||
/** | |||
* 学位证 文件id | |||
*/ | |||
private List<Long> 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<Long> titleCertificateFileIdList; | |||
/** | |||
* 获奖情况 | |||
*/ | |||
private String awards; | |||
/** | |||
* 表彰奖励 | |||
*/ | |||
private String recognitionReward; | |||
/** | |||
* 推荐证明材料文件id | |||
*/ | |||
private List<Long> recommendationProofFileIdList; | |||
/** | |||
* 专家层级(区域编码) | |||
*/ | |||
private String regionCode; | |||
@@ -202,4 +178,7 @@ public class ExpertUserFullInfoDTO { | |||
* 民族 | |||
*/ | |||
private String nationality; | |||
private String recommendFile; | |||
} |
@@ -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; | |||
@@ -29,15 +29,6 @@ public interface IExpertUserFullInfoService extends IService<ExpertUserFullInfo> | |||
ExpertUserFullInfo getByUserId(Long userId); | |||
/** | |||
* 查询用户信息 | |||
* | |||
* @param userId 用户ID | |||
* @return / | |||
**/ | |||
List<ExpertUserFullInfo> listByUserId(List<Long> userId); | |||
/** | |||
* 批量查询专家用户信息 | |||
* | |||
* @param userIds 用户ID | |||
@@ -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<Long> userIdList = listExpertUserId(listExpertQuery); | |||
List<ExpertUserFullInfo> evidenceHasBeenSubmittedExpertInfoList = iExpertUserFullInfoService.list(Wrappers.lambdaQuery(ExpertUserFullInfo.class) | |||
.eq(ExpertUserFullInfo::getUserInfoStep, ExpertUserInfoStepEnum.EVIDENCE_HAS_BEEN_SUBMITTED.getKey())); | |||
List<ExpertUserFullInfo> evidenceHasBeenSubmittedExpertInfoList = iExpertUserFullInfoService.list(); | |||
List<Long> evidenceHasBeenSubmittedExpertUserIdList = evidenceHasBeenSubmittedExpertInfoList | |||
.stream().map(ExpertUserFullInfo::getUserId) | |||
.distinct().collect(Collectors.toList()); | |||
@@ -102,8 +101,7 @@ public class ExpertAdminManageServiceImpl implements ExpertAdminManageService { | |||
List<ExpertTag> expertTagList = iExpertTagService.list(tagIn); | |||
Map<Long, List<ExpertTag>> 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); | |||
} | |||
} | |||
@@ -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<ExpertDictionaryDTO> recommendedWayList = cmd.getRecommendedWay(); | |||
@@ -317,7 +296,7 @@ public class ExpertInfoServiceImpl implements ExpertInfoService { | |||
List<ExpertGovBusinessStrip> 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<ExpertAvoidCompany> expertAvoidCompanyList = iExpertAvoidCompanyService.list(Wrappers.lambdaQuery(ExpertAvoidCompany.class) | |||
.in(ExpertAvoidCompany::getUserId, userIds)); | |||
Map<Long, List<ExpertAvoidCompany>> 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<ExpertTag> 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; | |||
@@ -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<NdExpertUserFullInfoMapper, ExpertUserFullInfo> implements IExpertUserFullInfoService { | |||
public class ExpertUserFullInfoServiceImpl extends ServiceImpl<ExpertUserFullInfoMapper, ExpertUserFullInfo> implements IExpertUserFullInfoService { | |||
@Override | |||
public ExpertUserFullInfo getByUserId(Long userId) { | |||
@@ -26,11 +26,6 @@ public class ExpertUserFullInfoServiceImpl extends ServiceImpl<NdExpertUserFullI | |||
} | |||
@Override | |||
public List<ExpertUserFullInfo> listByUserId(List<Long> userIds) { | |||
return list(Wrappers.<ExpertUserFullInfo>lambdaQuery().in(ExpertUserFullInfo::getUserId, userIds)); | |||
} | |||
@Override | |||
public List<ExpertUserFullInfo> listByUserIds(List<Long> userIds) { | |||
return list(Wrappers.<ExpertUserFullInfo>lambdaQuery().in(ExpertUserFullInfo::getUserId, userIds)); | |||
} | |||
@@ -8,7 +8,7 @@ import java.util.List; | |||
/** | |||
* <p> | |||
* ExpertChooseDto | |||
* ExpertChooseDTO | |||
* </p> | |||
* | |||
* @author WendyYang | |||
@@ -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<ExpertUserFullInfo> expertInfos = expertUserFullInfoService.listByUserId(appointRule.getExpertIdList()); | |||
List<ExpertUserFullInfo> expertInfos = expertUserFullInfoService.listByUserIds(appointRule.getExpertIdList()); | |||
return CollUtils.listToMap(expertInfos, ExpertUserFullInfo::getUserId); | |||
} | |||
@@ -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; | |||
@@ -206,7 +206,7 @@ public class MeetingManageHelper { | |||
* @author WendyYang | |||
**/ | |||
public List<ExpertUserFullInfo> appointExpertCheck(Long meetingId, Integer inviteType, List<Long> expertIds) { | |||
List<ExpertUserFullInfo> experts = expertUserFullInfoService.listByUserId(expertIds); | |||
List<ExpertUserFullInfo> 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<Long, ExpertUserFullInfo> expertMap = CollUtils.listToMap(experts, ExpertUserFullInfo::getUserId); | |||
List<MeetingExpert> meetingExperts = meetingExpertService.listByMeetingId(meetingId); | |||
@@ -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<MeetingExpert> experts = meetingExpertService.listAgreedExperts(meetingId); | |||
List<Long> expertIds = CollUtils.fieldList(experts, MeetingExpert::getExpertId); | |||
List<ExpertUserFullInfo> expertInfos = expertUserInfoService.listByUserId(expertIds); | |||
List<ExpertUserFullInfo> expertInfos = expertUserInfoService.listByUserIds(expertIds); | |||
Map<Long, ExpertUserFullInfo> expertMap = CollUtils.listToMap(expertInfos, ExpertUserFullInfo::getUserId); | |||
AtomicInteger integer = new AtomicInteger(0); | |||
experts.forEach(w -> { | |||
@@ -211,7 +211,7 @@ public class ExpertExportManage { | |||
// 设置专家信息 | |||
List<MeetingExpert> experts = listExpertsByAgreeOrLeave(meetingId); | |||
List<Long> expertIds = CollUtils.fieldList(experts, MeetingExpert::getExpertId); | |||
List<ExpertUserFullInfo> expertInfos = expertUserInfoService.listByUserId(expertIds); | |||
List<ExpertUserFullInfo> expertInfos = expertUserInfoService.listByUserIds(expertIds); | |||
Map<Long, ExpertUserFullInfo> 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<MeetingExpert> experts = listExpertsByAgreeOrLeave(meetingId); | |||
List<Long> expertIds = CollUtils.fieldList(experts, MeetingExpert::getExpertId); | |||
List<ExpertUserFullInfo> expertInfos = expertUserInfoService.listByUserId(expertIds); | |||
List<ExpertUserFullInfo> expertInfos = expertUserInfoService.listByUserIds(expertIds); | |||
Map<Long, ExpertUserFullInfo> expertMap = CollUtils.listToMap(expertInfos, ExpertUserFullInfo::getUserId); | |||
AtomicInteger integer = new AtomicInteger(0); | |||
experts.forEach(w -> { | |||
@@ -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<ExpertUserFullInfo> query, List<String> units, List<String> strips) { | |||
@@ -386,8 +386,7 @@ public class CockpitStatsStatisticsTask { | |||
List<Long> 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<ExpertTag> goodAt = expertTagService.list(Wrappers.lambdaQuery(ExpertTag.class)); | |||
@@ -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; | |||
@@ -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<String> lsRegionCodes = RegionConst.LS_ARR; | |||
List<ExpertUserFullInfo> experts = expertUserFullInfoService.list(Wrappers.lambdaQuery(ExpertUserFullInfo.class) | |||
.in(ExpertUserFullInfo::getRegionCode,lsRegionCodes) | |||
.eq(ExpertUserFullInfo::getExpertAccountStatus,"available")); | |||
.in(ExpertUserFullInfo::getRegionCode,lsRegionCodes)); | |||
List<ExpertTag> goodAt = expertTagService.list(Wrappers.lambdaQuery(ExpertTag.class)); | |||
Map<Long, List<ExpertTag>> tagMap = goodAt.stream() | |||