diff --git a/src/main/java/cn/palmte/work/bean/BudgetSettleBean.java b/src/main/java/cn/palmte/work/bean/BudgetSettleBean.java new file mode 100644 index 0000000..516c894 --- /dev/null +++ b/src/main/java/cn/palmte/work/bean/BudgetSettleBean.java @@ -0,0 +1,425 @@ +package cn.palmte.work.bean; + +import java.math.BigDecimal; + +public class BudgetSettleBean { + + //========================收入表================================ + + /** + * 设备类决算总额 + */ + private BigDecimal incomeDeviceBudgetTotal; + + /** + * 工程类决算总额 + */ + private BigDecimal incomeEngineerBudgetTotal; + + /** + * 服务类决算总额 + */ + private BigDecimal incomeServiceBudgetTotal; + + //========================成本表================================ + + /** + * 设备采购成本决算总额 + */ + private BigDecimal costPurchaseDeviceBudgetTotal; + + /** + * 施工采购成本决算总额 + */ + private BigDecimal costPurchaseBuildBudgetTotal; + + /** + * 服务采购成本决算总额 + */ + private BigDecimal costPurchaseServiceBudgetTotal; + + /** + * 其他采购成本决算总额 + */ + private BigDecimal costPurchaseOtherBudgetTotal; + + /** + * 项目管理成本决算总额 + */ + private BigDecimal costProjectManageBudgetTotal; + + /** + * 其他成本决算总额 + */ + private BigDecimal costOtherBudgetTotal; + + + //========================管理表================================ + + /** + * 财务费用决算总额 + */ + private BigDecimal costExpropriationBudgetTotal; + + /** + * 公司管理费用决算总额 + */ + private BigDecimal costCompanyManageBudgetTotal; + + /** + * 所得税费用决算总额 + */ + private BigDecimal costIncomeTaxBudgetTotal; + + + //========================利润率计算表================================ + + /** + * 项目毛利决算总额 + */ + private BigDecimal grossProfitBudgetTotal; + + /** + * 项目毛利利润率 + */ + private BigDecimal grossProfitProfitMargin; + + /** + * 项目贡献利润决算总额 + */ + private BigDecimal contributionProfitBudgetTotal; + + /** + * 项目贡献利润利润率 + */ + private BigDecimal contributionProfitProfitMargin; + + /** + * 项目净利润决算总额 + */ + private BigDecimal netProfitBudgetTotal; + + /** + * 项目净利润利润率 + */ + private BigDecimal netProfitProfitMargin; + + //========================结算现金流量表================================ + + /** + * a销售商品、提供劳务收到的现金 + */ + private BigDecimal saleIncomeCashBudget; + /** + * b收到的税费返还 + */ + private BigDecimal taxReturnBudget; + /** + * c其他与经营活动有关的现金【保证金收入】 + */ + private BigDecimal earnestMoneyIncomeBudget; + /** + * d购买商品、接受劳务支付的现金【设备支出+工程支出】 + */ + private BigDecimal purchaseCostBudget; + /** + * e支付的各项税费 + */ + private BigDecimal taxCostBudget; + /** + * f支付其他与经营活动有关的现金 + */ + private BigDecimal earnestMoneyCostBudget; + /** + * g经营活动产生的现金流量净额 + * g=a+c+b-d-f-e + */ + private BigDecimal netCashFlowBudget; + /** + * h投资活动现金流入 + */ + private BigDecimal cashInflowFromInvestingActivitiesBudget; + /** + * i投资活动现金流出 + */ + private BigDecimal cashOutflowFromInvestingActivitiesBudget; + /** + * j投资活动产生的现金流量净额 + */ + private BigDecimal netCashFromInvestingActivitiesBudget; + /** + * k融资资金流入【垫资计划】 + */ + private BigDecimal financingCapitalInflowBudget; + /** + * l融资资金流出【还款计划】 + */ + private BigDecimal financingCapitalOutflowBudget; + /** + * m筹资活动产生的现金流量净额 + * m=k-l + */ + private BigDecimal financingCapitalCashflowBudget; + /** + * n货币资金净增加额 + * n=g+j+m + */ + private BigDecimal netIncreaseMonetaryFundsBudget; + + + public BigDecimal getIncomeDeviceBudgetTotal() { + return incomeDeviceBudgetTotal; + } + + public void setIncomeDeviceBudgetTotal(BigDecimal incomeDeviceBudgetTotal) { + this.incomeDeviceBudgetTotal = incomeDeviceBudgetTotal; + } + + public BigDecimal getIncomeEngineerBudgetTotal() { + return incomeEngineerBudgetTotal; + } + + public void setIncomeEngineerBudgetTotal(BigDecimal incomeEngineerBudgetTotal) { + this.incomeEngineerBudgetTotal = incomeEngineerBudgetTotal; + } + + public BigDecimal getIncomeServiceBudgetTotal() { + return incomeServiceBudgetTotal; + } + + public void setIncomeServiceBudgetTotal(BigDecimal incomeServiceBudgetTotal) { + this.incomeServiceBudgetTotal = incomeServiceBudgetTotal; + } + + public BigDecimal getCostPurchaseDeviceBudgetTotal() { + return costPurchaseDeviceBudgetTotal; + } + + public void setCostPurchaseDeviceBudgetTotal(BigDecimal costPurchaseDeviceBudgetTotal) { + this.costPurchaseDeviceBudgetTotal = costPurchaseDeviceBudgetTotal; + } + + public BigDecimal getCostPurchaseBuildBudgetTotal() { + return costPurchaseBuildBudgetTotal; + } + + public void setCostPurchaseBuildBudgetTotal(BigDecimal costPurchaseBuildBudgetTotal) { + this.costPurchaseBuildBudgetTotal = costPurchaseBuildBudgetTotal; + } + + public BigDecimal getCostPurchaseServiceBudgetTotal() { + return costPurchaseServiceBudgetTotal; + } + + public void setCostPurchaseServiceBudgetTotal(BigDecimal costPurchaseServiceBudgetTotal) { + this.costPurchaseServiceBudgetTotal = costPurchaseServiceBudgetTotal; + } + + public BigDecimal getCostPurchaseOtherBudgetTotal() { + return costPurchaseOtherBudgetTotal; + } + + public void setCostPurchaseOtherBudgetTotal(BigDecimal costPurchaseOtherBudgetTotal) { + this.costPurchaseOtherBudgetTotal = costPurchaseOtherBudgetTotal; + } + + public BigDecimal getCostProjectManageBudgetTotal() { + return costProjectManageBudgetTotal; + } + + public void setCostProjectManageBudgetTotal(BigDecimal costProjectManageBudgetTotal) { + this.costProjectManageBudgetTotal = costProjectManageBudgetTotal; + } + + public BigDecimal getCostOtherBudgetTotal() { + return costOtherBudgetTotal; + } + + public void setCostOtherBudgetTotal(BigDecimal costOtherBudgetTotal) { + this.costOtherBudgetTotal = costOtherBudgetTotal; + } + + public BigDecimal getCostExpropriationBudgetTotal() { + return costExpropriationBudgetTotal; + } + + public void setCostExpropriationBudgetTotal(BigDecimal costExpropriationBudgetTotal) { + this.costExpropriationBudgetTotal = costExpropriationBudgetTotal; + } + + public BigDecimal getCostCompanyManageBudgetTotal() { + return costCompanyManageBudgetTotal; + } + + public void setCostCompanyManageBudgetTotal(BigDecimal costCompanyManageBudgetTotal) { + this.costCompanyManageBudgetTotal = costCompanyManageBudgetTotal; + } + + public BigDecimal getCostIncomeTaxBudgetTotal() { + return costIncomeTaxBudgetTotal; + } + + public void setCostIncomeTaxBudgetTotal(BigDecimal costIncomeTaxBudgetTotal) { + this.costIncomeTaxBudgetTotal = costIncomeTaxBudgetTotal; + } + + public BigDecimal getGrossProfitBudgetTotal() { + return grossProfitBudgetTotal; + } + + public void setGrossProfitBudgetTotal(BigDecimal grossProfitBudgetTotal) { + this.grossProfitBudgetTotal = grossProfitBudgetTotal; + } + + public BigDecimal getGrossProfitProfitMargin() { + return grossProfitProfitMargin; + } + + public void setGrossProfitProfitMargin(BigDecimal grossProfitProfitMargin) { + this.grossProfitProfitMargin = grossProfitProfitMargin; + } + + public BigDecimal getContributionProfitBudgetTotal() { + return contributionProfitBudgetTotal; + } + + public void setContributionProfitBudgetTotal(BigDecimal contributionProfitBudgetTotal) { + this.contributionProfitBudgetTotal = contributionProfitBudgetTotal; + } + + public BigDecimal getContributionProfitProfitMargin() { + return contributionProfitProfitMargin; + } + + public void setContributionProfitProfitMargin(BigDecimal contributionProfitProfitMargin) { + this.contributionProfitProfitMargin = contributionProfitProfitMargin; + } + + public BigDecimal getNetProfitBudgetTotal() { + return netProfitBudgetTotal; + } + + public void setNetProfitBudgetTotal(BigDecimal netProfitBudgetTotal) { + this.netProfitBudgetTotal = netProfitBudgetTotal; + } + + public BigDecimal getNetProfitProfitMargin() { + return netProfitProfitMargin; + } + + public void setNetProfitProfitMargin(BigDecimal netProfitProfitMargin) { + this.netProfitProfitMargin = netProfitProfitMargin; + } + + public BigDecimal getSaleIncomeCashBudget() { + return saleIncomeCashBudget; + } + + public void setSaleIncomeCashBudget(BigDecimal saleIncomeCashBudget) { + this.saleIncomeCashBudget = saleIncomeCashBudget; + } + + public BigDecimal getTaxReturnBudget() { + return taxReturnBudget; + } + + public void setTaxReturnBudget(BigDecimal taxReturnBudget) { + this.taxReturnBudget = taxReturnBudget; + } + + public BigDecimal getEarnestMoneyIncomeBudget() { + return earnestMoneyIncomeBudget; + } + + public void setEarnestMoneyIncomeBudget(BigDecimal earnestMoneyIncomeBudget) { + this.earnestMoneyIncomeBudget = earnestMoneyIncomeBudget; + } + + public BigDecimal getPurchaseCostBudget() { + return purchaseCostBudget; + } + + public void setPurchaseCostBudget(BigDecimal purchaseCostBudget) { + this.purchaseCostBudget = purchaseCostBudget; + } + + public BigDecimal getTaxCostBudget() { + return taxCostBudget; + } + + public void setTaxCostBudget(BigDecimal taxCostBudget) { + this.taxCostBudget = taxCostBudget; + } + + public BigDecimal getEarnestMoneyCostBudget() { + return earnestMoneyCostBudget; + } + + public void setEarnestMoneyCostBudget(BigDecimal earnestMoneyCostBudget) { + this.earnestMoneyCostBudget = earnestMoneyCostBudget; + } + + public BigDecimal getNetCashFlowBudget() { + return netCashFlowBudget; + } + + public void setNetCashFlowBudget(BigDecimal netCashFlowBudget) { + this.netCashFlowBudget = netCashFlowBudget; + } + + public BigDecimal getCashInflowFromInvestingActivitiesBudget() { + return cashInflowFromInvestingActivitiesBudget; + } + + public void setCashInflowFromInvestingActivitiesBudget(BigDecimal cashInflowFromInvestingActivitiesBudget) { + this.cashInflowFromInvestingActivitiesBudget = cashInflowFromInvestingActivitiesBudget; + } + + public BigDecimal getCashOutflowFromInvestingActivitiesBudget() { + return cashOutflowFromInvestingActivitiesBudget; + } + + public void setCashOutflowFromInvestingActivitiesBudget(BigDecimal cashOutflowFromInvestingActivitiesBudget) { + this.cashOutflowFromInvestingActivitiesBudget = cashOutflowFromInvestingActivitiesBudget; + } + + public BigDecimal getNetCashFromInvestingActivitiesBudget() { + return netCashFromInvestingActivitiesBudget; + } + + public void setNetCashFromInvestingActivitiesBudget(BigDecimal netCashFromInvestingActivitiesBudget) { + this.netCashFromInvestingActivitiesBudget = netCashFromInvestingActivitiesBudget; + } + + public BigDecimal getFinancingCapitalInflowBudget() { + return financingCapitalInflowBudget; + } + + public void setFinancingCapitalInflowBudget(BigDecimal financingCapitalInflowBudget) { + this.financingCapitalInflowBudget = financingCapitalInflowBudget; + } + + public BigDecimal getFinancingCapitalOutflowBudget() { + return financingCapitalOutflowBudget; + } + + public void setFinancingCapitalOutflowBudget(BigDecimal financingCapitalOutflowBudget) { + this.financingCapitalOutflowBudget = financingCapitalOutflowBudget; + } + + public BigDecimal getFinancingCapitalCashflowBudget() { + return financingCapitalCashflowBudget; + } + + public void setFinancingCapitalCashflowBudget(BigDecimal financingCapitalCashflowBudget) { + this.financingCapitalCashflowBudget = financingCapitalCashflowBudget; + } + + public BigDecimal getNetIncreaseMonetaryFundsBudget() { + return netIncreaseMonetaryFundsBudget; + } + + public void setNetIncreaseMonetaryFundsBudget(BigDecimal netIncreaseMonetaryFundsBudget) { + this.netIncreaseMonetaryFundsBudget = netIncreaseMonetaryFundsBudget; + } +} diff --git a/src/main/java/cn/palmte/work/bean/EstimateSettleBean.java b/src/main/java/cn/palmte/work/bean/EstimateSettleBean.java new file mode 100644 index 0000000..9e3b5ec --- /dev/null +++ b/src/main/java/cn/palmte/work/bean/EstimateSettleBean.java @@ -0,0 +1,250 @@ +package cn.palmte.work.bean; + +import java.math.BigDecimal; + +public class EstimateSettleBean { + + //========================收入表================================ + + /** + * 设备类决算总额 + */ + private BigDecimal incomeDeviceEstimateTotal; + + /** + * 工程类决算总额 + */ + private BigDecimal incomeEngineerEstimateTotal; + + /** + * 服务类决算总额 + */ + private BigDecimal incomeServiceEstimateTotal; + + //========================成本表================================ + + /** + * 设备采购成本决算总额 + */ + private BigDecimal costPurchaseDeviceEstimateTotal; + + /** + * 施工采购成本决算总额 + */ + private BigDecimal costPurchaseBuildEstimateTotal; + + /** + * 服务采购成本决算总额 + */ + private BigDecimal costPurchaseServiceEstimateTotal; + + /** + * 其他采购成本决算总额 + */ + private BigDecimal costPurchaseOtherEstimateTotal; + + /** + * 项目管理成本决算总额 + */ + private BigDecimal costProjectManageEstimateTotal; + + /** + * 其他成本决算总额 + */ + private BigDecimal costOtherEstimateTotal; + + + //========================管理表================================ + + /** + * 财务费用决算总额 + */ + private BigDecimal costExpropriationEstimateTotal; + + /** + * 公司管理费用决算总额 + */ + private BigDecimal costCompanyManageEstimateTotal; + + /** + * 所得税费用决算总额 + */ + private BigDecimal costIncomeTaxEstimateTotal; + + + //========================利润率计算表================================ + + /** + * 项目毛利决算总额 + */ + private BigDecimal grossProfitEstimateTotal; + + /** + * 项目毛利利润率 + */ + private BigDecimal grossProfitProfitMargin; + + /** + * 项目贡献利润决算总额 + */ + private BigDecimal contributionProfitEstimateTotal; + + /** + * 项目贡献利润利润率 + */ + private BigDecimal contributionProfitProfitMargin; + + /** + * 项目净利润决算总额 + */ + private BigDecimal netProfitEstimateTotal; + + /** + * 项目净利润利润率 + */ + private BigDecimal netProfitProfitMargin; + + public BigDecimal getIncomeDeviceEstimateTotal() { + return incomeDeviceEstimateTotal; + } + + public void setIncomeDeviceEstimateTotal(BigDecimal incomeDeviceEstimateTotal) { + this.incomeDeviceEstimateTotal = incomeDeviceEstimateTotal; + } + + public BigDecimal getIncomeEngineerEstimateTotal() { + return incomeEngineerEstimateTotal; + } + + public void setIncomeEngineerEstimateTotal(BigDecimal incomeEngineerEstimateTotal) { + this.incomeEngineerEstimateTotal = incomeEngineerEstimateTotal; + } + + public BigDecimal getIncomeServiceEstimateTotal() { + return incomeServiceEstimateTotal; + } + + public void setIncomeServiceEstimateTotal(BigDecimal incomeServiceEstimateTotal) { + this.incomeServiceEstimateTotal = incomeServiceEstimateTotal; + } + + public BigDecimal getCostPurchaseDeviceEstimateTotal() { + return costPurchaseDeviceEstimateTotal; + } + + public void setCostPurchaseDeviceEstimateTotal(BigDecimal costPurchaseDeviceEstimateTotal) { + this.costPurchaseDeviceEstimateTotal = costPurchaseDeviceEstimateTotal; + } + + public BigDecimal getCostPurchaseBuildEstimateTotal() { + return costPurchaseBuildEstimateTotal; + } + + public void setCostPurchaseBuildEstimateTotal(BigDecimal costPurchaseBuildEstimateTotal) { + this.costPurchaseBuildEstimateTotal = costPurchaseBuildEstimateTotal; + } + + public BigDecimal getCostPurchaseServiceEstimateTotal() { + return costPurchaseServiceEstimateTotal; + } + + public void setCostPurchaseServiceEstimateTotal(BigDecimal costPurchaseServiceEstimateTotal) { + this.costPurchaseServiceEstimateTotal = costPurchaseServiceEstimateTotal; + } + + public BigDecimal getCostPurchaseOtherEstimateTotal() { + return costPurchaseOtherEstimateTotal; + } + + public void setCostPurchaseOtherEstimateTotal(BigDecimal costPurchaseOtherEstimateTotal) { + this.costPurchaseOtherEstimateTotal = costPurchaseOtherEstimateTotal; + } + + public BigDecimal getCostProjectManageEstimateTotal() { + return costProjectManageEstimateTotal; + } + + public void setCostProjectManageEstimateTotal(BigDecimal costProjectManageEstimateTotal) { + this.costProjectManageEstimateTotal = costProjectManageEstimateTotal; + } + + public BigDecimal getCostOtherEstimateTotal() { + return costOtherEstimateTotal; + } + + public void setCostOtherEstimateTotal(BigDecimal costOtherEstimateTotal) { + this.costOtherEstimateTotal = costOtherEstimateTotal; + } + + public BigDecimal getCostExpropriationEstimateTotal() { + return costExpropriationEstimateTotal; + } + + public void setCostExpropriationEstimateTotal(BigDecimal costExpropriationEstimateTotal) { + this.costExpropriationEstimateTotal = costExpropriationEstimateTotal; + } + + public BigDecimal getCostCompanyManageEstimateTotal() { + return costCompanyManageEstimateTotal; + } + + public void setCostCompanyManageEstimateTotal(BigDecimal costCompanyManageEstimateTotal) { + this.costCompanyManageEstimateTotal = costCompanyManageEstimateTotal; + } + + public BigDecimal getCostIncomeTaxEstimateTotal() { + return costIncomeTaxEstimateTotal; + } + + public void setCostIncomeTaxEstimateTotal(BigDecimal costIncomeTaxEstimateTotal) { + this.costIncomeTaxEstimateTotal = costIncomeTaxEstimateTotal; + } + + public BigDecimal getGrossProfitEstimateTotal() { + return grossProfitEstimateTotal; + } + + public void setGrossProfitEstimateTotal(BigDecimal grossProfitEstimateTotal) { + this.grossProfitEstimateTotal = grossProfitEstimateTotal; + } + + public BigDecimal getGrossProfitProfitMargin() { + return grossProfitProfitMargin; + } + + public void setGrossProfitProfitMargin(BigDecimal grossProfitProfitMargin) { + this.grossProfitProfitMargin = grossProfitProfitMargin; + } + + public BigDecimal getContributionProfitEstimateTotal() { + return contributionProfitEstimateTotal; + } + + public void setContributionProfitEstimateTotal(BigDecimal contributionProfitEstimateTotal) { + this.contributionProfitEstimateTotal = contributionProfitEstimateTotal; + } + + public BigDecimal getContributionProfitProfitMargin() { + return contributionProfitProfitMargin; + } + + public void setContributionProfitProfitMargin(BigDecimal contributionProfitProfitMargin) { + this.contributionProfitProfitMargin = contributionProfitProfitMargin; + } + + public BigDecimal getNetProfitEstimateTotal() { + return netProfitEstimateTotal; + } + + public void setNetProfitEstimateTotal(BigDecimal netProfitEstimateTotal) { + this.netProfitEstimateTotal = netProfitEstimateTotal; + } + + public BigDecimal getNetProfitProfitMargin() { + return netProfitProfitMargin; + } + + public void setNetProfitProfitMargin(BigDecimal netProfitProfitMargin) { + this.netProfitProfitMargin = netProfitProfitMargin; + } +} diff --git a/src/main/java/cn/palmte/work/bean/FormerBean.java b/src/main/java/cn/palmte/work/bean/FormerBean.java new file mode 100644 index 0000000..b7d322b --- /dev/null +++ b/src/main/java/cn/palmte/work/bean/FormerBean.java @@ -0,0 +1,263 @@ +package cn.palmte.work.bean; + +import java.math.BigDecimal; + +/** + * @author Yuanping Zhang + * @date 2021/11/15 + */ +public class FormerBean extends IncomeCostBean{ + + /** + * 所得税 + */ + private BigDecimal costIncomeTax; + /** + * 管理总计 + */ + private BigDecimal costManageTotal; + /** + * 毛利润 + */ + private BigDecimal grossProfit; + /** + * 贡献利润 + */ + private BigDecimal contributionProfit; + /** + * 净利润 + */ + private BigDecimal netProfit; + /** + * a销售商品、提供劳务收到的现金 + * */ + private BigDecimal saleIncomeCash; + /** + * b收到的税费返还 + * */ + private BigDecimal taxReturn; + /** + * c其他与经营活动有关的现金【保证金收入】 + */ + private BigDecimal earnestMoneyIncome; + /** + * d购买商品、接受劳务支付的现金【设备支出+工程支出】 + */ + private BigDecimal purchaseCost; + /** + * e支付的各项税费 + */ + private BigDecimal taxCost; + /** + *f支付其他与经营活动有关的现金 + */ + private BigDecimal earnestMoneyCost; + /** + * g经营活动产生的现金流量净额 + */ + private BigDecimal netCashFlow; + /** + * h投资活动现金流入 + */ + private BigDecimal cashInflowFromInvestingActivities; + /** + * i投资活动现金流出 + */ + private BigDecimal cashOutflowFromInvestingActivities; + /** + * j投资活动产生的现金流量净额 + */ + private BigDecimal netCashFromInvestingActivities; + /** + * k融资资金流入【垫资计划】 + */ + private BigDecimal financingCapitalInflow; + /** + * l融资资金流出【还款计划】 + */ + private BigDecimal financingCapitalOutflow; + /** + *m筹资活动产生的现金流量净额 + */ + private BigDecimal financingCapitalCashflow; + /** + * n货币资金净增加额 + */ + private BigDecimal netIncreaseMonetaryFunds; + /** + * 现金流量总计 + */ + private BigDecimal cashFlowTotal; + + public BigDecimal getCostIncomeTax() { + return costIncomeTax; + } + + public void setCostIncomeTax(BigDecimal costIncomeTax) { + this.costIncomeTax = costIncomeTax; + } + + public BigDecimal getCostManageTotal() { + return costManageTotal; + } + + public void setCostManageTotal(BigDecimal costManageTotal) { + this.costManageTotal = costManageTotal; + } + + public BigDecimal getGrossProfit() { + return grossProfit; + } + + public void setGrossProfit(BigDecimal grossProfit) { + this.grossProfit = grossProfit; + } + + public BigDecimal getContributionProfit() { + return contributionProfit; + } + + public void setContributionProfit(BigDecimal contributionProfit) { + this.contributionProfit = contributionProfit; + } + + public BigDecimal getNetProfit() { + return netProfit; + } + + public void setNetProfit(BigDecimal netProfit) { + this.netProfit = netProfit; + } + + public BigDecimal getSaleIncomeCash() { + return saleIncomeCash; + } + + public void setSaleIncomeCash(BigDecimal saleIncomeCash) { + this.saleIncomeCash = saleIncomeCash; + } + + public BigDecimal getTaxReturn() { + return taxReturn; + } + + public void setTaxReturn(BigDecimal taxReturn) { + this.taxReturn = taxReturn; + } + + public BigDecimal getEarnestMoneyIncome() { + return earnestMoneyIncome; + } + + public void setEarnestMoneyIncome(BigDecimal earnestMoneyIncome) { + this.earnestMoneyIncome = earnestMoneyIncome; + } + + public BigDecimal getPurchaseCost() { + return purchaseCost; + } + + public void setPurchaseCost(BigDecimal purchaseCost) { + this.purchaseCost = purchaseCost; + } + + public BigDecimal getTaxCost() { + return taxCost; + } + + public void setTaxCost(BigDecimal taxCost) { + this.taxCost = taxCost; + } + + public BigDecimal getEarnestMoneyCost() { + return earnestMoneyCost; + } + + public void setEarnestMoneyCost(BigDecimal earnestMoneyCost) { + this.earnestMoneyCost = earnestMoneyCost; + } + + public BigDecimal getNetCashFlow() { + return netCashFlow; + } + + public void setNetCashFlow(BigDecimal netCashFlow) { + this.netCashFlow = netCashFlow; + } + + public BigDecimal getCashInflowFromInvestingActivities() { + return cashInflowFromInvestingActivities; + } + + public void setCashInflowFromInvestingActivities(BigDecimal cashInflowFromInvestingActivities) { + this.cashInflowFromInvestingActivities = cashInflowFromInvestingActivities; + } + + public BigDecimal getCashOutflowFromInvestingActivities() { + return cashOutflowFromInvestingActivities; + } + + public void setCashOutflowFromInvestingActivities(BigDecimal cashOutflowFromInvestingActivities) { + this.cashOutflowFromInvestingActivities = cashOutflowFromInvestingActivities; + } + + public BigDecimal getNetCashFromInvestingActivities() { + return netCashFromInvestingActivities; + } + + public void setNetCashFromInvestingActivities(BigDecimal netCashFromInvestingActivities) { + this.netCashFromInvestingActivities = netCashFromInvestingActivities; + } + + public BigDecimal getFinancingCapitalInflow() { + return financingCapitalInflow; + } + + public void setFinancingCapitalInflow(BigDecimal financingCapitalInflow) { + this.financingCapitalInflow = financingCapitalInflow; + } + + public BigDecimal getFinancingCapitalOutflow() { + return financingCapitalOutflow; + } + + public void setFinancingCapitalOutflow(BigDecimal financingCapitalOutflow) { + this.financingCapitalOutflow = financingCapitalOutflow; + } + + public BigDecimal getFinancingCapitalCashflow() { + return financingCapitalCashflow; + } + + public void setFinancingCapitalCashflow(BigDecimal financingCapitalCashflow) { + this.financingCapitalCashflow = financingCapitalCashflow; + } + + public BigDecimal getNetIncreaseMonetaryFunds() { + return netIncreaseMonetaryFunds; + } + + public void setNetIncreaseMonetaryFunds(BigDecimal netIncreaseMonetaryFunds) { + this.netIncreaseMonetaryFunds = netIncreaseMonetaryFunds; + } + + public BigDecimal getCashFlowTotal() { +// cashFlowTotal = 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); + return cashFlowTotal; + } + + public void setCashFlowTotal(BigDecimal cashFlowTotal) { + this.cashFlowTotal = cashFlowTotal; + } + + /** + * 原样返回 + */ + @Override + protected BigDecimal handleSpecial(BigDecimal src) { + return src; + } +} diff --git a/src/main/java/cn/palmte/work/bean/SettleBean.java b/src/main/java/cn/palmte/work/bean/SettleBean.java new file mode 100644 index 0000000..fb366e7 --- /dev/null +++ b/src/main/java/cn/palmte/work/bean/SettleBean.java @@ -0,0 +1,425 @@ +package cn.palmte.work.bean; + +import java.math.BigDecimal; + +public class SettleBean { + + //========================收入表================================ + + /** + * 设备类决算总额 + */ + private BigDecimal incomeDevice; + + /** + * 工程类决算总额 + */ + private BigDecimal incomeEngineer; + + /** + * 服务类决算总额 + */ + private BigDecimal incomeService; + + + //========================成本表================================ + + /** + *设备采购成本决算总额 + */ + private BigDecimal costPurchaseDevice; + + /** + *施工采购成本决算总额 + */ + private BigDecimal costPurchaseBuild; + + /** + *服务采购成本决算总额 + */ + private BigDecimal costPurchaseService; + + /** + *其他采购成本决算总额 + */ + private BigDecimal costPurchaseOther; + + /** + * 项目管理成本决算总额 + */ + private BigDecimal costProjectManage; + + /** + * 其他成本决算总额 + */ + private BigDecimal costOther; + + + //========================管理表================================ + + /** + * 财务费用决算总额 + */ + private BigDecimal costExpropriation; + + /** + * 公司管理费用决算总额 + */ + private BigDecimal costCompanyManage; + + /** + * 所得税费用决算总额 + */ + private BigDecimal costIncomeTax; + + + //========================利润率计算表================================ + + /** + * 项目毛利决算总额 + */ + private BigDecimal grossProfit; + + /** + * 项目毛利利润率 + */ + private BigDecimal grossProfitProfitMargin; + + /** + * 项目贡献利润决算总额 + */ + private BigDecimal contributionProfit; + + /** + * 项目贡献利润利润率 + */ + private BigDecimal contributionProfitProfitMargin; + + /** + * 项目净利润决算总额 + */ + private BigDecimal netProfit; + + /** + * 项目净利润利润率 + */ + private BigDecimal netProfitProfitMargin; + + //========================结算现金流量表================================ + + /** + * a销售商品、提供劳务收到的现金 + * */ + private BigDecimal saleIncomeCash; + /** + * b收到的税费返还 + * */ + private BigDecimal taxReturn; + /** + * c其他与经营活动有关的现金【保证金收入】 + */ + private BigDecimal earnestMoneyIncome; + /** + * d购买商品、接受劳务支付的现金【设备支出+工程支出】 + */ + private BigDecimal purchaseCost; + /** + * e支付的各项税费 + */ + private BigDecimal taxCost; + /** + *f支付其他与经营活动有关的现金 + */ + private BigDecimal earnestMoneyCost; + /** + * g经营活动产生的现金流量净额 + * g=a+c+b-d-f-e + */ + private BigDecimal netCashFlow; + /** + * h投资活动现金流入 + */ + private BigDecimal cashInflowFromInvestingActivities; + /** + * i投资活动现金流出 + */ + private BigDecimal cashOutflowFromInvestingActivities; + /** + * j投资活动产生的现金流量净额 + */ + private BigDecimal netCashFromInvestingActivities; + /** + * k融资资金流入【垫资计划】 + */ + private BigDecimal financingCapitalInflow; + /** + * l融资资金流出【还款计划】 + */ + private BigDecimal financingCapitalOutflow; + /** + *m筹资活动产生的现金流量净额 + * m=k-l + */ + private BigDecimal financingCapitalCashflow; + /** + * n货币资金净增加额 + * n=g+j+m + */ + private BigDecimal netIncreaseMonetaryFunds; + + public BigDecimal getIncomeDevice() { + return incomeDevice; + } + + public void setIncomeDevice(BigDecimal incomeDevice) { + this.incomeDevice = incomeDevice; + } + + public BigDecimal getIncomeEngineer() { + return incomeEngineer; + } + + public void setIncomeEngineer(BigDecimal incomeEngineer) { + this.incomeEngineer = incomeEngineer; + } + + public BigDecimal getIncomeService() { + return incomeService; + } + + public void setIncomeService(BigDecimal incomeService) { + this.incomeService = incomeService; + } + + public BigDecimal getCostPurchaseDevice() { + return costPurchaseDevice; + } + + public void setCostPurchaseDevice(BigDecimal costPurchaseDevice) { + this.costPurchaseDevice = costPurchaseDevice; + } + + public BigDecimal getCostPurchaseBuild() { + return costPurchaseBuild; + } + + public void setCostPurchaseBuild(BigDecimal costPurchaseBuild) { + this.costPurchaseBuild = costPurchaseBuild; + } + + public BigDecimal getCostPurchaseService() { + return costPurchaseService; + } + + public void setCostPurchaseService(BigDecimal costPurchaseService) { + this.costPurchaseService = costPurchaseService; + } + + public BigDecimal getCostPurchaseOther() { + return costPurchaseOther; + } + + public void setCostPurchaseOther(BigDecimal costPurchaseOther) { + this.costPurchaseOther = costPurchaseOther; + } + + public BigDecimal getCostProjectManage() { + return costProjectManage; + } + + public void setCostProjectManage(BigDecimal costProjectManage) { + this.costProjectManage = costProjectManage; + } + + public BigDecimal getCostOther() { + return costOther; + } + + public void setCostOther(BigDecimal costOther) { + this.costOther = costOther; + } + + public BigDecimal getCostExpropriation() { + return costExpropriation; + } + + public void setCostExpropriation(BigDecimal costExpropriation) { + this.costExpropriation = costExpropriation; + } + + public BigDecimal getCostCompanyManage() { + return costCompanyManage; + } + + public void setCostCompanyManage(BigDecimal costCompanyManage) { + this.costCompanyManage = costCompanyManage; + } + + public BigDecimal getCostIncomeTax() { + return costIncomeTax; + } + + public void setCostIncomeTax(BigDecimal costIncomeTax) { + this.costIncomeTax = costIncomeTax; + } + + public BigDecimal getGrossProfit() { + return grossProfit; + } + + public void setGrossProfit(BigDecimal grossProfit) { + this.grossProfit = grossProfit; + } + + public BigDecimal getGrossProfitProfitMargin() { + return grossProfitProfitMargin; + } + + public void setGrossProfitProfitMargin(BigDecimal grossProfitProfitMargin) { + this.grossProfitProfitMargin = grossProfitProfitMargin; + } + + public BigDecimal getContributionProfit() { + return contributionProfit; + } + + public void setContributionProfit(BigDecimal contributionProfit) { + this.contributionProfit = contributionProfit; + } + + public BigDecimal getContributionProfitProfitMargin() { + return contributionProfitProfitMargin; + } + + public void setContributionProfitProfitMargin(BigDecimal contributionProfitProfitMargin) { + this.contributionProfitProfitMargin = contributionProfitProfitMargin; + } + + public BigDecimal getNetProfit() { + return netProfit; + } + + public void setNetProfit(BigDecimal netProfit) { + this.netProfit = netProfit; + } + + public BigDecimal getNetProfitProfitMargin() { + return netProfitProfitMargin; + } + + public void setNetProfitProfitMargin(BigDecimal netProfitProfitMargin) { + this.netProfitProfitMargin = netProfitProfitMargin; + } + + public BigDecimal getSaleIncomeCash() { + return saleIncomeCash; + } + + public void setSaleIncomeCash(BigDecimal saleIncomeCash) { + this.saleIncomeCash = saleIncomeCash; + } + + public BigDecimal getTaxReturn() { + return taxReturn; + } + + public void setTaxReturn(BigDecimal taxReturn) { + this.taxReturn = taxReturn; + } + + public BigDecimal getEarnestMoneyIncome() { + return earnestMoneyIncome; + } + + public void setEarnestMoneyIncome(BigDecimal earnestMoneyIncome) { + this.earnestMoneyIncome = earnestMoneyIncome; + } + + public BigDecimal getPurchaseCost() { + return purchaseCost; + } + + public void setPurchaseCost(BigDecimal purchaseCost) { + this.purchaseCost = purchaseCost; + } + + public BigDecimal getTaxCost() { + return taxCost; + } + + public void setTaxCost(BigDecimal taxCost) { + this.taxCost = taxCost; + } + + public BigDecimal getEarnestMoneyCost() { + return earnestMoneyCost; + } + + public void setEarnestMoneyCost(BigDecimal earnestMoneyCost) { + this.earnestMoneyCost = earnestMoneyCost; + } + + public BigDecimal getCashInflowFromInvestingActivities() { + return cashInflowFromInvestingActivities; + } + + public void setCashInflowFromInvestingActivities(BigDecimal cashInflowFromInvestingActivities) { + this.cashInflowFromInvestingActivities = cashInflowFromInvestingActivities; + } + + public BigDecimal getCashOutflowFromInvestingActivities() { + return cashOutflowFromInvestingActivities; + } + + public void setCashOutflowFromInvestingActivities(BigDecimal cashOutflowFromInvestingActivities) { + this.cashOutflowFromInvestingActivities = cashOutflowFromInvestingActivities; + } + + public BigDecimal getNetCashFromInvestingActivities() { + return netCashFromInvestingActivities; + } + + public void setNetCashFromInvestingActivities(BigDecimal netCashFromInvestingActivities) { + this.netCashFromInvestingActivities = netCashFromInvestingActivities; + } + + public BigDecimal getFinancingCapitalInflow() { + return financingCapitalInflow; + } + + public void setFinancingCapitalInflow(BigDecimal financingCapitalInflow) { + this.financingCapitalInflow = financingCapitalInflow; + } + + public BigDecimal getFinancingCapitalOutflow() { + return financingCapitalOutflow; + } + + public void setFinancingCapitalOutflow(BigDecimal financingCapitalOutflow) { + this.financingCapitalOutflow = financingCapitalOutflow; + } + + public BigDecimal getFinancingCapitalCashflow() { + return financingCapitalCashflow; + } + + public void setFinancingCapitalCashflow(BigDecimal financingCapitalCashflow) { + this.financingCapitalCashflow = financingCapitalCashflow; + } + + public BigDecimal getNetIncreaseMonetaryFunds() { + return netIncreaseMonetaryFunds; + } + + public void setNetIncreaseMonetaryFunds(BigDecimal netIncreaseMonetaryFunds) { + this.netIncreaseMonetaryFunds = netIncreaseMonetaryFunds; + } + + public BigDecimal getNetCashFlow() { + return netCashFlow; + } + + public void setNetCashFlow(BigDecimal netCashFlow) { + this.netCashFlow = netCashFlow; + } +} diff --git a/src/main/java/cn/palmte/work/controller/backend/ProjectSettleController.java b/src/main/java/cn/palmte/work/controller/backend/ProjectSettleController.java new file mode 100644 index 0000000..fec35ec --- /dev/null +++ b/src/main/java/cn/palmte/work/controller/backend/ProjectSettleController.java @@ -0,0 +1,85 @@ +package cn.palmte.work.controller.backend; + +import cn.palmte.work.bean.*; +import cn.palmte.work.model.Project; +import cn.palmte.work.model.ProjectBudgetPlanDetail; +import cn.palmte.work.service.ProjectBudgetService; +import cn.palmte.work.service.ProjectEstimateService; +import cn.palmte.work.service.ProjectService; +import cn.palmte.work.service.ProjectSettleService; +import cn.palmte.work.utils.FreeMarkerUtil; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; + +import java.util.List; +import java.util.Map; + +/** + * + * @author Yuanping Zhang + * @date 2021/11/15 + */ +@Controller +@RequestMapping("/project/settle") +public class ProjectSettleController extends BaseController{ + + @Autowired + private ProjectService projectService; + + @Autowired + private ProjectEstimateService projectEstimateService; + + @Autowired + private ProjectBudgetService projectBudgetService; + + @Autowired + private ProjectSettleService projectSettleService; + + @RequestMapping("/add") + public String add(@RequestParam("id") int id, Map model) { + Project project = projectService.getProject(id); + List projectBudgetPlanDetails = projectBudgetService.getProjectBudgetPlanDetails(project); + String time = "2021-11"; + model.put("time", time); + model.put("project", project); + model.put("estimateBean", projectEstimateService.getEstimate(project)); + model.put("budgetBean", projectBudgetService.getBudget(project)); + model.put("formerBean", projectSettleService.getFormerSettle(project, time)); + //现金表 + model.put("cashFlowBean", projectBudgetService.getCashFlowBean(project, projectBudgetPlanDetails)); + //freemarker可以利用的静态方法 + model.put("Utils", FreeMarkerUtil.fromStaticPackage("cn.palmte.work.utils.Utils")); + return "admin/project_settle_add"; + } + + @RequestMapping("/edit") + public String edit(@RequestParam("id") int id, Map model) { + Project project = projectService.getProject(id); + List projectBudgetPlanDetails = projectBudgetService.getProjectBudgetPlanDetails(project); + String time = "2021-11"; + model.put("time", time); + model.put("project", project); + model.put("estimateBean", projectEstimateService.getEstimate(project)); + model.put("budgetBean", projectBudgetService.getBudget(project)); + model.put("formerBean", projectSettleService.getFormerSettle(project, time)); + //现金表 + model.put("cashFlowBean", projectBudgetService.getCashFlowBean(project, projectBudgetPlanDetails)); + //freemarker可以利用的静态方法 + model.put("Utils", FreeMarkerUtil.fromStaticPackage("cn.palmte.work.utils.Utils")); + return "admin/project_settle_edit"; + } + + @RequestMapping("/save") + public String save(Project project, SettleBean settleBean, BudgetSettleBean budgetBean, EstimateSettleBean estimateBean, String time) { + projectSettleService.save(project, settleBean, budgetBean, estimateBean, time); + return "redirect:/project/list"; + } + + @RequestMapping("/saveAndApprove") + public String saveAndApprove(Project project, SettleBean settleBean, BudgetSettleBean budgetBean, EstimateSettleBean estimateBean, String time) { + projectSettleService.saveAndApprove(project, settleBean, budgetBean, estimateBean, time); + return "redirect:/project/list"; + } +} diff --git a/src/main/java/cn/palmte/work/controller/backend/ProjectSummaryController.java b/src/main/java/cn/palmte/work/controller/backend/ProjectSummaryController.java new file mode 100644 index 0000000..838a82d --- /dev/null +++ b/src/main/java/cn/palmte/work/controller/backend/ProjectSummaryController.java @@ -0,0 +1,51 @@ +package cn.palmte.work.controller.backend; + +import cn.palmte.work.model.Admin; +import cn.palmte.work.service.ProjectSummaryService; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; +import top.jfunc.common.db.bean.Page; +import top.jfunc.common.db.bean.Record; + +import java.util.List; +import java.util.Map; +import java.util.concurrent.ConcurrentHashMap; + +/** + * 项目汇总统计 + * @author Yuanping Zhang + * @date 2021/11/10 + */ +@Controller +@RequestMapping("/projectSummary") +public class ProjectSummaryController extends BaseController { + private static final Logger logger = LoggerFactory.getLogger(ProjectSummaryController.class); + + @Autowired + private ProjectSummaryService projectSummaryService; + + /** + * 列表 + */ + @RequestMapping("/list") + public String list(@RequestParam(value = KEYWORDS, required = false) String keywords, + @RequestParam(value = PAGE_NUMBER, defaultValue = DEFAULT_PAGE_NUMBER) int pageNumber, + @RequestParam(value = PAGE_SIZE, defaultValue = DEFAULT_PAGE_SIZE) int pageSize, + Map model) { + //当前登录人的角色类型 + Admin admin = getAdmin(); + model.put("keywords",keywords); + ConcurrentHashMap searchInfo = getSearchInfo(keywords,model); + List> list = projectSummaryService.getList(searchInfo, pageNumber, pageSize); + + model.put("pager1", list.get(0)); + model.put("pager2", list.get(1)); + model.put("pager3", list.get(2)); + + return "admin/project_summary"; + } +} diff --git a/src/main/java/cn/palmte/work/model/ProjectSettleCashFlow.java b/src/main/java/cn/palmte/work/model/ProjectSettleCashFlow.java new file mode 100644 index 0000000..97af22a --- /dev/null +++ b/src/main/java/cn/palmte/work/model/ProjectSettleCashFlow.java @@ -0,0 +1,101 @@ +package cn.palmte.work.model; + +import org.hibernate.annotations.GenericGenerator; + +import javax.persistence.*; +import java.math.BigDecimal; + +/** + * 项目结算现金流量表 + * @author Yuanping Zhang + * @date 2021/11/10 + */ +@Entity +@Table(name = "project_settle_cash_flow") +public class ProjectSettleCashFlow { + public static final int SALE_INCOME_CASH = 1;//销售商品、提供劳务收到的现金 + public static final int TAX_RETURN = 2;//收到的税费返还 + public static final int EARNEST_MONEY_INCOME = 3;//收到其他与经营活动有关的现金 + public static final int PURCHASE_COST = 4;//购买商品、接受劳务支付的现金 + public static final int TAX_COST = 5;//支付的各项税费 + public static final int EARNEST_MONEY_COST = 6;//支付其他与经营活动有关的现金 + public static final int NET_CASH_FLOW = 7;//经营活动产生的现金流量净额 + public static final int CASH_INFLOW_FROM_INVESTING_ACTIVITIES = 8;//投资活动现金流入 + public static final int CASH_OUTFLOW_FROM_INVESTING_ACTIVITIES = 9;//投资活动现金流出 + public static final int NET_CASH_FROM_INVESTING_ACTIVITIES = 10;//投资活动产生的现金流量净额 + public static final int FINANCING_CAPITAL_INFLOW = 11;//融资资金流入 + public static final int FINANCING_CAPITAL_OUTFLOW = 12;//还款资金流出 + public static final int FINANCING_CAPITAL_CASHFLOW = 13;//筹资活动产生的现金流量净额 + public static final int NET_INCREASE_MONETARY_FUNDS = 14;//货币资金净增加额 + + /** + * id + */ + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + @GenericGenerator(name = "persistenceGenerator", strategy = "increment") + private Integer id; + + @Column(name = "project_id") + private int projectId; + + @Column(name = "type") + private int type; + + @Column(name = "amount") + private BigDecimal amount; + + @Column(name = "time") + private String time; + + @Column(name = "budget") + private BigDecimal budget; + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public int getProjectId() { + return projectId; + } + + public void setProjectId(int projectId) { + this.projectId = projectId; + } + + public int getType() { + return type; + } + + public void setType(int type) { + this.type = type; + } + + public BigDecimal getAmount() { + return amount; + } + + public void setAmount(BigDecimal amount) { + this.amount = amount; + } + + public String getTime() { + return time; + } + + public void setTime(String time) { + this.time = time; + } + + public BigDecimal getBudget() { + return budget; + } + + public void setBudget(BigDecimal budget) { + this.budget = budget; + } +} \ No newline at end of file diff --git a/src/main/java/cn/palmte/work/model/ProjectSettleCashFlowRepository.java b/src/main/java/cn/palmte/work/model/ProjectSettleCashFlowRepository.java new file mode 100644 index 0000000..57d57ed --- /dev/null +++ b/src/main/java/cn/palmte/work/model/ProjectSettleCashFlowRepository.java @@ -0,0 +1,18 @@ +package cn.palmte.work.model; + +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.data.jpa.repository.Query; + +import java.util.List; + +/** + * @author Yuanping Zhang + * @date 2021/11/11 + */ +public interface ProjectSettleCashFlowRepository extends JpaRepository { + + List findAllByProjectIdAndTime(int id, String time); + + @Query(value = "select * from project_settle_cash_flow where project_id = ?1 and time < ?2", nativeQuery = true) + List findAllByProjectIdBefore(int id, String time); +} diff --git a/src/main/java/cn/palmte/work/model/ProjectSettleCost.java b/src/main/java/cn/palmte/work/model/ProjectSettleCost.java new file mode 100644 index 0000000..9232a4a --- /dev/null +++ b/src/main/java/cn/palmte/work/model/ProjectSettleCost.java @@ -0,0 +1,118 @@ +package cn.palmte.work.model; + +import org.hibernate.annotations.GenericGenerator; + +import javax.persistence.*; +import java.math.BigDecimal; + +/** + * 项目结算成本表 + * @author Yuanping Zhang + * @date 2021/11/10 + */ +@Entity +@Table(name = "project_settle_cost") +public class ProjectSettleCost { + public static final int FEE_PURCHASE = 1; + public static final int FEE_PROJECT_MANAGE = 2; + public static final int FEE_OTHER = 3; + + public static final int TYPE_DEVICE = 1; + public static final int TYPE_BUILDING = 2; + public static final int TYPE_SERVICE = 3; + public static final int TYPE_OTHER = 4; + public static final int TYPE_PROJECT_MANAGE = 5; + public static final int TYPE_OTHER_OTHER = 6; + /** + * id + */ + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + @GenericGenerator(name = "persistenceGenerator", strategy = "increment") + private Integer id; + + @Column(name = "project_id") + private int projectId; + + @Column(name = "fee") + private int fee; + + @Column(name = "type") + private int type; + + @Column(name = "cost_tax_exclude") + private BigDecimal costTaxExclude; + + @Column(name = "time") + private String time; + + @Column(name = "estimate") + private BigDecimal estimate; + + @Column(name = "budget") + private BigDecimal budget; + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public int getProjectId() { + return projectId; + } + + public void setProjectId(int projectId) { + this.projectId = projectId; + } + + public int getType() { + return type; + } + + public void setType(int type) { + this.type = type; + } + + public int getFee() { + return fee; + } + + public void setFee(int fee) { + this.fee = fee; + } + + public BigDecimal getCostTaxExclude() { + return costTaxExclude; + } + + public void setCostTaxExclude(BigDecimal costTaxExclude) { + this.costTaxExclude = costTaxExclude; + } + + public String getTime() { + return time; + } + + public void setTime(String time) { + this.time = time; + } + + public BigDecimal getEstimate() { + return estimate; + } + + public void setEstimate(BigDecimal estimate) { + this.estimate = estimate; + } + + public BigDecimal getBudget() { + return budget; + } + + public void setBudget(BigDecimal budget) { + this.budget = budget; + } +} \ No newline at end of file diff --git a/src/main/java/cn/palmte/work/model/ProjectSettleCostManage.java b/src/main/java/cn/palmte/work/model/ProjectSettleCostManage.java new file mode 100644 index 0000000..458dfa2 --- /dev/null +++ b/src/main/java/cn/palmte/work/model/ProjectSettleCostManage.java @@ -0,0 +1,101 @@ +package cn.palmte.work.model; + +import org.hibernate.annotations.GenericGenerator; + +import javax.persistence.*; +import java.math.BigDecimal; + +/** + * 项目结算收入表 + * @author Yuanping Zhang + * @date 2021/11/10 + */ +@Entity +@Table(name = "project_settle_cost_manage") +public class ProjectSettleCostManage { + public static final int TYPE_EXPROPRIATION = 1; + public static final int TYPE_COMPANY_MANAGE = 2; + public static final int TYPE_INCOME_TAX = 3; + + /** + * id + */ + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + @GenericGenerator(name = "persistenceGenerator", strategy = "increment") + private Integer id; + + @Column(name = "project_id") + private int projectId; + + @Column(name = "type") + private int type; + + @Column(name = "cost_tax_exclude") + private BigDecimal costTaxExclude; + + @Column(name = "time") + private String time; + + @Column(name = "estimate") + private BigDecimal estimate; + + @Column(name = "budget") + private BigDecimal budget; + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public int getProjectId() { + return projectId; + } + + public void setProjectId(int projectId) { + this.projectId = projectId; + } + + public int getType() { + return type; + } + + public void setType(int type) { + this.type = type; + } + + public BigDecimal getCostTaxExclude() { + return costTaxExclude; + } + + public void setCostTaxExclude(BigDecimal costTaxExclude) { + this.costTaxExclude = costTaxExclude; + } + + public String getTime() { + return time; + } + + public void setTime(String time) { + this.time = time; + } + + public BigDecimal getEstimate() { + return estimate; + } + + public void setEstimate(BigDecimal estimate) { + this.estimate = estimate; + } + + public BigDecimal getBudget() { + return budget; + } + + public void setBudget(BigDecimal budget) { + this.budget = budget; + } +} \ No newline at end of file diff --git a/src/main/java/cn/palmte/work/model/ProjectSettleCostManageRepository.java b/src/main/java/cn/palmte/work/model/ProjectSettleCostManageRepository.java new file mode 100644 index 0000000..766e1ca --- /dev/null +++ b/src/main/java/cn/palmte/work/model/ProjectSettleCostManageRepository.java @@ -0,0 +1,18 @@ +package cn.palmte.work.model; + +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.data.jpa.repository.Query; + +import java.util.List; + +/** + * @author Yuanping Zhang + * @date 2021/11/11 + */ +public interface ProjectSettleCostManageRepository extends JpaRepository { + + List findAllByProjectIdAndTime(int id, String time); + + @Query(value = "select * from project_settle_cost_manage where project_id = ?1 and time < ?2", nativeQuery = true) + List findAllByProjectIdBefore(int id, String time); +} diff --git a/src/main/java/cn/palmte/work/model/ProjectSettleCostRepository.java b/src/main/java/cn/palmte/work/model/ProjectSettleCostRepository.java new file mode 100644 index 0000000..11979ea --- /dev/null +++ b/src/main/java/cn/palmte/work/model/ProjectSettleCostRepository.java @@ -0,0 +1,18 @@ +package cn.palmte.work.model; + +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.data.jpa.repository.Query; + +import java.util.List; + +/** + * @author Yuanping Zhang + * @date 2021/11/11 + */ +public interface ProjectSettleCostRepository extends JpaRepository { + + List findAllByProjectIdAndTime(int id, String time); + + @Query(value = "select * from project_settle_cost where project_id = ?1 and time < ?2", nativeQuery = true) + List findAllByProjectIdBefore(int id, String time); +} diff --git a/src/main/java/cn/palmte/work/model/ProjectSettleIncome.java b/src/main/java/cn/palmte/work/model/ProjectSettleIncome.java new file mode 100644 index 0000000..9303093 --- /dev/null +++ b/src/main/java/cn/palmte/work/model/ProjectSettleIncome.java @@ -0,0 +1,101 @@ +package cn.palmte.work.model; + +import org.hibernate.annotations.GenericGenerator; + +import javax.persistence.*; +import java.math.BigDecimal; + +/** + * 项目结算收入表 + * @author Yuanping Zhang + * @date 2021/11/10 + */ +@Entity +@Table(name = "project_settle_income") +public class ProjectSettleIncome { + public static final int TYPE_DEVICE = 1; + public static final int TYPE_ENGINEER = 2; + public static final int TYPE_SERVICE = 3; + + /** + * id + */ + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + @GenericGenerator(name = "persistenceGenerator", strategy = "increment") + private Integer id; + + @Column(name = "project_id") + private int projectId; + + @Column(name = "type") + private int type; + + @Column(name = "income_tax_exclude") + private BigDecimal incomeTaxExclude; + + @Column(name = "time") + private String time; + + @Column(name = "estimate") + private BigDecimal estimate; + + @Column(name = "budget") + private BigDecimal budget; + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public int getProjectId() { + return projectId; + } + + public void setProjectId(int projectId) { + this.projectId = projectId; + } + + public int getType() { + return type; + } + + public void setType(int type) { + this.type = type; + } + + public BigDecimal getIncomeTaxExclude() { + return incomeTaxExclude; + } + + public void setIncomeTaxExclude(BigDecimal incomeTaxExclude) { + this.incomeTaxExclude = incomeTaxExclude; + } + + public String getTime() { + return time; + } + + public void setTime(String time) { + this.time = time; + } + + public BigDecimal getEstimate() { + return estimate; + } + + public void setEstimate(BigDecimal estimate) { + this.estimate = estimate; + } + + public BigDecimal getBudget() { + return budget; + } + + public void setBudget(BigDecimal budget) { + this.budget = budget; + } +} \ No newline at end of file diff --git a/src/main/java/cn/palmte/work/model/ProjectSettleIncomeRepository.java b/src/main/java/cn/palmte/work/model/ProjectSettleIncomeRepository.java new file mode 100644 index 0000000..4ac982f --- /dev/null +++ b/src/main/java/cn/palmte/work/model/ProjectSettleIncomeRepository.java @@ -0,0 +1,18 @@ +package cn.palmte.work.model; + +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.data.jpa.repository.Query; + +import java.util.List; + +/** + * @author Yuanping Zhang + * @date 2021/11/11 + */ +public interface ProjectSettleIncomeRepository extends JpaRepository { + + List findAllByProjectIdAndTime(int id, String time); + + @Query(value = "select * from project_settle_income where project_id = ?1 and time < ?2", nativeQuery = true) + List findAllByProjectIdBefore(int id, String time); +} diff --git a/src/main/java/cn/palmte/work/model/ProjectSettleProfitMargin.java b/src/main/java/cn/palmte/work/model/ProjectSettleProfitMargin.java new file mode 100644 index 0000000..c903cae --- /dev/null +++ b/src/main/java/cn/palmte/work/model/ProjectSettleProfitMargin.java @@ -0,0 +1,102 @@ +package cn.palmte.work.model; + +import org.hibernate.annotations.GenericGenerator; + +import javax.persistence.*; +import java.math.BigDecimal; + +/** + * 项目结算利润率表 + * @author Yuanping Zhang + * @date 2021/11/10 + */ +@Entity +@Table(name = "project_settle_profit_margin") +public class ProjectSettleProfitMargin { + + public static final int TYPE_GROSS_PROFIT = 1;//项目毛利 + public static final int TYPE_CONTRIBUTION_PROFIT = 2;//项目贡献利润 + public static final int TYPE_NET_PROFIT = 3;//项目净利润 + + /** + * id + */ + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + @GenericGenerator(name = "persistenceGenerator", strategy = "increment") + private Integer id; + + @Column(name = "project_id") + private int projectId; + + @Column(name = "type") + private int type; + + @Column(name = "amount") + private BigDecimal amount; + + @Column(name = "time") + private String time; + + @Column(name = "estimate") + private BigDecimal estimate; + + @Column(name = "budget") + private BigDecimal budget; + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public int getProjectId() { + return projectId; + } + + public void setProjectId(int projectId) { + this.projectId = projectId; + } + + public int getType() { + return type; + } + + public void setType(int type) { + this.type = type; + } + + public BigDecimal getAmount() { + return amount; + } + + public void setAmount(BigDecimal amount) { + this.amount = amount; + } + + public String getTime() { + return time; + } + + public void setTime(String time) { + this.time = time; + } + + public BigDecimal getEstimate() { + return estimate; + } + + public void setEstimate(BigDecimal estimate) { + this.estimate = estimate; + } + + public BigDecimal getBudget() { + return budget; + } + + public void setBudget(BigDecimal budget) { + this.budget = budget; + } +} \ No newline at end of file diff --git a/src/main/java/cn/palmte/work/model/ProjectSettleProfitMarginRepository.java b/src/main/java/cn/palmte/work/model/ProjectSettleProfitMarginRepository.java new file mode 100644 index 0000000..0607809 --- /dev/null +++ b/src/main/java/cn/palmte/work/model/ProjectSettleProfitMarginRepository.java @@ -0,0 +1,18 @@ +package cn.palmte.work.model; + +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.data.jpa.repository.Query; + +import java.util.List; + +/** + * @author Yuanping Zhang + * @date 2021/11/11 + */ +public interface ProjectSettleProfitMarginRepository extends JpaRepository { + + List findAllByProjectIdAndTime(int id, String time); + + @Query(value = "select * from project_settle_profit_margin where project_id = ?1 and time < ?2", nativeQuery = true) + List findAllByProjectIdBefore(int id, String time); +} diff --git a/src/main/java/cn/palmte/work/service/ProjectSettleService.java b/src/main/java/cn/palmte/work/service/ProjectSettleService.java new file mode 100644 index 0000000..ec33140 --- /dev/null +++ b/src/main/java/cn/palmte/work/service/ProjectSettleService.java @@ -0,0 +1,469 @@ +package cn.palmte.work.service; + +import cn.palmte.work.bean.BudgetSettleBean; +import cn.palmte.work.bean.EstimateSettleBean; +import cn.palmte.work.bean.FormerBean; +import cn.palmte.work.bean.SettleBean; +import cn.palmte.work.model.*; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import top.jfunc.common.utils.CollectionUtil; + +import java.math.BigDecimal; +import java.util.List; + +/** + * @author Yuanping Zhang + * @date 2021/11/15 + */ +@Service +public class ProjectSettleService { + private static final Logger logger = LoggerFactory.getLogger(ProjectSettleService.class); + + @Autowired + private ProjectSettleIncomeRepository projectSettleIncomeRepository; + + @Autowired + private ProjectSettleCostRepository projectSettleCostRepository; + + @Autowired + private ProjectSettleCostManageRepository projectSettleCostManageRepository; + + @Autowired + private ProjectSettleProfitMarginRepository projectSettleProfitMarginRepository; + + @Autowired + private ProjectSettleCashFlowRepository projectSettleCashFlowRepository; + + + public void save(Project project, SettleBean settleBean, BudgetSettleBean budgetBean, EstimateSettleBean estimateBean, String time) { + //收入记录 + income(project, settleBean, budgetBean, estimateBean, time); + //成本记录 + cost(project, settleBean, budgetBean, estimateBean, time); + //管理记录 + costManage(project, settleBean, budgetBean, estimateBean, time); + //利润记录 + profit(project, settleBean, budgetBean, estimateBean, time); + //资金流量记录 + cashFlow(project, settleBean, budgetBean, time); + } + + public void saveAndApprove(Project project, SettleBean settleBean, BudgetSettleBean budgetBean, EstimateSettleBean estimateBean, String time) { + //收入记录 + income(project, settleBean, budgetBean, estimateBean, time); + //成本记录 + cost(project, settleBean, budgetBean, estimateBean, time); + //管理记录 + costManage(project, settleBean, budgetBean, estimateBean, time); + //利润记录 + profit(project, settleBean, budgetBean, estimateBean, time); + //资金流量记录 + cashFlow(project, settleBean, budgetBean, time); + } + + + public void clearSettle(Project project, String time){ + List incomes = projectSettleIncomeRepository.findAllByProjectIdAndTime(project.getId(), time); + if(CollectionUtil.isNotEmpty(incomes)){ + projectSettleIncomeRepository.deleteInBatch(incomes); + } + + List costs = projectSettleCostRepository.findAllByProjectIdAndTime(project.getId(), time); + if(CollectionUtil.isNotEmpty(costs)){ + projectSettleCostRepository.deleteInBatch(costs); + } + + List costManages = projectSettleCostManageRepository.findAllByProjectIdAndTime(project.getId(), time); + if(CollectionUtil.isNotEmpty(costManages)){ + projectSettleCostManageRepository.deleteInBatch(costManages); + } + + List profitMargins = projectSettleProfitMarginRepository.findAllByProjectIdAndTime(project.getId(), time); + if(CollectionUtil.isNotEmpty(profitMargins)){ + projectSettleProfitMarginRepository.deleteInBatch(profitMargins); + } + + List cashFlows = projectSettleCashFlowRepository.findAllByProjectIdAndTime(project.getId(), time); + if(CollectionUtil.isNotEmpty(cashFlows)){ + projectSettleCashFlowRepository.deleteInBatch(cashFlows); + } + } + + private void cost(Project project, SettleBean settleBean, BudgetSettleBean budgetBean, EstimateSettleBean estimateBean, String time) { + ProjectSettleCost projectSettleCostDevice = new ProjectSettleCost(); + projectSettleCostDevice.setProjectId(project.getId()); + projectSettleCostDevice.setFee(ProjectSettleCost.FEE_PURCHASE); + projectSettleCostDevice.setType(ProjectSettleCost.TYPE_DEVICE); + projectSettleCostDevice.setEstimate(estimateBean.getCostPurchaseDeviceEstimateTotal()); + projectSettleCostDevice.setBudget(budgetBean.getCostPurchaseDeviceBudgetTotal()); + projectSettleCostDevice.setCostTaxExclude(settleBean.getCostPurchaseDevice()); + projectSettleCostDevice.setTime(time); + projectSettleCostRepository.saveAndFlush(projectSettleCostDevice); + + ProjectSettleCost projectSettleCostBuild = new ProjectSettleCost(); + projectSettleCostBuild.setProjectId(project.getId()); + projectSettleCostBuild.setFee(ProjectSettleCost.FEE_PURCHASE); + projectSettleCostBuild.setType(ProjectSettleCost.TYPE_BUILDING); + projectSettleCostBuild.setCostTaxExclude(settleBean.getCostPurchaseBuild()); + projectSettleCostBuild.setEstimate(estimateBean.getCostPurchaseBuildEstimateTotal()); + projectSettleCostBuild.setBudget(budgetBean.getCostPurchaseBuildBudgetTotal()); + projectSettleCostBuild.setTime(time); + projectSettleCostRepository.saveAndFlush(projectSettleCostBuild); + + ProjectSettleCost projectSettleCostService = new ProjectSettleCost(); + projectSettleCostService.setProjectId(project.getId()); + projectSettleCostService.setFee(ProjectSettleCost.FEE_PURCHASE); + projectSettleCostService.setType(ProjectSettleCost.TYPE_SERVICE); + projectSettleCostService.setCostTaxExclude(settleBean.getCostPurchaseService()); + projectSettleCostService.setEstimate(estimateBean.getCostPurchaseServiceEstimateTotal()); + projectSettleCostService.setBudget(budgetBean.getCostPurchaseServiceBudgetTotal()); + projectSettleCostService.setTime(time); + projectSettleCostRepository.saveAndFlush(projectSettleCostService); + + ProjectSettleCost projectSettleCostOther = new ProjectSettleCost(); + projectSettleCostOther.setProjectId(project.getId()); + projectSettleCostOther.setFee(ProjectSettleCost.FEE_PURCHASE); + projectSettleCostOther.setType(ProjectSettleCost.TYPE_OTHER); + projectSettleCostOther.setCostTaxExclude(settleBean.getCostPurchaseOther()); + projectSettleCostOther.setEstimate(estimateBean.getCostPurchaseOtherEstimateTotal()); + projectSettleCostOther.setBudget(budgetBean.getCostPurchaseOtherBudgetTotal()); + projectSettleCostOther.setTime(time); + projectSettleCostRepository.saveAndFlush(projectSettleCostOther); + + ProjectSettleCost projectSettleCostProject = new ProjectSettleCost(); + projectSettleCostProject.setProjectId(project.getId()); + projectSettleCostProject.setFee(ProjectSettleCost.FEE_PROJECT_MANAGE); + projectSettleCostProject.setType(ProjectSettleCost.TYPE_PROJECT_MANAGE); + projectSettleCostProject.setCostTaxExclude(settleBean.getCostProjectManage()); + projectSettleCostProject.setEstimate(estimateBean.getCostProjectManageEstimateTotal()); + projectSettleCostProject.setBudget(budgetBean.getCostProjectManageBudgetTotal()); + projectSettleCostProject.setTime(time); + projectSettleCostRepository.saveAndFlush(projectSettleCostProject); + + ProjectSettleCost projectSettleCostOtherOther = new ProjectSettleCost(); + projectSettleCostOtherOther.setProjectId(project.getId()); + projectSettleCostOtherOther.setFee(ProjectSettleCost.FEE_OTHER); + projectSettleCostOtherOther.setType(ProjectSettleCost.TYPE_OTHER_OTHER); + projectSettleCostOtherOther.setCostTaxExclude(settleBean.getCostOther()); + projectSettleCostOtherOther.setEstimate(estimateBean.getCostOtherEstimateTotal()); + projectSettleCostOtherOther.setBudget(budgetBean.getCostOtherBudgetTotal()); + projectSettleCostOtherOther.setTime(time); + projectSettleCostRepository.saveAndFlush(projectSettleCostOtherOther); + + } + + private void costManage(Project project, SettleBean settleBean, BudgetSettleBean budgetBean, EstimateSettleBean estimateBean, String time) { + ProjectSettleCostManage projectSettleCostExpro = new ProjectSettleCostManage(); + projectSettleCostExpro.setProjectId(project.getId()); + projectSettleCostExpro.setType(ProjectSettleCostManage.TYPE_EXPROPRIATION); + projectSettleCostExpro.setCostTaxExclude(settleBean.getCostExpropriation()); + projectSettleCostExpro.setEstimate(estimateBean.getCostExpropriationEstimateTotal()); + projectSettleCostExpro.setBudget(budgetBean.getCostExpropriationBudgetTotal()); + projectSettleCostExpro.setTime(time); + projectSettleCostManageRepository.saveAndFlush(projectSettleCostExpro); + + ProjectSettleCostManage projectSettleCostManage = new ProjectSettleCostManage(); + projectSettleCostManage.setProjectId(project.getId()); + projectSettleCostManage.setType(ProjectSettleCostManage.TYPE_COMPANY_MANAGE); + projectSettleCostManage.setCostTaxExclude(settleBean.getCostCompanyManage()); + projectSettleCostManage.setEstimate(estimateBean.getCostCompanyManageEstimateTotal()); + projectSettleCostManage.setBudget(budgetBean.getCostCompanyManageBudgetTotal()); + projectSettleCostManage.setTime(time); + projectSettleCostManageRepository.saveAndFlush(projectSettleCostManage); + + ProjectSettleCostManage projectSettleCostIncomeTaxManage = new ProjectSettleCostManage(); + projectSettleCostIncomeTaxManage.setProjectId(project.getId()); + projectSettleCostIncomeTaxManage.setType(ProjectSettleCostManage.TYPE_INCOME_TAX); + projectSettleCostIncomeTaxManage.setCostTaxExclude(settleBean.getCostIncomeTax()); + projectSettleCostIncomeTaxManage.setEstimate(new BigDecimal(0)); + projectSettleCostIncomeTaxManage.setBudget(new BigDecimal(0)); + projectSettleCostIncomeTaxManage.setTime(time); + projectSettleCostManageRepository.saveAndFlush(projectSettleCostIncomeTaxManage); + } + + private void income(Project project, SettleBean settleBean, BudgetSettleBean budgetBean, EstimateSettleBean estimateBean, String time) { + ProjectSettleIncome projectSettleIncomeDevice = new ProjectSettleIncome(); + projectSettleIncomeDevice.setProjectId(project.getId()); + projectSettleIncomeDevice.setType(ProjectSettleIncome.TYPE_DEVICE); + projectSettleIncomeDevice.setIncomeTaxExclude(settleBean.getIncomeDevice()); + projectSettleIncomeDevice.setEstimate(estimateBean.getIncomeDeviceEstimateTotal()); + projectSettleIncomeDevice.setBudget(budgetBean.getIncomeDeviceBudgetTotal()); + projectSettleIncomeDevice.setTime(time); + projectSettleIncomeRepository.saveAndFlush(projectSettleIncomeDevice); + + ProjectSettleIncome projectSettleIncomeEngineer = new ProjectSettleIncome(); + projectSettleIncomeEngineer.setProjectId(project.getId()); + projectSettleIncomeEngineer.setType(ProjectSettleIncome.TYPE_ENGINEER); + projectSettleIncomeEngineer.setIncomeTaxExclude(settleBean.getIncomeEngineer()); + projectSettleIncomeEngineer.setEstimate(estimateBean.getIncomeEngineerEstimateTotal()); + projectSettleIncomeEngineer.setBudget(budgetBean.getIncomeEngineerBudgetTotal()); + projectSettleIncomeEngineer.setTime(time); + projectSettleIncomeRepository.saveAndFlush(projectSettleIncomeEngineer); + + ProjectSettleIncome projectSettleIncomeService = new ProjectSettleIncome(); + projectSettleIncomeService.setProjectId(project.getId()); + projectSettleIncomeService.setType(ProjectSettleIncome.TYPE_SERVICE); + projectSettleIncomeService.setIncomeTaxExclude(settleBean.getIncomeService()); + projectSettleIncomeService.setEstimate(estimateBean.getIncomeServiceEstimateTotal()); + projectSettleIncomeService.setBudget(budgetBean.getIncomeServiceBudgetTotal()); + projectSettleIncomeService.setTime(time); + projectSettleIncomeRepository.saveAndFlush(projectSettleIncomeService); + } + + private void profit(Project project, SettleBean settleBean, BudgetSettleBean budgetBean, EstimateSettleBean estimateBean, String time) { + ProjectSettleProfitMargin projectSettleGrossProfit = new ProjectSettleProfitMargin(); + projectSettleGrossProfit.setProjectId(project.getId()); + projectSettleGrossProfit.setType(ProjectSettleProfitMargin.TYPE_GROSS_PROFIT); + projectSettleGrossProfit.setAmount(settleBean.getGrossProfit()); + projectSettleGrossProfit.setBudget(budgetBean.getGrossProfitBudgetTotal()); + projectSettleGrossProfit.setEstimate(estimateBean.getGrossProfitEstimateTotal()); + projectSettleGrossProfit.setTime(time); + projectSettleProfitMarginRepository.saveAndFlush(projectSettleGrossProfit); + + ProjectSettleProfitMargin projectSettleContributionProfit = new ProjectSettleProfitMargin(); + projectSettleContributionProfit.setProjectId(project.getId()); + projectSettleContributionProfit.setType(ProjectSettleProfitMargin.TYPE_CONTRIBUTION_PROFIT); + projectSettleContributionProfit.setAmount(settleBean.getContributionProfit()); + projectSettleContributionProfit.setBudget(budgetBean.getContributionProfitBudgetTotal()); + projectSettleContributionProfit.setEstimate(estimateBean.getContributionProfitEstimateTotal()); + projectSettleContributionProfit.setTime(time); + projectSettleProfitMarginRepository.saveAndFlush(projectSettleContributionProfit); + + ProjectSettleProfitMargin projectSettleNetProfit = new ProjectSettleProfitMargin(); + projectSettleNetProfit.setProjectId(project.getId()); + projectSettleNetProfit.setType(ProjectSettleProfitMargin.TYPE_NET_PROFIT); + projectSettleNetProfit.setAmount(settleBean.getNetProfit()); + projectSettleNetProfit.setBudget(budgetBean.getNetProfitBudgetTotal()); + projectSettleNetProfit.setEstimate(estimateBean.getNetProfitEstimateTotal()); + projectSettleNetProfit.setTime(time); + projectSettleProfitMarginRepository.saveAndFlush(projectSettleNetProfit); + } + + private void cashFlow(Project project, SettleBean settleBean, BudgetSettleBean cashFlowBean, String time) { + ProjectSettleCashFlow projectSettleSaleIncomeCash = new ProjectSettleCashFlow(); + projectSettleSaleIncomeCash.setProjectId(project.getId()); + projectSettleSaleIncomeCash.setType(ProjectSettleCashFlow.SALE_INCOME_CASH); + projectSettleSaleIncomeCash.setAmount(settleBean.getSaleIncomeCash()); + projectSettleSaleIncomeCash.setBudget(cashFlowBean.getSaleIncomeCashBudget()); + projectSettleSaleIncomeCash.setTime(time); + projectSettleCashFlowRepository.saveAndFlush(projectSettleSaleIncomeCash); + + ProjectSettleCashFlow projectSettleTaxReturn = new ProjectSettleCashFlow(); + projectSettleTaxReturn.setProjectId(project.getId()); + projectSettleTaxReturn.setType(ProjectSettleCashFlow.TAX_RETURN); + projectSettleTaxReturn.setAmount(settleBean.getTaxReturn()); + projectSettleTaxReturn.setBudget(cashFlowBean.getTaxReturnBudget()); + projectSettleTaxReturn.setTime(time); + projectSettleCashFlowRepository.saveAndFlush(projectSettleTaxReturn); + + ProjectSettleCashFlow projectSettleEarnestMoneyIncome = new ProjectSettleCashFlow(); + projectSettleEarnestMoneyIncome.setProjectId(project.getId()); + projectSettleEarnestMoneyIncome.setType(ProjectSettleCashFlow.EARNEST_MONEY_INCOME); + projectSettleEarnestMoneyIncome.setAmount(settleBean.getEarnestMoneyIncome()); + projectSettleEarnestMoneyIncome.setBudget(cashFlowBean.getEarnestMoneyIncomeBudget()); + projectSettleEarnestMoneyIncome.setTime(time); + projectSettleCashFlowRepository.saveAndFlush(projectSettleEarnestMoneyIncome); + + ProjectSettleCashFlow projectSettlePurchaseCost = new ProjectSettleCashFlow(); + projectSettlePurchaseCost.setProjectId(project.getId()); + projectSettlePurchaseCost.setType(ProjectSettleCashFlow.PURCHASE_COST); + projectSettlePurchaseCost.setAmount(settleBean.getPurchaseCost()); + projectSettlePurchaseCost.setBudget(cashFlowBean.getPurchaseCostBudget()); + projectSettlePurchaseCost.setTime(time); + projectSettleCashFlowRepository.saveAndFlush(projectSettlePurchaseCost); + + ProjectSettleCashFlow projectSettleTaxCost = new ProjectSettleCashFlow(); + projectSettleTaxCost.setProjectId(project.getId()); + projectSettleTaxCost.setType(ProjectSettleCashFlow.TAX_COST); + projectSettleTaxCost.setAmount(settleBean.getTaxCost()); + projectSettleTaxCost.setBudget(cashFlowBean.getTaxCostBudget()); + projectSettleTaxCost.setTime(time); + projectSettleCashFlowRepository.saveAndFlush(projectSettleTaxCost); + + ProjectSettleCashFlow projectSettleEarnestMoneyCost = new ProjectSettleCashFlow(); + projectSettleEarnestMoneyCost.setProjectId(project.getId()); + projectSettleEarnestMoneyCost.setType(ProjectSettleCashFlow.EARNEST_MONEY_COST); + projectSettleEarnestMoneyCost.setAmount(settleBean.getEarnestMoneyCost()); + projectSettleEarnestMoneyCost.setBudget(cashFlowBean.getEarnestMoneyCostBudget()); + projectSettleEarnestMoneyCost.setTime(time); + projectSettleCashFlowRepository.saveAndFlush(projectSettleEarnestMoneyCost); + + ProjectSettleCashFlow projectSettleNetCashFlow = new ProjectSettleCashFlow(); + projectSettleNetCashFlow.setProjectId(project.getId()); + projectSettleNetCashFlow.setType(ProjectSettleCashFlow.NET_CASH_FLOW); + projectSettleNetCashFlow.setAmount(settleBean.getNetCashFlow()); + projectSettleNetCashFlow.setBudget(cashFlowBean.getNetCashFlowBudget()); + projectSettleNetCashFlow.setTime(time); + projectSettleCashFlowRepository.saveAndFlush(projectSettleNetCashFlow); + + ProjectSettleCashFlow projectSettleCashInflowFromInvestingActivities = new ProjectSettleCashFlow(); + projectSettleCashInflowFromInvestingActivities.setProjectId(project.getId()); + projectSettleCashInflowFromInvestingActivities.setType(ProjectSettleCashFlow.CASH_INFLOW_FROM_INVESTING_ACTIVITIES); + projectSettleCashInflowFromInvestingActivities.setAmount(settleBean.getCashInflowFromInvestingActivities()); + projectSettleCashInflowFromInvestingActivities.setBudget(cashFlowBean.getCashInflowFromInvestingActivitiesBudget()); + projectSettleCashInflowFromInvestingActivities.setTime(time); + projectSettleCashFlowRepository.saveAndFlush(projectSettleCashInflowFromInvestingActivities); + + ProjectSettleCashFlow projectSettleCashOutflowFromInvestingActivities = new ProjectSettleCashFlow(); + projectSettleCashOutflowFromInvestingActivities.setProjectId(project.getId()); + projectSettleCashOutflowFromInvestingActivities.setType(ProjectSettleCashFlow.CASH_OUTFLOW_FROM_INVESTING_ACTIVITIES); + projectSettleCashOutflowFromInvestingActivities.setAmount(settleBean.getCashOutflowFromInvestingActivities()); + projectSettleCashOutflowFromInvestingActivities.setBudget(cashFlowBean.getCashOutflowFromInvestingActivitiesBudget()); + projectSettleCashOutflowFromInvestingActivities.setTime(time); + projectSettleCashFlowRepository.saveAndFlush(projectSettleCashOutflowFromInvestingActivities); + + ProjectSettleCashFlow projectSettleNetCashFromInvestingActivities = new ProjectSettleCashFlow(); + projectSettleNetCashFromInvestingActivities.setProjectId(project.getId()); + projectSettleNetCashFromInvestingActivities.setType(ProjectSettleCashFlow.NET_CASH_FROM_INVESTING_ACTIVITIES); + projectSettleNetCashFromInvestingActivities.setAmount(settleBean.getNetCashFromInvestingActivities()); + projectSettleNetCashFromInvestingActivities.setBudget(cashFlowBean.getNetCashFromInvestingActivitiesBudget()); + projectSettleNetCashFromInvestingActivities.setTime(time); + projectSettleCashFlowRepository.saveAndFlush(projectSettleNetCashFromInvestingActivities); + + ProjectSettleCashFlow projectSettleFinancingCapitalInflow = new ProjectSettleCashFlow(); + projectSettleFinancingCapitalInflow.setProjectId(project.getId()); + projectSettleFinancingCapitalInflow.setType(ProjectSettleCashFlow.FINANCING_CAPITAL_INFLOW); + projectSettleFinancingCapitalInflow.setAmount(settleBean.getFinancingCapitalInflow()); + projectSettleFinancingCapitalInflow.setBudget(cashFlowBean.getFinancingCapitalInflowBudget()); + projectSettleFinancingCapitalInflow.setTime(time); + projectSettleCashFlowRepository.saveAndFlush(projectSettleFinancingCapitalInflow); + + ProjectSettleCashFlow projectSettleFinancingCapitalOutflow = new ProjectSettleCashFlow(); + projectSettleFinancingCapitalOutflow.setProjectId(project.getId()); + projectSettleFinancingCapitalOutflow.setType(ProjectSettleCashFlow.FINANCING_CAPITAL_OUTFLOW); + projectSettleFinancingCapitalOutflow.setAmount(settleBean.getFinancingCapitalOutflow()); + projectSettleFinancingCapitalOutflow.setBudget(cashFlowBean.getFinancingCapitalOutflowBudget()); + projectSettleFinancingCapitalOutflow.setTime(time); + projectSettleCashFlowRepository.saveAndFlush(projectSettleFinancingCapitalOutflow); + + ProjectSettleCashFlow projectSettleFinancingCapitalCashflow = new ProjectSettleCashFlow(); + projectSettleFinancingCapitalCashflow.setProjectId(project.getId()); + projectSettleFinancingCapitalCashflow.setType(ProjectSettleCashFlow.FINANCING_CAPITAL_CASHFLOW); + projectSettleFinancingCapitalCashflow.setAmount(settleBean.getFinancingCapitalCashflow()); + projectSettleFinancingCapitalCashflow.setBudget(cashFlowBean.getFinancingCapitalCashflowBudget()); + projectSettleFinancingCapitalCashflow.setTime(time); + projectSettleCashFlowRepository.saveAndFlush(projectSettleFinancingCapitalCashflow); + + ProjectSettleCashFlow projectSettleNetIncreaseMonetaryFunds = new ProjectSettleCashFlow(); + projectSettleNetIncreaseMonetaryFunds.setProjectId(project.getId()); + projectSettleNetIncreaseMonetaryFunds.setType(ProjectSettleCashFlow.NET_INCREASE_MONETARY_FUNDS); + projectSettleNetIncreaseMonetaryFunds.setAmount(settleBean.getNetIncreaseMonetaryFunds()); + projectSettleNetIncreaseMonetaryFunds.setBudget(cashFlowBean.getNetIncreaseMonetaryFundsBudget()); + projectSettleNetIncreaseMonetaryFunds.setTime(time); + projectSettleCashFlowRepository.saveAndFlush(projectSettleNetIncreaseMonetaryFunds); + } + + public FormerBean getFormerSettle(Project project, String time) { + FormerBean settleBean = new FormerBean(); + List incomes = projectSettleIncomeRepository.findAllByProjectIdBefore(project.getId(), time); + + if(CollectionUtil.isNotEmpty(incomes)){ + BigDecimal incomeDevice = incomes.stream().filter(d -> d.getType() == ProjectSettleIncome.TYPE_DEVICE).map(ProjectSettleIncome::getIncomeTaxExclude).reduce(BigDecimal.ZERO, BigDecimal::add); + settleBean.setIncomeDeviceTaxExclude(incomeDevice); + + BigDecimal incomeEngineer = incomes.stream().filter(d -> d.getType() == ProjectSettleIncome.TYPE_ENGINEER).map(ProjectSettleIncome::getIncomeTaxExclude).reduce(BigDecimal.ZERO, BigDecimal::add); + settleBean.setIncomeEngineerTaxExclude(incomeEngineer ); + + BigDecimal incomeService = incomes.stream().filter(d -> d.getType() == ProjectSettleIncome.TYPE_SERVICE).map(ProjectSettleIncome::getIncomeTaxExclude).reduce(BigDecimal.ZERO, BigDecimal::add); + settleBean.setIncomeServiceTaxExclude(incomeService); + } + + + List costs = projectSettleCostRepository.findAllByProjectIdBefore(project.getId(), time); + + if(CollectionUtil.isNotEmpty(costs)){ + BigDecimal costDevice = costs.stream().filter(d -> d.getType() == ProjectSettleCost.TYPE_DEVICE).map(ProjectSettleCost::getCostTaxExclude).reduce(BigDecimal.ZERO, BigDecimal::add); + settleBean.setCostPurchaseDeviceTaxExclude(costDevice); + + BigDecimal costBuild = costs.stream().filter(d -> d.getType() == ProjectSettleCost.TYPE_BUILDING).map(ProjectSettleCost::getCostTaxExclude).reduce(BigDecimal.ZERO, BigDecimal::add); + settleBean.setCostPurchaseBuildTaxExclude(costBuild); + + BigDecimal costService = costs.stream().filter(d -> d.getType() == ProjectSettleCost.TYPE_SERVICE).map(ProjectSettleCost::getCostTaxExclude).reduce(BigDecimal.ZERO, BigDecimal::add); + settleBean.setCostPurchaseServiceTaxExclude(costService); + + BigDecimal costOther = costs.stream().filter(d -> d.getType() == ProjectSettleCost.TYPE_OTHER).map(ProjectSettleCost::getCostTaxExclude).reduce(BigDecimal.ZERO, BigDecimal::add); + settleBean.setCostPurchaseOtherTaxExclude(costOther); + + BigDecimal costProjectManage = costs.stream().filter(d -> d.getType() == ProjectSettleCost.TYPE_PROJECT_MANAGE).map(ProjectSettleCost::getCostTaxExclude).reduce(BigDecimal.ZERO, BigDecimal::add); + settleBean.setCostProjectManageTaxExclude(costProjectManage ); + + BigDecimal costOtherOther = costs.stream().filter(d -> d.getType() == ProjectSettleCost.TYPE_OTHER_OTHER).map(ProjectSettleCost::getCostTaxExclude).reduce(BigDecimal.ZERO, BigDecimal::add); + settleBean.setCostOtherOtherTaxExclude(costOtherOther); + } + + + List manages = projectSettleCostManageRepository.findAllByProjectIdBefore(project.getId(), time); + if(CollectionUtil.isNotEmpty(manages)){ + BigDecimal costManageExpropriation = manages.stream().filter(d -> d.getType() == ProjectSettleCostManage.TYPE_EXPROPRIATION).map(ProjectSettleCostManage::getCostTaxExclude).reduce(BigDecimal.ZERO, BigDecimal::add); + settleBean.setCostExpropriationTaxExclude(costManageExpropriation); + + BigDecimal costManageCompany = manages.stream().filter(d -> d.getType() == ProjectSettleCostManage.TYPE_COMPANY_MANAGE).map(ProjectSettleCostManage::getCostTaxExclude).reduce(BigDecimal.ZERO, BigDecimal::add); + settleBean.setCostCompanyManageTaxExclude(costManageCompany); + + BigDecimal costIncomeTax = manages.stream().filter(d -> d.getType() == ProjectSettleCostManage.TYPE_INCOME_TAX).map(ProjectSettleCostManage::getCostTaxExclude).reduce(BigDecimal.ZERO, BigDecimal::add); + settleBean.setCostIncomeTax(costIncomeTax); + } + + List profits = projectSettleProfitMarginRepository.findAllByProjectIdBefore(project.getId(), time); + if(CollectionUtil.isNotEmpty(profits)) { + BigDecimal grossProfit = profits.stream().filter(d -> d.getType() == ProjectSettleProfitMargin.TYPE_GROSS_PROFIT).map(ProjectSettleProfitMargin::getAmount).reduce(BigDecimal.ZERO, BigDecimal::add); + settleBean.setGrossProfit(grossProfit); + + BigDecimal contributionProfit = profits.stream().filter(d -> d.getType() == ProjectSettleProfitMargin.TYPE_CONTRIBUTION_PROFIT).map(ProjectSettleProfitMargin::getAmount).reduce(BigDecimal.ZERO, BigDecimal::add); + settleBean.setContributionProfit(contributionProfit); + + BigDecimal netProfit = profits.stream().filter(d -> d.getType() == ProjectSettleProfitMargin.TYPE_NET_PROFIT).map(ProjectSettleProfitMargin::getAmount).reduce(BigDecimal.ZERO, BigDecimal::add); + settleBean.setNetProfit(netProfit); + } + + List cashFlows = projectSettleCashFlowRepository.findAllByProjectIdBefore(project.getId(), time); + if(CollectionUtil.isNotEmpty(cashFlows)) { + BigDecimal saleIncomeCash = cashFlows.stream().filter(d -> d.getType() == ProjectSettleCashFlow.SALE_INCOME_CASH).map(ProjectSettleCashFlow::getAmount).reduce(BigDecimal.ZERO, BigDecimal::add); + settleBean.setSaleIncomeCash(saleIncomeCash); + + BigDecimal taxReturn = cashFlows.stream().filter(d -> d.getType() == ProjectSettleCashFlow.TAX_RETURN).map(ProjectSettleCashFlow::getAmount).reduce(BigDecimal.ZERO, BigDecimal::add); + settleBean.setTaxReturn(taxReturn); + + BigDecimal earnestMoneyIncome = cashFlows.stream().filter(d -> d.getType() == ProjectSettleCashFlow.EARNEST_MONEY_INCOME).map(ProjectSettleCashFlow::getAmount).reduce(BigDecimal.ZERO, BigDecimal::add); + settleBean.setEarnestMoneyIncome(earnestMoneyIncome); + + BigDecimal purchaseCost = cashFlows.stream().filter(d -> d.getType() == ProjectSettleCashFlow.PURCHASE_COST).map(ProjectSettleCashFlow::getAmount).reduce(BigDecimal.ZERO, BigDecimal::add); + settleBean.setPurchaseCost(purchaseCost); + + BigDecimal taxCost = cashFlows.stream().filter(d -> d.getType() == ProjectSettleCashFlow.TAX_COST).map(ProjectSettleCashFlow::getAmount).reduce(BigDecimal.ZERO, BigDecimal::add); + settleBean.setTaxCost(taxCost); + + BigDecimal earnestMoneyCost = cashFlows.stream().filter(d -> d.getType() == ProjectSettleCashFlow.EARNEST_MONEY_COST).map(ProjectSettleCashFlow::getAmount).reduce(BigDecimal.ZERO, BigDecimal::add); + settleBean.setEarnestMoneyCost(earnestMoneyCost); + + BigDecimal netCashFlow = cashFlows.stream().filter(d -> d.getType() == ProjectSettleCashFlow.NET_CASH_FLOW).map(ProjectSettleCashFlow::getAmount).reduce(BigDecimal.ZERO, BigDecimal::add); + settleBean.setNetCashFlow(netCashFlow); + + BigDecimal cashInflowFromInvestingActivities = cashFlows.stream().filter(d -> d.getType() == ProjectSettleCashFlow.CASH_INFLOW_FROM_INVESTING_ACTIVITIES).map(ProjectSettleCashFlow::getAmount).reduce(BigDecimal.ZERO, BigDecimal::add); + settleBean.setCashInflowFromInvestingActivities(cashInflowFromInvestingActivities); + + BigDecimal cashOutflowFromInvestingActivities = cashFlows.stream().filter(d -> d.getType() == ProjectSettleCashFlow.CASH_OUTFLOW_FROM_INVESTING_ACTIVITIES).map(ProjectSettleCashFlow::getAmount).reduce(BigDecimal.ZERO, BigDecimal::add); + settleBean.setCashOutflowFromInvestingActivities(cashOutflowFromInvestingActivities); + + BigDecimal netCashFromInvestingActivities = cashFlows.stream().filter(d -> d.getType() == ProjectSettleCashFlow.NET_CASH_FROM_INVESTING_ACTIVITIES).map(ProjectSettleCashFlow::getAmount).reduce(BigDecimal.ZERO, BigDecimal::add); + settleBean.setNetCashFromInvestingActivities(netCashFromInvestingActivities); + + BigDecimal financingCapitalInflow = cashFlows.stream().filter(d -> d.getType() == ProjectSettleCashFlow.FINANCING_CAPITAL_INFLOW).map(ProjectSettleCashFlow::getAmount).reduce(BigDecimal.ZERO, BigDecimal::add); + settleBean.setFinancingCapitalInflow(financingCapitalInflow); + + BigDecimal financingCapitalOutflow = cashFlows.stream().filter(d -> d.getType() == ProjectSettleCashFlow.FINANCING_CAPITAL_OUTFLOW).map(ProjectSettleCashFlow::getAmount).reduce(BigDecimal.ZERO, BigDecimal::add); + settleBean.setFinancingCapitalOutflow(financingCapitalOutflow); + + BigDecimal financingCapitalCashflow = cashFlows.stream().filter(d -> d.getType() == ProjectSettleCashFlow.FINANCING_CAPITAL_CASHFLOW).map(ProjectSettleCashFlow::getAmount).reduce(BigDecimal.ZERO, BigDecimal::add); + settleBean.setFinancingCapitalCashflow(financingCapitalCashflow); + + BigDecimal netIncreaseMonetaryFunds = cashFlows.stream().filter(d -> d.getType() == ProjectSettleCashFlow.NET_INCREASE_MONETARY_FUNDS).map(ProjectSettleCashFlow::getAmount).reduce(BigDecimal.ZERO, BigDecimal::add); + settleBean.setNetIncreaseMonetaryFunds(netIncreaseMonetaryFunds); + } + + return settleBean; + } +} diff --git a/src/main/java/cn/palmte/work/service/ProjectSummaryService.java b/src/main/java/cn/palmte/work/service/ProjectSummaryService.java new file mode 100644 index 0000000..484abce --- /dev/null +++ b/src/main/java/cn/palmte/work/service/ProjectSummaryService.java @@ -0,0 +1,97 @@ +package cn.palmte.work.service; + +import cn.palmte.work.bean.BudgetBean; +import cn.palmte.work.bean.CashFlowBean; +import cn.palmte.work.model.Project; +import cn.palmte.work.model.ProjectSettleCostRepository; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import top.jfunc.common.db.bean.Page; +import top.jfunc.common.db.bean.Record; +import top.jfunc.common.db.utils.Pagination; + +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.concurrent.ConcurrentHashMap; + +/** + * @author Yuanping Zhang + * @date 2021/11/10 + */ +@Service +public class ProjectSummaryService { + private static final Logger logger = LoggerFactory.getLogger(ProjectSummaryService.class); + + @Autowired + private ProjectBudgetService projectBudgetService; + + @Autowired + private ProjectSettleCostRepository projectSettleCostRepository; + + @Autowired + private Pagination pagination; + + public List> getList(ConcurrentHashMap searchInfo, int pageNumber, int pageSize) { + List> pageList = new ArrayList<>(); + if (pageNumber == 1) { + //预算金额 + Map budget = new HashMap<>(40); + String sql = "select proj.id, proj.name from project_settle_cost psc left join project proj on psc.project_id = proj.id where psc.time = ? group by proj.id order by proj.id asc"; + List projects = pagination.find(sql, Project.class, searchInfo.getOrDefault("time", "2021-00")); + for (Project project : projects) { + BudgetBean budgetBean = projectBudgetService.getBudget(project); + CashFlowBean cashFlowBean = projectBudgetService.getCashFlowBean(project, projectBudgetService.getProjectBudgetPlanDetails(project)); + budget.put("incomeDeviceTaxExclude", budget.getOrDefault("incomeDeviceTaxExclude", new BigDecimal(0)).add(budgetBean.getIncomeDeviceTaxExclude())); + budget.put("incomeEngineerTaxExclude", budget.getOrDefault("incomeEngineerTaxExclude", new BigDecimal(0)).add(budgetBean.getIncomeEngineerTaxExclude())); + budget.put("incomeServiceTaxExclude", budget.getOrDefault("incomeServiceTaxExclude", new BigDecimal(0)).add(budgetBean.getIncomeServiceTaxExclude())); + budget.put("costPurchaseDeviceTaxExclude", budget.getOrDefault("costPurchaseDeviceTaxExclude", new BigDecimal(0)).add(budgetBean.getCostPurchaseDeviceTaxExclude())); + budget.put("costPurchaseBuildTaxExclude", budget.getOrDefault("costPurchaseBuildTaxExclude", new BigDecimal(0)).add(budgetBean.getCostPurchaseBuildTaxExclude())); + budget.put("costPurchaseServiceTaxExclude", budget.getOrDefault("costPurchaseServiceTaxExclude", new BigDecimal(0)).add(budgetBean.getCostPurchaseServiceTaxExclude())); + budget.put("costPurchaseOtherTaxExclude", budget.getOrDefault("costPurchaseOtherTaxExclude", new BigDecimal(0)).add(budgetBean.getCostPurchaseOtherTaxExclude())); + budget.put("costOtherOtherTaxExclude", budget.getOrDefault("costOtherOtherTaxExclude", new BigDecimal(0)).add(budgetBean.getCostOtherOtherTaxExclude())); + budget.put("costProjectManageTaxExclude", budget.getOrDefault("costProjectManageTaxExclude", new BigDecimal(0)).add(budgetBean.getCostProjectManageTaxExclude())); + budget.put("costExpropriationTaxExclude", budget.getOrDefault("costExpropriationTaxExclude", new BigDecimal(0)).add(budgetBean.getCostExpropriationTaxExclude())); + budget.put("costCompanyManageTaxExclude", budget.getOrDefault("costCompanyManageTaxExclude", new BigDecimal(0)).add(budgetBean.getCostCompanyManageTaxExclude())); + + budget.put("incomeTotalTaxExclude", budget.getOrDefault("incomeTotalTaxExclude", new BigDecimal(0)).add(budgetBean.getIncomeTotalTaxExclude())); + budget.put("incomeTotalTaxInclude", budget.getOrDefault("incomeTotalTaxInclude", new BigDecimal(0)).add(budgetBean.getIncomeTotalTaxInclude())); + budget.put("costTotalTaxExclude2", budget.getOrDefault("costTotalTaxExclude2", new BigDecimal(0)).add(budgetBean.getCostTotalTaxExclude())); + budget.put("costTotalTaxInclude", budget.getOrDefault("costTotalTaxInclude", new BigDecimal(0)).add(budgetBean.getCostTotalTaxInclude())); + budget.put("costTotalTaxExclude", budget.getOrDefault("costTotalTaxExclude", new BigDecimal(0)).add(budgetBean.getCostPurchaseDeviceTaxExclude().add(budgetBean.getCostPurchaseBuildTaxExclude()).add(budgetBean.getCostPurchaseServiceTaxExclude()).add(budgetBean.getCostPurchaseOtherTaxExclude()))); + budget.put("projectGrossProfit", budget.getOrDefault("projectGrossProfit", new BigDecimal(0)).add(budgetBean.getProjectGrossProfit())); + budget.put("projectContributionProfit", budget.getOrDefault("projectContributionProfit", new BigDecimal(0)).add(budgetBean.getProjectContributionProfit())); + + budget.put("saleIncomeCash", budget.getOrDefault("saleIncomeCash", new BigDecimal(0)).add(cashFlowBean.getSaleIncomeCash())); + budget.put("taxReturn", budget.getOrDefault("taxReturn", new BigDecimal(0)).add(cashFlowBean.getTaxReturn())); + budget.put("earnestMoneyIncome", budget.getOrDefault("earnestMoneyIncome", new BigDecimal(0)).add(cashFlowBean.getEarnestMoneyIncome())); + budget.put("purchaseCost", budget.getOrDefault("purchaseCost", new BigDecimal(0)).add(cashFlowBean.getPurchaseCost())); + budget.put("taxCost", budget.getOrDefault("taxCost", new BigDecimal(0)).add(cashFlowBean.getTaxCost())); + budget.put("earnestMoneyCost", budget.getOrDefault("earnestMoneyCost", new BigDecimal(0)).add(cashFlowBean.getEarnestMoneyCost())); + budget.put("netCashFlow", budget.getOrDefault("netCashFlow", new BigDecimal(0)).add(cashFlowBean.getNetCashFlow())); + budget.put("cashInflowFromInvestingActivities", budget.getOrDefault("cashInflowFromInvestingActivities", new BigDecimal(0)).add(cashFlowBean.getCashInflowFromInvestingActivities())); + budget.put("cashOutflowFromInvestingActivities", budget.getOrDefault("cashOutflowFromInvestingActivities", new BigDecimal(0)).add(cashFlowBean.getCashOutflowFromInvestingActivities())); + budget.put("netCashFromInvestingActivities", budget.getOrDefault("netCashFromInvestingActivities", new BigDecimal(0)).add(cashFlowBean.getNetCashFromInvestingActivities())); + budget.put("financingCapitalInflow", budget.getOrDefault("financingCapitalInflow", new BigDecimal(0)).add(cashFlowBean.getFinancingCapitalInflow())); + budget.put("financingCapitalOutflow", budget.getOrDefault("financingCapitalOutflow", new BigDecimal(0)).add(cashFlowBean.getFinancingCapitalOutflow())); + budget.put("financingCapitalCashflow", budget.getOrDefault("financingCapitalCashflow", new BigDecimal(0)).add(cashFlowBean.getFinancingCapitalCashflow())); + budget.put("netIncreaseMonetaryFunds", budget.getOrDefault("netIncreaseMonetaryFunds", new BigDecimal(0)).add(cashFlowBean.getNetIncreaseMonetaryFunds())); + } + Record budgetRecord = new Record(); + budgetRecord.getColumns().putAll(budget); + budgetRecord.set("projectName", "预算金额(不含税)"); + budgetRecord.set("projectGrossProfitRate", budget.getOrDefault("projectGrossProfit", new BigDecimal(0)).divide(budget.getOrDefault("incomeTotalTaxExclude", new BigDecimal(1)))); + budgetRecord.set("projectContributionProfitRate", budget.getOrDefault("projectContributionProfit", new BigDecimal(0)).divide(budget.getOrDefault("incomeTotalTaxExclude", new BigDecimal(1)))); + budgetRecord.set("taxCost", budget.getOrDefault("incomeTotalTaxInclude", new BigDecimal(0)).subtract(budget.getOrDefault("incomeTotalTaxExclude", new BigDecimal(0))).subtract(budget.getOrDefault("costTotalTaxInclude", new BigDecimal(0))).add(budget.getOrDefault("costTotalTaxExclude2", new BigDecimal(0)))); + budgetRecord.set("projectNetProfit", budget.getOrDefault("projectGrossProfit", new BigDecimal(0)).subtract(budgetRecord.getBigDecimal("taxCost"))); + budgetRecord.set("projectContributionProfitRate", budgetRecord.getBigDecimal("projectNetProfit").divide(budget.getOrDefault("incomeTotalTaxExclude", new BigDecimal(1)))); + } else { + String sql = "select proj.id, proj.name from project_settle_cost psc left join project proj on psc.project_id = proj.id where psc.time = ? group by proj.id order by proj.id asc"; + } + return pageList; + } +} diff --git a/src/main/resources/static/assets/js/project_settle.js b/src/main/resources/static/assets/js/project_settle.js new file mode 100644 index 0000000..93fbe3a --- /dev/null +++ b/src/main/resources/static/assets/js/project_settle.js @@ -0,0 +1,855 @@ +function calculateSettle() { + + $("input[name='incomeDevice']").change(function () { + calIncomeDeviceSettleTotal(); + calIncomeTotal(); + calIncomeSettleTotal(); + }); + $("input[name='incomeEngineer']").change(function () { + calIncomeEngineerSettleTotal(); + calIncomeTotal(); + calIncomeSettleTotal(); + }); + $("input[name='incomeService']").change(function () { + calIncomeServiceSettleTotal(); + calIncomeTotal(); + calIncomeSettleTotal(); + }); + + + $("input[name='costPurchaseDevice']").change(function () { + calCostPurchaseDeviceSettleTotal(); + calCostTotal(); + calCostSettleTotal(); + }); + $("input[name='costPurchaseBuild']").change(function () { + calCostPurchaseBuildSettleTotal(); + calCostTotal(); + calCostSettleTotal(); + }); + $("input[name='costPurchaseService']").change(function () { + calCostPurchaseServiceSettleTotal(); + calCostTotal(); + calCostSettleTotal(); + }); + $("input[name='costPurchaseOther']").change(function () { + calCostPurchaseOtherSettleTotal(); + calCostTotal(); + calCostSettleTotal(); + }); + $("input[name='costProjectManage']").change(function () { + calCostProjectManageSettleTotal(); + calCostTotal(); + calCostSettleTotal(); + }); + $("input[name='costOther']").change(function () { + calCostOtherSettleTotal(); + calCostTotal(); + calCostSettleTotal(); + }); + + + $("input[name='costExpropriation']").change(function () { + calCostExpropriationSettleTotal(); + calCostManageTotal(); + calCostManageSettleTotal(); + }); + $("input[name='costCompanyManage']").change(function () { + calCostCompanyManageSettleTotal(); + calCostManageTotal(); + calCostManageSettleTotal(); + }); + $("input[name='costIncomeTax']").change(function () { + calCostIncomeTaxSettleTotal(); + calCostManageTotal(); + calCostManageSettleTotal(); + }); + + + $("input[name='grossProfit']").change(function () { + calGrossProfitSettleTotal(); + calGrossProfitProfitMargin(); + }); + $("input[name='contributionProfit']").change(function () { + calContributionProfitSettleTotal(); + calContributionProfitProfitMargin(); + }); + $("input[name='netProfit']").change(function () { + calNetProfitSettleTotal(); + calNetProfitProfitMargin(); + }); + + + $("input[name='saleIncomeCash']").change(function () { + calSaleIncomeCashSettle(); + calCashFlowTotal(); + calCashFlowSettleTotal(); + }); + $("input[name='taxReturn']").change(function () { + calTaxReturnSettle(); + calCashFlowTotal(); + calCashFlowSettleTotal(); + }); + $("input[name='earnestMoneyIncome']").change(function () { + calEarnestMoneyIncomeSettle(); + calCashFlowTotal(); + calCashFlowSettleTotal(); + }); + $("input[name='purchaseCost']").change(function () { + calPurchaseCostSettle(); + calCashFlowTotal(); + calCashFlowSettleTotal(); + }); + $("input[name='taxCost']").change(function () { + calTaxCostSettle(); + calCashFlowTotal(); + calCashFlowSettleTotal(); + }); + $("input[name='earnestMoneyCost']").change(function () { + calEarnestMoneyCostSettle(); + calCashFlowTotal(); + calCashFlowSettleTotal(); + }); + $("input[name='netCashFlow']").change(function () { + calNetCashFlowSettle(); + calCashFlowTotal(); + calCashFlowSettleTotal(); + }); + $("input[name='cashInflowFromInvestingActivities']").change(function () { + calCashInflowFromInvestingActivitiesSettle(); + calCashFlowTotal(); + calCashFlowSettleTotal(); + }); + $("input[name='cashOutflowFromInvestingActivities']").change(function () { + calCashOutflowFromInvestingActivitiesSettle(); + calCashFlowTotal(); + calCashFlowSettleTotal(); + }); + $("input[name='netCashFromInvestingActivities']").change(function () { + calNetCashFromInvestingActivitiesSettle(); + calCashFlowTotal(); + calCashFlowSettleTotal(); + }); + $("input[name='financingCapitalInflow']").change(function () { + calFinancingCapitalInflowSettle(); + calCashFlowTotal(); + calCashFlowSettleTotal(); + }); + $("input[name='financingCapitalOutflow']").change(function () { + calFinancingCapitalOutflowSettle(); + calCashFlowTotal(); + calCashFlowSettleTotal(); + }); + $("input[name='financingCapitalCashflow']").change(function () { + calFinancingCapitalCashflowSettle(); + calCashFlowTotal(); + calCashFlowSettleTotal(); + }); + $("input[name='netIncreaseMonetaryFunds']").change(function () { + calNetIncreaseMonetaryFundsSettle(); + calCashFlowTotal(); + calCashFlowSettleTotal(); + }); + +} + +/** + * 收入设备类结算总额(不含税),有一项没填就置空 + */ +function calIncomeDeviceSettleTotal() { + var incomeDeviceFormerSettleTotal = $("input[name='incomeDeviceFormerSettleTotal']").val(); + var incomeDevice = $("input[name='incomeDevice']").val(); + + var incomeDeviceSettleTotal = $("input[name='incomeDeviceSettleTotal']"); + + if(incomeDeviceFormerSettleTotal && incomeDevice){ + incomeDeviceSettleTotal.val(parseFloat(incomeDeviceFormerSettleTotal)+parseFloat(incomeDevice)); + }else { + incomeDeviceSettleTotal.val(""); + } +} + +/** + * 收入工程类结算总额(不含税),有一项没填就置空 + */ +function calIncomeEngineerSettleTotal() { + var incomeEngineerFormerSettleTotal = $("input[name='incomeEngineerFormerSettleTotal']").val(); + var incomeEngineer = $("input[name='incomeEngineer']").val(); + + var incomeEngineerSettleTotal = $("input[name='incomeEngineerSettleTotal']"); + + if(incomeEngineerFormerSettleTotal && incomeEngineer){ + incomeEngineerSettleTotal.val(parseFloat(incomeEngineerFormerSettleTotal)+parseFloat(incomeEngineer)); + }else { + incomeEngineerSettleTotal.val(""); + } +} + +/** + * 收入服务类结算总额(不含税),有一项没填就置空 + */ +function calIncomeServiceSettleTotal() { + var incomeServiceFormerSettleTotal = $("input[name='incomeServiceFormerSettleTotal']").val(); + var incomeService = $("input[name='incomeService']").val(); + + var incomeServiceSettleTotal = $("input[name='incomeServiceSettleTotal']"); + + if(incomeServiceFormerSettleTotal && incomeService){ + incomeServiceSettleTotal.val(parseFloat(incomeServiceFormerSettleTotal)+parseFloat(incomeService)); + }else { + incomeServiceSettleTotal.val(""); + } +} + +/** + * 本月收入结算金额(不含税),有一项没填就置空 + */ +function calIncomeTotal() { + var incomeDevice = $("input[name='incomeDevice']").val(); + var incomeEngineer = $("input[name='incomeEngineer']").val(); + var incomeService = $("input[name='incomeService']").val(); + + var incomeTotal = $("input[name='incomeTotal']"); + + if(incomeDevice && incomeEngineer && incomeService){ + incomeTotal.val(parseFloat(incomeDevice)+parseFloat(incomeEngineer)+parseFloat(incomeService)); + }else { + incomeTotal.val(""); + } +} + +/** + * 收入结算总额(不含税),有一项没填就置空 + */ +function calIncomeSettleTotal() { + var incomeDeviceSettleTotal = $("input[name='incomeDeviceSettleTotal']").val(); + var incomeEngineerSettleTotal = $("input[name='incomeEngineerSettleTotal']").val(); + var incomeServiceSettleTotal = $("input[name='incomeServiceSettleTotal']").val(); + + var incomeSettleTotal = $("input[name='incomeSettleTotal']"); + + if(incomeDeviceSettleTotal && incomeEngineerSettleTotal && incomeServiceSettleTotal){ + incomeSettleTotal.val(parseFloat(incomeDeviceSettleTotal)+parseFloat(incomeEngineerSettleTotal)+parseFloat(incomeServiceSettleTotal)); + }else { + incomeSettleTotal.val(""); + } +} + +/** + * 采购成本设备结算总额(不含税),有一项没填就置空 + */ +function calCostPurchaseDeviceSettleTotal() { + var costPurchaseDeviceFormerSettleTotal = $("input[name='costPurchaseDeviceFormerSettleTotal']").val(); + var costPurchaseDevice = $("input[name='costPurchaseDevice']").val(); + + var costPurchaseDeviceSettleTotal = $("input[name='costPurchaseDeviceSettleTotal']"); + + if(costPurchaseDeviceFormerSettleTotal && costPurchaseDevice){ + costPurchaseDeviceSettleTotal.val(parseFloat(costPurchaseDeviceFormerSettleTotal)+parseFloat(costPurchaseDevice)); + }else { + costPurchaseDeviceSettleTotal.val(""); + } +} + +/** + * 采购成本施工结算总额(不含税),有一项没填就置空 + */ +function calCostPurchaseBuildSettleTotal() { + var costPurchaseBuildFormerSettleTotal = $("input[name='costPurchaseBuildFormerSettleTotal']").val(); + var costPurchaseBuild = $("input[name='costPurchaseBuild']").val(); + + var costPurchaseBuildSettleTotal = $("input[name='costPurchaseBuildSettleTotal']"); + + if(costPurchaseBuildFormerSettleTotal && costPurchaseBuild){ + costPurchaseBuildSettleTotal.val(parseFloat(costPurchaseBuildFormerSettleTotal)+parseFloat(costPurchaseBuild)); + }else { + costPurchaseBuildSettleTotal.val(""); + } +} + +/** + * 采购成本服务结算总额(不含税),有一项没填就置空 + */ +function calCostPurchaseServiceSettleTotal() { + var costPurchaseServiceFormerSettleTotal = $("input[name='costPurchaseServiceFormerSettleTotal']").val(); + var costPurchaseService = $("input[name='costPurchaseService']").val(); + + var costPurchaseServiceSettleTotal = $("input[name='costPurchaseServiceSettleTotal']"); + + if(costPurchaseServiceFormerSettleTotal && costPurchaseService){ + costPurchaseServiceSettleTotal.val(parseFloat(costPurchaseServiceFormerSettleTotal)+parseFloat(costPurchaseService)); + }else { + costPurchaseServiceSettleTotal.val(""); + } +} + +/** + * 采购成本其他结算总额(不含税),有一项没填就置空 + */ +function calCostPurchaseOtherSettleTotal() { + var costPurchaseOtherFormerSettleTotal = $("input[name='costPurchaseOtherFormerSettleTotal']").val(); + var costPurchaseOther = $("input[name='costPurchaseOther']").val(); + + var costPurchaseOtherSettleTotal = $("input[name='costPurchaseOtherSettleTotal']"); + + if(costPurchaseOtherFormerSettleTotal && costPurchaseOther){ + costPurchaseOtherSettleTotal.val(parseFloat(costPurchaseOtherFormerSettleTotal)+parseFloat(costPurchaseOther)); + }else { + costPurchaseOtherSettleTotal.val(""); + } +} + +/** + * 项目管理成本结算总额(不含税),有一项没填就置空 + */ +function calCostProjectManageSettleTotal() { + var costProjectManageFormerSettleTotal = $("input[name='costProjectManageFormerSettleTotal']").val(); + var costProjectManage = $("input[name='costProjectManage']").val(); + + var costProjectManageSettleTotal = $("input[name='costProjectManageSettleTotal']"); + + if(costProjectManageFormerSettleTotal && costProjectManage){ + costProjectManageSettleTotal.val(parseFloat(costProjectManageFormerSettleTotal)+parseFloat(costProjectManage)); + }else { + costProjectManageSettleTotal.val(""); + } +} + +/** + * 其他结算总额(不含税),有一项没填就置空 + */ +function calCostOtherSettleTotal() { + var costOtherFormerSettleTotal = $("input[name='costOtherFormerSettleTotal']").val(); + var costOther = $("input[name='costOther']").val(); + + var costOtherSettleTotal = $("input[name='costOtherSettleTotal']"); + + if(costOtherFormerSettleTotal && costOther){ + costOtherSettleTotal.val(parseFloat(costOtherFormerSettleTotal)+parseFloat(costOther)); + }else { + costOtherSettleTotal.val(""); + } +} + +/** + * 本月成本结算金额(不含税),有一项没填就置空 + */ +function calCostTotal() { + var costPurchaseDevice = $("input[name='costPurchaseDevice']").val(); + var costPurchaseBuild = $("input[name='costPurchaseBuild']").val(); + var costPurchaseService = $("input[name='costPurchaseService']").val(); + var costPurchaseOther = $("input[name='costPurchaseOther']").val(); + var costProjectManage = $("input[name='costProjectManage']").val(); + var costOther = $("input[name='costOther']").val(); + + var costTotal = $("input[name='costTotal']"); + + if(costPurchaseDevice && costPurchaseBuild && costPurchaseService && costPurchaseOther && costProjectManage && costOther){ + costTotal.val(parseFloat(costPurchaseDevice)+parseFloat(costPurchaseBuild)+parseFloat(costPurchaseService)+parseFloat(costPurchaseOther)+parseFloat(costProjectManage)+parseFloat(costOther)); + }else { + costTotal.val(""); + } +} + +/** + * 成本决算总额(不含税),有一项没填就置空 + */ +function calCostSettleTotal() { + var costPurchaseDeviceSettleTotal = $("input[name='costPurchaseDeviceSettleTotal']").val(); + var costPurchaseBuildSettleTotal = $("input[name='costPurchaseBuildSettleTotal']").val(); + var costPurchaseServiceSettleTotal = $("input[name='costPurchaseServiceSettleTotal']").val(); + var costPurchaseOtherSettleTotal = $("input[name='costPurchaseOtherSettleTotal']").val(); + var costProjectManageSettleTotal = $("input[name='costProjectManageSettleTotal']").val(); + var costOtherSettleTotal = $("input[name='costOtherSettleTotal']").val(); + + var costSettleTotal = $("input[name='costSettleTotal']"); + + if(costPurchaseDeviceSettleTotal && costPurchaseBuildSettleTotal && costPurchaseServiceSettleTotal && + costPurchaseOtherSettleTotal && costProjectManageSettleTotal && costOtherSettleTotal){ + costSettleTotal.val(parseFloat(costPurchaseDeviceSettleTotal)+parseFloat(costPurchaseBuildSettleTotal)+parseFloat(costPurchaseServiceSettleTotal)+ + parseFloat(costPurchaseOtherSettleTotal)+parseFloat(costProjectManageSettleTotal)+parseFloat(costOtherSettleTotal)); + }else { + costSettleTotal.val(""); + } +} + +/** + * 财务费用总额(不含税),有一项没填就置空 + */ +function calCostExpropriationSettleTotal() { + var costExpropriationFormerSettleTotal = $("input[name='costExpropriationFormerSettleTotal']").val(); + var costExpropriation = $("input[name='costExpropriation']").val(); + + var costExpropriationSettleTotal = $("input[name='costExpropriationSettleTotal']"); + + if(costExpropriationFormerSettleTotal && costExpropriation){ + costExpropriationSettleTotal.val(parseFloat(costExpropriationFormerSettleTotal)+parseFloat(costExpropriation)); + }else { + costExpropriationSettleTotal.val(""); + } +} + +/** + * 公司管理费用总额(不含税),有一项没填就置空 + */ +function calCostCompanyManageSettleTotal() { + var costCompanyManageFormerSettleTotal = $("input[name='costCompanyManageFormerSettleTotal']").val(); + var costCompanyManage = $("input[name='costCompanyManage']").val(); + + var costCompanyManageSettleTotal = $("input[name='costCompanyManageSettleTotal']"); + + if(costCompanyManageFormerSettleTotal && costCompanyManage){ + costCompanyManageSettleTotal.val(parseFloat(costCompanyManageFormerSettleTotal)+parseFloat(costCompanyManage)); + }else { + costCompanyManageSettleTotal.val(""); + } +} + +/** + * 所得税费用总额(不含税),有一项没填就置空 + */ +function calCostIncomeTaxSettleTotal() { + var costIncomeTaxFormerSettleTotal = $("input[name='costIncomeTaxFormerSettleTotal']").val(); + var costIncomeTax = $("input[name='costIncomeTax']").val(); + + var costIncomeTaxSettleTotal = $("input[name='costIncomeTaxSettleTotal']"); + + if(costIncomeTaxFormerSettleTotal && costIncomeTax){ + costIncomeTaxSettleTotal.val(parseFloat(costIncomeTaxFormerSettleTotal)+parseFloat(costIncomeTax)); + }else { + costIncomeTaxSettleTotal.val(""); + } +} + +/** + * 本月管理成本总额(不含税),有一项没填就置空 + */ +function calCostManageTotal() { + var costExpropriation = $("input[name='costExpropriation']").val(); + var costCompanyManage = $("input[name='costCompanyManage']").val(); + var costIncomeTax = $("input[name='costIncomeTax']").val(); + + var costManageTotal = $("input[name='costManageTotal']"); + + if(costExpropriation && costCompanyManage && costIncomeTax){ + costManageTotal.val(parseFloat(costExpropriation)+parseFloat(costCompanyManage)+parseFloat(costIncomeTax)); + }else { + costManageTotal.val(""); + } +} + +/** + * 管理成本总额(不含税),有一项没填就置空 + */ +function calCostManageSettleTotal() { + var costExpropriationSettleTotal = $("input[name='costExpropriationSettleTotal']").val(); + var costCompanyManageSettleTotal = $("input[name='costCompanyManageSettleTotal']").val(); + var costIncomeTaxSettleTotal = $("input[name='costIncomeTaxSettleTotal']").val(); + + var costManageSettleTotal = $("input[name='costManageSettleTotal']"); + + if(costExpropriationSettleTotal && costCompanyManageSettleTotal && costIncomeTaxSettleTotal){ + costManageSettleTotal.val(parseFloat(costExpropriationSettleTotal)+parseFloat(costCompanyManageSettleTotal)+parseFloat(costIncomeTaxSettleTotal)); + }else { + costManageSettleTotal.val(""); + } +} + +/** + * 项目毛利结算总额,有一项没填就置空 + */ +function calGrossProfitSettleTotal() { + var grossProfitFormerSettleTotal = $("input[name='grossProfitFormerSettleTotal']").val(); + var grossProfit = $("input[name='grossProfit']").val(); + + var grossProfitSettleTotal = $("input[name='grossProfitSettleTotal']"); + + if(grossProfitFormerSettleTotal && grossProfit){ + grossProfitSettleTotal.val(parseFloat(grossProfitFormerSettleTotal)+parseFloat(grossProfit)); + }else { + grossProfitSettleTotal.val(""); + } +} + +/** + * 项目毛利利润率,有一项没填就置空 + */ +function calGrossProfitProfitMargin() { + var grossProfitSettleTotal = $("input[name='grossProfitSettleTotal']").val(); + var incomeSettleTotal = $("input[name='incomeSettleTotal']").val(); + + var grossProfitProfitMargin = $("input[name='grossProfitProfitMargin']"); + + if(grossProfitSettleTotal && incomeSettleTotal){ + grossProfitProfitMargin.val(100*(parseFloat(grossProfitSettleTotal)/parseFloat(incomeSettleTotal))); + }else { + grossProfitProfitMargin.val(""); + } +} + +/** + * 项目贡献利润,有一项没填就置空 + */ +function calContributionProfitSettleTotal() { + var contributionProfitFormerSettleTotal = $("input[name='contributionProfitFormerSettleTotal']").val(); + var contributionProfit = $("input[name='contributionProfit']").val(); + + var contributionProfitSettleTotal = $("input[name='contributionProfitSettleTotal']"); + + if(contributionProfitFormerSettleTotal && contributionProfit){ + contributionProfitSettleTotal.val(parseFloat(contributionProfitFormerSettleTotal)+parseFloat(contributionProfit)); + }else { + contributionProfitSettleTotal.val(""); + } +} + +/** + * 项目贡献利润率,有一项没填就置空 + */ +function calContributionProfitProfitMargin() { + var contributionProfitSettleTotal = $("input[name='contributionProfitSettleTotal']").val(); + var incomeSettleTotal = $("input[name='incomeSettleTotal']").val(); + + var contributionProfitProfitMargin = $("input[name='contributionProfitProfitMargin']"); + + if(contributionProfitSettleTotal && incomeSettleTotal){ + contributionProfitProfitMargin.val(100*(parseFloat(contributionProfitSettleTotal)/parseFloat(incomeSettleTotal))); + }else { + contributionProfitProfitMargin.val(""); + } +} + +/** + * 项目净利润,有一项没填就置空 + */ +function calNetProfitSettleTotal() { + var netProfitFormerSettleTotal = $("input[name='netProfitFormerSettleTotal']").val(); + var netProfit = $("input[name='netProfit']").val(); + + var netProfitSettleTotal = $("input[name='netProfitSettleTotal']"); + + if(netProfitFormerSettleTotal && netProfit){ + netProfitSettleTotal.val(parseFloat(netProfitFormerSettleTotal)+parseFloat(netProfit)); + }else { + netProfitSettleTotal.val(""); + } +} + +/** + * 项目净利润率,有一项没填就置空 + */ +function calNetProfitProfitMargin() { + var netProfitSettleTotal = $("input[name='netProfitSettleTotal']").val(); + var incomeSettleTotal = $("input[name='incomeSettleTotal']").val(); + + var netProfitProfitMargin = $("input[name='netProfitProfitMargin']"); + console.log("calNetProfitProfitMargin " + netProfitSettleTotal + " " + incomeSettleTotal); + if(netProfitSettleTotal && incomeSettleTotal){ + netProfitProfitMargin.val(100*(parseFloat(netProfitSettleTotal)/parseFloat(incomeSettleTotal))); + }else { + netProfitProfitMargin.val(""); + } +} + +/** + * 销售商品、提供劳务收到的现金,有一项没填就置空 + */ +function calSaleIncomeCashSettle() { + var saleIncomeCashFormerSettle = $("input[name='saleIncomeCashFormerSettle']").val(); + var saleIncomeCash = $("input[name='saleIncomeCash']").val(); + + var saleIncomeCashSettle = $("input[name='saleIncomeCashSettle']"); + + if(saleIncomeCashFormerSettle && saleIncomeCash){ + saleIncomeCashSettle.val(parseFloat(saleIncomeCashFormerSettle)+parseFloat(saleIncomeCash)); + }else { + saleIncomeCashSettle.val(""); + } +} + +/** + * 收到的税费返还,有一项没填就置空 + */ +function calTaxReturnSettle() { + var taxReturnFormerSettle = $("input[name='taxReturnFormerSettle']").val(); + var taxReturn = $("input[name='taxReturn']").val(); + + var taxReturnSettle = $("input[name='taxReturnSettle']"); + + if(taxReturnFormerSettle && taxReturn){ + taxReturnSettle.val(parseFloat(taxReturnFormerSettle)+parseFloat(taxReturn)); + }else { + taxReturnSettle.val(""); + } +} + +/** + * 收到其他与经营活动有关的现金,有一项没填就置空 + */ +function calEarnestMoneyIncomeSettle() { + var earnestMoneyIncomeFormerSettle = $("input[name='earnestMoneyIncomeFormerSettle']").val(); + var earnestMoneyIncome = $("input[name='earnestMoneyIncome']").val(); + + var earnestMoneyIncomeSettle = $("input[name='earnestMoneyIncomeSettle']"); + + if(earnestMoneyIncomeFormerSettle && earnestMoneyIncome){ + earnestMoneyIncomeSettle.val(parseFloat(earnestMoneyIncomeFormerSettle)+parseFloat(earnestMoneyIncome)); + }else { + earnestMoneyIncomeSettle.val(""); + } +} + +/** + * 购买商品、接受劳务支付的现金,有一项没填就置空 + */ +function calPurchaseCostSettle() { + var purchaseCostFormerSettle = $("input[name='purchaseCostFormerSettle']").val(); + var purchaseCost = $("input[name='purchaseCost']").val(); + + var purchaseCostSettle = $("input[name='purchaseCostSettle']"); + + if(purchaseCostFormerSettle && purchaseCost){ + purchaseCostSettle.val(parseFloat(purchaseCostFormerSettle)+parseFloat(purchaseCost)); + }else { + purchaseCostSettle.val(""); + } +} + +/** + * 支付的各项税费,有一项没填就置空 + */ +function calTaxCostSettle() { + var taxCostFormerSettle = $("input[name='taxCostFormerSettle']").val(); + var taxCost = $("input[name='taxCost']").val(); + + var taxCostSettle = $("input[name='taxCostSettle']"); + + if(taxCostFormerSettle && taxCost){ + taxCostSettle.val(parseFloat(taxCostFormerSettle)+parseFloat(taxCost)); + }else { + taxCostSettle.val(""); + } +} + + +/** + * 支付其他与经营活动有关的现金,有一项没填就置空 + */ +function calEarnestMoneyCostSettle() { + var earnestMoneyCostFormerSettle = $("input[name='earnestMoneyCostFormerSettle']").val(); + var earnestMoneyCost = $("input[name='earnestMoneyCost']").val(); + + var earnestMoneyCostSettle = $("input[name='earnestMoneyCostSettle']"); + + if(earnestMoneyCostFormerSettle && earnestMoneyCost){ + earnestMoneyCostSettle.val(parseFloat(earnestMoneyCostFormerSettle)+parseFloat(earnestMoneyCost)); + }else { + earnestMoneyCostSettle.val(""); + } +} + +/** + * 经营活动产生的现金流量净额,有一项没填就置空 + */ +function calNetCashFlowSettle() { + var netCashFlowFormerSettle = $("input[name='netCashFlowFormerSettle']").val(); + var netCashFlow = $("input[name='netCashFlow']").val(); + + var netCashFlowSettle = $("input[name='netCashFlowSettle']"); + + if(netCashFlowFormerSettle && netCashFlow){ + netCashFlowSettle.val(parseFloat(netCashFlowFormerSettle)+parseFloat(netCashFlow)); + }else { + netCashFlowSettle.val(""); + } +} + +/** + * 投资活动现金流入,有一项没填就置空 + */ +function calCashInflowFromInvestingActivitiesSettle() { + var cashInflowFromInvestingActivitiesFormerSettle = $("input[name='cashInflowFromInvestingActivitiesFormerSettle']").val(); + var cashInflowFromInvestingActivities = $("input[name='cashInflowFromInvestingActivities']").val(); + + var cashInflowFromInvestingActivitiesSettle = $("input[name='cashInflowFromInvestingActivitiesSettle']"); + + if(cashInflowFromInvestingActivitiesFormerSettle && cashInflowFromInvestingActivities){ + cashInflowFromInvestingActivitiesSettle.val(parseFloat(cashInflowFromInvestingActivitiesFormerSettle)+parseFloat(cashInflowFromInvestingActivities)); + }else { + cashInflowFromInvestingActivitiesSettle.val(""); + } +} + +/** + * 投资活动现金流出,有一项没填就置空 + */ +function calCashOutflowFromInvestingActivitiesSettle() { + var cashOutflowFromInvestingActivitiesFormerSettle = $("input[name='cashOutflowFromInvestingActivitiesFormerSettle']").val(); + var cashOutflowFromInvestingActivities = $("input[name='cashOutflowFromInvestingActivities']").val(); + + var cashOutflowFromInvestingActivitiesSettle = $("input[name='cashOutflowFromInvestingActivitiesSettle']"); + + if(cashOutflowFromInvestingActivitiesFormerSettle && cashOutflowFromInvestingActivities){ + cashOutflowFromInvestingActivitiesSettle.val(parseFloat(cashOutflowFromInvestingActivitiesFormerSettle)+parseFloat(cashOutflowFromInvestingActivities)); + }else { + cashOutflowFromInvestingActivitiesSettle.val(""); + } +} + +/** + * 投资活动产生的现金流量净额,有一项没填就置空 + */ +function calNetCashFromInvestingActivitiesSettle() { + var netCashFromInvestingActivitiesFormerSettle = $("input[name='netCashFromInvestingActivitiesFormerSettle']").val(); + var netCashFromInvestingActivities = $("input[name='netCashFromInvestingActivities']").val(); + + var netCashFromInvestingActivitiesSettle = $("input[name='netCashFromInvestingActivitiesSettle']"); + + if(netCashFromInvestingActivitiesFormerSettle && netCashFromInvestingActivities){ + netCashFromInvestingActivitiesSettle.val(parseFloat(netCashFromInvestingActivitiesFormerSettle)+parseFloat(netCashFromInvestingActivities)); + }else { + netCashFromInvestingActivitiesSettle.val(""); + } +} + +/** + * 融资资金流入,有一项没填就置空 + */ +function calFinancingCapitalInflowSettle() { + var financingCapitalInflowFormerSettle = $("input[name='financingCapitalInflowFormerSettle']").val(); + var financingCapitalInflow = $("input[name='financingCapitalInflow']").val(); + + var financingCapitalInflowSettle = $("input[name='financingCapitalInflowSettle']"); + + if(financingCapitalInflowFormerSettle && financingCapitalInflow){ + financingCapitalInflowSettle.val(parseFloat(financingCapitalInflowFormerSettle)+parseFloat(financingCapitalInflow)); + }else { + financingCapitalInflowSettle.val(""); + } +} + +/** + * 还款资金流出,有一项没填就置空 + */ +function calFinancingCapitalOutflowSettle() { + var financingCapitalOutflowFormerSettle = $("input[name='financingCapitalOutflowFormerSettle']").val(); + var financingCapitalOutflow = $("input[name='financingCapitalOutflow']").val(); + + var financingCapitalOutflowSettle = $("input[name='financingCapitalOutflowSettle']"); + + if(financingCapitalOutflowFormerSettle && financingCapitalOutflow){ + financingCapitalOutflowSettle.val(parseFloat(financingCapitalOutflowFormerSettle)+parseFloat(financingCapitalOutflow)); + }else { + financingCapitalOutflowSettle.val(""); + } +} + +/** + * 筹资活动产生的现金流量净额,有一项没填就置空 + */ +function calFinancingCapitalCashflowSettle() { + var financingCapitalCashflowFormerSettle = $("input[name='financingCapitalCashflowFormerSettle']").val(); + var financingCapitalCashflow = $("input[name='financingCapitalCashflow']").val(); + + var financingCapitalCashflowSettle = $("input[name='financingCapitalCashflowSettle']"); + + if(financingCapitalCashflowFormerSettle && financingCapitalCashflow){ + financingCapitalCashflowSettle.val(parseFloat(financingCapitalCashflowFormerSettle)+parseFloat(financingCapitalCashflow)); + }else { + financingCapitalCashflowSettle.val(""); + } +} + +/** + * 货币资金净增加额,有一项没填就置空 + */ +function calNetIncreaseMonetaryFundsSettle() { + var netIncreaseMonetaryFundsFormerSettle = $("input[name='netIncreaseMonetaryFundsFormerSettle']").val(); + var netIncreaseMonetaryFunds = $("input[name='netIncreaseMonetaryFunds']").val(); + + var netIncreaseMonetaryFundsSettle = $("input[name='netIncreaseMonetaryFundsSettle']"); + + if(netIncreaseMonetaryFundsFormerSettle && netIncreaseMonetaryFunds){ + netIncreaseMonetaryFundsSettle.val(parseFloat(netIncreaseMonetaryFundsFormerSettle)+parseFloat(netIncreaseMonetaryFunds)); + }else { + netIncreaseMonetaryFundsSettle.val(""); + } +} + +/** + * 本月现金流量表总额(不含税),有一项没填就置空 + */ +function calCashFlowTotal() { + var saleIncomeCash = $("input[name='saleIncomeCash']").val(); + var taxReturn = $("input[name='taxReturn']").val(); + var earnestMoneyIncome = $("input[name='earnestMoneyIncome']").val(); + var purchaseCost = $("input[name='purchaseCost']").val(); + var taxCost = $("input[name='taxCost']").val(); + var earnestMoneyCost = $("input[name='earnestMoneyCost']").val(); + var netCashFlow = $("input[name='netCashFlow']").val(); + var cashInflowFromInvestingActivities = $("input[name='cashInflowFromInvestingActivities']").val(); + var cashOutflowFromInvestingActivities = $("input[name='cashOutflowFromInvestingActivities']").val(); + var netCashFromInvestingActivities = $("input[name='netCashFromInvestingActivities']").val(); + var financingCapitalInflow = $("input[name='financingCapitalInflow']").val(); + var financingCapitalOutflow = $("input[name='financingCapitalOutflow']").val(); + var financingCapitalCashflow = $("input[name='financingCapitalCashflow']").val(); + var netIncreaseMonetaryFunds = $("input[name='netIncreaseMonetaryFunds']").val(); + + var cashFlowTotal = $("input[name='cashFlowTotal']"); + + if(saleIncomeCash && taxReturn && earnestMoneyIncome && + purchaseCost && taxCost && earnestMoneyCost&& + netCashFlow && cashInflowFromInvestingActivities && cashOutflowFromInvestingActivities && + netCashFromInvestingActivities && financingCapitalInflow && financingCapitalOutflow + && financingCapitalCashflow && netIncreaseMonetaryFunds){ + cashFlowTotal.val(parseFloat(saleIncomeCash)+parseFloat(taxReturn)+parseFloat(earnestMoneyIncome)+ + parseFloat(purchaseCost)+parseFloat(taxCost)+parseFloat(earnestMoneyCost)+ + parseFloat(netCashFlow)+parseFloat(cashInflowFromInvestingActivities)+parseFloat(cashOutflowFromInvestingActivities)+ + parseFloat(netCashFromInvestingActivities)+parseFloat(financingCapitalInflow)+parseFloat(financingCapitalOutflow)+ + parseFloat(financingCapitalCashflow)+parseFloat(netIncreaseMonetaryFunds)); + }else { + cashFlowTotal.val(""); + } +} + +/** + * 现金流量表总额(不含税),有一项没填就置空 + */ +function calCashFlowSettleTotal() { + var saleIncomeCashSettle = $("input[name='saleIncomeCashSettle']").val(); + var taxReturnSettle = $("input[name='taxReturnSettle']").val(); + var earnestMoneyIncomeSettle = $("input[name='earnestMoneyIncomeSettle']").val(); + var purchaseCostSettle = $("input[name='purchaseCostSettle']").val(); + var taxCostSettle = $("input[name='taxCostSettle']").val(); + var earnestMoneyCostSettle = $("input[name='earnestMoneyCostSettle']").val(); + var netCashFlowSettle = $("input[name='netCashFlowSettle']").val(); + var cashInflowFromInvestingActivitiesSettle = $("input[name='cashInflowFromInvestingActivitiesSettle']").val(); + var cashOutflowFromInvestingActivitiesSettle = $("input[name='cashOutflowFromInvestingActivitiesSettle']").val(); + var netCashFromInvestingActivitiesSettle = $("input[name='netCashFromInvestingActivitiesSettle']").val(); + var financingCapitalInflowSettle = $("input[name='financingCapitalInflowSettle']").val(); + var financingCapitalOutflowSettle = $("input[name='financingCapitalOutflowSettle']").val(); + var financingCapitalCashflowSettle = $("input[name='financingCapitalCashflowSettle']").val(); + var netIncreaseMonetaryFundsSettle = $("input[name='netIncreaseMonetaryFundsSettle']").val(); + + var cashFlowSettleTotal = $("input[name='cashFlowSettleTotal']"); + + if(saleIncomeCashSettle && taxReturnSettle && earnestMoneyIncomeSettle && + purchaseCostSettle && taxCostSettle && earnestMoneyCostSettle&& + netCashFlowSettle && cashInflowFromInvestingActivitiesSettle && cashOutflowFromInvestingActivitiesSettle && + netCashFromInvestingActivitiesSettle && financingCapitalInflowSettle && financingCapitalOutflowSettle + && financingCapitalCashflowSettle && netIncreaseMonetaryFundsSettle){ + cashFlowSettleTotal.val(parseFloat(saleIncomeCashSettle)+parseFloat(taxReturnSettle)+parseFloat(earnestMoneyIncomeSettle)+ + parseFloat(purchaseCostSettle)+parseFloat(taxCostSettle)+parseFloat(earnestMoneyCostSettle)+ + parseFloat(netCashFlowSettle)+parseFloat(cashInflowFromInvestingActivitiesSettle)+parseFloat(cashOutflowFromInvestingActivitiesSettle)+ + parseFloat(netCashFromInvestingActivitiesSettle)+parseFloat(financingCapitalInflowSettle)+parseFloat(financingCapitalOutflowSettle)+ + parseFloat(financingCapitalCashflowSettle)+parseFloat(netIncreaseMonetaryFundsSettle)); + }else { + cashFlowSettleTotal.val(""); + } +} + + + + + + diff --git a/src/main/resources/templates/admin/project_list.ftl b/src/main/resources/templates/admin/project_list.ftl index bd7c615..83ceafc 100644 --- a/src/main/resources/templates/admin/project_list.ftl +++ b/src/main/resources/templates/admin/project_list.ftl @@ -219,6 +219,11 @@ <#-- --> + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/resources/templates/admin/project_settle_edit.ftl b/src/main/resources/templates/admin/project_settle_edit.ftl new file mode 100644 index 0000000..5215ecd --- /dev/null +++ b/src/main/resources/templates/admin/project_settle_edit.ftl @@ -0,0 +1,426 @@ +<#assign base=request.contextPath /> + +<#import "../common/defaultLayout.ftl" as defaultLayout> +<@defaultLayout.layout> + + + +
+
+
+
项目结算表 / ${project.name}
+
+ +
+ +
+ +
+
+ + 收入 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
类别费用概算总额(元)预算总额(元)上月结算总额(元)本月结算金额(元)结算总额(元)
收入设备类
收入工程类
收入服务类
合计
+ 成本 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
类别费用费用项目概算总额(元)预算总额(元)上月结算总额(元)本月结算金额(元)结算总额(元)
成本采购成本设备
成本采购成本施工
成本采购成本服务
成本采购成本其他
成本项目管理成本项目管理成本
成本其他其他
合计
+ 管理 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
类别费用项目概算总额(元)预算总额(元)上月结算总额(元)本月结算金额(元)结算总额(元)
财务费用资金占用成本
公司管理费用
所得税费用//
合计
+ + 利润率计算 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
类别概算总额(元)预算总额(元)上月结算总额(元)本月结算金额(元)结算总额(元)利润率(%)
项目毛利
项目贡献利润
项目净利润/
+ + 现金流量表 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
类别预算总额(元)上月结算总额(元)本月结算金额(元)结算总额(元)
销售商品、提供劳务收到的现金
收到的税费返还/
收到其他与经营活动有关的现金
购买商品、接受劳务支付的现金
支付的各项税费/
支付其他与经营活动有关的现金
经营活动产生的现金流量净额
投资活动现金流入/
投资活动现金流出/
投资活动产生的现金流量净额/
融资资金流入
还款资金流出
筹资活动产生的现金流量净额
货币资金净增加额
合计
+
+ +
+
+ + +
+ + +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + diff --git a/src/main/resources/templates/admin/project_summary.ftl b/src/main/resources/templates/admin/project_summary.ftl new file mode 100644 index 0000000..1a54b75 --- /dev/null +++ b/src/main/resources/templates/admin/project_summary.ftl @@ -0,0 +1,202 @@ +<#assign base=request.contextPath /> +<#import "../common/defaultLayout.ftl" as defaultLayout> +<@defaultLayout.layout> +
+
+
+
项目统计
+
+ +
+ +
+
+
+
+
+ + + + + + + + + + + + + + + + + + + <#if (pager1.list)?exists> + <#list pager1.list as list> + + + + + + + + + + + + + + + + + +
收入--设备类收入--工程类收入--服务类采购成本--设备类采购成本--施工类采购成本--服务类采购成本--其他成本--其他成本--项目管理成本财务费用--资金占用成本公司管理费用
${list.projectName!}${(list.incomeDeviceTaxExclude!0)?string("0.##")}${(list.incomeEngineerTaxExclude!0)?string("0.##")}${(list.incomeServiceTaxExclude!0)?string("0.##")}${(list.costPurchaseDeviceTaxExclude!0)?string("0.##")}${(list.costPurchaseBuildTaxExclude!0)?string("0.##")}${(list.costPurchaseServiceTaxExclude!0)?string("0.##")}${(list.costPurchaseOtherTaxExclude!0)?string("0.##")}${(list.costOtherOtherTaxExclude!0)?string("0.##")}${(list.costProjectManageTaxExclude!0)?string("0.##")}${(list.costExpropriationTaxExclude!0)?string("0.##")}${(list.costCompanyManageTaxExclude!0)?string("0.##")}
+
+
+
+
+
+
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + <#if (pager2.list)?exists> + <#list pager2.list as list> + + + + + + + + + + + + + + + + + + + +
营业收入营业成本项目管理成本其他财务费用项目毛利项目毛利率公司管理费用项目贡献利润项目贡献利润率所得税费用项目净利润项目净利润率
${list.projectName!}${(list.incomeTotalTaxExclude!0)?string("0.##")}${(list.costTotalTaxExclude!0)?string("0.##")}${(list.costProjectManageTaxExclude!0)?string("0.##")}${(list.costOtherOtherTaxExclude!0)?string("0.##")}${(list.costExpropriationTaxExclude!0)?string("0.##")}${(list.projectGrossProfit!0)?string("0.##")}${(list.projectGrossProfitRate!0)?string("0.##")}${(list.costCompanyManageTaxExclude!0)?string("0.##")}${(list.projectContributionProfit!0)?string("0.##")}${(list.projectContributionProfitRate!0)?string("0.##")}${(list.taxCost!0)?string("0.##")}${(list.projectNetProfit!0)?string("0.##")}${(list.projectNetProfitRate!0)?string("0.##")}
+
+
+
+
+
+
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + <#if (pager3.list)?exists> + <#list pager3.list as list> + + + + + + + + + + + + + + + + + + + + +
销售商品、提供劳务收到的现金收到的税费返还收到的其他与经营活动有关的现金购买商品、接受劳务支付的现金支付的各项税费支付其他与经营活动有关的现金经营活动产生的现金流量净额投资活动现金流入投资活动现金流出投资活动产生的现金流量净额借款资金流入还款资金流出筹资活动产生的现金流量净额货币资金净增加额
${list.projectName!}${(list.saleIncomeCash!0)?string("0.##")}${(list.taxReturn!0)?string("0.##")}${(list.earnestMoneyIncome!0)?string("0.##")}${(list.purchaseCost!0)?string("0.##")}${(list.taxCost!0)?string("0.##")}${(list.earnestMoneyCost!0)?string("0.##")}${(list.netCashFlow!0)?string("0.##")}${(list.cashInflowFromInvestingActivities!0)?string("0.##")}${(list.cashOutflowFromInvestingActivities!0)?string("0.##")}${(list.netCashFromInvestingActivities!0)?string("0.##")}${(list.financingCapitalInflow!0)?string("0.##")}${(list.financingCapitalOutflow!0)?string("0.##")}${(list.financingCapitalCashflow!0)?string("0.##")}${(list.netIncreaseMonetaryFunds!0)?string("0.##")}
+
+
+
+
+
+ +
+ + <#if (pager1.list)?exists && (pager1.list?size>0) > +
+ <#include "../common/common_pager.ftl"> +
+ <#else> +
+

没有找到任何记录!

+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + +