Просмотр исходного кода

项目批复总金额

项目申报总金额
master
niohe·erbao 1 год назад
Родитель
Сommit
32eb0860ab
2 измененных файлов: 39 добавлений и 6 удалений
  1. +29
    -6
      pmapi/src/main/java/com/ningdatech/pmapi/dashboard/manage/DashboardProjectManage.java
  2. +10
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/dashboard/model/vo/DashboardProjectSummaryVO.java

+ 29
- 6
pmapi/src/main/java/com/ningdatech/pmapi/dashboard/manage/DashboardProjectManage.java Просмотреть файл

@@ -1,5 +1,6 @@
package com.ningdatech.pmapi.dashboard.manage;

import com.baomidou.mybatisplus.core.toolkit.StringUtils;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.ningdatech.pmapi.dashboard.model.basic.QueryTimeYearBO;
import com.ningdatech.pmapi.dashboard.model.po.QueryYearPO;
@@ -73,8 +74,11 @@ public class DashboardProjectManage {
public DashboardProjectSummaryVO getProjectSummary(QueryYearPO queryYearPO) {
// 预算年度
Integer year = queryYearPO.getYear();
String regionCode = queryYearPO.getRegionCode();
List<Project> allProjectWithRepeatList = iProjectService.list(Wrappers.lambdaQuery(Project.class)
.eq(Project::getProjectYear, year));
.eq(Objects.nonNull(year), Project::getProjectYear, year)
.eq(StringUtils.isNotBlank(regionCode), Project::getAreaCode, regionCode)
);
List<Project> allProjectList = allProjectWithRepeatList.stream()
.filter(r -> r.getNewest()).collect(Collectors.toList());

@@ -92,14 +96,30 @@ public class DashboardProjectManage {
// 已立项项目数
Integer approvedProjectCnt = projectCnt - toBeApprovedProjectCnt;

// 项目立项率
Double projectApprovalRate = new BigDecimal((float) approvedProjectCnt / projectCnt).setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue();

// 项目申报总金额
List<BigDecimal> declareAmountList = allProjectList.stream().filter(r -> Objects.nonNull(r.getDeclareAmount()))
.map(Project::getDeclareAmount).
collect(Collectors.toList());
BigDecimal declareAmountSum = new BigDecimal("0");
for (BigDecimal declareAmount : declareAmountList) {
declareAmountSum.add(declareAmount);
}

// 项目批复总金额
List<BigDecimal> approvedTotalInvestmentIncreaseList = allProjectList.stream().filter(r -> Objects.nonNull(r.getApprovedTotalInvestmentIncrease()))
.map(Project::getApprovedTotalInvestmentIncrease)
.collect(Collectors.toList());
BigDecimal approvedTotalInvestmentIncreaseSum = new BigDecimal("0");
for (BigDecimal approvedTotalInvestmentIncrease : approvedTotalInvestmentIncreaseList) {
approvedTotalInvestmentIncreaseSum.add(approvedTotalInvestmentIncrease);
}

// 项目画像
// * 项目立项率
// * 项目申报总金额
// * 项目批复总金额
// * 项目采购总金额
// * 资金核定率
// * 延期项目数
// * 延期占比

// 延期项目数 延期占比
List<ProjectDelayApply> projectDelayApplyList = iProjectDelayApplyService
@@ -147,6 +167,9 @@ public class DashboardProjectManage {
dashboardProjectSummaryVO.setProjectCnt(projectCnt);
dashboardProjectSummaryVO.setApprovedProjectCnt(approvedProjectCnt);
dashboardProjectSummaryVO.setToBeApprovedProjectCnt(toBeApprovedProjectCnt);
dashboardProjectSummaryVO.setProjectApprovalRate(projectApprovalRate);
dashboardProjectSummaryVO.setDeclareAmountSum(declareAmountSum);
dashboardProjectSummaryVO.setApprovedTotalInvestmentIncreaseSum(approvedTotalInvestmentIncreaseSum);

dashboardProjectSummaryVO.setDelayProjectCnt(delayProjectCnt);
dashboardProjectSummaryVO.setDelayProportion(delayProportion);


+ 10
- 0
pmapi/src/main/java/com/ningdatech/pmapi/dashboard/model/vo/DashboardProjectSummaryVO.java Просмотреть файл

@@ -1,5 +1,6 @@
package com.ningdatech.pmapi.dashboard.model.vo;

import com.ningdatech.pmapi.common.compare.Compare;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@@ -31,6 +32,15 @@ public class DashboardProjectSummaryVO {
@ApiModelProperty("已立项项目数")
private Integer approvedProjectCnt;

@ApiModelProperty("项目立项率")
private Double projectApprovalRate;

@ApiModelProperty("项目申报总金额")
private BigDecimal declareAmountSum;

@ApiModelProperty("项目批复总金额")
private BigDecimal approvedTotalInvestmentIncreaseSum;

@ApiModelProperty("延期项目数")
private Integer delayProjectCnt;



Загрузка…
Отмена
Сохранить