项目结算和项目汇总

master
OathK1per 2021-11-17 09:37:02 +08:00
parent 73c4c9e6e7
commit 0f36a3ba66
23 changed files with 4617 additions and 0 deletions

View File

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

View File

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

View File

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

View File

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

View File

@ -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<String, Object> model) {
Project project = projectService.getProject(id);
List<ProjectBudgetPlanDetail> 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<String, Object> model) {
Project project = projectService.getProject(id);
List<ProjectBudgetPlanDetail> 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";
}
}

View File

@ -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<String, Object> model) {
//当前登录人的角色类型
Admin admin = getAdmin();
model.put("keywords",keywords);
ConcurrentHashMap<String, String> searchInfo = getSearchInfo(keywords,model);
List<Page<Record>> 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";
}
}

View File

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

View File

@ -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<ProjectSettleCashFlow, Integer> {
List<ProjectSettleCashFlow> findAllByProjectIdAndTime(int id, String time);
@Query(value = "select * from project_settle_cash_flow where project_id = ?1 and time < ?2", nativeQuery = true)
List<ProjectSettleCashFlow> findAllByProjectIdBefore(int id, String time);
}

View File

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

View File

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

View File

@ -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<ProjectSettleCostManage, Integer> {
List<ProjectSettleCostManage> findAllByProjectIdAndTime(int id, String time);
@Query(value = "select * from project_settle_cost_manage where project_id = ?1 and time < ?2", nativeQuery = true)
List<ProjectSettleCostManage> findAllByProjectIdBefore(int id, String time);
}

View File

@ -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<ProjectSettleCost, Integer> {
List<ProjectSettleCost> findAllByProjectIdAndTime(int id, String time);
@Query(value = "select * from project_settle_cost where project_id = ?1 and time < ?2", nativeQuery = true)
List<ProjectSettleCost> findAllByProjectIdBefore(int id, String time);
}

View File

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

View File

@ -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<ProjectSettleIncome, Integer> {
List<ProjectSettleIncome> findAllByProjectIdAndTime(int id, String time);
@Query(value = "select * from project_settle_income where project_id = ?1 and time < ?2", nativeQuery = true)
List<ProjectSettleIncome> findAllByProjectIdBefore(int id, String time);
}

View File

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

View File

@ -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<ProjectSettleProfitMargin, Integer> {
List<ProjectSettleProfitMargin> findAllByProjectIdAndTime(int id, String time);
@Query(value = "select * from project_settle_profit_margin where project_id = ?1 and time < ?2", nativeQuery = true)
List<ProjectSettleProfitMargin> findAllByProjectIdBefore(int id, String time);
}

View File

@ -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<ProjectSettleIncome> incomes = projectSettleIncomeRepository.findAllByProjectIdAndTime(project.getId(), time);
if(CollectionUtil.isNotEmpty(incomes)){
projectSettleIncomeRepository.deleteInBatch(incomes);
}
List<ProjectSettleCost> costs = projectSettleCostRepository.findAllByProjectIdAndTime(project.getId(), time);
if(CollectionUtil.isNotEmpty(costs)){
projectSettleCostRepository.deleteInBatch(costs);
}
List<ProjectSettleCostManage> costManages = projectSettleCostManageRepository.findAllByProjectIdAndTime(project.getId(), time);
if(CollectionUtil.isNotEmpty(costManages)){
projectSettleCostManageRepository.deleteInBatch(costManages);
}
List<ProjectSettleProfitMargin> profitMargins = projectSettleProfitMarginRepository.findAllByProjectIdAndTime(project.getId(), time);
if(CollectionUtil.isNotEmpty(profitMargins)){
projectSettleProfitMarginRepository.deleteInBatch(profitMargins);
}
List<ProjectSettleCashFlow> 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<ProjectSettleIncome> 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<ProjectSettleCost> 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<ProjectSettleCostManage> 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<ProjectSettleProfitMargin> 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<ProjectSettleCashFlow> 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;
}
}

View File

@ -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<Page<Record>> getList(ConcurrentHashMap<String, String> searchInfo, int pageNumber, int pageSize) {
List<Page<Record>> pageList = new ArrayList<>();
if (pageNumber == 1) {
//预算金额
Map<String, BigDecimal> 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<Project> 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;
}
}

View File

@ -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("");
}
}

View File

@ -219,6 +219,11 @@
</button> </button>
</#if> </#if>
<#-- </@shiro.hasPermission>--> <#-- </@shiro.hasPermission>-->
<button type="button"
class="am-btn am-btn-default am-btn-xs am-text-secondary"
onclick="location.href='${base}/project/settle/add?id=${list.id}'"><span
class="am-icon-pencil-square-o"></span>填写结算表
</button>
<button type="button" <button type="button"
class="am-btn am-btn-default am-btn-xs am-text-secondary" class="am-btn am-btn-default am-btn-xs am-text-secondary"
onclick="location.href='${base}/project/final/edit?id=${list.id}'"><span onclick="location.href='${base}/project/final/edit?id=${list.id}'"><span

View File

@ -0,0 +1,451 @@
<#assign base=request.contextPath />
<#import "../common/defaultLayout.ftl" as defaultLayout>
<@defaultLayout.layout>
<style type="text/css">
/**让所有的模态对话框都居中*/
.am-modal.am-modal-prompt.am-modal-active {
transform: translate(-50%, -50%) scale(1);
left: 50%;
top: 50%;
margin-left: 0;
margin-top: 0!important;
}
select[readonly] option {
display: none;
}
</style>
<div class="admin-content">
<div class="admin-content-body">
<div class="am-cf am-padding">
<div class="am-fl am-cf"><strong class="am-text-primary am-text-lg">项目结算表</strong> / <small>${project.name}</small></div>
</div>
<form method="post" class="am-form" id="pmsForm" action="${base}/project/settleAdd">
<!--选项卡tabsbegin-->
<div class="am-tabs am-margin" data-am-tabs>
<ul class="am-tabs-nav am-nav am-nav-tabs">
<li class="am-active"><a href="#tab1">项目结算利润表</a></li>
</ul>
<div class="am-tabs-bd">
<div class="am-tab-panel am-fade am-in am-active" id="tab1">
<input name="id" id="id" type="hidden" value="${project.id}" />
<div class="am-u-sm-10">
<div class="am-form am-form-inline">
<div class="am-form-group am-form-icon">
<input type="text" id="time" name="time" autocomplete="off" value="${time!}">
</div>
</div>
</div>
<br>
<span class="am-text-lg">收入</span>
<table class="am-table am-table-bordered am-table-radius table-main" style="padding:0;">
<tbody>
<tr class="am-text-xl">
<td>类别</td>
<td>费用</td>
<td>概算总额(元)</td>
<td>预算总额(元)</td>
<td>上月结算总额(元)</td>
<td>本月结算金额(元)</td>
<td>结算总额(元)</td>
</tr>
<tr>
<td>收入</td>
<td>设备类</td>
<td><input name="incomeDeviceEstimateTotal" type="number" value="${Utils.format(estimateBean.incomeDeviceTaxExclude,'0')}" required readonly title="设备类概算总额"></td>
<td><input name="incomeDeviceBudgetTotal" type="number" value="${Utils.format(budgetBean.incomeDeviceTaxExclude,'0')}" required readonly title="设备类预算总额"></td>
<td><input name="incomeDeviceFormerSettleTotal" type="number" value="${Utils.format(formerBean.incomeDeviceTaxExclude,'0')}" required readonly title="设备类上月结算总额"></td>
<td><input type="number" min="0.00" max="99999999.99" step="0.01" name="incomeDevice" required title="本月结算金额"></td>
<td><input type="number" name="incomeDeviceSettleTotal" readonly title="设备类结算总额"></td>
</tr>
<tr>
<td>收入</td>
<td>工程类</td>
<td><input name="incomeEngineerEstimateTotal" type="number" value="${Utils.format(estimateBean.incomeEngineerTaxExclude,'0')}" required readonly title="工程类概算总额"></td>
<td><input name="incomeEngineerBudgetTotal" type="number" value="${Utils.format(budgetBean.incomeEngineerTaxExclude,'0')}" required readonly title="工程类预算总额"></td>
<td><input name="incomeEngineerFormerSettleTotal" type="number" value="${Utils.format(formerBean.incomeEngineerTaxExclude,'0')}" required readonly title="工程类上月结算总额"></td>
<td><input type="number" min="0.00" max="99999999.99" step="0.01" name="incomeEngineer" required title="工程类本月结算金额"></td>
<td><input type="number" name="incomeEngineerSettleTotal" readonly title="工程类结算总额"></td>
</tr>
<tr>
<td>收入</td>
<td>服务类</td>
<td><input name="incomeServiceEstimateTotal" type="number" value="${Utils.format(estimateBean.incomeServiceTaxExclude,'0')}" required readonly title="服务类概算总额"></td>
<td><input name="incomeServiceBudgetTotal" type="number" value="${Utils.format(budgetBean.incomeServiceTaxExclude,'0')}" required readonly title="服务类预算总额"></td>
<td><input name="incomeServiceFormerSettleTotal" type="number" value="${Utils.format(formerBean.incomeServiceTaxExclude,'0')}" required readonly title="服务类上月结算总额"></td>
<td><input type="number" min="0.00" max="99999999.99" step="0.01" name="incomeService" required title="服务类本月结算金额"></td>
<td><input type="number" name="incomeServiceSettleTotal" readonly title="服务类结算总额"></td>
</tr>
<tr>
<td>合计</td>
<td></td>
<td><input name="incomeEstimateTotal" type="number" value="${Utils.format(estimateBean.getIncomeTotalTaxExclude(),'0')}" readonly required title="此列累计"></td>
<td><input name="incomeBudgetTotal" type="number" value="${Utils.format(budgetBean.getIncomeTotalTaxExclude(),'0')}" readonly required title="此列累计"></td>
<td><input name="incomeFormerSettleTotal" type="number" value="${Utils.format(formerBean.getIncomeTotalTaxExclude(),'0')}" required readonly title="此列累计"></td>
<td><input type="number" name="incomeTotal" readonly title="此列累计"></td>
<td><input type="number" name="incomeSettleTotal" readonly title="此列累计"></td>
</tr>
</tbody>
</table>
<span class="am-text-lg">成本</span>
<table class="am-table am-table-bordered am-table-radius table-main" style="padding:0;">
<tbody>
<tr class="am-text-xl">
<td>类别</td>
<td>费用</td>
<td>费用项目</td>
<td>概算总额(元)</td>
<td>预算总额(元)</td>
<td>上月结算总额(元)</td>
<td>本月结算金额(元)</td>
<td>结算总额(元)</td>
</tr>
<tr>
<td>成本</td>
<td>采购成本</td>
<td>设备</td>
<td><input name="costPurchaseDeviceEstimateTotal" type="number" value="${Utils.format(estimateBean.costPurchaseDeviceTaxExclude,'0')}" readonly required title="购买设备概算总额"></td>
<td><input name="costPurchaseDeviceBudgetTotal" type="number" value="${Utils.format(budgetBean.costPurchaseDeviceTaxExclude,'0')}" readonly required title="购买设备预算总额"></td>
<td><input name="costPurchaseDeviceFormerSettleTotal" type="number" value="${Utils.format(formerBean.costPurchaseDeviceTaxExclude,'0')}" required readonly title="购买设备上月结算总额"></td>
<td><input type="number" min="0.00" max="99999999.99" step="0.01" name="costPurchaseDevice" required title="购买设备本月结算总额"></td>
<td><input type="number" name="costPurchaseDeviceSettleTotal" readonly title="购买设备结算总额"></td>
</tr>
<tr>
<td>成本</td>
<td>采购成本</td>
<td>施工</td>
<td><input name="costPurchaseBuildEstimateTotal" type="number" value="${Utils.format(estimateBean.costPurchaseBuildTaxExclude,'0')}" readonly required title="施工采购成本概算总额"></td>
<td><input name="costPurchaseBuildBudgetTotal" type="number" value="${Utils.format(budgetBean.costPurchaseBuildTaxExclude,'0')}" readonly required title="施工采购成本预算总额"></td>
<td><input name="costPurchaseBuildFormerSettleTotal" type="number" value="${Utils.format(formerBean.costPurchaseBuildTaxExclude,'0')}" required readonly title="施工采购成本上月结算总额"></td>
<td><input type="number" min="0.00" max="99999999.99" step="0.01" name="costPurchaseBuild" required title="施工采购成本本月结算金额"></td>
<td><input type="number" name="costPurchaseBuildSettleTotal" readonly title="施工采购成本结算总额"></td>
</tr>
<tr>
<td>成本</td>
<td>采购成本</td>
<td>服务</td>
<td><input name="costPurchaseServiceEstimateTotal" type="number" value="${Utils.format(estimateBean.costPurchaseServiceTaxExclude,'0')}" readonly required title="服务采购成本概算总额"></td>
<td><input name="costPurchaseServiceBudgetTotal" type="number" value="${Utils.format(budgetBean.costPurchaseServiceTaxExclude,'0')}" readonly required title="服务采购成本预算总额"></td>
<td><input name="costPurchaseServiceFormerSettleTotal" type="number" value="${Utils.format(formerBean.costPurchaseServiceTaxExclude,'0')}" required readonly title="服务采购成本上月结算总额"></td>
<td><input type="number" min="0.00" max="99999999.99" step="0.01" name="costPurchaseService" required title="服务采购成本本月结算金额"></td>
<td><input type="number" name="costPurchaseServiceSettleTotal" readonly title="服务采购成本结算总额"></td>
</tr>
<tr>
<td>成本</td>
<td>采购成本</td>
<td>其他</td>
<td><input name="costPurchaseOtherEstimateTotal" type="number" value="${Utils.format(estimateBean.costPurchaseOtherTaxExclude,'0')}" readonly required title="其他采购成本概算总额"></td>
<td><input name="costPurchaseOtherBudgetTotal" type="number" value="${Utils.format(budgetBean.costPurchaseOtherTaxExclude,'0')}" readonly required title="其他采购成本预算总额"></td>
<td><input name="costPurchaseOtherFormerSettleTotal" type="number" value="${Utils.format(formerBean.costPurchaseOtherTaxExclude,'0')}" required readonly title="其他采购成本上月结算总额"></td>
<td><input type="number" min="0.00" max="99999999.99" step="0.01" name="costPurchaseOther" required title="其他采购成本本月结算金额"></td>
<td><input type="number" name="costPurchaseOtherSettleTotal" readonly title="其他采购成本结算总额"></td>
</tr>
<tr>
<td>成本</td>
<td>项目管理成本</td>
<td>项目管理成本</td>
<td><input name="costProjectManageEstimateTotal" type="number" value="${Utils.format(estimateBean.costProjectManageTaxExclude,'0')}" readonly required title="项目管理成本概算总额"></td>
<td><input name="costProjectManageBudgetTotal" type="number" value="${Utils.format(budgetBean.costProjectManageTaxExclude,'0')}" readonly required title="项目管理成本预算总额"></td>
<td><input name="costProjectManageFormerSettleTotal" type="number" value="${Utils.format(formerBean.costProjectManageTaxExclude,'0')}" required readonly title="项目管理成本上月结算总额"></td>
<td><input type="number" min="0.00" max="99999999.99" step="0.01" name="costProjectManage" required title="项目管理成本本月结算金额"></td>
<td><input type="number" name="costProjectManageSettleTotal" readonly title="项目管理成本结算总额"></td>
</tr>
<tr>
<td>成本</td>
<td>其他</td>
<td>其他</td>
<td><input name="costOtherEstimateTotal" type="number" value="${Utils.format(estimateBean.costOtherOtherTaxExclude,'0')}" readonly required title="其他成本概算总额"></td>
<td><input name="costOtherBudgetTotal" type="number" value="${Utils.format(budgetBean.costOtherOtherTaxExclude,'0')}" readonly required title="其他成本预算总额"></td>
<td><input name="costOtherFormerSettleTotal" type="number" value="${Utils.format(formerBean.costOtherOtherTaxExclude,'0')}" required readonly title="其他成本上月结算总额"></td>
<td><input type="number" min="0.00" max="99999999.99" step="0.01" name="costOther" required title="其他成本本月结算金额"></td>
<td><input type="number" name="costOtherSettleTotal" readonly title="其他成本结算总额"></td>
</tr>
<tr>
<td>合计</td>
<td></td>
<td></td>
<td><input name="costEstimateTotal" value="${Utils.format(estimateBean.getCostTotalTaxExclude(),'0')}" type="number" readonly required title="此列累计"></td>
<td><input name="costBudgetTotal" value="${Utils.format(budgetBean.getCostTotalTaxExclude(),'0')}" type="number" readonly required title="此列累计"></td>
<td><input name="costFormerSettleTotal" type="number" value="${Utils.format(formerBean.getCostTotalTaxExclude(),'0')}" required readonly title="此列累计"></td>
<td><input type="number" name="costTotal" readonly title="此列累计"></td>
<td><input type="number" name="costSettleTotal" readonly title="此列累计"></td>
</tr>
</tbody>
</table>
<span class="am-text-lg">管理</span>
<table class="am-table am-table-bordered am-table-radius table-main" style="padding:0;">
<tbody>
<tr class="am-text-xl">
<td>类别</td>
<td>费用项目</td>
<td>概算总额(元)</td>
<td>预算总额(元)</td>
<td>上月结算总额(元)</td>
<td>本月结算金额(元)</td>
<td>结算总额(元)</td>
</tr>
<tr>
<td>财务费用</td>
<td>资金占用成本</td>
<td><input name="costExpropriationEstimateTotal" type="number" value="${Utils.format(estimateBean.costExpropriationTaxExclude,'0')}" required readonly title="资金占用成本概算总额"></td>
<td><input name="costExpropriationBudgetTotal" type="number" value="${Utils.format(budgetBean.costExpropriationTaxExclude,'0')}" required readonly title="资金占用成本预算总额"></td>
<td><input name="costExpropriationFormerSettleTotal" type="number" value="${Utils.format(formerBean.costExpropriationTaxExclude,'0')}" required readonly title="资金占用成本上月结算总额"></td>
<td><input type="number" min="0.00" max="99999999.99" step="0.01" name="costExpropriation" required title="资金占用成本本月结算金额"></td>
<td><input type="number" name="costExpropriationSettleTotal" readonly title="资金占用成本结算总额"></td>
</tr>
<tr>
<td>公司管理费用</td>
<td></td>
<td><input name="costCompanyManageEstimateTotal" type="number" value="${Utils.format(estimateBean.costCompanyManageTaxExclude,'0')}" required readonly title="公司管理费用概算总额"></td>
<td><input name="costCompanyManageBudgetTotal" type="number" value="${Utils.format(budgetBean.costCompanyManageTaxExclude,'0')}" required readonly title="公司管理费用预算总额"></td>
<td><input name="costCompanyManageFormerSettleTotal" type="number" value="${Utils.format(formerBean.costCompanyManageTaxExclude,'0')}" required readonly title="公司管理费用上月结算总额"></td>
<td><input type="number" min="0.00" max="99999999.99" step="0.01" name="costCompanyManage" required title="公司管理费用本月结算金额"></td>
<td><input type="number" name="costCompanyManageSettleTotal" readonly title="公司管理费用结算总额"></td>
</tr>
<tr>
<td>所得税费用</td>
<td></td>
<td>/</td>
<td>/</td>
<td><input name="costIncomeTaxFormerSettleTotal" type="number" value="${Utils.format(formerBean.costIncomeTax,'0')}" required readonly title="公司管理费用上月结算总额"></td>
<td><input type="number" min="0.00" max="99999999.99" step="0.01" name="costIncomeTax" required title="公司管理费用本月结算金额"></td>
<td><input type="number" name="costIncomeTaxSettleTotal" readonly title="公司管理费用结算总额"></td>
</tr>
<tr>
<td>合计</td>
<td></td>
<td><input name="costManageEstimateTotal" value="${Utils.format(estimateBean.costExpropriationTaxExclude + estimateBean.costCompanyManageTaxExclude,'0')}" type="number" readonly required title="此列累计"></td>
<td><input name="costManageBudgetTotal" value="${Utils.format(budgetBean.costExpropriationTaxExclude + budgetBean.costCompanyManageTaxExclude,'0')}" type="number" readonly required title="此列累计"></td>
<td><input name="costManageFormerSettleTotal" type="number" value="${Utils.format(formerBean.costManageTotal,'0')}" required readonly title="此列累计"></td>
<td><input type="number" name="costManageTotal" readonly title="此列累计"></td>
<td><input type="number" name="costManageSettleTotal" readonly title="此列累计"></td>
</tr>
</tbody>
</table>
<span class="am-text-lg">利润率计算</span>
<table class="am-table am-table-bordered am-table-radius table-main" style="padding:0;">
<tbody>
<tr class="am-text-xl">
<td>类别</td>
<td>概算总额(元)</td>
<td>预算总额(元)</td>
<td>上月结算总额(元)</td>
<td>本月结算金额(元)</td>
<td>结算总额(元)</td>
<td>利润率(%</td>
</tr>
<tr>
<td>项目毛利</td>
<td><input name="grossProfitEstimateTotal" type="number" value="${Utils.format(estimateBean.grossProfitTaxExclude,'0')}" required readonly title="项目毛利概算总额"></td>
<td><input name="grossProfitBudgetTotal" type="number" value="${Utils.format(budgetBean.grossProfitTaxExclude,'0')}" required readonly title="项目毛利预算总额"></td>
<td><input name="grossProfitFormerSettleTotal" type="number" value="${Utils.format(formerBean.grossProfit,'0')}" required readonly title="项目毛利上月结算总额"></td>
<td><input type="number" min="0.00" max="99999999.99" step="0.01" name="grossProfit" required title="项目毛利本月结算金额"></td>
<td><input type="number" name="grossProfitSettleTotal" readonly title="项目毛利结算总额"></td>
<td><input name="grossProfitProfitMargin" type="number" readonly title="项目毛利利润率"></td>
</tr>
<tr>
<td>项目贡献利润</td>
<td><input name="contributionProfitEstimateTotal" type="number" value="${Utils.format(estimateBean.contributionProfitTaxExclude,'0')}" required readonly title="项目贡献利润概算总额"></td>
<td><input name="contributionProfitBudgetTotal" type="number" value="${Utils.format(budgetBean.contributionProfitTaxExclude,'0')}" required readonly title="项目贡献利润预算总额"></td>
<td><input name="contributionProfitFormerSettleTotal" type="number" value="${Utils.format(formerBean.contributionProfit,'0')}" required readonly title="项目贡献利润上月结算总额"></td>
<td><input type="number" min="0.00" max="99999999.99" step="0.01" name="contributionProfit" required title="项目贡献利润本月结算金额"></td>
<td><input type="number" name="contributionProfitSettleTotal" readonly title="项目贡献利润结算总额"></td>
<td><input name="contributionProfitProfitMargin" type="number" readonly title="项目贡献利润利润率"></td>
</tr>
<tr>
<td>项目净利润</td>
<td><input name="netProfitBudgetTotal" type="number" value="${Utils.format(estimateBean.contributionProfitTaxExclude,'0')}" required readonly title="项目净利润预算总额"></td>
<td><input name="netProfitBudgetTotal" type="number" value="${Utils.format(budgetBean.contributionProfitTaxExclude,'0')}" required readonly title="项目净利润预算总额"></td>
<td><input name="netProfitFormerSettleTotal" type="number" value="${Utils.format(formerBean.netProfit,'0')}" required readonly title="项目净利润上月结算总额"></td>
<td><input type="number" min="0.00" max="99999999.99" step="0.01" name="netProfit" required title="项目净利润本月结算金额"></td>
<td><input type="number" name="netProfitSettleTotal" readonly title="项目净利润结算总额"></td>
<td><input name="netProfitProfitMargin" type="number" readonly title="项目净利润利润率"></td>
</tr>
</tbody>
</table>
<span class="am-text-lg">现金流量表</span>
<table class="am-table am-table-bordered am-table-radius table-main" style="padding:0;">
<tbody>
<tr class="am-text-xl">
<td>类别</td>
<td>预算总额(元)</td>
<td>上月结算总额(元)</td>
<td>本月结算金额(元)</td>
<td>结算总额(元)</td>
</tr>
<tr>
<td>销售商品、提供劳务收到的现金</td>
<td><input name="saleIncomeCashBudget" type="number" value="${Utils.format(cashFlowBean.saleIncomeCash,'0')}" readonly required title="预算总额"></td>
<td><input name="saleIncomeCashFormerSettle" type="number" value="${Utils.format(formerBean.saleIncomeCash,'0')}" required readonly title="上月结算总额"></td>
<td><input type="number" min="0.00" max="99999999.99" step="0.01" name="saleIncomeCash" required title="本月结算金额"></td>
<td><input name="saleIncomeCashSettle" type="number" readonly title="结算总额"></td>
</tr>
<tr>
<td>收到的税费返还</td>
<td>/</td>
<td><input name="taxReturnFormerSettle" type="number" value="${Utils.format(formerBean.taxReturn,'0')}" required readonly title="上月结算总额"></td>
<td><input type="number" min="0.00" max="99999999.99" step="0.01" name="taxReturn" required title="本月结算金额"></td>
<td><input name="taxReturnSettle" type="number" readonly title="结算总额"></td>
</tr>
<tr>
<td>收到其他与经营活动有关的现金</td>
<td><input name="earnestMoneyIncomeBudget" type="number" value="${Utils.format(cashFlowBean.earnestMoneyIncome,'0')}" readonly required title="预算总额"></td>
<td><input name="earnestMoneyIncomeFormerSettle" type="number" value="${Utils.format(formerBean.earnestMoneyIncome,'0')}" required readonly title="上月结算总额"></td>
<td><input type="number" min="0.00" max="99999999.99" step="0.01" name="earnestMoneyIncome" required title="本月结算金额"></td>
<td><input name="earnestMoneyIncomeSettle" type="number" readonly title="结算总额"></td>
</tr>
<tr>
<td>购买商品、接受劳务支付的现金</td>
<td><input name="purchaseCostBudget" type="number" value="${Utils.format(cashFlowBean.purchaseCost,'0')}" readonly required title="预算总额"></td>
<td><input name="purchaseCostFormerSettle" type="number" value="${Utils.format(formerBean.purchaseCost,'0')}" required readonly title="上月结算总额"></td>
<td><input type="number" min="0.00" max="99999999.99" step="0.01" name="purchaseCost" required title="本月结算金额"></td>
<td><input name="purchaseCostSettle" type="number" readonly title="结算总额"></td>
</tr>
<tr>
<td>支付的各项税费</td>
<td>/</td>
<td><input name="taxCostFormerSettle" type="number" value="${Utils.format(formerBean.taxCost,'0')}" required readonly title="上月结算总额"></td>
<td><input type="number" min="0.00" max="99999999.99" step="0.01" name="taxCost" required title="本月结算金额"></td>
<td><input name="taxCostSettle" type="number" readonly title="结算总额"></td>
</tr>
<tr>
<td>支付其他与经营活动有关的现金</td>
<td><input name="earnestMoneyCostBudget" type="number" value="${Utils.format(cashFlowBean.earnestMoneyCost,'0')}" readonly required title="预算总额"></td>
<td><input name="earnestMoneyCostFormerSettle" type="number" value="${Utils.format(formerBean.earnestMoneyCost,'0')}" required readonly title="上月结算总额"></td>
<td><input type="number" min="0.00" max="99999999.99" step="0.01" name="earnestMoneyCost" required title="本月结算金额"></td>
<td><input name="earnestMoneyCostSettle" type="number" readonly title="结算总额"></td>
</tr>
<tr>
<td>经营活动产生的现金流量净额</td>
<td><input name="netCashFlowBudget" type="number" value="${Utils.format(cashFlowBean.getNetCashFlow(),'0')}" readonly required title="预算总额"></td>
<td><input name="netCashFlowFormerSettle" type="number" value="${Utils.format(formerBean.netCashFlow,'0')}" required readonly title="上月结算总额"></td>
<td><input type="number" min="0.00" max="99999999.99" step="0.01" name="netCashFlow" required title="本月结算金额"></td>
<td><input name="netCashFlowSettle" type="number" readonly title="结算总额"></td>
</tr>
<tr>
<td>投资活动现金流入</td>
<td>/</td>
<td><input name="cashInflowFromInvestingActivitiesFormerSettle" type="number" value="${Utils.format(formerBean.cashInflowFromInvestingActivities,'0')}" required readonly title="上月结算总额"></td>
<td><input type="number" min="0.00" max="99999999.99" step="0.01" name="cashInflowFromInvestingActivities" required title="本月结算金额"></td>
<td><input name="cashInflowFromInvestingActivitiesSettle" type="number" readonly title="结算总额"></td>
</tr>
<tr>
<td>投资活动现金流出</td>
<td>/</td>
<td><input name="cashOutflowFromInvestingActivitiesFormerSettle" type="number" value="${Utils.format(formerBean.cashOutflowFromInvestingActivities,'0')}" required readonly title="上月结算总额"></td>
<td><input type="number" min="0.00" max="99999999.99" step="0.01" name="cashOutflowFromInvestingActivities" required title="本月结算金额"></td>
<td><input name="cashOutflowFromInvestingActivitiesSettle" type="number" readonly title="结算总额"></td>
</tr>
<tr>
<td>投资活动产生的现金流量净额</td>
<td>/</td>
<td><input name="netCashFromInvestingActivitiesFormerSettle" type="number" value="${Utils.format(formerBean.netCashFromInvestingActivities,'0')}" required readonly title="上月结算总额"></td>
<td><input type="number" min="0.00" max="99999999.99" step="0.01" name="netCashFromInvestingActivities" required title="本月结算金额"></td>
<td><input name="netCashFromInvestingActivitiesSettle" type="number" readonly title="结算总额"></td>
</tr>
<tr>
<td>融资资金流入</td>
<td><input name="financingCapitalInflowBudget" type="number" value="${Utils.format(cashFlowBean.financingCapitalInflow,'0')}" readonly required title="预算总额"></td>
<td><input name="financingCapitalInflowFormerSettle" type="number" value="${Utils.format(formerBean.financingCapitalInflow,'0')}" required readonly title="上月结算总额"></td>
<td><input type="number" min="0.00" max="99999999.99" step="0.01" name="financingCapitalInflow" required title="本月结算金额"></td>
<td><input name="financingCapitalInflowSettle" type="number" readonly title="结算总额"></td>
</tr>
<tr>
<td>还款资金流出</td>
<td><input name="financingCapitalOutflowBudget" type="number" value="${Utils.format(cashFlowBean.financingCapitalOutflow,'0')}" readonly required title="预算总额"></td>
<td><input name="financingCapitalOutflowFormerSettle" type="number" value="${Utils.format(formerBean.financingCapitalOutflow,'0')}" required readonly title="上月结算总额"></td>
<td><input type="number" min="0.00" max="99999999.99" step="0.01" name="financingCapitalOutflow" required title="本月结算金额"></td>
<td><input name="financingCapitalOutflowSettle" type="number" readonly title="结算总额"></td>
</tr>
<tr>
<td>筹资活动产生的现金流量净额</td>
<td><input name="financingCapitalCashflowBudget" type="number" value="${Utils.format(cashFlowBean.getFinancingCapitalCashflow(),'0')}" readonly required title="预算总额"></td>
<td><input name="financingCapitalCashflowFormerSettle" type="number" value="${Utils.format(formerBean.financingCapitalCashflow,'0')}" required readonly title="上月结算总额"></td>
<td><input type="number" min="0.00" max="99999999.99" step="0.01" name="financingCapitalCashflow" required title="本月结算金额"></td>
<td><input name="financingCapitalCashflowSettle" type="number" readonly title="结算总额"></td>
</tr>
<tr>
<td>货币资金净增加额</td>
<td><input name="netIncreaseMonetaryFundsBudget" type="number" value="${Utils.format(cashFlowBean.getNetIncreaseMonetaryFunds(),'0')}" readonly required title="预算总额"></td>
<td><input name="netIncreaseMonetaryFundsFormerSettle" type="number" value="${Utils.format(formerBean.netIncreaseMonetaryFunds,'0')}" required readonly title="上月结算总额"></td>
<td><input type="number" min="0.00" max="99999999.99" step="0.01" name="netIncreaseMonetaryFunds" required title="本月结算金额"></td>
<td><input name="netIncreaseMonetaryFundsSettle" type="number" readonly title="结算总额"></td>
</tr>
<tr>
<td>合计</td>
<td><input name="cashFlowBudgetTotal" type="number" value="${Utils.format(cashFlowBean.saleIncomeCash + cashFlowBean.earnestMoneyIncome + cashFlowBean.purchaseCost + cashFlowBean.earnestMoneyCost + cashFlowBean.getNetCashFlow() +
cashFlowBean.financingCapitalInflow + cashFlowBean.financingCapitalOutflow + cashFlowBean.getFinancingCapitalCashflow() + cashFlowBean.getNetIncreaseMonetaryFunds(),'0')}" readonly required title="此列累计"></td>
<td><input name="cashFlowFormerSettleTotal" type="number" value="${Utils.format(formerBean.cashFlowTotal,'0')}" readonly required title="此列累计"></td>
<td><input name="cashFlowTotal" type="number" readonly required title="此列累计"></td>
<td><input name="cashFlowSettleTotal" type="number" readonly required title="此列累计"></td>
</tr>
</tbody>
</table>
</div>
<!--验证表单元素validate end-->
</div>
</div>
<!--选项卡tabsend-->
<div class="am-margin">
<button type="button" class="am-btn am-btn-warning am-btn-xs" onclick="javascript:history.go(-1);">返回上一级</button>
<button type="submit" class="am-btn am-btn-primary am-btn-xs" id="saveSettle">保存</button>
</div>
</form>
</div>
</div>
<script>
var base = "${base}";
</script>
<script src="${base}/layui/layui.js"></script>
<script src="${base}/assets/js/project_common.js"></script>
<script src="${base}/assets/js/project_settle.js"></script>
<script>
layui.use('laydate', function(){
var laydate = layui.laydate;
laydate.render({
elem: '#time',
type: 'month',
btns: ['confirm'],
trigger: 'click',
ready: function(date){
console.log(date);
}
});
});
$(function () {
calculateSettle();
$("#saveSettle").click(function () {
$("#pmsForm").attr("action","${base}/project/settle/save");
$("#pmsForm").submit();
});
});
</script>
</@defaultLayout.layout>

View File

@ -0,0 +1,426 @@
<#assign base=request.contextPath />
<#import "../common/defaultLayout.ftl" as defaultLayout>
<@defaultLayout.layout>
<style type="text/css">
/**让所有的模态对话框都居中*/
.am-modal.am-modal-prompt.am-modal-active {
transform: translate(-50%, -50%) scale(1);
left: 50%;
top: 50%;
margin-left: 0;
margin-top: 0!important;
}
select[readonly] option {
display: none;
}
</style>
<div class="admin-content">
<div class="admin-content-body">
<div class="am-cf am-padding">
<div class="am-fl am-cf"><strong class="am-text-primary am-text-lg">项目结算表</strong> / <small>${project.name}</small></div>
</div>
<form method="post" class="am-form" id="pmsForm" action="${base}/project/settleAdd">
<!--选项卡tabsbegin-->
<div class="am-tabs am-margin" data-am-tabs>
<ul class="am-tabs-nav am-nav am-nav-tabs">
<li class="am-active"><a href="#tab1">项目结算利润表</a></li>
</ul>
<div class="am-tabs-bd">
<div class="am-tab-panel am-fade am-in am-active" id="tab1">
<input name="id" id="id" type="hidden" value="${project.id}" />
<span class="am-text-lg">收入</span>
<table class="am-table am-table-bordered am-table-radius table-main" style="padding:0;">
<tbody>
<tr class="am-text-xl">
<td>类别</td>
<td>费用</td>
<td>概算总额(元)</td>
<td>预算总额(元)</td>
<td>上月结算总额(元)</td>
<td>本月结算金额(元)</td>
<td>结算总额(元)</td>
</tr>
<tr>
<td>收入</td>
<td>设备类</td>
<td><input name="incomeDeviceEstimateTotal" type="number" value="${Utils.format(estimateBean.incomeDeviceTaxExclude,'0')}" required readonly title="设备类概算总额"></td>
<td><input name="incomeDeviceBudgetTotal" type="number" value="${Utils.format(budgetBean.incomeDeviceTaxExclude,'0')}" required readonly title="设备类预算总额"></td>
<td><input name="incomeDeviceFormerSettleTotal" type="number" value="${Utils.format(formerBean.incomeDeviceTaxExclude,'0')}" required readonly title="设备类上月结算总额"></td>
<td><input type="number" min="0.00" max="99999999.99" step="0.01" name="incomeDevice" required title="本月结算金额"></td>
<td><input type="number" name="incomeDeviceSettleTotal" readonly title="设备类结算总额"></td>
</tr>
<tr>
<td>收入</td>
<td>工程类</td>
<td><input name="incomeEngineerEstimateTotal" type="number" value="${Utils.format(estimateBean.incomeEngineerTaxExclude,'0')}" required readonly title="工程类概算总额"></td>
<td><input name="incomeEngineerBudgetTotal" type="number" value="${Utils.format(budgetBean.incomeEngineerTaxExclude,'0')}" required readonly title="工程类预算总额"></td>
<td><input name="incomeEngineerFormerSettleTotal" type="number" value="${Utils.format(formerBean.incomeEngineerTaxExclude,'0')}" required readonly title="工程类上月结算总额"></td>
<td><input type="number" min="0.00" max="99999999.99" step="0.01" name="incomeEngineer" required title="工程类本月结算金额"></td>
<td><input type="number" name="incomeEngineerSettleTotal" readonly title="工程类结算总额"></td>
</tr>
<tr>
<td>收入</td>
<td>服务类</td>
<td><input name="incomeServiceEstimateTotal" type="number" value="${Utils.format(estimateBean.incomeServiceTaxExclude,'0')}" required readonly title="服务类概算总额"></td>
<td><input name="incomeServiceBudgetTotal" type="number" value="${Utils.format(budgetBean.incomeServiceTaxExclude,'0')}" required readonly title="服务类预算总额"></td>
<td><input name="incomeServiceFormerSettleTotal" type="number" value="${Utils.format(formerBean.incomeServiceTaxExclude,'0')}" required readonly title="服务类上月结算总额"></td>
<td><input type="number" min="0.00" max="99999999.99" step="0.01" name="incomeService" required title="服务类本月结算金额"></td>
<td><input type="number" name="incomeServiceSettleTotal" readonly title="服务类结算总额"></td>
</tr>
<tr>
<td>合计</td>
<td></td>
<td><input name="incomeEstimateTotal" type="number" value="${Utils.format(estimateBean.getIncomeTotalTaxExclude(),'0')}" readonly required title="此列累计"></td>
<td><input name="incomeBudgetTotal" type="number" value="${Utils.format(budgetBean.getIncomeTotalTaxExclude(),'0')}" readonly required title="此列累计"></td>
<td><input name="incomeFormerSettleTotal" type="number" value="${Utils.format(formerBean.getIncomeTotalTaxExclude(),'0')}" required readonly title="此列累计"></td>
<td><input type="number" name="incomeTotal" readonly title="此列累计"></td>
<td><input type="number" name="incomeSettleTotal" readonly title="此列累计"></td>
</tr>
</tbody>
</table>
<span class="am-text-lg">成本</span>
<table class="am-table am-table-bordered am-table-radius table-main" style="padding:0;">
<tbody>
<tr class="am-text-xl">
<td>类别</td>
<td>费用</td>
<td>费用项目</td>
<td>概算总额(元)</td>
<td>预算总额(元)</td>
<td>上月结算总额(元)</td>
<td>本月结算金额(元)</td>
<td>结算总额(元)</td>
</tr>
<tr>
<td>成本</td>
<td>采购成本</td>
<td>设备</td>
<td><input name="costPurchaseDeviceEstimateTotal" type="number" value="${Utils.format(estimateBean.costPurchaseDeviceTaxExclude,'0')}" readonly required title="购买设备概算总额"></td>
<td><input name="costPurchaseDeviceBudgetTotal" type="number" value="${Utils.format(budgetBean.costPurchaseDeviceTaxExclude,'0')}" readonly required title="购买设备预算总额"></td>
<td><input name="costPurchaseDeviceFormerSettleTotal" type="number" value="${Utils.format(formerBean.costPurchaseDeviceTaxExclude,'0')}" required readonly title="购买设备上月结算总额"></td>
<td><input type="number" min="0.00" max="99999999.99" step="0.01" name="costPurchaseDevice" required title="购买设备本月结算总额"></td>
<td><input type="number" name="costPurchaseDeviceSettleTotal" readonly title="购买设备结算总额"></td>
</tr>
<tr>
<td>成本</td>
<td>采购成本</td>
<td>施工</td>
<td><input name="costPurchaseBuildEstimateTotal" type="number" value="${Utils.format(estimateBean.costPurchaseBuildTaxExclude,'0')}" readonly required title="施工采购成本概算总额"></td>
<td><input name="costPurchaseBuildBudgetTotal" type="number" value="${Utils.format(budgetBean.costPurchaseBuildTaxExclude,'0')}" readonly required title="施工采购成本预算总额"></td>
<td><input name="costPurchaseBuildFormerSettleTotal" type="number" value="${Utils.format(formerBean.costPurchaseBuildTaxExclude,'0')}" required readonly title="施工采购成本上月结算总额"></td>
<td><input type="number" min="0.00" max="99999999.99" step="0.01" name="costPurchaseBuild" required title="施工采购成本本月结算金额"></td>
<td><input type="number" name="costPurchaseBuildSettleTotal" readonly title="施工采购成本结算总额"></td>
</tr>
<tr>
<td>成本</td>
<td>采购成本</td>
<td>服务</td>
<td><input name="costPurchaseServiceEstimateTotal" type="number" value="${Utils.format(estimateBean.costPurchaseServiceTaxExclude,'0')}" readonly required title="服务采购成本概算总额"></td>
<td><input name="costPurchaseServiceBudgetTotal" type="number" value="${Utils.format(budgetBean.costPurchaseServiceTaxExclude,'0')}" readonly required title="服务采购成本预算总额"></td>
<td><input name="costPurchaseServiceFormerSettleTotal" type="number" value="${Utils.format(formerBean.costPurchaseServiceTaxExclude,'0')}" required readonly title="服务采购成本上月结算总额"></td>
<td><input type="number" min="0.00" max="99999999.99" step="0.01" name="costPurchaseService" required title="服务采购成本本月结算金额"></td>
<td><input type="number" name="costPurchaseServiceSettleTotal" readonly title="服务采购成本结算总额"></td>
</tr>
<tr>
<td>成本</td>
<td>采购成本</td>
<td>其他</td>
<td><input name="costPurchaseOtherEstimateTotal" type="number" value="${Utils.format(estimateBean.costPurchaseOtherTaxExclude,'0')}" readonly required title="其他采购成本概算总额"></td>
<td><input name="costPurchaseOtherBudgetTotal" type="number" value="${Utils.format(budgetBean.costPurchaseOtherTaxExclude,'0')}" readonly required title="其他采购成本预算总额"></td>
<td><input name="costPurchaseOtherFormerSettleTotal" type="number" value="${Utils.format(formerBean.costPurchaseOtherTaxExclude,'0')}" required readonly title="其他采购成本上月结算总额"></td>
<td><input type="number" min="0.00" max="99999999.99" step="0.01" name="costPurchaseOther" required title="其他采购成本本月结算金额"></td>
<td><input type="number" name="costPurchaseOtherSettleTotal" readonly title="其他采购成本结算总额"></td>
</tr>
<tr>
<td>成本</td>
<td>项目管理成本</td>
<td>项目管理成本</td>
<td><input name="costProjectManageEstimateTotal" type="number" value="${Utils.format(estimateBean.costProjectManageTaxExclude,'0')}" readonly required title="项目管理成本概算总额"></td>
<td><input name="costProjectManageBudgetTotal" type="number" value="${Utils.format(budgetBean.costProjectManageTaxExclude,'0')}" readonly required title="项目管理成本预算总额"></td>
<td><input name="costProjectManageFormerSettleTotal" type="number" value="${Utils.format(formerBean.costProjectManageTaxExclude,'0')}" required readonly title="项目管理成本上月结算总额"></td>
<td><input type="number" min="0.00" max="99999999.99" step="0.01" name="costProjectManage" required title="项目管理成本本月结算金额"></td>
<td><input type="number" name="costProjectManageSettleTotal" readonly title="项目管理成本结算总额"></td>
</tr>
<tr>
<td>成本</td>
<td>其他</td>
<td>其他</td>
<td><input name="costOtherEstimateTotal" type="number" value="${Utils.format(estimateBean.costOtherOtherTaxExclude,'0')}" readonly required title="其他成本概算总额"></td>
<td><input name="costOtherBudgetTotal" type="number" value="${Utils.format(budgetBean.costOtherOtherTaxExclude,'0')}" readonly required title="其他成本预算总额"></td>
<td><input name="costOtherFormerSettleTotal" type="number" value="${Utils.format(formerBean.costOtherOtherTaxExclude,'0')}" required readonly title="其他成本上月结算总额"></td>
<td><input type="number" min="0.00" max="99999999.99" step="0.01" name="costOther" required title="其他成本本月结算金额"></td>
<td><input type="number" name="costOtherSettleTotal" readonly title="其他成本结算总额"></td>
</tr>
<tr>
<td>合计</td>
<td></td>
<td></td>
<td><input name="costEstimateTotal" value="${Utils.format(estimateBean.getCostTotalTaxExclude(),'0')}" type="number" readonly required title="此列累计"></td>
<td><input name="costBudgetTotal" value="${Utils.format(budgetBean.getCostTotalTaxExclude(),'0')}" type="number" readonly required title="此列累计"></td>
<td><input name="costFormerSettleTotal" type="number" value="${Utils.format(formerBean.getCostTotalTaxExclude(),'0')}" required readonly title="此列累计"></td>
<td><input type="number" name="costTotal" readonly title="此列累计"></td>
<td><input type="number" name="costSettleTotal" readonly title="此列累计"></td>
</tr>
</tbody>
</table>
<span class="am-text-lg">管理</span>
<table class="am-table am-table-bordered am-table-radius table-main" style="padding:0;">
<tbody>
<tr class="am-text-xl">
<td>类别</td>
<td>费用项目</td>
<td>概算总额(元)</td>
<td>预算总额(元)</td>
<td>上月结算总额(元)</td>
<td>本月结算金额(元)</td>
<td>结算总额(元)</td>
</tr>
<tr>
<td>财务费用</td>
<td>资金占用成本</td>
<td><input name="costExpropriationEstimateTotal" type="number" value="${Utils.format(estimateBean.costExpropriationTaxExclude,'0')}" required readonly title="资金占用成本概算总额"></td>
<td><input name="costExpropriationBudgetTotal" type="number" value="${Utils.format(budgetBean.costExpropriationTaxExclude,'0')}" required readonly title="资金占用成本预算总额"></td>
<td><input name="costExpropriationFormerSettleTotal" type="number" value="${Utils.format(formerBean.costExpropriationTaxExclude,'0')}" required readonly title="资金占用成本上月结算总额"></td>
<td><input type="number" min="0.00" max="99999999.99" step="0.01" name="costExpropriation" required title="资金占用成本本月结算金额"></td>
<td><input type="number" name="costExpropriationSettleTotal" readonly title="资金占用成本结算总额"></td>
</tr>
<tr>
<td>公司管理费用</td>
<td></td>
<td><input name="costCompanyManageEstimateTotal" type="number" value="${Utils.format(estimateBean.costCompanyManageTaxExclude,'0')}" required readonly title="公司管理费用概算总额"></td>
<td><input name="costCompanyManageBudgetTotal" type="number" value="${Utils.format(budgetBean.costCompanyManageTaxExclude,'0')}" required readonly title="公司管理费用预算总额"></td>
<td><input name="costCompanyManageFormerSettleTotal" type="number" value="${Utils.format(formerBean.costCompanyManageTaxExclude,'0')}" required readonly title="公司管理费用上月结算总额"></td>
<td><input type="number" min="0.00" max="99999999.99" step="0.01" name="costCompanyManage" required title="公司管理费用本月结算金额"></td>
<td><input type="number" name="costCompanyManageSettleTotal" readonly title="公司管理费用结算总额"></td>
</tr>
<tr>
<td>所得税费用</td>
<td></td>
<td>/</td>
<td>/</td>
<td><input name="costIncomeTaxFormerSettleTotal" type="number" value="${Utils.format(formerBean.costIncomeTax,'0')}" required readonly title="公司管理费用上月结算总额"></td>
<td><input type="number" min="0.00" max="99999999.99" step="0.01" name="costIncomeTax" required title="公司管理费用本月结算金额"></td>
<td><input type="number" name="costIncomeTaxSettleTotal" readonly title="公司管理费用结算总额"></td>
</tr>
<tr>
<td>合计</td>
<td></td>
<td><input name="costManageEstimateTotal" value="${Utils.format(estimateBean.costExpropriationTaxExclude + estimateBean.costCompanyManageTaxExclude,'0')}" type="number" readonly required title="此列累计"></td>
<td><input name="costManageBudgetTotal" value="${Utils.format(budgetBean.costExpropriationTaxExclude + budgetBean.costCompanyManageTaxExclude,'0')}" type="number" readonly required title="此列累计"></td>
<td><input name="costManageFormerSettleTotal" type="number" value="${Utils.format(formerBean.CostManageTotal,'0')}" required readonly title="此列累计"></td>
<td><input type="number" name="costManageTotal" readonly title="此列累计"></td>
<td><input type="number" name="costManageSettleTotal" readonly title="此列累计"></td>
</tr>
</tbody>
</table>
<span class="am-text-lg">利润率计算</span>
<table class="am-table am-table-bordered am-table-radius table-main" style="padding:0;">
<tbody>
<tr class="am-text-xl">
<td>类别</td>
<td>概算总额(元)</td>
<td>预算总额(元)</td>
<td>上月结算总额(元)</td>
<td>本月结算金额(元)</td>
<td>结算总额(元)</td>
<td>利润率(%</td>
</tr>
<tr>
<td>项目毛利</td>
<td><input name="grossProfitEstimateTotal" type="number" value="${Utils.format(estimateBean.grossProfitTaxExclude,'0')}" required readonly title="项目毛利概算总额"></td>
<td><input name="grossProfitBudgetTotal" type="number" value="${Utils.format(budgetBean.grossProfitTaxExclude,'0')}" required readonly title="项目毛利预算总额"></td>
<td><input name="grossProfitFormerSettleTotal" type="number" value="${Utils.format(formerBean.grossProfitTaxExclude,'0')}" required readonly title="项目毛利上月结算总额"></td>
<td><input type="number" min="0.00" max="99999999.99" step="0.01" name="grossProfit" required title="项目毛利本月结算金额"></td>
<td><input type="number" name="grossProfitSettleTotal" readonly title="项目毛利结算总额"></td>
<td><input name="grossProfitProfitMargin" type="number" readonly title="项目毛利利润率"></td>
</tr>
<tr>
<td>项目贡献利润</td>
<td><input name="contributionProfitEstimateTotal" type="number" value="${Utils.format(estimateBean.contributionProfitTaxExclude,'0')}" required readonly title="项目贡献利润概算总额"></td>
<td><input name="contributionProfitBudgetTotal" type="number" value="${Utils.format(budgetBean.contributionProfitTaxExclude,'0')}" required readonly title="项目贡献利润预算总额"></td>
<td><input name="contributionProfitFormerSettleTotal" type="number" value="${Utils.format(formerBean.contributionProfitTaxExclude,'0')}" required readonly title="项目贡献利润上月结算总额"></td>
<td><input type="number" min="0.00" max="99999999.99" step="0.01" name="contributionProfit" required title="项目贡献利润本月结算金额"></td>
<td><input type="number" name="contributionProfitSettleTotal" readonly title="项目贡献利润结算总额"></td>
<td><input name="contributionProfitProfitMargin" type="number" readonly title="项目贡献利润利润率"></td>
</tr>
<tr>
<td>项目净利润</td>
<td>/</td>
<td><input name="netProfitBudgetTotal" type="number" value="${Utils.format(budgetBean.netProfitTaxExclude,'0')}" required readonly title="项目净利润预算总额"></td>
<td><input name="netProfitFormerSettleTotal" type="number" value="${Utils.format(formerBean.netProfitTaxExclude,'0')}" required readonly title="项目净利润上月结算总额"></td>
<td><input type="number" min="0.00" max="99999999.99" step="0.01" name="netProfit" required title="项目净利润本月结算金额"></td>
<td><input type="number" name="netProfitSettleTotal" readonly title="项目净利润结算总额"></td>
<td><input name="netProfitProfitMargin" type="number" readonly title="项目净利润利润率"></td>
</tr>
</tbody>
</table>
<span class="am-text-lg">现金流量表</span>
<table class="am-table am-table-bordered am-table-radius table-main" style="padding:0;">
<tbody>
<tr class="am-text-xl">
<td>类别</td>
<td>预算总额(元)</td>
<td>上月结算总额(元)</td>
<td>本月结算金额(元)</td>
<td>结算总额(元)</td>
</tr>
<tr>
<td>销售商品、提供劳务收到的现金</td>
<td><input name="saleIncomeCashBudget" type="number" value="${Utils.format(cashFlowBean.saleIncomeCash,'0')}" readonly required title="预算总额"></td>
<td><input name="saleIncomeCashFormerSettle" type="number" value="${Utils.format(formerBean.saleIncomeCash,'0')}" required readonly title="上月结算总额"></td>
<td><input type="number" min="0.00" max="99999999.99" step="0.01" name="saleIncomeCash" required title="本月结算金额"></td>
<td><input name="saleIncomeCashSettle" type="number" readonly title="结算总额"></td>
</tr>
<tr>
<td>收到的税费返还</td>
<td>/</td>
<td><input name="taxReturnFormerSettle" type="number" value="${Utils.format(formerBean.taxReturn,'0')}" required readonly title="上月结算总额"></td>
<td><input type="number" min="0.00" max="99999999.99" step="0.01" name="taxReturn" required title="本月结算金额"></td>
<td><input name="taxReturnSettle" type="number" readonly title="结算总额"></td>
</tr>
<tr>
<td>收到其他与经营活动有关的现金</td>
<td><input name="earnestMoneyIncomeBudget" type="number" value="${Utils.format(cashFlowBean.earnestMoneyIncome,'0')}" readonly required title="预算总额"></td>
<td><input name="earnestMoneyIncomeFormerSettle" type="number" value="${Utils.format(formerBean.earnestMoneyIncome,'0')}" required readonly title="上月结算总额"></td>
<td><input type="number" min="0.00" max="99999999.99" step="0.01" name="earnestMoneyIncome" required title="本月结算金额"></td>
<td><input name="earnestMoneyIncomeSettle" type="number" readonly title="结算总额"></td>
</tr>
<tr>
<td>购买商品、接受劳务支付的现金</td>
<td><input name="purchaseCostBudget" type="number" value="${Utils.format(cashFlowBean.purchaseCost,'0')}" readonly required title="预算总额"></td>
<td><input name="purchaseCostFormerSettle" type="number" value="${Utils.format(formerBean.purchaseCost,'0')}" required readonly title="上月结算总额"></td>
<td><input type="number" min="0.00" max="99999999.99" step="0.01" name="purchaseCost" required title="本月结算金额"></td>
<td><input name="purchaseCostSettle" type="number" readonly title="结算总额"></td>
</tr>
<tr>
<td>支付的各项税费</td>
<td>/</td>
<td><input name="taxCostFormerSettle" type="number" value="${Utils.format(formerBean.taxCost,'0')}" required readonly title="上月结算总额"></td>
<td><input type="number" min="0.00" max="99999999.99" step="0.01" name="taxCost" required title="本月结算金额"></td>
<td><input name="taxCostSettle" type="number" readonly title="结算总额"></td>
</tr>
<tr>
<td>支付其他与经营活动有关的现金</td>
<td><input name="earnestMoneyCostBudget" type="number" value="${Utils.format(cashFlowBean.earnestMoneyCost,'0')}" readonly required title="预算总额"></td>
<td><input name="earnestMoneyCostFormerSettle" type="number" value="${Utils.format(formerBean.earnestMoneyCost,'0')}" required readonly title="上月结算总额"></td>
<td><input type="number" min="0.00" max="99999999.99" step="0.01" name="earnestMoneyCost" required title="本月结算金额"></td>
<td><input name="earnestMoneyCostSettle" type="number" readonly title="结算总额"></td>
</tr>
<tr>
<td>经营活动产生的现金流量净额</td>
<td><input name="netCashFlowBudget" type="number" value="${Utils.format(cashFlowBean.getNetCashFlow,'0')}" readonly required title="预算总额"></td>
<td><input name="netCashFlowFormerSettle" type="number" value="${Utils.format(formerBean.netCashFlow,'0')}" required readonly title="上月结算总额"></td>
<td><input type="number" min="0.00" max="99999999.99" step="0.01" name="netCashFlow" required title="本月结算金额"></td>
<td><input name="netCashFlowSettle" type="number" readonly title="结算总额"></td>
</tr>
<tr>
<td>投资活动现金流入</td>
<td>/</td>
<td><input name="cashInflowFromInvestingActivitiesFormerSettle" type="number" value="${Utils.format(formerBean.cashInflowFromInvestingActivities,'0')}" required readonly title="上月结算总额"></td>
<td><input type="number" min="0.00" max="99999999.99" step="0.01" name="cashInflowFromInvestingActivities" required title="本月结算金额"></td>
<td><input name="cashInflowFromInvestingActivitiesSettle" type="number" readonly title="结算总额"></td>
</tr>
<tr>
<td>投资活动现金流出</td>
<td>/</td>
<td><input name="cashOutflowFromInvestingActivitiesFormerSettle" type="number" value="${Utils.format(formerBean.cashOutflowFromInvestingActivities,'0')}" required readonly title="上月结算总额"></td>
<td><input type="number" min="0.00" max="99999999.99" step="0.01" name="cashOutflowFromInvestingActivities" required title="本月结算金额"></td>
<td><input name="cashOutflowFromInvestingActivitiesSettle" type="number" readonly title="结算总额"></td>
</tr>
<tr>
<td>投资活动产生的现金流量净额</td>
<td>/</td>
<td><input name="netCashFromInvestingActivitiesFormerSettle" type="number" value="${Utils.format(formerBean.netCashFromInvestingActivities,'0')}" required readonly title="上月结算总额"></td>
<td><input type="number" min="0.00" max="99999999.99" step="0.01" name="netCashFromInvestingActivities" required title="本月结算金额"></td>
<td><input name="netCashFromInvestingActivitiesSettle" type="number" readonly title="结算总额"></td>
</tr>
<tr>
<td>融资资金流入</td>
<td><input name="financingCapitalInflowBudget" type="number" value="${Utils.format(cashFlowBean.financingCapitalInflow,'0')}" readonly required title="预算总额"></td>
<td><input name="financingCapitalInflowFormerSettle" type="number" value="${Utils.format(formerBean.financingCapitalInflow,'0')}" required readonly title="上月结算总额"></td>
<td><input type="number" min="0.00" max="99999999.99" step="0.01" name="financingCapitalInflow" required title="本月结算金额"></td>
<td><input name="financingCapitalInflowSettle" type="number" readonly title="结算总额"></td>
</tr>
<tr>
<td>还款资金流出</td>
<td><input name="financingCapitalOutflowBudget" type="number" value="${Utils.format(cashFlowBean.financingCapitalOutflow,'0')}" readonly required title="预算总额"></td>
<td><input name="financingCapitalOutflowFormerSettle" type="number" value="${Utils.format(formerBean.financingCapitalOutflow,'0')}" required readonly title="上月结算总额"></td>
<td><input type="number" min="0.00" max="99999999.99" step="0.01" name="financingCapitalOutflow" required title="本月结算金额"></td>
<td><input name="financingCapitalOutflowSettle" type="number" readonly title="结算总额"></td>
</tr>
<tr>
<td>筹资活动产生的现金流量净额</td>
<td><input name="financingCapitalCashflowBudget" type="number" value="${Utils.format(cashFlowBean.getFinancingCapitalCashflow(),'0')}" readonly required title="预算总额"></td>
<td><input name="financingCapitalCashflowFormerSettle" type="number" value="${Utils.format(formerBean.financingCapitalCashflow,'0')}" required readonly title="上月结算总额"></td>
<td><input type="number" min="0.00" max="99999999.99" step="0.01" name="financingCapitalCashflow" required title="本月结算金额"></td>
<td><input name="financingCapitalCashflowSettle" type="number" readonly title="结算总额"></td>
</tr>
<tr>
<td>货币资金净增加额</td>
<td><input name="netIncreaseMonetaryFundsBudget" type="number" value="${Utils.format(cashFlowBean.getNetIncreaseMonetaryFunds(),'0')}" readonly required title="预算总额"></td>
<td><input name="netIncreaseMonetaryFundsFormerSettle" type="number" value="${Utils.format(formerBean.netIncreaseMonetaryFunds,'0')}" required readonly title="上月结算总额"></td>
<td><input type="number" min="0.00" max="99999999.99" step="0.01" name="netIncreaseMonetaryFunds" required title="本月结算金额"></td>
<td><input name="netIncreaseMonetaryFundsSettle" type="number" readonly title="结算总额"></td>
</tr>
<tr>
<td>合计</td>
<td><input name="cashFlowBudgetTotal" type="number" readonly required title="此列累计"></td>
<td><input name="cashFlowFormerSettleTotal" type="number" readonly required title="此列累计"></td>
<td><input name="cashFlowTotal" type="number" readonly required title="此列累计"></td>
<td><input name="cashFlowSettleTotal" type="number" readonly required title="此列累计"></td>
</tr>
</tbody>
</table>
</div>
<!--验证表单元素validate end-->
</div>
</div>
<!--选项卡tabsend-->
<div class="am-margin">
<button type="button" class="am-btn am-btn-warning am-btn-xs" onclick="javascript:history.go(-1);">返回上一级</button>
<button type="submit" class="am-btn am-btn-primary am-btn-xs" id="saveSettle">保存</button>
</div>
</form>
</div>
</div>
<script>
var base = "${base}";
</script>
<script src="${base}/assets/js/project_common.js"></script>
<script src="${base}/assets/js/project_settle.js"></script>
<script>
$(function () {
calculateSettle();
$("#saveSettle").click(function () {
$("#pmsForm").attr("action","${base}/project/settle/save");
$("#pmsForm").submit();
});
});
</script>
</@defaultLayout.layout>

View File

@ -0,0 +1,202 @@
<#assign base=request.contextPath />
<#import "../common/defaultLayout.ftl" as defaultLayout>
<@defaultLayout.layout>
<div class="admin-content">
<div class="admin-content-body">
<div class="am-cf am-padding">
<div class="am-fl am-cf"><strong class="am-text-primary am-text-lg">项目统计</strong></div>
</div>
<!--选项卡tabsbegin-->
<div class="am-tabs am-margin" data-am-tabs>
<ul class="am-tabs-nav am-nav am-nav-tabs">
<li class="am-active"><a href="#tab1">主要指标</a></li>
<li><a href="#tab2">损益表</a></li>
<li><a href="#tab3">现金流量表</a></li>
</ul>
<div class="am-tabs-bd">
<div class="am-tab-panel am-fade am-in" id="tab1">
<div class="am-g">
<div class="am-u-sm-12">
<div class="am-scrollable-horizontal">
<table class="am-table am-table-striped am-table-hover table-main">
<thead>
<tr class="am-text-nowrap">
<th class="table-title"></th>
<th class="table-title">收入--设备类</th>
<th class="table-title">收入--工程类</th>
<th class="table-title">收入--服务类</th>
<th class="table-title">采购成本--设备类</th>
<th class="table-title">采购成本--施工类</th>
<th class="table-title">采购成本--服务类</th>
<th class="table-title">采购成本--其他</th>
<th class="table-title">成本--其他</th>
<th class="table-title">成本--项目管理成本</th>
<th class="table-title">财务费用--资金占用成本</th>
<th class="table-title">公司管理费用</th>
</tr>
</thead>
<tbody>
<#if (pager1.list)?exists>
<#list pager1.list as list>
<tr>
<td>${list.projectName!}</td>
<td>${(list.incomeDeviceTaxExclude!0)?string("0.##")}</td>
<td>${(list.incomeEngineerTaxExclude!0)?string("0.##")}</td>
<td>${(list.incomeServiceTaxExclude!0)?string("0.##")}</td>
<td>${(list.costPurchaseDeviceTaxExclude!0)?string("0.##")}</td>
<td>${(list.costPurchaseBuildTaxExclude!0)?string("0.##")}</td>
<td>${(list.costPurchaseServiceTaxExclude!0)?string("0.##")}</td>
<td>${(list.costPurchaseOtherTaxExclude!0)?string("0.##")}</td>
<td>${(list.costOtherOtherTaxExclude!0)?string("0.##")}</td>
<td>${(list.costProjectManageTaxExclude!0)?string("0.##")}</td>
<td>${(list.costExpropriationTaxExclude!0)?string("0.##")}</td>
<td>${(list.costCompanyManageTaxExclude!0)?string("0.##")}</td>
</tr>
</#list>
</#if>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
<div class="am-tabs-bd">
<div class="am-tab-panel am-fade am-in" id="tab2">
<div class="am-g">
<div class="am-u-sm-12">
<div class="am-scrollable-horizontal">
<table class="am-table am-table-striped am-table-hover table-main">
<thead>
<tr class="am-text-nowrap">
<th class="table-title"></th>
<th class="table-title">营业收入</th>
<th class="table-title">营业成本</th>
<th class="table-title">项目管理成本</th>
<th class="table-title">其他</th>
<th class="table-title">财务费用</th>
<th class="table-title">项目毛利</th>
<th class="table-title">项目毛利率</th>
<th class="table-title">公司管理费用</th>
<th class="table-title">项目贡献利润</th>
<th class="table-title">项目贡献利润率</th>
<th class="table-title">所得税费用</th>
<th class="table-title">项目净利润</th>
<th class="table-title">项目净利润率</th>
</tr>
</thead>
<tbody>
<#if (pager2.list)?exists>
<#list pager2.list as list>
<tr>
<td>${list.projectName!}</td>
<td>${(list.incomeTotalTaxExclude!0)?string("0.##")}</td>
<td>${(list.costTotalTaxExclude!0)?string("0.##")}</td>
<td>${(list.costProjectManageTaxExclude!0)?string("0.##")}</td>
<td>${(list.costOtherOtherTaxExclude!0)?string("0.##")}</td>
<td>${(list.costExpropriationTaxExclude!0)?string("0.##")}</td>
<td>${(list.projectGrossProfit!0)?string("0.##")}</td>
<td>${(list.projectGrossProfitRate!0)?string("0.##")}</td>
<td>${(list.costCompanyManageTaxExclude!0)?string("0.##")}</td>
<td>${(list.projectContributionProfit!0)?string("0.##")}</td>
<td>${(list.projectContributionProfitRate!0)?string("0.##")}</td>
<td>${(list.taxCost!0)?string("0.##")}</td>
<td>${(list.projectNetProfit!0)?string("0.##")}</td>
<td>${(list.projectNetProfitRate!0)?string("0.##")}</td>
</tr>
</#list>
</#if>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
<div class="am-tabs-bd">
<div class="am-tab-panel am-fade am-in" id="tab3">
<div class="am-g">
<div class="am-u-sm-12">
<div class="am-scrollable-horizontal">
<table class="am-table am-table-striped am-table-hover table-main">
<thead>
<tr class="am-text-nowrap">
<th class="table-title"></th>
<th class="table-title">销售商品、提供劳务收到的现金</th>
<th class="table-title">收到的税费返还</th>
<th class="table-title">收到的其他与经营活动有关的现金</th>
<th class="table-title">购买商品、接受劳务支付的现金</th>
<th class="table-title">支付的各项税费</th>
<th class="table-title">支付其他与经营活动有关的现金</th>
<th class="table-title">经营活动产生的现金流量净额</th>
<th class="table-title">投资活动现金流入</th>
<th class="table-title">投资活动现金流出</th>
<th class="table-title">投资活动产生的现金流量净额</th>
<th class="table-title">借款资金流入</th>
<th class="table-title">还款资金流出</th>
<th class="table-title">筹资活动产生的现金流量净额</th>
<th class="table-title">货币资金净增加额</th>
</tr>
</thead>
<tbody>
<#if (pager3.list)?exists>
<#list pager3.list as list>
<tr>
<td>${list.projectName!}</td>
<td>${(list.saleIncomeCash!0)?string("0.##")}</td>
<td>${(list.taxReturn!0)?string("0.##")}</td>
<td>${(list.earnestMoneyIncome!0)?string("0.##")}</td>
<td>${(list.purchaseCost!0)?string("0.##")}</td>
<td>${(list.taxCost!0)?string("0.##")}</td>
<td>${(list.earnestMoneyCost!0)?string("0.##")}</td>
<td>${(list.netCashFlow!0)?string("0.##")}</td>
<td>${(list.cashInflowFromInvestingActivities!0)?string("0.##")}</td>
<td>${(list.cashOutflowFromInvestingActivities!0)?string("0.##")}</td>
<td>${(list.netCashFromInvestingActivities!0)?string("0.##")}</td>
<td>${(list.financingCapitalInflow!0)?string("0.##")}</td>
<td>${(list.financingCapitalOutflow!0)?string("0.##")}</td>
<td>${(list.financingCapitalCashflow!0)?string("0.##")}</td>
<td>${(list.netIncreaseMonetaryFunds!0)?string("0.##")}</td>
</tr>
</#list>
</#if>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
<div class="am-cf">
<!-- 分页 -->
<#if (pager1.list)?exists && (pager1.list?size>0) >
<div class="am-fr">
<#include "../common/common_pager.ftl">
</div>
<#else>
<div class="am-kai" align="center">
<h3>没有找到任何记录!</h3>
</div>
</#if>
</div>
</div>
</div>
</div>
</@defaultLayout.layout>