From aed75c195c2a7f3844b2bf2442192d56512ccf02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?niohe=C2=B7erbao?= Date: Thu, 3 Aug 2023 17:50:10 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E7=BB=9F=E8=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dashboard/manage/DashboardExpertManage.java | 1 - .../dashboard/manage/DashboardProjectManage.java | 32 ++++++++++++++++++---- .../model/vo/DashboardProjectSummaryVO.java | 1 - 3 files changed, 27 insertions(+), 7 deletions(-) diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/dashboard/manage/DashboardExpertManage.java b/pmapi/src/main/java/com/ningdatech/pmapi/dashboard/manage/DashboardExpertManage.java index 7dd7a08..076088d 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/dashboard/manage/DashboardExpertManage.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/dashboard/manage/DashboardExpertManage.java @@ -132,7 +132,6 @@ public class DashboardExpertManage { assemblerAnalysisChart(meetingTypeMap, ChartTypeEnum.MEETING_TYPE_CNT_CHART); analysisChartList.add(meetingTypeCntChartAnalysisChart); - // 明星专家列表 List starExpertList = new ArrayList<>(); List meetingExpertJudgeList = iMeetingExpertJudgeService.list(); diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/dashboard/manage/DashboardProjectManage.java b/pmapi/src/main/java/com/ningdatech/pmapi/dashboard/manage/DashboardProjectManage.java index b378326..5f440f0 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/dashboard/manage/DashboardProjectManage.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/dashboard/manage/DashboardProjectManage.java @@ -1,10 +1,14 @@ package com.ningdatech.pmapi.dashboard.manage; +import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.ningdatech.pmapi.dashboard.model.basic.QueryTimeYearBO; import com.ningdatech.pmapi.dashboard.model.po.QueryYearPO; import com.ningdatech.pmapi.dashboard.model.vo.DashboardInvestmentSummaryVO; import com.ningdatech.pmapi.dashboard.model.vo.DashboardProjectCntSummaryVO; import com.ningdatech.pmapi.dashboard.model.vo.DashboardProjectSummaryVO; +import com.ningdatech.pmapi.projectlib.enumeration.ProjectStatusEnum; +import com.ningdatech.pmapi.projectlib.model.entity.Project; +import com.ningdatech.pmapi.projectlib.service.IProjectService; import lombok.RequiredArgsConstructor; import org.springframework.stereotype.Component; @@ -13,6 +17,8 @@ import java.time.LocalDateTime; import java.time.LocalTime; import java.time.format.DateTimeFormatter; import java.time.temporal.TemporalAdjusters; +import java.util.List; +import java.util.stream.Collectors; /** * @author liuxinxin @@ -24,7 +30,7 @@ import java.time.temporal.TemporalAdjusters; public class DashboardProjectManage { private static String timeFormat = "%s-01-01 00:00:00"; - + private final IProjectService iProjectService; /** @@ -56,22 +62,38 @@ public class DashboardProjectManage { return queryTimeYearBO; } - public DashboardInvestmentSummaryVO getInvestmentSummary(QueryYearPO queryYearPO) { + + public DashboardProjectSummaryVO getProjectSummary(QueryYearPO queryYearPO) { + // 预算年度 + Integer year = queryYearPO.getYear(); QueryTimeYearBO queryTimeYearBO = getQueryTimeYearBO(queryYearPO.getYear()); + List allProjectList = iProjectService.list(Wrappers.lambdaQuery(Project.class) + .eq(Project::getNewest, true) + .eq(Project::getProjectYear, year) + ); + + // 项目总数 + Integer projectCnt = allProjectList.size(); + List toBeApprovedProjectCnt = allProjectList.stream() + .filter(r -> ProjectStatusEnum.TO_BE_APPROVED.getCode().equals(r.getStatus())) + .collect(Collectors.toList()); + + return null; } - - public DashboardProjectCntSummaryVO getProjectCntSummary(QueryYearPO queryYearPO) { + public DashboardInvestmentSummaryVO getInvestmentSummary(QueryYearPO queryYearPO) { QueryTimeYearBO queryTimeYearBO = getQueryTimeYearBO(queryYearPO.getYear()); return null; } - public DashboardProjectSummaryVO getProjectSummary(QueryYearPO queryYearPO) { + + public DashboardProjectCntSummaryVO getProjectCntSummary(QueryYearPO queryYearPO) { QueryTimeYearBO queryTimeYearBO = getQueryTimeYearBO(queryYearPO.getYear()); return null; } + } diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/dashboard/model/vo/DashboardProjectSummaryVO.java b/pmapi/src/main/java/com/ningdatech/pmapi/dashboard/model/vo/DashboardProjectSummaryVO.java index 2a98f87..95c3dd7 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/dashboard/model/vo/DashboardProjectSummaryVO.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/dashboard/model/vo/DashboardProjectSummaryVO.java @@ -37,5 +37,4 @@ public class DashboardProjectSummaryVO { private Integer approvedProjectCnt; - }