增加汇总预算金额

master
OathK1per 2021-11-18 15:28:21 +08:00
parent ff602015f3
commit fd284d6d9e
15 changed files with 387 additions and 259 deletions

View File

@ -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) {

View File

@ -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<Page<SettleBean>> list = projectSummaryService.getList(searchInfo, pageNumber, pageSize, time);
model.put("pager", (list.size() > 0)? list.get(0) : new Page<Record>(pageNumber, pageSize));
List<SettleBean> list = projectSummaryService.getList(searchInfo, time);
model.put("pager", list);
return "admin/project_statistics";
}

View File

@ -12,4 +12,7 @@ public interface ProjectBudgetCostManageRepository extends JpaRepository<Project
@Query(value = "select sum(cost_tax_exclude) from project_budget_cost_manage where type = ?", nativeQuery = true)
BigDecimal costTaxExcludeSum(int type);
@Query(value = "select * from project_budget_cost_manage where project_id in ?1", nativeQuery = true)
List<ProjectBudgetCostManage> findAllByProjectIds(List<Integer> projectInt);
}

View File

@ -15,4 +15,6 @@ public interface ProjectBudgetCostRepository extends JpaRepository<ProjectBudget
@Query(value = "select sum(cost_tax_exclude) from project_budget_cost where type = ?", nativeQuery = true)
BigDecimal costTaxExcludeSum(int type);
@Query(value = "select * from project_budget_cost where project_id in ?1", nativeQuery = true)
List<ProjectBudgetCost> findAllByProjectIds(List<Integer> projectInt);
}

View File

@ -15,5 +15,6 @@ public interface ProjectBudgetIncomeRepository extends JpaRepository<ProjectBudg
@Query(value = "select sum(income_tax_exclude) from project_budget_income where type = ?", nativeQuery = true)
BigDecimal incomeTaxExcludeSum(int type);
@Query(value = "select * from project_budget_income where project_id in ?1", nativeQuery = true)
List<ProjectBudgetIncome> findAllByProjectIds(List<Integer> projectInt);
}

View File

@ -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<ProjectBudgetPlanDetail,Integer> {
List<ProjectBudgetPlanDetail> findAllByProjectIdEquals(int id);
@Query(value = "select * from project_budget_plan_detail where project_id in ?1", nativeQuery = true)
List<ProjectBudgetPlanDetail> findAllByProjectIds(List<Integer> projectInt);
}

View File

@ -23,4 +23,7 @@ public interface ProjectSettleCashFlowRepository extends JpaRepository<ProjectSe
@Query(value = "select sum(amount) from project_settle_cash_flow where project_id = ? and type = ?", nativeQuery = true)
BigDecimal costAmountSum(int projectId, int type);
@Query(value = "select * from project_settle_cash_flow where project_id in ?1 and time = ?2", nativeQuery = true)
List<ProjectSettleCashFlow> findAllByProjectsAndTime(List<Integer> ids, String time);
}

View File

@ -23,4 +23,7 @@ public interface ProjectSettleCostManageRepository extends JpaRepository<Project
List<ProjectSettleCostManage> findAllByProjectId(int id);
List<ProjectSettleCostManage> findAllByTime(String time);
@Query(value = "select * from project_settle_cost_manage where project_id in ?1 and time = ?2", nativeQuery = true)
List<ProjectSettleCostManage> findAllByProjectsAndTime(List<Integer> ids, String time);
}

View File

@ -23,4 +23,7 @@ public interface ProjectSettleCostRepository extends JpaRepository<ProjectSettle
List<ProjectSettleCost> findAllByProjectId(int id);
List<ProjectSettleCost> findAllByTime(String time);
@Query(value = "select * from project_settle_cost where project_id in ?1 and time = ?2", nativeQuery = true)
List<ProjectSettleCost> findAllByProjectsAndTime(List<Integer> ids, String time);
}

View File

@ -26,4 +26,7 @@ public interface ProjectSettleIncomeRepository extends JpaRepository<ProjectSett
@Query(value = "select * from project_settle_income where project_id = ?1 order by id desc limit 0, 1", nativeQuery = true)
ProjectSettleIncome findNewByProjectId(int id);
@Query(value = "select * from project_settle_income where project_id in ?1 and time = ?2", nativeQuery = true)
List<ProjectSettleIncome> findAllByProjectsAndTime(List<Integer> ids, String time);
}

View File

@ -19,4 +19,7 @@ public interface ProjectSettleProfitMarginRepository extends JpaRepository<Proje
List<ProjectSettleProfitMargin> findAllByProjectId(int id);
List<ProjectSettleProfitMargin> findAllByTime(String time);
@Query(value = "select * from project_settle_profit_margin where project_id in ?1 and time = ?2", nativeQuery = true)
List<ProjectSettleProfitMargin> findAllByProjectsAndTime(List<Integer> ids, String time);
}

View File

@ -633,10 +633,10 @@ public class ProjectSettleService {
return settleBean;
}
public SettleBean getMonthTotalSettle(String time) {
public SettleBean getMonthTotalSettle(List<Integer> projectInt, String time) {
SettleBean settleBean = new SettleBean();
List<ProjectSettleIncome> incomes = projectSettleIncomeRepository.findAllByTime(time);
List<ProjectSettleIncome> 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<ProjectSettleCost> costs = projectSettleCostRepository.findAllByTime(time);
List<ProjectSettleCost> 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<ProjectSettleCostManage> manages = projectSettleCostManageRepository.findAllByTime(time);
List<ProjectSettleCostManage> 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<ProjectSettleProfitMargin> profits = projectSettleProfitMarginRepository.findAllByTime(time);
List<ProjectSettleProfitMargin> 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<ProjectSettleCashFlow> cashFlows = projectSettleCashFlowRepository.findAllByTime(time);
List<ProjectSettleCashFlow> 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);

View File

@ -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<Page<SettleBean>> getList(ConcurrentHashMap<String, String> searchInfo, int pageNumber, int pageSize, String time) {
List<Page<SettleBean>> 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, 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<SettleBean> page = new Page<>(pageNumber, pageSize);
List<SettleBean> 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<SettleBean> getList(ConcurrentHashMap<String, String> searchInfo, String time) {
//预算金额
Map<String, BigDecimal> 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<Project> projectList = pagination.find(sql, Project.class, time);
List<Project> projects = new ArrayList<>();
List<Integer> 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<ProjectBudgetIncome> 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<ProjectBudgetCost> 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<ProjectBudgetCostManage> 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<ProjectBudgetPlanDetail> 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<SettleBean> 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)));
}
}

View File

@ -26,144 +26,150 @@
</ul>
<div class="am-tabs-bd">
<div class="am-tab-panel am-fade am-in am-active" id="tab1">
<table class="am-table am-table-bordered am-table-radius table-main" style="padding:0;">
<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>
<div class="am-scrollable-horizontal">
<table class="am-table am-table-bordered am-table-radius table-main" style="padding:0;">
<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 (pager.list)?exists>
<#list pager.list as list>
<tr>
<td>${list.projectName!}</td>
<td>${(list.incomeDevice!0)?string("0.##")}</td>
<td>${(list.incomeEngineer!0)?string("0.##")}</td>
<td>${(list.incomeService!0)?string("0.##")}</td>
<td>${(list.costPurchaseDevice!0)?string("0.##")}</td>
<td>${(list.costPurchaseBuild!0)?string("0.##")}</td>
<td>${(list.costPurchaseService!0)?string("0.##")}</td>
<td>${(list.costPurchaseOther!0)?string("0.##")}</td>
<td>${(list.costOther!0)?string("0.##")}</td>
<td>${(list.costProjectManage!0)?string("0.##")}</td>
<td>${(list.costExpropriation!0)?string("0.##")}</td>
<td>${(list.costCompanyManage!0)?string("0.##")}</td>
</tr>
</#list>
</#if>
</tbody>
</table>
<tbody>
<#if (pager)?exists>
<#list pager as list>
<tr>
<td>${list.projectName!}</td>
<td>${(list.incomeDevice!0)?string("0.##")}</td>
<td>${(list.incomeEngineer!0)?string("0.##")}</td>
<td>${(list.incomeService!0)?string("0.##")}</td>
<td>${(list.costPurchaseDevice!0)?string("0.##")}</td>
<td>${(list.costPurchaseBuild!0)?string("0.##")}</td>
<td>${(list.costPurchaseService!0)?string("0.##")}</td>
<td>${(list.costPurchaseOther!0)?string("0.##")}</td>
<td>${(list.costOther!0)?string("0.##")}</td>
<td>${(list.costProjectManage!0)?string("0.##")}</td>
<td>${(list.costExpropriation!0)?string("0.##")}</td>
<td>${(list.costCompanyManage!0)?string("0.##")}</td>
</tr>
</#list>
</#if>
</tbody>
</table>
</div>
</div>
</div>
<div class="am-tabs-bd">
<div class="am-tab-panel am-fade am-in" id="tab2">
<table class="am-table am-table-bordered am-table-radius table-main" style="padding:0;">
<thead>
<tr>
<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>
<div class="am-scrollable-horizontal">
<table class="am-table am-table-bordered am-table-radius table-main" style="padding:0;">
<thead>
<tr>
<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 (pager.list)?exists>
<#list pager.list as list>
<tr>
<td>${list.projectName!}</td>
<td>${(list.incomeTotal!0)?string("0.##")}</td>
<td>${(list.costTotal!0)?string("0.##")}</td>
<td>${(list.costProjectManage!0)?string("0.##")}</td>
<td>${(list.costOther!0)?string("0.##")}</td>
<td>${(list.costExpropriation!0)?string("0.##")}</td>
<td>${(list.grossProfit!0)?string("0.##")}</td>
<td>${(list.grossProfitProfitMargin!0)?string("0.##")}</td>
<td>${(list.costCompanyManage!0)?string("0.##")}</td>
<td>${(list.contributionProfit!0)?string("0.##")}</td>
<td>${(list.contributionProfitProfitMargin!0)?string("0.##")}</td>
<td>${(list.taxCost!0)?string("0.##")}</td>
<td>${(list.netProfit!0)?string("0.##")}</td>
<td>${(list.netProfitProfitMargin!0)?string("0.##")}</td>
</tr>
</#list>
</#if>
</tbody>
</table>
<tbody>
<#if (pager)?exists>
<#list pager as list>
<tr>
<td>${list.projectName!}</td>
<td>${(list.incomeTotal!0)?string("0.##")}</td>
<td>${(list.costTotal2!0)?string("0.##")}</td>
<td>${(list.costProjectManage!0)?string("0.##")}</td>
<td>${(list.costOther!0)?string("0.##")}</td>
<td>${(list.costExpropriation!0)?string("0.##")}</td>
<td>${(list.grossProfit!0)?string("0.##")}</td>
<td>${(list.grossProfitProfitMargin!0)?string("0.##")}</td>
<td>${(list.costCompanyManage!0)?string("0.##")}</td>
<td>${(list.contributionProfit!0)?string("0.##")}</td>
<td>${(list.contributionProfitProfitMargin!0)?string("0.##")}</td>
<td>${(list.taxCost!0)?string("0.##")}</td>
<td>${(list.netProfit!0)?string("0.##")}</td>
<td>${(list.netProfitProfitMargin!0)?string("0.##")}</td>
</tr>
</#list>
</#if>
</tbody>
</table>
</div>
</div>
</div>
<div class="am-tabs-bd">
<div class="am-tab-panel am-fade am-in" id="tab3">
<table class="am-table am-table-bordered am-table-radius table-main" style="padding:0;">
<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>
<div class="am-scrollable-horizontal">
<table class="am-table am-table-bordered am-table-radius table-main" style="padding:0;">
<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 (pager.list)?exists>
<#list pager.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>
<tbody>
<#if (pager)?exists>
<#list pager 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>
@ -181,6 +187,22 @@
<script>
var base = "${base}";
</script>
<script src="${base}/layui/layui.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);
}
});
});
</script>
</@defaultLayout.layout>

View File

@ -4,13 +4,13 @@
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>绿色智慧工地管理系统</title>
<title>项目四算管理系统</title>
<meta name="description" content="这是一个 index 页面">
<meta name="keywords" content="index">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="renderer" content="webkit">
<meta http-equiv="Cache-Control" content="no-siteapp" />
<meta name="apple-mobile-web-app-title" content="绿色智慧工地管理系统" />
<meta name="apple-mobile-web-app-title" content="项目四算管理系统" />
<#include "import.ftl"/>
</head>
<body>