|
|
@@ -4,6 +4,7 @@ import cn.hutool.core.collection.CollectionUtil; |
|
|
|
import com.baomidou.mybatisplus.core.toolkit.StringUtils; |
|
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
|
|
|
import com.ningdatech.pmapi.dashboard.constant.ChartTypeEnum; |
|
|
|
import com.ningdatech.pmapi.dashboard.helper.DashboardChartAssembler; |
|
|
|
import com.ningdatech.pmapi.dashboard.helper.DashboardHelper; |
|
|
|
import com.ningdatech.pmapi.dashboard.model.basic.AnalysisChart; |
|
|
|
import com.ningdatech.pmapi.dashboard.model.basic.AnalysisData; |
|
|
@@ -19,7 +20,6 @@ import com.ningdatech.pmapi.meeting.entity.enumeration.MeetingStatusEnum; |
|
|
|
import com.ningdatech.pmapi.meeting.service.IMeetingExpertJudgeService; |
|
|
|
import com.ningdatech.pmapi.meeting.service.IMeetingService; |
|
|
|
import com.ningdatech.pmapi.meta.constant.DictExpertInfoTypeEnum; |
|
|
|
import com.ningdatech.pmapi.meta.helper.DictionaryCache; |
|
|
|
import com.ningdatech.pmapi.meta.model.entity.ExpertDictionary; |
|
|
|
import com.ningdatech.pmapi.meta.service.IExpertDictionaryService; |
|
|
|
import lombok.RequiredArgsConstructor; |
|
|
@@ -41,9 +41,10 @@ public class DashboardExpertManage { |
|
|
|
private final DashboardHelper dashboardHelper; |
|
|
|
private final IExpertUserFullInfoService iExpertUserFullInfoService; |
|
|
|
private final IMeetingService iMeetingService; |
|
|
|
private final DictionaryCache dictionaryCache; |
|
|
|
// private final DictionaryCache dictionaryCache; |
|
|
|
private final IMeetingExpertJudgeService iMeetingExpertJudgeService; |
|
|
|
private final IExpertDictionaryService iExpertDictionaryService; |
|
|
|
private final DashboardChartAssembler dashboardChartAssembler; |
|
|
|
|
|
|
|
|
|
|
|
public ExpertDashboardSummaryVO getExpertDashboardSummary(QueryYearPO queryYearPO) { |
|
|
@@ -102,17 +103,16 @@ public class DashboardExpertManage { |
|
|
|
.map(ExpertDictionary::getDictionaryCode) |
|
|
|
.collect(Collectors.groupingBy(Function.identity())); |
|
|
|
AnalysisChart regionExpertEducationChartAnalysisChart = |
|
|
|
assemblerAnalysisChart(degreeCodeMap, ChartTypeEnum.REGION_EXPERT_EDUCATION_CHART); |
|
|
|
dashboardChartAssembler.assemblerAnalysisChart(degreeCodeMap, ChartTypeEnum.REGION_EXPERT_EDUCATION_CHART); |
|
|
|
analysisChartList.add(regionExpertEducationChartAnalysisChart); |
|
|
|
|
|
|
|
// 区域职称级别分布 |
|
|
|
List<ExpertDictionary> titleLevelExpertDictionaryList = iExpertDictionaryService |
|
|
|
.listByUserId(regionDegreeExpertIdList, DictExpertInfoTypeEnum.TITLE_LEVEL); |
|
|
|
Map<String, List<String>> titleLevelCodeMap = titleLevelExpertDictionaryList.stream() |
|
|
|
.map(ExpertDictionary::getDictionaryCode) |
|
|
|
.collect(Collectors.groupingBy(Function.identity())); |
|
|
|
Map<String, List<ExpertDictionary>> titleLevelCodeMap = titleLevelExpertDictionaryList.stream() |
|
|
|
.collect(Collectors.groupingBy(ExpertDictionary::getDictionaryCode)); |
|
|
|
AnalysisChart regionExpertTitleLevelChartAnalysisChart = |
|
|
|
assemblerAnalysisChart(titleLevelCodeMap, ChartTypeEnum.REGION_EXPERT_TITLE_LEVEL_CHART); |
|
|
|
dashboardChartAssembler.assemblerAnalysisChart(titleLevelCodeMap, ChartTypeEnum.REGION_EXPERT_TITLE_LEVEL_CHART); |
|
|
|
analysisChartList.add(regionExpertTitleLevelChartAnalysisChart); |
|
|
|
} |
|
|
|
|
|
|
@@ -123,10 +123,9 @@ public class DashboardExpertManage { |
|
|
|
Integer meetingCnt = normalMeetingList.size(); |
|
|
|
|
|
|
|
// 各类型评审次数 |
|
|
|
Map<String, List<String>> meetingTypeMap = normalMeetingList.stream().map(Meeting::getType) |
|
|
|
.collect(Collectors.groupingBy(Function.identity())); |
|
|
|
Map<String, List<Meeting>> meetingTypeMap = normalMeetingList.stream().collect(Collectors.groupingBy(Meeting::getType)); |
|
|
|
AnalysisChart meetingTypeCntChartAnalysisChart = |
|
|
|
assemblerAnalysisChart(meetingTypeMap, ChartTypeEnum.MEETING_TYPE_CNT_CHART); |
|
|
|
dashboardChartAssembler.assemblerAnalysisChart(meetingTypeMap, ChartTypeEnum.MEETING_TYPE_CNT_CHART); |
|
|
|
analysisChartList.add(meetingTypeCntChartAnalysisChart); |
|
|
|
|
|
|
|
// 明星专家列表 |
|
|
@@ -165,21 +164,5 @@ public class DashboardExpertManage { |
|
|
|
return expertDashboardSummaryVO; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private AnalysisChart assemblerAnalysisChart(Map<String, List<String>> dictionaryCodeIdMap |
|
|
|
, ChartTypeEnum chartTypeEnum) { |
|
|
|
AnalysisChart analysisChart = new AnalysisChart(); |
|
|
|
List<AnalysisData> dataList = new ArrayList<>(); |
|
|
|
analysisChart.setChartType(chartTypeEnum); |
|
|
|
analysisChart.setDataList(dataList); |
|
|
|
|
|
|
|
for (String dictionaryCode : dictionaryCodeIdMap.keySet()) { |
|
|
|
AnalysisData analysisData = new AnalysisData(); |
|
|
|
analysisData.setKey(dictionaryCache.getByCode(dictionaryCode).getName()); |
|
|
|
analysisData.setValue(dictionaryCodeIdMap.get(dictionaryCode).size()); |
|
|
|
dataList.add(analysisData); |
|
|
|
} |
|
|
|
return analysisChart; |
|
|
|
} |
|
|
|
} |
|
|
|
|