|
|
@@ -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); |
|
|
|