From f0706eaeb4e3e51ed971b18b7065db0110c205d0 Mon Sep 17 00:00:00 2001 From: hanbo <2608504783@qq.com> Date: Wed, 8 Dec 2021 14:44:19 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BF=98=E5=8E=9FSettleBean?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/cn/palmte/work/bean/SettleBean.java | 425 -------- .../cn/palmte/work/bean/SettleMonthBean.java | 965 ++++++++++++++++++ .../work/service/ProjectSettleService.java | 4 +- 3 files changed, 967 insertions(+), 427 deletions(-) create mode 100644 src/main/java/cn/palmte/work/bean/SettleMonthBean.java diff --git a/src/main/java/cn/palmte/work/bean/SettleBean.java b/src/main/java/cn/palmte/work/bean/SettleBean.java index 10939a2..9c30c55 100644 --- a/src/main/java/cn/palmte/work/bean/SettleBean.java +++ b/src/main/java/cn/palmte/work/bean/SettleBean.java @@ -11,28 +11,16 @@ public class SettleBean { */ private BigDecimal incomeDevice; - private BigDecimal budgetIncomeDevice; - - private BigDecimal estimateIncomeDevice; - /** * 工程类决算总额 */ private BigDecimal incomeEngineer; - private BigDecimal budgetIncomeEngineer; - - private BigDecimal estimateIncomeEngineer; - /** * 服务类决算总额 */ private BigDecimal incomeService; - private BigDecimal budgetIncomeService; - - private BigDecimal estimateIncomeService; - /** * 获取所有收入总额 * @@ -48,26 +36,6 @@ public class SettleBean { return incomeDevice.add(incomeEngineer).add(incomeService); } - public BigDecimal getBudgetIncomeTotal() { - BigDecimal incomeDevice = getBudgetIncomeDevice(); - BigDecimal incomeEngineer = getBudgetIncomeEngineer(); - BigDecimal incomeService = getBudgetIncomeService(); - if (null == incomeDevice || null == incomeEngineer || null == incomeService) { - return new BigDecimal(0); - } - return incomeDevice.add(incomeEngineer).add(incomeService); - } - - public BigDecimal getEstimateIncomeTotal() { - BigDecimal incomeDevice = getEstimateIncomeDevice(); - BigDecimal incomeEngineer = getEstimateIncomeEngineer(); - BigDecimal incomeService = getEstimateIncomeService(); - if (null == incomeDevice || null == incomeEngineer || null == incomeService) { - return new BigDecimal(0); - } - return incomeDevice.add(incomeEngineer).add(incomeService); - } - //========================成本表================================ @@ -76,55 +44,31 @@ public class SettleBean { */ private BigDecimal costPurchaseDevice; - private BigDecimal budgetCostPurchaseDevice; - - private BigDecimal estimateCostPurchaseDevice; - /** *施工采购成本决算总额 */ private BigDecimal costPurchaseBuild; - private BigDecimal budgetCostPurchaseBuild; - - private BigDecimal estimateCostPurchaseBuild; - /** *服务采购成本决算总额 */ private BigDecimal costPurchaseService; - private BigDecimal budgetCostPurchaseService; - - private BigDecimal estimateCostPurchaseService; - /** *其他采购成本决算总额 */ private BigDecimal costPurchaseOther; - private BigDecimal budgetCostPurchaseOther; - - private BigDecimal estimateCostPurchaseOther; - /** * 项目管理成本决算总额 */ private BigDecimal costProjectManage; - private BigDecimal budgetCostProjectManage; - - private BigDecimal estimateCostProjectManage; - /** * 其他成本决算总额 */ private BigDecimal costOther; - private BigDecimal budgetCostOther; - - private BigDecimal estimateCostOther; - /** * 获取所有成本总额 @@ -148,40 +92,6 @@ public class SettleBean { .add(costPurchaseOther).add(costProjectManage).add(costOther); } - public BigDecimal getBudgetCostTotal() { - BigDecimal costPurchaseDevice = getBudgetCostPurchaseDevice(); - BigDecimal costPurchaseBuild = getBudgetCostPurchaseBuild(); - BigDecimal costPurchaseService = getBudgetCostPurchaseService(); - BigDecimal costPurchaseOther = getBudgetCostPurchaseOther(); - BigDecimal costProjectManage = getBudgetCostProjectManage(); - BigDecimal costOther = getBudgetCostOther(); - - if (null == costPurchaseDevice || null == costPurchaseBuild || null == costPurchaseService - || null == costPurchaseOther || null == costProjectManage || null == costOther) { - return new BigDecimal(0); - } - - return costPurchaseDevice.add(costPurchaseBuild).add(costPurchaseService) - .add(costPurchaseOther).add(costProjectManage).add(costOther); - } - - public BigDecimal getEstimateCostTotal() { - BigDecimal costPurchaseDevice = getEstimateCostPurchaseDevice(); - BigDecimal costPurchaseBuild = getEstimateCostPurchaseBuild(); - BigDecimal costPurchaseService = getEstimateCostPurchaseService(); - BigDecimal costPurchaseOther = getEstimateCostPurchaseOther(); - BigDecimal costProjectManage = getEstimateCostProjectManage(); - BigDecimal costOther = getEstimateCostOther(); - - if (null == costPurchaseDevice || null == costPurchaseBuild || null == costPurchaseService - || null == costPurchaseOther || null == costProjectManage || null == costOther) { - return new BigDecimal(0); - } - - return costPurchaseDevice.add(costPurchaseBuild).add(costPurchaseService) - .add(costPurchaseOther).add(costProjectManage).add(costOther); - } - /** * 获取所有成本总额 * @@ -209,19 +119,11 @@ public class SettleBean { */ private BigDecimal costExpropriation; - private BigDecimal estimateCostExpropriation; - - private BigDecimal budgetCostExpropriation; - /** * 公司管理费用决算总额 */ private BigDecimal costCompanyManage; - private BigDecimal estimateCostCompanyManage; - - private BigDecimal budgetCostCompanyManage; - /** * 所得税费用决算总额 */ @@ -239,27 +141,6 @@ public class SettleBean { return costExpropriation.add(costCompanyManage).add(costIncomeTax); } - public BigDecimal getEstimateCostManageTotal() { - BigDecimal costExpropriation = getEstimateCostExpropriation(); - BigDecimal costCompanyManage = getEstimateCostCompanyManage(); - - if (null == costExpropriation || null == costCompanyManage ) { - return new BigDecimal(0); - } - - return costExpropriation.add(costCompanyManage); - } - - public BigDecimal getBudgetCostManageTotal() { - BigDecimal costExpropriation = getBudgetCostExpropriation(); - BigDecimal costCompanyManage = getBudgetCostCompanyManage(); - - if (null == costExpropriation || null == costCompanyManage ) { - return new BigDecimal(0); - } - - return costExpropriation.add(costCompanyManage); - } //========================利润率计算表================================ @@ -268,10 +149,6 @@ public class SettleBean { */ private BigDecimal grossProfit; - private BigDecimal estimateGrossProfit; - - private BigDecimal budgetGrossProfit; - /** * 项目毛利利润率 */ @@ -282,10 +159,6 @@ public class SettleBean { */ private BigDecimal contributionProfit; - private BigDecimal estimateContributionProfit; - - private BigDecimal budgetContributionProfit; - /** * 项目贡献利润利润率 */ @@ -307,8 +180,6 @@ public class SettleBean { * a销售商品、提供劳务收到的现金 * */ private BigDecimal saleIncomeCash; - - private BigDecimal budgetSaleIncomeCash; /** * b收到的税费返还 * */ @@ -317,14 +188,10 @@ public class SettleBean { * c其他与经营活动有关的现金【保证金收入】 */ private BigDecimal earnestMoneyIncome; - - private BigDecimal budgetEarnestMoneyIncome; /** * d购买商品、接受劳务支付的现金【设备支出+工程支出】 */ private BigDecimal purchaseCost; - - private BigDecimal budgetPurchaseCost; /** * e支付的各项税费 */ @@ -333,15 +200,11 @@ public class SettleBean { *f支付其他与经营活动有关的现金 */ private BigDecimal earnestMoneyCost; - - private BigDecimal budgetEarnestMoneyCost; /** * g经营活动产生的现金流量净额 * g=a+c+b-d-f-e */ private BigDecimal netCashFlow; - - private BigDecimal budgetNetCashFlow; /** * h投资活动现金流入 */ @@ -358,29 +221,21 @@ public class SettleBean { * k融资资金流入【垫资计划】 */ private BigDecimal financingCapitalInflow; - - private BigDecimal budgetFinancingCapitalInflow; /** * l融资资金流出【还款计划】 */ private BigDecimal financingCapitalOutflow; - - private BigDecimal budgetFinancingCapitalOutflow; /** *m筹资活动产生的现金流量净额 * m=k-l */ private BigDecimal financingCapitalCashflow; - - private BigDecimal budgetFinancingCapitalCashflow; /** * n货币资金净增加额 * n=g+j+m */ private BigDecimal netIncreaseMonetaryFunds; - private BigDecimal budgetNetIncreaseMonetaryFunds; - /** * 获取所有现金流量总额 * @return @@ -682,284 +537,4 @@ public class SettleBean { public void setProjectName(String projectName) { this.projectName = projectName; } - - public BigDecimal getBudgetIncomeDevice() { - return budgetIncomeDevice; - } - - public void setBudgetIncomeDevice(BigDecimal budgetIncomeDevice) { - this.budgetIncomeDevice = budgetIncomeDevice; - } - - public BigDecimal getEstimateIncomeDevice() { - return estimateIncomeDevice; - } - - public void setEstimateIncomeDevice(BigDecimal estimateIncomeDevice) { - this.estimateIncomeDevice = estimateIncomeDevice; - } - - public BigDecimal getBudgetIncomeEngineer() { - return budgetIncomeEngineer; - } - - public void setBudgetIncomeEngineer(BigDecimal budgetIncomeEngineer) { - this.budgetIncomeEngineer = budgetIncomeEngineer; - } - - public BigDecimal getEstimateIncomeEngineer() { - return estimateIncomeEngineer; - } - - public void setEstimateIncomeEngineer(BigDecimal estimateIncomeEngineer) { - this.estimateIncomeEngineer = estimateIncomeEngineer; - } - - public BigDecimal getBudgetIncomeService() { - return budgetIncomeService; - } - - public void setBudgetIncomeService(BigDecimal budgetIncomeService) { - this.budgetIncomeService = budgetIncomeService; - } - - public BigDecimal getEstimateIncomeService() { - return estimateIncomeService; - } - - public void setEstimateIncomeService(BigDecimal estimateIncomeService) { - this.estimateIncomeService = estimateIncomeService; - } - - public BigDecimal getBudgetCostPurchaseDevice() { - return budgetCostPurchaseDevice; - } - - public void setBudgetCostPurchaseDevice(BigDecimal budgetCostPurchaseDevice) { - this.budgetCostPurchaseDevice = budgetCostPurchaseDevice; - } - - public BigDecimal getEstimateCostPurchaseDevice() { - return estimateCostPurchaseDevice; - } - - public void setEstimateCostPurchaseDevice(BigDecimal estimateCostPurchaseDevice) { - this.estimateCostPurchaseDevice = estimateCostPurchaseDevice; - } - - public BigDecimal getBudgetCostPurchaseBuild() { - return budgetCostPurchaseBuild; - } - - public void setBudgetCostPurchaseBuild(BigDecimal budgetCostPurchaseBuild) { - this.budgetCostPurchaseBuild = budgetCostPurchaseBuild; - } - - public BigDecimal getEstimateCostPurchaseBuild() { - return estimateCostPurchaseBuild; - } - - public void setEstimateCostPurchaseBuild(BigDecimal estimateCostPurchaseBuild) { - this.estimateCostPurchaseBuild = estimateCostPurchaseBuild; - } - - public BigDecimal getBudgetCostPurchaseService() { - return budgetCostPurchaseService; - } - - public void setBudgetCostPurchaseService(BigDecimal budgetCostPurchaseService) { - this.budgetCostPurchaseService = budgetCostPurchaseService; - } - - public BigDecimal getEstimateCostPurchaseService() { - return estimateCostPurchaseService; - } - - public void setEstimateCostPurchaseService(BigDecimal estimateCostPurchaseService) { - this.estimateCostPurchaseService = estimateCostPurchaseService; - } - - public BigDecimal getBudgetCostPurchaseOther() { - return budgetCostPurchaseOther; - } - - public void setBudgetCostPurchaseOther(BigDecimal budgetCostPurchaseOther) { - this.budgetCostPurchaseOther = budgetCostPurchaseOther; - } - - public BigDecimal getEstimateCostPurchaseOther() { - return estimateCostPurchaseOther; - } - - public void setEstimateCostPurchaseOther(BigDecimal estimateCostPurchaseOther) { - this.estimateCostPurchaseOther = estimateCostPurchaseOther; - } - - public BigDecimal getBudgetCostProjectManage() { - return budgetCostProjectManage; - } - - public void setBudgetCostProjectManage(BigDecimal budgetCostProjectManage) { - this.budgetCostProjectManage = budgetCostProjectManage; - } - - public BigDecimal getEstimateCostProjectManage() { - return estimateCostProjectManage; - } - - public void setEstimateCostProjectManage(BigDecimal estimateCostProjectManage) { - this.estimateCostProjectManage = estimateCostProjectManage; - } - - public BigDecimal getBudgetCostOther() { - return budgetCostOther; - } - - public void setBudgetCostOther(BigDecimal budgetCostOther) { - this.budgetCostOther = budgetCostOther; - } - - public BigDecimal getEstimateCostOther() { - return estimateCostOther; - } - - public void setEstimateCostOther(BigDecimal estimateCostOther) { - this.estimateCostOther = estimateCostOther; - } - - public BigDecimal getEstimateCostExpropriation() { - return estimateCostExpropriation; - } - - public void setEstimateCostExpropriation(BigDecimal estimateCostExpropriation) { - this.estimateCostExpropriation = estimateCostExpropriation; - } - - public BigDecimal getBudgetCostExpropriation() { - return budgetCostExpropriation; - } - - public void setBudgetCostExpropriation(BigDecimal budgetCostExpropriation) { - this.budgetCostExpropriation = budgetCostExpropriation; - } - - public BigDecimal getEstimateCostCompanyManage() { - return estimateCostCompanyManage; - } - - public void setEstimateCostCompanyManage(BigDecimal estimateCostCompanyManage) { - this.estimateCostCompanyManage = estimateCostCompanyManage; - } - - public BigDecimal getBudgetCostCompanyManage() { - return budgetCostCompanyManage; - } - - public void setBudgetCostCompanyManage(BigDecimal budgetCostCompanyManage) { - this.budgetCostCompanyManage = budgetCostCompanyManage; - } - - public BigDecimal getEstimateGrossProfit() { - return estimateGrossProfit; - } - - public void setEstimateGrossProfit(BigDecimal estimateGrossProfit) { - this.estimateGrossProfit = estimateGrossProfit; - } - - public BigDecimal getBudgetGrossProfit() { - return budgetGrossProfit; - } - - public void setBudgetGrossProfit(BigDecimal budgetGrossProfit) { - this.budgetGrossProfit = budgetGrossProfit; - } - - public BigDecimal getEstimateContributionProfit() { - return estimateContributionProfit; - } - - public void setEstimateContributionProfit(BigDecimal estimateContributionProfit) { - this.estimateContributionProfit = estimateContributionProfit; - } - - public BigDecimal getBudgetContributionProfit() { - return budgetContributionProfit; - } - - public void setBudgetContributionProfit(BigDecimal budgetContributionProfit) { - this.budgetContributionProfit = budgetContributionProfit; - } - - public BigDecimal getBudgetSaleIncomeCash() { - return budgetSaleIncomeCash; - } - - public void setBudgetSaleIncomeCash(BigDecimal budgetSaleIncomeCash) { - this.budgetSaleIncomeCash = budgetSaleIncomeCash; - } - - public BigDecimal getBudgetEarnestMoneyIncome() { - return budgetEarnestMoneyIncome; - } - - public void setBudgetEarnestMoneyIncome(BigDecimal budgetEarnestMoneyIncome) { - this.budgetEarnestMoneyIncome = budgetEarnestMoneyIncome; - } - - public BigDecimal getBudgetPurchaseCost() { - return budgetPurchaseCost; - } - - public void setBudgetPurchaseCost(BigDecimal budgetPurchaseCost) { - this.budgetPurchaseCost = budgetPurchaseCost; - } - - public BigDecimal getBudgetEarnestMoneyCost() { - return budgetEarnestMoneyCost; - } - - public void setBudgetEarnestMoneyCost(BigDecimal budgetEarnestMoneyCost) { - this.budgetEarnestMoneyCost = budgetEarnestMoneyCost; - } - - public BigDecimal getBudgetNetCashFlow() { - return budgetNetCashFlow; - } - - public void setBudgetNetCashFlow(BigDecimal budgetNetCashFlow) { - this.budgetNetCashFlow = budgetNetCashFlow; - } - - public BigDecimal getBudgetFinancingCapitalInflow() { - return budgetFinancingCapitalInflow; - } - - public void setBudgetFinancingCapitalInflow(BigDecimal budgetFinancingCapitalInflow) { - this.budgetFinancingCapitalInflow = budgetFinancingCapitalInflow; - } - - public BigDecimal getBudgetFinancingCapitalOutflow() { - return budgetFinancingCapitalOutflow; - } - - public void setBudgetFinancingCapitalOutflow(BigDecimal budgetFinancingCapitalOutflow) { - this.budgetFinancingCapitalOutflow = budgetFinancingCapitalOutflow; - } - - public BigDecimal getBudgetFinancingCapitalCashflow() { - return budgetFinancingCapitalCashflow; - } - - public void setBudgetFinancingCapitalCashflow(BigDecimal budgetFinancingCapitalCashflow) { - this.budgetFinancingCapitalCashflow = budgetFinancingCapitalCashflow; - } - - public BigDecimal getBudgetNetIncreaseMonetaryFunds() { - return budgetNetIncreaseMonetaryFunds; - } - - public void setBudgetNetIncreaseMonetaryFunds(BigDecimal budgetNetIncreaseMonetaryFunds) { - this.budgetNetIncreaseMonetaryFunds = budgetNetIncreaseMonetaryFunds; - } } diff --git a/src/main/java/cn/palmte/work/bean/SettleMonthBean.java b/src/main/java/cn/palmte/work/bean/SettleMonthBean.java new file mode 100644 index 0000000..378bc8a --- /dev/null +++ b/src/main/java/cn/palmte/work/bean/SettleMonthBean.java @@ -0,0 +1,965 @@ +package cn.palmte.work.bean; + +import java.math.BigDecimal; + +public class SettleMonthBean { + + //========================收入表================================ + + /** + * 设备类决算总额 + */ + private BigDecimal incomeDevice; + + private BigDecimal budgetIncomeDevice; + + private BigDecimal estimateIncomeDevice; + + /** + * 工程类决算总额 + */ + private BigDecimal incomeEngineer; + + private BigDecimal budgetIncomeEngineer; + + private BigDecimal estimateIncomeEngineer; + + /** + * 服务类决算总额 + */ + private BigDecimal incomeService; + + private BigDecimal budgetIncomeService; + + private BigDecimal estimateIncomeService; + + /** + * 获取所有收入总额 + * + * @return + */ + public BigDecimal getIncomeTotal() { + BigDecimal incomeDevice = getIncomeDevice(); + BigDecimal incomeEngineer = getIncomeEngineer(); + BigDecimal incomeService = getIncomeService(); + if (null == incomeDevice || null == incomeEngineer || null == incomeService) { + return new BigDecimal(0); + } + return incomeDevice.add(incomeEngineer).add(incomeService); + } + + public BigDecimal getBudgetIncomeTotal() { + BigDecimal incomeDevice = getBudgetIncomeDevice(); + BigDecimal incomeEngineer = getBudgetIncomeEngineer(); + BigDecimal incomeService = getBudgetIncomeService(); + if (null == incomeDevice || null == incomeEngineer || null == incomeService) { + return new BigDecimal(0); + } + return incomeDevice.add(incomeEngineer).add(incomeService); + } + + public BigDecimal getEstimateIncomeTotal() { + BigDecimal incomeDevice = getEstimateIncomeDevice(); + BigDecimal incomeEngineer = getEstimateIncomeEngineer(); + BigDecimal incomeService = getEstimateIncomeService(); + if (null == incomeDevice || null == incomeEngineer || null == incomeService) { + return new BigDecimal(0); + } + return incomeDevice.add(incomeEngineer).add(incomeService); + } + + + //========================成本表================================ + + /** + *设备采购成本决算总额 + */ + private BigDecimal costPurchaseDevice; + + private BigDecimal budgetCostPurchaseDevice; + + private BigDecimal estimateCostPurchaseDevice; + + /** + *施工采购成本决算总额 + */ + private BigDecimal costPurchaseBuild; + + private BigDecimal budgetCostPurchaseBuild; + + private BigDecimal estimateCostPurchaseBuild; + + /** + *服务采购成本决算总额 + */ + private BigDecimal costPurchaseService; + + private BigDecimal budgetCostPurchaseService; + + private BigDecimal estimateCostPurchaseService; + + /** + *其他采购成本决算总额 + */ + private BigDecimal costPurchaseOther; + + private BigDecimal budgetCostPurchaseOther; + + private BigDecimal estimateCostPurchaseOther; + + /** + * 项目管理成本决算总额 + */ + private BigDecimal costProjectManage; + + private BigDecimal budgetCostProjectManage; + + private BigDecimal estimateCostProjectManage; + + /** + * 其他成本决算总额 + */ + private BigDecimal costOther; + + private BigDecimal budgetCostOther; + + private BigDecimal estimateCostOther; + + + /** + * 获取所有成本总额 + * + * @return + */ + public BigDecimal getCostTotal() { + BigDecimal costPurchaseDevice = getCostPurchaseDevice(); + BigDecimal costPurchaseBuild = getCostPurchaseBuild(); + BigDecimal costPurchaseService = getCostPurchaseService(); + BigDecimal costPurchaseOther = getCostPurchaseOther(); + BigDecimal costProjectManage = getCostProjectManage(); + BigDecimal costOther = getCostOther(); + + if (null == costPurchaseDevice || null == costPurchaseBuild || null == costPurchaseService + || null == costPurchaseOther || null == costProjectManage || null == costOther) { + return new BigDecimal(0); + } + + return costPurchaseDevice.add(costPurchaseBuild).add(costPurchaseService) + .add(costPurchaseOther).add(costProjectManage).add(costOther); + } + + public BigDecimal getBudgetCostTotal() { + BigDecimal costPurchaseDevice = getBudgetCostPurchaseDevice(); + BigDecimal costPurchaseBuild = getBudgetCostPurchaseBuild(); + BigDecimal costPurchaseService = getBudgetCostPurchaseService(); + BigDecimal costPurchaseOther = getBudgetCostPurchaseOther(); + BigDecimal costProjectManage = getBudgetCostProjectManage(); + BigDecimal costOther = getBudgetCostOther(); + + if (null == costPurchaseDevice || null == costPurchaseBuild || null == costPurchaseService + || null == costPurchaseOther || null == costProjectManage || null == costOther) { + return new BigDecimal(0); + } + + return costPurchaseDevice.add(costPurchaseBuild).add(costPurchaseService) + .add(costPurchaseOther).add(costProjectManage).add(costOther); + } + + public BigDecimal getEstimateCostTotal() { + BigDecimal costPurchaseDevice = getEstimateCostPurchaseDevice(); + BigDecimal costPurchaseBuild = getEstimateCostPurchaseBuild(); + BigDecimal costPurchaseService = getEstimateCostPurchaseService(); + BigDecimal costPurchaseOther = getEstimateCostPurchaseOther(); + BigDecimal costProjectManage = getEstimateCostProjectManage(); + BigDecimal costOther = getEstimateCostOther(); + + if (null == costPurchaseDevice || null == costPurchaseBuild || null == costPurchaseService + || null == costPurchaseOther || null == costProjectManage || null == costOther) { + return new BigDecimal(0); + } + + return costPurchaseDevice.add(costPurchaseBuild).add(costPurchaseService) + .add(costPurchaseOther).add(costProjectManage).add(costOther); + } + + /** + * 获取所有成本总额 + * + * @return + */ + public BigDecimal getCostTotal2() { + BigDecimal costPurchaseDevice = getCostPurchaseDevice(); + BigDecimal costPurchaseBuild = getCostPurchaseBuild(); + BigDecimal costPurchaseService = getCostPurchaseService(); + BigDecimal costPurchaseOther = getCostPurchaseOther(); + + if (null == costPurchaseDevice || null == costPurchaseBuild || null == costPurchaseService + || null == costPurchaseOther) { + return new BigDecimal(0); + } + + return costPurchaseDevice.add(costPurchaseBuild).add(costPurchaseService) + .add(costPurchaseOther); + } + + //========================管理表================================ + + /** + * 财务费用决算总额 + */ + private BigDecimal costExpropriation; + + private BigDecimal estimateCostExpropriation; + + private BigDecimal budgetCostExpropriation; + + /** + * 公司管理费用决算总额 + */ + private BigDecimal costCompanyManage; + + private BigDecimal estimateCostCompanyManage; + + private BigDecimal budgetCostCompanyManage; + + /** + * 所得税费用决算总额 + */ + private BigDecimal costIncomeTax; + + public BigDecimal getCostManageTotal() { + BigDecimal costExpropriation = getCostExpropriation(); + BigDecimal costCompanyManage = getCostCompanyManage(); + BigDecimal costIncomeTax = getCostIncomeTax(); + + if (null == costExpropriation || null == costCompanyManage || null == costIncomeTax) { + return new BigDecimal(0); + } + + return costExpropriation.add(costCompanyManage).add(costIncomeTax); + } + + public BigDecimal getEstimateCostManageTotal() { + BigDecimal costExpropriation = getEstimateCostExpropriation(); + BigDecimal costCompanyManage = getEstimateCostCompanyManage(); + + if (null == costExpropriation || null == costCompanyManage ) { + return new BigDecimal(0); + } + + return costExpropriation.add(costCompanyManage); + } + + public BigDecimal getBudgetCostManageTotal() { + BigDecimal costExpropriation = getBudgetCostExpropriation(); + BigDecimal costCompanyManage = getBudgetCostCompanyManage(); + + if (null == costExpropriation || null == costCompanyManage ) { + return new BigDecimal(0); + } + + return costExpropriation.add(costCompanyManage); + } + + //========================利润率计算表================================ + + /** + * 项目毛利决算总额 + */ + private BigDecimal grossProfit; + + private BigDecimal estimateGrossProfit; + + private BigDecimal budgetGrossProfit; + + /** + * 项目毛利利润率 + */ + private BigDecimal grossProfitProfitMargin; + + /** + * 项目贡献利润决算总额 + */ + private BigDecimal contributionProfit; + + private BigDecimal estimateContributionProfit; + + private BigDecimal budgetContributionProfit; + + /** + * 项目贡献利润利润率 + */ + private BigDecimal contributionProfitProfitMargin; + + /** + * 项目净利润决算总额 + */ + private BigDecimal netProfit; + + /** + * 项目净利润利润率 + */ + private BigDecimal netProfitProfitMargin; + + //========================结算现金流量表================================ + + /** + * a销售商品、提供劳务收到的现金 + * */ + private BigDecimal saleIncomeCash; + + private BigDecimal budgetSaleIncomeCash; + /** + * b收到的税费返还 + * */ + private BigDecimal taxReturn; + /** + * c其他与经营活动有关的现金【保证金收入】 + */ + private BigDecimal earnestMoneyIncome; + + private BigDecimal budgetEarnestMoneyIncome; + /** + * d购买商品、接受劳务支付的现金【设备支出+工程支出】 + */ + private BigDecimal purchaseCost; + + private BigDecimal budgetPurchaseCost; + /** + * e支付的各项税费 + */ + private BigDecimal taxCost; + /** + *f支付其他与经营活动有关的现金 + */ + private BigDecimal earnestMoneyCost; + + private BigDecimal budgetEarnestMoneyCost; + /** + * g经营活动产生的现金流量净额 + * g=a+c+b-d-f-e + */ + private BigDecimal netCashFlow; + + private BigDecimal budgetNetCashFlow; + /** + * h投资活动现金流入 + */ + private BigDecimal cashInflowFromInvestingActivities; + /** + * i投资活动现金流出 + */ + private BigDecimal cashOutflowFromInvestingActivities; + /** + * j投资活动产生的现金流量净额 + */ + private BigDecimal netCashFromInvestingActivities; + /** + * k融资资金流入【垫资计划】 + */ + private BigDecimal financingCapitalInflow; + + private BigDecimal budgetFinancingCapitalInflow; + /** + * l融资资金流出【还款计划】 + */ + private BigDecimal financingCapitalOutflow; + + private BigDecimal budgetFinancingCapitalOutflow; + /** + *m筹资活动产生的现金流量净额 + * m=k-l + */ + private BigDecimal financingCapitalCashflow; + + private BigDecimal budgetFinancingCapitalCashflow; + /** + * n货币资金净增加额 + * n=g+j+m + */ + private BigDecimal netIncreaseMonetaryFunds; + + private BigDecimal budgetNetIncreaseMonetaryFunds; + + /** + * 获取所有现金流量总额 + * @return + */ + public BigDecimal getCashFlowTotal() { + BigDecimal saleIncomeCash = getSaleIncomeCash(); + BigDecimal taxReturn = getTaxReturn(); + BigDecimal earnestMoneyIncome = getEarnestMoneyIncome(); + BigDecimal purchaseCost = getPurchaseCost(); + BigDecimal taxCost = getTaxCost(); + BigDecimal earnestMoneyCost = getEarnestMoneyCost(); + BigDecimal netCashFlow = getNetCashFlow(); + BigDecimal cashInflowFromInvestingActivities = getCashInflowFromInvestingActivities(); + BigDecimal cashOutflowFromInvestingActivities = getCashOutflowFromInvestingActivities(); + BigDecimal netCashFromInvestingActivities = getNetCashFromInvestingActivities(); + BigDecimal financingCapitalInflow = getFinancingCapitalInflow(); + BigDecimal financingCapitalOutflow = getFinancingCapitalOutflow(); + BigDecimal financingCapitalCashflow = getFinancingCapitalCashflow(); + BigDecimal netIncreaseMonetaryFunds = getNetIncreaseMonetaryFunds(); + + if (null == saleIncomeCash || null == taxReturn || null == earnestMoneyIncome || null == purchaseCost || null == taxCost + || null == earnestMoneyCost || null == netCashFlow || null == cashInflowFromInvestingActivities || + null == cashOutflowFromInvestingActivities || null == netCashFromInvestingActivities || + null == financingCapitalInflow || null == financingCapitalOutflow || null == financingCapitalCashflow || null == netIncreaseMonetaryFunds) { + return new BigDecimal(0); + } + + return saleIncomeCash.add(taxReturn).add(earnestMoneyIncome).add(purchaseCost).add(taxCost).add(earnestMoneyCost) + .add(netCashFlow).add(cashInflowFromInvestingActivities).add(cashOutflowFromInvestingActivities).add(netCashFromInvestingActivities) + .add(financingCapitalInflow).add(financingCapitalOutflow).add(financingCapitalCashflow).add(netIncreaseMonetaryFunds); + } + + private String projectName; + + protected BigDecimal handleSpecial(BigDecimal src) { + return null == src ? new BigDecimal(0) : src; + } + + public BigDecimal getIncomeDevice() { + return handleSpecial(incomeDevice); + } + + public void setIncomeDevice(BigDecimal incomeDevice) { + this.incomeDevice = incomeDevice; + } + + public BigDecimal getIncomeEngineer() { + return handleSpecial(incomeEngineer); + } + + public void setIncomeEngineer(BigDecimal incomeEngineer) { + this.incomeEngineer = incomeEngineer; + } + + public BigDecimal getIncomeService() { + return handleSpecial(incomeService); + } + + public void setIncomeService(BigDecimal incomeService) { + this.incomeService = incomeService; + } + + public BigDecimal getCostPurchaseDevice() { + return handleSpecial(costPurchaseDevice); + } + + public void setCostPurchaseDevice(BigDecimal costPurchaseDevice) { + this.costPurchaseDevice = costPurchaseDevice; + } + + public BigDecimal getCostPurchaseBuild() { + return handleSpecial(costPurchaseBuild); + } + + public void setCostPurchaseBuild(BigDecimal costPurchaseBuild) { + this.costPurchaseBuild = costPurchaseBuild; + } + + public BigDecimal getCostPurchaseService() { + return handleSpecial(costPurchaseService); + } + + public void setCostPurchaseService(BigDecimal costPurchaseService) { + this.costPurchaseService = costPurchaseService; + } + + public BigDecimal getCostPurchaseOther() { + return handleSpecial(costPurchaseOther); + } + + public void setCostPurchaseOther(BigDecimal costPurchaseOther) { + this.costPurchaseOther = costPurchaseOther; + } + + public BigDecimal getCostProjectManage() { + return handleSpecial(costProjectManage); + } + + public void setCostProjectManage(BigDecimal costProjectManage) { + this.costProjectManage = costProjectManage; + } + + public BigDecimal getCostOther() { + return handleSpecial(costOther); + } + + public void setCostOther(BigDecimal costOther) { + this.costOther = costOther; + } + + public BigDecimal getCostExpropriation() { + return handleSpecial(costExpropriation); + } + + public void setCostExpropriation(BigDecimal costExpropriation) { + this.costExpropriation = costExpropriation; + } + + public BigDecimal getCostCompanyManage() { + return handleSpecial(costCompanyManage); + } + + public void setCostCompanyManage(BigDecimal costCompanyManage) { + this.costCompanyManage = costCompanyManage; + } + + public BigDecimal getCostIncomeTax() { + return handleSpecial(costIncomeTax); + } + + public void setCostIncomeTax(BigDecimal costIncomeTax) { + this.costIncomeTax = costIncomeTax; + } + + public BigDecimal getGrossProfit() { + return handleSpecial(grossProfit); + } + + public void setGrossProfit(BigDecimal grossProfit) { + this.grossProfit = grossProfit; + } + + public BigDecimal getGrossProfitProfitMargin() { + return handleSpecial(grossProfitProfitMargin); + } + + public void setGrossProfitProfitMargin(BigDecimal grossProfitProfitMargin) { + this.grossProfitProfitMargin = grossProfitProfitMargin; + } + + public BigDecimal getContributionProfit() { + return handleSpecial(contributionProfit); + } + + public void setContributionProfit(BigDecimal contributionProfit) { + this.contributionProfit = contributionProfit; + } + + public BigDecimal getContributionProfitProfitMargin() { + return handleSpecial(contributionProfitProfitMargin); + } + + public void setContributionProfitProfitMargin(BigDecimal contributionProfitProfitMargin) { + this.contributionProfitProfitMargin = contributionProfitProfitMargin; + } + + public BigDecimal getNetProfit() { + return handleSpecial(netProfit); + } + + public void setNetProfit(BigDecimal netProfit) { + this.netProfit = netProfit; + } + + public BigDecimal getNetProfitProfitMargin() { + return handleSpecial(netProfitProfitMargin); + } + + public void setNetProfitProfitMargin(BigDecimal netProfitProfitMargin) { + this.netProfitProfitMargin = netProfitProfitMargin; + } + + public BigDecimal getSaleIncomeCash() { + return handleSpecial(saleIncomeCash); + } + + public void setSaleIncomeCash(BigDecimal saleIncomeCash) { + this.saleIncomeCash = saleIncomeCash; + } + + public BigDecimal getTaxReturn() { + return handleSpecial(taxReturn); + } + + public void setTaxReturn(BigDecimal taxReturn) { + this.taxReturn = taxReturn; + } + + public BigDecimal getEarnestMoneyIncome() { + return handleSpecial(earnestMoneyIncome); + } + + public void setEarnestMoneyIncome(BigDecimal earnestMoneyIncome) { + this.earnestMoneyIncome = earnestMoneyIncome; + } + + public BigDecimal getPurchaseCost() { + return handleSpecial(purchaseCost); + } + + public void setPurchaseCost(BigDecimal purchaseCost) { + this.purchaseCost = purchaseCost; + } + + public BigDecimal getTaxCost() { + return handleSpecial(taxCost); + } + + public void setTaxCost(BigDecimal taxCost) { + this.taxCost = taxCost; + } + + public BigDecimal getEarnestMoneyCost() { + return handleSpecial(earnestMoneyCost); + } + + public void setEarnestMoneyCost(BigDecimal earnestMoneyCost) { + this.earnestMoneyCost = earnestMoneyCost; + } + + public BigDecimal getCashInflowFromInvestingActivities() { + return handleSpecial(cashInflowFromInvestingActivities); + } + + public void setCashInflowFromInvestingActivities(BigDecimal cashInflowFromInvestingActivities) { + this.cashInflowFromInvestingActivities = cashInflowFromInvestingActivities; + } + + public BigDecimal getCashOutflowFromInvestingActivities() { + return handleSpecial(cashOutflowFromInvestingActivities); + } + + public void setCashOutflowFromInvestingActivities(BigDecimal cashOutflowFromInvestingActivities) { + this.cashOutflowFromInvestingActivities = cashOutflowFromInvestingActivities; + } + + public BigDecimal getNetCashFromInvestingActivities() { + return handleSpecial(netCashFromInvestingActivities); + } + + public void setNetCashFromInvestingActivities(BigDecimal netCashFromInvestingActivities) { + this.netCashFromInvestingActivities = netCashFromInvestingActivities; + } + + public BigDecimal getFinancingCapitalInflow() { + return handleSpecial(financingCapitalInflow); + } + + public void setFinancingCapitalInflow(BigDecimal financingCapitalInflow) { + this.financingCapitalInflow = financingCapitalInflow; + } + + public BigDecimal getFinancingCapitalOutflow() { + return handleSpecial(financingCapitalOutflow); + } + + public void setFinancingCapitalOutflow(BigDecimal financingCapitalOutflow) { + this.financingCapitalOutflow = financingCapitalOutflow; + } + + public BigDecimal getFinancingCapitalCashflow() { + return handleSpecial(financingCapitalCashflow); + } + + public void setFinancingCapitalCashflow(BigDecimal financingCapitalCashflow) { + this.financingCapitalCashflow = financingCapitalCashflow; + } + + public BigDecimal getNetIncreaseMonetaryFunds() { + return handleSpecial(netIncreaseMonetaryFunds); + } + + public void setNetIncreaseMonetaryFunds(BigDecimal netIncreaseMonetaryFunds) { + this.netIncreaseMonetaryFunds = netIncreaseMonetaryFunds; + } + + public BigDecimal getNetCashFlow() { + return handleSpecial(netCashFlow); + } + + public void setNetCashFlow(BigDecimal netCashFlow) { + this.netCashFlow = netCashFlow; + } + + public String getProjectName() { + return projectName; + } + + public void setProjectName(String projectName) { + this.projectName = projectName; + } + + public BigDecimal getBudgetIncomeDevice() { + return budgetIncomeDevice; + } + + public void setBudgetIncomeDevice(BigDecimal budgetIncomeDevice) { + this.budgetIncomeDevice = budgetIncomeDevice; + } + + public BigDecimal getEstimateIncomeDevice() { + return estimateIncomeDevice; + } + + public void setEstimateIncomeDevice(BigDecimal estimateIncomeDevice) { + this.estimateIncomeDevice = estimateIncomeDevice; + } + + public BigDecimal getBudgetIncomeEngineer() { + return budgetIncomeEngineer; + } + + public void setBudgetIncomeEngineer(BigDecimal budgetIncomeEngineer) { + this.budgetIncomeEngineer = budgetIncomeEngineer; + } + + public BigDecimal getEstimateIncomeEngineer() { + return estimateIncomeEngineer; + } + + public void setEstimateIncomeEngineer(BigDecimal estimateIncomeEngineer) { + this.estimateIncomeEngineer = estimateIncomeEngineer; + } + + public BigDecimal getBudgetIncomeService() { + return budgetIncomeService; + } + + public void setBudgetIncomeService(BigDecimal budgetIncomeService) { + this.budgetIncomeService = budgetIncomeService; + } + + public BigDecimal getEstimateIncomeService() { + return estimateIncomeService; + } + + public void setEstimateIncomeService(BigDecimal estimateIncomeService) { + this.estimateIncomeService = estimateIncomeService; + } + + public BigDecimal getBudgetCostPurchaseDevice() { + return budgetCostPurchaseDevice; + } + + public void setBudgetCostPurchaseDevice(BigDecimal budgetCostPurchaseDevice) { + this.budgetCostPurchaseDevice = budgetCostPurchaseDevice; + } + + public BigDecimal getEstimateCostPurchaseDevice() { + return estimateCostPurchaseDevice; + } + + public void setEstimateCostPurchaseDevice(BigDecimal estimateCostPurchaseDevice) { + this.estimateCostPurchaseDevice = estimateCostPurchaseDevice; + } + + public BigDecimal getBudgetCostPurchaseBuild() { + return budgetCostPurchaseBuild; + } + + public void setBudgetCostPurchaseBuild(BigDecimal budgetCostPurchaseBuild) { + this.budgetCostPurchaseBuild = budgetCostPurchaseBuild; + } + + public BigDecimal getEstimateCostPurchaseBuild() { + return estimateCostPurchaseBuild; + } + + public void setEstimateCostPurchaseBuild(BigDecimal estimateCostPurchaseBuild) { + this.estimateCostPurchaseBuild = estimateCostPurchaseBuild; + } + + public BigDecimal getBudgetCostPurchaseService() { + return budgetCostPurchaseService; + } + + public void setBudgetCostPurchaseService(BigDecimal budgetCostPurchaseService) { + this.budgetCostPurchaseService = budgetCostPurchaseService; + } + + public BigDecimal getEstimateCostPurchaseService() { + return estimateCostPurchaseService; + } + + public void setEstimateCostPurchaseService(BigDecimal estimateCostPurchaseService) { + this.estimateCostPurchaseService = estimateCostPurchaseService; + } + + public BigDecimal getBudgetCostPurchaseOther() { + return budgetCostPurchaseOther; + } + + public void setBudgetCostPurchaseOther(BigDecimal budgetCostPurchaseOther) { + this.budgetCostPurchaseOther = budgetCostPurchaseOther; + } + + public BigDecimal getEstimateCostPurchaseOther() { + return estimateCostPurchaseOther; + } + + public void setEstimateCostPurchaseOther(BigDecimal estimateCostPurchaseOther) { + this.estimateCostPurchaseOther = estimateCostPurchaseOther; + } + + public BigDecimal getBudgetCostProjectManage() { + return budgetCostProjectManage; + } + + public void setBudgetCostProjectManage(BigDecimal budgetCostProjectManage) { + this.budgetCostProjectManage = budgetCostProjectManage; + } + + public BigDecimal getEstimateCostProjectManage() { + return estimateCostProjectManage; + } + + public void setEstimateCostProjectManage(BigDecimal estimateCostProjectManage) { + this.estimateCostProjectManage = estimateCostProjectManage; + } + + public BigDecimal getBudgetCostOther() { + return budgetCostOther; + } + + public void setBudgetCostOther(BigDecimal budgetCostOther) { + this.budgetCostOther = budgetCostOther; + } + + public BigDecimal getEstimateCostOther() { + return estimateCostOther; + } + + public void setEstimateCostOther(BigDecimal estimateCostOther) { + this.estimateCostOther = estimateCostOther; + } + + public BigDecimal getEstimateCostExpropriation() { + return estimateCostExpropriation; + } + + public void setEstimateCostExpropriation(BigDecimal estimateCostExpropriation) { + this.estimateCostExpropriation = estimateCostExpropriation; + } + + public BigDecimal getBudgetCostExpropriation() { + return budgetCostExpropriation; + } + + public void setBudgetCostExpropriation(BigDecimal budgetCostExpropriation) { + this.budgetCostExpropriation = budgetCostExpropriation; + } + + public BigDecimal getEstimateCostCompanyManage() { + return estimateCostCompanyManage; + } + + public void setEstimateCostCompanyManage(BigDecimal estimateCostCompanyManage) { + this.estimateCostCompanyManage = estimateCostCompanyManage; + } + + public BigDecimal getBudgetCostCompanyManage() { + return budgetCostCompanyManage; + } + + public void setBudgetCostCompanyManage(BigDecimal budgetCostCompanyManage) { + this.budgetCostCompanyManage = budgetCostCompanyManage; + } + + public BigDecimal getEstimateGrossProfit() { + return estimateGrossProfit; + } + + public void setEstimateGrossProfit(BigDecimal estimateGrossProfit) { + this.estimateGrossProfit = estimateGrossProfit; + } + + public BigDecimal getBudgetGrossProfit() { + return budgetGrossProfit; + } + + public void setBudgetGrossProfit(BigDecimal budgetGrossProfit) { + this.budgetGrossProfit = budgetGrossProfit; + } + + public BigDecimal getEstimateContributionProfit() { + return estimateContributionProfit; + } + + public void setEstimateContributionProfit(BigDecimal estimateContributionProfit) { + this.estimateContributionProfit = estimateContributionProfit; + } + + public BigDecimal getBudgetContributionProfit() { + return budgetContributionProfit; + } + + public void setBudgetContributionProfit(BigDecimal budgetContributionProfit) { + this.budgetContributionProfit = budgetContributionProfit; + } + + public BigDecimal getBudgetSaleIncomeCash() { + return budgetSaleIncomeCash; + } + + public void setBudgetSaleIncomeCash(BigDecimal budgetSaleIncomeCash) { + this.budgetSaleIncomeCash = budgetSaleIncomeCash; + } + + public BigDecimal getBudgetEarnestMoneyIncome() { + return budgetEarnestMoneyIncome; + } + + public void setBudgetEarnestMoneyIncome(BigDecimal budgetEarnestMoneyIncome) { + this.budgetEarnestMoneyIncome = budgetEarnestMoneyIncome; + } + + public BigDecimal getBudgetPurchaseCost() { + return budgetPurchaseCost; + } + + public void setBudgetPurchaseCost(BigDecimal budgetPurchaseCost) { + this.budgetPurchaseCost = budgetPurchaseCost; + } + + public BigDecimal getBudgetEarnestMoneyCost() { + return budgetEarnestMoneyCost; + } + + public void setBudgetEarnestMoneyCost(BigDecimal budgetEarnestMoneyCost) { + this.budgetEarnestMoneyCost = budgetEarnestMoneyCost; + } + + public BigDecimal getBudgetNetCashFlow() { + return budgetNetCashFlow; + } + + public void setBudgetNetCashFlow(BigDecimal budgetNetCashFlow) { + this.budgetNetCashFlow = budgetNetCashFlow; + } + + public BigDecimal getBudgetFinancingCapitalInflow() { + return budgetFinancingCapitalInflow; + } + + public void setBudgetFinancingCapitalInflow(BigDecimal budgetFinancingCapitalInflow) { + this.budgetFinancingCapitalInflow = budgetFinancingCapitalInflow; + } + + public BigDecimal getBudgetFinancingCapitalOutflow() { + return budgetFinancingCapitalOutflow; + } + + public void setBudgetFinancingCapitalOutflow(BigDecimal budgetFinancingCapitalOutflow) { + this.budgetFinancingCapitalOutflow = budgetFinancingCapitalOutflow; + } + + public BigDecimal getBudgetFinancingCapitalCashflow() { + return budgetFinancingCapitalCashflow; + } + + public void setBudgetFinancingCapitalCashflow(BigDecimal budgetFinancingCapitalCashflow) { + this.budgetFinancingCapitalCashflow = budgetFinancingCapitalCashflow; + } + + public BigDecimal getBudgetNetIncreaseMonetaryFunds() { + return budgetNetIncreaseMonetaryFunds; + } + + public void setBudgetNetIncreaseMonetaryFunds(BigDecimal budgetNetIncreaseMonetaryFunds) { + this.budgetNetIncreaseMonetaryFunds = budgetNetIncreaseMonetaryFunds; + } +} diff --git a/src/main/java/cn/palmte/work/service/ProjectSettleService.java b/src/main/java/cn/palmte/work/service/ProjectSettleService.java index a87c581..216c030 100644 --- a/src/main/java/cn/palmte/work/service/ProjectSettleService.java +++ b/src/main/java/cn/palmte/work/service/ProjectSettleService.java @@ -606,8 +606,8 @@ public class ProjectSettleService { return settleBean; } - public SettleBean getMonthSettleByTime(Project project, String time) { - SettleBean settleBean = new SettleBean(); + public SettleMonthBean getMonthSettleByTime(Project project, String time) { + SettleMonthBean settleBean = new SettleMonthBean(); List incomes = projectSettleIncomeRepository.findAllByProjectIdAndTime(project.getId(), time); if(CollectionUtil.isNotEmpty(incomes)){ ProjectSettleIncome projectSettleIncomeDevice = incomes.stream().filter(d -> d.getType() == ProjectSettleIncome.TYPE_DEVICE).collect(Collectors.toList()).get(0);