From fd284d6d9e1476bac4ac1b6488fb737d9ceeeda2 Mon Sep 17 00:00:00 2001 From: OathK1per Date: Thu, 18 Nov 2021 15:28:21 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=B1=87=E6=80=BB=E9=A2=84?= =?UTF-8?q?=E7=AE=97=E9=87=91=E9=A2=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/cn/palmte/work/bean/SettleBean.java | 88 +++--- .../backend/ProjectSummaryController.java | 7 +- .../ProjectBudgetCostManageRepository.java | 3 + .../model/ProjectBudgetCostRepository.java | 2 + .../model/ProjectBudgetIncomeRepository.java | 3 +- .../ProjectBudgetPlanDetailRepository.java | 4 + .../ProjectSettleCashFlowRepository.java | 3 + .../ProjectSettleCostManageRepository.java | 3 + .../model/ProjectSettleCostRepository.java | 3 + .../model/ProjectSettleIncomeRepository.java | 3 + .../ProjectSettleProfitMarginRepository.java | 3 + .../work/service/ProjectSettleService.java | 12 +- .../work/service/ProjectSummaryService.java | 238 +++++++++------ .../templates/admin/project_statistics.ftl | 270 ++++++++++-------- .../templates/common/defaultLayout.ftl | 4 +- 15 files changed, 387 insertions(+), 259 deletions(-) diff --git a/src/main/java/cn/palmte/work/bean/SettleBean.java b/src/main/java/cn/palmte/work/bean/SettleBean.java index 240df73..9c30c55 100644 --- a/src/main/java/cn/palmte/work/bean/SettleBean.java +++ b/src/main/java/cn/palmte/work/bean/SettleBean.java @@ -92,6 +92,26 @@ public class SettleBean { .add(costPurchaseOther).add(costProjectManage).add(costOther); } + /** + * 获取所有成本总额 + * + * @return + */ + public BigDecimal getCostTotal2() { + BigDecimal costPurchaseDevice = getCostPurchaseDevice(); + BigDecimal costPurchaseBuild = getCostPurchaseBuild(); + BigDecimal costPurchaseService = getCostPurchaseService(); + BigDecimal costPurchaseOther = getCostPurchaseOther(); + + if (null == costPurchaseDevice || null == costPurchaseBuild || null == costPurchaseService + || null == costPurchaseOther) { + return new BigDecimal(0); + } + + return costPurchaseDevice.add(costPurchaseBuild).add(costPurchaseService) + .add(costPurchaseOther); + } + //========================管理表================================ /** @@ -250,8 +270,12 @@ public class SettleBean { private String projectName; + protected BigDecimal handleSpecial(BigDecimal src) { + return null == src ? new BigDecimal(0) : src; + } + public BigDecimal getIncomeDevice() { - return incomeDevice; + return handleSpecial(incomeDevice); } public void setIncomeDevice(BigDecimal incomeDevice) { @@ -259,7 +283,7 @@ public class SettleBean { } public BigDecimal getIncomeEngineer() { - return incomeEngineer; + return handleSpecial(incomeEngineer); } public void setIncomeEngineer(BigDecimal incomeEngineer) { @@ -267,7 +291,7 @@ public class SettleBean { } public BigDecimal getIncomeService() { - return incomeService; + return handleSpecial(incomeService); } public void setIncomeService(BigDecimal incomeService) { @@ -275,7 +299,7 @@ public class SettleBean { } public BigDecimal getCostPurchaseDevice() { - return costPurchaseDevice; + return handleSpecial(costPurchaseDevice); } public void setCostPurchaseDevice(BigDecimal costPurchaseDevice) { @@ -283,7 +307,7 @@ public class SettleBean { } public BigDecimal getCostPurchaseBuild() { - return costPurchaseBuild; + return handleSpecial(costPurchaseBuild); } public void setCostPurchaseBuild(BigDecimal costPurchaseBuild) { @@ -291,7 +315,7 @@ public class SettleBean { } public BigDecimal getCostPurchaseService() { - return costPurchaseService; + return handleSpecial(costPurchaseService); } public void setCostPurchaseService(BigDecimal costPurchaseService) { @@ -299,7 +323,7 @@ public class SettleBean { } public BigDecimal getCostPurchaseOther() { - return costPurchaseOther; + return handleSpecial(costPurchaseOther); } public void setCostPurchaseOther(BigDecimal costPurchaseOther) { @@ -307,7 +331,7 @@ public class SettleBean { } public BigDecimal getCostProjectManage() { - return costProjectManage; + return handleSpecial(costProjectManage); } public void setCostProjectManage(BigDecimal costProjectManage) { @@ -315,7 +339,7 @@ public class SettleBean { } public BigDecimal getCostOther() { - return costOther; + return handleSpecial(costOther); } public void setCostOther(BigDecimal costOther) { @@ -323,7 +347,7 @@ public class SettleBean { } public BigDecimal getCostExpropriation() { - return costExpropriation; + return handleSpecial(costExpropriation); } public void setCostExpropriation(BigDecimal costExpropriation) { @@ -331,7 +355,7 @@ public class SettleBean { } public BigDecimal getCostCompanyManage() { - return costCompanyManage; + return handleSpecial(costCompanyManage); } public void setCostCompanyManage(BigDecimal costCompanyManage) { @@ -339,7 +363,7 @@ public class SettleBean { } public BigDecimal getCostIncomeTax() { - return costIncomeTax; + return handleSpecial(costIncomeTax); } public void setCostIncomeTax(BigDecimal costIncomeTax) { @@ -347,7 +371,7 @@ public class SettleBean { } public BigDecimal getGrossProfit() { - return grossProfit; + return handleSpecial(grossProfit); } public void setGrossProfit(BigDecimal grossProfit) { @@ -355,7 +379,7 @@ public class SettleBean { } public BigDecimal getGrossProfitProfitMargin() { - return grossProfitProfitMargin; + return handleSpecial(grossProfitProfitMargin); } public void setGrossProfitProfitMargin(BigDecimal grossProfitProfitMargin) { @@ -363,7 +387,7 @@ public class SettleBean { } public BigDecimal getContributionProfit() { - return contributionProfit; + return handleSpecial(contributionProfit); } public void setContributionProfit(BigDecimal contributionProfit) { @@ -371,7 +395,7 @@ public class SettleBean { } public BigDecimal getContributionProfitProfitMargin() { - return contributionProfitProfitMargin; + return handleSpecial(contributionProfitProfitMargin); } public void setContributionProfitProfitMargin(BigDecimal contributionProfitProfitMargin) { @@ -379,7 +403,7 @@ public class SettleBean { } public BigDecimal getNetProfit() { - return netProfit; + return handleSpecial(netProfit); } public void setNetProfit(BigDecimal netProfit) { @@ -387,7 +411,7 @@ public class SettleBean { } public BigDecimal getNetProfitProfitMargin() { - return netProfitProfitMargin; + return handleSpecial(netProfitProfitMargin); } public void setNetProfitProfitMargin(BigDecimal netProfitProfitMargin) { @@ -395,7 +419,7 @@ public class SettleBean { } public BigDecimal getSaleIncomeCash() { - return saleIncomeCash; + return handleSpecial(saleIncomeCash); } public void setSaleIncomeCash(BigDecimal saleIncomeCash) { @@ -403,7 +427,7 @@ public class SettleBean { } public BigDecimal getTaxReturn() { - return taxReturn; + return handleSpecial(taxReturn); } public void setTaxReturn(BigDecimal taxReturn) { @@ -411,7 +435,7 @@ public class SettleBean { } public BigDecimal getEarnestMoneyIncome() { - return earnestMoneyIncome; + return handleSpecial(earnestMoneyIncome); } public void setEarnestMoneyIncome(BigDecimal earnestMoneyIncome) { @@ -419,7 +443,7 @@ public class SettleBean { } public BigDecimal getPurchaseCost() { - return purchaseCost; + return handleSpecial(purchaseCost); } public void setPurchaseCost(BigDecimal purchaseCost) { @@ -427,7 +451,7 @@ public class SettleBean { } public BigDecimal getTaxCost() { - return taxCost; + return handleSpecial(taxCost); } public void setTaxCost(BigDecimal taxCost) { @@ -435,7 +459,7 @@ public class SettleBean { } public BigDecimal getEarnestMoneyCost() { - return earnestMoneyCost; + return handleSpecial(earnestMoneyCost); } public void setEarnestMoneyCost(BigDecimal earnestMoneyCost) { @@ -443,7 +467,7 @@ public class SettleBean { } public BigDecimal getCashInflowFromInvestingActivities() { - return cashInflowFromInvestingActivities; + return handleSpecial(cashInflowFromInvestingActivities); } public void setCashInflowFromInvestingActivities(BigDecimal cashInflowFromInvestingActivities) { @@ -451,7 +475,7 @@ public class SettleBean { } public BigDecimal getCashOutflowFromInvestingActivities() { - return cashOutflowFromInvestingActivities; + return handleSpecial(cashOutflowFromInvestingActivities); } public void setCashOutflowFromInvestingActivities(BigDecimal cashOutflowFromInvestingActivities) { @@ -459,7 +483,7 @@ public class SettleBean { } public BigDecimal getNetCashFromInvestingActivities() { - return netCashFromInvestingActivities; + return handleSpecial(netCashFromInvestingActivities); } public void setNetCashFromInvestingActivities(BigDecimal netCashFromInvestingActivities) { @@ -467,7 +491,7 @@ public class SettleBean { } public BigDecimal getFinancingCapitalInflow() { - return financingCapitalInflow; + return handleSpecial(financingCapitalInflow); } public void setFinancingCapitalInflow(BigDecimal financingCapitalInflow) { @@ -475,7 +499,7 @@ public class SettleBean { } public BigDecimal getFinancingCapitalOutflow() { - return financingCapitalOutflow; + return handleSpecial(financingCapitalOutflow); } public void setFinancingCapitalOutflow(BigDecimal financingCapitalOutflow) { @@ -483,7 +507,7 @@ public class SettleBean { } public BigDecimal getFinancingCapitalCashflow() { - return financingCapitalCashflow; + return handleSpecial(financingCapitalCashflow); } public void setFinancingCapitalCashflow(BigDecimal financingCapitalCashflow) { @@ -491,7 +515,7 @@ public class SettleBean { } public BigDecimal getNetIncreaseMonetaryFunds() { - return netIncreaseMonetaryFunds; + return handleSpecial(netIncreaseMonetaryFunds); } public void setNetIncreaseMonetaryFunds(BigDecimal netIncreaseMonetaryFunds) { @@ -499,7 +523,7 @@ public class SettleBean { } public BigDecimal getNetCashFlow() { - return netCashFlow; + return handleSpecial(netCashFlow); } public void setNetCashFlow(BigDecimal netCashFlow) { diff --git a/src/main/java/cn/palmte/work/controller/backend/ProjectSummaryController.java b/src/main/java/cn/palmte/work/controller/backend/ProjectSummaryController.java index 4122873..95667a1 100644 --- a/src/main/java/cn/palmte/work/controller/backend/ProjectSummaryController.java +++ b/src/main/java/cn/palmte/work/controller/backend/ProjectSummaryController.java @@ -10,8 +10,6 @@ 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.Calendar; import java.util.Date; @@ -55,8 +53,9 @@ public class ProjectSummaryController extends BaseController { } else { time = searchInfo.get("time"); } - List> list = projectSummaryService.getList(searchInfo, pageNumber, pageSize, time); - model.put("pager", (list.size() > 0)? list.get(0) : new Page(pageNumber, pageSize)); + + List list = projectSummaryService.getList(searchInfo, time); + model.put("pager", list); return "admin/project_statistics"; } diff --git a/src/main/java/cn/palmte/work/model/ProjectBudgetCostManageRepository.java b/src/main/java/cn/palmte/work/model/ProjectBudgetCostManageRepository.java index 9b87d06..8d17359 100644 --- a/src/main/java/cn/palmte/work/model/ProjectBudgetCostManageRepository.java +++ b/src/main/java/cn/palmte/work/model/ProjectBudgetCostManageRepository.java @@ -12,4 +12,7 @@ public interface ProjectBudgetCostManageRepository extends JpaRepository findAllByProjectIds(List projectInt); } diff --git a/src/main/java/cn/palmte/work/model/ProjectBudgetCostRepository.java b/src/main/java/cn/palmte/work/model/ProjectBudgetCostRepository.java index 6972eb1..b291a96 100644 --- a/src/main/java/cn/palmte/work/model/ProjectBudgetCostRepository.java +++ b/src/main/java/cn/palmte/work/model/ProjectBudgetCostRepository.java @@ -15,4 +15,6 @@ public interface ProjectBudgetCostRepository extends JpaRepository findAllByProjectIds(List projectInt); } diff --git a/src/main/java/cn/palmte/work/model/ProjectBudgetIncomeRepository.java b/src/main/java/cn/palmte/work/model/ProjectBudgetIncomeRepository.java index 57131fc..0bf35cf 100644 --- a/src/main/java/cn/palmte/work/model/ProjectBudgetIncomeRepository.java +++ b/src/main/java/cn/palmte/work/model/ProjectBudgetIncomeRepository.java @@ -15,5 +15,6 @@ public interface ProjectBudgetIncomeRepository extends JpaRepository findAllByProjectIds(List projectInt); } diff --git a/src/main/java/cn/palmte/work/model/ProjectBudgetPlanDetailRepository.java b/src/main/java/cn/palmte/work/model/ProjectBudgetPlanDetailRepository.java index cf982ff..dc9c2ab 100644 --- a/src/main/java/cn/palmte/work/model/ProjectBudgetPlanDetailRepository.java +++ b/src/main/java/cn/palmte/work/model/ProjectBudgetPlanDetailRepository.java @@ -1,9 +1,13 @@ package cn.palmte.work.model; import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.data.jpa.repository.Query; import java.util.List; public interface ProjectBudgetPlanDetailRepository extends JpaRepository { List findAllByProjectIdEquals(int id); + + @Query(value = "select * from project_budget_plan_detail where project_id in ?1", nativeQuery = true) + List findAllByProjectIds(List projectInt); } diff --git a/src/main/java/cn/palmte/work/model/ProjectSettleCashFlowRepository.java b/src/main/java/cn/palmte/work/model/ProjectSettleCashFlowRepository.java index 3be0894..b889ce3 100644 --- a/src/main/java/cn/palmte/work/model/ProjectSettleCashFlowRepository.java +++ b/src/main/java/cn/palmte/work/model/ProjectSettleCashFlowRepository.java @@ -23,4 +23,7 @@ public interface ProjectSettleCashFlowRepository extends JpaRepository findAllByProjectsAndTime(List ids, String time); } diff --git a/src/main/java/cn/palmte/work/model/ProjectSettleCostManageRepository.java b/src/main/java/cn/palmte/work/model/ProjectSettleCostManageRepository.java index 10e2320..76dc3d3 100644 --- a/src/main/java/cn/palmte/work/model/ProjectSettleCostManageRepository.java +++ b/src/main/java/cn/palmte/work/model/ProjectSettleCostManageRepository.java @@ -23,4 +23,7 @@ public interface ProjectSettleCostManageRepository extends JpaRepository findAllByProjectId(int id); List findAllByTime(String time); + + @Query(value = "select * from project_settle_cost_manage where project_id in ?1 and time = ?2", nativeQuery = true) + List findAllByProjectsAndTime(List ids, String time); } diff --git a/src/main/java/cn/palmte/work/model/ProjectSettleCostRepository.java b/src/main/java/cn/palmte/work/model/ProjectSettleCostRepository.java index 9915527..c67afa6 100644 --- a/src/main/java/cn/palmte/work/model/ProjectSettleCostRepository.java +++ b/src/main/java/cn/palmte/work/model/ProjectSettleCostRepository.java @@ -23,4 +23,7 @@ public interface ProjectSettleCostRepository extends JpaRepository findAllByProjectId(int id); List findAllByTime(String time); + + @Query(value = "select * from project_settle_cost where project_id in ?1 and time = ?2", nativeQuery = true) + List findAllByProjectsAndTime(List ids, String time); } diff --git a/src/main/java/cn/palmte/work/model/ProjectSettleIncomeRepository.java b/src/main/java/cn/palmte/work/model/ProjectSettleIncomeRepository.java index 84e637a..fc31747 100644 --- a/src/main/java/cn/palmte/work/model/ProjectSettleIncomeRepository.java +++ b/src/main/java/cn/palmte/work/model/ProjectSettleIncomeRepository.java @@ -26,4 +26,7 @@ public interface ProjectSettleIncomeRepository extends JpaRepository findAllByProjectsAndTime(List ids, String time); } diff --git a/src/main/java/cn/palmte/work/model/ProjectSettleProfitMarginRepository.java b/src/main/java/cn/palmte/work/model/ProjectSettleProfitMarginRepository.java index f6ea062..ca5a72a 100644 --- a/src/main/java/cn/palmte/work/model/ProjectSettleProfitMarginRepository.java +++ b/src/main/java/cn/palmte/work/model/ProjectSettleProfitMarginRepository.java @@ -19,4 +19,7 @@ public interface ProjectSettleProfitMarginRepository extends JpaRepository findAllByProjectId(int id); List findAllByTime(String time); + + @Query(value = "select * from project_settle_profit_margin where project_id in ?1 and time = ?2", nativeQuery = true) + List findAllByProjectsAndTime(List ids, String time); } diff --git a/src/main/java/cn/palmte/work/service/ProjectSettleService.java b/src/main/java/cn/palmte/work/service/ProjectSettleService.java index 7e7b0f8..bae636c 100644 --- a/src/main/java/cn/palmte/work/service/ProjectSettleService.java +++ b/src/main/java/cn/palmte/work/service/ProjectSettleService.java @@ -633,10 +633,10 @@ public class ProjectSettleService { return settleBean; } - public SettleBean getMonthTotalSettle(String time) { + public SettleBean getMonthTotalSettle(List projectInt, String time) { SettleBean settleBean = new SettleBean(); - List incomes = projectSettleIncomeRepository.findAllByTime(time); + List incomes = projectSettleIncomeRepository.findAllByProjectsAndTime(projectInt, 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.setIncomeDevice(incomeDevice); @@ -648,7 +648,7 @@ public class ProjectSettleService { settleBean.setIncomeService(incomeService); } - List costs = projectSettleCostRepository.findAllByTime(time); + List costs = projectSettleCostRepository.findAllByProjectsAndTime(projectInt, 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.setCostPurchaseDevice(costDevice); @@ -669,7 +669,7 @@ public class ProjectSettleService { settleBean.setCostOther(costOtherOther); } - List manages = projectSettleCostManageRepository.findAllByTime(time); + List manages = projectSettleCostManageRepository.findAllByProjectsAndTime(projectInt, 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.setCostExpropriation(costManageExpropriation); @@ -681,7 +681,7 @@ public class ProjectSettleService { settleBean.setCostIncomeTax(costIncomeTax); } - List profits = projectSettleProfitMarginRepository.findAllByTime(time); + List profits = projectSettleProfitMarginRepository.findAllByProjectsAndTime(projectInt, 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); @@ -693,7 +693,7 @@ public class ProjectSettleService { settleBean.setNetProfit(netProfit); } - List cashFlows = projectSettleCashFlowRepository.findAllByTime(time); + List cashFlows = projectSettleCashFlowRepository.findAllByProjectsAndTime(projectInt, 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); diff --git a/src/main/java/cn/palmte/work/service/ProjectSummaryService.java b/src/main/java/cn/palmte/work/service/ProjectSummaryService.java index e1c8d48..8e3879c 100644 --- a/src/main/java/cn/palmte/work/service/ProjectSummaryService.java +++ b/src/main/java/cn/palmte/work/service/ProjectSummaryService.java @@ -1,14 +1,13 @@ package cn.palmte.work.service; import cn.palmte.work.bean.SettleBean; -import cn.palmte.work.model.Project; -import cn.palmte.work.model.ProjectSettleCostRepository; +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.db.bean.Page; import top.jfunc.common.db.utils.Pagination; +import top.jfunc.common.utils.CollectionUtil; import java.math.BigDecimal; import java.util.ArrayList; @@ -26,10 +25,19 @@ public class ProjectSummaryService { private static final Logger logger = LoggerFactory.getLogger(ProjectSummaryService.class); @Autowired - private ProjectBudgetService projectBudgetService; + private ProjectBudgetIncomeRepository projectBudgetIncomeRepository; @Autowired - private ProjectSettleCostRepository projectSettleCostRepository; + private ProjectBudgetCostRepository projectBudgetCostRepository; + + @Autowired + private ProjectBudgetCostManageRepository projectBudgetCostManageRepository; + + @Autowired + private ProjectBudgetPlanDetailRepository projectBudgetPlanDetailRepository; + + @Autowired + private ProjectSettleIncomeRepository projectSettleIncomeRepository; @Autowired private ProjectSettleService projectSettleService; @@ -37,93 +45,143 @@ public class ProjectSummaryService { @Autowired private Pagination pagination; - public List> getList(ConcurrentHashMap searchInfo, int pageNumber, int pageSize, String time) { - List> pageList = new ArrayList<>(); - if (pageNumber == 1) { - //预算金额 - Map budget = new HashMap<>(40); - String sql = "select proj.id, proj.name from project_settle_cost psc left join project proj on psc.project_id = proj.id where psc.time = ? group by proj.id order by proj.id asc"; - List projects = pagination.find(sql, Project.class, time); -// for (Project project : projects) { -// BudgetBean budgetBean = projectBudgetService.getBudget(project); -// CashFlowBean cashFlowBean = projectBudgetService.getCashFlowBean(project, projectBudgetService.getProjectBudgetPlanDetails(project)); -// budget.put("incomeDevice", budget.getOrDefault("incomeDeviceTaxExclude", new BigDecimal(0)).add(budgetBean.getIncomeDeviceTaxExclude())); -// budget.put("incomeEngineer", budget.getOrDefault("incomeEngineerTaxExclude", new BigDecimal(0)).add(budgetBean.getIncomeEngineerTaxExclude())); -// budget.put("incomeService", budget.getOrDefault("incomeServiceTaxExclude", new BigDecimal(0)).add(budgetBean.getIncomeServiceTaxExclude())); -// budget.put("costPurchaseDevice", budget.getOrDefault("costPurchaseDeviceTaxExclude", new BigDecimal(0)).add(budgetBean.getCostPurchaseDeviceTaxExclude())); -// budget.put("costPurchaseBuild", budget.getOrDefault("costPurchaseBuildTaxExclude", new BigDecimal(0)).add(budgetBean.getCostPurchaseBuildTaxExclude())); -// budget.put("costPurchaseService", budget.getOrDefault("costPurchaseServiceTaxExclude", new BigDecimal(0)).add(budgetBean.getCostPurchaseServiceTaxExclude())); -// budget.put("costPurchaseOther", budget.getOrDefault("costPurchaseOtherTaxExclude", new BigDecimal(0)).add(budgetBean.getCostPurchaseOtherTaxExclude())); -// budget.put("costOtherOther", budget.getOrDefault("costOtherOtherTaxExclude", new BigDecimal(0)).add(budgetBean.getCostOtherOtherTaxExclude())); -// budget.put("costProjectManage", budget.getOrDefault("costProjectManageTaxExclude", new BigDecimal(0)).add(budgetBean.getCostProjectManageTaxExclude())); -// budget.put("costExpropriation", budget.getOrDefault("costExpropriationTaxExclude", new BigDecimal(0)).add(budgetBean.getCostExpropriationTaxExclude())); -// budget.put("costCompanyManage", budget.getOrDefault("costCompanyManageTaxExclude", new BigDecimal(0)).add(budgetBean.getCostCompanyManageTaxExclude())); -// -// budget.put("incomeTotal", budget.getOrDefault("incomeTotalTaxExclude", new BigDecimal(0)).add(budgetBean.getIncomeTotalTaxExclude())); -// budget.put("incomeTotalTaxInclude", budget.getOrDefault("incomeTotalTaxInclude", new BigDecimal(0)).add(budgetBean.getIncomeTotalTaxInclude())); -// budget.put("costTotal2", budget.getOrDefault("costTotalTaxExclude2", new BigDecimal(0)).add(budgetBean.getCostTotalTaxExclude())); -// budget.put("costTotalTaxInclude", budget.getOrDefault("costTotalTaxInclude", new BigDecimal(0)).add(budgetBean.getCostTotalTaxInclude())); -// budget.put("costTotal", 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("incomeTotal", new BigDecimal(0))).subtract(budget.getOrDefault("costTotalTaxInclude", new BigDecimal(0))).add(budget.getOrDefault("costTotal2", 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)))); - SettleBean budgetBean = new SettleBean(); - budgetBean.setProjectName("预算金额(不含税)"); - Page page = new Page<>(pageNumber, pageSize); - List list = new ArrayList<>(); - list.add(budgetBean); - - SettleBean totalSettle = projectSettleService.getMonthTotalSettle(time); - BigDecimal divide = totalSettle.getIncomeTotal(); - if (divide.equals(new BigDecimal(0))) { - divide = new BigDecimal(1); + public List getList(ConcurrentHashMap searchInfo, String time) { + //预算金额 + Map budget = new HashMap<>(40); + String sql = "select proj.id, proj.name, proj.approve_status_budget 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 projectList = pagination.find(sql, Project.class, time); + List projects = new ArrayList<>(); + List projectInt = new ArrayList<>(); + for (Project project : projectList) { + if (project.getApproveStatusBudget() == 2) { + projects.add(project); + projectInt.add(project.getId()); + continue; } - totalSettle.setGrossProfitProfitMargin(totalSettle.getGrossProfit().divide(divide, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal(100))); - totalSettle.setContributionProfitProfitMargin(totalSettle.getContributionProfit().divide(divide, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal(100))); - totalSettle.setNetProfitProfitMargin(totalSettle.getNetProfit().divide(divide, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal(100))); - totalSettle.setProjectName("实际累计(不含税)"); - list.add(totalSettle); - - for (Project project : projects) { - SettleBean monthSettle = projectSettleService.getMonthSettle(project, time); - BigDecimal divide2 = monthSettle.getIncomeTotal(); - if (divide2.equals(new BigDecimal(0))) { - divide2 = new BigDecimal(1); - } - monthSettle.setGrossProfitProfitMargin(monthSettle.getGrossProfit().divide(divide2, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal(100))); - monthSettle.setContributionProfitProfitMargin(monthSettle.getContributionProfit().divide(divide2, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal(100))); - monthSettle.setNetProfitProfitMargin(monthSettle.getNetProfit().divide(divide2, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal(100))); - monthSettle.setProjectName(project.getName()); - list.add(monthSettle); + ProjectSettleIncome projectNewest = projectSettleIncomeRepository.findNewByProjectId(project.getId()); + if (!time.equals(projectNewest.getTime())) { + projects.add(project); + projectInt.add(project.getId()); } - page.setList(list); - pageList.add(page); - } 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; + + SettleBean budgetBean = new SettleBean(); + if (projectInt.size() == 0) { + projectInt.add(0); + } + List incomes = projectBudgetIncomeRepository.findAllByProjectIds(projectInt); + BigDecimal taxTotal = new BigDecimal(0); + if(CollectionUtil.isNotEmpty(incomes)){ + BigDecimal incomeDevice = incomes.stream().filter(d -> d.getType() == ProjectBudgetIncome.TYPE_DEVICE).map(ProjectBudgetIncome::getIncomeTaxExclude).reduce(BigDecimal.ZERO, BigDecimal::add); + budgetBean.setIncomeDevice(incomeDevice); + BigDecimal incomeDeviceInclude = incomes.stream().filter(d -> d.getType() == ProjectBudgetIncome.TYPE_DEVICE).map(ProjectBudgetIncome::getIncomeTaxInclude).reduce(BigDecimal.ZERO, BigDecimal::add); + + BigDecimal incomeEngineer = incomes.stream().filter(d -> d.getType() == ProjectBudgetIncome.TYPE_ENGINEER).map(ProjectBudgetIncome::getIncomeTaxExclude).reduce(BigDecimal.ZERO, BigDecimal::add); + budgetBean.setIncomeEngineer(incomeEngineer); + BigDecimal incomeEngineerInclude = incomes.stream().filter(d -> d.getType() == ProjectBudgetIncome.TYPE_ENGINEER).map(ProjectBudgetIncome::getIncomeTaxInclude).reduce(BigDecimal.ZERO, BigDecimal::add); + + BigDecimal incomeService = incomes.stream().filter(d -> d.getType() == ProjectBudgetIncome.TYPE_SERVICE).map(ProjectBudgetIncome::getIncomeTaxExclude).reduce(BigDecimal.ZERO, BigDecimal::add); + budgetBean.setIncomeService(incomeService); + BigDecimal incomeServiceInclude = incomes.stream().filter(d -> d.getType() == ProjectBudgetIncome.TYPE_SERVICE).map(ProjectBudgetIncome::getIncomeTaxInclude).reduce(BigDecimal.ZERO, BigDecimal::add); + + taxTotal = taxTotal.subtract(budgetBean.getIncomeTotal()).add(incomeDeviceInclude).add(incomeEngineerInclude).add(incomeServiceInclude); + } + + List costs = projectBudgetCostRepository.findAllByProjectIds(projectInt); + if(CollectionUtil.isNotEmpty(costs)){ + BigDecimal costDevice = costs.stream().filter(d -> d.getType() == ProjectBudgetCost.TYPE_DEVICE).map(ProjectBudgetCost::getCostTaxExclude).reduce(BigDecimal.ZERO, BigDecimal::add); + budgetBean.setCostPurchaseDevice(costDevice); + BigDecimal costDeviceInclude = costs.stream().filter(d -> d.getType() == ProjectBudgetCost.TYPE_DEVICE).map(ProjectBudgetCost::getCostTaxInclude).reduce(BigDecimal.ZERO, BigDecimal::add); + + BigDecimal costBuild = costs.stream().filter(d -> d.getType() == ProjectBudgetCost.TYPE_BUILDING).map(ProjectBudgetCost::getCostTaxExclude).reduce(BigDecimal.ZERO, BigDecimal::add); + budgetBean.setCostPurchaseBuild(costBuild); + BigDecimal costBuildInclude = costs.stream().filter(d -> d.getType() == ProjectBudgetCost.TYPE_BUILDING).map(ProjectBudgetCost::getCostTaxInclude).reduce(BigDecimal.ZERO, BigDecimal::add); + + BigDecimal costService = costs.stream().filter(d -> d.getType() == ProjectBudgetCost.TYPE_SERVICE).map(ProjectBudgetCost::getCostTaxExclude).reduce(BigDecimal.ZERO, BigDecimal::add); + budgetBean.setCostPurchaseService(costService); + BigDecimal costServiceInclude = costs.stream().filter(d -> d.getType() == ProjectBudgetCost.TYPE_SERVICE).map(ProjectBudgetCost::getCostTaxInclude).reduce(BigDecimal.ZERO, BigDecimal::add); + + BigDecimal costOther = costs.stream().filter(d -> d.getType() == ProjectBudgetCost.TYPE_OTHER).map(ProjectBudgetCost::getCostTaxExclude).reduce(BigDecimal.ZERO, BigDecimal::add); + budgetBean.setCostPurchaseOther(costOther); + BigDecimal costOtherInclude = costs.stream().filter(d -> d.getType() == ProjectBudgetCost.TYPE_OTHER).map(ProjectBudgetCost::getCostTaxInclude).reduce(BigDecimal.ZERO, BigDecimal::add); + + BigDecimal costProjectManage = costs.stream().filter(d -> d.getType() == ProjectBudgetCost.TYPE_PROJECT_MANAGE).map(ProjectBudgetCost::getCostTaxExclude).reduce(BigDecimal.ZERO, BigDecimal::add); + budgetBean.setCostProjectManage(costProjectManage ); + BigDecimal costProjectManageInclude = costs.stream().filter(d -> d.getType() == ProjectBudgetCost.TYPE_PROJECT_MANAGE).map(ProjectBudgetCost::getCostTaxInclude).reduce(BigDecimal.ZERO, BigDecimal::add); + + BigDecimal costOtherOther = costs.stream().filter(d -> d.getType() == ProjectBudgetCost.TYPE_OTHER_OTHER).map(ProjectBudgetCost::getCostTaxExclude).reduce(BigDecimal.ZERO, BigDecimal::add); + budgetBean.setCostOther(costOtherOther); + BigDecimal costOtherOtherInclude = costs.stream().filter(d -> d.getType() == ProjectBudgetCost.TYPE_OTHER_OTHER).map(ProjectBudgetCost::getCostTaxInclude).reduce(BigDecimal.ZERO, BigDecimal::add); + taxTotal = taxTotal.add(budgetBean.getCostTotal()).subtract(costDeviceInclude).subtract(costBuildInclude).subtract(costServiceInclude).subtract(costOtherInclude).subtract(costProjectManageInclude).subtract(costOtherOtherInclude); + } + + List manages = projectBudgetCostManageRepository.findAllByProjectIds(projectInt); + if(CollectionUtil.isNotEmpty(manages)){ + BigDecimal costManageExpropriation = manages.stream().filter(d -> d.getType() == ProjectBudgetCostManage.TYPE_EXPROPRIATION).map(ProjectBudgetCostManage::getCostTaxExclude).reduce(BigDecimal.ZERO, BigDecimal::add); + budgetBean.setCostExpropriation(costManageExpropriation); + + BigDecimal costManageCompany = manages.stream().filter(d -> d.getType() == ProjectBudgetCostManage.TYPE_COMPANY_MANAGE).map(ProjectBudgetCostManage::getCostTaxExclude).reduce(BigDecimal.ZERO, BigDecimal::add); + budgetBean.setCostCompanyManage(costManageCompany); + + budgetBean.setCostIncomeTax(taxTotal); + } + + budgetBean.setGrossProfit(budgetBean.getIncomeTotal().subtract(budgetBean.getCostTotal()).subtract(budgetBean.getCostExpropriation())); + budgetBean.setContributionProfit(budgetBean.getGrossProfit().subtract(budgetBean.getCostCompanyManage())); + budgetBean.setNetProfit(budgetBean.getContributionProfit().subtract(budgetBean.getCostIncomeTax())); + + List cashFlows = projectBudgetPlanDetailRepository.findAllByProjectIds(projectInt); + BigDecimal saleIncome = cashFlows.stream().map(ProjectBudgetPlanDetail::getSaleIncome).reduce(BigDecimal.ZERO, BigDecimal::add); + budgetBean.setSaleIncomeCash(saleIncome); + + BigDecimal earnestMoneyIncome = cashFlows.stream().map(ProjectBudgetPlanDetail::getEarnestMoneyIncome).reduce(BigDecimal.ZERO, BigDecimal::add); + budgetBean.setEarnestMoneyIncome(earnestMoneyIncome); + + BigDecimal deviceCost = cashFlows.stream().map(ProjectBudgetPlanDetail::getDeviceCost).reduce(BigDecimal.ZERO, BigDecimal::add); + BigDecimal engineerCost = cashFlows.stream().map(ProjectBudgetPlanDetail::getEngineerCost).reduce(BigDecimal.ZERO, BigDecimal::add); + budgetBean.setPurchaseCost(deviceCost.add(engineerCost)); + + BigDecimal projectManageCost = cashFlows.stream().map(ProjectBudgetPlanDetail::getProjectManageCost).reduce(BigDecimal.ZERO, BigDecimal::add); + BigDecimal earnestMoneyCost = cashFlows.stream().map(ProjectBudgetPlanDetail::getEarnestMoneyCost).reduce(BigDecimal.ZERO, BigDecimal::add); + BigDecimal capitalInterest = cashFlows.stream().map(ProjectBudgetPlanDetail::getCapitalInterest).reduce(BigDecimal.ZERO, BigDecimal::add); + budgetBean.setEarnestMoneyCost(projectManageCost.add(earnestMoneyCost).add(capitalInterest)); + + BigDecimal underWritten = cashFlows.stream().map(ProjectBudgetPlanDetail::getUnderwrittenPlan).reduce(BigDecimal.ZERO, BigDecimal::add); + budgetBean.setFinancingCapitalInflow(underWritten); + + BigDecimal repaymentPlan = cashFlows.stream().map(ProjectBudgetPlanDetail::getRepaymentPlan).reduce(BigDecimal.ZERO, BigDecimal::add); + budgetBean.setFinancingCapitalOutflow(repaymentPlan); + + budgetBean.setNetCashFlow(saleIncome.add(earnestMoneyIncome).subtract(budgetBean.getEarnestMoneyCost())); + budgetBean.setFinancingCapitalCashflow(underWritten.subtract(repaymentPlan)); + budgetBean.setNetIncreaseMonetaryFunds(budgetBean.getNetCashFlow().add(budgetBean.getFinancingCapitalCashflow())); + + setProfitMargin(budgetBean); + budgetBean.setProjectName("预算金额(不含税)"); + List list = new ArrayList<>(); + list.add(budgetBean); + + SettleBean totalSettle = projectSettleService.getMonthTotalSettle(projectInt, time); + setProfitMargin(totalSettle); + totalSettle.setProjectName("实际累计(不含税)"); + list.add(totalSettle); + + for (Project project : projects) { + SettleBean monthSettle = projectSettleService.getMonthSettle(project, time); + setProfitMargin(monthSettle); + monthSettle.setProjectName(project.getName()); + list.add(monthSettle); + } + return list; + } + + private void setProfitMargin(SettleBean monthSettle) { + BigDecimal divide2 = monthSettle.getIncomeTotal(); + if (divide2.equals(new BigDecimal(0))) { + divide2 = new BigDecimal(1); + } + monthSettle.setGrossProfitProfitMargin(monthSettle.getGrossProfit().multiply(new BigDecimal(100).divide(divide2, BigDecimal.ROUND_HALF_UP))); + monthSettle.setContributionProfitProfitMargin(monthSettle.getContributionProfit().multiply(new BigDecimal(100).divide(divide2, BigDecimal.ROUND_HALF_UP))); + monthSettle.setNetProfitProfitMargin(monthSettle.getNetProfit().multiply(new BigDecimal(100).divide(divide2, BigDecimal.ROUND_HALF_UP))); } } diff --git a/src/main/resources/templates/admin/project_statistics.ftl b/src/main/resources/templates/admin/project_statistics.ftl index 4aa0bdf..75674c2 100644 --- a/src/main/resources/templates/admin/project_statistics.ftl +++ b/src/main/resources/templates/admin/project_statistics.ftl @@ -26,144 +26,150 @@
- - - - - - - - - - - - - - - - - +
+
收入--设备类收入--工程类收入--服务类采购成本--设备类采购成本--施工类采购成本--服务类采购成本--其他成本--其他成本--项目管理成本财务费用--资金占用成本公司管理费用
+ + + + + + + + + + + + + + + + - - <#if (pager.list)?exists> - <#list pager.list as list> - - - - - - - - - - - - - - - - - -
项目名称收入--设备类收入--工程类收入--服务类采购成本--设备类采购成本--施工类采购成本--服务类采购成本--其他成本--其他成本--项目管理成本财务费用--资金占用成本公司管理费用
${list.projectName!}${(list.incomeDevice!0)?string("0.##")}${(list.incomeEngineer!0)?string("0.##")}${(list.incomeService!0)?string("0.##")}${(list.costPurchaseDevice!0)?string("0.##")}${(list.costPurchaseBuild!0)?string("0.##")}${(list.costPurchaseService!0)?string("0.##")}${(list.costPurchaseOther!0)?string("0.##")}${(list.costOther!0)?string("0.##")}${(list.costProjectManage!0)?string("0.##")}${(list.costExpropriation!0)?string("0.##")}${(list.costCompanyManage!0)?string("0.##")}
+ + <#if (pager)?exists> + <#list pager as list> + + ${list.projectName!} + ${(list.incomeDevice!0)?string("0.##")} + ${(list.incomeEngineer!0)?string("0.##")} + ${(list.incomeService!0)?string("0.##")} + ${(list.costPurchaseDevice!0)?string("0.##")} + ${(list.costPurchaseBuild!0)?string("0.##")} + ${(list.costPurchaseService!0)?string("0.##")} + ${(list.costPurchaseOther!0)?string("0.##")} + ${(list.costOther!0)?string("0.##")} + ${(list.costProjectManage!0)?string("0.##")} + ${(list.costExpropriation!0)?string("0.##")} + ${(list.costCompanyManage!0)?string("0.##")} + + + + + +
- - - - - - - - - - - - - - - - - - - +
+
营业收入营业成本项目管理成本其他财务费用项目毛利项目毛利率公司管理费用项目贡献利润项目贡献利润率所得税费用项目净利润项目净利润率
+ + + + + + + + + + + + + + + + + + - - <#if (pager.list)?exists> - <#list pager.list as list> - - - - - - - - - - - - - - - - - - - -
项目名称营业收入营业成本项目管理成本其他财务费用项目毛利项目毛利率公司管理费用项目贡献利润项目贡献利润率所得税费用项目净利润项目净利润率
${list.projectName!}${(list.incomeTotal!0)?string("0.##")}${(list.costTotal!0)?string("0.##")}${(list.costProjectManage!0)?string("0.##")}${(list.costOther!0)?string("0.##")}${(list.costExpropriation!0)?string("0.##")}${(list.grossProfit!0)?string("0.##")}${(list.grossProfitProfitMargin!0)?string("0.##")}${(list.costCompanyManage!0)?string("0.##")}${(list.contributionProfit!0)?string("0.##")}${(list.contributionProfitProfitMargin!0)?string("0.##")}${(list.taxCost!0)?string("0.##")}${(list.netProfit!0)?string("0.##")}${(list.netProfitProfitMargin!0)?string("0.##")}
+ + <#if (pager)?exists> + <#list pager as list> + + ${list.projectName!} + ${(list.incomeTotal!0)?string("0.##")} + ${(list.costTotal2!0)?string("0.##")} + ${(list.costProjectManage!0)?string("0.##")} + ${(list.costOther!0)?string("0.##")} + ${(list.costExpropriation!0)?string("0.##")} + ${(list.grossProfit!0)?string("0.##")} + ${(list.grossProfitProfitMargin!0)?string("0.##")} + ${(list.costCompanyManage!0)?string("0.##")} + ${(list.contributionProfit!0)?string("0.##")} + ${(list.contributionProfitProfitMargin!0)?string("0.##")} + ${(list.taxCost!0)?string("0.##")} + ${(list.netProfit!0)?string("0.##")} + ${(list.netProfitProfitMargin!0)?string("0.##")} + + + + + +
- - - - - - - - - - - - - - - - - - - - +
+
销售商品、提供劳务收到的现金收到的税费返还收到的其他与经营活动有关的现金购买商品、接受劳务支付的现金支付的各项税费支付其他与经营活动有关的现金经营活动产生的现金流量净额投资活动现金流入投资活动现金流出投资活动产生的现金流量净额借款资金流入还款资金流出筹资活动产生的现金流量净额货币资金净增加额
+ + + + + + + + + + + + + + + + + + + - - <#if (pager.list)?exists> - <#list pager.list as list> - - - - - - - - - - - - - - - - - - - - -
项目名称销售商品、提供劳务收到的现金收到的税费返还收到的其他与经营活动有关的现金购买商品、接受劳务支付的现金支付的各项税费支付其他与经营活动有关的现金经营活动产生的现金流量净额投资活动现金流入投资活动现金流出投资活动产生的现金流量净额借款资金流入还款资金流出筹资活动产生的现金流量净额货币资金净增加额
${list.projectName!}${(list.saleIncomeCash!0)?string("0.##")}${(list.taxReturn!0)?string("0.##")}${(list.earnestMoneyIncome!0)?string("0.##")}${(list.purchaseCost!0)?string("0.##")}${(list.taxCost!0)?string("0.##")}${(list.earnestMoneyCost!0)?string("0.##")}${(list.netCashFlow!0)?string("0.##")}${(list.cashInflowFromInvestingActivities!0)?string("0.##")}${(list.cashOutflowFromInvestingActivities!0)?string("0.##")}${(list.netCashFromInvestingActivities!0)?string("0.##")}${(list.financingCapitalInflow!0)?string("0.##")}${(list.financingCapitalOutflow!0)?string("0.##")}${(list.financingCapitalCashflow!0)?string("0.##")}${(list.netIncreaseMonetaryFunds!0)?string("0.##")}
+ + <#if (pager)?exists> + <#list pager as list> + + ${list.projectName!} + ${(list.saleIncomeCash!0)?string("0.##")} + ${(list.taxReturn!0)?string("0.##")} + ${(list.earnestMoneyIncome!0)?string("0.##")} + ${(list.purchaseCost!0)?string("0.##")} + ${(list.taxCost!0)?string("0.##")} + ${(list.earnestMoneyCost!0)?string("0.##")} + ${(list.netCashFlow!0)?string("0.##")} + ${(list.cashInflowFromInvestingActivities!0)?string("0.##")} + ${(list.cashOutflowFromInvestingActivities!0)?string("0.##")} + ${(list.netCashFromInvestingActivities!0)?string("0.##")} + ${(list.financingCapitalInflow!0)?string("0.##")} + ${(list.financingCapitalOutflow!0)?string("0.##")} + ${(list.financingCapitalCashflow!0)?string("0.##")} + ${(list.netIncreaseMonetaryFunds!0)?string("0.##")} + + + + + +
@@ -181,6 +187,22 @@ + + diff --git a/src/main/resources/templates/common/defaultLayout.ftl b/src/main/resources/templates/common/defaultLayout.ftl index 09396bc..48b1311 100644 --- a/src/main/resources/templates/common/defaultLayout.ftl +++ b/src/main/resources/templates/common/defaultLayout.ftl @@ -4,13 +4,13 @@ - 绿色智慧工地管理系统 + 项目四算管理系统 - + <#include "import.ftl"/>