Browse Source

资金核定率

master
niohe·erbao 1 year ago
parent
commit
bdc320dd20
2 changed files with 30 additions and 4 deletions
  1. +23
    -2
      pmapi/src/main/java/com/ningdatech/pmapi/dashboard/manage/DashboardProjectManage.java
  2. +7
    -2
      pmapi/src/main/java/com/ningdatech/pmapi/dashboard/model/vo/DashboardProjectSummaryVO.java

+ 23
- 2
pmapi/src/main/java/com/ningdatech/pmapi/dashboard/manage/DashboardProjectManage.java View File

@@ -10,6 +10,8 @@ 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.projectdeclared.model.entity.Purchase;
import com.ningdatech.pmapi.projectdeclared.service.IPurchaseService;
import com.ningdatech.pmapi.projectlib.enumeration.ProjectStatusEnum;
import com.ningdatech.pmapi.projectlib.model.entity.Project;
import com.ningdatech.pmapi.projectlib.model.entity.ProjectDelayApply;
@@ -34,10 +36,10 @@ import java.util.stream.Collectors;
@RequiredArgsConstructor
public class DashboardProjectManage {

private static String timeFormat = "%s-01-01 00:00:00";
private final IProjectService iProjectService;
private final INdProjectDelayApplyService iProjectDelayApplyService;
private final DashboardHelper dashboardHelper;
private final IPurchaseService iPurchaseService;

public DashboardProjectSummaryVO getProjectSummary(QueryYearPO queryYearPO) {
// 预算年度
@@ -85,8 +87,25 @@ public class DashboardProjectManage {
approvedTotalInvestmentIncreaseSum.add(approvedTotalInvestmentIncrease);
}

// 资金核定率
BigDecimal fundApprovalRate = new BigDecimal("0");
if (new BigDecimal("0").compareTo(approvedTotalInvestmentIncreaseSum) != 0) {
fundApprovalRate = declareAmountSum.divide(approvedTotalInvestmentIncreaseSum, 2, BigDecimal.ROUND_HALF_UP);
}


// 项目采购总金额
BigDecimal projectProcurementTotalAmount = new BigDecimal("0");
List<Purchase> purchaseList = iPurchaseService.list(Wrappers.lambdaQuery(Purchase.class)
.in(Purchase::getProjectId, allProjectIdWithRepeatList));
for (Purchase purchase : purchaseList) {
BigDecimal transactionAmount = purchase.getTransactionAmount();
if (Objects.nonNull(transactionAmount)) {
projectProcurementTotalAmount.add(transactionAmount);
}
}

// 项目画像
// * 项目采购总金额
// * 资金核定率

// 延期项目数 延期占比
@@ -142,6 +161,7 @@ public class DashboardProjectManage {
dashboardProjectSummaryVO.setDelayProportion(delayProportion);
dashboardProjectSummaryVO.setChangedProjectCnt(changedProjectCnt);
dashboardProjectSummaryVO.setChangedProjectContractAmountSum(changedProjectContractAmountSum);
dashboardProjectSummaryVO.setFundApprovalRate(fundApprovalRate);
return dashboardProjectSummaryVO;
}

@@ -226,6 +246,7 @@ public class DashboardProjectManage {
, ChartTypeEnum.PROJECTS_INVESTMENT_SITUATION_IN_VARIOUS_REGIONS);

DashboardInvestmentSummaryVO dashboardInvestmentSummaryVO = new DashboardInvestmentSummaryVO();

List<AnalysisChart> analysisChartList = new ArrayList<>();
dashboardInvestmentSummaryVO.setAnalysisChartList(analysisChartList);
analysisChartList.add(areaCodeInvestmentAnalysisChart);


+ 7
- 2
pmapi/src/main/java/com/ningdatech/pmapi/dashboard/model/vo/DashboardProjectSummaryVO.java View File

@@ -1,6 +1,5 @@
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;
@@ -16,7 +15,6 @@ import java.math.BigDecimal;
public class DashboardProjectSummaryVO {
/**
* 项目画像
* 项目采购总金额
* 资金核定率
*/

@@ -50,5 +48,12 @@ public class DashboardProjectSummaryVO {
@ApiModelProperty("项目变更金额")
private BigDecimal changedProjectContractAmountSum;

@ApiModelProperty("项目采购总金额")
private BigDecimal projectProcurementTotalAmount;

// 批复总金额/申报总金额
@ApiModelProperty("资金核定率")
private BigDecimal fundApprovalRate;


}

Loading…
Cancel
Save