Browse Source

项目统计

master
niohe·erbao 1 year ago
parent
commit
85356ca713
2 changed files with 13 additions and 9 deletions
  1. +0
    -5
      pmapi/src/main/java/com/ningdatech/pmapi/dashboard/manage/DashboardExpertManage.java
  2. +13
    -4
      pmapi/src/main/java/com/ningdatech/pmapi/dashboard/manage/DashboardProjectManage.java

+ 0
- 5
pmapi/src/main/java/com/ningdatech/pmapi/dashboard/manage/DashboardExpertManage.java View File

@@ -105,7 +105,6 @@ public class DashboardExpertManage {
assemblerAnalysisChart(degreeCodeMap, ChartTypeEnum.REGION_EXPERT_EDUCATION_CHART); assemblerAnalysisChart(degreeCodeMap, ChartTypeEnum.REGION_EXPERT_EDUCATION_CHART);
analysisChartList.add(regionExpertEducationChartAnalysisChart); analysisChartList.add(regionExpertEducationChartAnalysisChart);



// 区域职称级别分布 // 区域职称级别分布
List<ExpertDictionary> titleLevelExpertDictionaryList = iExpertDictionaryService List<ExpertDictionary> titleLevelExpertDictionaryList = iExpertDictionaryService
.listByUserId(regionDegreeExpertIdList, DictExpertInfoTypeEnum.TITLE_LEVEL); .listByUserId(regionDegreeExpertIdList, DictExpertInfoTypeEnum.TITLE_LEVEL);
@@ -115,10 +114,8 @@ public class DashboardExpertManage {
AnalysisChart regionExpertTitleLevelChartAnalysisChart = AnalysisChart regionExpertTitleLevelChartAnalysisChart =
assemblerAnalysisChart(titleLevelCodeMap, ChartTypeEnum.REGION_EXPERT_TITLE_LEVEL_CHART); assemblerAnalysisChart(titleLevelCodeMap, ChartTypeEnum.REGION_EXPERT_TITLE_LEVEL_CHART);
analysisChartList.add(regionExpertTitleLevelChartAnalysisChart); analysisChartList.add(regionExpertTitleLevelChartAnalysisChart);

} }



// 评审次数 // 评审次数
List<Meeting> normalMeetingList = iMeetingService.list(Wrappers.lambdaQuery(Meeting.class) List<Meeting> normalMeetingList = iMeetingService.list(Wrappers.lambdaQuery(Meeting.class)
.eq(StringUtils.isNotBlank(queryRegionCode), Meeting::getRegionCode, queryRegionCode) .eq(StringUtils.isNotBlank(queryRegionCode), Meeting::getRegionCode, queryRegionCode)
@@ -152,9 +149,7 @@ public class DashboardExpertManage {
starExpertBO.setExpertId(expertId); starExpertBO.setExpertId(expertId);
starExpertBO.setExpertName(expertName); starExpertBO.setExpertName(expertName);
starExpertList.add(starExpertBO); starExpertList.add(starExpertBO);
starExpertList.add(starExpertBO);
} }

starExpertList = starExpertList.stream() starExpertList = starExpertList.stream()
.sorted(Comparator.comparing(StarExpertBO::getAveragePerformanceScore) .sorted(Comparator.comparing(StarExpertBO::getAveragePerformanceScore)
.reversed()).collect(Collectors.toList()); .reversed()).collect(Collectors.toList());


+ 13
- 4
pmapi/src/main/java/com/ningdatech/pmapi/dashboard/manage/DashboardProjectManage.java View File

@@ -69,18 +69,27 @@ public class DashboardProjectManage {
QueryTimeYearBO queryTimeYearBO = getQueryTimeYearBO(queryYearPO.getYear()); QueryTimeYearBO queryTimeYearBO = getQueryTimeYearBO(queryYearPO.getYear());
List<Project> allProjectList = iProjectService.list(Wrappers.lambdaQuery(Project.class) List<Project> allProjectList = iProjectService.list(Wrappers.lambdaQuery(Project.class)
.eq(Project::getNewest, true) .eq(Project::getNewest, true)
.eq(Project::getProjectYear, year)
);
.eq(Project::getProjectYear, year));


// 项目总数 // 项目总数
Integer projectCnt = allProjectList.size(); Integer projectCnt = allProjectList.size();
List<Project> toBeApprovedProjectCnt = allProjectList.stream()

// 待立项项目数
List<Project> toBeApprovedProjectList = allProjectList.stream()
.filter(r -> ProjectStatusEnum.TO_BE_APPROVED.getCode().equals(r.getStatus())) .filter(r -> ProjectStatusEnum.TO_BE_APPROVED.getCode().equals(r.getStatus()))
.collect(Collectors.toList()); .collect(Collectors.toList());
Integer toBeApprovedProjectCnt = toBeApprovedProjectList.size();


// 已立项项目数
Integer approvedProjectCnt = projectCnt - toBeApprovedProjectCnt;




return null;
// 装配返回VO
DashboardProjectSummaryVO dashboardProjectSummaryVO = new DashboardProjectSummaryVO();
dashboardProjectSummaryVO.setProjectCnt(projectCnt);
dashboardProjectSummaryVO.setApprovedProjectCnt(approvedProjectCnt);
dashboardProjectSummaryVO.setToBeApprovedProjectCnt(toBeApprovedProjectCnt);
return dashboardProjectSummaryVO;
} }


public DashboardInvestmentSummaryVO getInvestmentSummary(QueryYearPO queryYearPO) { public DashboardInvestmentSummaryVO getInvestmentSummary(QueryYearPO queryYearPO) {


Loading…
Cancel
Save