|
@@ -156,28 +156,32 @@ public class FundStatisticsManage { |
|
|
FundStatisticsVO.HeJianAmount heJianAmount = new FundStatisticsVO.HeJianAmount(); |
|
|
FundStatisticsVO.HeJianAmount heJianAmount = new FundStatisticsVO.HeJianAmount(); |
|
|
|
|
|
|
|
|
//申报的申报金额(申报项目:初步方案申报金额 项目归集:项目总投资) |
|
|
//申报的申报金额(申报项目:初步方案申报金额 项目归集:项目总投资) |
|
|
BigDecimal declaredAmountApprove = projects.stream().map(p -> { |
|
|
|
|
|
|
|
|
final BigDecimal[] declaredAmountApprove = {BigDecimal.ZERO}; |
|
|
|
|
|
projects.stream().map(p -> { |
|
|
BigDecimal declareAmount = Objects.nonNull(p.getDeclareAmount()) ? |
|
|
BigDecimal declareAmount = Objects.nonNull(p.getDeclareAmount()) ? |
|
|
p.getDeclareAmount() : BigDecimal.ZERO; |
|
|
p.getDeclareAmount() : BigDecimal.ZERO; |
|
|
return declareAmount; |
|
|
return declareAmount; |
|
|
}).reduce(BigDecimal::add).get(); |
|
|
|
|
|
BigDecimal declaredAmountApproveGov = applies.stream().map(g -> { |
|
|
|
|
|
|
|
|
}).reduce(BigDecimal::add).ifPresent(b -> declaredAmountApprove[0] = b); |
|
|
|
|
|
final BigDecimal[] declaredAmountApproveGov = {BigDecimal.ZERO}; |
|
|
|
|
|
applies.stream().map(g -> { |
|
|
BigDecimal totalAmount = Objects.nonNull(g.getBaseProjTotalAmount()) ? g.getBaseProjTotalAmount() : BigDecimal.ZERO; |
|
|
BigDecimal totalAmount = Objects.nonNull(g.getBaseProjTotalAmount()) ? g.getBaseProjTotalAmount() : BigDecimal.ZERO; |
|
|
return totalAmount; |
|
|
return totalAmount; |
|
|
}).reduce(BigDecimal::add).get(); |
|
|
|
|
|
BigDecimal declaredAmountApproveTotal = declaredAmountApprove.add(declaredAmountApproveGov); |
|
|
|
|
|
|
|
|
}).reduce(BigDecimal::add).ifPresent(b -> declaredAmountApproveGov[0] = b); |
|
|
|
|
|
BigDecimal declaredAmountApproveTotal = declaredAmountApprove[0].add(declaredAmountApproveGov[0]); |
|
|
heJianAmount.setApprove(declaredAmountApproveTotal); |
|
|
heJianAmount.setApprove(declaredAmountApproveTotal); |
|
|
|
|
|
|
|
|
//申报的批复金额(申报项目:建设方案申报金额 项目归集:建议总投资) |
|
|
//申报的批复金额(申报项目:建设方案申报金额 项目归集:建议总投资) |
|
|
BigDecimal approvalAmountApprove = projects.stream().map(p -> { |
|
|
|
|
|
|
|
|
final BigDecimal[] approvalAmountApprove = {BigDecimal.ZERO}; |
|
|
|
|
|
projects.stream().map(p -> { |
|
|
BigDecimal declareAmount = Objects.nonNull(p.getApprovalAmount()) ? p.getApprovalAmount() : BigDecimal.ZERO; |
|
|
BigDecimal declareAmount = Objects.nonNull(p.getApprovalAmount()) ? p.getApprovalAmount() : BigDecimal.ZERO; |
|
|
return declareAmount; |
|
|
return declareAmount; |
|
|
}).reduce(BigDecimal::add).get(); |
|
|
|
|
|
BigDecimal approvalAmountApproveGov = approves.stream().map(p -> { |
|
|
|
|
|
|
|
|
}).reduce(BigDecimal::add).ifPresent(b -> approvalAmountApprove[0] = b); |
|
|
|
|
|
final BigDecimal[] approvalAmountApproveGov = {BigDecimal.ZERO}; |
|
|
|
|
|
approves.stream().map(p -> { |
|
|
BigDecimal expertTotalMoney = Objects.nonNull(p.getBaseExpertTotalMoney()) ? p.getBaseExpertTotalMoney() : BigDecimal.ZERO; |
|
|
BigDecimal expertTotalMoney = Objects.nonNull(p.getBaseExpertTotalMoney()) ? p.getBaseExpertTotalMoney() : BigDecimal.ZERO; |
|
|
return expertTotalMoney; |
|
|
return expertTotalMoney; |
|
|
}).reduce(BigDecimal::add).get(); |
|
|
|
|
|
BigDecimal approvalAmountApproveTotal = approvalAmountApprove.add(approvalAmountApproveGov); |
|
|
|
|
|
|
|
|
}).reduce(BigDecimal::add).ifPresent(b -> approvalAmountApproveGov[0] = b); |
|
|
|
|
|
BigDecimal approvalAmountApproveTotal = approvalAmountApprove[0].add(approvalAmountApproveGov[0]); |
|
|
heJianAmount.setApproval(approvalAmountApproveTotal); |
|
|
heJianAmount.setApproval(approvalAmountApproveTotal); |
|
|
//申报的差额 |
|
|
//申报的差额 |
|
|
BigDecimal subtractApprove = declaredAmountApproveTotal.subtract(approvalAmountApproveTotal); |
|
|
BigDecimal subtractApprove = declaredAmountApproveTotal.subtract(approvalAmountApproveTotal); |
|
@@ -191,15 +195,17 @@ public class FundStatisticsManage { |
|
|
FundStatisticsVO.HeJianAmount approvalHejian = new FundStatisticsVO.HeJianAmount(); |
|
|
FundStatisticsVO.HeJianAmount approvalHejian = new FundStatisticsVO.HeJianAmount(); |
|
|
approvalHejian.setApprove(approvalAmountApproveTotal); |
|
|
approvalHejian.setApprove(approvalAmountApproveTotal); |
|
|
//批复的批复金额(申报项目:归集信息建议批复总投资 项目归集:建议批复总投资) |
|
|
//批复的批复金额(申报项目:归集信息建议批复总投资 项目归集:建议批复总投资) |
|
|
BigDecimal approvalAmountApproval = projects.stream().map(p -> { |
|
|
|
|
|
|
|
|
final BigDecimal[] approvalAmountApproval = {BigDecimal.ZERO}; |
|
|
|
|
|
projects.stream().map(p -> { |
|
|
BigDecimal proposeTotalInvest = Objects.nonNull(p.getProposeTotalInvest()) ? p.getProposeTotalInvest() : BigDecimal.ZERO; |
|
|
BigDecimal proposeTotalInvest = Objects.nonNull(p.getProposeTotalInvest()) ? p.getProposeTotalInvest() : BigDecimal.ZERO; |
|
|
return proposeTotalInvest; |
|
|
return proposeTotalInvest; |
|
|
}).reduce(BigDecimal::add).get(); |
|
|
|
|
|
BigDecimal approvalAmountApprovalGov = approves.stream().map(p -> { |
|
|
|
|
|
|
|
|
}).reduce(BigDecimal::add).ifPresent(b -> approvalAmountApproval[0] = b); |
|
|
|
|
|
final BigDecimal[] approvalAmountApprovalGov = {BigDecimal.ZERO}; |
|
|
|
|
|
approves.stream().map(p -> { |
|
|
BigDecimal reviewTotalMoney = Objects.nonNull(p.getBaseInitialReviewTotalMoney()) ? p.getBaseInitialReviewTotalMoney() : BigDecimal.ZERO; |
|
|
BigDecimal reviewTotalMoney = Objects.nonNull(p.getBaseInitialReviewTotalMoney()) ? p.getBaseInitialReviewTotalMoney() : BigDecimal.ZERO; |
|
|
return reviewTotalMoney; |
|
|
return reviewTotalMoney; |
|
|
}).reduce(BigDecimal::add).get(); |
|
|
|
|
|
BigDecimal approvalAmountApprovalTotal = approvalAmountApproval.add(approvalAmountApprovalGov); |
|
|
|
|
|
|
|
|
}).reduce(BigDecimal::add).ifPresent(b -> approvalAmountApprovalGov[0] = b); |
|
|
|
|
|
BigDecimal approvalAmountApprovalTotal = approvalAmountApproval[0].add(approvalAmountApprovalGov[0]); |
|
|
approvalHejian.setApproval(approvalAmountApprovalTotal); |
|
|
approvalHejian.setApproval(approvalAmountApprovalTotal); |
|
|
//批复的差额 |
|
|
//批复的差额 |
|
|
BigDecimal subtractApproval = approvalAmountApproveTotal.subtract(approvalAmountApprovalTotal); |
|
|
BigDecimal subtractApproval = approvalAmountApproveTotal.subtract(approvalAmountApprovalTotal); |
|
@@ -213,16 +219,18 @@ public class FundStatisticsManage { |
|
|
FundStatisticsVO.HeJianAmount contractHejian = new FundStatisticsVO.HeJianAmount(); |
|
|
FundStatisticsVO.HeJianAmount contractHejian = new FundStatisticsVO.HeJianAmount(); |
|
|
contractHejian.setApprove(approvalAmountApprovalTotal); |
|
|
contractHejian.setApprove(approvalAmountApprovalTotal); |
|
|
//合同的批复金额(申报项目:成交金额 项目归集:成交金额) |
|
|
//合同的批复金额(申报项目:成交金额 项目归集:成交金额) |
|
|
BigDecimal approvalAmountContract = projects.stream().map(p -> { |
|
|
|
|
|
|
|
|
final BigDecimal[] approvalAmountContract = {BigDecimal.ZERO}; |
|
|
|
|
|
projects.stream().map(p -> { |
|
|
BigDecimal transactionAmount = Objects.nonNull(p.getTransactionAmount()) ? p.getTransactionAmount() : BigDecimal.ZERO; |
|
|
BigDecimal transactionAmount = Objects.nonNull(p.getTransactionAmount()) ? p.getTransactionAmount() : BigDecimal.ZERO; |
|
|
return transactionAmount; |
|
|
return transactionAmount; |
|
|
}).reduce(BigDecimal::add).get(); |
|
|
|
|
|
BigDecimal approvalAmountContractGov = procures.stream().map(p -> { |
|
|
|
|
|
|
|
|
}).reduce(BigDecimal::add).ifPresent(b -> approvalAmountContract[0] = b); |
|
|
|
|
|
final BigDecimal[] approvalAmountContractGov = {BigDecimal.ZERO}; |
|
|
|
|
|
procures.stream().map(p -> { |
|
|
BigDecimal purchaseAmount = Objects.nonNull(p.getBaseProjPurchaseAmount()) ? |
|
|
BigDecimal purchaseAmount = Objects.nonNull(p.getBaseProjPurchaseAmount()) ? |
|
|
p.getBaseProjPurchaseAmount() : BigDecimal.ZERO; |
|
|
p.getBaseProjPurchaseAmount() : BigDecimal.ZERO; |
|
|
return purchaseAmount; |
|
|
return purchaseAmount; |
|
|
}).reduce(BigDecimal::add).get(); |
|
|
|
|
|
BigDecimal approvalAmountContractTotal = approvalAmountContract.add(approvalAmountContractGov); |
|
|
|
|
|
|
|
|
}).reduce(BigDecimal::add).ifPresent(b -> approvalAmountContractGov[0] = b); |
|
|
|
|
|
BigDecimal approvalAmountContractTotal = approvalAmountContract[0].add(approvalAmountContractGov[0]); |
|
|
contractHejian.setApproval(approvalAmountContractTotal); |
|
|
contractHejian.setApproval(approvalAmountContractTotal); |
|
|
//合同的差额 |
|
|
//合同的差额 |
|
|
BigDecimal subtractContract = approvalAmountApprovalTotal.subtract(approvalAmountContractTotal); |
|
|
BigDecimal subtractContract = approvalAmountApprovalTotal.subtract(approvalAmountContractTotal); |
|
@@ -349,29 +357,35 @@ public class FundStatisticsManage { |
|
|
} |
|
|
} |
|
|
//2 |
|
|
//2 |
|
|
//2.1 总申请金额 |
|
|
//2.1 总申请金额 |
|
|
BigDecimal declaredTotalAmount = projects.stream() |
|
|
|
|
|
|
|
|
final BigDecimal[] declaredTotalAmount = {BigDecimal.ZERO}; |
|
|
|
|
|
projects.stream() |
|
|
.map(p -> Objects.nonNull(p.getDeclareAmount()) ? p.getDeclareAmount() : BigDecimal.ZERO) |
|
|
.map(p -> Objects.nonNull(p.getDeclareAmount()) ? p.getDeclareAmount() : BigDecimal.ZERO) |
|
|
.reduce(BigDecimal::add).get(); |
|
|
|
|
|
BigDecimal declaredTotalAmountGov = applies.stream() |
|
|
|
|
|
|
|
|
.reduce(BigDecimal::add).ifPresent(b -> declaredTotalAmount[0] = b); |
|
|
|
|
|
final BigDecimal[] declaredTotalAmountGov = {BigDecimal.ZERO}; |
|
|
|
|
|
applies.stream() |
|
|
.map(a -> Objects.nonNull(a.getBaseProjTotalAmount()) ? a.getBaseProjTotalAmount() : BigDecimal.ZERO) |
|
|
.map(a -> Objects.nonNull(a.getBaseProjTotalAmount()) ? a.getBaseProjTotalAmount() : BigDecimal.ZERO) |
|
|
.reduce(BigDecimal::add).get(); |
|
|
|
|
|
res.setDeclaredTotalAmount(declaredTotalAmount.add(declaredTotalAmountGov)); |
|
|
|
|
|
|
|
|
.reduce(BigDecimal::add).ifPresent(b -> declaredTotalAmountGov[0] = b); |
|
|
|
|
|
res.setDeclaredTotalAmount(declaredTotalAmount[0].add(declaredTotalAmountGov[0])); |
|
|
//2.2 总批复金额 |
|
|
//2.2 总批复金额 |
|
|
BigDecimal approvalTotalAmount = projects.stream() |
|
|
|
|
|
|
|
|
final BigDecimal[] approvalTotalAmount = {BigDecimal.ZERO}; |
|
|
|
|
|
projects.stream() |
|
|
.map(p -> Objects.nonNull(p.getApprovalAmount()) ? p.getApprovalAmount() : BigDecimal.ZERO) |
|
|
.map(p -> Objects.nonNull(p.getApprovalAmount()) ? p.getApprovalAmount() : BigDecimal.ZERO) |
|
|
.reduce(BigDecimal::add).get(); |
|
|
|
|
|
BigDecimal approvalTotalAmountGov = approves.stream() |
|
|
|
|
|
|
|
|
.reduce(BigDecimal::add).ifPresent(b -> approvalTotalAmount[0] = b); |
|
|
|
|
|
final BigDecimal[] approvalTotalAmountGov = {BigDecimal.ZERO}; |
|
|
|
|
|
approves.stream() |
|
|
.map(a -> Objects.nonNull(a.getBaseExpertTotalMoney()) ? a.getBaseExpertTotalMoney() : BigDecimal.ZERO) |
|
|
.map(a -> Objects.nonNull(a.getBaseExpertTotalMoney()) ? a.getBaseExpertTotalMoney() : BigDecimal.ZERO) |
|
|
.reduce(BigDecimal::add).get(); |
|
|
|
|
|
res.setApprovalTotalAmount(approvalTotalAmount.add(approvalTotalAmountGov)); |
|
|
|
|
|
|
|
|
.reduce(BigDecimal::add).ifPresent(b -> approvalTotalAmountGov[0] = b); |
|
|
|
|
|
res.setApprovalTotalAmount(approvalTotalAmount[0].add(approvalTotalAmountGov[0])); |
|
|
//2.3 总合同金额 |
|
|
//2.3 总合同金额 |
|
|
BigDecimal contractTotalAmount = projects.stream() |
|
|
|
|
|
|
|
|
final BigDecimal[] contractTotalAmount = {BigDecimal.ZERO}; |
|
|
|
|
|
projects.stream() |
|
|
.map(p -> Objects.nonNull(p.getContractAmount()) ? p.getContractAmount() : BigDecimal.ZERO) |
|
|
.map(p -> Objects.nonNull(p.getContractAmount()) ? p.getContractAmount() : BigDecimal.ZERO) |
|
|
.reduce(BigDecimal::add).get(); |
|
|
|
|
|
BigDecimal contractTotalAmountGov = procures.stream() |
|
|
|
|
|
|
|
|
.reduce(BigDecimal::add).ifPresent(b -> contractTotalAmount[0] = b); |
|
|
|
|
|
final BigDecimal[] contractTotalAmountGov = {BigDecimal.ZERO}; |
|
|
|
|
|
procures.stream() |
|
|
.map(p -> Objects.nonNull(p.getBaseProjPurchaseAmount()) ? p.getBaseProjPurchaseAmount() : BigDecimal.ZERO) |
|
|
.map(p -> Objects.nonNull(p.getBaseProjPurchaseAmount()) ? p.getBaseProjPurchaseAmount() : BigDecimal.ZERO) |
|
|
.reduce(BigDecimal::add).get(); |
|
|
|
|
|
res.setApprovalTotalAmount(contractTotalAmount.add(contractTotalAmountGov)); |
|
|
|
|
|
|
|
|
.reduce(BigDecimal::add).ifPresent(b -> contractTotalAmountGov[0] = b); |
|
|
|
|
|
res.setApprovalTotalAmount(contractTotalAmount[0].add(contractTotalAmountGov[0])); |
|
|
|
|
|
|
|
|
//计划核减 |
|
|
//计划核减 |
|
|
FundStatisticsVO.HeJianAmount planHejian = computePlanHeJian(projects,applies,approves); |
|
|
FundStatisticsVO.HeJianAmount planHejian = computePlanHeJian(projects,applies,approves); |
|
|