|
|
@@ -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<Project> allProjectList = iProjectService.list(Wrappers.lambdaQuery(Project.class) |
|
|
|
.eq(Project::getNewest, true) |
|
|
|
.eq(Project::getProjectYear, year) |
|
|
|
); |
|
|
|
|
|
|
|
// 项目总数 |
|
|
|
Integer projectCnt = allProjectList.size(); |
|
|
|
List<Project> 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; |
|
|
|
} |
|
|
|
|
|
|
|
} |